only apply privileged port filter to DHT-only peers
This commit is contained in:
parent
dccd029069
commit
f87b0b4617
|
@ -68,6 +68,8 @@
|
||||||
incoming connection
|
incoming connection
|
||||||
* added more detailed instrumentation of the disk I/O thread
|
* added more detailed instrumentation of the disk I/O thread
|
||||||
|
|
||||||
|
* only apply privileged port filter to DHT-only peers
|
||||||
|
|
||||||
0.15.5 release
|
0.15.5 release
|
||||||
|
|
||||||
* support DHT extension to report external IPs
|
* support DHT extension to report external IPs
|
||||||
|
|
|
@ -565,7 +565,11 @@ namespace libtorrent
|
||||||
if (ses.m_port_filter.access(p.port) & port_filter::blocked)
|
if (ses.m_port_filter.access(p.port) & port_filter::blocked)
|
||||||
return false;
|
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 false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue