From: Andrei Vagin <[email protected]> Date: Mon, 24 Oct 2016 18:29:13 -0700
> From: Andrey Vagin <[email protected]> > > Each socket operates in a network namespace where it has been created, > so if we want to dump and restore a socket, we have to know its network > namespace. > > We have a socket_diag to get information about sockets, it doesn't > report sockets which are not bound or connected. > > This patch introduces a new socket ioctl, which is called SIOCGSKNS > and used to get a file descriptor for a socket network namespace. > > A task must have CAP_NET_ADMIN in a target network namespace to > use this ioctl. > > Cc: "David S. Miller" <[email protected]> > Cc: Eric W. Biederman <[email protected]> > Signed-off-by: Andrei Vagin <[email protected]> Applied.

