Re: [PATCH] ip : take care of last fragment in ip_append_data

From: David Miller
Date: Wed Sep 22 2010 - 00:53:23 EST


From: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Date: Wed, 22 Sep 2010 06:44:06 +0200

> The "17" (instead of probable 16 need) comes from :
>
> net/ipv4/esp4.c line 599 :
>
> x->props.trailer_len = align + 1 + crypto_aead_authsize(esp->aead);
>
> In my Nick ipsec script case,
> crypto_aead_blocksize(aead) = 16,
> crypto_aead_authsize(esp->aead) = 0
>
> -> align = 16
> trailer_len = 16 + 1 + 0;
>
> I am not sure we need the "+ 1", but I know nothing about this stuff.
>
> Same in net/ipv6/esp6.c ?

I think the author of this code thought that the alignment was
expressed as "N - 1" instead of plain "N".

I'll do some research. :-)

Thanks Eric.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/