aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-22 11:50:20 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-22 15:26:54 +0200
commit009cd6fa1975125b9c324fb22e171f724d3e7da9 (patch)
tree06ff541bd0cb3f38bfc9c50bf0c46dcecfc02271 /tunnel
parenttunnel: remove routes before destroying interface (diff)
downloadwireguard-windows-009cd6fa1975125b9c324fb22e171f724d3e7da9.tar.xz
wireguard-windows-009cd6fa1975125b9c324fb22e171f724d3e7da9.zip
tunnel: disable firewall before destroying wintun
Otherwise there's a tiny race. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel')
-rw-r--r--tunnel/ifaceconfig.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/tunnel/ifaceconfig.go b/tunnel/ifaceconfig.go
index b993d739..7d0f1187 100644
--- a/tunnel/ifaceconfig.go
+++ b/tunnel/ifaceconfig.go
@@ -207,6 +207,8 @@ func unconfigureInterface(tun *tun.NativeTun) {
winipcfg.FlushInterfaceIPAddresses(luid, windows.AF_INET6)
//TODO: also flush DNS servers once rozmansi fixes the API for that to take a LUID
+
+ firewall.DisableFirewall()
}
func enableFirewall(conf *conf.Config, tun *tun.NativeTun) error {