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

From: David Ahern
Date: Thu May 02 2019 - 09:37:51 EST


On 5/2/19 6:48 AM, 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.
>
> Signed-off-by: Michal Kubecek <mkubecek@xxxxxxx>
> ---
> lib/nlattr.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>

Reviewed-by: David Ahern <dsahern@xxxxxxxxx>