]> 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, 18 May 2020 12:11:03 +0000 (14:11 +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_vxlan.c

index 6a4c01bd5bf1f9f6d47050d45b500c6818df2432..4d2dc85b761c84e10665ad4a4803510bdf86d27f 100644 (file)
@@ -3987,6 +3987,7 @@ static void zvni_deref_ip2mac(zebra_vni_t *zvni, zebra_mac_t *mac)
 static void zvni_read_mac_neigh(zebra_vni_t *zvni, struct interface *ifp)
 {
        struct zebra_ns *zns;
+       struct zebra_vrf *zvrf;
        struct zebra_if *zif;
        struct interface *vlan_if;
        struct zebra_l2info_vxlan *vxl;
@@ -3994,7 +3995,10 @@ static void zvni_read_mac_neigh(zebra_vni_t *zvni, struct interface *ifp)
 
        zif = ifp->info;
        vxl = &zif->l2info.vxl;
-       zns = zebra_ns_lookup(NS_DEFAULT);
+       zvrf = zebra_vrf_lookup_by_id(zvni->vrf_id);
+       if (!zvrf || !zvrf->zns)
+               return;
+       zns = zvrf->zns;
 
        if (IS_ZEBRA_DEBUG_VXLAN)
                zlog_debug(