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)
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)
AFAIU, you can use /proc/<pid>/ns/net
.