提交 e5ac6eaf 编写于 作者: F Florian Westphal 提交者: Pablo Neira Ayuso

netfilter: connlimit: fix UP build

cannot use ARRAY_SIZE() if spinlock_t is empty struct.

Fixes: 1442e750 ("netfilter: connlimit: use keyed locks")
Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: NFlorian Westphal <fw@strlen.de>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 e33d0ba8
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册