diff options
| author | Val <valerie@tailscale.com> | 2023-09-21 11:31:48 +0200 |
|---|---|---|
| committer | valscale <valerie@tailscale.com> | 2023-09-21 04:17:12 -0700 |
| commit | 65dc711c7645a5d7de7f6b2a748fa9e4d0e5f080 (patch) | |
| tree | d6757b67aa0e3510de3e4cfee473eb1c15e76a81 /control/controlknobs/controlknobs.go | |
| parent | 95635857dc23d442fb43d0cabc13ad73486492cf (diff) | |
| download | tailscale-65dc711c7645a5d7de7f6b2a748fa9e4d0e5f080.tar.xz tailscale-65dc711c7645a5d7de7f6b2a748fa9e4d0e5f080.zip | |
control,tailcfg,wgengine/magicsock: add nodeAttr to enable/disable peer MTU
Add a nodeAttr to enable/disable peer path MTU discovery.
Updates #311
Signed-off-by: Val <valerie@tailscale.com>
Diffstat (limited to 'control/controlknobs/controlknobs.go')
| -rw-r--r-- | control/controlknobs/controlknobs.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/control/controlknobs/controlknobs.go b/control/controlknobs/controlknobs.go index 4d57b30a3..3ea0575a5 100644 --- a/control/controlknobs/controlknobs.go +++ b/control/controlknobs/controlknobs.go @@ -45,6 +45,9 @@ type Knobs struct { // incremental (delta) netmap updates and should treat all netmap // changes as "full" ones as tailscaled did in 1.48.x and earlier. DisableDeltaUpdates atomic.Bool + + // PeerMTUEnable is whether the node should do peer path MTU discovery. + PeerMTUEnable atomic.Bool } // UpdateFromNodeAttributes updates k (if non-nil) based on the provided self @@ -65,6 +68,7 @@ func (k *Knobs) UpdateFromNodeAttributes(selfNodeAttrs []tailcfg.NodeCapability, disableDeltaUpdates = has(tailcfg.NodeAttrDisableDeltaUpdates) oneCGNAT opt.Bool forceBackgroundSTUN = has(tailcfg.NodeAttrDebugForceBackgroundSTUN) + peerMTUEnable = has(tailcfg.NodeAttrPeerMTUEnable) ) if has(tailcfg.NodeAttrOneCGNATEnable) { @@ -80,6 +84,7 @@ func (k *Knobs) UpdateFromNodeAttributes(selfNodeAttrs []tailcfg.NodeCapability, k.OneCGNAT.Store(oneCGNAT) k.ForceBackgroundSTUN.Store(forceBackgroundSTUN) k.DisableDeltaUpdates.Store(disableDeltaUpdates) + k.PeerMTUEnable.Store(peerMTUEnable) } // AsDebugJSON returns k as something that can be marshalled with json.Marshal @@ -96,5 +101,6 @@ func (k *Knobs) AsDebugJSON() map[string]any { "OneCGNAT": k.OneCGNAT.Load(), "ForceBackgroundSTUN": k.ForceBackgroundSTUN.Load(), "DisableDeltaUpdates": k.DisableDeltaUpdates.Load(), + "PeerMTUEnable": k.PeerMTUEnable.Load(), } } |
