Files
tailscale/net/batching
chleeandJordan Whited dca60dd77d net/batching: preserve IPv6 zone in WriteBatchTo
WriteBatchTo copied the destination IP and port into the pooled
net.UDPAddr handed to sendmmsg(2), but not the zone. For an IPv6
link-local destination the sockaddr then had no scope ID, and Linux
failed the send with "cannot assign requested address". Disco goes
through WriteToUDPAddrPort, which keeps the zone, so magicsock could
pick a link-local path whose WireGuard packets, sent via WriteBatchTo,
never left the host.

Set the zone on every write, so that a destination without one also
clears the zone left over from an earlier write that reused the
pooled address.

Fixes #21411

Co-Authored-By: Jordan Whited <jordan@tailscale.com>
Signed-off-by: chlee <sourcehatchery@gmail.com>
Signed-off-by: Jordan Whited <jordan@tailscale.com>
2026-09-28 20:48:51 -07:00
..