Commit 287111fe authored by Martin Mareš's avatar Martin Mareš

Fix stupid bug in neighbor cache.

parent ef2c708d
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment