]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: don't get rmac in remote macip delete
authorMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>
Mon, 9 Oct 2017 09:49:39 +0000 (02:49 -0700)
committerMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>
Thu, 14 Dec 2017 18:57:05 +0000 (10:57 -0800)
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
bgpd/bgp_evpn.c
zebra/zebra_vxlan.c

index f93a0e44d4d6cf922d242e691fd5f9b16c06e4b3..b625297ac1e23725fe29436ebb22c462d0624287 100644 (file)
@@ -3056,10 +3056,14 @@ int bgp_evpn_local_l3vni_del(vni_t l3vni,
        memset(&bgp_vrf->rmac, 0, sizeof(struct ethaddr));
 
        /* delete RD/RT */
-       if (bgp_vrf->vrf_import_rtl && !list_isempty(bgp_vrf->vrf_import_rtl))
+       if (bgp_vrf->vrf_import_rtl && !list_isempty(bgp_vrf->vrf_import_rtl)) {
                list_delete(bgp_vrf->vrf_import_rtl);
-       if (bgp_vrf->vrf_export_rtl && !list_isempty(bgp_vrf->vrf_export_rtl))
+               bgp_vrf->vrf_import_rtl = NULL;
+       }
+       if (bgp_vrf->vrf_export_rtl && !list_isempty(bgp_vrf->vrf_export_rtl)) {
                list_delete(bgp_vrf->vrf_export_rtl);
+               bgp_vrf->vrf_export_rtl = NULL;
+       }
 
        /* update all corresponding local mac-ip routes */
        for (ALL_LIST_ELEMENTS_RO(bgp_vrf->l2vnis, node, vpn))
index ab4e5f64bab6142ad9c84c1c54d64f66a34d3cda..962e66068dd4b9dd313daabde8f57ec270c020be 100644 (file)
@@ -4279,7 +4279,6 @@ int zebra_vxlan_remote_macip_del(struct zserv *client, u_short length,
        struct stream *s;
        vni_t vni;
        struct ethaddr macaddr;
-       struct ethaddr rmac;
        struct ipaddr ip;
        struct in_addr vtep_ip;
        zebra_vni_t *zvni;
@@ -4288,12 +4287,10 @@ int zebra_vxlan_remote_macip_del(struct zserv *client, u_short length,
        u_short l = 0, ipa_len;
        char buf[ETHER_ADDR_STRLEN];
        char buf1[INET6_ADDRSTRLEN];
-       char buf3[INET6_ADDRSTRLEN];
        struct interface *ifp = NULL;
        struct zebra_if *zif = NULL;
 
        memset(&macaddr, 0, sizeof(struct ethaddr));
-       memset(&rmac, 0, sizeof(struct ethaddr));
        memset(&ip, 0, sizeof(struct ipaddr));
        memset(&vtep_ip, 0, sizeof(struct in_addr));
 
@@ -4318,16 +4315,13 @@ int zebra_vxlan_remote_macip_del(struct zserv *client, u_short length,
                l += 4 + ETH_ALEN + 4 + ipa_len;
                STREAM_GET(&vtep_ip.s_addr, s, IPV4_MAX_BYTELEN);
                l += IPV4_MAX_BYTELEN;
-               stream_get(&rmac.octet, s, ETH_ALEN);
-               l += ETH_ALEN;
 
                if (IS_ZEBRA_DEBUG_VXLAN)
                        zlog_debug(
-                               "Recv MACIP Del MAC %s IP %s VNI %u Remote VTEP %s RMAC %s from %s",
+                               "Recv MACIP Del MAC %s IP %s VNI %u Remote VTEP %s from %s",
                                prefix_mac2str(&macaddr, buf, sizeof(buf)),
                                ipaddr2str(&ip, buf1, sizeof(buf1)), vni,
                                inet_ntoa(vtep_ip),
-                               prefix_mac2str(&rmac, buf3, sizeof(buf3)),
                                zebra_route_string(client->proto));
 
                /* Locate VNI hash entry - expected to exist. */