Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5ac6eaf authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso
Browse files

netfilter: connlimit: fix UP build



cannot use ARRAY_SIZE() if spinlock_t is empty struct.

Fixes: 1442e750 ("netfilter: connlimit: use keyed locks")
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent e33d0ba8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)