netdev
[Top] [All Lists]

Re: [NAT-T] NON-IKE encapsulation

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [NAT-T] NON-IKE encapsulation
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Fri, 25 Jun 2004 10:12:31 -0700
Cc: agruen@xxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20040624123603.GA1241@xxxxxxxxxxxxxxxxxxx>
References: <20040624123603.GA1241@xxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Thu, 24 Jun 2004 22:36:03 +1000
Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:

> I'm having trouble understanding why we need to increase alen by
> two bytes for NON-IKE.  As far as I can see it's adding two bytes
> of random data to the end of the packet.  Is there something
> obvious that I'm missing?

I now think it's trying to account for the udpdata32[] header area.
But that's not 2 bytes, it's (2 * sizeof(u32)) or 8 bytes.

The ESP added headers amount to esp->auth.icv_trunc_len + 8 in
this case, so changing the "alen += 2;" into "alen += 8;" seems
more appropriate.

What do you think Herbert?  Does it make sense now?

<Prev in Thread] Current Thread [Next in Thread>