netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] Add ioctl() SIOCGSKNS cmd to allow obtaining net ns of tun device
@ 2018-02-14 13:39 Kirill Tkhai
  2018-02-14 13:39 ` [PATCH net-next v2 1/3] net: Make extern and export get_net_ns() Kirill Tkhai
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Kirill Tkhai @ 2018-02-14 13:39 UTC (permalink / raw)
  To: davem, jasowang, edumazet, xiyou.wangcong, willemb, peterpenkov96,
	linyu.yuan, kstewart, aviadye, gregkh, ktkhai, davejwatson,
	netdev

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().
---

Kirill Tkhai (3):
      net: Make extern and export get_net_ns()
      net: Export open_related_ns()
      tun: Add ioctl() SIOCGSKNS cmd to allow obtaining net ns of tun device


 drivers/net/tun.c      |   16 ++++++++++++++--
 fs/nsfs.c              |    1 +
 include/linux/socket.h |    2 ++
 net/socket.c           |    3 ++-
 4 files changed, 19 insertions(+), 3 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-15 20:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14 13:39 [PATCH net-next v2 0/3] Add ioctl() SIOCGSKNS cmd to allow obtaining net ns of tun device Kirill Tkhai
2018-02-14 13:39 ` [PATCH net-next v2 1/3] net: Make extern and export get_net_ns() Kirill Tkhai
2018-02-14 13:40 ` [PATCH net-next v2 2/3] net: Export open_related_ns() Kirill Tkhai
2018-02-14 13:40 ` [PATCH net-next v2 3/3] tun: Add ioctl() SIOCGSKNS cmd to allow obtaining net ns of tun device Kirill Tkhai
2018-02-15 20:35 ` [PATCH net-next v2 0/3] " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).