summaryrefslogtreecommitdiffstats
path: root/proto/ospf/ospf.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-06-05 04:23:20 +0200
committerOndrej Filip <feela@network.cz>2000-06-05 04:23:20 +0200
commit273fd2c16475d3d1275a4fe17443c3ba2b93fbc4 (patch)
tree20e359ed2d2bfa79cf2acac2a8bbaeedde6116be /proto/ospf/ospf.c
parent2d37d36c676e16b92ac38a60d3c269efeeaf07ac (diff)
downloadbird-273fd2c16475d3d1275a4fe17443c3ba2b93fbc4.tar
bird-273fd2c16475d3d1275a4fe17443c3ba2b93fbc4.zip
Many bugfixes (I don't remember all of them):
Added link ID calculation for external routes with same prefix but different mask. Bugfix in NET lsa origination. Bugfix in NET hashing. Bugfix in LSA installing.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r--proto/ospf/ospf.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 80a0cca..30be459 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -247,12 +247,25 @@ ospf_rt_notify(struct proto *p, net *n, rte *new, rte *old, ea_list *attrs)
u32 rtid=po->proto.cf->global->router_id;
struct ospf_area *oa;
struct top_hash_entry *en;
+ u32 pr=ipa_to_u32(n->n.prefix);
+ struct ospf_lsa_ext *ext;
+ int i;
/* Flush old external LSA */
WALK_LIST(oa, po->area_list)
{
- if(en=ospf_hash_find(oa->gr, ipa_to_u32(n->n.prefix), rtid, LSA_T_EXT))
- net_flush_lsa(en,po,oa);
+ for(i=0;i<MAXNETS;i++,pr++)
+ {
+ if(en=ospf_hash_find(oa->gr, pr, rtid, LSA_T_EXT))
+ {
+ ext=en->lsa_body;
+ if(ipa_compare(ext->netmask, ipa_mkmask(n->n.pxlen))==0)
+ {
+ net_flush_lsa(en,po,oa);
+ break;
+ }
+ }
+ }
}
}
}