From: David Miller <davem@davemloft.net>
To: ktkhai@virtuozzo.com
Cc: netdev@vger.kernel.org, harald.albrecht@gmx.net,
jasowang@redhat.com, brouer@redhat.com, edumazet@google.com,
mst@redhat.com, nicolas.dichtel@6wind.com, wangli39@baidu.com
Subject: Re: [PATCH 1/2] tun: Add ioctl() TUNGETDEVNETNS cmd to allow obtaining real net ns of tun device
Date: Thu, 21 Mar 2019 13:19:27 -0700 (PDT) [thread overview]
Message-ID: <20190321.131927.1229577878872009929.davem@davemloft.net> (raw)
In-Reply-To: <155307337803.17673.7357500798893442953.stgit@localhost.localdomain>
From: Kirill Tkhai <ktkhai@virtuozzo.com>
Date: Wed, 20 Mar 2019 12:16:42 +0300
> In commit f2780d6d7475 "tun: Add ioctl() SIOCGSKNS cmd to allow
> obtaining net ns of tun device" it was missed that tun may change
> its net ns, while net ns of socket remains the same as it was
> created initially. SIOCGSKNS returns net ns of socket, so it is
> not suitable for obtaining net ns of device.
>
> We may have two tun devices with the same names in two net ns,
> and in this case it's not possible to determ, which of them
> fd refers to (TUNGETIFF will return the same name).
>
> This patch adds new ioctl() cmd for obtaining net ns of a device.
>
> Reported-by: Harald Albrecht <harald.albrecht@gmx.net>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Applied.
prev parent reply other threads:[~2019-03-21 20:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-20 9:16 [PATCH 1/2] tun: Add ioctl() TUNGETDEVNETNS cmd to allow obtaining real net ns of tun device Kirill Tkhai
2019-03-20 9:16 ` [PATCH 2/2] tun: Remove unused first parameter of tun_get_iff() Kirill Tkhai
2019-03-21 20:19 ` David Miller
2019-03-21 20:19 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190321.131927.1229577878872009929.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=brouer@redhat.com \
--cc=edumazet@google.com \
--cc=harald.albrecht@gmx.net \
--cc=jasowang@redhat.com \
--cc=ktkhai@virtuozzo.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=wangli39@baidu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).