[Devel] [PATCH vz7 0/2] Port SIOCGSKNS support for sockets and tun
Kirill Tkhai
ktkhai at virtuozzo.com
Thu Mar 22 19:34:58 MSK 2018
This patchset ports get-socket-and-tun-net-namespace-fd functionality
from mainline kernel to vz7.
Note, that in case of sockets and tun we don't have proc vfsmnt
like we have for NS_GET_USERNS and NS_GET_PARENT. The workaround
is to use current's pid_ns->proc_mnt. It has to work even in case
of nested pid ns, since the namespaces inodes numbers are uniqul
in the system.
---
Kirill Tkhai (2):
ms/net: add an ioctl to get a socket network namespace
tun: Add ioctl() SIOCGSKNS cmd to allow obtaining net ns of tun device
drivers/net/tun.c | 11 ++++++++++-
fs/proc/namespaces.c | 2 +-
include/linux/proc_ns.h | 8 ++++++++
include/uapi/linux/sockios.h | 1 +
net/socket.c | 32 ++++++++++++++++++++++++++++++++
5 files changed, 52 insertions(+), 2 deletions(-)
--
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
More information about the Devel
mailing list