Track peer address in UDP bind registration#7
Merged
Conversation
lanthora
force-pushed
the
udp-bind-per-peer
branch
from
July 9, 2026 11:31
d38bba7 to
36d67f4
Compare
Extend the bind_addrs HashSet key from (protocol, local) to (protocol, local, Option<peer>) via a new BindKey type alias, and add a matching peer field to BindAddr. - add_bind_addr / remove_bind_addr take a peer: Option<SocketAddr>. - IpStack::bind takes a peer argument; bind_ip passes None. - BindAddr gains set_peer to re-key an entry with a new peer. - UdpSocket::bind0 forwards peer_addr; connect calls set_peer. - TcpListener/TcpStream bind calls pass None.
lanthora
force-pushed
the
udp-bind-per-peer
branch
from
July 9, 2026 12:10
36d67f4 to
d9764e3
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.
Include the peer address in the bind-address key so multiple UDP sockets can bind to the same local address with distinct peers. Add BindAddr::set_peer to update the registration when a socket's peer is established via connect or bind0.