diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-09-14 12:23:07 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-09-14 12:24:17 +0200 |
commit | eca2bc860abefa580c32f6452bc6598799106db6 (patch) | |
tree | 7660537a8a627ec5f7387660e7484d4c349cb4e3 /manager | |
parent | version: bump (diff) | |
download | wireguard-windows-eca2bc860abefa580c32f6452bc6598799106db6.tar.xz wireguard-windows-eca2bc860abefa580c32f6452bc6598799106db6.zip |
tunnel: reinitialize configuration after PnP flaps driver on <10
On older Windows, PnP will unload the driver and reload it. This makes
multiple tunnels impossible, as we knew. But this also happens when
various adapter settings change, like ICS, which is maybe a bigger
issue. Solve this by reloading the configuration after these flaps.
Reported-by: Harland Coles <harland.coles@energy-x.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'manager')
-rw-r--r-- | manager/ipc_server.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/manager/ipc_server.go b/manager/ipc_server.go index de97ffb1..48db057e 100644 --- a/manager/ipc_server.go +++ b/manager/ipc_server.go @@ -113,14 +113,13 @@ func (s *ManagerService) Start(tunnelName string) error { return err } - maj, _, _ := windows.RtlGetNtVersionNumbers() // Figure out which tunnels have intersecting addresses/routes and stop those. trackedTunnelsLock.Lock() tt := make([]string, 0, len(trackedTunnels)) var inTransition string for t, state := range trackedTunnels { c2, err := conf.LoadFromName(t) - if maj >= 10 && (err != nil || !c.IntersectsWith(c2)) { + if err != nil || !c.IntersectsWith(c2) { // If we can't get the config, assume it doesn't intersect. continue } |