From: David Ahern <dsahern@gmail.com>
To: Christian Brauner <christian.brauner@ubuntu.com>, netdev@vger.kernel.org
Cc: stephen@networkplumber.org, w.bumiller@proxmox.com,
ebiederm@xmission.com, jbenc@redhat.com,
nicolas.dichtel@6wind.com, linux-kernel@vger.kernel.org,
davem@davemloft.net
Subject: Re: [PATCH net 1/1 v2] rtnetlink: require unique netns identifier
Date: Mon, 5 Feb 2018 09:28:18 -0700 [thread overview]
Message-ID: <c82db104-eeb4-69ed-43c4-24f26c350aff@gmail.com> (raw)
In-Reply-To: <20180205155550.21432-2-christian.brauner@ubuntu.com>
On 2/5/18 8:55 AM, Christian Brauner wrote:
> Since we've added support for IFLA_IF_NETNSID for RTM_{DEL,GET,SET,NEW}LINK
> it is possible for userspace to send us requests with three different
> properties to identify a target network namespace. This affects at least
> RTM_{NEW,SET}LINK. Each of them could potentially refer to a different
> network namespace which is confusing. For legacy reasons the kernel will
> pick the IFLA_NET_NS_PID property first and then look for the
> IFLA_NET_NS_FD property but there is no reason to extend this type of
> behavior to network namespace ids. The regression potential is quite
> minimal since the rtnetlink requests in question either won't allow
> IFLA_IF_NETNSID requests before 4.16 is out (RTM_{NEW,SET}LINK) or don't
> support IFLA_NET_NS_{PID,FD} (RTM_{DEL,GET}LINK) in the first place.
>
> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
> ---
> ChangeLog v1->v2:
> * return errno when the specified network namespace id is invalid
> * fill in struct netlink_ext_ack if the network namespace id is invalid
> * rename rtnl_ensure_unique_netns_attr() to rtnl_ensure_unique_netns() to
> indicate that a request without any network namespace identifying attributes
> is also considered valid.
>
> ChangeLog v0->v1:
> * report a descriptive error to userspace via struct netlink_ext_ack
> * do not fail when multiple properties specifiy the same network namespace
> ---
> net/core/rtnetlink.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 69 insertions(+)
LGTM.
Acked-by: David Ahern <dsahern@gmail.com>
next prev parent reply other threads:[~2018-02-05 16:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 15:55 [PATCH net 0/1 v2] rtnetlink: require unique netns identifier Christian Brauner
2018-02-05 15:55 ` [PATCH net 1/1 " Christian Brauner
2018-02-05 16:28 ` David Ahern [this message]
2018-02-05 21:47 ` Kirill Tkhai
2018-02-05 23:24 ` Christian Brauner
2018-02-06 10:49 ` Kirill Tkhai
2018-02-06 12:18 ` Christian Brauner
2018-02-06 22:31 ` Eric W. Biederman
2018-02-07 11:13 ` Jiri Benc
2018-02-07 4:54 ` kbuild test robot
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=c82db104-eeb4-69ed-43c4-24f26c350aff@gmail.com \
--to=dsahern@gmail.com \
--cc=christian.brauner@ubuntu.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=jbenc@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=stephen@networkplumber.org \
--cc=w.bumiller@proxmox.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).