correct bitmask

pull/7/head
Jeff Becker 6 years ago
parent 2e13eac024
commit 2c652174b9

@ -218,7 +218,7 @@ namespace llarp
in_addr_t addr = this->addr4()->s_addr;
unsigned byte = ntohl(addr);
unsigned byte1 = byte >> 24 & 0xff;
unsigned byte2 = byte >> 16 & 0xff;
unsigned byte2 = (0x00ff0000 & byte >> 16);
return (byte1 == 10 || (byte1 == 192 && byte2 == 168)
|| (byte1 == 172 && (byte2 >= 16 || byte2 <= 31)));
}

Loading…
Cancel
Save