Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41788
b: refs/heads/master
c: 1459bb3
h: refs/heads/master
v: v3
  • Loading branch information
Jamal Hadi Salim authored and David S. Miller committed Dec 3, 2006
1 parent 744f63d commit a276168
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 746859625d879688adb99f1e5e8108fea876d369
refs/heads/master: 1459bb36b12ac52bde68d70e2ba7a6f1f2e8be17
14 changes: 7 additions & 7 deletions trunk/net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,12 +1083,12 @@ static inline int copy_to_user_sec_ctx(struct xfrm_policy *xp, struct sk_buff *s
}

#ifdef CONFIG_XFRM_SUB_POLICY
static int copy_to_user_policy_type(struct xfrm_policy *xp, struct sk_buff *skb)
static int copy_to_user_policy_type(__u8 type, struct sk_buff *skb)
{
struct xfrm_userpolicy_type upt;

memset(&upt, 0, sizeof(upt));
upt.type = xp->type;
upt.type = type;

RTA_PUT(skb, XFRMA_POLICY_TYPE, sizeof(upt), &upt);

Expand All @@ -1099,7 +1099,7 @@ static int copy_to_user_policy_type(struct xfrm_policy *xp, struct sk_buff *skb)
}

#else
static inline int copy_to_user_policy_type(struct xfrm_policy *xp, struct sk_buff *skb)
static inline int copy_to_user_policy_type(__u8 type, struct sk_buff *skb)
{
return 0;
}
Expand Down Expand Up @@ -1128,7 +1128,7 @@ static int dump_one_policy(struct xfrm_policy *xp, int dir, int count, void *ptr
goto nlmsg_failure;
if (copy_to_user_sec_ctx(xp, skb))
goto nlmsg_failure;
if (copy_to_user_policy_type(xp, skb) < 0)
if (copy_to_user_policy_type(xp->type, skb) < 0)
goto nlmsg_failure;

nlh->nlmsg_len = skb->tail - b;
Expand Down Expand Up @@ -1908,7 +1908,7 @@ static int build_acquire(struct sk_buff *skb, struct xfrm_state *x,
goto nlmsg_failure;
if (copy_to_user_state_sec_ctx(x, skb))
goto nlmsg_failure;
if (copy_to_user_policy_type(xp, skb) < 0)
if (copy_to_user_policy_type(xp->type, skb) < 0)
goto nlmsg_failure;

nlh->nlmsg_len = skb->tail - b;
Expand Down Expand Up @@ -2018,7 +2018,7 @@ static int build_polexpire(struct sk_buff *skb, struct xfrm_policy *xp,
goto nlmsg_failure;
if (copy_to_user_sec_ctx(xp, skb))
goto nlmsg_failure;
if (copy_to_user_policy_type(xp, skb) < 0)
if (copy_to_user_policy_type(xp->type, skb) < 0)
goto nlmsg_failure;
upe->hard = !!hard;

Expand Down Expand Up @@ -2097,7 +2097,7 @@ static int xfrm_notify_policy(struct xfrm_policy *xp, int dir, struct km_event *
copy_to_user_policy(xp, p, dir);
if (copy_to_user_tmpl(xp, skb) < 0)
goto nlmsg_failure;
if (copy_to_user_policy_type(xp, skb) < 0)
if (copy_to_user_policy_type(xp->type, skb) < 0)
goto nlmsg_failure;

nlh->nlmsg_len = skb->tail - b;
Expand Down

0 comments on commit a276168

Please sign in to comment.