From 5895d33f40fdf22f1b422154dc598bbba69e1796 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Tue, 19 Dec 2017 12:23:32 +0100 Subject: zebra: ipv6 operations stick to namespace All ipv6 operations stick to namespace. Signed-off-by: Philippe Guibert --- zebra/interface.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'zebra/interface.c') diff --git a/zebra/interface.c b/zebra/interface.c index 6ee1db6a4c..74ffdee31f 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -805,21 +805,26 @@ void if_nbr_ipv6ll_to_ipv4ll_neigh_update(struct interface *ifp, char buf[16] = "169.254.0.1"; struct in_addr ipv4_ll; char mac[6]; + ns_id_t ns_id; inet_pton(AF_INET, buf, &ipv4_ll); ipv6_ll_address_to_mac(address, (u_char *)mac); + if (!vrf_is_backend_netns()) + ns_id = NS_DEFAULT; + else + ns_id = (ns_id_t)(ifp->vrf_id); /* * Remove existed arp record for the interface as netlink * protocol does not have update message types * * supported message types are RTM_NEWNEIGH and RTM_DELNEIGH */ - kernel_neigh_update (0, ifp->ifindex, ipv4_ll.s_addr, mac, 6); + kernel_neigh_update(0, ifp->ifindex, ipv4_ll.s_addr, mac, 6, ns_id); /* Add arp record */ - kernel_neigh_update (add, ifp->ifindex, ipv4_ll.s_addr, mac, 6); + kernel_neigh_update(add, ifp->ifindex, ipv4_ll.s_addr, mac, 6, ns_id); zvrf->neigh_updates++; } -- cgit v1.2.3