summaryrefslogtreecommitdiff
path: root/net/xfrm
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-12-28 21:27:48 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-31 14:06:51 -0800
commitb836267aa79c1c5e23e00d9cec047b6870ae0db1 (patch)
treec66b785335c0ed1eb116c743aa5d3910e63ebe0a /net/xfrm
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>
Diffstat (limited to 'net/xfrm')
-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,
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;