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:
8d0752d
)
netlink: Return extack message if attribute validation fails
author
David Ahern
<dsahern@gmail.com>
Tue, 26 Jun 2018 19:39:18 +0000
(12:39 -0700)
committer
David S. Miller
<davem@davemloft.net>
Thu, 28 Jun 2018 07:18:04 +0000
(16:18 +0900)
Have one extack message for parsing and validating.
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/nlattr.c
patch
|
blob
|
history
diff --git
a/lib/nlattr.c
b/lib/nlattr.c
index dfa55c873c1318643fdbcbe916b9c18a54edc4c9..e335bcafa9e4c3012de2f0f8606c3e542008f7b3 100644
(file)
--- a/
lib/nlattr.c
+++ b/
lib/nlattr.c
@@
-253,8
+253,8
@@
int nla_parse(struct nlattr **tb, int maxtype, const struct nlattr *head,
if (policy) {
err = validate_nla(nla, maxtype, policy);
if (err < 0) {
- if (extack)
-
extack->bad_attr = nla
;
+ NL_SET_ERR_MSG_ATTR(extack, nla,
+
"Attribute failed policy validation")
;
goto errout;
}
}