Re:IPv4 addresses are silly, inet_aton(3) doubly so
by Sharlin on Wednesday November 03, 2021 @08:02AM
(#29093474)
Rust now outright disallows leading zeroes in IPv4 dotted-decimal due to https://cve.report/CVE-2021-29922
Re:IPv4 addresses are silly, inet_aton(3) doubly so
by colejohnson66 on Wednesday November 03, 2021 @08:18AM
(#29093587)
So instead of allowing octal addresses (as I assume the spec allows), they outright disable it?
Re:IPv4 addresses are silly, inet_aton(3) doubly so
by Sharlin on Wednesday November 03, 2021 @08:45AM
(#29093809)
The 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
Re:IPv4 addresses are silly, inet_aton(3) doubly so
by salzig on Wednesday November 03, 2021 @07:23AM
(#29093185)
i like to confuse co-workers sometimes by using http://0177.0.0.1 for localhost ^^
Re:IPv4 addresses are silly, inet_aton(3) doubly so
by sigjuice on Wednesday November 03, 2021 @02:05PM
(#29098276)
Also http://0177.1
http://3509828724/
If you feel sadistic, it's also legal to use octal encoding.
http://0321.0063.0274.0164/