mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #1027206: getnameinfo is now restricted to numeric addresses as input.
This commit is contained in:
parent
219d1c8ae3
commit
112c0f3411
3 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue