Fix false positive in netadr_t::IsReservedAdr

This commit is contained in:
William Wallace 2015-12-28 04:47:00 +00:00
parent 0d8dceea43
commit b60e48fdbe
2 changed files with 2 additions and 2 deletions

View file

@ -97,7 +97,7 @@ bool netadr_t::IsReservedAdr () const
if ( (ip[0] == 10) || // 10.x.x.x is reserved
(ip[0] == 127) || // 127.x.x.x
(ip[0] == 172 && ip[1] >= 16 && ip[1] <= 31) || // 172.16.x.x - 172.31.x.x
(ip[0] == 192 && ip[1] >= 168) ) // 192.168.x.x
(ip[0] == 192 && ip[1] == 168) ) // 192.168.x.x
return true;
}
return false;

View file

@ -97,7 +97,7 @@ bool netadr_t::IsReservedAdr () const
if ( (ip[0] == 10) || // 10.x.x.x is reserved
(ip[0] == 127) || // 127.x.x.x
(ip[0] == 172 && ip[1] >= 16 && ip[1] <= 31) || // 172.16.x.x - 172.31.x.x
(ip[0] == 192 && ip[1] >= 168) ) // 192.168.x.x
(ip[0] == 192 && ip[1] == 168) ) // 192.168.x.x
return true;
}
return false;