From: Philippe Guibert Date: Mon, 28 Oct 2019 11:02:17 +0000 (+0100) Subject: zebra: local mac entries populated in correct netnamespace X-Git-Tag: base_7.6~545^2~9 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=b5fde6fd5c41b99ff205b1139490db49acab1667;p=mirror%2Ffrr.git zebra: local mac entries populated in correct netnamespace MAC address neighbours are read on the same netnamespace where the vxlan interface is. Signed-off-by: Philippe Guibert --- diff --git a/zebra/zebra_evpn.c b/zebra/zebra_evpn.c index d78ee57af3..542f36156e 100644 --- a/zebra/zebra_evpn.c +++ b/zebra/zebra_evpn.c @@ -869,6 +869,7 @@ void zebra_evpn_install_mac_hash(struct hash_bucket *bucket, void *ctxt) void zebra_evpn_read_mac_neigh(zebra_evpn_t *zevpn, struct interface *ifp) { struct zebra_ns *zns; + struct zebra_vrf *zvrf; struct zebra_if *zif; struct interface *vlan_if; struct zebra_l2info_vxlan *vxl; @@ -876,7 +877,10 @@ void zebra_evpn_read_mac_neigh(zebra_evpn_t *zevpn, struct interface *ifp) zif = ifp->info; vxl = &zif->l2info.vxl; - zns = zebra_ns_lookup(NS_DEFAULT); + zvrf = zebra_vrf_lookup_by_id(zevpn->vrf_id); + if (!zvrf || !zvrf->zns) + return; + zns = zvrf->zns; if (IS_ZEBRA_DEBUG_VXLAN) zlog_debug(