]> git.proxmox.com Git - mirror_qemu.git/commit
gdbstub: set listen backlog to 1
authorPeter Wu <peter@lekensteyn.nl>
Wed, 4 May 2016 09:32:17 +0000 (11:32 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 7 Jun 2016 15:02:49 +0000 (18:02 +0300)
commit96165b9eb4207a34a87c46df731d3cc42c052e13
tree99d4fc09288f7e5f968d32e338af47a2a80c4f37
parent891f8dcd251e98befee17f2d00baf8b2f54b728d
gdbstub: set listen backlog to 1

Avoid possible connection drops on Linux (when tcp_syncookies is
disabled) or fallbacks to SYN cookies with the following kernel warning:

    TCP: request_sock_TCP: Possible SYN flooding on port 1234. Sending cookies.  Check SNMP counters.

Since Linux 4.4 (ef547f2ac16b "tcp: remove max_qlen_log"), a backlog of
zero is really treated as the "queue length for completely established
sockets waiting to be accepted" (listen(2)). This is apparently a valid
interpretation of an "implementation-defined minimum value" for a
backlog value of 0 (listen(3p)). Previous kernels would use 8 as
minimum value, but that is no longer the case.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
gdbstub.c