diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-22 11:50:20 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-22 15:26:54 +0200 |
commit | e5127acca8c2ffbc41328f7b20298e5d5ecae90a (patch) | |
tree | 06ff541bd0cb3f38bfc9c50bf0c46dcecfc02271 /tunnel | |
parent | tunnel: remove routes before destroying interface (diff) | |
download | wireguard-windows-e5127acca8c2ffbc41328f7b20298e5d5ecae90a.tar.xz wireguard-windows-e5127acca8c2ffbc41328f7b20298e5d5ecae90a.zip |
tunnel: disable firewall before destroying wintun
Otherwise there's a tiny race.
Diffstat (limited to 'tunnel')
-rw-r--r-- | tunnel/ifaceconfig.go | 2 |
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 { |