Skip to content

1.20.1 - #486

Merged
oschwartz10612 merged 14 commits into
mainfrom
dev
Nov 19, 2026
Merged

1.20.1#486
oschwartz10612 merged 14 commits into
mainfrom
dev

Conversation

@oschwartz10612

Copy link
Copy Markdown
Member
  • Prepend router_app_advantech
  • Sign and build installer in CICD
  • netstack2: turn off gVisor's RACK loss detection
  • Run the main tunnel on netstack2
  • Add --enable-tcp-rack to turn RACK back on
  • bind: keep the physical socket receive routine alive after read errors
  • Fix telemetry starting in cli
  • Pull from the versions api
  • Add --local-endpoints to list ips
  • Fix ICMP echo replies for DNAT resources to use the pinged address as source instead of the rewrite target.

oschwartz10612 and others added 14 commits November 3, 2026 15:25
gVisor turns RACK on by default. In the gVisor newt uses, after a burst
of losses that takes out everything in flight, RACK recovers only a few
segments per retransmission timeout, so the download crawls for seconds
or minutes. Turn RACK off on both netstacks, as Tailscale did in
tailscale/tailscale#22092. This also turns off gVisor's tail loss
probes; without RACK, gVisor recovers with SACK and, for a lost tail,
the retransmission timer.

TestTCPRecoversFromTailLoss drops a whole flight of a transfer: with RACK
on, the sender needs about 50 retransmission timeouts and 11 s; with RACK
off, one timeout and 0.25 s.
The main tunnel used wireguard-go's tun/netstack, whose gVisor stack newt
cannot configure, so it kept RACK on. Use newt's own copy, netstack2,
without proxying, so the main tunnel gets the same TCP settings as the
client tunnels. A netstack2 without a proxy now keeps IPv4 forwarding
off, as wireguard-go's netstack does.
RACK is now off in the netstack tunnels, but it helps on paths where
retransmissions get lost or packets arrive out of order: without it, a
lost retransmission waits for the retransmission timer, and reordering
looks like loss. Add an opt-in setting that keeps gVisor's default, RACK
on, in the main tunnel and the client tunnels: --enable-tcp-rack, the
ENABLE_TCP_RACK environment variable, or "enableTcpRack" in the config
file. It is off by default and shows in --show-config.
makeReceiveSocket handed every read error to wireguard-go unless a rebind
was in progress. wireguard-go's RoutineReceiveIncoming stops for good on
net.ErrClosed, on the first non-temporary error or after 10 temporary
ones, and only BindUpdate restarts it, so the physical socket was never
read again while sends kept working. On macOS a single
"recvfrom: no route to host" (EHOSTUNREACH) is enough (fosrl/pangolin#4031).

- Same socket, bind open: back off (5 ms doubling to 1 s, reset on a good
  read), keep reading, and log a WARN at most every 10 s naming the error.
- Socket replaced while blocked (Rebind finished before the reader woke):
  retry on the new socket instead of returning the old socket's ErrClosed.
- closeConnection clears rebinding and broadcasts rebindingCond, so a
  reader waiting on a CloseSocket without a Rebind returns ErrClosed
  instead of hanging Device.Close.

Adds TestSocketReceiveSurvivesRebind, which fails without the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bind: keep the physical socket receive routine alive after read errors (macOS clients drop all sites)
Fix ICMP echo replies for alias resources to come from the pinged address
fix: turn off gVisor's RACK, which stalls downloads after packet loss
@oschwartz10612
oschwartz10612 merged commit 745110e into main Nov 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants