diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-30 22:26:53 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:32:00 -0500 |
commit | 1f072c96fdf1a0caa11c6e8078dd96925bd02db5 (patch) | |
tree | 4069d0429745539c36f32a99e7ffef096b8548cf | |
parent | e4fd77deac764e17cb1eab8661bcf1413204d04d (diff) |
[EBTABLES]: translate_table(): switch direct uses of repl->hook_info to newinfo
Since newinfo->hook_table[] already has been set up, we can switch to using
it instead of repl->{hook_info,valid_hooks}.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/bridge/netfilter/ebtables.c | 10 |
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); |