first implementation of DHT security implementation. tie the node ID to the external IP

This commit is contained in:
Arvid Norberg
2010-12-11 09:38:07 +00:00
parent 6769df7508
commit 29ed03f720
15 changed files with 356 additions and 14 deletions

View File

@@ -67,7 +67,8 @@ namespace libtorrent
return ((ip & 0xff000000) == 0x0a000000 // 10.x.x.x
|| (ip & 0xfff00000) == 0xac100000 // 172.16.x.x
|| (ip & 0xffff0000) == 0xc0a80000 // 192.168.x.x
|| (ip & 0xffff0000) == 0xa9fe0000); // 169.254.x.x
|| (ip & 0xffff0000) == 0xa9fe0000 // 169.254.x.x
|| (ip & 0xff000000) == 0x7f000000); // 127.x.x.x
}
bool is_loopback(address const& addr)