summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/package-build/frr/patches/frr/0013-Revert-bgpd-Ensure-incorrect-GR-config-isn-t-display.patch62
-rw-r--r--scripts/package-build/frr/patches/frr/0015-zebra-fix-crash-on-inactive-VRF-and-import-table.patch60
-rw-r--r--scripts/package-build/frr/patches/frr/0016-zebra-Add-no-encapsulation-under-segment-routing-srv.patch83
3 files changed, 83 insertions, 122 deletions
diff --git a/scripts/package-build/frr/patches/frr/0013-Revert-bgpd-Ensure-incorrect-GR-config-isn-t-display.patch b/scripts/package-build/frr/patches/frr/0013-Revert-bgpd-Ensure-incorrect-GR-config-isn-t-display.patch
deleted file mode 100644
index 2628580d..00000000
--- a/scripts/package-build/frr/patches/frr/0013-Revert-bgpd-Ensure-incorrect-GR-config-isn-t-display.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 2b1622ab1c521ef8959b1edabf685b03394a8224 Mon Sep 17 00:00:00 2001
-From: Kyrylo Yatsenko <hedrok@gmail.com>
-Date: Sun, 28 Dec 2025 19:37:15 +0200
-Subject: [PATCH] Revert "bgpd: Ensure incorrect GR config isn't displayed for
- peer-groups"
-
-This reverts commit d34b97374b02a88be43c132d676d6c87869ece4c.
-
-Signed-off-by: Kyrylo Yatsenko <hedrok@gmail.com>
----
- bgpd/bgp_vty.c | 35 ++++++++++++++++++++---------------
- 1 file changed, 20 insertions(+), 15 deletions(-)
-
-diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
-index 4050a8cd50..e3ff8b7f48 100644
---- a/bgpd/bgp_vty.c
-+++ b/bgpd/bgp_vty.c
-@@ -19646,21 +19646,26 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp,
- " neighbor %s path-attribute treat-as-withdraw %s\n",
- addr, withdraw_attrs_str);
-
-- if (!CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) {
-- if (!CHECK_FLAG(peer->peer_gr_new_status_flag,
-- PEER_GRACEFUL_RESTART_NEW_STATE_INHERIT)) {
-- if (CHECK_FLAG(peer->peer_gr_new_status_flag,
-- PEER_GRACEFUL_RESTART_NEW_STATE_HELPER)) {
-- vty_out(vty, " neighbor %s graceful-restart-helper\n", addr);
-- } else if (CHECK_FLAG(peer->peer_gr_new_status_flag,
-- PEER_GRACEFUL_RESTART_NEW_STATE_RESTART)) {
-- vty_out(vty, " neighbor %s graceful-restart\n", addr);
-- } else if ((!(CHECK_FLAG(peer->peer_gr_new_status_flag,
-- PEER_GRACEFUL_RESTART_NEW_STATE_HELPER)) &&
-- !(CHECK_FLAG(peer->peer_gr_new_status_flag,
-- PEER_GRACEFUL_RESTART_NEW_STATE_RESTART)))) {
-- vty_out(vty, " neighbor %s graceful-restart-disable\n", addr);
-- }
-+ if (!CHECK_FLAG(peer->peer_gr_new_status_flag,
-+ PEER_GRACEFUL_RESTART_NEW_STATE_INHERIT)) {
-+
-+ if (CHECK_FLAG(peer->peer_gr_new_status_flag,
-+ PEER_GRACEFUL_RESTART_NEW_STATE_HELPER)) {
-+ vty_out(vty,
-+ " neighbor %s graceful-restart-helper\n", addr);
-+ } else if (CHECK_FLAG(
-+ peer->peer_gr_new_status_flag,
-+ PEER_GRACEFUL_RESTART_NEW_STATE_RESTART)) {
-+ vty_out(vty,
-+ " neighbor %s graceful-restart\n", addr);
-+ } else if (
-+ (!(CHECK_FLAG(peer->peer_gr_new_status_flag,
-+ PEER_GRACEFUL_RESTART_NEW_STATE_HELPER))
-+ && !(CHECK_FLAG(
-+ peer->peer_gr_new_status_flag,
-+ PEER_GRACEFUL_RESTART_NEW_STATE_RESTART)))) {
-+ vty_out(vty, " neighbor %s graceful-restart-disable\n",
-+ addr);
- }
- }
-
---
-2.50.1
-
diff --git a/scripts/package-build/frr/patches/frr/0015-zebra-fix-crash-on-inactive-VRF-and-import-table.patch b/scripts/package-build/frr/patches/frr/0015-zebra-fix-crash-on-inactive-VRF-and-import-table.patch
deleted file mode 100644
index aadddd45..00000000
--- a/scripts/package-build/frr/patches/frr/0015-zebra-fix-crash-on-inactive-VRF-and-import-table.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 5962cfb671440dd5609c43f50cd78375aa068821 Mon Sep 17 00:00:00 2001
-From: Kyrylo Yatsenko <hedrok@gmail.com>
-Date: Mon, 19 Jan 2026 20:45:02 +0200
-Subject: [PATCH] zebra: fix crash on inactive VRF and import table
-
-When configuration has inactive VRF and import-table zebra crashes
-`zebra_router_get_table` because NULL is passed as `zvrf`.
-
-Fix this in two places:
-
-* In case `vrf_info_lookup` in `zebra_vrf_get_table_with_table_id`
- returns NULL don't call `zebra_router_get_table` - just return NULL.
-* As optimization just ignore inactive VRFs in `zebra_import_table_rm_update`.
----
- zebra/redistribute.c | 7 +++++--
- zebra/zebra_vrf.c | 3 +++
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/zebra/redistribute.c b/zebra/redistribute.c
-index 5dcf578c4e..dee61ceed8 100644
---- a/zebra/redistribute.c
-+++ b/zebra/redistribute.c
-@@ -917,8 +917,8 @@ static void zebra_import_table_rm_update_vrf_afi(struct zebra_vrf *zvrf, afi_t a
- table = zebra_vrf_get_table_with_table_id(afi, safi, zvrf->vrf->vrf_id, table_id);
- if (!table) {
- if (IS_ZEBRA_DEBUG_RIB_DETAILED)
-- zlog_debug("%s: Table id=%d not found", __func__,
-- table_id);
-+ zlog_debug("%s: Table id=%d not found for vrf %u", __func__, table_id,
-+ zvrf->vrf->vrf_id);
- return;
- }
-
-@@ -975,6 +975,9 @@ void zebra_import_table_rm_update(const char *rmap)
- if (!zvrf)
- continue;
-
-+ if (!CHECK_FLAG(vrf->status, VRF_ACTIVE))
-+ continue;
-+
- zebra_import_table_rm_update_vrf(zvrf, rmap);
- }
- }
-diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c
-index 374a460bbd..00b9a5f519 100644
---- a/zebra/zebra_vrf.c
-+++ b/zebra/zebra_vrf.c
-@@ -389,6 +389,9 @@ struct route_table *zebra_vrf_get_table_with_table_id(afi_t afi, safi_t safi,
- struct other_route_table *otable;
- struct route_table *table;
-
-+ if (!zvrf)
-+ return NULL;
-+
- table = zebra_vrf_lookup_table_with_table_id(afi, safi, vrf_id,
- table_id);
-
---
-2.50.1
-
diff --git a/scripts/package-build/frr/patches/frr/0016-zebra-Add-no-encapsulation-under-segment-routing-srv.patch b/scripts/package-build/frr/patches/frr/0016-zebra-Add-no-encapsulation-under-segment-routing-srv.patch
new file mode 100644
index 00000000..66b6e416
--- /dev/null
+++ b/scripts/package-build/frr/patches/frr/0016-zebra-Add-no-encapsulation-under-segment-routing-srv.patch
@@ -0,0 +1,83 @@
+From 3372c944bc10646bec52ad730a76a4b60e833ce5 Mon Sep 17 00:00:00 2001
+From: Kyrylo Yatsenko <hedrok@gmail.com>
+Date: Fri, 6 Feb 2026 09:07:15 +0200
+Subject: [PATCH] zebra: Add 'no encapsulation' under segment-routing/srv6
+
+Add missing command 'no encapsulation'.
+
+Add small static helper function `unset_srv6_encapsulation` to be used
+in 'no srv6', 'no encapsulation' and 'no source-address'.
+
+Signed-off-by: Kyrylo Yatsenko <hedrok@gmail.com>
+---
+ zebra/zebra_srv6_vty.c | 26 +++++++++++++++++++++-----
+ 1 file changed, 21 insertions(+), 5 deletions(-)
+
+diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c
+index ba87928f78..ec71941539 100644
+--- a/zebra/zebra_srv6_vty.c
++++ b/zebra/zebra_srv6_vty.c
+@@ -738,6 +738,13 @@ DEFUN_NOSH (srv6,
+ return CMD_SUCCESS;
+ }
+
++/* Unset SRv6 encapsulation source address */
++static void unset_srv6_encap_source_address(void)
++{
++ zebra_srv6_encap_src_addr_unset();
++ dplane_srv6_encap_srcaddr_set(&in6addr_any, NS_DEFAULT);
++}
++
+ DEFUN (no_srv6,
+ no_srv6_cmd,
+ "no srv6",
+@@ -772,9 +779,7 @@ DEFUN (no_srv6,
+ zebra_srv6_locator_delete(locator);
+ }
+
+- /* Unset SRv6 encapsulation source address */
+- zebra_srv6_encap_src_addr_unset();
+- dplane_srv6_encap_srcaddr_set(&in6addr_any, NS_DEFAULT);
++ unset_srv6_encap_source_address();
+
+ return CMD_SUCCESS;
+ }
+@@ -1131,6 +1136,17 @@ DEFUN_NOSH (srv6_encap,
+ return CMD_SUCCESS;
+ }
+
++DEFUN (no_srv6_encap,
++ no_srv6_encap_cmd,
++ "no encapsulation",
++ NO_STR
++ "Segment Routing SRv6 encapsulation\n")
++{
++ unset_srv6_encap_source_address();
++
++ return CMD_SUCCESS;
++}
++
+ DEFPY (srv6_src_addr,
+ srv6_src_addr_cmd,
+ "source-address X:X::X:X$encap_src_addr",
+@@ -1149,8 +1165,7 @@ DEFPY (no_srv6_src_addr,
+ "Segment Routing SRv6 source address\n"
+ "Specify source address for SRv6 encapsulation\n")
+ {
+- zebra_srv6_encap_src_addr_unset();
+- dplane_srv6_encap_srcaddr_set(&in6addr_any, NS_DEFAULT);
++ unset_srv6_encap_source_address();
+ return CMD_SUCCESS;
+ }
+
+@@ -1743,6 +1758,7 @@ void zebra_srv6_vty_init(void)
+ install_element(SEGMENT_ROUTING_NODE, &no_srv6_cmd);
+ install_element(SRV6_NODE, &srv6_locators_cmd);
+ install_element(SRV6_NODE, &srv6_encap_cmd);
++ install_element(SRV6_NODE, &no_srv6_encap_cmd);
+ install_element(SRV6_NODE, &srv6_sid_formats_cmd);
+ install_element(SRV6_LOCS_NODE, &srv6_locator_cmd);
+ install_element(SRV6_LOCS_NODE, &no_srv6_locator_cmd);
+--
+2.51.2
+