aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/xfrm.h1
-rw-r--r--net/xfrm/xfrm_algo.c3
-rw-r--r--net/xfrm/xfrm_user.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 10396b4bde14..e9114e41affc 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -854,6 +854,7 @@ struct xfrm_algo_comp_info {
854 854
855struct xfrm_algo_desc { 855struct xfrm_algo_desc {
856 char *name; 856 char *name;
857 char *compat;
857 u8 available:1; 858 u8 available:1;
858 union { 859 union {
859 struct xfrm_algo_auth_info auth; 860 struct xfrm_algo_auth_info auth;
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,
359 return NULL; 359 return NULL;
360 360
361 for (i = 0; i < entries; i++) { 361 for (i = 0; i < entries; i++) {
362 if (strcmp(name, list[i].name)) 362 if (strcmp(name, list[i].name) &&
363 (!list[i].compat || strcmp(name, list[i].compat)))
363 continue; 364 continue;
364 365
365 if (list[i].available) 366 if (list[i].available)
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 7d18ca03c80d..fa79ddc4239e 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -213,6 +213,7 @@ static int attach_one_algo(struct xfrm_algo **algpp, u8 *props,
213 return -ENOMEM; 213 return -ENOMEM;
214 214
215 memcpy(p, ualg, len); 215 memcpy(p, ualg, len);
216 strcpy(p->alg_name, algo->name);
216 *algpp = p; 217 *algpp = p;
217 return 0; 218 return 0;
218} 219}