diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-11-12 14:05:03 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-11-12 14:05:03 -0800 |
commit | b1b37d9d725859166c0623fbf2a5d6f1b0302593 (patch) | |
tree | be1fe76583013ba93a8dd1805cdbbcf7c561a068 | |
parent | 1bd5a1ebcd6fb99b6a1c723514a8bf354486a443 (diff) | |
download | infinitytier-b1b37d9d725859166c0623fbf2a5d6f1b0302593.tar.gz infinitytier-b1b37d9d725859166c0623fbf2a5d6f1b0302593.zip |
Increase paltry listen() backlog size to prevent Linux kernel syn flood fallback (only really affects supernodes).
-rw-r--r-- | osnet/NativeSocketManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/osnet/NativeSocketManager.cpp b/osnet/NativeSocketManager.cpp index 2a3750e1..5b0ba61e 100644 --- a/osnet/NativeSocketManager.cpp +++ b/osnet/NativeSocketManager.cpp @@ -412,7 +412,7 @@ NativeSocketManager::NativeSocketManager(int localUdpPort,int localTcpPort) : throw std::runtime_error("unable to bind to local TCP port"); } - if (::listen(_tcpV6ListenSocket,16)) { + if (::listen(_tcpV6ListenSocket,1024)) { _closeSockets(); throw std::runtime_error("listen() failed"); } @@ -455,7 +455,7 @@ NativeSocketManager::NativeSocketManager(int localUdpPort,int localTcpPort) : throw std::runtime_error("unable to bind to local TCP port"); } - if (::listen(_tcpV4ListenSocket,16)) { + if (::listen(_tcpV4ListenSocket,1024)) { _closeSockets(); throw std::runtime_error("listen() failed"); } |