Repository navigation
fix ecn on dual-stack sockets in both directions - #4
Merged
aotodev merged 1 commit intoSep 30, 2026
Merged
Conversation
aotodev
deleted the
3-ecn-is-lost-on-dual-stack-sockets-in-both-directions
branch
September 30, 2026 12:01
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.
IPv4 peers of a dual-stack v6 socket go through the kernel's IPv4 path.
On receive that path reports IP_TOS and never IPV6_TCLASS, so ecn read
as absent. On send it ignores IPV6_TCLASS, so the marking was dropped
without an error.
ecn::enable now also sets IP_RECVTOS on v6 sockets. The transmit batch
passes each feature the destination's wire_family() rather than the
socket's family, so datagrams to v4-mapped peers carry IP_TOS.
pktinfo::build accepts the v4-mapped local address a dual-stack socket
reports, so a reply can reuse the local_info it received.
Add endpoint::is_v4_mapped() and endpoint::wire_family().
Closes #3