summaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_state.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-11-25 00:29:52 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-25 15:48:38 -0800
commit4447bb33f09444920a8f1d89e1540137429351b6 (patch)
tree0aeadd5f09b412380974d3155255ba8db27dd1ed /net/xfrm/xfrm_state.c
parent4e242d1616781f9f1f0b01abf878700b259cd8b5 (diff)
downloadlinux-4447bb33f09444920a8f1d89e1540137429351b6.tar.gz
linux-4447bb33f09444920a8f1d89e1540137429351b6.tar.bz2
linux-4447bb33f09444920a8f1d89e1540137429351b6.zip
xfrm: Store aalg in xfrm_state with a user specified truncation length
Adding a xfrm_state requires an authentication algorithm specified either as xfrm_algo or as xfrm_algo_auth with a specific truncation length. For compatibility, both attributes are dumped to userspace, and we also accept both attributes, but prefer the new syntax. If no truncation length is specified, or the authentication algorithm is specified using xfrm_algo, the truncation length from the algorithm description in the kernel is used. Signed-off-by: Martin Willi <martin@strongswan.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_state.c')
-rw-r--r--net/xfrm/xfrm_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index e9ac0cec0877..d847f1a52b44 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1114,7 +1114,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp)
x->props.saddr = orig->props.saddr;
if (orig->aalg) {
- x->aalg = xfrm_algo_clone(orig->aalg);
+ x->aalg = xfrm_algo_auth_clone(orig->aalg);
if (!x->aalg)
goto error;
}