summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2010-08-25 07:38:15 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2010-08-25 07:38:15 (GMT)
commit112c0f34119fb2fe127bf54393bf06f5c334836a (patch)
treea21cf53d8d41f693b91c59a370c189273504bc89 /Modules
parent219d1c8ae320bf1b016f4a4fc5dee50f729048be (diff)
downloadcpython-112c0f34119fb2fe127bf54393bf06f5c334836a.zip
cpython-112c0f34119fb2fe127bf54393bf06f5c334836a.tar.gz
cpython-112c0f34119fb2fe127bf54393bf06f5c334836a.tar.bz2
Issue #1027206: getnameinfo is now restricted to numeric addresses as input.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 709c85e..8c743d8 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -3969,6 +3969,7 @@ socket_getnameinfo(PyObject *self, PyObject *args)
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);