Advertise only an IPv6-only server's own addresses behind NAT64 #3184
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.50) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 626 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.385
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3184"
general
weight: 0.35
nick-potts
Summary
Behind NAT64, an IPv6-only server asked IPv4-only lookups for its public IP. The NAT64 gateway answered them, so the server advertised the gateway's IPv4 as its public IP and as a WireGuard endpoint (#3166).
DiscoveredNetwork.ipv4_routeis in memory only. Nothing changes on the wire, in the Corrosion schema or in a stored format. A public IP removed this way goes through the existingPublicIpUpdate::Remove. A pinned public IP (server set --public-ip) is left alone.The route check asks the kernel rather than reading the main table's default, so a policy-routing table or a
0.0.0.0/1+128.0.0.0/1split (full-tunnel VPNs) still counts as an IPv4 route (review round 1). It probes one address in each half of IPv4, so a route refused to one destination doesn't read as having no IPv4 (review round 2).#3167 is outside Ployz for Services. A Service Ployz deploys resolves through Ployz's DNS, which forwards to the host's IPv6 resolver. A container started with plain
docker runon Docker's default network has only IPv4, so it reaches neither Docker's8.8.8.8nor any resolver you pass with--dns.docs/user/servers/add-a-server.mdnow says so and points to--network hostor a Docker network with IPv6, in place of the known-issue note for both. Not covered here: BuildKit build steps run on their own IPv4 bridge, so on an IPv6-only server they have the same limit. That was already true before this PR.DESIGN.md bets: none changed.
Fixes #3166
Fixes #3167
Evidence
After: they pass, with every
rediscover_testsandnetwork::endpointstest (14), includingonly_a_refused_route_lookup_means_no_ipv4_routeandone_refused_destination_is_not_a_missing_ipv4_route. Clippy is clean.64:ff9b::/96, unbound DNS64). The VM has only a ULA IPv6 address and no IPv4 route. Gateway address replaced with a documentation one.The VM has no global IPv6, so
api6.ipify.orgcan't reach it and it has no public IP. That's correct: nothing outside can reach it either.#3167 on the same VM:
Merge Danger
Door: two-way
A revert restores the old lookup. A public IP this removed on an IPv6-only server would come back on the next rediscovery after a revert.
Blast Radius: addresses
Only servers with no IPv4 default route change: they stop advertising an IPv4 they don't own. Dual-stack and IPv4 servers make the same lookups as before.