diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-06-14 12:25:18 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-06-14 15:15:13 -0400 | 
| commit | 4d616f022fddd0dd59c6e0e422bf7acf2eb1c56b (patch) | |
| tree | 4852941743e7711fcf8ee086e9d33343cffd608f /bgpd/bgp_route.h | |
| parent | 0fb16305200113a92e3862e05d6833217f935211 (diff) | |
bgpd: some safi's do not mix with bgp suppress-fib
BGP cannot decide to disseminate the safi based upon the
bgp suppress-fib command.  Modify the code to look at
the safi for the decision to communicate to a peer the
particular node.
Ticket: #3402926
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_route.h')
| -rw-r--r-- | bgpd/bgp_route.h | 11 | 
1 files changed, 8 insertions, 3 deletions
diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h index 9bd9e48e22..3068902022 100644 --- a/bgpd/bgp_route.h +++ b/bgpd/bgp_route.h @@ -592,8 +592,12 @@ static inline void prep_for_rmap_apply(struct bgp_path_info *dst_pi,  	}  } -static inline bool bgp_check_advertise(struct bgp *bgp, struct bgp_dest *dest) +static inline bool bgp_check_advertise(struct bgp *bgp, struct bgp_dest *dest, +				       safi_t safi)  { +	if (!bgp_fibupd_safi(safi)) +		return true; +  	return (!(BGP_SUPPRESS_FIB_ENABLED(bgp) &&  		  CHECK_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING) &&  		 (!bgp_option_check(BGP_OPT_NO_FIB)))); @@ -605,11 +609,12 @@ static inline bool bgp_check_advertise(struct bgp *bgp, struct bgp_dest *dest)   * This function assumes that bgp_check_advertise was already returned   * as good to go.   */ -static inline bool bgp_check_withdrawal(struct bgp *bgp, struct bgp_dest *dest) +static inline bool bgp_check_withdrawal(struct bgp *bgp, struct bgp_dest *dest, +					safi_t safi)  {  	struct bgp_path_info *pi, *selected = NULL; -	if (!BGP_SUPPRESS_FIB_ENABLED(bgp)) +	if (!bgp_fibupd_safi(safi) || !BGP_SUPPRESS_FIB_ENABLED(bgp))  		return false;  	for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next) {  | 
