You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/wgengine
Andrew Dunham e107977f75 wgengine/magicsock: disable SIO_UDP_NETRESET on Windows
By default, Windows sets the SIO_UDP_CONNRESET and SIO_UDP_NETRESET
options on created UDP sockets. These behaviours make the UDP socket
ICMP-aware; when the system gets an ICMP message (e.g. an "ICMP Port
Unreachable" message, in the case of SIO_UDP_CONNRESET), it will cause
the underlying UDP socket to throw an error. Confusingly, this can occur
even on reads, if the same UDP socket is used to write a packet that
triggers this response.

The Go runtime disabled the SIO_UDP_CONNRESET behavior in 3114bd6, but
did not change SIO_UDP_NETRESET–probably because that socket option
isn't documented particularly well.

Various other networking code seem to disable this behaviour, such as
the Godot game engine (godotengine/godot#22332) and the Eclipse TCF
agent (link below). Others appear to work around this by ignoring the
error returned (anacrolix/dht#16, among others).

For now, until it's clear whether this ends up in the upstream Go
implementation or not, let's also disable the SIO_UDP_NETRESET in a
similar manner to SIO_UDP_CONNRESET.

Eclipse TCF agent: https://gitlab.eclipse.org/eclipse/tcf/tcf.agent/-/blob/master/agent/tcf/framework/mdep.c

Updates #10976
Updates golang/go#68614

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: I70a2f19855f8dec1bfb82e63f6d14fc4a22ed5c3
3 months ago
..
bench ipn/ipnlocal, all: plumb health trackers in tests 7 months ago
capture wgengine/capture: fix v6 field typo in wireshark dissector 4 months ago
filter wgengine/filter: support FilterRules matching on srcIP node caps [capver 100] 5 months ago
magicsock wgengine/magicsock: disable SIO_UDP_NETRESET on Windows 3 months ago
netlog wgengine: add exit destination logging enable for wgengine logger (#11952) 7 months ago
netstack wgengine/netstack: disable gVisor TCP GRO for Linux (#13138) 3 months ago
router wgengine/router: use quad-100 as the nexthop on Windows 4 months ago
wgcfg ipn,wgengine: remove vestigial Prefs.AllowSingleHosts 6 months ago
wgint wgengine{,/wgint}: add wgint.Peer wrapper type, add to wgengine.Engine 9 months ago
wglog all: use Go 1.22 range-over-int 7 months ago
winnet all: add test for package comments, fix, add comments as needed 4 months ago
mem_ios.go all: update copyright and license headers 2 years ago
pendopen.go net/flowtrack: optimize Tuple type for use as map key 5 months ago
userspace.go util/linuxfw: return nil interface not concrete type 4 months ago
userspace_ext_test.go ipn/ipnlocal, all: plumb health trackers in tests 7 months ago
userspace_test.go ipn/ipnlocal, all: plumb health trackers in tests 7 months ago
watchdog.go ipn/ipnlocal,net/tstun,wgengine: create and plumb jailed packet filter 7 months ago
watchdog_js.go all: update copyright and license headers 2 years ago
watchdog_test.go ipn/ipnlocal, all: plumb health trackers in tests 7 months ago
wgengine.go all: add test for package comments, fix, add comments as needed 4 months ago