diff options
author | Ondrej Filip <feela@network.cz> | 2000-04-04 22:22:08 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-04-04 22:22:08 +0000 |
commit | f1f7faceb445fdfa2b2a013b791882afd68ae421 (patch) | |
tree | 93352f2c992102847b76c3a3bc044b12f577fe6f | |
parent | d8852b362c015db38abf180888e77900f35089de (diff) |
"Bug in hashing" fixed. Ehm it was bug in lsrql node removing.
-rw-r--r-- | proto/ospf/lsupd.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c index 950a1f8d..712eb737 100644 --- a/proto/ospf/lsupd.c +++ b/proto/ospf/lsupd.c @@ -141,13 +141,14 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p, WALK_LIST(NODE ntmp,ifa->neigh_list) { struct top_hash_entry *en; - if((en=ospf_hash_find_header(ntmp->lsrqh,&lsatmp))!=NULL) - { - s_rem_node(SNODE en); - DBG("Removing from lsreq list for neigh %u\n", ntmp->rid); - ospf_hash_delete(ntmp->lsrqh,en); - if(EMPTY_SLIST(ntmp->lsrql)) ospf_neigh_sm(ntmp, INM_LOADDONE); - } + if(ntmp->state>NEIGHBOR_EXSTART) + if((en=ospf_hash_find_header(ntmp->lsrqh,&lsatmp))!=NULL) + { + s_rem_node(SNODE en); + DBG("Removing from lsreq list for neigh %u\n", ntmp->rid); + ospf_hash_delete(ntmp->lsrqh,en); + if(EMPTY_SLIST(ntmp->lsrql)) ospf_neigh_sm(ntmp, INM_LOADDONE); + } } if((lsatmp.age==LSA_MAXAGE)&&(lsadb==NULL)) @@ -184,11 +185,12 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p, WALK_LIST(NODE ntmp,ifa->neigh_list) { struct top_hash_entry *en; - if((en=ospf_hash_find_header(ntmp->lsrth,&lsadb->lsa))!=NULL) - { - s_rem_node(SNODE en); - ospf_hash_delete(ntmp->lsrth,en); - } + if(ntmp->state>NEIGHBOR_EXSTART) + if((en=ospf_hash_find_header(ntmp->lsrth,&lsadb->lsa))!=NULL) + { + s_rem_node(SNODE en); + ospf_hash_delete(ntmp->lsrth,en); + } } /* Install new */ |