Commit 08d1d0e7 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Paolo Abeni

ethtool: strset: report missing ETHTOOL_A_STRINGSET_ID via ext_ack

Strset needs ETHTOOL_A_STRINGSET_ID, use it as an example of
reporting attrs missing in nests.
Reviewed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 1f7633b5
...@@ -167,7 +167,7 @@ static int strset_get_id(const struct nlattr *nest, u32 *val, ...@@ -167,7 +167,7 @@ static int strset_get_id(const struct nlattr *nest, u32 *val,
get_stringset_policy, extack); get_stringset_policy, extack);
if (ret < 0) if (ret < 0)
return ret; return ret;
if (!tb[ETHTOOL_A_STRINGSET_ID]) if (NL_REQ_ATTR_CHECK(extack, nest, tb, ETHTOOL_A_STRINGSET_ID))
return -EINVAL; return -EINVAL;
*val = nla_get_u32(tb[ETHTOOL_A_STRINGSET_ID]); *val = nla_get_u32(tb[ETHTOOL_A_STRINGSET_ID]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment