path: root/tunnel/service.go
diff options
authorJason A. Donenfeld <Jason@zx2c4.com>2021-09-14 12:23:07 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-09-14 12:24:17 +0200
commiteca2bc860abefa580c32f6452bc6598799106db6 (patch)
tree7660537a8a627ec5f7387660e7484d4c349cb4e3 /tunnel/service.go
parentversion: bump (diff)
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 '')
1 files changed, 2 insertions, 2 deletions
diff --git a/tunnel/service.go b/tunnel/service.go
index 9df4fecc..decfb571 100644
--- a/tunnel/service.go
+++ b/tunnel/service.go
@@ -276,7 +276,7 @@ func (service *tunnelService) Execute(args []string, r <-chan svc.ChangeRequest,
var clamper mtuClamper
clamper = nativeTun
- watcher.Configure(bind.(conn.BindSocketToInterface), clamper, config, luid)
+ watcher.Configure(bind.(conn.BindSocketToInterface), clamper, nil, config, luid)
log.Println("Listening for UAPI requests")
go func() {
@@ -298,7 +298,7 @@ func (service *tunnelService) Execute(args []string, r <-chan svc.ChangeRequest,
if err != nil {
serviceError = services.ErrorDeviceBringUp
- watcher.Configure(nil, nil, config, luid)
+ watcher.Configure(nil, nil, adapter, config, luid)
err = runScriptCommand(config.Interface.PostUp, config.Name)