[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#183814: libc6: getaddrinfo can't parse all forms of numeric ip addresses



gsstark <gsstark@mit.edu> writes:

> Package: libc6
> Version: 2.3.1-10
> Severity: normal

> The test program below shows a limitation of the getaddrinfo function,
> it doesn't seem to parse numeric ip addresses that aren't formatted
> using four separate dotted quads. This is a big regression as
> traditionally this is how lots of networks specified their ip
> addresses. Most standard programs do support this notation.

This is the intentional behavior of getaddrinfo according to POSIX as I
understand it.  All of the new interfaces that were developed as part of
the IPv6 efforts do not support the legacy IPv4 address formats such as
omitting octets, specifying octets in octal, specifying octets in
hexidecimal, specifying IP addresses as decimal numbers, and all the other
bizarre things that inet_aton used to support.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>



Reply to: