From 586c1800c447ff099d34889b23647c4733876d9b Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Wed, 27 Jun 2018 16:51:53 +0200 Subject: Nest: Neighbor cache cleanups Simplify neighbor cache code, fix several minor bugs, and improve handling of ONLINK flag. --- sysdep/linux/netlink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sysdep/linux') diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c index 73f77147..834504d0 100644 --- a/sysdep/linux/netlink.c +++ b/sysdep/linux/netlink.c @@ -696,8 +696,8 @@ nl_parse_multipath(struct nl_parse_state *s, struct krt_proto *p, struct rtattr rv->flags |= RNF_ONLINK; neighbor *nbr; - nbr = neigh_find2(&p->p, &rv->gw, rv->iface, - (rv->flags & RNF_ONLINK) ? NEF_ONLINK : 0); + nbr = neigh_find(&p->p, rv->gw, rv->iface, + (rv->flags & RNF_ONLINK) ? NEF_ONLINK : 0); if (!nbr || (nbr->scope == SCOPE_HOST)) return NULL; } @@ -1636,8 +1636,8 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h) ra->nh.flags |= RNF_ONLINK; neighbor *nbr; - nbr = neigh_find2(&p->p, &(ra->nh.gw), ra->nh.iface, - (ra->nh.flags & RNF_ONLINK) ? NEF_ONLINK : 0); + nbr = neigh_find(&p->p, ra->nh.gw, ra->nh.iface, + (ra->nh.flags & RNF_ONLINK) ? NEF_ONLINK : 0); if (!nbr || (nbr->scope == SCOPE_HOST)) { log(L_ERR "KRT: Received route %N with strange next-hop %I", net->n.addr, -- cgit v1.2.3