only apply privileged port filter to DHT-only peers

This commit is contained in:
Arvid Norberg 2011-01-08 09:04:31 +00:00
parent dccd029069
commit f87b0b4617
2 changed files with 7 additions and 1 deletions

View File

@ -68,6 +68,8 @@
incoming connection
* added more detailed instrumentation of the disk I/O thread
* only apply privileged port filter to DHT-only peers
0.15.5 release
* support DHT extension to report external IPs

View File

@ -565,7 +565,11 @@ namespace libtorrent
if (ses.m_port_filter.access(p.port) & port_filter::blocked)
return false;
if (ses.m_settings.no_connect_privileged_ports && p.port < 1024)
// only apply this to peers we've only heard
// about from the DHT
if (ses.m_settings.no_connect_privileged_ports
&& p.port < 1024
&& p.source == peer_info::dht)
return false;
return true;