Skip to content

Commit

Permalink
xfrm: Fix truncation length of authentication algorithms installed vi…
Browse files Browse the repository at this point in the history
…a PF_KEY

Commit 4447bb3 ("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 <[email protected]>
Acked-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
martinwilli authored and davem330 committed Dec 11, 2009
1 parent de039f0 commit c20a66f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net,
x->aalg->alg_key_len = key->sadb_key_bits;
memcpy(x->aalg->alg_key, key+1, keysize);
}
x->aalg->alg_trunc_len = a->uinfo.auth.icv_truncbits;
x->props.aalgo = sa->sadb_sa_auth;
/* x->algo.flags = sa->sadb_sa_flags; */
}
Expand Down

0 comments on commit c20a66f

Please sign in to comment.