summaryrefslogtreecommitdiffstats
path: root/kernel/linux/net/bridge/netfilter/ebtables.c
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2002-08-16 19:45:08 +0000
committerBart De Schuymer <bdschuym@pandora.be>2002-08-16 19:45:08 +0000
commit904bebc0d11429b45f77496be34789b4a70f4b49 (patch)
tree481b6ba807843924e90aa73c56b5f753b4ecd53a /kernel/linux/net/bridge/netfilter/ebtables.c
parent91700a08acd8f20f3e30a338993909c605e26487 (diff)
fix "bug" + remove unnecessary code
Diffstat (limited to 'kernel/linux/net/bridge/netfilter/ebtables.c')
-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);