From 32fa4a5a461eb1af4146d9985663d90fcddd9697 Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Tue, 9 May 2000 21:06:48 +0000 Subject: Premature aging of self-originated LSA received in flooding. --- proto/ospf/lsupd.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'proto') diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c index b603741..d9babc9 100644 --- a/proto/ospf/lsupd.c +++ b/proto/ospf/lsupd.c @@ -301,9 +301,36 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p, { struct ospf_iface *ift=NULL; void *body; + struct ospf_iface *nifa; + int self=0; DBG("PG143(5): Received LSA is newer\n"); + if(lsatmp.rt==p->cf->global->router_id) self=1; + + if(lsatmp.type==LSA_T_NET) + { + WALK_LIST(nifa,po->iface_list) + { + if(ipa_compare(nifa->iface->addr->ip,ipa_from_u32(lsatmp.id))==0) + { + self=1; + break; + } + } + } + + if(self) + { + lsa->age=(htons(LSA_MAXAGE)); + lsatmp.age=LSA_MAXAGE; + debug("Premature aging self originated lsa.\n"); + flood_lsa(NULL,lsa,&lsatmp,po,NULL,oa); + continue; + } + + + /* pg 144 (5a) */ if(lsadb && ((now-lsadb->inst_t)