]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_vxlan.c
Merge pull request #12654 from Pdoijode/evpn-evi-detail-json-changes
[mirror_frr.git] / zebra / zebra_vxlan.c
index 177659f5ce5555d298782c7e5ba99918c49a5b06..0bbc811324d65abe51b5edbdb637c7d9d7c8d3f3 100644 (file)
@@ -5559,6 +5559,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)
@@ -5566,19 +5567,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)
@@ -5642,7 +5644,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");
 
@@ -5724,6 +5726,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)
@@ -5731,15 +5734,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)