[issue20418] socket.getaddrinfo fails for hostname that is all digits 0-9

R. David Murray report at bugs.python.org
Tue Jan 28 18:36:18 CET 2014


R. David Murray added the comment:

getaddrinfo is a thin wrapper around the system call.  Have you tried the same thing in a C program and had it work?

My guess would be that the all-numeric 'hostname' is being treated as the integer form of an IP address.  I can't immediately find any documentation that addresses this for getaddrinfo, but the impression I get from googling is that turning numbers into ip addresses is not specified behavior but is what (most?) libc implementations do.

----------
nosy: +r.david.murray

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


More information about the Python-bugs-list mailing list