[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <26a27e55.668e.18d1ca5845b.Coremail.linma@zju.edu.cn>
Date: Thu, 18 Jan 2024 20:57:05 +0800 (GMT+08:00)
From: "Lin Ma" <linma@....edu.cn>
To: "Paolo Abeni" <pabeni@...hat.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v1] vlan: skip nested type that is not
IFLA_VLAN_QOS_MAPPING
Hello Paolo,
>
> On Wed, 2024-01-17 at 23:38 +0800, Lin Ma wrote:
> > In the vlan_changelink function, a loop is used to parse the nested
> > attributes IFLA_VLAN_EGRESS_QOS and IFLA_VLAN_INGRESS_QOS in order to
> > obtain the struct ifla_vlan_qos_mapping. These two nested attributes are
> > checked in the vlan_validate_qos_map function, which calls
> > nla_validate_nested_deprecated with the vlan_map_policy.
> >
> > However, this deprecated validator applies a LIBERAL strictness, allowing
> > the presence of an attribute with the type IFLA_VLAN_QOS_UNSPEC.
> > Consequently, the loop in vlan_changelink may parse an attribute of type
> > IFLA_VLAN_QOS_UNSPEC and believe it carries a payload of
> > struct ifla_vlan_qos_mapping, which is not necessarily true.
> >
> > To address this issue and ensure compatibility, this patch introduces two
> > type checks that skip attributes whose type is not IFLA_VLAN_QOS_MAPPING.
> >
> > Signed-off-by: Lin Ma <linma@....edu.cn>
>
> Why are you targeting net-next? this looks like a fix suitable for
> 'net' - with a proper fixes tag.
>
Thanks for your suggestions, sometimes I just mistakenly do the opposite of what I intended to.
I will send version two with the right tag.
> Cheers,
>
> Paolo
Thanks
Lin
Powered by blists - more mailing lists