diff options
| author | David S. Miller <davem@davemloft.net> | 2018-02-15 15:34:42 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-02-15 15:35:11 -0500 |
| commit | c402fb7e380c142f2ad3e94d4a1a096fc55b643f (patch) | |
| tree | 379cb186c759641311ec2eed0c3e1aba9e30fa3c /include | |
| parent | bdc8587ad75d9a42a8165f932c2dfff4d5b877e4 (diff) | |
| parent | f2780d6d74756bc1d7ba32ff3dd0de4afd7c7e1e (diff) | |
Merge branch 'tunchr-get-netns'
Kirill Tkhai says:
====================
net: Add ioctl() SIOCGSKNS cmd to allow obtaining net ns of tun device
Currently, it's not possible to get or check net namespace,
which was used to create tun socket. User may have two tun
devices with the same names in different nets, and there
is no way to differ them each other.
The patchset adds support for ioctl() cmd SIOCGSKNS for tun
devices. It will allow people to obtain net namespace file
descriptor like we allow to do that for sockets in general.
v2: Add new patch [2/3] to export open_related_ns().
====================
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/socket.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h index 9286a5a8c60c..1ce1f768a58c 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -353,4 +353,6 @@ extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen unsigned int flags, struct timespec *timeout); extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, unsigned int flags); + +extern struct ns_common *get_net_ns(struct ns_common *ns); #endif /* _LINUX_SOCKET_H */ |
