public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH frr 1/2] d/patches: add backport for bfd session down fix
@ 2025-04-18 11:21 Stefan Hanreich
  2025-04-18 11:21 ` [pve-devel] [PATCH frr 2/2] bump version to 10.2.2-1+pve2 Stefan Hanreich
  2025-04-22  9:39 ` [pve-devel] [PATCH frr 1/2] d/patches: add backport for bfd session down fix Stefan Hanreich
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Hanreich @ 2025-04-18 11:21 UTC (permalink / raw)
  To: pve-devel

This is a backport of the FRR PR #18562 [1], that has been submitted
upstream as well [2].

With already established BGP/BFD sessions via underlay networks that
use a different routing protocol than BGP, rebooting a node could
cause the BFD session to enter the ADMIN_DOWN state without ever
recovering from it. This could be alleviated by manually resetting the
BFD session. The commit was identified by bisecting and manually
backported, since the upstream commit was on top of a refactored
bgpd.c file, so it didn't apply cleanly anymore.

The jump to version 10.2.2-1+pve1 fixed this issue for BGP underlay
networks, but the issue could still crop up with OpenFabric / OSPF /
IS-IS underlay networks.

[1] https://github.com/FRRouting/frr/pull/18562
[2] https://github.com/FRRouting/frr/pull/18682

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 ...eer-as-not-active-due-to-BFD-down-on.patch | 33 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 debian/patches/pve/0007-bgpd-Treat-the-peer-as-not-active-due-to-BFD-down-on.patch

diff --git a/debian/patches/pve/0007-bgpd-Treat-the-peer-as-not-active-due-to-BFD-down-on.patch b/debian/patches/pve/0007-bgpd-Treat-the-peer-as-not-active-due-to-BFD-down-on.patch
new file mode 100644
index 0000000..6d2c379
--- /dev/null
+++ b/debian/patches/pve/0007-bgpd-Treat-the-peer-as-not-active-due-to-BFD-down-on.patch
@@ -0,0 +1,33 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Stefan Hanreich <s.hanreich@proxmox.com>
+Date: Fri, 18 Apr 2025 10:36:19 +0200
+Subject: [PATCH] bgpd: Treat the peer as not active due to BFD down only if
+ established (backport #18562)
+
+If we have `neighbor X bfd` and BFD status is DOWN and/or ADMIN_DOWN, and BGP
+session is not yet established, we never allow the session to establish.
+
+Let's fix this regression that was in 10.2.
+
+Fixes: 1fb48f5 ("bgpd: Do not start BGP session if BFD profile is in shutdown state")
+Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
+---
+ bgpd/bgpd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
+index 0601400afd..f6b8abd9cc 100644
+--- a/bgpd/bgpd.c
++++ b/bgpd/bgpd.c
+@@ -4648,7 +4648,7 @@ bool peer_active(struct peer *peer)
+ 		return false;
+ 
+ 	if (peer->bfd_config) {
+-		if (bfd_session_is_down(peer->bfd_config->session))
++		if (peer_established(peer->connection) && bfd_session_is_down(peer->bfd_config->session))
+ 			return false;
+ 	}
+ 
+-- 
+2.39.5
+
diff --git a/debian/patches/series b/debian/patches/series
index c59ef31..e795d6c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ pve/0003-tests-add-bgp-evpn-autort-test.patch
 pve/0004-zebra-add-ZEBRA_IF_DUMMY-flag-for-dummy-interfaces.patch
 pve/0005-fabricd-add-option-to-treat-dummy-interfaces-as-loop.patch
 pve/0006-fabricd-enable-dummy_as_loopback-option-per-default.patch
+pve/0007-bgpd-Treat-the-peer-as-not-active-due-to-BFD-down-on.patch
-- 
2.39.5


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] [PATCH frr 2/2] bump version to 10.2.2-1+pve2
  2025-04-18 11:21 [pve-devel] [PATCH frr 1/2] d/patches: add backport for bfd session down fix Stefan Hanreich
@ 2025-04-18 11:21 ` Stefan Hanreich
  2025-04-22  9:39 ` [pve-devel] [PATCH frr 1/2] d/patches: add backport for bfd session down fix Stefan Hanreich
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hanreich @ 2025-04-18 11:21 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 debian/changelog | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 0b06cb4..972f83a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+frr (10.2.2-1+pve2) bookworm; urgency=medium
+
+  * backport upstream commit da4a7b0356fa2f4a711b87ae9e38bc6bc44fb523
+
+  * fixes issue related to BFD sessions not re-establishing after rebooting a
+    node.
+
+ -- Proxmox Support Team <support@proxmox.com>  Fri, 18 Apr 2025 12:30:54 +0200
+
 frr (10.2.2-1+pve1) bookworm; urgency=medium
 
   * update upstream source to 10.2.2
-- 
2.39.5


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pve-devel] [PATCH frr 1/2] d/patches: add backport for bfd session down fix
  2025-04-18 11:21 [pve-devel] [PATCH frr 1/2] d/patches: add backport for bfd session down fix Stefan Hanreich
  2025-04-18 11:21 ` [pve-devel] [PATCH frr 2/2] bump version to 10.2.2-1+pve2 Stefan Hanreich
@ 2025-04-22  9:39 ` Stefan Hanreich
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hanreich @ 2025-04-22  9:39 UTC (permalink / raw)
  To: pve-devel

backport has been merged upstream into 10.2 and 10.3:

https://github.com/FRRouting/frr/commit/95128a75f79474c36e1fb9b8d742d4d7ca5049aa

https://github.com/FRRouting/frr/commit/8efa737e7992b5fe48803911951855dc6a853208



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-22  9:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-18 11:21 [pve-devel] [PATCH frr 1/2] d/patches: add backport for bfd session down fix Stefan Hanreich
2025-04-18 11:21 ` [pve-devel] [PATCH frr 2/2] bump version to 10.2.2-1+pve2 Stefan Hanreich
2025-04-22  9:39 ` [pve-devel] [PATCH frr 1/2] d/patches: add backport for bfd session down fix Stefan Hanreich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal