提交 7861552c 编写于 作者: D David Ahern 提交者: David S. Miller

netlink: Return extack message if attribute validation fails

Have one extack message for parsing and validating.
Signed-off-by: NDavid Ahern <dsahern@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8d0752d1
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册