diff options
| author | Ameya Dharkar <adharkar@vmware.com> | 2021-01-04 18:31:11 -0800 | 
|---|---|---|
| committer | Ameya Dharkar <adharkar@vmware.com> | 2021-06-07 17:58:22 -0700 | 
| commit | d4a88de3bb32f76573af09f6758c43773b335bf6 (patch) | |
| tree | 1ecf8bbdf7f9e0dea1d3014c8e5471ecce59d9ff /bgpd/bgp_evpn.h | |
| parent | d0a4ee6010a6ba66aee396c2fe56e4ec6b45a553 (diff) | |
bgpd: CLI to advertise gateway IP overlay index
Adds gateway-ip option to advertise ipv4/ipv6 unicast CLI.
dev(config-router-af)# advertise <ipv4|ipv6> unicast
  <cr>
  gateway-ip      Specify EVPN Overlay Index
  route-map       route-map for filtering specific routes
When gateway-ip is specified, gateway IP field of EVPN RT-5 NLRI is filled with
the BGP nexthop of the vrf prefix being advertised.
No support for ESI overlay index yet.
Test cases:
1) advertise ipv4 unicast
2) advertise ipv4 unicast gateway-ip
3) advertise ipv6 unicast
4) advertise ipv6 unicast gateway-ip
5) Modify from no-overlay-index to gateway-ip
6) Modify from gateway-ip to no-overlay-index
7) CLI with route-map and modify route-map
Author: Sri Mohana Singamsetty <srimohans@gmail.com>
Signed-off-by: Sri Mohana Singamsetty <srimohans@gmail.com>
Diffstat (limited to 'bgpd/bgp_evpn.h')
| -rw-r--r-- | bgpd/bgp_evpn.h | 16 | 
1 files changed, 10 insertions, 6 deletions
diff --git a/bgpd/bgp_evpn.h b/bgpd/bgp_evpn.h index 83a6dd84c8..90e088c3eb 100644 --- a/bgpd/bgp_evpn.h +++ b/bgpd/bgp_evpn.h @@ -63,14 +63,18 @@ static inline int advertise_type5_routes(struct bgp *bgp_vrf,  	if (!bgp_vrf->l3vni)  		return 0; -	if (afi == AFI_IP && -	    CHECK_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN], -		       BGP_L2VPN_EVPN_ADVERTISE_IPV4_UNICAST)) +	if ((afi == AFI_IP) +	    && ((CHECK_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN], +			    BGP_L2VPN_EVPN_ADV_IPV4_UNICAST)) +		|| (CHECK_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN], +			       BGP_L2VPN_EVPN_ADV_IPV4_UNICAST_GW_IP))))  		return 1; -	if (afi == AFI_IP6 && -	    CHECK_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN], -		       BGP_L2VPN_EVPN_ADVERTISE_IPV6_UNICAST)) +	if ((afi == AFI_IP6) +	    && ((CHECK_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN], +			    BGP_L2VPN_EVPN_ADV_IPV6_UNICAST)) +		|| (CHECK_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN], +			       BGP_L2VPN_EVPN_ADV_IPV6_UNICAST_GW_IP))))  		return 1;  	return 0;  | 
