[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YGbTKrb6p1sKGVaw@gmail.com>
Date: Fri, 2 Apr 2021 01:17:46 -0700
From: Andrei Vagin <avagin@...il.com>
To: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Cc: Christian Brauner <christian.brauner@...ntu.com>,
Alexander Mikhalitsyn <alexander.mikhalitsyn@...tuozzo.com>
Subject: Re: [PATCH net-next] net: Allow to specify ifindex when device is
moved to another namespace
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
Powered by blists - more mailing lists