From f5bc1a9c7bbef925eef1f8b3946e02f0e1c3ea84 Mon Sep 17 00:00:00 2001 From: kp Date: Thu, 12 Jul 2018 16:35:35 +0000 Subject: [PATCH] pf: Increate default state table size The typical system now has a lot more memory than when pf was new, and is also expected to handle more connections. Increase the default size of the state table. Note that users can overrule this using 'set limit states' in pf.conf. From OpenBSD: The year is 2018. Mercury, Bowie, Cash, Motorola and DEC all left us. Just pf still has a default state table limit of 10000. Had! Now it's a tiny little bit more, 100k. lead guitar: me ok chorus: phessler theo claudio benno background school girl laughing: bob Obtained from: OpenBSD --- sys/net/pfvar.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 824b8ec3f488..192822c2e8da 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -621,9 +621,9 @@ struct pf_rule { #define PFRULE_IFBOUND 0x00010000 /* if-bound */ #define PFRULE_STATESLOPPY 0x00020000 /* sloppy state tracking */ -#define PFSTATE_HIWAT 10000 /* default state table size */ -#define PFSTATE_ADAPT_START 6000 /* default adaptive timeout start */ -#define PFSTATE_ADAPT_END 12000 /* default adaptive timeout end */ +#define PFSTATE_HIWAT 100000 /* default state table size */ +#define PFSTATE_ADAPT_START 60000 /* default adaptive timeout start */ +#define PFSTATE_ADAPT_END 102000 /* default adaptive timeout end */ struct pf_threshold {