Make the size for the syn cache hash array tunable. As we are
authorbluhm <bluhm@openbsd.org>
Wed, 20 Jul 2016 09:15:28 +0000 (09:15 +0000)
committerbluhm <bluhm@openbsd.org>
Wed, 20 Jul 2016 09:15:28 +0000 (09:15 +0000)
commit68bdd82fbe0d11bdc613288f9b8cbe13ae56fca2
tree7129cf094451fb044dcc85be0ae0fade197a3792
parentcfe45cfd673a9dfcb632a4b95fa3c8eaf2287a5f
Make the size for the syn cache hash array tunable.  As we are
swapping between two syn caches for random reseeding anyway, this
feature can be added easily.  When the cache is empty, there is an
opportunity to change the hash size.  This allows an admin under
SYN flood attack to defend his machine.
Suggested by claudio@; OK jung@ claudio@ jmc@
lib/libc/gen/sysctl.3
sbin/sysctl/sysctl.8
sys/netinet/tcp_input.c
sys/netinet/tcp_usrreq.c
sys/netinet/tcp_var.h
sys/sys/malloc.h