All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Vagin <avagin@gmail.com>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org
Cc: Christian Brauner <christian.brauner@ubuntu.com>,
	Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
Subject: Re: [PATCH net-next] net: Allow to specify ifindex when device is moved to another namespace
Date: Fri, 2 Apr 2021 01:17:46 -0700	[thread overview]
Message-ID: <YGbTKrb6p1sKGVaw@gmail.com> (raw)
In-Reply-To: <20210402073622.1260310-1-avagin@gmail.com>

On Fri, Apr 02, 2021 at 12:36:22AM -0700, Andrei Vagin wrote:
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index 1bdcb33fb561..9508d3a0a28f 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -2603,14 +2603,20 @@ static int do_setlink(const struct sk_buff *skb,
>  		return err;
>  
>  	if (tb[IFLA_NET_NS_PID] || tb[IFLA_NET_NS_FD] || tb[IFLA_TARGET_NETNSID]) {
> -		struct net *net = rtnl_link_get_net_capable(skb, dev_net(dev),
> -							    tb, CAP_NET_ADMIN);
> +		int new_ifindex = -1;

pls ignore this patch. new_ifindex has to be initialized to 0 here. I
found this when I tested this patch but forgot to commit a fix.

Thanks,
Andrei

  reply	other threads:[~2021-04-02  8:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02  7:36 [PATCH net-next] net: Allow to specify ifindex when device is moved to another namespace Andrei Vagin
2021-04-02  8:17 ` Andrei Vagin [this message]
2021-04-02  8:20 ` Christian Brauner
2021-04-02 16:57   ` Andrei Vagin
2021-04-02  8:29 ` [PATCH net-next v2] " Andrei Vagin
2021-04-05  7:12 ` [PATCH] " Andrei Vagin
2021-04-05 12:15   ` Christian Brauner
2021-04-05 22:10   ` patchwork-bot+netdevbpf
2021-04-05 22:15   ` Jakub Kicinski

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=YGbTKrb6p1sKGVaw@gmail.com \
    --to=avagin@gmail.com \
    --cc=alexander.mikhalitsyn@virtuozzo.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=davem@davemloft.net \
    --cc=kuba@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.