Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
laduke committed Mar 14, 2024
1 parent 0c194cb commit 231dd82
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions node/InetAddress.cpp
Expand Up @@ -136,7 +136,19 @@ InetAddress::IpScope InetAddress::ipScope() const
return IP_SCOPE_PRIVATE; // fc00::/7
}
}

// 0:0:0:0:0:ffff:127.0.0.1
unsigned int k = 0;
while ((!ip[k])&&(k < 9)) {
++k;
}
if (k == 9) {
if (ip[10] == 0xff && ip[11] == 0xff && ip[12] == 0x7f) {
return IP_SCOPE_LOOPBACK;
}
}

k = 0;
while ((!ip[k])&&(k < 15)) {
++k;
}
Expand Down

0 comments on commit 231dd82

Please sign in to comment.