diff options
author | Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> | 2021-09-03 10:02:52 +0000 |
---|---|---|
committer | Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> | 2021-09-03 10:02:52 +0000 |
commit | 79c30f58ebe34942bb109d786cefbd5e93fa54aa (patch) | |
tree | 4b7df0ec7a0dcdce6f82758886f1999a97c1ee8e /net/core | |
parent | 992eac2c403de62a640246018204afc58180ab5e (diff) | |
parent | c6bf0ed9d1a727fcd98f6a52bbdd2afbdfb44924 (diff) |
Merge tag 'v5.4.144' into 5.4-2.3.x-imx
This is the 5.4.144 stable release
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 0bad5db23129..6fbc9cb09dc0 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -2414,6 +2414,7 @@ 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]) { + const char *pat = ifname && ifname[0] ? ifname : NULL; struct net *net = rtnl_link_get_net_capable(skb, dev_net(dev), tb, CAP_NET_ADMIN); if (IS_ERR(net)) { @@ -2421,7 +2422,7 @@ static int do_setlink(const struct sk_buff *skb, goto errout; } - err = dev_change_net_namespace(dev, net, ifname); + err = dev_change_net_namespace(dev, net, pat); put_net(net); if (err) goto errout; |