aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netfilter/xt_statistic.h
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-03-16 15:35:29 +0100
committerPatrick McHardy <kaber@trash.net>2009-03-16 15:35:29 +0100
commitacc738fec03bdaa5b77340c32a82fbfedaaabef0 (patch)
tree646495518d8e4946862ab9d361eb2248d4212be5 /include/linux/netfilter/xt_statistic.h
parentnetfilter: auto-load ip_queue module when socket opened (diff)
downloadlinux-dev-acc738fec03bdaa5b77340c32a82fbfedaaabef0.tar.xz
linux-dev-acc738fec03bdaa5b77340c32a82fbfedaaabef0.zip
netfilter: xtables: avoid pointer to self
Commit 784544739a25c30637397ace5489eeb6e15d7d49 (netfilter: iptables: lock free counters) broke a number of modules whose rule data referenced itself. A reallocation would not reestablish the correct references, so it is best to use a separate struct that does not fall under RCU. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/linux/netfilter/xt_statistic.h')
-rw-r--r--include/linux/netfilter/xt_statistic.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/netfilter/xt_statistic.h b/include/linux/netfilter/xt_statistic.h
index 3d38bc975048..8f521ab49ef7 100644
--- a/include/linux/netfilter/xt_statistic.h
+++ b/include/linux/netfilter/xt_statistic.h
@@ -13,6 +13,8 @@ enum xt_statistic_flags {
};
#define XT_STATISTIC_MASK 0x1
+struct xt_statistic_priv;
+
struct xt_statistic_info {
u_int16_t mode;
u_int16_t flags;
@@ -23,11 +25,10 @@ struct xt_statistic_info {
struct {
u_int32_t every;
u_int32_t packet;
- /* Used internally by the kernel */
- u_int32_t count;
+ u_int32_t count; /* unused */
} nth;
} u;
- struct xt_statistic_info *master __attribute__((aligned(8)));
+ struct xt_statistic_priv *master __attribute__((aligned(8)));
};
#endif /* _XT_STATISTIC_H */