Skip to content

Commit

Permalink
Merge pull request FRRouting#15958 from FRRouting/mergify/bp/stable/1…
Browse files Browse the repository at this point in the history
…0.0/pr-15913

bgpd: Fix `no set as-path prepend ASNUM...` (backport FRRouting#15913)
  • Loading branch information
donaldsharp authored May 8, 2024
2 parents bd5f571 + 6a01200 commit 51b98d1
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions bgpd/bgp_routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -5882,10 +5882,11 @@ DEFUN_YANG (set_table_id,

DEFUN_YANG (no_set_table_id,
no_set_table_id_cmd,
"no set table",
"no set table [(1-4294967295)]",
NO_STR
SET_STR
"export route to non-main kernel table\n")
"export route to non-main kernel table\n"
"Kernel routing table id\n")
{
const char *xpath = "./set-action[action='frr-bgp-route-map:table']";
nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL);
Expand Down Expand Up @@ -6273,13 +6274,12 @@ DEFPY_YANG(
}

DEFUN_YANG (no_set_aspath_prepend,
no_set_aspath_prepend_cmd,
"no set as-path prepend [ASNUM] [last-as [(1-10)]]",
no_set_aspath_prepend_last_as_cmd,
"no set as-path prepend [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")
{
Expand All @@ -6290,6 +6290,15 @@ DEFUN_YANG (no_set_aspath_prepend,
return nb_cli_apply_changes(vty, NULL);
}

ALIAS_YANG (no_set_aspath_prepend,
no_set_aspath_prepend_as_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)

DEFUN_YANG (set_aspath_exclude,
set_aspath_exclude_cmd,
"set as-path exclude ASNUM...",
Expand Down Expand Up @@ -7966,7 +7975,8 @@ void bgp_route_map_init(void)
install_element(RMAP_NODE, &set_aspath_exclude_access_list_cmd);
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_last_as_cmd);
install_element(RMAP_NODE, &no_set_aspath_prepend_as_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);
Expand Down

0 comments on commit 51b98d1

Please sign in to comment.