atunnel: restrict the actor egress listener to IPv4 - #1042
Closed
Yuan Gao (ygao-g) wants to merge 1 commit into
Closed
atunnel: restrict the actor egress listener to IPv4#1042Yuan Gao (ygao-g) wants to merge 1 commit into
Yuan Gao (ygao-g) wants to merge 1 commit into
Conversation
This was referenced Aug 18, 2026
Yuan Gao (ygao-g)
force-pushed
the
atunnel-ipv6-listen
branch
2 times, most recently
from
August 18, 2026 20:15
74cdf67 to
af1a861
Compare
Yuan Gao (ygao-g)
force-pushed
the
atunnel-ipv6-listen
branch
from
August 18, 2026 22:15
af1a861 to
7440870
Compare
The transparent egress listener was opened with net.Listen("tcp",
"0.0.0.0:15001"). Go treats an unspecified address as a wildcard, so
that binds "::" dual-stack and accepts IPv6 connections, but the
original-destination lookup reads only the IPv4 SOL_IP/SO_ORIGINAL_DST.
An IPv6 actor connection was therefore accepted and then failed with no
destination to dial. Open it with "tcp4" through a named helper,
ListenEgressIPv4, so the constraint is visible at the call site and the
connection is refused rather than half-served.
This is a stopgap for the IPv4-only actor network, not the fix: the
IPv6 original-destination lookup is agent-substrate#686 and dual-stack actor
networking is agent-substrate#945. Ingress keeps its family-agnostic wildcard and is
unaffected.
Yuan Gao (ygao-g)
force-pushed
the
atunnel-ipv6-listen
branch
from
August 19, 2026 16:45
751704a to
44757f1
Compare
Collaborator
Author
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.
Fixes #943
The actor egress listener was opened with
net.Listen("tcp", "0.0.0.0:15001").Go treats every unspecified address as a wildcard, so that binds
::dual-stack: the listener has been accepting IPv6 connections all along, and
TCPOriginalDestinationcannot resolve them because it reads only the IPv4SOL_IP/SO_ORIGINAL_DST. Such a connection is accepted and then fails.Egress now opens through
atunnel.ListenEgressIPv4, where the network stringdecides the family rather than an address that never did; the family is in the
name so the constraint is visible at the call site while the IPv6 work is in
flight.
This does not hold IPv6-only clusters back: the actor leg is IPv4 link-local by
construction (
ateomnet.ActorVethIP, IPv4-family nftables), so nothing thatworks today changes. Widening egress in earnest needs actor networking to gain
IPv6 (#945) and an
IP6T_SO_ORIGINAL_DSTlookup (#686). The ingress flagdefault is spelled
:443to record that it is deliberately dual-stack, which isa comment on existing behavior rather than a change to it.
🤖 Generated with Claude Code