diff options
author | Ondrej Filip <feela@network.cz> | 2000-05-09 21:36:32 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-05-09 21:36:32 +0200 |
commit | b224ca32cfb5268db4984b5a640ab8a73852059b (patch) | |
tree | 8253e11ffbc09d523aebbe9d5989f38510ed3e87 /proto/ospf/lsalib.c | |
parent | 850fda2518d6e91ca8e126ff91adad62fd507276 (diff) | |
download | bird-b224ca32cfb5268db4984b5a640ab8a73852059b.tar bird-b224ca32cfb5268db4984b5a640ab8a73852059b.zip |
Flushing of old LSAs added.
Diffstat (limited to 'proto/ospf/lsalib.c')
-rw-r--r-- | proto/ospf/lsalib.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/proto/ospf/lsalib.c b/proto/ospf/lsalib.c index 4bb0635..048f93c 100644 --- a/proto/ospf/lsalib.c +++ b/proto/ospf/lsalib.c @@ -10,9 +10,10 @@ /* FIXME Go on */ void -flush_lsa(struct top_hash_entry *en) +flush_lsa(struct top_hash_entry *en, struct ospf_area *oa) { - return; + s_rem_node(SNODE en); + ospf_hash_delete(oa->gr,en); } void @@ -22,7 +23,7 @@ ospf_age(struct top_hash_entry *en, bird_clock_t delta, int flush, struct proto *p=&oa->po->proto; if(en->lsa.age==LSA_MAXAGE) { - if(flush) flush_lsa(en); + if(flush) flush_lsa(en,oa); return; } if((en->lsa.rt==p->cf->global->router_id)&&(en->lsa.age>LSREFRESHTIME)) @@ -31,7 +32,7 @@ ospf_age(struct top_hash_entry *en, bird_clock_t delta, int flush, } if((en->lsa.age+=delta)>LSA_MAXAGE) { - if(flush) flush_lsa(en); + if(flush) flush_lsa(en,oa); else en->lsa.age=LSA_MAXAGE; return; } @@ -375,7 +376,6 @@ lsa_install_new(struct ospf_lsa_header *lsa, void *body, struct ospf_area *oa, break; } } - /* FIXME delete routes to stub networks! */ } if(change) s_rem_node(SNODE en); } @@ -386,7 +386,6 @@ lsa_install_new(struct ospf_lsa_header *lsa, void *body, struct ospf_area *oa, en->inst_t=now; if(en->lsa_body!=NULL) mb_free(en->lsa_body); en->lsa_body=body; - en->lsa.length=lsa->length; memcpy(&en->lsa,lsa,sizeof(struct ospf_lsa_header)); /* FIXME decide if route calcualtion must be done and how */ if(oa->rt!=NULL) |