diff --git a/src/utp_socket_manager.cpp b/src/utp_socket_manager.cpp index 729103a20..6865d86b7 100644 --- a/src/utp_socket_manager.cpp +++ b/src/utp_socket_manager.cpp @@ -245,6 +245,10 @@ namespace libtorrent // create a new utp_stream if (ph->get_type() == ST_SYN) { + // possible SYN flood. Just ignore + if (m_utp_sockets.size() > m_sett.connections_limit * 2) + return false; + // create the new socket with this ID m_new_connection = id;