Re: [PATCH net-next v2 3/3] netlink: add validation of NLA_F_NESTED flag

From: Johannes Berg
Date: Thu May 02 2019 - 11:36:50 EST


On Thu, 2019-05-02 at 16:15 +0200, Michal Kubecek wrote:
> Add new validation flag NL_VALIDATE_NESTED which adds three consistency
> checks of NLA_F_NESTED_FLAG:
>
> - the flag is set on attributes with NLA_NESTED{,_ARRAY} policy
> - the flag is not set on attributes with other policies except NLA_UNSPEC
> - the flag is set on attribute passed to nla_parse_nested()
>
> Signed-off-by: Michal Kubecek <mkubecek@xxxxxxx>

Reviewed-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

johannes