summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2014-05-29 19:17:10 +0000
committerjhb <jhb@FreeBSD.org>2014-05-29 19:17:10 +0000
commit91a569ad698cee8a1ff76c5d946cfca1f3012c39 (patch)
tree08e3ce3e677033fbd49ac1ac146e6c77b51ade3d
parentc160232df43e51ad86cba129fab42669fc325746 (diff)
downloadFreeBSD-src-91a569ad698cee8a1ff76c5d946cfca1f3012c39.zip
FreeBSD-src-91a569ad698cee8a1ff76c5d946cfca1f3012c39.tar.gz
Fix pf(4) to build with MAXCPU set to 256. MAXCPU is actually a count,
not a maximum ID value (so it is a cap on mp_ncpus, not mp_maxid).
-rw-r--r--sys/netpfil/pf/pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 0e44e9b..0945201 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -196,7 +196,7 @@ VNET_DEFINE(uint64_t, pf_stateid[MAXCPU]);
#define PFID_CPUSHIFT (sizeof(uint64_t) * NBBY - PFID_CPUBITS)
#define PFID_CPUMASK ((uint64_t)((1 << PFID_CPUBITS) - 1) << PFID_CPUSHIFT)
#define PFID_MAXID (~PFID_CPUMASK)
-CTASSERT((1 << PFID_CPUBITS) > MAXCPU);
+CTASSERT((1 << PFID_CPUBITS) >= MAXCPU);
static void pf_src_tree_remove_state(struct pf_state *);
static void pf_init_threshold(struct pf_threshold *, u_int32_t,
OpenPOWER on IntegriCloud