aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bridge/netfilter/ebtables.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 7ce190c21dd7..3e1bf716509a 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -792,22 +792,22 @@ static int translate_table(struct ebt_replace *repl,
792 return ret; 792 return ret;
793 793
794 i = 0; 794 i = 0;
795 while (i < NF_BR_NUMHOOKS && !(repl->valid_hooks & (1 << i))) 795 while (i < NF_BR_NUMHOOKS && !newinfo->hook_entry[i])
796 i++; 796 i++;
797 if (i == NF_BR_NUMHOOKS) { 797 if (i == NF_BR_NUMHOOKS) {
798 BUGPRINT("No valid hooks specified\n"); 798 BUGPRINT("No valid hooks specified\n");
799 return -EINVAL; 799 return -EINVAL;
800 } 800 }
801 if (repl->hook_entry[i] != (struct ebt_entries *)repl->entries) { 801 if (newinfo->hook_entry[i] != (struct ebt_entries *)newinfo->entries) {
802 BUGPRINT("Chains don't start at beginning\n"); 802 BUGPRINT("Chains don't start at beginning\n");
803 return -EINVAL; 803 return -EINVAL;
804 } 804 }
805 /* make sure chains are ordered after each other in same order 805 /* make sure chains are ordered after each other in same order
806 as their corresponding hooks */ 806 as their corresponding hooks */
807 for (j = i + 1; j < NF_BR_NUMHOOKS; j++) { 807 for (j = i + 1; j < NF_BR_NUMHOOKS; j++) {
808 if (!(repl->valid_hooks & (1 << j))) 808 if (!newinfo->hook_entry[j])
809 continue; 809 continue;
810 if ( repl->hook_entry[j] <= repl->hook_entry[i] ) { 810 if (newinfo->hook_entry[j] <= newinfo->hook_entry[i]) {
811 BUGPRINT("Hook order must be followed\n"); 811 BUGPRINT("Hook order must be followed\n");
812 return -EINVAL; 812 return -EINVAL;
813 } 813 }
@@ -877,7 +877,7 @@ static int translate_table(struct ebt_replace *repl,
877 877
878 /* Check for loops */ 878 /* Check for loops */
879 for (i = 0; i < NF_BR_NUMHOOKS; i++) 879 for (i = 0; i < NF_BR_NUMHOOKS; i++)
880 if (repl->valid_hooks & (1 << i)) 880 if (newinfo->hook_entry[i])
881 if (check_chainloops(newinfo->hook_entry[i], 881 if (check_chainloops(newinfo->hook_entry[i],
882 cl_s, udc_cnt, i, newinfo->entries)) { 882 cl_s, udc_cnt, i, newinfo->entries)) {
883 vfree(cl_s); 883 vfree(cl_s);