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>
(cherry picked from commit 4ec6d41682)
net-audit-log/1.32
James Tucker 2 years ago committed by Brad Fitzpatrick
parent ccca9faaf8
commit a5340a07cf

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