Commit 5ec5e62a authored by Joy Latten's avatar Joy Latten Committed by David S. Miller

[IPSEC]: Make sure ESP output pads Null Encryption properly.

parent 897dde23
...@@ -360,7 +360,7 @@ int esp_output(struct sk_buff *skb) ...@@ -360,7 +360,7 @@ int esp_output(struct sk_buff *skb)
esp = x->data; esp = x->data;
alen = esp->auth.icv_trunc_len; alen = esp->auth.icv_trunc_len;
tfm = esp->conf.tfm; 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); clen = (clen + 2 + blksize-1)&~(blksize-1);
if (esp->conf.padlen) if (esp->conf.padlen)
clen = (clen + esp->conf.padlen-1)&~(esp->conf.padlen-1); clen = (clen + esp->conf.padlen-1)&~(esp->conf.padlen-1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment