mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-01 14:12:32 -08:00
control: add a controlknob to disable hybrid handshakes
Updates tailscale/corp#50068 Signed-off-by: David Anderson <[email protected]> Change-Id: I07fc56c2eff6ab54ac9eec8ce33ea1d16a6a6964
This commit is contained in:
1 parent
ac18e9056f
commit
265c623b79
2 files changed
+22
No files matched your search
@@ -148,6 +148,11 @@ type Knobs struct {
|
||||
// quad-100 as primary. Off by default; has no effect on other platforms.
|
||||
// See tailscale/corp#45534 and tailscale/corp#48693.
|
||||
ScopeQuad100OnMacOS atomic.Bool
|
||||
|
||||
// DisableHybridHandshakes disables hybrid post-quantum wireguard handshakes
|
||||
// between nodes that otherwise support it. When enabled, communication with all
|
||||
// peers reverts to standard wireguard handshakes.
|
||||
DisableHybridHandshakes atomic.Bool
|
||||
}
|
||||
|
||||
// UpdateFromNodeAttributes updates k (if non-nil) based on the provided self
|
||||
@@ -185,6 +190,7 @@ func (k *Knobs) UpdateFromNodeAttributes(capMap tailcfg.NodeCapMap) {
|
||||
neverGSOEqualTail = has(nodecap.NeverGSOEqualTail)
|
||||
cacheNetworkMaps = has(nodecap.CacheNetworkMaps)
|
||||
scopeQuad100OnMacOS = has(nodecap.ScopeQuad100OnMacOS)
|
||||
disableHybridHandshakes = has(nodecap.DisableHybridHandshakes)
|
||||
)
|
||||
|
||||
if has(nodecap.OneCGNATEnable) {
|
||||
@@ -220,6 +226,7 @@ func (k *Knobs) UpdateFromNodeAttributes(capMap tailcfg.NodeCapMap) {
|
||||
k.NeverGSOEqualTail.Store(neverGSOEqualTail)
|
||||
k.CacheNetworkMaps.Store(cacheNetworkMaps)
|
||||
k.ScopeQuad100OnMacOS.Store(scopeQuad100OnMacOS)
|
||||
k.DisableHybridHandshakes.Store(disableHybridHandshakes)
|
||||
}
|
||||
|
||||
// AsDebugJSON returns k as something that can be marshalled with json.Marshal
|
||||
@@ -248,3 +255,9 @@ func (k *Knobs) AsDebugJSON() map[string]any {
|
||||
func (k *Knobs) ShouldForceRegisterMagicDNSIPv4Only() bool {
|
||||
return k != nil && k.ForceRegisterMagicDNSIPv4Only.Load()
|
||||
}
|
||||
|
||||
// ShouldDisableHybridHandshakes reports the value of
|
||||
// DisableHybridHandshakes, or false if k is nil.
|
||||
func (k *Knobs) ShouldDisableHybridHandshakes() bool {
|
||||
return k != nil && k.DisableHybridHandshakes.Load()
|
||||
}
|
||||
Reference in new issue
Block a user