0

The problem is that /var/run/netns/ directory contains all the network namespaces, except the root namespace. So I am not sure, how to get the fd, that should be passed to the following kernel call:

syscall(__NR_setns, fd, CLONE_NEWNET)
user389238
  • 1,656
  • 3
  • 19
  • 40

1 Answers1

1

AFAIU, you can use /proc/<pid>/ns/net.

Oleksandr Kravchuk
  • 5,963
  • 1
  • 20
  • 31