fixed CIDR calculation
This commit is contained in:
parent
37cbdb331e
commit
3d2bf88894
|
@ -51,6 +51,7 @@ release 0.14.3
|
|||
* fixed issue where renamed files were sometimes not saved in resume data
|
||||
* accepts tracker responses with no 'peers' field, as long as 'peers6'
|
||||
is present
|
||||
* fixed CIDR-distance calculation in the precense of IPv6 peers
|
||||
|
||||
release 0.14.2
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ namespace libtorrent
|
|||
// between the addresses.
|
||||
int cidr_distance(address const& a1, address const& a2)
|
||||
{
|
||||
if (a1.is_v4() == a2.is_v4())
|
||||
if (a1.is_v4() && a2.is_v4())
|
||||
{
|
||||
// both are v4
|
||||
address_v4::bytes_type b1 = a1.to_v4().to_bytes();
|
||||
|
|
Loading…
Reference in New Issue