Skip to content

Commit

Permalink
fix applying IP filter to DHT traffic (HanabishiRecca)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Jan 26, 2025
1 parent dc035e8 commit 7de186f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

2.0.11 released

* fix applying IP filter to DHT traffic (HanabishiRecca)
* fix race condition when cancelling requests after becoming a seed
* fix performance bug in the file pool, evicting MRU instead of LRU (HanabishiRecca)
* fix bug where file_progress could sometimes be reported as >100%
Expand Down
22 changes: 11 additions & 11 deletions src/torrent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11182,17 +11182,6 @@ namespace {

TORRENT_ASSERT(info_hash().has_v2() || !(flags & pex_lt_v2));

#ifndef TORRENT_DISABLE_DHT
if (source != peer_info::resume_data)
{
// try to send a DHT ping to this peer
// as well, to figure out if it supports
// DHT (uTorrent and BitComet don't
// advertise support)
session().add_dht_node({adr.address(), adr.port()});
}
#endif

if (m_apply_ip_filter
&& m_ip_filter
&& m_ip_filter->access(adr.address()) & ip_filter::blocked)
Expand Down Expand Up @@ -11241,6 +11230,17 @@ namespace {
return nullptr;
}

#ifndef TORRENT_DISABLE_DHT
if (source != peer_info::resume_data)
{
// try to send a DHT ping to this peer
// as well, to figure out if it supports
// DHT (uTorrent and BitComet don't
// advertise support)
session().add_dht_node({adr.address(), adr.port()});
}
#endif

if (!torrent_file().info_hashes().has_v1())
flags |= pex_lt_v2;

Expand Down

0 comments on commit 7de186f

Please sign in to comment.