From 4ec6d41682c7daa1e4b983e6d02d28c5f5ba1b29 Mon Sep 17 00:00:00 2001 From: James Tucker Date: Wed, 12 Oct 2022 16:35:19 -0700 Subject: [PATCH] wgengine/router: fix MTU configuration on Windows Always set the MTU to the Tailscale default MTU. In practice we are missing applying an MTU for IPv6 on Windows prior to this patch. This is the simplest patch to fix the problem, the code in here needs some more refactoring. Fixes #5914 Signed-off-by: James Tucker --- wgengine/router/ifconfig_windows.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wgengine/router/ifconfig_windows.go b/wgengine/router/ifconfig_windows.go index 6b126edf0..1b099362d 100644 --- a/wgengine/router/ifconfig_windows.go +++ b/wgengine/router/ifconfig_windows.go @@ -24,6 +24,7 @@ import ( "tailscale.com/health" "tailscale.com/net/interfaces" "tailscale.com/net/tsaddr" + "tailscale.com/net/tstun" "tailscale.com/util/multierr" "tailscale.com/wgengine/winnet" ) @@ -247,7 +248,7 @@ func interfaceFromLUID(luid winipcfg.LUID, flags winipcfg.GAAFlags) (*winipcfg.I } func configureInterface(cfg *Config, tun *tun.NativeTun) (retErr error) { - const mtu = 0 + const mtu = tstun.DefaultMTU luid := winipcfg.LUID(tun.LUID()) iface, err := interfaceFromLUID(luid, // Issue 474: on early boot, when the network is still