[issue27612] socket.gethostbyname resolving octal IP addresses incorrectly

Ronald Oussoren report at bugs.python.org
Tue Jul 26 04:16:26 EDT 2016


Ronald Oussoren added the comment:

For what it is worth: the relevant standard says that octal and hexadecimal addresses should be accepted (POSIX getaddrinfo refers to inet_addr for numeric IP addresses and that says that octal and hexadecimal numbers are valid in IP addresses), see:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/inet_addr.html#

Adding a implementation note to the documentation might be useful, but it should IMHO only mention that the platform getaddrinfo is used in the implementation for the Python functions and should not mention specific platforms because we don't have the processes to keep such specific notes up-to-date.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27612>
_______________________________________


More information about the Python-bugs-list mailing list