From: Martin Willi Date: Fri, 29 Dec 2006 05:27:48 +0000 (-0800) Subject: [XFRM]: Algorithm lookup using .compat name X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=b836267aa79c1c5e23e00d9cec047b6870ae0db1;p=deliverable%2Flinux.git [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 Acked-by: Herbert Xu Signed-off-by: David S. Miller --- 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;