tailscale/cmd/tailscaled
Josh Bleecher Snyder b3ceca1dd7 wgengine/...: split into multiple receive functions
Upstream wireguard-go has changed its receive model.
NewDevice now accepts a conn.Bind interface.

The conn.Bind is stateless; magicsock.Conns are stateful.
To work around this, we add a connBind type that supports
cheap teardown and bring-up, backed by a Conn.

The new conn.Bind allows us to specify a set of receive functions,
rather than having to shoehorn everything into ReceiveIPv4 and ReceiveIPv6.
This lets us plumbing DERP messages directly into wireguard-go,
instead of having to mux them via ReceiveIPv4.

One consequence of the new conn.Bind layer is that
closing the wireguard-go device is now indistinguishable
from the routine bring-up and tear-down normally experienced
by a conn.Bind. We thus have to explicitly close the magicsock.Conn
when the close the wireguard-go device.

One downside of this change is that we are reliant on wireguard-go
to call receiveDERP to process DERP messages. This is fine for now,
but is perhaps something we should fix in the future.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-04-02 12:18:54 -07:00
..
debug.go Revert "cmd/tailscaled: split package main into main shim + package" 2021-03-25 09:06:00 -07:00
depaware.txt wgengine/...: split into multiple receive functions 2021-04-02 12:18:54 -07:00
install_darwin.go cmd/tailscaled: remove tailscaled binary on uninstall-system-daemon 2021-03-31 15:44:04 -07:00
tailscaled_notwindows.go Revert "cmd/tailscaled: split package main into main shim + package" 2021-03-25 09:06:00 -07:00
tailscaled_windows.go wgengine: make Tun optional again, default to fake. 2021-03-28 21:45:02 -07:00
tailscaled.defaults cmd/tailscaled: rename relaynode reference in defaults file comment 2020-03-13 14:38:04 -07:00
tailscaled.go wgengine/router: move DNS cleanup into the DNS package. 2021-04-01 22:35:34 -07:00
tailscaled.service cmd/tailscaled/tailscaled.service: revert recent hardening for now 2021-02-01 13:37:48 -08:00