Subject: Re: [PATCH ipsec-next] xfrm: delete not-needed clear to zero of encap_oa

From: Leon Romanovsky <[email-masked]>
Date: Mon, 5 Jun 2023 11:48:29 +0300

On Mon, Jun 05, 2023 at 04:36:31PM +0800, Herbert Xu wrote:
> On Mon, Jun 05, 2023 at 11:34:56AM +0300, Leon Romanovsky wrote:
> >
> > The line "memset(&natt->encap_oa, 0, sizeof(natt->encap_oa));" deleted
> > in this patch was the last reference to encap_oa.
> 
> I don't see the point since you're not removing the actual encap_oa
> field.

It is impossible to remove encap_oa because it is declared as UAPI.

Unless you want to support some out-of-tree code, uep->encap_oa will
be always zero.

Thanks

> 
> Cheers,
> -- 
> Email: Herbert Xu <[email-masked]>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt