diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2025-01-28 09:35:22 -0500 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-28 09:35:22 -0500 | 
| commit | 75991d68a1a7a1db51a14768c112a9b94d2f3d6f (patch) | |
| tree | 1f1d7996e1a2e1e4830b86d6404dc3f6c6bc0584 /bgpd/bgp_addpath.c | |
| parent | 689b455c47de1d014bdfe728abed19c15c89cc15 (diff) | |
| parent | 513d333ca8cbbb8094962c46deb2904f53871cbd (diff) | |
Merge pull request #17940 from opensourcerouting/fix/revert_4338e21aa2feba57ea7004c36362e5d8186340b8_10.0
Revert "bgpd: Handle Addpath capability using dynamic capabilities" (backport)
Diffstat (limited to 'bgpd/bgp_addpath.c')
| -rw-r--r-- | bgpd/bgp_addpath.c | 33 | 
1 files changed, 1 insertions, 32 deletions
diff --git a/bgpd/bgp_addpath.c b/bgpd/bgp_addpath.c index f391c13847..de4b4a48af 100644 --- a/bgpd/bgp_addpath.c +++ b/bgpd/bgp_addpath.c @@ -10,8 +10,6 @@  #include "bgp_addpath.h"  #include "bgp_route.h" -#include "bgp_open.h" -#include "bgp_packet.h"  static const struct bgp_addpath_strategy_names strat_names[BGP_ADDPATH_MAX] = {  	{ @@ -361,31 +359,6 @@ void bgp_addpath_type_changed(struct bgp *bgp)  	}  } -int bgp_addpath_capability_action(enum bgp_addpath_strat addpath_type, -				  uint8_t paths) -{ -	int action = CAPABILITY_ACTION_UNSET; - -	switch (addpath_type) { -	case BGP_ADDPATH_ALL: -	case BGP_ADDPATH_BEST_PER_AS: -		action = CAPABILITY_ACTION_SET; -		break; -	case BGP_ADDPATH_BEST_SELECTED: -		if (paths) -			action = CAPABILITY_ACTION_SET; -		else -			action = CAPABILITY_ACTION_UNSET; -		break; -	case BGP_ADDPATH_NONE: -	case BGP_ADDPATH_MAX: -		action = CAPABILITY_ACTION_UNSET; -		break; -	} - -	return action; -} -  /*   * Change the addpath type assigned to a peer, or peer group. In addition to   * adjusting the counts, peer sessions will be reset as needed to make the @@ -400,7 +373,6 @@ void bgp_addpath_set_peer_type(struct peer *peer, afi_t afi, safi_t safi,  	struct listnode *node, *nnode;  	struct peer *tmp_peer;  	struct peer_group *group; -	int action = bgp_addpath_capability_action(addpath_type, paths);  	if (safi == SAFI_LABELED_UNICAST)  		safi = SAFI_UNICAST; @@ -458,12 +430,9 @@ void bgp_addpath_set_peer_type(struct peer *peer, afi_t afi, safi_t safi,  			}  		}  	} else { -		if (!CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_RCV) && -		    !CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_ADV)) -			peer_change_action(peer, afi, safi, peer_change_reset); +		peer_change_action(peer, afi, safi, peer_change_reset);  	} -	bgp_capability_send(peer, afi, safi, CAPABILITY_CODE_ADDPATH, action);  }  /*  | 
