diff options
author | Chirag Shah <chirag@cumulusnetworks.com> | 2019-10-26 00:27:47 +0200 |
---|---|---|
committer | Chirag Shah <chirag@cumulusnetworks.com> | 2019-11-22 16:53:40 +0100 |
commit | 27727001d72ea0b7dec04449b55d19cfbc77c4c8 (patch) | |
tree | 21536b7d2be11969414b7f0956cfe0853d8d6a31 /bgpd/bgp_evpn.c | |
parent | zebra: display proper field in debug statement (diff) | |
download | frr-27727001d72ea0b7dec04449b55d19cfbc77c4c8.tar.xz frr-27727001d72ea0b7dec04449b55d19cfbc77c4c8.zip |
bgpd: adv pip update type-5 with correct rmac
when a pip is disabled or mac-vlan is not present
use anycast MAC as RMAC value.
Ticket:CM-26923
Reviewed By:CCR-9417
Testing Done:
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_evpn.c')
-rw-r--r-- | bgpd/bgp_evpn.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 320e070a0..d9d83335d 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -512,7 +512,7 @@ static void bgp_evpn_get_rmac_nexthop(struct bgpevpn *vpn, * advertise-pip and advertise-svi-ip features * are enabled. * Otherwise, for all host MAC-IP route's - * copy anycast RMAC + * copy anycast RMAC. */ if (CHECK_FLAG(flags, BGP_EVPN_MACIP_TYPE_SVI_IP) && bgp_vrf->evpn_info->advertise_pip && @@ -1577,18 +1577,19 @@ static int update_evpn_type5_route(struct bgp *bgp_vrf, struct prefix_evpn *evp, bgp_attr_default_set(&attr, BGP_ORIGIN_IGP); } - /* copy sys rmac */ - memcpy(&attr.rmac, &bgp_vrf->evpn_info->pip_rmac, ETH_ALEN); /* Advertise Primary IP (PIP) is enabled, send individual * IP (default instance router-id) as nexthop. * PIP is disabled or vrr interface is not present - * use anycast-IP as nexthop. + * use anycast-IP as nexthop and anycast RMAC. */ if (!bgp_vrf->evpn_info->advertise_pip || (!bgp_vrf->evpn_info->is_anycast_mac)) { attr.nexthop = bgp_vrf->originator_ip; attr.mp_nexthop_global_in = bgp_vrf->originator_ip; + memcpy(&attr.rmac, &bgp_vrf->rmac, ETH_ALEN); } else { + /* copy sys rmac */ + memcpy(&attr.rmac, &bgp_vrf->evpn_info->pip_rmac, ETH_ALEN); if (bgp_vrf->evpn_info->pip_ip.s_addr != INADDR_ANY) { attr.nexthop = bgp_vrf->evpn_info->pip_ip; attr.mp_nexthop_global_in = bgp_vrf->evpn_info->pip_ip; |