diff options
author | Florian Westphal <fw@strlen.de> | 2014-03-17 22:27:50 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-04-03 23:52:07 +0200 |
commit | e5ac6eafba887821044c65b6fe59d9eb8b7c7f61 (patch) | |
tree | 5652b8428bfeeefccfc7e9810922f19b4e58dcf4 /net/netfilter | |
parent | e33d0ba8047b049c9262fdb1fcafb93cb52ceceb (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/netfilter')
-rw-r--r-- | net/netfilter/xt_connlimit.c | 2 |
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) return -ENOMEM; } - for (i = 0; i < ARRAY_SIZE(info->data->locks); ++i) + for (i = 0; i < CONNLIMIT_LOCK_SLOTS; ++i) spin_lock_init(&info->data->locks[i]); for (i = 0; i < ARRAY_SIZE(info->data->climit_root4); ++i) |