netns: read NETNSA_NSID as s32 attribute in rtnl_net_getid()
NETNSA_NSID is signed. Use nla_get_s32() to avoid confusion. Signed-off-by: Guillaume Nault <gnault@redhat.com> Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
526bb57a6a
commit
ecce39ec10
|
@ -839,7 +839,7 @@ static int rtnl_net_getid(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||||
peer = get_net_ns_by_fd(nla_get_u32(tb[NETNSA_FD]));
|
peer = get_net_ns_by_fd(nla_get_u32(tb[NETNSA_FD]));
|
||||||
nla = tb[NETNSA_FD];
|
nla = tb[NETNSA_FD];
|
||||||
} else if (tb[NETNSA_NSID]) {
|
} else if (tb[NETNSA_NSID]) {
|
||||||
peer = get_net_ns_by_id(net, nla_get_u32(tb[NETNSA_NSID]));
|
peer = get_net_ns_by_id(net, nla_get_s32(tb[NETNSA_NSID]));
|
||||||
if (!peer)
|
if (!peer)
|
||||||
peer = ERR_PTR(-ENOENT);
|
peer = ERR_PTR(-ENOENT);
|
||||||
nla = tb[NETNSA_NSID];
|
nla = tb[NETNSA_NSID];
|
||||||
|
|
Loading…
Reference in New Issue