diff options
Diffstat (limited to 'zebra/rt_netlink.c')
| -rw-r--r-- | zebra/rt_netlink.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 640802fe31..c9a9a81b18 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -2246,6 +2246,7 @@ static struct nexthop netlink_nexthop_process_nh(struct rtattr **tb, enum nexthop_types_t type = 0; int if_index = 0; size_t sz = 0; + struct interface *ifp_lookup; if_index = *(int *)RTA_DATA(tb[NHA_OIF]); @@ -2280,9 +2281,13 @@ static struct nexthop netlink_nexthop_process_nh(struct rtattr **tb, if (if_index) nh.ifindex = if_index; - *ifp = if_lookup_by_index_per_ns(zebra_ns_lookup(ns_id), nh.ifindex); + ifp_lookup = + if_lookup_by_index_per_ns(zebra_ns_lookup(ns_id), nh.ifindex); + if (ifp) - nh.vrf_id = (*ifp)->vrf_id; + *ifp = ifp_lookup; + if (ifp_lookup) + nh.vrf_id = ifp_lookup->vrf_id; else { flog_warn( EC_ZEBRA_UNKNOWN_INTERFACE, @@ -2451,7 +2456,6 @@ int netlink_nexthop_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) return 0; } -#if 0 /* Force off kernel nexthop group installs for now */ /** * netlink_request_nexthop() - Request nextop information from the kernel * @zns: Zebra namespace @@ -2510,12 +2514,6 @@ int netlink_nexthop_read(struct zebra_ns *zns) return ret; } -#else -int netlink_nexthop_read(struct zebra_ns *zns) -{ - return 0; -} -#endif int kernel_neigh_update(int add, int ifindex, uint32_t addr, char *lla, |
