Skip to content

Commit 5d50c19

Browse files
authored
Merge pull request #18915 from FRRouting/mergify/bp/stable/10.3/pr-18911
bgpd: correct no form commands (backport #18911)
2 parents 35e662e + fe52f73 commit 5d50c19

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

bgpd/bgp_vty.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9278,12 +9278,15 @@ DEFUN (no_neighbor_addpath_tx_all_paths,
92789278
{
92799279
int idx_peer = 2;
92809280
struct peer *peer;
9281+
safi_t safi = bgp_node_safi(vty);
92819282

92829283
peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
92839284
if (!peer)
92849285
return CMD_WARNING_CONFIG_FAILED;
92859286

9286-
if (peer->addpath_type[bgp_node_afi(vty)][bgp_node_safi(vty)] != BGP_ADDPATH_ALL) {
9287+
if (safi == SAFI_LABELED_UNICAST)
9288+
safi = SAFI_UNICAST;
9289+
if (peer->addpath_type[bgp_node_afi(vty)][safi] != BGP_ADDPATH_ALL) {
92879290
vty_out(vty,
92889291
"%% Peer not currently configured to transmit all paths.");
92899292
return CMD_WARNING_CONFIG_FAILED;
@@ -9375,13 +9378,15 @@ DEFUN (no_neighbor_addpath_tx_bestpath_per_as,
93759378
{
93769379
int idx_peer = 2;
93779380
struct peer *peer;
9381+
safi_t safi = bgp_node_safi(vty);
93789382

93799383
peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
93809384
if (!peer)
93819385
return CMD_WARNING_CONFIG_FAILED;
93829386

9383-
if (peer->addpath_type[bgp_node_afi(vty)][bgp_node_safi(vty)]
9384-
!= BGP_ADDPATH_BEST_PER_AS) {
9387+
if (safi == SAFI_LABELED_UNICAST)
9388+
safi = SAFI_UNICAST;
9389+
if (peer->addpath_type[bgp_node_afi(vty)][safi] != BGP_ADDPATH_BEST_PER_AS) {
93859390
vty_out(vty,
93869391
"%% Peer not currently configured to transmit all best path per as.");
93879392
return CMD_WARNING_CONFIG_FAILED;

0 commit comments

Comments
 (0)