Commit 0e795531 authored by Al Viro's avatar Al Viro Committed by David S. Miller

[EBTABLES]: Switch ebt_check_entry_size_and_hooks() to use of newinfo->hook_entry[]

kill unused arguments
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1f072c96
...@@ -464,17 +464,14 @@ static int ebt_verify_pointers(struct ebt_replace *repl, ...@@ -464,17 +464,14 @@ static int ebt_verify_pointers(struct ebt_replace *repl,
*/ */
static inline int static inline int
ebt_check_entry_size_and_hooks(struct ebt_entry *e, ebt_check_entry_size_and_hooks(struct ebt_entry *e,
struct ebt_table_info *newinfo, char *base, struct ebt_table_info *newinfo,
struct ebt_entries **hook_entries, unsigned int *n, unsigned int *cnt, unsigned int *n, unsigned int *cnt,
unsigned int *totalcnt, unsigned int *udc_cnt, unsigned int valid_hooks) unsigned int *totalcnt, unsigned int *udc_cnt)
{ {
unsigned int offset = (char *)e - newinfo->entries;
int i; int i;
for (i = 0; i < NF_BR_NUMHOOKS; i++) { for (i = 0; i < NF_BR_NUMHOOKS; i++) {
if ((valid_hooks & (1 << i)) == 0) if ((void *)e == (void *)newinfo->hook_entry[i])
continue;
if ((char *)hook_entries[i] == base + offset)
break; break;
} }
/* beginning of a new chain /* beginning of a new chain
...@@ -821,9 +818,8 @@ static int translate_table(struct ebt_replace *repl, ...@@ -821,9 +818,8 @@ static int translate_table(struct ebt_replace *repl,
newinfo->nentries afterwards */ newinfo->nentries afterwards */
udc_cnt = 0; /* will hold the nr. of user defined chains (udc) */ udc_cnt = 0; /* will hold the nr. of user defined chains (udc) */
ret = EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size, ret = EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size,
ebt_check_entry_size_and_hooks, newinfo, repl->entries, ebt_check_entry_size_and_hooks, newinfo,
repl->hook_entry, &i, &j, &k, &i, &j, &k, &udc_cnt);
&udc_cnt, repl->valid_hooks);
if (ret != 0) if (ret != 0)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment