Re: [PATCH net-next 2/3] netlink: set bad attribute also on maxtype check

From: Johannes Berg
Date: Thu May 02 2019 - 08:52:35 EST

On Thu, 2019-05-02 at 12:48 +0000, Michal Kubecek wrote:
> The check that attribute type is within 0...maxtype range in
> __nla_validate_parse() sets only error message but not bad_attr in extack.
> Set also bad_attr to tell userspace which attribute failed validation.

Good catch, we actually do have an attribute in this case.

Reviewed-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>