Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 64277:2ccd043aad5c
Issue #1027206: getnameinfo is now restricted to numeric addresses as input.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Wed, 25 Aug 2010 07:38:15 +0000 |
| parents | 35304c2fe9e0 |
| children | 7d1752d62050 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Wed Aug 25 00:45:55 2010 +0000 +++ b/Modules/socketmodule.c Wed Aug 25 07:38:15 2010 +0000 @@ -3969,6 +3969,7 @@ memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; /* make numeric port happy */ + hints.ai_flags = AI_NUMERICHOST; /* don't do any name resolution */ Py_BEGIN_ALLOW_THREADS ACQUIRE_GETADDRINFO_LOCK error = getaddrinfo(hostp, pbuf, &hints, &res);
