Red Hat Bugzilla – Bug 16829
inet_ntoa() reports successful translation for some invalid ip numbers
Last modified: 2008-05-01 11:37:58 EDT
inet_ntoa() returns 1 (success) when called with a parameter that is just the initial
part of an IP number. For instance, it claims to correctly convert each of "129.79.",
"129.79", and "1". I don't know whether this is the BSD behavior, or whether it is
intended, but it at least doesn't seem to be consistent with the manual, which specifies
that the argument is an Internet host address in "standard numbers-and-dots notation."
The standard does not specify it actually, this behaviour matches
BIND and Solaris behaviour. E.g. Irix accepts a trailing dot as well.