aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bridge/netfilter/ebtables.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 4d1cf1492ca..c4f10b8865a 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -603,7 +603,7 @@ ebt_cleanup_entry(struct ebt_entry *e, unsigned int *cnt)
603 603
604static inline int 604static inline int
605ebt_check_entry(struct ebt_entry *e, struct ebt_table_info *newinfo, 605ebt_check_entry(struct ebt_entry *e, struct ebt_table_info *newinfo,
606 const char *name, unsigned int *cnt, unsigned int valid_hooks, 606 const char *name, unsigned int *cnt,
607 struct ebt_cl_stack *cl_s, unsigned int udc_cnt) 607 struct ebt_cl_stack *cl_s, unsigned int udc_cnt)
608{ 608{
609 struct ebt_entry_target *t; 609 struct ebt_entry_target *t;
@@ -630,7 +630,7 @@ ebt_check_entry(struct ebt_entry *e, struct ebt_table_info *newinfo,
630 } 630 }
631 /* what hook do we belong to? */ 631 /* what hook do we belong to? */
632 for (i = 0; i < NF_BR_NUMHOOKS; i++) { 632 for (i = 0; i < NF_BR_NUMHOOKS; i++) {
633 if ((valid_hooks & (1 << i)) == 0) 633 if (!newinfo->hook_entry[i])
634 continue; 634 continue;
635 if ((char *)newinfo->hook_entry[i] < (char *)e) 635 if ((char *)newinfo->hook_entry[i] < (char *)e)
636 hook = i; 636 hook = i;
@@ -889,8 +889,7 @@ static int translate_table(struct ebt_replace *repl,
889 /* used to know what we need to clean up if something goes wrong */ 889 /* used to know what we need to clean up if something goes wrong */
890 i = 0; 890 i = 0;
891 ret = EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size, 891 ret = EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size,
892 ebt_check_entry, newinfo, repl->name, &i, repl->valid_hooks, 892 ebt_check_entry, newinfo, repl->name, &i, cl_s, udc_cnt);
893 cl_s, udc_cnt);
894 if (ret != 0) { 893 if (ret != 0) {
895 EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size, 894 EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size,
896 ebt_cleanup_entry, &i); 895 ebt_cleanup_entry, &i);