aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiika Komu <miika@iki.fi>2006-11-30 19:40:51 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:31:49 -0500
commit8511d01d7c70200ffd42debba9d7ac5c4f7f1031 (patch)
tree899ccc5c0eeb63c39ec90781fd3994d62ddd8bb8
parent76b3f055f38954c67dab13844eb92203580038f8 (diff)
[IPSEC]: Add netlink interface for the encapsulation family.
Signed-off-by: Miika Komu <miika@iki.fi> Signed-off-by: Diego Beltrami <Diego.Beltrami@hiit.fi> Signed-off-by: Kazunori Miyazawa <miyazawa@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/xfrm/xfrm_user.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 6b461da0b51c..055b72fb37bc 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -858,6 +858,7 @@ static void copy_templates(struct xfrm_policy *xp, struct xfrm_user_tmpl *ut,
858 int i; 858 int i;
859 859
860 xp->xfrm_nr = nr; 860 xp->xfrm_nr = nr;
861 xp->family = ut->family;
861 for (i = 0; i < nr; i++, ut++) { 862 for (i = 0; i < nr; i++, ut++) {
862 struct xfrm_tmpl *t = &xp->xfrm_vec[i]; 863 struct xfrm_tmpl *t = &xp->xfrm_vec[i];
863 864
@@ -871,6 +872,7 @@ static void copy_templates(struct xfrm_policy *xp, struct xfrm_user_tmpl *ut,
871 t->aalgos = ut->aalgos; 872 t->aalgos = ut->aalgos;
872 t->ealgos = ut->ealgos; 873 t->ealgos = ut->ealgos;
873 t->calgos = ut->calgos; 874 t->calgos = ut->calgos;
875 t->encap_family = ut->family;
874 } 876 }
875} 877}
876 878
@@ -1024,7 +1026,7 @@ static int copy_to_user_tmpl(struct xfrm_policy *xp, struct sk_buff *skb)
1024 struct xfrm_tmpl *kp = &xp->xfrm_vec[i]; 1026 struct xfrm_tmpl *kp = &xp->xfrm_vec[i];
1025 1027
1026 memcpy(&up->id, &kp->id, sizeof(up->id)); 1028 memcpy(&up->id, &kp->id, sizeof(up->id));
1027 up->family = xp->family; 1029 up->family = kp->encap_family;
1028 memcpy(&up->saddr, &kp->saddr, sizeof(up->saddr)); 1030 memcpy(&up->saddr, &kp->saddr, sizeof(up->saddr));
1029 up->reqid = kp->reqid; 1031 up->reqid = kp->reqid;
1030 up->mode = kp->mode; 1032 up->mode = kp->mode;