Skip to content

Commit

Permalink
Fixes 127.0.0.0/8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaderi committed May 9, 2024
1 parent 8464569 commit 34c3c29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/IpAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void IpAddress::checkIP() {
addr.multicastIP = true;
else if ((a == 0xFFFFFFFF) || (a == 0))
addr.broadcastIP = true;
else if ((a == 0x7F000001))
else if ((a & 0xFF000000) == 0x7F000000)
addr.localIP = true;
else if (ntop->isLocalAddress(AF_INET, &addr.ipType.ipv4, &local_network_id,
&nmask_bits)) {
Expand Down

0 comments on commit 34c3c29

Please sign in to comment.