From: Mitesh Kanjariya Date: Wed, 13 Dec 2017 20:18:11 +0000 (-0800) Subject: zebra: do not check if advertise-default-gw is on in no-advertise-default-gw flow X-Git-Tag: frr-5.0-dev~191^2~6 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=01a6143bdababeae6349d8e2ba3560236038b2ba;p=mirror%2Ffrr.git zebra: do not check if advertise-default-gw is on in no-advertise-default-gw flow Ticket: CM-19116 Review: CCR-7042 Testing: Manual Signed-off-by: Mitesh Kanjariya --- diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index fb1aebecc3..1e15529b00 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -1852,20 +1852,18 @@ static int zvni_gw_macip_del(struct interface *ifp, zebra_vni_t *zvni, return -1; /* only need to delete the entry from bgp if we sent it before */ - if (advertise_gw_macip_enabled(zvni)) { - if (IS_ZEBRA_DEBUG_VXLAN) - zlog_debug("%u:SVI %s(%u) VNI %u, sending GW MAC %s IP %s del to BGP", - ifp->vrf_id, ifp->name, - ifp->ifindex, zvni->vni, - prefix_mac2str(&(n->emac), - NULL, - ETHER_ADDR_STRLEN), - ipaddr2str(ip, buf2, sizeof(buf2))); - - /* Remove neighbor from BGP. */ - zvni_neigh_send_del_to_client(zvni->vni, &n->ip, &n->emac, - ZEBRA_MACIP_TYPE_GW); - } + if (IS_ZEBRA_DEBUG_VXLAN) + zlog_debug("%u:SVI %s(%u) VNI %u, sending GW MAC %s IP %s del to BGP", + ifp->vrf_id, ifp->name, + ifp->ifindex, zvni->vni, + prefix_mac2str(&(n->emac), + NULL, + ETHER_ADDR_STRLEN), + ipaddr2str(ip, buf2, sizeof(buf2))); + + /* Remove neighbor from BGP. */ + zvni_neigh_send_del_to_client(zvni->vni, &n->ip, &n->emac, + ZEBRA_MACIP_TYPE_GW); /* Delete this neighbor entry. */ zvni_neigh_del(zvni, n); @@ -6760,6 +6758,10 @@ int zebra_vxlan_advertise_gw_macip(struct zserv *client, u_short length, struct interface *vlan_if = NULL; struct interface *vrr_if = NULL; + zvni = zvni_lookup(vni); + if (!zvni) + return 0; + if (IS_ZEBRA_DEBUG_VXLAN) zlog_debug( "EVPN gateway macip Adv %s on VNI %d , currently %s", @@ -6768,10 +6770,6 @@ int zebra_vxlan_advertise_gw_macip(struct zserv *client, u_short length, ? "enabled" : "disabled"); - zvni = zvni_lookup(vni); - if (!zvni) - return 0; - if (zvni->advertise_gw_macip == advertise) return 0;