Repository navigation
fix(udp): honor IPv4 source addresses on Apple platforms - #3
Merged
Merged
Conversation
thomaseizinger
force-pushed
the
fix/apple-udp-source-address
branch
7 times, most recently
from
October 28, 2026 03:13
503eae6 to
f1966f1
Compare
Darwin ignores `IP_RECVDSTADDR` as an outgoing IPv4 source-address override. A wildcard socket therefore sends from the route's default address, regardless of what we set in `src_ip`. Instead of `IP_RECVDSTADDR`, we now use `IP_PKTINFO` for IPv4, similar to `IPV6_PKTINFO` for IPv6. `ipi_ifindex` remains set to zero so routing selects the interface, otherwise we would force callers to provide an interface index. The provided test fails prior to the fix and is kept separate due to its particular setup requirements.
thomaseizinger
force-pushed
the
fix/apple-udp-source-address
branch
from
October 28, 2026 03:15
f1966f1 to
ecedfc0
Compare
thomaseizinger
marked this pull request as ready for review
October 28, 2026 03:15
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.
Honor requested IPv4 source addresses on Apple platforms so wildcard UDP sockets can send through secondary interfaces. Darwin ignores the current outgoing source-address control message; use
IP_PKTINFOfor both send paths.