Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78499
b: refs/heads/master
c: 30c08c4
h: refs/heads/master
i:
  78497: ade33e9
  78495: de5f445
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jan 28, 2008
1 parent 5ab6e40 commit dbe08ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 89c002d66aafab93814b38d8dae43fa50aec390a
refs/heads/master: 30c08c41be75145b8850ea14b2d5ee4ee4b705d8
8 changes: 6 additions & 2 deletions trunk/net/ipv4/netfilter/ip_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ static int compat_calc_entry(struct ipt_entry *e,
unsigned int entry_offset;
int off, i, ret;

off = 0;
off = sizeof(struct ipt_entry) - sizeof(struct compat_ipt_entry);
entry_offset = (void *)e - base;
IPT_MATCH_ITERATE(e, compat_calc_match, &off);
t = ipt_get_target(e);
Expand Down Expand Up @@ -1501,6 +1501,8 @@ compat_copy_entry_to_user(struct ipt_entry *e, void __user **dstptr,
goto out;

*dstptr += sizeof(struct compat_ipt_entry);
*size -= sizeof(struct ipt_entry) - sizeof(struct compat_ipt_entry);

ret = IPT_MATCH_ITERATE(e, xt_compat_match_to_user, dstptr, size);
target_offset = e->target_offset - (origsize - *size);
if (ret)
Expand Down Expand Up @@ -1605,7 +1607,7 @@ check_compat_entry_size_and_hooks(struct ipt_entry *e,
if (ret)
return ret;

off = 0;
off = sizeof(struct ipt_entry) - sizeof(struct compat_ipt_entry);
entry_offset = (void *)e - (void *)base;
j = 0;
ret = IPT_MATCH_ITERATE(e, compat_find_calc_match, name, &e->ip,
Expand Down Expand Up @@ -1671,6 +1673,8 @@ compat_copy_entry_from_user(struct ipt_entry *e, void **dstptr,
memcpy(de, e, sizeof(struct ipt_entry));

*dstptr += sizeof(struct compat_ipt_entry);
*size += sizeof(struct ipt_entry) - sizeof(struct compat_ipt_entry);

ret = IPT_MATCH_ITERATE(e, xt_compat_match_from_user, dstptr, size);
if (ret)
return ret;
Expand Down

0 comments on commit dbe08ae

Please sign in to comment.