wireguard-go/tun
Avery Pennarun c76b818466 tun: NetlinkListener: don't send EventDown before sending EventUp
This works around a startup race condition when competing with
HackListener, which is trying to do the same job. If HackListener
detects that the tundev is running while there is still an event in the
netlink queue that says it isn't running, then the device receives a
string of events like
	EventUp (HackListener)
	EventDown (NetlinkListener)
	EventUp (NetlinkListener)
Unfortunately, after the first EventDown, the device stops itself,
thinking incorrectly that the administrator has downed its tundev.

The device is ignoring the initial EventDown anyway, so just don't emit
it.

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
2020-05-02 01:46:42 -06:00
..
tuntest tuntest: split out testing package 2020-05-02 01:46:42 -06:00
wintun wintun: split error message for create vs open namespace. 2020-05-02 01:44:58 -06:00
operateonfd.go receive: implement flush semantics 2019-03-21 14:45:41 -06:00
tun.go tun: remove TUN prefix from types to reduce stutter elsewhere 2019-06-14 18:35:57 +02:00
tun_darwin.go tun: darwin: ignore ENOMEM errors 2020-01-15 13:39:37 -05:00
tun_freebsd.go tun: remove TUN prefix from types to reduce stutter elsewhere 2019-06-14 18:35:57 +02:00
tun_linux.go tun: NetlinkListener: don't send EventDown before sending EventUp 2020-05-02 01:46:42 -06:00
tun_openbsd.go tun: openbsd: check for interface already being up 2019-09-07 00:13:23 -05:00
tun_windows.go tun: windows: serialize write calls 2020-01-07 11:40:45 -05:00