projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
netlink: allow be16 and be32 types in all uint policy checks
[platform/kernel/linux-starfive.git]
/
lib
/
nlattr.c
diff --git
a/lib/nlattr.c
b/lib/nlattr.c
index
489e15b
..
7a2b6c3
100644
(file)
--- a/
lib/nlattr.c
+++ b/
lib/nlattr.c
@@
-355,6
+355,12
@@
static int nla_validate_mask(const struct nla_policy *pt,
case NLA_U64:
value = nla_get_u64(nla);
break;
case NLA_U64:
value = nla_get_u64(nla);
break;
+ case NLA_BE16:
+ value = ntohs(nla_get_be16(nla));
+ break;
+ case NLA_BE32:
+ value = ntohl(nla_get_be32(nla));
+ break;
default:
return -EINVAL;
}
default:
return -EINVAL;
}