Commit 6f48c4da authored by John Williams Floroiu's avatar John Williams Floroiu Committed by David S. Miller

[IPSEC]: Missing family settings in af_key and xfrm_user.

parent a76ec104
...@@ -1879,6 +1879,7 @@ static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h ...@@ -1879,6 +1879,7 @@ static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h
err = -EINVAL; err = -EINVAL;
goto out; goto out;
} }
xp->selector.family = xp->family;
xp->selector.prefixlen_s = sa->sadb_address_prefixlen; xp->selector.prefixlen_s = sa->sadb_address_prefixlen;
xp->selector.proto = pfkey_proto_to_xfrm(sa->sadb_address_proto); xp->selector.proto = pfkey_proto_to_xfrm(sa->sadb_address_proto);
xp->selector.sport = ((struct sockaddr_in *)(sa+1))->sin_port; xp->selector.sport = ((struct sockaddr_in *)(sa+1))->sin_port;
......
...@@ -674,6 +674,7 @@ static int copy_to_user_tmpl(struct xfrm_policy *xp, struct sk_buff *skb) ...@@ -674,6 +674,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;
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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment