-
Notifications
You must be signed in to change notification settings - Fork 0
test: add benchmarks #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Performance across libraries | ||
| > Autogenerated by `src/scripts/build-bench-md.ts` | ||
|
|
||
| **System Info** | ||
| - Apple M3 Max (16 cores), 64.0 GB | ||
| - Darwin 24.6.0 (darwin arm64) | ||
| - Node.js v24.2.0 | ||
|
|
||
| ## IPv4 | ||
| | # | Name | Ops/sec | Avg time (ms) | ± % | | ||
| | --- | --- | ---: | ---: | ---: | | ||
| | 1 | node:net | 4961035.41 | 0.000 | ±246.97% | | ||
| | 2 | neoip | 3955073.30 | 0.000 | ±224.27% | | ||
| | 3 | @webpod/ip | 3849196.73 | 0.000 | ±65.91% | | ||
| | 4 | ip | 3313577.42 | 0.000 | ±222.50% | | ||
| | 5 | @webpod/ip/core | 3000048.99 | 0.000 | ±25.16% | | ||
| | 6 | ip2buf | 44536.30 | 0.022 | ±32.62% | | ||
| | 7 | ip-address | 38409.27 | 0.026 | ±71.59% | | ||
| | 8 | ipaddr.js | 15623.47 | 0.064 | ±35.40% | | ||
| | 9 | is-ip | 353.18 | 2.831 | ±32.13% | | ||
| ## IPv6 | ||
| | # | Name | Ops/sec | Avg time (ms) | ± % | | ||
| | --- | --- | ---: | ---: | ---: | | ||
| | 1 | node:net | 412949.28 | 0.002 | ±71.44% | | ||
| | 2 | @webpod/ip | 411210.66 | 0.002 | ±18.33% | | ||
| | 3 | neoip | 397130.19 | 0.003 | ±109.62% | | ||
| | 4 | ip2buf | 19833.55 | 0.050 | ±30.69% | | ||
| | 5 | @webpod/ip/core | 15951.71 | 0.063 | ±29.00% | | ||
| | 6 | ip-address | 11943.45 | 0.084 | ±99.54% | | ||
| | 7 | ip | 7108.96 | 0.141 | ±9.46% | | ||
| | 8 | ipaddr.js | 4001.49 | 0.250 | ±16.61% | | ||
| | 9 | is-ip | 209.12 | 4.782 | ±4.01% | | ||
| ## Private IP | ||
| | # | Name | Ops/sec | Avg time (ms) | ± % | | ||
| | --- | --- | ---: | ---: | ---: | | ||
| | 1 | ip | 105002.56 | 0.010 | ±109.63% | | ||
| | 2 | @webpod/ip/core | 29683.28 | 0.034 | ±38.01% | | ||
| | 3 | @webpod/ip | 29531.26 | 0.034 | ±35.77% | | ||
| | 4 | ipaddr.js | 18058.26 | 0.055 | ±41.60% | | ||
| | 5 | neoip | 15729.85 | 0.064 | ±53.98% | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,88 +1,88 @@ | ||
| # Coherence across libraries | ||
| > Autogenerated by `src/scripts/build-coherence-md.ts` | ||
| ## IPv4 | ||
| Address | node:net | [`ip`](https://github.com/indutny/node-ip) | [`@webpod/ip`](https://github.com/webpod/ip) | [`is-ip`](https://github.com/sindresorhus/is-ip) | [`ipaddr.js`](https://github.com/whitequark/ipaddr.js/) | [`ip-address`](https://github.com/beaugunderson/ip-address) | [`ip2buf`](https://github.com/reklatsmasters/ip2buf) | [`neoip`](https://github.com/Zaptic/neoip) | Comment | ||
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ||
| `127.0.0.1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | localhost | ||
| `192.168.1.1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | private LAN | ||
| `255.255.255.255` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | broadcast | ||
| `0.0.0.0` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | unspecified | ||
| `8.8.8.8` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Google DNS | ||
| `256.1.1.1` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | octet out of range | ||
| `192.168.1` | ✓ | ✓ | ✓ | ✓ | ❌ | ✓ | ✓ | ✓ | not enough octets | ||
| `192.168.1.1.1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | too many octets | ||
| `192.168.01.1` | ✓ | ❌ | ✓ | ✓ | ❌ | ❌ | ❌ | ✓ | leading octet zero | ||
| `abc.def.gha.bcd` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | non-numeric | ||
| `...` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | empty octets | ||
| `1..2.3` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | empty middle octet | ||
| `` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | empty string | ||
| Address | node:net | [`ip`](https://github.com/indutny/node-ip) | [`@webpod/ip`](https://github.com/webpod/ip) | [`@webpod/ip/core`](https://github.com/webpod/ip) | [`is-ip`](https://github.com/sindresorhus/is-ip) | [`ipaddr.js`](https://github.com/whitequark/ipaddr.js/) | [`ip-address`](https://github.com/beaugunderson/ip-address) | [`ip2buf`](https://github.com/reklatsmasters/ip2buf) | [`neoip`](https://github.com/Zaptic/neoip) | Comment | ||
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ||
| `127.0.0.1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | localhost | ||
| `192.168.1.1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | private LAN | ||
| `255.255.255.255` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | broadcast | ||
| `0.0.0.0` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | unspecified | ||
| `8.8.8.8` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Google DNS | ||
| `256.1.1.1` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | octet out of range | ||
| `192.168.1` | ✓ | ✓ | ✓ | ✓ | ✓ | ❌ | ✓ | ✓ | ✓ | not enough octets | ||
| `192.168.1.1.1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | too many octets | ||
| `192.168.01.1` | ✓ | ❌ | ✓ | ✓ | ✓ | ❌ | ❌ | ❌ | ✓ | leading octet zero | ||
| `abc.def.gha.bcd` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | non-numeric | ||
| `...` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | empty octets | ||
| `1..2.3` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | empty middle octet | ||
| `` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | empty string | ||
| ## IPv6 | ||
| Address | node:net | [`ip`](https://github.com/indutny/node-ip) | [`@webpod/ip`](https://github.com/webpod/ip) | [`is-ip`](https://github.com/sindresorhus/is-ip) | [`ipaddr.js`](https://github.com/whitequark/ipaddr.js/) | [`ip-address`](https://github.com/beaugunderson/ip-address) | [`ip2buf`](https://github.com/reklatsmasters/ip2buf) | [`neoip`](https://github.com/Zaptic/neoip) | Comment | ||
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ||
| `::1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | loopback | ||
| `::` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | unspecified | ||
| `2001:db8::1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | documentation address | ||
| `fe80::1ff:fe23:4567:890a` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | link-local | ||
| `::ffff:192.0.2.128` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | IPv4-mapped IPv6 | ||
| `2001:0db8:85a3:0000:0000:8a2e:0370:7334` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | full form | ||
| `0:0:0:0:0:0:0:1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | expanded loopback | ||
| `2001::85a3::7334` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | multiple :: | ||
| `12345::` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | hextet too long | ||
| `abcd:efgh::1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | non-hex character | ||
| `1:2:3:4:5:6:7` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ❌ | ✓ | too few hextets | ||
| `1:2:3:4:5:6:7:8:9` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | too many hextets | ||
| `:1:2:3:4:5:6:7` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | leading colon without :: | ||
| `1:2:3:4:5:6:7:` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | trailing colon without :: | ||
| `1:2:3::4:5:6:7:8` | ✓ | ❌ | ✓ | ✓ | ❌ | ✓ | ✓ | ✓ | too many hextets with :: | ||
| `1:2::4:5::8` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | multiple compressors :: | ||
| `:::` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | triple colon not allowed | ||
| `::g` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | invalid hex digit after compression | ||
| `2001:db8:85a3:0:0:8a2e:37023:7334` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | hextet exceeds 16 bits | ||
| `::ffff:999.0.2.128` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | invalid embedded IPv4 | ||
| `::ffff:192.0.2` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | truncated IPv4 in mapped address | ||
| `2001:db8:::` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | extra colon at end | ||
| `` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | empty string | ||
| Address | node:net | [`ip`](https://github.com/indutny/node-ip) | [`@webpod/ip`](https://github.com/webpod/ip) | [`@webpod/ip/core`](https://github.com/webpod/ip) | [`is-ip`](https://github.com/sindresorhus/is-ip) | [`ipaddr.js`](https://github.com/whitequark/ipaddr.js/) | [`ip-address`](https://github.com/beaugunderson/ip-address) | [`ip2buf`](https://github.com/reklatsmasters/ip2buf) | [`neoip`](https://github.com/Zaptic/neoip) | Comment | ||
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ||
| `::1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | loopback | ||
| `::` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | unspecified | ||
| `2001:db8::1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | documentation address | ||
| `fe80::1ff:fe23:4567:890a` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | link-local | ||
| `::ffff:192.0.2.128` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | IPv4-mapped IPv6 | ||
| `2001:0db8:85a3:0000:0000:8a2e:0370:7334` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | full form | ||
| `0:0:0:0:0:0:0:1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | expanded loopback | ||
| `2001::85a3::7334` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | multiple :: | ||
| `12345::` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | hextet too long | ||
| `abcd:efgh::1` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | non-hex character | ||
| `1:2:3:4:5:6:7` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ❌ | ✓ | too few hextets | ||
| `1:2:3:4:5:6:7:8:9` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | too many hextets | ||
| `:1:2:3:4:5:6:7` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | leading colon without :: | ||
| `1:2:3:4:5:6:7:` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | trailing colon without :: | ||
| `1:2:3::4:5:6:7:8` | ✓ | ❌ | ✓ | ✓ | ✓ | ❌ | ✓ | ✓ | ✓ | too many hextets with :: | ||
| `1:2::4:5::8` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | multiple compressors :: | ||
| `:::` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | triple colon not allowed | ||
| `::g` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | invalid hex digit after compression | ||
| `2001:db8:85a3:0:0:8a2e:37023:7334` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | hextet exceeds 16 bits | ||
| `::ffff:999.0.2.128` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | invalid embedded IPv4 | ||
| `::ffff:192.0.2` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | truncated IPv4 in mapped address | ||
| `2001:db8:::` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | extra colon at end | ||
| `` | ✓ | ❌ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | empty string | ||
| ## Private IP | ||
| Address | [`ip`](https://github.com/indutny/node-ip) | [`@webpod/ip`](https://github.com/webpod/ip) | [`ipaddr.js`](https://github.com/whitequark/ipaddr.js/) | [`neoip`](https://github.com/Zaptic/neoip) | Comment | ||
| --- | --- | --- | --- | --- | --- | ||
| `0.0.0.0` | ❌ | ✓ | ✓ | ✓ | unspecified | ||
| `127.0.0.1` | ✓ | ✓ | ✓ | ✓ | loopback | ||
| `127.0.0.2` | ✓ | ✓ | ✓ | ✓ | loopback range | ||
| `127.1.1.1` | ✓ | ✓ | ✓ | ✓ | loopback shorthand | ||
| `192.168.0.123` | ✓ | ✓ | ✓ | ✓ | private LAN | ||
| `192.168.122.123` | ✓ | ✓ | ✓ | ✓ | private LAN | ||
| `192.162.1.2` | ✓ | ✓ | ✓ | ✓ | public, outside 192.168/16 | ||
| `172.16.0.5` | ✓ | ✓ | ✓ | ✓ | private start | ||
| `172.16.123.254` | ✓ | ✓ | ✓ | ✓ | private inside | ||
| `171.16.0.5` | ✓ | ✓ | ✓ | ✓ | public, below range | ||
| `172.25.232.15` | ✓ | ✓ | ✓ | ✓ | private inside | ||
| `172.15.0.5` | ✓ | ✓ | ✓ | ✓ | public, below range | ||
| `172.32.0.5` | ✓ | ✓ | ✓ | ✓ | public, above range | ||
| `169.254.2.3` | ✓ | ✓ | ✓ | ✓ | link-local | ||
| `169.254.221.9` | ✓ | ✓ | ✓ | ✓ | link-local | ||
| `168.254.2.3` | ✓ | ✓ | ✓ | ✓ | public, outside 169.254/16 | ||
| `10.0.2.3` | ✓ | ✓ | ✓ | ✓ | private 10/8 | ||
| `10.1.23.45` | ✓ | ✓ | ✓ | ✓ | private 10/8 | ||
| `12.1.2.3` | ✓ | ✓ | ✓ | ✓ | public, outside 10/8 | ||
| `198.18.0.0` | ❌ | ✓ | ❌ | ✓ | benchmark range | ||
| `fd12:3456:789a:1::1` | ✓ | ✓ | ✓ | ✓ | ULA fc00::/7 | ||
| `fe80::f2de:f1ff:fe3f:307e` | ✓ | ✓ | ✓ | ✓ | link-local fe80::/10 | ||
| `::ffff:10.100.1.42` | ✓ | ✓ | ❌ | ✓ | IPv4-mapped private | ||
| `::FFFF:172.16.200.1` | ✓ | ✓ | ❌ | ✓ | IPv4-mapped private | ||
| `::ffff:192.168.0.1` | ✓ | ✓ | ❌ | ✓ | IPv4-mapped private | ||
| `165.225.132.33` | ✓ | ✓ | ✓ | ✓ | public | ||
| `::` | ✓ | ✓ | ✓ | ✓ | unspecified | ||
| `::1` | ✓ | ✓ | ✓ | ✓ | loopback | ||
| `fe80::1` | ✓ | ✓ | ✓ | ✓ | link-local | ||
| `0x7f.1` | ✓ | ✓ | ✓ | ✓ | CVE-2023-42282: hex loopback | ||
| `127.1` | ❌ | ✓ | ✓ | ✓ | CVE-2024-29415: short loopback | ||
| `2130706433` | ✓ | ✓ | ✓ | ✓ | CVE-2024-29415: integer loopback | ||
| `::fFFf:127.0.0.1` | ❌ | ✓ | ❌ | ✓ | CVE-2024-29415: IPv6-mapped loopback | ||
| `::0:ffff:127.0.0.1` | ❌ | ✓ | ❌ | ✓ | ↑ | ||
| `0::0:ffff:127.0.0.1` | ❌ | ✓ | ❌ | ✓ | ↑ | ||
| `0:0:0:0:0:ffff:127.0.0.1` | ❌ | ✓ | ❌ | ✓ | ↑ | ||
| `01200034567` | ✓ | n/a | ❌ | ❌ | invalid: octal-style | ||
| `012.1.2.3` | ✓ | n/a | ❌ | ❌ | invalid: octal-style IPv4 | ||
| `000:0:0000::01` | ❌ | ✓ | ✓ | ✓ | valid: zero-compression | ||
| `::fFFf:127.255.255.256` | ✓ | n/a | n/a | ✓ | invalid: IPv4 overflow | ||
| `017700000001` | ✓ | n/a | ❌ | ❌ | octal 127.0.0.1 | ||
| Address | [`ip`](https://github.com/indutny/node-ip) | [`@webpod/ip`](https://github.com/webpod/ip) | [`@webpod/ip/core`](https://github.com/webpod/ip) | [`ipaddr.js`](https://github.com/whitequark/ipaddr.js/) | [`neoip`](https://github.com/Zaptic/neoip) | Comment | ||
| --- | --- | --- | --- | --- | --- | --- | ||
| `0.0.0.0` | ❌ | ✓ | ✓ | ✓ | ✓ | unspecified | ||
| `127.0.0.1` | ✓ | ✓ | ✓ | ✓ | ✓ | loopback | ||
| `127.0.0.2` | ✓ | ✓ | ✓ | ✓ | ✓ | loopback range | ||
| `127.1.1.1` | ✓ | ✓ | ✓ | ✓ | ✓ | loopback shorthand | ||
| `192.168.0.123` | ✓ | ✓ | ✓ | ✓ | ✓ | private LAN | ||
| `192.168.122.123` | ✓ | ✓ | ✓ | ✓ | ✓ | private LAN | ||
| `192.162.1.2` | ✓ | ✓ | ✓ | ✓ | ✓ | public, outside 192.168/16 | ||
| `172.16.0.5` | ✓ | ✓ | ✓ | ✓ | ✓ | private start | ||
| `172.16.123.254` | ✓ | ✓ | ✓ | ✓ | ✓ | private inside | ||
| `171.16.0.5` | ✓ | ✓ | ✓ | ✓ | ✓ | public, below range | ||
| `172.25.232.15` | ✓ | ✓ | ✓ | ✓ | ✓ | private inside | ||
| `172.15.0.5` | ✓ | ✓ | ✓ | ✓ | ✓ | public, below range | ||
| `172.32.0.5` | ✓ | ✓ | ✓ | ✓ | ✓ | public, above range | ||
| `169.254.2.3` | ✓ | ✓ | ✓ | ✓ | ✓ | link-local | ||
| `169.254.221.9` | ✓ | ✓ | ✓ | ✓ | ✓ | link-local | ||
| `168.254.2.3` | ✓ | ✓ | ✓ | ✓ | ✓ | public, outside 169.254/16 | ||
| `10.0.2.3` | ✓ | ✓ | ✓ | ✓ | ✓ | private 10/8 | ||
| `10.1.23.45` | ✓ | ✓ | ✓ | ✓ | ✓ | private 10/8 | ||
| `12.1.2.3` | ✓ | ✓ | ✓ | ✓ | ✓ | public, outside 10/8 | ||
| `198.18.0.0` | ❌ | ✓ | ✓ | ❌ | ✓ | benchmark range | ||
| `fd12:3456:789a:1::1` | ✓ | ✓ | ✓ | ✓ | ✓ | ULA fc00::/7 | ||
| `fe80::f2de:f1ff:fe3f:307e` | ✓ | ✓ | ✓ | ✓ | ✓ | link-local fe80::/10 | ||
| `::ffff:10.100.1.42` | ✓ | ✓ | ✓ | ❌ | ✓ | IPv4-mapped private | ||
| `::FFFF:172.16.200.1` | ✓ | ✓ | ✓ | ❌ | ✓ | IPv4-mapped private | ||
| `::ffff:192.168.0.1` | ✓ | ✓ | ✓ | ❌ | ✓ | IPv4-mapped private | ||
| `165.225.132.33` | ✓ | ✓ | ✓ | ✓ | ✓ | public | ||
| `::` | ✓ | ✓ | ✓ | ✓ | ✓ | unspecified | ||
| `::1` | ✓ | ✓ | ✓ | ✓ | ✓ | loopback | ||
| `fe80::1` | ✓ | ✓ | ✓ | ✓ | ✓ | link-local | ||
| `0x7f.1` | ✓ | ✓ | ✓ | ✓ | ✓ | CVE-2023-42282: hex loopback | ||
| `127.1` | ❌ | ✓ | ✓ | ✓ | ✓ | CVE-2024-29415: short loopback | ||
| `2130706433` | ✓ | ✓ | ✓ | ✓ | ✓ | CVE-2024-29415: integer loopback | ||
| `::fFFf:127.0.0.1` | ❌ | ✓ | ✓ | ❌ | ✓ | CVE-2024-29415: IPv6-mapped loopback | ||
| `::0:ffff:127.0.0.1` | ❌ | ✓ | ✓ | ❌ | ✓ | ↑ | ||
| `0::0:ffff:127.0.0.1` | ❌ | ✓ | ✓ | ❌ | ✓ | ↑ | ||
| `0:0:0:0:0:ffff:127.0.0.1` | ❌ | ✓ | ✓ | ❌ | ✓ | ↑ | ||
| `017700000001` | ✓ | n/a | n/a | ❌ | ❌ | octal 127.0.0.1 | ||
| `01200034567` | ✓ | n/a | n/a | ❌ | ❌ | invalid: octal-style | ||
| `012.1.2.3` | ✓ | n/a | n/a | ❌ | ❌ | invalid: octal-style IPv4 | ||
| `000:0:0000::01` | ❌ | ✓ | ✓ | ✓ | ✓ | valid: zero-compression | ||
| `::fFFf:127.255.255.256` | ✓ | n/a | n/a | n/a | ✓ | invalid: IPv4 overflow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable
IPV4_LEN_LIMis referenced but not defined in the visible context. This will cause a runtime error if the constant is not properly defined elsewhere in the file.