From b60e48fdbecaf6dea05dbede9bda125b75f0f9a5 Mon Sep 17 00:00:00 2001 From: William Wallace Date: Mon, 28 Dec 2015 04:47:00 +0000 Subject: [PATCH] Fix false positive in netadr_t::IsReservedAdr --- mp/src/tier1/NetAdr.cpp | 2 +- sp/src/tier1/NetAdr.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mp/src/tier1/NetAdr.cpp b/mp/src/tier1/NetAdr.cpp index 30f7fa1f..90692fa0 100644 --- a/mp/src/tier1/NetAdr.cpp +++ b/mp/src/tier1/NetAdr.cpp @@ -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; diff --git a/sp/src/tier1/NetAdr.cpp b/sp/src/tier1/NetAdr.cpp index 30f7fa1f..90692fa0 100644 --- a/sp/src/tier1/NetAdr.cpp +++ b/sp/src/tier1/NetAdr.cpp @@ -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;