summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-10 12:40:00 +0200
committerMartin Mares <mj@ucw.cz>2000-04-10 12:40:00 +0200
commit287111fed1c8e9eb135df1108ea747e02b30e9e9 (patch)
tree6b172804ad36a6eb72354622c1aaf54d2ae29436
parentef2c708dfac4c8b4b5ab0ed8b71842da5c7ab3d7 (diff)
downloadbird-287111fed1c8e9eb135df1108ea747e02b30e9e9.tar
bird-287111fed1c8e9eb135df1108ea747e02b30e9e9.zip
Fix stupid bug in neighbor cache.
-rw-r--r--nest/iface.c2
-rw-r--r--nest/neighbor.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/nest/iface.c b/nest/iface.c
index 0ba6bef..b58b183 100644
--- a/nest/iface.c
+++ b/nest/iface.c
@@ -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;
diff --git a/nest/neighbor.c b/nest/neighbor.c
index c4328b6..ef1df86 100644
--- a/nest/neighbor.c
+++ b/nest/neighbor.c
@@ -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);