summaryrefslogtreecommitdiff
path: root/net/xfrm/xfrm_algo.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-08-13 02:50:00 +0400
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-21 05:46:14 +0400
commit04ff12609445c7b462d7fc7f2d30dad442c922f3 (patch)
treef19aff48d2e6a4c7e4bf25044c1b30ea428f4318 /net/xfrm/xfrm_algo.c
parentd1806f6a97a536b043fe50e6d8a25b061755cf50 (diff)
downloadlinux-04ff12609445c7b462d7fc7f2d30dad442c922f3.tar.xz
[IPSEC]: Add compatibility algorithm name support
This patch adds a compatibility name field for each IPsec algorithm. This is needed when parameterised algorithms are used. For example, "md5" will become "hmac(md5)", and "aes" will become "cbc(aes)". Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'net/xfrm/xfrm_algo.c')
-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 04e1aea58bc9..b68974b38741 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -359,7 +359,8 @@ static struct xfrm_algo_desc *xfrm_get_byname(struct xfrm_algo_desc *list,
return NULL;
for (i = 0; i < entries; i++) {
- if (strcmp(name, list[i].name))
+ if (strcmp(name, list[i].name) &&
+ (!list[i].compat || strcmp(name, list[i].compat)))
continue;
if (list[i].available)