tailscale/wgengine
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
..
filter net/packet, wgengine/{filter,tstun}: add TSMP ping 2021-03-24 09:50:01 -07:00
magicsock wgengine/...: split into multiple receive functions 2021-04-02 12:18:54 -07:00
monitor wgengine/monitor: Linux fall back to polling 2021-04-01 07:29:11 -07:00
netstack wgengine/netstack: stop re-adding IPs registered by active TCP connections (#1629) 2021-03-31 15:32:33 -04:00
router wgengine: take in dns.Config, split out to resolver.Config and dns.OSConfig. 2021-04-02 00:59:44 -07:00
wgcfg wgengine/...: split into multiple receive functions 2021-04-02 12:18:54 -07:00
wglog wgengine/wglog: drop 1/s "interface is up" messages. 2021-02-23 09:01:58 -08:00
winnet wgengine/winnet: don't build on non-windows 2021-02-09 21:09:24 -08:00
pendopen.go net/tstun: rename TUN to Wrapper. 2021-03-26 23:15:22 -07:00
userspace_test.go wgengine: take in dns.Config, split out to resolver.Config and dns.OSConfig. 2021-04-02 00:59:44 -07:00
userspace.go wgengine/...: split into multiple receive functions 2021-04-02 12:18:54 -07:00
watchdog_test.go wgengine: extend TestWatchdog timeout on macOS 2021-03-27 09:27:11 -07:00
watchdog.go wgengine: take in dns.Config, split out to resolver.Config and dns.OSConfig. 2021-04-02 00:59:44 -07:00
wgengine.go wgengine: take in dns.Config, split out to resolver.Config and dns.OSConfig. 2021-04-02 00:59:44 -07:00