]> git.hungrycats.org Git - linux/commitdiff
[IPSEC]: Make sure ESP output pads Null Encryption properly.
authorJoy Latten <latten@austin.ibm.com>
Sun, 2 Mar 2003 17:45:33 +0000 (09:45 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Sun, 2 Mar 2003 17:45:33 +0000 (09:45 -0800)
net/ipv4/esp.c

index 09c8abd6aa8c6f07d2aa4783388ea8dc493c76e0..c330d4c21cac3501f1dc60b00629c16aed7c5b55 100644 (file)
@@ -360,7 +360,7 @@ int esp_output(struct sk_buff *skb)
        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);