summaryrefslogtreecommitdiffhomepage
path: root/control/controlknobs/controlknobs.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@tailscale.com>2023-11-03 13:56:31 -0700
committerBrad Fitzpatrick <bradfitz@tailscale.com>2023-11-03 13:56:31 -0700
commit530056811afbb7d077a0b5d6046e531b8f89f843 (patch)
treeff87593d5907bf2424f8ad92458a3b12bcdbd12d /control/controlknobs/controlknobs.go
parentfbc18410ad96d4871a3701ebe81531686a4907ac (diff)
downloadtailscale-bradfitz/silentdisco_knob.tar.xz
tailscale-bradfitz/silentdisco_knob.zip
example for jordanbradfitz/silentdisco_knob
Change-Id: I28400c94605110dcbac394fc7bfb61797c1e4b82 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'control/controlknobs/controlknobs.go')
-rw-r--r--control/controlknobs/controlknobs.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/control/controlknobs/controlknobs.go b/control/controlknobs/controlknobs.go
index e64bc8011..4bc309840 100644
--- a/control/controlknobs/controlknobs.go
+++ b/control/controlknobs/controlknobs.go
@@ -52,6 +52,8 @@ type Knobs struct {
// DisableDNSForwarderTCPRetries is whether the DNS forwarder should
// skip retrying truncated queries over TCP.
DisableDNSForwarderTCPRetries atomic.Bool
+
+ SilentDisco atomic.Bool
}
// UpdateFromNodeAttributes updates k (if non-nil) based on the provided self
@@ -74,6 +76,7 @@ func (k *Knobs) UpdateFromNodeAttributes(selfNodeAttrs []tailcfg.NodeCapability,
forceBackgroundSTUN = has(tailcfg.NodeAttrDebugForceBackgroundSTUN)
peerMTUEnable = has(tailcfg.NodeAttrPeerMTUEnable)
dnsForwarderDisableTCPRetries = has(tailcfg.NodeAttrDNSForwarderDisableTCPRetries)
+ silentDisco = has(tailcfg.NodeAttrSilentDisco)
)
if has(tailcfg.NodeAttrOneCGNATEnable) {
@@ -91,6 +94,7 @@ func (k *Knobs) UpdateFromNodeAttributes(selfNodeAttrs []tailcfg.NodeCapability,
k.DisableDeltaUpdates.Store(disableDeltaUpdates)
k.PeerMTUEnable.Store(peerMTUEnable)
k.DisableDNSForwarderTCPRetries.Store(dnsForwarderDisableTCPRetries)
+ k.SilentDisco.Store(silentDisco)
}
// AsDebugJSON returns k as something that can be marshalled with json.Marshal