mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-22 19:09:58 +00:00
disco,net/tstun,wgengine/magicsock: probe peer MTU
Automatically probe the path MTU to a peer when peer MTU is enabled, but do not use the MTU information for anything yet. Updates #311 Signed-off-by: Val <valerie@tailscale.com>
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
package magicsock
|
||||
|
||||
import "tailscale.com/net/tstun"
|
||||
|
||||
// Peer path MTU routines shared by platforms that implement it.
|
||||
|
||||
// DontFragSetting returns true if at least one of the underlying sockets of
|
||||
@@ -102,6 +104,9 @@ func (c *Conn) UpdatePMTUD() {
|
||||
_ = c.setDontFragment("udp6", false)
|
||||
newStatus = false
|
||||
}
|
||||
if debugPMTUD() {
|
||||
c.logf("magicsock: peermtu: peer MTU probes are %v", tstun.WireMTUsToProbe)
|
||||
}
|
||||
c.peerMTUEnabled.Store(newStatus)
|
||||
c.resetEndpointStates()
|
||||
}
|
||||
|
Reference in New Issue
Block a user