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/cmd
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>
4 years ago
..
cloner all: adjust Unix permissions for those without umasks 4 years ago
derper cmd/derper: add /bootstrap-dns handler 4 years ago
hello client, cmd/hello, ipn, wgengine: fix whois for netstack-forwarded connections 4 years ago
microproxy cmd/microproxy: add -insecure flag 4 years ago
mkpkg cmd/mkpkg: support adding empty directories. 5 years ago
tailscale ipn: replace SetWantRunning(bool) with EditPrefs(MaskedPrefs) 4 years ago
tailscaled wgengine/...: split into multiple receive functions 4 years ago
tsshd net/interfaces: remove IsTailscaleIP, make callers use tsaddr. 4 years ago