diff options
author | Ondrej Filip <feela@network.cz> | 2001-08-11 16:01:54 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2001-08-11 16:01:54 +0200 |
commit | 78e2c6ccf16b41bc19a4cd69f959c8ae47e68b9d (patch) | |
tree | 447e98707f9a409d70d240fb6f302cd2518b6a09 /proto/ospf/topology.c | |
parent | 5fc7c5c51344a8cc1fae2cc9077c2c331c1e419a (diff) | |
download | bird-78e2c6ccf16b41bc19a4cd69f959c8ae47e68b9d.tar bird-78e2c6ccf16b41bc19a4cd69f959c8ae47e68b9d.zip |
I will not originate the same lsa before MINLSINTERVAL.
Diffstat (limited to 'proto/ospf/topology.c')
-rw-r--r-- | proto/ospf/topology.c | 15 |
1 files changed, 15 insertions, 0 deletions
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 * |