From 25a3f3da7a2312e5ae21ada2aeccc412e2d1d867 Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Wed, 7 Jun 2000 23:34:43 +0000 Subject: I mark all LSA as in distance INFINITY in process of aging. I don't have to WALK twice through it. --- proto/ospf/lsalib.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'proto/ospf/lsalib.c') diff --git a/proto/ospf/lsalib.c b/proto/ospf/lsalib.c index cd29421..3cd62a9 100644 --- a/proto/ospf/lsalib.c +++ b/proto/ospf/lsalib.c @@ -29,6 +29,9 @@ flush_lsa(struct top_hash_entry *en, struct ospf_area *oa) * * RFC says, that router should check checksum of every LSA to detect some * hardware problem. BIRD does not do it to minimalize CPU utilization. + * + * If routing table calculation is scheduled, it also invalidates old routing + * table calculation results. */ void ospf_age(struct ospf_area *oa) @@ -41,6 +44,15 @@ ospf_age(struct ospf_area *oa) WALK_SLIST_DELSAFE(en,nxt,oa->lsal) { + if(oa->calcrt) + { + en->color=OUTSPF; + en->dist=LSINFINITY; + en->nhi=NULL; + en->nh=ipa_from_u32(0); + DBG("Infinitying Type: %u, Id: %I, Rt: %I\n", en->lsa.type, en->lsa.id, + en->lsa.rt); + } if(en->lsa.age==LSA_MAXAGE) { if(flush) flush_lsa(en,oa); -- cgit v1.2.3