Commit 308327864c for frr

commit 308327864c24b866ea212dfcf480946e02a175a1
Author: Abdul Wasey <w453y.me@gmail.com>
Date:   Thu Sep 24 22:41:27 2026 +0000

    bfdd: open no echo sockets when using a data plane

    With a data plane bfdd opens no BFD sockets: bfd_vrf_start_sockets
    returns early, since the data plane sends and receives control and echo
    packets. bfd_vrf_toggle_echo does not check, and bfd_set_echo calls it
    when echo-mode is set on a session whose VRF is already known. So
    whether bfdd holds the echo port depends on the order in which the
    configuration and the interfaces arrive: set at startup before zebra
    has reported the interface, no socket, and a peer's IPv6 echo is
    refused with port unreachable; set later, bfdd opens the port, returns
    the peer's echo itself, and keeps it from a data plane on the same host.

    Make bfd_vrf_toggle_echo return early too, and say in the documentation
    that echo, including returning a peer's IPv6 echo, is the data plane's.

    Signed-off-by: Abdul Wasey <w453y.me@gmail.com>

diff --git a/bfdd/bfd.c b/bfdd/bfd.c
index 5cd53c78a6..362a51709d 100644
--- a/bfdd/bfd.c
+++ b/bfdd/bfd.c
@@ -2638,6 +2638,10 @@ void bfd_vrf_toggle_echo(struct bfd_vrf_global *bfd_vrf)
 		.vrf = bfd_vrf->vrf,
 	};

+	/* As bfd_vrf_start_sockets: the data plane sends and receives echo. */
+	if (bglobal.bg_use_dplane)
+		return;
+
 	/* Check for peers using echo */
 	hash_walk(bfd_id_hash, __bfd_session_has_echo, &has_echo);

diff --git a/doc/user/bfd.rst b/doc/user/bfd.rst
index 2bec0add1b..e285eedfdc 100644
--- a/doc/user/bfd.rst
+++ b/doc/user/bfd.rst
@@ -864,6 +864,10 @@ The BFD data plane will be responsible for:

 * Keeping the number of packets/bytes received/transmitted per session

+The BFD daemon does not listen for BFD packets in this mode, the echo port
+included. A BFD daemon peer addresses its IPv6 echo packets to this system
+rather than to itself, so returning them is also the data plane's job.
+

 The FRR BFD daemon will be responsible for: