summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2023-09-07 15:06:26 +0000
committerGitHub <noreply@github.com>2023-09-07 15:06:26 +0000
commit8ed9dca7fb2b06834d7effeba94676ad928b1ce9 (patch)
tree7537ff8414e9021784fbaa349bdbc6cca5751f6d
parentf3434880b6768b1d1059a578d2c404490a56004f (diff)
parent8f3eeb8b8258afdfc177c8a58f0a1790179a5c60 (diff)
Merge pull request #14360 from opensourcerouting/fix/as_path_no_prepend
bgpd: Fix `no set as-path prepend` command for BGP
-rw-r--r--bgpd/bgp_routemap.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index af9490f0b3..9e851c5bca 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -6207,27 +6207,12 @@ DEFPY_YANG(
DEFUN_YANG (no_set_aspath_prepend,
no_set_aspath_prepend_cmd,
- "no set as-path prepend [ASNUM]",
- NO_STR
- SET_STR
- "Transform BGP AS_PATH attribute\n"
- "Prepend to the as-path\n"
- AS_STR)
-{
- const char *xpath =
- "./set-action[action='frr-bgp-route-map:as-path-prepend']";
-
- nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL);
- return nb_cli_apply_changes(vty, NULL);
-}
-
-DEFUN_YANG (no_set_aspath_prepend_lastas,
- no_set_aspath_prepend_lastas_cmd,
- "no set as-path prepend last-as [(1-10)]",
+ "no set as-path prepend [ASNUM] [last-as [(1-10)]]",
NO_STR
SET_STR
"Transform BGP AS_PATH attribute\n"
"Prepend to the as-path\n"
+ AS_STR
"Use the peers AS-number\n"
"Number of times to insert\n")
{
@@ -7915,7 +7900,6 @@ void bgp_route_map_init(void)
install_element(RMAP_NODE, &set_aspath_replace_asn_cmd);
install_element(RMAP_NODE, &set_aspath_replace_access_list_cmd);
install_element(RMAP_NODE, &no_set_aspath_prepend_cmd);
- install_element(RMAP_NODE, &no_set_aspath_prepend_lastas_cmd);
install_element(RMAP_NODE, &no_set_aspath_exclude_cmd);
install_element(RMAP_NODE, &no_set_aspath_exclude_all_cmd);
install_element(RMAP_NODE, &no_set_aspath_exclude_access_list_cmd);