summaryrefslogtreecommitdiffhomepage
path: root/wgengine/netstack/netstack.go
diff options
context:
space:
mode:
authorVal <valerie@tailscale.com>2023-08-07 23:05:24 +0200
committerVal <valerie@tailscale.com>2023-08-07 23:05:24 +0200
commit0a6ddae0de54e39240bb4f621fdae34d5917ca6d (patch)
treeae90b76336e76f1858adfb1768688f7f5e9f80a4 /wgengine/netstack/netstack.go
parent7d18398d7f430b37890845bd7396e6fa4d801ba9 (diff)
downloadtailscale-valscale/ptb.tar.xz
tailscale-valscale/ptb.zip
tmp: introduce wire/user/safe mtuvalscale/ptb
Diffstat (limited to 'wgengine/netstack/netstack.go')
-rw-r--r--wgengine/netstack/netstack.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/wgengine/netstack/netstack.go b/wgengine/netstack/netstack.go
index 0a27f97f2..f2c7e14e7 100644
--- a/wgengine/netstack/netstack.go
+++ b/wgengine/netstack/netstack.go
@@ -179,7 +179,7 @@ func Create(logf logger.Logf, tundev *tstun.Wrapper, e wgengine.Engine, mc *magi
if tcpipErr != nil {
return nil, fmt.Errorf("could not enable TCP SACK: %v", tcpipErr)
}
- linkEP := channel.New(512, tstun.DefaultMTU(), "")
+ linkEP := channel.New(512, tstun.TunMTU(), "")
if tcpipProblem := ipstack.CreateNIC(nicID, linkEP); tcpipProblem != nil {
return nil, fmt.Errorf("could not create netstack NIC: %v", tcpipProblem)
}
@@ -1044,7 +1044,7 @@ func (ns *Impl) acceptUDP(r *udp.ForwarderRequest) {
func (ns *Impl) handleMagicDNSUDP(srcAddr netip.AddrPort, c *gonet.UDPConn) {
// In practice, implementations are advised not to exceed 512 bytes
// due to fragmenting. Just to be sure, we bump all the way to the MTU.
- var maxUDPReqSize = tstun.DefaultMTU()
+ var maxUDPReqSize = tstun.TunMTU()
// Packets are being generated by the local host, so there should be
// very, very little latency. 150ms was chosen as something of an upper
// bound on resource usage, while hopefully still being long enough for