atunnel: cover the IPv6 original destination miss - #17
Open
ygao-g wants to merge 1 commit into
Open
Conversation
TestTCPOriginalDestinationPreservesErrno only ever dialled IPv4, so nothing pinned the IPv6 half of the family dispatch on the failure path: originalIPv6Destination's errno return and the "IPv6" error label could both regress without a test noticing. The table now carries the dial network and the expected family per case, and asserts that the error names the lookup that actually ran.
ygao-g
force-pushed
the
fork-753-suggested
branch
from
September 1, 2026 21:00
000c67a to
2822623
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.
Review scratch PR against agent-substrate#753. Not for merge.
fork-753-baseis agent-substrate#753's eight commits (headb97ab7c9) rebased ontoupstream/mainfe9013a4, so this diff shows only the proposed addition.agent-substrate#753's
TestTCPOriginalDestinationPreservesErrnodials IPv4 in every case, which leaves theIPv6 half of the family dispatch untested on the failure path:
originalIPv6Destination'serrno return and the
"IPv6"error label can both regress without a test noticing. The tablenow carries the dial network and the expected family per case, and asserts that the error
names the lookup that actually ran.
Measured with
sudo go test ./internal/atunnel/ -coverprofileon Linux 6.17 / arm64:TCPOriginalDestinationoriginalIPv6DestinationThat leaves four uncovered statements in
original_dst_linux.go: the non-TCP-conn guard, theSyscallConnfailure, theLocalAddrtype assertion and therawConn.Controlfailure. Allare defensive, and three predate agent-substrate#753.
🤖 Generated with Claude Code