1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Nest: Neighbor cache cleanups

Simplify neighbor cache code, fix several minor bugs, and improve
handling of ONLINK flag.
This commit is contained in:
Ondrej Zajicek (work)
2018-06-27 16:51:53 +02:00
parent 45f28d8581
commit 586c1800c4
13 changed files with 267 additions and 272 deletions

View File

@@ -744,9 +744,9 @@ bgp_apply_next_hop(struct bgp_parse_state *s, rta *a, ip_addr gw, ip_addr ll)
/* GW_DIRECT -> single_hop -> p->neigh != NULL */
if (ipa_nonzero(gw))
nbr = neigh_find2(&p->p, &gw, NULL, 0);
nbr = neigh_find(&p->p, gw, NULL, 0);
else if (ipa_nonzero(ll))
nbr = neigh_find2(&p->p, &ll, p->neigh->iface, 0);
nbr = neigh_find(&p->p, ll, p->neigh->iface, 0);
if (!nbr || (nbr->scope == SCOPE_HOST))
WITHDRAW(BAD_NEXT_HOP);