From 78e2c6ccf16b41bc19a4cd69f959c8ae47e68b9d Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Sat, 11 Aug 2001 14:01:54 +0000 Subject: I will not originate the same lsa before MINLSINTERVAL. --- proto/ospf/topology.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'proto/ospf/topology.c') diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index a0dd18a..c07b1a7 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -189,6 +189,13 @@ originate_rt_lsa(struct ospf_area *oa) struct top_hash_entry *en; void *body; + if((oa->rt)&&((oa->rt->inst_t+MINLSINTERVAL))>now) return; + /* + * Tick is probably set to very low value. We cannot + * originate new LSA before MINLSINTERVAL. We will + * try to do it next tick. + */ + OSPF_TRACE(D_EVENTS, "Originating RT_lsa for area \"%I\".",oa->areaid); lsa.age=0; @@ -210,6 +217,7 @@ originate_rt_lsa(struct ospf_area *oa) oa->rt=en; flood_lsa(NULL,NULL,&oa->rt->lsa,po,NULL,oa,1); schedule_rtcalc(oa); + oa->origrt=0; } void * @@ -260,6 +268,12 @@ originate_net_lsa(struct ospf_iface *ifa) struct proto *p=&po->proto; void *body; + if(ifa->nlsa&&((ifa->nlsa->inst_t+MINLSINTERVAL)>now)) return; + /* + * It's too early to originate new network LSA. We will + * try to do it next tick + */ + OSPF_TRACE(D_EVENTS, "Originating Net lsa for iface \"%s\".", ifa->iface->name); @@ -300,6 +314,7 @@ originate_net_lsa(struct ospf_iface *ifa) lsasum_calculate(&lsa,body,po); ifa->nlsa=lsa_install_new(&lsa, body, ifa->oa); flood_lsa(NULL,NULL,&ifa->nlsa->lsa,po,NULL,ifa->oa,1); + ifa->orignet=0; } static void * -- cgit v1.2.3