Skip to content

Commit

Permalink
[XFRM]: Algorithm lookup using .compat name
Browse files Browse the repository at this point in the history
Installing an IPsec SA using old algorithm names (.compat) does not work
if the algorithm is not already loaded. When not using the PF_KEY
interface, algorithms are not preloaded in xfrm_probe_algs() and
installing a IPsec SA fails.

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>
  • Loading branch information
Martin Willi authored and David S. Miller committed Dec 31, 2006
1 parent cb4db4c commit b836267
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/xfrm/xfrm_algo.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ static struct xfrm_algo_desc *xfrm_get_byname(struct xfrm_algo_desc *list,
if (!probe)
break;

status = crypto_has_alg(name, type, mask | CRYPTO_ALG_ASYNC);
status = crypto_has_alg(list[i].name, type,
mask | CRYPTO_ALG_ASYNC);
if (!status)
break;

Expand Down

0 comments on commit b836267

Please sign in to comment.