You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix Wireguard device bailing after transient receive errors #22097
wireguard-go uses net.Error.Temporary() to differentiate between transient and permanent socket read errors. The method was deprecated in Go 1.18 and never did match reality. This leads to recoverable errors causing wireguard-go to bail after ~3.3 seconds of retries, without tailscaled noticing.
Two changes are proposed:
wireguard-go should only exit on net.ErrClosed.
magicsock should absorb all other errors, either attempting a rebind or not, and correctly signal to the application that the connection is unhealthy.
Activity
device: retry receive funcs on every read error but net.ErrClosed
device: retry receive funcs on every read error but net.ErrClosed (#116)
go.mod: bump wireguard-go
go.mod: bump wireguard-go
wgengine/magicsock,health: back off on read errors
wgengine/magicsock,health: back off on read errors
wgengine/magicsock,health: back off on read errors
wgengine/magicsock,health: back off on read errors
wgengine/magicsock,health: retry UDP read errors intead of exiting.
wgengine/magicsock: treat EADDRNOTAVAIL as transient when reading
wgengine/magicsock: treat EADDRNOTAVAIL as transient when reading
wgengine/magicsock: retry UDP reads on EADDRNOTAVAIL
wgengine/magicsock: retry UDP reads on EADDRNOTAVAIL
wgengine/magicsock: retry UDP reads on EADDRNOTAVAIL
wgengine/magicsock: retry all UDP read errors with a delay
wgengine/magicsock: retry all UDP read errors with a delay
wgengine/magicsock: retry all UDP read errors with a delay
wgengine/magicsock: retry all UDP read errors with a delay
wgengine/magicsock: retry all UDP read errors with a delay
wgengine/magicsock: rebind on bad socket errors
wgengine/magicsock: rebind on bad socket errors
nbeirne commentedon Nov 17, 2026
This specific cause of magicsock-receive-func-error should now be fixed. A good chunk of people in #19504 are experiencing #21773.
device: retry receive funcs on every read error but net.ErrClosed (Wi…