Thread (1 message) 1 message, 1 author, 2018-09-17

Re: [PATCH 1/2] netlink: add NLA_REJECT policy type

From: Johannes Berg <hidden>
Date: 2018-09-17 09:39:54
Also in: linux-wireless

On Thu, 2018-09-13 at 15:59 -0700, David Miller wrote:
From: Johannes Berg <redacted>
Date: Thu, 13 Sep 2018 10:46:02 +0200
quoted
+                                     NL_SET_BAD_ATTR(extack, nla);
+                                     if (extack && !extack->_msg)
+                                             NL_SET_ERR_MSG(extack,
+                                                            "Attribute failed policy validation");
Given the lively discussion that resulted from this conditional I am
pretty sure we want to override existing messages.

If we have an existing message, and we continued to process and
parse anyways, then the existing message was informational or
a warning.

The message should be overridden when the action will be to fail, as
it will be here when we return -EINVAL.
Not just -EINVAL, but yeah, I've just reworked the patch to do this.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help