summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2011-01-30 16:40:36 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-01-30 16:40:36 -0500
commita35531f8e5ae471627347b654e64e8197c5845fd (patch)
tree9cffb317dbdca152cb435139d6daa7e83d28de1a
parentddaa2b55853275d363179043211d11b2495b3ec1 (diff)
downloadrt-patches-a35531f8e5ae471627347b654e64e8197c5845fd.tar.gz
refresh net-Fix-iptables-get_counters.patch
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--net-Fix-iptables-get_counters.patch38
1 files changed, 19 insertions, 19 deletions
diff --git a/net-Fix-iptables-get_counters.patch b/net-Fix-iptables-get_counters.patch
index a3dcc88..17dc1e9 100644
--- a/net-Fix-iptables-get_counters.patch
+++ b/net-Fix-iptables-get_counters.patch
@@ -1,4 +1,4 @@
-From 863c3ad87b10617464fc52c21fc7e31987910559 Mon Sep 17 00:00:00 2001
+From f09a77d4fb46651e4ea38e7b1843aa92f8d41c27 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 27 Apr 2010 10:05:28 +0200
Subject: [PATCH] net: Fix iptables get_counters()
@@ -12,11 +12,11 @@ Reported-by: prd.gtt@operamail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
-index afeadce..401ada7 100644
+index 1c33431..5f6042e 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
-@@ -907,7 +907,7 @@ get_counters(const struct xt_table_info *t,
- {
+@@ -906,7 +906,7 @@ get_counters(const struct xt_table_info *t,
+ struct ipt_entry *iter;
unsigned int cpu;
unsigned int i;
- unsigned int curcpu = NR_CPUS;
@@ -24,7 +24,7 @@ index afeadce..401ada7 100644
/* Instead of clearing (by a previous call to memset())
* the counters and using adds, we set the counters
-@@ -917,16 +917,17 @@ get_counters(const struct xt_table_info *t,
+@@ -916,16 +916,17 @@ get_counters(const struct xt_table_info *t,
* if new softirq were to run and call ipt_do_table
*/
local_bh_disable();
@@ -34,11 +34,11 @@ index afeadce..401ada7 100644
i = 0;
+ xt_info_wrlock(curcpu);
- IPT_ENTRY_ITERATE(t->entries[curcpu],
- t->size,
- set_entry_to_counter,
- counters,
- &i);
+ xt_entry_foreach(iter, t->entries[curcpu], t->size) {
+ SET_COUNTER(counters[i], iter->counters.bcnt,
+ iter->counters.pcnt);
+ ++i;
+ }
-#endif
+ xt_info_wrunlock(curcpu);
+
@@ -46,11 +46,11 @@ index afeadce..401ada7 100644
if (cpu == curcpu)
continue;
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
-index 9238a5a..9091de8 100644
+index 6d5b78b..ff7ce7b 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
-@@ -939,7 +939,7 @@ get_counters(const struct xt_table_info *t,
- {
+@@ -936,7 +936,7 @@ get_counters(const struct xt_table_info *t,
+ struct ip6t_entry *iter;
unsigned int cpu;
unsigned int i;
- unsigned int curcpu = NR_CPUS;
@@ -58,7 +58,7 @@ index 9238a5a..9091de8 100644
/* Instead of clearing (by a previous call to memset())
* the counters and using adds, we set the counters
-@@ -949,17 +949,17 @@ get_counters(const struct xt_table_info *t,
+@@ -946,17 +946,17 @@ get_counters(const struct xt_table_info *t,
* if new softirq were to run and call ipt_do_table
*/
local_bh_disable();
@@ -69,11 +69,11 @@ index 9238a5a..9091de8 100644
i = 0;
+ xt_info_wrlock(curcpu);
- IP6T_ENTRY_ITERATE(t->entries[curcpu],
- t->size,
- set_entry_to_counter,
- counters,
- &i);
+ xt_entry_foreach(iter, t->entries[curcpu], t->size) {
+ SET_COUNTER(counters[i], iter->counters.bcnt,
+ iter->counters.pcnt);
+ ++i;
+ }
-#endif
+ xt_info_wrunlock(curcpu);
+