Thread (8 messages) flat view 8 messages, 4 authors, 2018-01-20

Re: [PATCH iproute2] devlink: Ignore unknown attributes

From: David Ahern <hidden>
Date: 2018-01-19 04:42:52

On 1/17/18 5:28 AM, Arkadi Sharshevsky wrote:
quoted hunk ↗ jump to hunk
In case of extending the UAPI old packages would break.

Signed-off-by: Arkadi Sharshevsky <redacted>
---
 devlink/devlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/devlink/devlink.c b/devlink/devlink.c
index 39cda06..c9d1838 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -343,7 +343,7 @@ static int attr_cb(const struct nlattr *attr, void *data)
 	int type;
 
 	if (mnl_attr_type_valid(attr, DEVLINK_ATTR_MAX) < 0)
-		return MNL_CB_ERROR;
+		return MNL_CB_OK;
 
 	type = mnl_attr_get_type(attr);
 	if (mnl_attr_validate(attr, devlink_policy[type]) < 0)
What's the point of calling mnl_attr_type_valid if you disregard a
failure? you might as well not call mnl_attr_type_valid at all.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help