3 ms·
So instead of allowing octal addresses (as I assume the spec allows), they outright disable it?
by colejohnson66 5y ago
So 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