diff --git a/ChangeLog b/ChangeLog index ce4fba09e..02627c2fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/broadcast_socket.cpp b/src/broadcast_socket.cpp index 5e3372ee5..82539edad 100644 --- a/src/broadcast_socket.cpp +++ b/src/broadcast_socket.cpp @@ -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();