From 3728267827e83bc095956b16256feae9e28adce7 Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Wed, 31 May 2000 18:21:42 +0000 Subject: And finally, Premature aging works. :-) --- proto/ospf/lsalib.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'proto/ospf/lsalib.c') diff --git a/proto/ospf/lsalib.c b/proto/ospf/lsalib.c index 62ea0b8..d631712 100644 --- a/proto/ospf/lsalib.c +++ b/proto/ospf/lsalib.c @@ -349,8 +349,13 @@ int lsa_comp(struct ospf_lsa_header *l1, struct ospf_lsa_header *l2) /* Return codes from point of view of l1 */ { - if(l1->sn>l2->sn) return CMP_NEWER; - if(l1->snsn) return CMP_OLDER; + u32 sn1,sn2; + + sn1=l1->sn-LSA_INITSEQNO+1; + sn2=l2->sn-LSA_INITSEQNO+1; + + if(sn1>sn2) return CMP_NEWER; + if(sn1checksum=!l2->checksum) return l1->checksumchecksum ? CMP_OLDER : CMP_NEWER; -- cgit v1.2.3