diff options
| author | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2020-11-03 14:34:46 -0800 |
|---|---|---|
| committer | Anuradha Karuppiah <anuradhak@nvidia.com> | 2021-02-19 08:11:15 -0800 |
| commit | c0c7707d0d262d54b95a1e63bdb91b9a43ffc58f (patch) | |
| tree | d5c250df39a0f5206c3bfd1f6511433f147b2ace /zebra/zebra_vxlan.c | |
| parent | dc86ef74e68d575f4beec0197177e90dfb42c643 (diff) | |
zebra: fix problem with SVI IP being advertised even if disabled
SVI IP is being advertised unconditionally i.e. even if disabled (and
that is the default config). This can be problematic when the SVI address
is re-used across racks.
Added the user config condition in all the relevant places where the
SVI advertisement is triggered.
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_vxlan.c')
| -rw-r--r-- | zebra/zebra_vxlan.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 424c00d5eb..b36a9612a7 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -4493,6 +4493,16 @@ int zebra_vxlan_add_del_gw_macip(struct interface *ifp, struct prefix *p, return -1; } + /* VRR IP is advertised only if gw-macip-adv-enabled */ + if (IS_ZEBRA_IF_MACVLAN(ifp)) { + if (!advertise_gw_macip_enabled(zevpn)) + return 0; + } else { + /* SVI IP is advertised if gw or svi macip-adv-enabled */ + if (!advertise_svi_macip_enabled(zevpn) + && !advertise_gw_macip_enabled(zevpn)) + return 0; + } memcpy(&macaddr.octet, ifp->hw_addr, ETH_ALEN); |
