summaryrefslogtreecommitdiff
path: root/net/ipv6/ah6.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-11-25 03:29:53 +0300
committerDavid S. Miller <davem@davemloft.net>2009-11-26 02:48:41 +0300
commit8f8a088c2127c729638da8f2d33860e346c01eda (patch)
treed5b81f8d1cc22d3fffbcb049c55dcc9499eb4e04 /net/ipv6/ah6.c
parent4447bb33f09444920a8f1d89e1540137429351b6 (diff)
downloadlinux-8f8a088c2127c729638da8f2d33860e346c01eda.tar.xz
xfrm: Use the user specified truncation length in ESP and AH
Instead of using the hardcoded truncation for authentication algorithms, use the truncation length specified on xfrm_state. Signed-off-by: Martin Willi <martin@strongswan.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ah6.c')
-rw-r--r--net/ipv6/ah6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index 0f526f8ea518..c2f300c314be 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -667,7 +667,7 @@ static int ah6_init_state(struct xfrm_state *x)
}
ahp->icv_full_len = aalg_desc->uinfo.auth.icv_fullbits/8;
- ahp->icv_trunc_len = aalg_desc->uinfo.auth.icv_truncbits/8;
+ ahp->icv_trunc_len = x->aalg->alg_trunc_len/8;
BUG_ON(ahp->icv_trunc_len > MAX_AH_AUTH_LEN);