Skip to content

feat(netutils): add SetUDPTTLSockopt and SetReuseAddrSockopt helpers#3395

Closed
Ivan-Pokhabov wants to merge 2 commits into
osrg:masterfrom
Ivan-Pokhabov:feat/netutils-udp-sockopt
Closed

feat(netutils): add SetUDPTTLSockopt and SetReuseAddrSockopt helpers#3395
Ivan-Pokhabov wants to merge 2 commits into
osrg:masterfrom
Ivan-Pokhabov:feat/netutils-udp-sockopt

Conversation

@Ivan-Pokhabov
Copy link
Copy Markdown
Contributor

@Ivan-Pokhabov Ivan-Pokhabov commented Apr 24, 2026

Add two UDP socket option helpers needed for BFD transport:

  • SetUDPTTLSockopt: sets TTL/hop-limit to 255 per RFC 5881
  • SetReuseAddrSockopt: enables SO_REUSEADDR on the BFD server socket

Also moves setSockOptString from the platform-neutral utils.go into sockopt_linux.go where it is only compiled on Linux.

Part of #3388

taitov and others added 2 commits April 24, 2026 17:28
Add two UDP socket option helpers needed for BFD transport:
- SetUDPTTLSockopt: sets TTL/hop-limit to 255 per RFC 5881
- SetReuseAddrSockopt: enables SO_REUSEADDR on the BFD server socket

Also moves setSockOptString from the platform-neutral utils.go into
sockopt_linux.go where it is only compiled on Linux.

Co-Authored-By: Ivan-Pokhabov <vanek3372@gmail.com>
   SO_REUSEADDR is a standard POSIX socket option name; scspell3k doesn't
   recognize the combined token 'reuseaddr'.)
@fujita
Copy link
Copy Markdown
Member

fujita commented Apr 24, 2026

Merged, thanks.

@fujita fujita closed this Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants