Subject: Re: [devel-ipsec] [RFC ipsec-next v2 0/8] Add IP-TFS mode to xfrm

From: Antony Antony <[email-masked]>
Date: Sun, 10 Mar 2024 21:34:06 +0100

On Thu, Mar 07, 2024 at 06:05:37AM -0500, Christian Hopps wrote:
> 
> Antony Antony <[email-masked]> writes:
> 
> > On Sun, Nov 12, 2023 at 10:52:11PM -0500, Christian Hopps via Devel wrote:
> > > From: Christian Hopps <[email-masked]>
> > > 

> > b: In xfrm_state_construct():
> > 
> > if (attrs[XFRMA_TFCPAD])
> >     x->tfcpad = nla_get_u32(attrs[XFRMA_TFCPAD]);
> 
> Can you explain this more?

I haven't used it. I just know it from *swan code. And I wondered how it 
would work with IP-TFS. Looking in the kernel code, I noticed, it is not 
allowed in xfrm_user.c

 270                 if (attrs[XFRMA_TFCPAD] &&
 271                     p->mode != XFRM_MODE_TUNNEL) {
 272                         NL_SET_ERR_MSG(extack, "TFC padding can only be used in tunnel mode");
 273                         goto out;
 274                 }