提交 8511d01d 编写于 作者: M Miika Komu 提交者: David S. Miller

[IPSEC]: Add netlink interface for the encapsulation family.

Signed-off-by: NMiika Komu <miika@iki.fi>
Signed-off-by: NDiego Beltrami <Diego.Beltrami@hiit.fi>
Signed-off-by: NKazunori Miyazawa <miyazawa@linux-ipv6.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 76b3f055
...@@ -858,6 +858,7 @@ static void copy_templates(struct xfrm_policy *xp, struct xfrm_user_tmpl *ut, ...@@ -858,6 +858,7 @@ static void copy_templates(struct xfrm_policy *xp, struct xfrm_user_tmpl *ut,
int i; int i;
xp->xfrm_nr = nr; xp->xfrm_nr = nr;
xp->family = ut->family;
for (i = 0; i < nr; i++, ut++) { for (i = 0; i < nr; i++, ut++) {
struct xfrm_tmpl *t = &xp->xfrm_vec[i]; struct xfrm_tmpl *t = &xp->xfrm_vec[i];
...@@ -871,6 +872,7 @@ static void copy_templates(struct xfrm_policy *xp, struct xfrm_user_tmpl *ut, ...@@ -871,6 +872,7 @@ static void copy_templates(struct xfrm_policy *xp, struct xfrm_user_tmpl *ut,
t->aalgos = ut->aalgos; t->aalgos = ut->aalgos;
t->ealgos = ut->ealgos; t->ealgos = ut->ealgos;
t->calgos = ut->calgos; t->calgos = ut->calgos;
t->encap_family = ut->family;
} }
} }
...@@ -1024,7 +1026,7 @@ static int copy_to_user_tmpl(struct xfrm_policy *xp, struct sk_buff *skb) ...@@ -1024,7 +1026,7 @@ static int copy_to_user_tmpl(struct xfrm_policy *xp, struct sk_buff *skb)
struct xfrm_tmpl *kp = &xp->xfrm_vec[i]; struct xfrm_tmpl *kp = &xp->xfrm_vec[i];
memcpy(&up->id, &kp->id, sizeof(up->id)); memcpy(&up->id, &kp->id, sizeof(up->id));
up->family = xp->family; up->family = kp->encap_family;
memcpy(&up->saddr, &kp->saddr, sizeof(up->saddr)); memcpy(&up->saddr, &kp->saddr, sizeof(up->saddr));
up->reqid = kp->reqid; up->reqid = kp->reqid;
up->mode = kp->mode; up->mode = kp->mode;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册