summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vxlan.c
diff options
context:
space:
mode:
authorChirag Shah <chirag@cumulusnetworks.com>2019-09-12 02:29:04 +0200
committerChirag Shah <chirag@cumulusnetworks.com>2019-09-24 06:14:04 +0200
commit3dacbb9d247b135970ea888d2a90064b639567a2 (patch)
treea759d90695597089fe4232e91dc744c067569dac /zebra/zebra_vxlan.c
parentMerge pull request #5034 from opensourcerouting/rm-topotest-cruft (diff)
downloadfrr-3dacbb9d247b135970ea888d2a90064b639567a2.tar.xz
frr-3dacbb9d247b135970ea888d2a90064b639567a2.zip
bgpd: fix advertise-svi-ip upon vni-svi up-down
When a VxLAN interface comes up new vni up event is sent to bgpd, which triggers bgpd to sync advertise-svi-macip to zebra. At this point, vni is present but the associated SVI may not be present. When SVI comes up, vni add event sent to bgpd (with associated vrf update). Bgpd already has vni present so advertise-svi-macip is not synced to Zebra. To fix, When advertise-svi-macip flag is synced first time, cache it in zebra context even though vni associated SVI is not present. when SVI comes up, interface address add event triggers new MAC-IP route add to bgpd. Ticket:CM-26038 Reviewed By:CCR-9254 Testing Done: Validated via running a sequence of steps in symmetric routing topology. - Enable advertise-svi-macip at l2vni level under bgp default instance (afi/safi, l2vpn/evpn) - Flap l2vni associated SVI interface. - Check the output of 'show bgp l2vpn evpn route' command for MAC-IP route of the SVI's (MAC and IP address). Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_vxlan.c')
-rw-r--r--zebra/zebra_vxlan.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index c7f2976ac..2417b505a 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -9153,6 +9153,11 @@ void zebra_vxlan_advertise_svi_macip(ZAPI_HANDLER_ARGS)
if (zvni->advertise_svi_macip == advertise)
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;
if (!ifp)
return;
@@ -9164,20 +9169,17 @@ void zebra_vxlan_advertise_svi_macip(ZAPI_HANDLER_ARGS)
return;
zl2_info = zif->l2info.vxl;
-
vlan_if = zvni_map_to_svi(zl2_info.access_vlan,
zif->brslave_info.br_if);
if (!vlan_if)
return;
if (advertise) {
- zvni->advertise_svi_macip = advertise;
/* Add primary SVI MAC-IP */
zvni_add_macip_for_intf(vlan_if, zvni);
} else {
- /* Del primary MAC-IP */
+ /* Del primary SVI MAC-IP */
zvni_del_macip_for_intf(vlan_if, zvni);
- zvni->advertise_svi_macip = advertise;
}
}