aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2014-03-17 17:27:50 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2014-04-03 17:52:07 -0400
commite5ac6eafba887821044c65b6fe59d9eb8b7c7f61 (patch)
tree5652b8428bfeeefccfc7e9810922f19b4e58dcf4 /net
parente33d0ba8047b049c9262fdb1fcafb93cb52ceceb (diff)
netfilter: connlimit: fix UP build
cannot use ARRAY_SIZE() if spinlock_t is empty struct. Fixes: 1442e7507dd597 ("netfilter: connlimit: use keyed locks") Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/xt_connlimit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
index 458464e7bd7a..a6e129eb3aa0 100644
--- a/net/netfilter/xt_connlimit.c
+++ b/net/netfilter/xt_connlimit.c
@@ -377,7 +377,7 @@ static int connlimit_mt_check(const struct xt_mtchk_param *par)
377 return -ENOMEM; 377 return -ENOMEM;
378 } 378 }
379 379
380 for (i = 0; i < ARRAY_SIZE(info->data->locks); ++i) 380 for (i = 0; i < CONNLIMIT_LOCK_SLOTS; ++i)
381 spin_lock_init(&info->data->locks[i]); 381 spin_lock_init(&info->data->locks[i]);
382 382
383 for (i = 0; i < ARRAY_SIZE(info->data->climit_root4); ++i) 383 for (i = 0; i < ARRAY_SIZE(info->data->climit_root4); ++i)