]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
tun: openbsd: check for interface already being up
authorJason A. Donenfeld <Jason@zx2c4.com>
Sat, 7 Sep 2019 05:02:07 +0000 (00:02 -0500)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sat, 7 Sep 2019 05:13:23 +0000 (00:13 -0500)
commit4cd06c0925ceb3dccd07b5ca1bdcdd6c24cfc77b
tree0332abfbd2b792fcaf2a14e7b0a8235a3f1f2dca
parentd12eb91f9a309a30dd78e89ff71050842d4a4e6e
tun: openbsd: check for interface already being up

In some cases, we operate on an already-up interface, or the user brings
up the interface before we start monitoring. For those situations, we
should first check if the interface is already up.

This still technically races between the initial check and the start of
the route loop, but fixing that is a bit ugly and probably not worth it
at the moment.

Reported-by: Theo Buehler <tb@theobuehler.org>
tun/tun_openbsd.go