xfrm: Use the user specified truncation length in ESP and AH
[pandora-kernel.git] / net / ipv4 / esp4.c
index 12f7287..1948895 100644 (file)
@@ -530,7 +530,7 @@ static int esp_init_authenc(struct xfrm_state *x)
                }
 
                err = crypto_aead_setauthsize(
-                       aead, aalg_desc->uinfo.auth.icv_truncbits / 8);
+                       aead, x->aalg->alg_trunc_len / 8);
                if (err)
                        goto free_key;
        }