diff options
Diffstat (limited to 'kernel/ipt_CRYPT.c')
-rw-r--r-- | kernel/ipt_CRYPT.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/ipt_CRYPT.c b/kernel/ipt_CRYPT.c index c4a2daf..68b5784 100644 --- a/kernel/ipt_CRYPT.c +++ b/kernel/ipt_CRYPT.c @@ -98,6 +98,11 @@ static unsigned int ipt_CRYPT_target(struct sk_buff **pskb, unsigned int hooknum // Copy the IV seppl_copy_iv(ti->key, iv); + // Encrypt to make it randomish + sg[0].page = virt_to_page((void*) iv); + sg[0].offset = (((long) (void *) iv) & ~PAGE_MASK); + sg[0].length = ivs; + crypto_cipher_encrypt(ti->key->tfm_ecb, sg, sg, sg[0].length ); // Fill the crypted header ch->ident = 0x00; |