diff options
author | 1996-09-20 22:53:05 +0000 | |
---|---|---|
committer | 1996-09-20 22:53:05 +0000 | |
commit | 56955e71a8139502c4e34cdc7defce375ac41b0e (patch) | |
tree | 73f5921c8ef32f80d5b4116ffce32330664fd4f7 /sys/kern/uipc_socket2.c | |
parent | kill the default phone numbers. i checked - they are disconnected -- "i wonder whycvs diff -bc phones"; spotted by bitblt (diff) | |
download | wireguard-openbsd-56955e71a8139502c4e34cdc7defce375ac41b0e.tar.xz wireguard-openbsd-56955e71a8139502c4e34cdc7defce375ac41b0e.zip |
`solve' the syn bomb problem as well as currently known; add sysctl's for
SOMAXCONN (kern.somaxconn), SOMINCONN (kern.sominconn), and TCPTV_KEEP_INIT
(net.inet.tcp.keepinittime). when this is not enough (ie. overfull), start
doing tail drop, but slightly prefer the same port.
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r-- | sys/kern/uipc_socket2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index 66b22eb336e..92ab13de5e1 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket2.c,v 1.3 1996/08/24 04:56:37 deraadt Exp $ */ +/* $OpenBSD: uipc_socket2.c,v 1.4 1996/09/20 22:53:10 deraadt Exp $ */ /* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */ /* @@ -160,7 +160,7 @@ sonewconn1(head, connstatus) register struct socket *so; int soqueue = connstatus ? 1 : 0; - if (head->so_qlen + head->so_q0len > 3 * head->so_qlimit / 2) + if (head->so_qlen + head->so_q0len > head->so_qlimit * 3) return ((struct socket *)0); MALLOC(so, struct socket *, sizeof(*so), M_SOCKET, M_DONTWAIT); if (so == NULL) |