mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
envknob: support changing envknobs post-init
Updates #5114 Change-Id: Ia423fc7486e1b3f3180a26308278be0086fae49b Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
33ee2c058e
commit
74674b110d
@@ -316,7 +316,7 @@ func useAmbientCaps() bool {
|
||||
return distro.DSMVersion() >= 7
|
||||
}
|
||||
|
||||
var forceIPCommand = envknob.Bool("TS_DEBUG_USE_IP_COMMAND")
|
||||
var forceIPCommand = envknob.RegisterBool("TS_DEBUG_USE_IP_COMMAND")
|
||||
|
||||
// useIPCommand reports whether r should use the "ip" command (or its
|
||||
// fake commandRunner for tests) instead of netlink.
|
||||
@@ -324,7 +324,7 @@ func (r *linuxRouter) useIPCommand() bool {
|
||||
if r.cmd == nil {
|
||||
panic("invalid init")
|
||||
}
|
||||
if forceIPCommand {
|
||||
if forceIPCommand() {
|
||||
return true
|
||||
}
|
||||
// In the future we might need to fall back to using the "ip"
|
||||
|
Reference in New Issue
Block a user