From 2db8811cae36afcd6c1c6a1026cf43551caa9752 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Thu, 9 Aug 2018 11:49:35 -0400 Subject: [PATCH] fix address detection --- include/llarp/net.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llarp/net.hpp b/include/llarp/net.hpp index dee7fb51f..7b380d5be 100644 --- a/include/llarp/net.hpp +++ b/include/llarp/net.hpp @@ -222,7 +222,7 @@ namespace llarp in_addr_t addr = this->addr4()->s_addr; unsigned byte = ntohl(addr); unsigned byte1 = byte >> 24 & 0xff; - unsigned byte2 = (0x00ff0000 & byte >> 16); + unsigned byte2 = (0x00ff0000 & byte) >> 16; return (byte1 == 10 || (byte1 == 192 && byte2 == 168) || (byte1 == 172 && (byte2 >= 16 || byte2 <= 31))); }