Merge pull request #5044 from chiragshah6/evpn_dev2

bgpd: fix advertise-svi-ip upon vni-svi up-down
This commit is contained in:
Russ White 2019-09-24 10:45:56 -04:00 committed by GitHub
commit a56cb091fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9153,6 +9153,11 @@ void zebra_vxlan_advertise_svi_macip(ZAPI_HANDLER_ARGS)
if (zvni->advertise_svi_macip == advertise) if (zvni->advertise_svi_macip == advertise)
return; return;
/* Store flag even though SVI is not present.
* Once SVI comes up triggers self MAC-IP route add.
*/
zvni->advertise_svi_macip = advertise;
ifp = zvni->vxlan_if; ifp = zvni->vxlan_if;
if (!ifp) if (!ifp)
return; return;
@ -9164,20 +9169,17 @@ void zebra_vxlan_advertise_svi_macip(ZAPI_HANDLER_ARGS)
return; return;
zl2_info = zif->l2info.vxl; zl2_info = zif->l2info.vxl;
vlan_if = zvni_map_to_svi(zl2_info.access_vlan, vlan_if = zvni_map_to_svi(zl2_info.access_vlan,
zif->brslave_info.br_if); zif->brslave_info.br_if);
if (!vlan_if) if (!vlan_if)
return; return;
if (advertise) { if (advertise) {
zvni->advertise_svi_macip = advertise;
/* Add primary SVI MAC-IP */ /* Add primary SVI MAC-IP */
zvni_add_macip_for_intf(vlan_if, zvni); zvni_add_macip_for_intf(vlan_if, zvni);
} else { } else {
/* Del primary MAC-IP */ /* Del primary SVI MAC-IP */
zvni_del_macip_for_intf(vlan_if, zvni); zvni_del_macip_for_intf(vlan_if, zvni);
zvni->advertise_svi_macip = advertise;
} }
} }