summaryrefslogtreecommitdiff
path: root/packages/frr
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-04 16:17:38 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-05-04 14:40:39 +0000
commit869f49fb5279b8ea8d4bbf14d1adacff365d2d0a (patch)
tree497a8b33e35f4e244a52266a96306b5731784329 /packages/frr
parentf71ef8ed1eac82554d9ea9355e6ea93de7a68ab0 (diff)
downloadvyos-build-869f49fb5279b8ea8d4bbf14d1adacff365d2d0a.tar.gz
vyos-build-869f49fb5279b8ea8d4bbf14d1adacff365d2d0a.zip
frr: T6283: add pending upstream patch
(cherry picked from commit 1b61973b9143aa8a04cc7c857ec567fa962e4e43)
Diffstat (limited to 'packages/frr')
-rw-r--r--packages/frr/patches/0001-bgpd-fix-no-set-as-path-prepend-ASNUM.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/packages/frr/patches/0001-bgpd-fix-no-set-as-path-prepend-ASNUM.patch b/packages/frr/patches/0001-bgpd-fix-no-set-as-path-prepend-ASNUM.patch
new file mode 100644
index 00000000..9b87e302
--- /dev/null
+++ b/packages/frr/patches/0001-bgpd-fix-no-set-as-path-prepend-ASNUM.patch
@@ -0,0 +1,70 @@
+From e069a1c8d52bb6e7808303df488d7ce912e4f652 Mon Sep 17 00:00:00 2001
+From: Donatas Abraitis <donatas@opensourcerouting.org>
+Date: Thu, 2 May 2024 23:07:19 +0300
+Subject: [PATCH 1/2] 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>
+---
+ bgpd/bgp_routemap.c | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
+index 4875697aa106..7eb97dae4d24 100644
+--- a/bgpd/bgp_routemap.c
++++ b/bgpd/bgp_routemap.c
+@@ -6288,13 +6288,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")
+ {
+@@ -6305,6 +6304,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...",
+@@ -7981,7 +7989,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);