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:
parent
c4fb35bdfc
commit
c619f2be8b
|
|
@ -343,7 +343,7 @@ static int attr_cb(const struct nlattr *attr, void *data)
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
if (mnl_attr_type_valid(attr, DEVLINK_ATTR_MAX) < 0)
|
if (mnl_attr_type_valid(attr, DEVLINK_ATTR_MAX) < 0)
|
||||||
return MNL_CB_ERROR;
|
return MNL_CB_OK;
|
||||||
|
|
||||||
type = mnl_attr_get_type(attr);
|
type = mnl_attr_get_type(attr);
|
||||||
if (mnl_attr_validate(attr, devlink_policy[type]) < 0)
|
if (mnl_attr_validate(attr, devlink_policy[type]) < 0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue