From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Jonas Bonn <jonas@norrbonn.se>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: davem@davemloft.net
Subject: Re: [PATCH 3/5] rtnetlink: allow RTM_NEWLINK to act upon interfaces in arbitrary namespaces
Date: Tue, 5 Nov 2019 16:43:18 +0100 [thread overview]
Message-ID: <f479405c-9372-68fb-762e-519f3bfdd333@6wind.com> (raw)
In-Reply-To: <20191105081112.16656-4-jonas@norrbonn.se>
Le 05/11/2019 à 09:11, Jonas Bonn a écrit :
> RTM_NEWLINK can be used mostly interchangeably with RTM_SETLINK for
> modifying device configuration. As such, this method requires the same
> logic as RTM_SETLINK for finding the device to act on.
>
> With this patch, the IFLA_TARGET_NETNSID selects the namespace in which
> to search for the interface to act upon. This allows, for example, to
> set the namespace of an interface outside the current namespace by
> selecting it with the (IFLA_TARGET_NETNSID,ifi->ifi_index) pair and
> specifying the namespace with one of IFLA_NET_NS_[PID|FD].
>
> Since rtnl_newlink branches off into do_setlink, we need to provide the
> same backwards compatibility check as we do for RTM_SETLINK: if the
> device is not found in the namespace given by IFLA_TARGET_NETNSID then
> we search for it in the current namespace. If found there, it's
> namespace will be changed, as before.
>
> Signed-off-by: Jonas Bonn <jonas@norrbonn.se>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
next prev parent reply other threads:[~2019-11-05 15:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 8:11 [PATCH 0/5] Add namespace awareness to Netlink methods Jonas Bonn
2019-11-05 8:11 ` [PATCH 1/5] rtnetlink: allow RTM_SETLINK to reference other namespaces Jonas Bonn
2019-11-05 15:41 ` Nicolas Dichtel
2019-11-05 8:11 ` [PATCH 2/5] rtnetlink: skip namespace change if already effect Jonas Bonn
2019-11-05 15:42 ` Nicolas Dichtel
2019-11-05 8:11 ` [PATCH 3/5] rtnetlink: allow RTM_NEWLINK to act upon interfaces in arbitrary namespaces Jonas Bonn
2019-11-05 15:43 ` Nicolas Dichtel [this message]
2019-11-05 8:11 ` [PATCH 4/5] net: ipv4: allow setting address on interface outside current namespace Jonas Bonn
2019-11-05 15:47 ` Nicolas Dichtel
2019-11-05 8:11 ` [PATCH 5/5] net: namespace: allow setting NSIDs " Jonas Bonn
2019-11-05 15:49 ` Nicolas Dichtel
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=f479405c-9372-68fb-762e-519f3bfdd333@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=davem@davemloft.net \
--cc=jonas@norrbonn.se \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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
all inboxes | Powered by JetHome®