aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-12-29 00:27:48 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-31 17:06:51 -0500
commitb836267aa79c1c5e23e00d9cec047b6870ae0db1 (patch)
treec66b785335c0ed1eb116c743aa5d3910e63ebe0a
parentcb4db4c22182163f66325053331a4e7096f663cd (diff)
[XFRM]: Algorithm lookup using .compat name
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>
-rw-r--r--net/xfrm/xfrm_algo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index 6b381fc0383d..f1cf3402e75c 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -399,7 +399,8 @@ static struct xfrm_algo_desc *xfrm_get_byname(struct xfrm_algo_desc *list,
399 if (!probe) 399 if (!probe)
400 break; 400 break;
401 401
402 status = crypto_has_alg(name, type, mask | CRYPTO_ALG_ASYNC); 402 status = crypto_has_alg(list[i].name, type,
403 mask | CRYPTO_ALG_ASYNC);
403 if (!status) 404 if (!status)
404 break; 405 break;
405 406