lkml.org 
[lkml]   [2003]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH: IPSec not using padding when Null Encryption
On Thu, 27 Feb 2003 latten@austin.ibm.com wrote:

> I have tested it. Please let me know if all is well.

Looks fine to me.

(Perhaps change the name of the blksize variable to padto or similar, in
case someone later thinks it's the real block size).

> --- esp.c.orig 2003-02-20 16:07:59.000000000 -0600
> +++ esp.c 2003-02-27 10:30:25.000000000 -0600
> @@ -360,7 +360,7 @@
> esp = x->data;
> alen = esp->auth.icv_trunc_len;
> tfm = esp->conf.tfm;
> - blksize = crypto_tfm_alg_blocksize(tfm);
> + blksize = (crypto_tfm_alg_blocksize(tfm) + 3) & ~3;
> clen = (clen + 2 + blksize-1)&~(blksize-1);
> if (esp->conf.padlen)
> clen = (clen + esp->conf.padlen-1)&~(esp->conf.padlen-1);
>

--
James Morris
<jmorris@intercode.com.au>


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

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.033 / U:1.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site