port numbers should always be interpreted as decimal
authorRich Felker <dalias@aerifal.cx>
Mon, 1 Aug 2011 04:11:25 +0000 (00:11 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 1 Aug 2011 04:11:25 +0000 (00:11 -0400)
commitf4e8e64b82a85158d9de884e1765474c0c317d19
tree8d4f8c6c7857bd688c45d703dbdeed521e5af44e
parente95b0a9d1077b3d20d1b6efebe5135eb99a8b7ef
port numbers should always be interpreted as decimal

per POSIX and RFC 3493:

If the specified address family is AF_INET, AF_INET6, or AF_UNSPEC,
the service can be specified as a string specifying a decimal port
number.

021 is a valid decimal number, therefore, interpreting it as octal
seems to be non-conformant.
src/network/getaddrinfo.c