Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78497
b: refs/heads/master
c: 8956695
h: refs/heads/master
i:
  78495: de5f445
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jan 28, 2008
1 parent 250771c commit ade33e9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 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: 4b4782486d49547bc589b64acfb956bda05f0fca
refs/heads/master: 8956695131b8a7878891667469899d667eb5892b
4 changes: 2 additions & 2 deletions trunk/include/linux/netfilter/x_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ extern void xt_compat_lock(int af);
extern void xt_compat_unlock(int af);

extern int xt_compat_match_offset(struct xt_match *match);
extern void xt_compat_match_from_user(struct xt_entry_match *m,
void **dstptr, int *size);
extern int xt_compat_match_from_user(struct xt_entry_match *m,
void **dstptr, int *size);
extern int xt_compat_match_to_user(struct xt_entry_match *m,
void __user **dstptr, int *size);

Expand Down
13 changes: 1 addition & 12 deletions trunk/net/ipv4/netfilter/ip_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -1654,16 +1654,6 @@ check_compat_entry_size_and_hooks(struct ipt_entry *e,
return ret;
}

static inline int
compat_copy_match_from_user(struct ipt_entry_match *m,
void **dstptr, compat_uint_t *size,
const char *name, const struct ipt_ip *ip,
unsigned int hookmask)
{
xt_compat_match_from_user(m, dstptr, size);
return 0;
}

static int
compat_copy_entry_from_user(struct ipt_entry *e, void **dstptr,
unsigned int *size, const char *name,
Expand All @@ -1681,8 +1671,7 @@ compat_copy_entry_from_user(struct ipt_entry *e, void **dstptr,
memcpy(de, e, sizeof(struct ipt_entry));

*dstptr += sizeof(struct compat_ipt_entry);
ret = IPT_MATCH_ITERATE(e, compat_copy_match_from_user, dstptr, size,
name, &de->ip, de->comefrom);
ret = IPT_MATCH_ITERATE(e, xt_compat_match_from_user, dstptr, size);
if (ret)
return ret;
de->target_offset = e->target_offset - (origsize - *size);
Expand Down
5 changes: 3 additions & 2 deletions trunk/net/netfilter/x_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ int xt_compat_match_offset(struct xt_match *match)
}
EXPORT_SYMBOL_GPL(xt_compat_match_offset);

void xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr,
int *size)
int xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr,
int *size)
{
struct xt_match *match = m->u.kernel.match;
struct compat_xt_entry_match *cm = (struct compat_xt_entry_match *)m;
Expand All @@ -365,6 +365,7 @@ void xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr,

*size += off;
*dstptr += msize;
return 0;
}
EXPORT_SYMBOL_GPL(xt_compat_match_from_user);

Expand Down

0 comments on commit ade33e9

Please sign in to comment.