Skip to content

Commit

Permalink
Merge branch 'dev' into ldr/update-rust-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoder authored Mar 19, 2024
2 parents 39e1aab + 9f49982 commit 859031d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions node/InetAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,20 @@ InetAddress::IpScope InetAddress::ipScope() const
return IP_SCOPE_PRIVATE; // fc00::/7
}
}

// :::ffff:127.0.0.1
// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0x7f, 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 859031d

Please sign in to comment.