MCPcopy Index your code
hub / github.com/coder/coder / commandInNetNS

Function commandInNetNS

tailnet/test/integration/network.go:878–883  ·  view source on GitHub ↗
(netNS *os.File, bin string, args []string)

Source from the content-addressed store, hash-verified

876}
877
878func commandInNetNS(netNS *os.File, bin string, args []string) *exec.Cmd {
879 //nolint:gosec
880 cmd := exec.Command("nsenter", append([]string{"--net=/proc/self/fd/3", bin}, args...)...)
881 cmd.ExtraFiles = []*os.File{netNS}
882 return cmd
883}
884
885func wrapExitErr(err error) error {
886 if err == nil {

Callers 10

SetupNetworkingMethod · 0.85
SetupNetworkingMethod · 0.85
createBridgeFunction · 0.85
setInterfaceBridgeFunction · 0.85
setInterfaceIPFunction · 0.85
setInterfaceIP6Function · 0.85
setInterfaceUpFunction · 0.85
addRouteInNetNSFunction · 0.85
iptablesMasqueradeNonUDPFunction · 0.85
iptablesNATFunction · 0.85

Calls 1

CommandMethod · 0.80

Tested by

no test coverage detected