bfd: listen on RFC 5883 multihop port - #3481
Open
fivetime wants to merge 2 commits into
Open
Conversation
fujita
reviewed
Jul 11, 2026
fujita
reviewed
Jul 20, 2026
| // 10.0.0.1:4784) instead of the wildcard (:4784). A specific bind wins the | ||
| // kernel's most-specific-match UDP demux over any wildcard listener already on | ||
| // the port (e.g. a host bfdd owning 0.0.0.0:3784/4784), so an embedded GoBGP | ||
| // can run BFD on a host that also runs a system bfdd. Empty → wildcard bind. |
Member
There was a problem hiding this comment.
Please remove all the non ascii characters. Just use -> instead.
start() previously reported success whenever any one of the (host, port) listen combinations bound, so a server whose single-hop control port failed to bind could still come up "started" as long as the multihop port happened to bind — silently running without the ability to receive single-hop returns. Treat the single-hop control port (RFC 5881) as required: it must bind on every configured listen address, otherwise startServer rolls back every listener it opened (including any best-effort multihop sockets) and reports failure so the caller retries. The multihop port (RFC 5883/4784) stays best-effort, since it is commonly already owned by a host BFD daemon; a failure there is logged but does not fail startup. Add a regression test that occupies the single-hop port and asserts the server refuses to come up and tears down the multihop socket it bound. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fivetime
force-pushed
the
bfd-rfc5883-upstream
branch
from
July 30, 2026 15:24
3b822b1 to
3b203a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests