mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Remove redundant code for getnameinfo() replacement
Our getnameinfo() replacement implementation in getaddrinfo.c failed unless NI_NUMERICHOST and NI_NUMERICSERV were given as flags, because it doesn't resolve host names, only numeric IPs. But per standard, when those flags are not given, an implementation can still degrade to not returning host names, so this restriction is unnecessary. When we remove it, we can eliminate some code in postmaster.c that apparently tried to work around that.
This commit is contained in:
@ -373,11 +373,6 @@ getnameinfo(const struct sockaddr * sa, int salen,
|
||||
if (sa == NULL || (node == NULL && service == NULL))
|
||||
return EAI_FAIL;
|
||||
|
||||
/* We don't support those. */
|
||||
if ((node && !(flags & NI_NUMERICHOST))
|
||||
|| (service && !(flags & NI_NUMERICSERV)))
|
||||
return EAI_FAIL;
|
||||
|
||||
#ifdef HAVE_IPV6
|
||||
if (sa->sa_family == AF_INET6)
|
||||
return EAI_FAMILY;
|
||||
|
Reference in New Issue
Block a user