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 <james@tailscale.com>
pull/5924/head
James Tucker 2 years ago committed by James Tucker
parent a1a43ed266
commit 4ec6d41682

@ -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

Loading…
Cancel
Save