Merge pull request #3902

f8dd433 epee: fix detection of 172.16.0.0/172.31.255.255 local IP range (moneromooo-monero)
5db9e3c unit_tests: add tests for local IP range detection (moneromooo-monero)
This commit is contained in:
luigi1111 2018-06-20 14:22:44 -05:00
commit c678413a89
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
2 changed files with 33 additions and 1 deletions

View file

@ -48,7 +48,7 @@ namespace epee
if( (ip | 0xffffff00) == 0xffffffac)
{
uint32_t second_num = (ip << 8) & 0xff000000;
uint32_t second_num = (ip >> 8) & 0xff;
if(second_num >= 16 && second_num <= 31 )
return true;
}