summaryrefslogtreecommitdiffstats
path: root/kernel/linux
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/linux')
-rw-r--r--kernel/linux/net/bridge/netfilter/ebtables.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/linux/net/bridge/netfilter/ebtables.c b/kernel/linux/net/bridge/netfilter/ebtables.c
index 6e27946..22daedd 100644
--- a/kernel/linux/net/bridge/netfilter/ebtables.c
+++ b/kernel/linux/net/bridge/netfilter/ebtables.c
@@ -1279,12 +1279,13 @@ static inline int ebt_make_watchername(struct ebt_entry_watcher *w,
static inline int ebt_make_names(struct ebt_entry *e, char *base, char *ubase)
{
int ret;
- char *hlp = ubase - base + (char *)e + e->target_offset;
+ char *hlp;
struct ebt_entry_target *t;
if ((e->bitmask & EBT_ENTRY_OR_ENTRIES) == 0)
return 0;
+ hlp = ubase - base + (char *)e + e->target_offset;
t = (struct ebt_entry_target *)(((char *)e) + e->target_offset);
ret = EBT_MATCH_ITERATE(e, ebt_make_matchname, base, ubase);
@@ -1369,10 +1370,6 @@ static int copy_everything_to_user(struct ebt_table *t, void *user,
BUGPRINT("Couldn't copy entries to userspace\n");
return -EFAULT;
}
- if (copy_to_user(user, &tmp, sizeof(struct ebt_replace))) {
- BUGPRINT("Couldn't copy ebt_replace to userspace\n");
- return -EFAULT;
- }
// set the match/watcher/target names right
return EBT_ENTRY_ITERATE(entries, entries_size,
ebt_make_names, entries, tmp.entries);