treat unique local addresses as local

These addresses are not globally routable so they should be considered local.
This commit is contained in:
Steven Siloti 2017-08-27 15:35:26 -07:00 committed by Arvid Norberg
parent 626ce25225
commit d4986f878f
1 changed files with 3 additions and 1 deletions

View File

@ -71,7 +71,9 @@ namespace libtorrent {
{
return a.to_v6().is_loopback()
|| a.to_v6().is_link_local()
|| a.to_v6().is_multicast_link_local();
|| a.to_v6().is_multicast_link_local()
// fc00::/7, unique local address
|| (a.to_v6().to_bytes()[0] & 0xfe) == 0xfc;
}
#endif
address_v4 a4 = a.to_v4();