lkml.org 
[lkml]   [2022]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5.10 173/563] xfrm: interface with if_id 0 should return error
On Wed, Jan 26, 2022 at 10:59:37PM +0100, Pavel Machek wrote:
> Hi!
>
> > [ Upstream commit 8dce43919566f06e865f7e8949f5c10d8c2493f5 ]
> >
> > xfrm interface if_id = 0 would cause xfrm policy lookup errors since
> > Commit 9f8550e4bd9d.
> >
> > Now explicitly fail to create an xfrm interface when if_id = 0
>
> This will break changelink completely, AFAICT.
>
> > @@ -672,7 +677,12 @@ static int xfrmi_changelink(struct net_device *dev, struct nlattr *tb[],
> > {
> > struct xfrm_if *xi = netdev_priv(dev);
> > struct net *net = xi->net;
> > - struct xfrm_if_parms p;
> > + struct xfrm_if_parms p = {};
> > +
> > + if (!p.if_id) {
> > + NL_SET_ERR_MSG(extack, "if_id must be non zero");
> > + return -EINVAL;
> > + }
> >
> > xfrmi_netlink_parms(data, &p);
> > xi = xfrmi_locate(net, &p);
>
> if_id will be always 0, because it was not yet initialized.
>
> Best regards,
> Pavel
>
> Signed-off-by: Pavel Machek <pavel@denx.de>

Can you please resend this with proper commit message and 'Fixes:' tag?

Thanks!

\
 
 \ /
  Last update: 2022-01-27 07:33    [W:0.521 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site