0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

Fix stupid bug in neighbor cache.

This commit is contained in:
Martin Mares 2000-04-10 10:40:00 +00:00
parent ef2c708dfa
commit 287111fed1
2 changed files with 2 additions and 3 deletions

View File

@ -232,8 +232,8 @@ if_update(struct iface *new)
i = mb_alloc(if_pool, sizeof(struct iface)); i = mb_alloc(if_pool, sizeof(struct iface));
memcpy(i, new, sizeof(*i)); memcpy(i, new, sizeof(*i));
init_list(&i->addrs); init_list(&i->addrs);
init_list(&i->neighbors);
newif: newif:
init_list(&i->neighbors);
i->flags |= IF_UPDATED | IF_TMP_DOWN; /* Tmp down as we don't have addresses yet */ i->flags |= IF_UPDATED | IF_TMP_DOWN; /* Tmp down as we don't have addresses yet */
add_tail(&iface_list, &i->n); add_tail(&iface_list, &i->n);
return i; return i;

View File

@ -138,8 +138,7 @@ neigh_if_up(struct iface *i)
neighbor *n, *next; neighbor *n, *next;
WALK_LIST_DELSAFE(n, next, sticky_neigh_list) WALK_LIST_DELSAFE(n, next, sticky_neigh_list)
if (!n->iface && if (if_connected(&n->addr, i) > 0)
if_connected(&n->addr, i) > 0)
{ {
n->iface = i; n->iface = i;
add_tail(&i->neighbors, &n->if_n); add_tail(&i->neighbors, &n->if_n);