]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fix stupid bug in neighbor cache.
authorMartin Mares <mj@ucw.cz>
Mon, 10 Apr 2000 10:40:00 +0000 (10:40 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 10 Apr 2000 10:40:00 +0000 (10:40 +0000)
nest/iface.c
nest/neighbor.c

index 0ba6bef9a08cd9269cfbf21ff0f30fdf4ba8bda1..b58b183dee79f7e358c454f7bc06d2a12e2f05ac 100644 (file)
@@ -232,8 +232,8 @@ if_update(struct iface *new)
   i = mb_alloc(if_pool, sizeof(struct iface));
   memcpy(i, new, sizeof(*i));
   init_list(&i->addrs);
-  init_list(&i->neighbors);
 newif:
+  init_list(&i->neighbors);
   i->flags |= IF_UPDATED | IF_TMP_DOWN;                /* Tmp down as we don't have addresses yet */
   add_tail(&iface_list, &i->n);
   return i;
index c4328b6cf98ad2683d3bfcb2ed0113cf431ffe03..ef1df865306542625f2c79b212d180222d6533d5 100644 (file)
@@ -138,8 +138,7 @@ neigh_if_up(struct iface *i)
   neighbor *n, *next;
 
   WALK_LIST_DELSAFE(n, next, sticky_neigh_list)
-    if (!n->iface &&
-       if_connected(&n->addr, i) > 0)
+    if (if_connected(&n->addr, i) > 0)
       {
        n->iface = i;
        add_tail(&i->neighbors, &n->if_n);