forked from premiere/premiere-libtorrent
don't accept incoming uTP connections indefinitely
This commit is contained in:
parent
403c49ac29
commit
ddbae1da86
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue