4 ms·
They look better in decimal encoding, personally. http://3509828724/ http://3509828724/ If you feel sadistic, it's also legal to use octal encoding. http://0
by RL_Quine 5y ago
They look better in decimal encoding, personally.
http://3509828724/ http://3509828724/
If you feel sadistic, it's also legal to use octal encoding.
http://0321.0063.0274.0164/ http://0321.0063.0274.0164/
- salzig 5y agoi like to confuse co-workers sometimes by using http://0177.0.0.1 http://0177.0.0.1 for localhost ^^
- sigjuice 5y agoAlso http://0177.1 http://0177.1
- Sharlin 5y agoRust now outright disallows leading zeroes in IPv4 dotted-decimal due to https://cve.report/CVE-2021-29922 https://cve.report/CVE-2021-29922
- colejohnson66 5y agoSo instead of allowing octal addresses (as I assume the spec allows), they outright disable it?
- Sharlin 5y agoThe IPv4 spec does not mention octal (or hexadecimal) notation at all; allowed forms are purely determined by individual APIS or user interfaces. POSIX `inet_addr` (and non-POSIX `inet_aton`) support nondecimal notation; the more recent POSIX `inet_pton` does not (but supports both IPv4 and IPv6 addresses). Support of oct and hex notation in the older APIs is mostly a historical accident. RFC 6943 recommends only supporting what they call "strict format" in newly written code [1]. [1] https://datatracker.ietf.org/doc/html/rfc6943#section-3.1.1 https://datatracker.ietf.org/doc/html/rfc6943#section-3.1.1