mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[NETFILTER]: x_tables: make xt_compat_match_from_user usable in iterator macros
Make xt_compat_match_from_user return an int to make it usable in the *tables iterator macros and kill a now unnecessary wrapper function. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
4b4782486d
commit
8956695131
3 changed files with 6 additions and 16 deletions
|
|
@ -1654,16 +1654,6 @@ release_matches:
|
|||
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,
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue