diff options
author | Martin Willi <martin@strongswan.org> | 2009-12-09 01:11:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-11 18:07:57 -0500 |
commit | c20a66f474e890dd8cc34e124632cd85e4165899 (patch) | |
tree | e311e92cf7de876e9b8c2b9ab4103d31fde63f18 | |
parent | de039f02d877af52b8d0fe77878b8343a0f99d8b (diff) |
xfrm: Fix truncation length of authentication algorithms installed via PF_KEY
Commit 4447bb33f09444920a8f1d89e1540137429351b6 ("xfrm: Store aalg in
xfrm_state with a user specified truncation length") breaks
installation of authentication algorithms via PF_KEY, as the state
specific truncation length is not installed with the algorithms
default truncation length. This patch initializes state properly to
the default if installed via PF_KEY.
Signed-off-by: Martin Willi <martin@strongswan.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/key/af_key.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 84209fbbeb17..76fa6fef6473 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -1193,6 +1193,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net, | |||
1193 | x->aalg->alg_key_len = key->sadb_key_bits; | 1193 | x->aalg->alg_key_len = key->sadb_key_bits; |
1194 | memcpy(x->aalg->alg_key, key+1, keysize); | 1194 | memcpy(x->aalg->alg_key, key+1, keysize); |
1195 | } | 1195 | } |
1196 | x->aalg->alg_trunc_len = a->uinfo.auth.icv_truncbits; | ||
1196 | x->props.aalgo = sa->sadb_sa_auth; | 1197 | x->props.aalgo = sa->sadb_sa_auth; |
1197 | /* x->algo.flags = sa->sadb_sa_flags; */ | 1198 | /* x->algo.flags = sa->sadb_sa_flags; */ |
1198 | } | 1199 | } |