aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel/defaultroutemonitor.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-29 16:10:17 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-29 16:10:17 +0200
commit335c5d7bcf36d07a7c32fc25ca6b3050e454c50a (patch)
tree658b7a79baafc8dd59278e24782cddf1dcef3e85 /tunnel/defaultroutemonitor.go
parentREADME: document wg(8) building (diff)
downloadwireguard-windows-335c5d7bcf36d07a7c32fc25ca6b3050e454c50a.tar.xz
wireguard-windows-335c5d7bcf36d07a7c32fc25ca6b3050e454c50a.zip
tunnel: logical simplification
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--tunnel/defaultroutemonitor.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tunnel/defaultroutemonitor.go b/tunnel/defaultroutemonitor.go
index 6291b695..f14048cd 100644
--- a/tunnel/defaultroutemonitor.go
+++ b/tunnel/defaultroutemonitor.go
@@ -104,7 +104,7 @@ func monitorDefaultRoutes(device *device.Device, autoMTU bool, tun *tun.NativeTu
mtu = iface.MTU
}
}
- if mtu > 0 && (lastMTU == 0 || lastMTU != mtu) {
+ if mtu > 0 && lastMTU != mtu {
iface, err := getIPInterfaceRetry(ourLUID, windows.AF_INET, retry, 100)
if err != nil {
return err