aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-30 22:27:13 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:32:01 -0500
commit0e795531c5e6d0a7d407b8d9edde47cab13be3ec (patch)
treebc3a6008eadebb08f0498400c6dbc631cf178b19 /net/bridge
parent1f072c96fdf1a0caa11c6e8078dd96925bd02db5 (diff)
[EBTABLES]: Switch ebt_check_entry_size_and_hooks() to use of newinfo->hook_entry[]
kill unused arguments Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/netfilter/ebtables.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 3e1bf716509a..ec7709b5c568 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -464,17 +464,14 @@ static int ebt_verify_pointers(struct ebt_replace *repl,
464 */ 464 */
465static inline int 465static inline int
466ebt_check_entry_size_and_hooks(struct ebt_entry *e, 466ebt_check_entry_size_and_hooks(struct ebt_entry *e,
467 struct ebt_table_info *newinfo, char *base, 467 struct ebt_table_info *newinfo,
468 struct ebt_entries **hook_entries, unsigned int *n, unsigned int *cnt, 468 unsigned int *n, unsigned int *cnt,
469 unsigned int *totalcnt, unsigned int *udc_cnt, unsigned int valid_hooks) 469 unsigned int *totalcnt, unsigned int *udc_cnt)
470{ 470{
471 unsigned int offset = (char *)e - newinfo->entries;
472 int i; 471 int i;
473 472
474 for (i = 0; i < NF_BR_NUMHOOKS; i++) { 473 for (i = 0; i < NF_BR_NUMHOOKS; i++) {
475 if ((valid_hooks & (1 << i)) == 0) 474 if ((void *)e == (void *)newinfo->hook_entry[i])
476 continue;
477 if ((char *)hook_entries[i] == base + offset)
478 break; 475 break;
479 } 476 }
480 /* beginning of a new chain 477 /* beginning of a new chain
@@ -821,9 +818,8 @@ static int translate_table(struct ebt_replace *repl,
821 newinfo->nentries afterwards */ 818 newinfo->nentries afterwards */
822 udc_cnt = 0; /* will hold the nr. of user defined chains (udc) */ 819 udc_cnt = 0; /* will hold the nr. of user defined chains (udc) */
823 ret = EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size, 820 ret = EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size,
824 ebt_check_entry_size_and_hooks, newinfo, repl->entries, 821 ebt_check_entry_size_and_hooks, newinfo,
825 repl->hook_entry, &i, &j, &k, 822 &i, &j, &k, &udc_cnt);
826 &udc_cnt, repl->valid_hooks);
827 823
828 if (ret != 0) 824 if (ret != 0)
829 return ret; 825 return ret;