mirror of
https://github.com/clearlinux/libnetwork.git
synced 2026-09-03 20:31:30 +00:00
Make sure to always explicitly set namespace for all kernel bound network operations irrespective of whether the operation is performed in init namespace or a user defined namespace. This already happens for user defined netns. But doesn't happen for initial netns that libnetwork runs in. Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
11 lines
289 B
Go
11 lines
289 B
Go
package netutils
|
|
|
|
import "flag"
|
|
|
|
var runningInContainer = flag.Bool("incontainer", false, "Indicates if the test is running in a container")
|
|
|
|
// IsRunningInContainer returns whether the test is running inside a container.
|
|
func IsRunningInContainer() bool {
|
|
return (*runningInContainer)
|
|
}
|