mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-06 11:04:41 +00:00
bgpd: Fix no set as-path prepend ASNUM...
If entering `no set as-path prepend 1 2 3`, it's warned as unknown command.
Now fixed, and the following combinations work fine:
```
no set as-path prepend
no set as-path prepend last-as
no set as-path prepend last-as 1
no set as-path prepend 1
no set as-path prepend 1 2
```
Fixes: https://github.com/FRRouting/frr/issues/15912
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit e069a1c8d5
)
This commit is contained in:
parent
325a061690
commit
24f732d358
@ -6254,13 +6254,12 @@ DEFPY_YANG(
|
|||||||
}
|
}
|
||||||
|
|
||||||
DEFUN_YANG (no_set_aspath_prepend,
|
DEFUN_YANG (no_set_aspath_prepend,
|
||||||
no_set_aspath_prepend_cmd,
|
no_set_aspath_prepend_last_as_cmd,
|
||||||
"no set as-path prepend [ASNUM] [last-as [(1-10)]]",
|
"no set as-path prepend [last-as [(1-10)]]",
|
||||||
NO_STR
|
NO_STR
|
||||||
SET_STR
|
SET_STR
|
||||||
"Transform BGP AS_PATH attribute\n"
|
"Transform BGP AS_PATH attribute\n"
|
||||||
"Prepend to the as-path\n"
|
"Prepend to the as-path\n"
|
||||||
AS_STR
|
|
||||||
"Use the peers AS-number\n"
|
"Use the peers AS-number\n"
|
||||||
"Number of times to insert\n")
|
"Number of times to insert\n")
|
||||||
{
|
{
|
||||||
@ -6271,6 +6270,15 @@ DEFUN_YANG (no_set_aspath_prepend,
|
|||||||
return nb_cli_apply_changes(vty, NULL);
|
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,
|
DEFUN_YANG (set_aspath_exclude,
|
||||||
set_aspath_exclude_cmd,
|
set_aspath_exclude_cmd,
|
||||||
"set as-path exclude ASNUM...",
|
"set as-path exclude ASNUM...",
|
||||||
@ -7947,7 +7955,8 @@ void bgp_route_map_init(void)
|
|||||||
install_element(RMAP_NODE, &set_aspath_exclude_access_list_cmd);
|
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_asn_cmd);
|
||||||
install_element(RMAP_NODE, &set_aspath_replace_access_list_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_cmd);
|
||||||
install_element(RMAP_NODE, &no_set_aspath_exclude_all_cmd);
|
install_element(RMAP_NODE, &no_set_aspath_exclude_all_cmd);
|
||||||
install_element(RMAP_NODE, &no_set_aspath_exclude_access_list_cmd);
|
install_element(RMAP_NODE, &no_set_aspath_exclude_access_list_cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user