]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
"Bug in hashing" fixed. Ehm it was bug in lsrql node removing.
authorOndrej Filip <feela@network.cz>
Tue, 4 Apr 2000 22:22:08 +0000 (22:22 +0000)
committerOndrej Filip <feela@network.cz>
Tue, 4 Apr 2000 22:22:08 +0000 (22:22 +0000)
proto/ospf/lsupd.c

index 950a1f8d8974b037c3941409c83e01d06af17771..712eb737502f06d82512b0b5f86bd2520e3bfe25 100644 (file)
@@ -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 */