Commit Graph

3 Commits

Author SHA1 Message Date
WebFreak001 38cc25bbcc Split of server into multiple files 2017-08-10 21:33:42 +02:00
Marco Leise a22e3dd34c Provide backlog for socket.listen()
`listen(0)` in general means that you can't connect to the server at all. That it still works is at least in parts due to SYN cookies being enabled in most Linux systems. These allow connections even if an attacker spams the server with unacknowledged connection requests thereby filling up the backlog. Being behind a firewall/router I have this disabled in the kernel and witness the 'proper' socket behavior: The client waits for the server to make room in its size 0 backlog until the TCP timeout happens.
Both enabling SYN cookies and raising the backlog to at least 1 makes it work. Since DCD works purely on the loopback network which seems to accept connections synchronous on Linux at least, a value of 1 is probably all that's technically required, but some larger number (32) wont do any harm.
2017-07-05 19:45:12 +02:00
Denis Feklushkin 698e821f53 split server.d 2017-06-30 17:57:21 +07:00