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 <mitesh@cumulusnetworks.com>
This commit is contained in:
Mitesh Kanjariya 2017-12-13 12:18:11 -08:00 committed by mitesh
parent 3b103fec6b
commit 01a6143bda

View File

@ -1852,7 +1852,6 @@ static int zvni_gw_macip_del(struct interface *ifp, zebra_vni_t *zvni,
return -1; return -1;
/* only need to delete the entry from bgp if we sent it before */ /* only need to delete the entry from bgp if we sent it before */
if (advertise_gw_macip_enabled(zvni)) {
if (IS_ZEBRA_DEBUG_VXLAN) if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug("%u:SVI %s(%u) VNI %u, sending GW MAC %s IP %s del to BGP", zlog_debug("%u:SVI %s(%u) VNI %u, sending GW MAC %s IP %s del to BGP",
ifp->vrf_id, ifp->name, ifp->vrf_id, ifp->name,
@ -1865,7 +1864,6 @@ static int zvni_gw_macip_del(struct interface *ifp, zebra_vni_t *zvni,
/* Remove neighbor from BGP. */ /* Remove neighbor from BGP. */
zvni_neigh_send_del_to_client(zvni->vni, &n->ip, &n->emac, zvni_neigh_send_del_to_client(zvni->vni, &n->ip, &n->emac,
ZEBRA_MACIP_TYPE_GW); ZEBRA_MACIP_TYPE_GW);
}
/* Delete this neighbor entry. */ /* Delete this neighbor entry. */
zvni_neigh_del(zvni, n); 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 *vlan_if = NULL;
struct interface *vrr_if = NULL; struct interface *vrr_if = NULL;
zvni = zvni_lookup(vni);
if (!zvni)
return 0;
if (IS_ZEBRA_DEBUG_VXLAN) if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug( zlog_debug(
"EVPN gateway macip Adv %s on VNI %d , currently %s", "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" ? "enabled"
: "disabled"); : "disabled");
zvni = zvni_lookup(vni);
if (!zvni)
return 0;
if (zvni->advertise_gw_macip == advertise) if (zvni->advertise_gw_macip == advertise)
return 0; return 0;