Update
This commit is contained in:
1 parent
3530afb854
commit
6903fcff27
2146 files changed
+112256
-190703
No files matched your search
+13
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Package netns contains the common code for using the Go net package
|
||||
@@ -46,6 +46,18 @@ func SetBindToInterfaceByRoute(logf logger.Logf, v bool) {
|
||||
}
|
||||
}
|
||||
|
||||
// When true, disableAndroidBindToActiveNetwork skips binding sockets to the currently
|
||||
// active network on Android.
|
||||
var disableAndroidBindToActiveNetwork atomic.Bool
|
||||
|
||||
// SetDisableAndroidBindToActiveNetwork disables the default behavior of binding
|
||||
// sockets to the currently active network on Android.
|
||||
func SetDisableAndroidBindToActiveNetwork(logf logger.Logf, v bool) {
|
||||
if runtime.GOOS == "android" && disableAndroidBindToActiveNetwork.Swap(v) != v {
|
||||
logf("netns: disableAndroidBindToActiveNetwork changed to %v", v)
|
||||
}
|
||||
}
|
||||
|
||||
var disableBindConnToInterface atomic.Bool
|
||||
|
||||
// SetDisableBindConnToInterface disables the (normal) behavior of binding
|
||||
|
||||
Reference in new issue
Block a user