projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
526bb57
)
netns: read NETNSA_NSID as s32 attribute in rtnl_net_getid()
author
Guillaume Nault
<
[email protected]
>
Thu, 11 Apr 2019 14:45:57 +0000
(16:45 +0200)
committer
David S. Miller
<
[email protected]
>
Thu, 11 Apr 2019 18:26:27 +0000
(11:26 -0700)
NETNSA_NSID is signed. Use nla_get_s32() to avoid confusion.
Signed-off-by: Guillaume Nault <
[email protected]
>
Acked-by: Nicolas Dichtel <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/core/net_namespace.c
patch
|
blob
|
history
diff --git
a/net/core/net_namespace.c
b/net/core/net_namespace.c
index 7e6dcc6257011d8b60e132e97a0db229c39d1daf..ebb5b6d21a13f6f2ede5237946815c76a8d391f8 100644
(file)
--- a/
net/core/net_namespace.c
+++ b/
net/core/net_namespace.c
@@
-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]));
nla = tb[NETNSA_FD];
} else if (tb[NETNSA_NSID]) {
- peer = get_net_ns_by_id(net, nla_get_
u
32(tb[NETNSA_NSID]));
+ peer = get_net_ns_by_id(net, nla_get_
s
32(tb[NETNSA_NSID]));
if (!peer)
peer = ERR_PTR(-ENOENT);
nla = tb[NETNSA_NSID];