From: David Ahern <dsahern@gmail.com>
To: Christian Brauner <christian.brauner@canonical.com>,
Stephen Hemminger <stephen@networkplumber.org>
Cc: Christian Brauner <christian.brauner@ubuntu.com>,
netdev@vger.kernel.org, ebiederm@xmission.com, jbenc@redhat.com,
nicolas.dichtel@6wind.com, linux-kernel@vger.kernel.org,
davem@davemloft.net
Subject: Re: [PATCH net 1/1 v1] rtnetlink: require unique netns identifier
Date: Sun, 4 Feb 2018 10:21:50 -0700 [thread overview]
Message-ID: <3b619bb9-f6cb-6ca9-955b-01c87132c389@gmail.com> (raw)
In-Reply-To: <20180204121100.GA1344@gmail.com>
On 2/4/18 5:11 AM, Christian Brauner wrote:
> On Sat, Feb 03, 2018 at 11:17:01AM -0800, Stephen Hemminger wrote:
>> On Sat, 3 Feb 2018 14:29:04 +0100
>> Christian Brauner <christian.brauner@ubuntu.com> wrote:
>>
>>> +static int rtnl_ensure_unique_netns_attr(const struct sock *sk,
>>> + struct nlattr *tb[],
>>> + struct netlink_ext_ack *extack)
>>> +{
>>> + int ret = -EINVAL;
>>> + struct net *net = NULL, *unique_net = NULL;
>>> +
>>> + /* Requests without network namespace ids have been able to specify
>>> + * multiple properties referring to different network namespaces so
>>> + * don't regress them.
>>> + */
>>> + if (!tb[IFLA_IF_NETNSID])
>>> + return 0;
>>> +
>>> + if (!tb[IFLA_NET_NS_PID] && !tb[IFLA_NET_NS_FD])
>>> + return 0;
>>
>> Isn't this an error?
>
> My reasoning was that having no explicit network namespace identifying
> attributes the caller operates on the current network namespace which is
> uniquely identified.
agreed. those are not required attributes.
prev parent reply other threads:[~2018-02-04 17:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-03 13:29 [PATCH net 0/1 v1] rtnetlink: require unique netns identifier Christian Brauner
2018-02-03 13:29 ` [PATCH net 1/1 " Christian Brauner
2018-02-03 19:17 ` Stephen Hemminger
2018-02-04 2:09 ` David Ahern
2018-02-04 12:12 ` Christian Brauner
2018-02-04 12:11 ` Christian Brauner
2018-02-04 17:21 ` David Ahern [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=3b619bb9-f6cb-6ca9-955b-01c87132c389@gmail.com \
--to=dsahern@gmail.com \
--cc=christian.brauner@canonical.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 \
/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).