pf: default syncookies to adaptive mode
authorKristof Provost <kp@FreeBSD.org>
Sat, 31 Dec 2022 18:26:24 +0000 (19:26 +0100)
committerKristof Provost <kp@FreeBSD.org>
Fri, 13 Jan 2023 22:14:25 +0000 (23:14 +0100)
commit933be8d74b0471c8578a6ec965299383bc65138b
treeab0282114698faa9528bec44673c05683a61b181
parentdc698b2cd59ebc08b05a261dbba8ee5707450d28
pf: default syncookies to adaptive mode

The cost of enabling syncookies in adaptive mode is very low (basically
a single atomic add when we create a new half-open state), and the
payoff when under SYN flood is huge.

So, enable adaptive mode by default.

Suggested by:   Eirik Ã˜verby
sys/netpfil/pf/pf_ioctl.c
sys/netpfil/pf/pf_syncookies.c