Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netns: return RTM_NEWNSID instead of RTM_GETNSID on a get

Usually, RTM_NEWxxx is returned on a get (same as a dump).

Fixes: 0c7aecd4bde4 ("netns: add rtnl cmd to add and get peer netns ids")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Nicolas Dichtel and committed by
David S. Miller
e3d8ecb7 6938f855

+1 -1
+1 -1
net/core/net_namespace.c
··· 601 601 } 602 602 603 603 err = rtnl_net_fill(msg, NETLINK_CB(skb).portid, nlh->nlmsg_seq, 0, 604 - RTM_GETNSID, net, peer, -1); 604 + RTM_NEWNSID, net, peer, -1); 605 605 if (err < 0) 606 606 goto err_out; 607 607