diff options
| author | Chirag Shah <chirag@nvidia.com> | 2023-09-22 17:19:09 -0700 | 
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2023-11-30 09:26:50 +0000 | 
| commit | f54f8d7eb77c19bf635fc5c2ca8de9ff3083253b (patch) | |
| tree | ba49b35376bf162e8a7eb04ef0bf05d1196aef54 /bgpd/bgp_evpn.h | |
| parent | a027be0084390853d704b2f2235fd8e38452b0c4 (diff) | |
bgpd: aggr summary-only suppressed export to evpn
When exporting bgp vrf instance unicast route into
EVPN as type-5, check for suppressed ones and do not
export them.
Ticket:#3534718
Testing Done:
Config:
router bgp 660000 vrf vrf1
 bgp router-id 144.1.1.2
 no bgp network import-check
 neighbor 144.1.1.1 remote-as external
 !
 address-family ipv4 unicast
  aggregate-address 50.1.0.0/16 summary-only
  redistribute connected
 exit-address-family
 !
 address-family l2vpn evpn
  advertise ipv4 unicast
 exit-address-family
exit
v4 suppressed route: (5 suppressed routes not exported to evpn)
tor1# vtysh -c "show bgp vrf vrf1 ipv4 unicast" | grep "50.1"
*> 50.1.0.0/16      0.0.0.0(bordertor-11)
s> 50.1.1.212/32    6.0.0.30(leaf-11)<
s> 50.1.1.222/32    6.0.0.31(leaf-11)<
s> 50.1.110.0/24    0.0.0.0(bordertor-11)
s> 50.1.210.214/32  6.0.0.30(leaf-11)<
s> 50.1.220.224/32  6.0.0.31(leaf-11)<
tor1# vtysh -c "show bgp l2vpn evpn route" | grep -A3 "*> \[5\].*\[50.1"
*> [5]:[0]:[16]:[50.1.0.0] RD 144.1.1.2:7
                    6.0.0.1 (bordertor-11)
                                             0         32768 ?
                    ET:8 RT:4640:104001 Rmac:00:02:00:00:00:04
Signed-off-by: Chirag Shah <chirag@nvidia.com>
(cherry picked from commit 71d08ecc9d2a43997fe92193c3bd1d1203fa6954)
Diffstat (limited to 'bgpd/bgp_evpn.h')
| -rw-r--r-- | bgpd/bgp_evpn.h | 26 | 
1 files changed, 1 insertions, 25 deletions
diff --git a/bgpd/bgp_evpn.h b/bgpd/bgp_evpn.h index 55474464e5..8403897587 100644 --- a/bgpd/bgp_evpn.h +++ b/bgpd/bgp_evpn.h @@ -94,31 +94,6 @@ static inline bool is_pi_family_evpn(struct bgp_path_info *pi)  	return is_pi_family_matching(pi, AFI_L2VPN, SAFI_EVPN);  } -/* Flag if the route is injectable into EVPN. This would be either a - * non-imported route or a non-EVPN imported route. - */ -static inline bool is_route_injectable_into_evpn(struct bgp_path_info *pi) -{ -	struct bgp_path_info *parent_pi; -	struct bgp_table *table; -	struct bgp_dest *dest; - -	if (pi->sub_type != BGP_ROUTE_IMPORTED || !pi->extra || -	    !pi->extra->vrfleak || !pi->extra->vrfleak->parent) -		return true; - -	parent_pi = (struct bgp_path_info *)pi->extra->vrfleak->parent; -	dest = parent_pi->net; -	if (!dest) -		return true; -	table = bgp_dest_table(dest); -	if (table && -	    table->afi == AFI_L2VPN && -	    table->safi == SAFI_EVPN) -		return false; -	return true; -} -  static inline bool evpn_resolve_overlay_index(void)  {  	struct bgp *bgp = NULL; @@ -206,5 +181,6 @@ extern mpls_label_t *bgp_evpn_path_info_labels_get_l3vni(mpls_label_t *labels,  extern vni_t bgp_evpn_path_info_get_l3vni(const struct bgp_path_info *pi);  extern bool bgp_evpn_mpath_has_dvni(const struct bgp *bgp_vrf,  				    struct bgp_path_info *mpinfo); +extern bool is_route_injectable_into_evpn(struct bgp_path_info *pi);  #endif /* _QUAGGA_BGP_EVPN_H */  | 
