aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-26 12:31:09 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-26 12:31:09 -0500
commit38bdbd8efc8a661dedb52264359531b3a1c11716 (patch)
tree5f2a4ea75c6eb3c0305b45d8c8914cc87bb1db25 /net/ipv6
parent773c3e75d1fc7ea5058bfeab5d82bac5b85f8cd8 (diff)
parent6b4ff2d7675511a31980fa5379808660e1261f90 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6_tables.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index f7042869198e..9210e312edf1 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -866,8 +866,10 @@ translate_table(struct net *net, struct xt_table_info *newinfo, void *entry0,
866 /* Walk through entries, checking offsets. */ 866 /* Walk through entries, checking offsets. */
867 xt_entry_foreach(iter, entry0, newinfo->size) { 867 xt_entry_foreach(iter, entry0, newinfo->size) {
868 ret = check_entry_size_and_hooks(iter, newinfo, entry0, 868 ret = check_entry_size_and_hooks(iter, newinfo, entry0,
869 entry0 + repl->size, repl->hook_entry, repl->underflow, 869 entry0 + repl->size,
870 repl->valid_hooks); 870 repl->hook_entry,
871 repl->underflow,
872 repl->valid_hooks);
871 if (ret != 0) 873 if (ret != 0)
872 return ret; 874 return ret;
873 ++i; 875 ++i;
@@ -948,7 +950,7 @@ get_counters(const struct xt_table_info *t,
948 i = 0; 950 i = 0;
949 xt_entry_foreach(iter, t->entries[curcpu], t->size) { 951 xt_entry_foreach(iter, t->entries[curcpu], t->size) {
950 SET_COUNTER(counters[i], iter->counters.bcnt, 952 SET_COUNTER(counters[i], iter->counters.bcnt,
951 iter->counters.pcnt); 953 iter->counters.pcnt);
952 ++i; 954 ++i;
953 } 955 }
954 956
@@ -959,7 +961,7 @@ get_counters(const struct xt_table_info *t,
959 xt_info_wrlock(cpu); 961 xt_info_wrlock(cpu);
960 xt_entry_foreach(iter, t->entries[cpu], t->size) { 962 xt_entry_foreach(iter, t->entries[cpu], t->size) {
961 ADD_COUNTER(counters[i], iter->counters.bcnt, 963 ADD_COUNTER(counters[i], iter->counters.bcnt,
962 iter->counters.pcnt); 964 iter->counters.pcnt);
963 ++i; 965 ++i;
964 } 966 }
965 xt_info_wrunlock(cpu); 967 xt_info_wrunlock(cpu);
@@ -1573,7 +1575,7 @@ check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e,
1573 j = 0; 1575 j = 0;
1574 xt_ematch_foreach(ematch, e) { 1576 xt_ematch_foreach(ematch, e) {
1575 ret = compat_find_calc_match(ematch, name, 1577 ret = compat_find_calc_match(ematch, name,
1576 &e->ipv6, e->comefrom, &off); 1578 &e->ipv6, e->comefrom, &off);
1577 if (ret != 0) 1579 if (ret != 0)
1578 goto release_matches; 1580 goto release_matches;
1579 ++j; 1581 ++j;
@@ -1734,8 +1736,11 @@ translate_compat_table(struct net *net,
1734 /* Walk through entries, checking offsets. */ 1736 /* Walk through entries, checking offsets. */
1735 xt_entry_foreach(iter0, entry0, total_size) { 1737 xt_entry_foreach(iter0, entry0, total_size) {
1736 ret = check_compat_entry_size_and_hooks(iter0, info, &size, 1738 ret = check_compat_entry_size_and_hooks(iter0, info, &size,
1737 entry0, entry0 + total_size, hook_entries, underflows, 1739 entry0,
1738 name); 1740 entry0 + total_size,
1741 hook_entries,
1742 underflows,
1743 name);
1739 if (ret != 0) 1744 if (ret != 0)
1740 goto out_unlock; 1745 goto out_unlock;
1741 ++j; 1746 ++j;
@@ -1779,8 +1784,8 @@ translate_compat_table(struct net *net,
1779 pos = entry1; 1784 pos = entry1;
1780 size = total_size; 1785 size = total_size;
1781 xt_entry_foreach(iter0, entry0, total_size) { 1786 xt_entry_foreach(iter0, entry0, total_size) {
1782 ret = compat_copy_entry_from_user(iter0, &pos, 1787 ret = compat_copy_entry_from_user(iter0, &pos, &size,
1783 &size, name, newinfo, entry1); 1788 name, newinfo, entry1);
1784 if (ret != 0) 1789 if (ret != 0)
1785 break; 1790 break;
1786 } 1791 }
@@ -1960,7 +1965,7 @@ compat_copy_entries_to_user(unsigned int total_size, struct xt_table *table,
1960 size = total_size; 1965 size = total_size;
1961 xt_entry_foreach(iter, loc_cpu_entry, total_size) { 1966 xt_entry_foreach(iter, loc_cpu_entry, total_size) {
1962 ret = compat_copy_entry_to_user(iter, &pos, 1967 ret = compat_copy_entry_to_user(iter, &pos,
1963 &size, counters, i++); 1968 &size, counters, i++);
1964 if (ret != 0) 1969 if (ret != 0)
1965 break; 1970 break;
1966 } 1971 }