made the DHT implementation slightly more robust against routing table poisoning and node ID spoofing

This commit is contained in:
Arvid Norberg
2011-01-08 08:54:51 +00:00
parent b53ab26a84
commit b49999b76e
12 changed files with 203 additions and 23 deletions

View File

@@ -172,7 +172,8 @@ namespace libtorrent
}
// returns the number of bits in that differ from the right
// between the addresses.
// between the addresses. The larger number, the further apart
// the IPs are
int cidr_distance(address const& a1, address const& a2)
{
#if TORRENT_USE_IPV6