devlink: Ignore unknown attributes

In case of extending the UAPI old packages would break.

Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Arkadi Sharshevsky 2018-01-17 15:28:00 +02:00 committed by Stephen Hemminger
parent c4fb35bdfc
commit c619f2be8b

View File

@ -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)