|
@@ -2567,8 +2567,7 @@ static inline size_t xfrm_acquire_msgsize(struct xfrm_state *x,
|
|
}
|
|
}
|
|
|
|
|
|
static int build_acquire(struct sk_buff *skb, struct xfrm_state *x,
|
|
static int build_acquire(struct sk_buff *skb, struct xfrm_state *x,
|
|
- struct xfrm_tmpl *xt, struct xfrm_policy *xp,
|
|
|
|
- int dir)
|
|
|
|
|
|
+ struct xfrm_tmpl *xt, struct xfrm_policy *xp)
|
|
{
|
|
{
|
|
__u32 seq = xfrm_get_acqseq();
|
|
__u32 seq = xfrm_get_acqseq();
|
|
struct xfrm_user_acquire *ua;
|
|
struct xfrm_user_acquire *ua;
|
|
@@ -2583,7 +2582,7 @@ static int build_acquire(struct sk_buff *skb, struct xfrm_state *x,
|
|
memcpy(&ua->id, &x->id, sizeof(ua->id));
|
|
memcpy(&ua->id, &x->id, sizeof(ua->id));
|
|
memcpy(&ua->saddr, &x->props.saddr, sizeof(ua->saddr));
|
|
memcpy(&ua->saddr, &x->props.saddr, sizeof(ua->saddr));
|
|
memcpy(&ua->sel, &x->sel, sizeof(ua->sel));
|
|
memcpy(&ua->sel, &x->sel, sizeof(ua->sel));
|
|
- copy_to_user_policy(xp, &ua->policy, dir);
|
|
|
|
|
|
+ copy_to_user_policy(xp, &ua->policy, XFRM_POLICY_OUT);
|
|
ua->aalgos = xt->aalgos;
|
|
ua->aalgos = xt->aalgos;
|
|
ua->ealgos = xt->ealgos;
|
|
ua->ealgos = xt->ealgos;
|
|
ua->calgos = xt->calgos;
|
|
ua->calgos = xt->calgos;
|
|
@@ -2605,7 +2604,7 @@ static int build_acquire(struct sk_buff *skb, struct xfrm_state *x,
|
|
}
|
|
}
|
|
|
|
|
|
static int xfrm_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *xt,
|
|
static int xfrm_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *xt,
|
|
- struct xfrm_policy *xp, int dir)
|
|
|
|
|
|
+ struct xfrm_policy *xp)
|
|
{
|
|
{
|
|
struct net *net = xs_net(x);
|
|
struct net *net = xs_net(x);
|
|
struct sk_buff *skb;
|
|
struct sk_buff *skb;
|
|
@@ -2614,7 +2613,7 @@ static int xfrm_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *xt,
|
|
if (skb == NULL)
|
|
if (skb == NULL)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
|
|
- if (build_acquire(skb, x, xt, xp, dir) < 0)
|
|
|
|
|
|
+ if (build_acquire(skb, x, xt, xp) < 0)
|
|
BUG();
|
|
BUG();
|
|
|
|
|
|
return nlmsg_multicast(net->xfrm.nlsk, skb, 0, XFRMNLGRP_ACQUIRE, GFP_ATOMIC);
|
|
return nlmsg_multicast(net->xfrm.nlsk, skb, 0, XFRMNLGRP_ACQUIRE, GFP_ATOMIC);
|