summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2017-12-19 12:23:32 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-02-27 11:11:24 +0100
commit5895d33f40fdf22f1b422154dc598bbba69e1796 (patch)
treea1302070aec4da0bf7f42f3e351e0bf9dbf44313 /zebra/interface.c
parent9a76375f39f556188d25920fb53802c091bc4064 (diff)
zebra: ipv6 operations stick to namespace
All ipv6 operations stick to namespace. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c9
1 files changed, 7 insertions, 2 deletions
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++;
}