]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: local mac entries populated in correct netnamespace
authorPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 28 Oct 2019 11:02:17 +0000 (12:02 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 21 Sep 2020 07:17:11 +0000 (09:17 +0200)
MAC address neighbours are read on the same netnamespace where the vxlan
interface is.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
zebra/zebra_evpn.c

index d78ee57af35c58fde5b2cec4c5ad225fe8faa00e..542f36156e3d30e23788887539df03eb6fcf162f 100644 (file)
@@ -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(