aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHagen Paul Pfeifer <hagen@jauu.net>2009-02-20 04:47:09 -0500
committerPatrick McHardy <kaber@trash.net>2009-02-20 04:47:09 -0500
commite478075c6f07a383c378fb400edc1a7407a941b0 (patch)
tree0eb38291887bde44db0f6256c449401c0ab41000
parent784544739a25c30637397ace5489eeb6e15d7d49 (diff)
netfilter: nf_conntrack: table max size should hold at least table size
Table size is defined as unsigned, wheres the table maximum size is defined as a signed integer. The calculation of max is 8 or 4, multiplied the table size. Therefore the max value is aligned to unsigned. Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net> Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r--include/net/netfilter/nf_conntrack.h2
-rw-r--r--net/netfilter/nf_conntrack_core.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 2e0c53641cbe..4dfb793c3f15 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -287,7 +287,7 @@ static inline int nf_ct_is_untracked(const struct sk_buff *skb)
287 287
288extern int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp); 288extern int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp);
289extern unsigned int nf_conntrack_htable_size; 289extern unsigned int nf_conntrack_htable_size;
290extern int nf_conntrack_max; 290extern unsigned int nf_conntrack_max;
291 291
292#define NF_CT_STAT_INC(net, count) \ 292#define NF_CT_STAT_INC(net, count) \
293 (per_cpu_ptr((net)->ct.stat, raw_smp_processor_id())->count++) 293 (per_cpu_ptr((net)->ct.stat, raw_smp_processor_id())->count++)
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 90ce9ddb9451..f3aa4e65b15e 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -54,7 +54,7 @@ EXPORT_SYMBOL_GPL(nf_conntrack_lock);
54unsigned int nf_conntrack_htable_size __read_mostly; 54unsigned int nf_conntrack_htable_size __read_mostly;
55EXPORT_SYMBOL_GPL(nf_conntrack_htable_size); 55EXPORT_SYMBOL_GPL(nf_conntrack_htable_size);
56 56
57int nf_conntrack_max __read_mostly; 57unsigned int nf_conntrack_max __read_mostly;
58EXPORT_SYMBOL_GPL(nf_conntrack_max); 58EXPORT_SYMBOL_GPL(nf_conntrack_max);
59 59
60struct nf_conn nf_conntrack_untracked __read_mostly; 60struct nf_conn nf_conntrack_untracked __read_mostly;