Re: [PATCH v1] i40e: Add length check for IFLA_AF_SPEC parsing

From: Jakub Kicinski
Date: Tue Jul 25 2023 - 12:54:02 EST


On Tue, 25 Jul 2023 08:40:46 +0300 Leon Romanovsky wrote:
> > Empty attributes are valid, we can't do that.
>
> Maybe Lin can add special version of nla_for_each_nested() which will
> skip these empty NLAs, for code which don't allow empty attributes.

It's way too arbitrary. Empty attrs are 100% legit, they are called
NLA_FLAG in policy parlance. They are basically a boolean.