run: forward per-process UDP over IPv6 - #786
Conversation
|
Preview removed (PR closed). |
df77db9 to
9a4f30b
Compare
Ubuntu 24.04 QEMU E2E verificationI ran a live end-to-end verification against the exact PR head:
UDP results: PASSThe new UDP paths worked as expected:
Blocking TCP passthrough regressionThe PR #786 head build consistently timed out on a public HTTPS passthrough probe. I repeated the same probe on the same VM and network with the exact base build and a diagnostic build based on the PR #786 head: The diagnostic build was based on the exact PR #786 head and differed only by the following one-line change in diff --git a/cmd/clawpatrol/daemon_session_linux.go b/cmd/clawpatrol/daemon_session_linux.go
--- a/cmd/clawpatrol/daemon_session_linux.go
+++ b/cmd/clawpatrol/daemon_session_linux.go
@@ -133,7 +133,6 @@
// does not consume the caller's reference, so every dispatch and drop path
// releases it here.
func injectRunTunPacket(ep *channel.Endpoint, version byte, pkt *stack.PacketBuffer) {
- defer pkt.DecRef()
switch version {
case 4:
ep.InjectInbound(header.IPv4ProtocolNumber, pkt)Diagnostic build SHA-256: This A/B/A result strongly isolates the TCP regression to the new inbound A configured PostgreSQL native flow succeeded separately, so this is not a claim that every TCP path is broken. However, public TCP/HTTPS passthrough and an explicit IPv6 TCP connect both failed with the PR #786 head build. VerdictI recommend not merging this revision yet. The IPv6 and generic UDP implementation passed live E2E over both tsnet and WireGuard, but the TCP passthrough regression should be fixed first. Suggested regression coverage:
All disposable VM, gateway, client, identity, route, and temporary test artifacts were cleaned up after the run. |
Ensure upstream UDP reads cannot outlive the shared flow idle lifetime. Re-check opposite-direction activity when a read deadline races a refresh, and cover the bounded deadline with a regression test.
Use errors.As when checking net.Error so the idle-deadline retry also recognizes wrapped timeout errors and satisfies errorlint.
Follow-up: controlled root-cause correction and final verificationThe initial candidate-vs-base HTTPS A/B result was not stable enough to attribute a TCP regression to this PR. A later same-identity/same-destination control showed exact base timing out in the same way. An instrumented TUN/TCP/relay trace localized the current failure beyond the PR code:
In the same tsnet fixture, plain TCP/HTTP, IPv4 UDP DNS, and IPv6 UDP DNS all passed. All HTTPS destinations stalled, including exact base, while host-direct HTTPS passed. The current port-443 failure is therefore an external gateway/TLS fixture issue, not evidence of a candidate TCP regression. The speculative split-stack remediation was reverted because it did not address this failure and introduced ICMP/PMTU routing concerns. The real lifecycle issue found during review was an unbounded upstream UDP
Verification
Cleanup completed: disposable identities/state, VM, temporary worktrees, SSH key, and QEMU overlay were removed. Full evidence is archived locally with SHA-256 |
Final-head UDP E2E addendumI completed the remaining minimal UDP matrix against the exact final head:
Results:
The old daemon PIDs were stopped and replaced with new PIDs for both restart checks. Every tested daemon and the Gateway had an executable SHA matching the candidate binary. All six IPv6 DNS straces used Cleanup completed. Guest/host route snapshots and trust-store hashes were unchanged, fixture listeners were closed, and no credentials or private keys were retained. Scope note: this run validates the exact final head using a local Headscale control plane. It does not add exact-base UDP evidence or validate normal Tailscale SaaS/dashboard onboarding. Combined with the earlier exact-base/final-candidate TCP/443 Phase 1 result, the requested final-head TCP/UDP verification is now complete. |
avocet-bot
left a comment
There was a problem hiding this comment.
LGTM — re-reviewed the idle-read fixes and the final merge commit; CI is green.
Summary
Fixes #781.
fd78::/64child routeVerification
go test ./cmd/clawpatrol -run '^TestRunStackUDPForwarder' -count=1 -vgo test -race ./cmd/clawpatrol -run '^TestRunStack(TCP|UDP)Forwarder' -count=1go test ./cmd/clawpatrol -run '^TestChildNetnsSteps$' -count=1 -vgo vet ./cmd/clawpatrolmake lintgofmtandgit diff --checkThe package-wide suite still encounters the same host/network/plugin-dependent failures seen on unchanged
9edbeb0; the issue-focused tests are green.