diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2023-09-11 17:53:21 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <brad@danga.com> | 2023-09-11 18:11:09 -0700 |
| commit | 42072683d662e0e098eb13690f56cf798e893843 (patch) | |
| tree | cc34b22d24045d5362a98207ec5604464dc7136e /control/controlknobs/controlknobs.go | |
| parent | 4e91cf20a854d19b4c3602a54297fcd23e88e351 (diff) | |
| download | tailscale-42072683d662e0e098eb13690f56cf798e893843.tar.xz tailscale-42072683d662e0e098eb13690f56cf798e893843.zip | |
control/controlknobs: move ForceBackgroundSTUN to controlknobs.Knobs
This is both more efficient (because the knobs' bool is only updated
whenever Node is changed, rarely) and also gets us one step closer to
removing a case of storing a netmap.NetworkMap in
magicsock. (eventually we want to phase out much of the use of that
type internally)
Updates #1909
Change-Id: I37e81789f94133175064fdc09984e4f3a431f1a1
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'control/controlknobs/controlknobs.go')
| -rw-r--r-- | control/controlknobs/controlknobs.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/control/controlknobs/controlknobs.go b/control/controlknobs/controlknobs.go index ead726e90..ace56264c 100644 --- a/control/controlknobs/controlknobs.go +++ b/control/controlknobs/controlknobs.go @@ -34,4 +34,8 @@ type Knobs struct { // OneCGNAT is whether the the node should make one big CGNAT route // in the OS rather than one /32 per peer. OneCGNAT syncs.AtomicValue[opt.Bool] + + // ForceBackgroundSTUN forces netcheck STUN queries to keep + // running in magicsock, even when idle. + ForceBackgroundSTUN atomic.Bool } |
