diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-02-04 11:52:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-04 11:52:22 +0100 |
commit | 51c48bdefdaabe957b9eac462e19593df8de51a4 (patch) | |
tree | 88936db3cddb9f01e2da93bb602950c6abe7fe8d | |
parent | Merge pull request #12732 from donaldsharp/fix_bgp_open_issues (diff) | |
parent | zebra: fix wrong conversion for evpn advertising (diff) | |
download | frr-51c48bdefdaabe957b9eac462e19593df8de51a4.tar.xz frr-51c48bdefdaabe957b9eac462e19593df8de51a4.zip |
Merge pull request #12668 from anlancs/fix/zebra-evpn-missing-advertise
zebra: fix wrong conversion for evpn advertising
-rw-r--r-- | zebra/zebra_vxlan.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 7e86d15b4..c6ff5089c 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -5554,6 +5554,7 @@ void zebra_vxlan_advertise_svi_macip(ZAPI_HANDLER_ARGS) struct zebra_if *zif = NULL; struct zebra_l2info_vxlan zl2_info; struct interface *vlan_if = NULL; + int old_advertise; zevpn = zebra_evpn_lookup(vni); if (!zevpn) @@ -5561,19 +5562,20 @@ void zebra_vxlan_advertise_svi_macip(ZAPI_HANDLER_ARGS) if (IS_ZEBRA_DEBUG_VXLAN) zlog_debug( - "EVPN SVI macip Adv %s on VNI %d , currently %s", + "EVPN SVI macip Adv %s on VNI %d, currently %s", advertise ? "enabled" : "disabled", vni, advertise_svi_macip_enabled(zevpn) ? "enabled" : "disabled"); - if (zevpn->advertise_svi_macip == advertise) - return; + old_advertise = advertise_svi_macip_enabled(zevpn); /* Store flag even though SVI is not present. * Once SVI comes up triggers self MAC-IP route add. */ zevpn->advertise_svi_macip = advertise; + if (advertise_svi_macip_enabled(zevpn) == old_advertise) + return; ifp = zevpn->vxlan_if; if (!ifp) @@ -5637,7 +5639,7 @@ void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS) return; if (IS_ZEBRA_DEBUG_VXLAN) - zlog_debug("EVPN subnet Adv %s on VNI %d , currently %s", + zlog_debug("EVPN subnet Adv %s on VNI %d, currently %s", advertise ? "enabled" : "disabled", vni, zevpn->advertise_subnet ? "enabled" : "disabled"); @@ -5719,6 +5721,7 @@ void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS) struct zebra_l2info_vxlan zl2_info; struct interface *vlan_if = NULL; struct interface *vrr_if = NULL; + int old_advertise; zevpn = zebra_evpn_lookup(vni); if (!zevpn) @@ -5726,15 +5729,16 @@ void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS) if (IS_ZEBRA_DEBUG_VXLAN) zlog_debug( - "EVPN gateway macip Adv %s on VNI %d , currently %s", + "EVPN gateway macip Adv %s on VNI %d, currently %s", advertise ? "enabled" : "disabled", vni, advertise_gw_macip_enabled(zevpn) ? "enabled" - : "disabled"); + : "disabled"); - if (zevpn->advertise_gw_macip == advertise) - return; + old_advertise = advertise_gw_macip_enabled(zevpn); zevpn->advertise_gw_macip = advertise; + if (advertise_gw_macip_enabled(zevpn) == old_advertise) + return; ifp = zevpn->vxlan_if; if (!ifp) |