mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-08 23:49:56 +00:00
cmd/tailscaled: disable netns earlier in userspace-networking mode
The earlier 382b349c54
was too late,
as engine creation itself needed to listen on things.
Fixes #2827
Updates #2822
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
382b349c54
commit
4f648e6fcc
@@ -24,9 +24,10 @@ import (
|
||||
|
||||
var disabled syncs.AtomicBool
|
||||
|
||||
// Disable disables netns for the process.
|
||||
func Disable() {
|
||||
disabled.Set(true)
|
||||
// SetEnabled enables or disables netns for the process.
|
||||
// It defaults to being enabled.
|
||||
func SetEnabled(on bool) {
|
||||
disabled.Set(!on)
|
||||
}
|
||||
|
||||
// Listener returns a new net.Listener with its Control hook func
|
||||
|
Reference in New Issue
Block a user