Subject: [PATCH] do not pass AI_CANONNAME to getaddrinfo()
In some cases this flag causes libc to do reverse DNS lookup the result of which is not used.
This commit is contained in:
parent
341f280662
commit
27115c3258
3 changed files with 0 additions and 3 deletions
|
@ -20,7 +20,6 @@ lws_getaddrinfo46(struct lws *wsi, const char *ads, struct addrinfo **result)
|
|||
{
|
||||
hints.ai_family = PF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_flags = AI_CANONNAME;
|
||||
}
|
||||
|
||||
return getaddrinfo(ads, NULL, &hints, result);
|
||||
|
|
|
@ -970,7 +970,6 @@ lws_get_addresses(struct lws_vhost *vh, void *ads, char *name,
|
|||
memset(&ai, 0, sizeof ai);
|
||||
ai.ai_family = PF_UNSPEC;
|
||||
ai.ai_socktype = SOCK_STREAM;
|
||||
ai.ai_flags = AI_CANONNAME;
|
||||
#if !defined(LWS_WITH_ESP32)
|
||||
if (getnameinfo((struct sockaddr *)ads,
|
||||
sizeof(struct sockaddr_in),
|
||||
|
|
|
@ -672,7 +672,6 @@ handle_accept(int n)
|
|||
memset (&ai, 0, sizeof ai);
|
||||
ai.ai_family = PF_UNSPEC;
|
||||
ai.ai_socktype = SOCK_STREAM;
|
||||
ai.ai_flags = AI_CANONNAME;
|
||||
|
||||
if (getaddrinfo(s->address, NULL, &ai, &result)) {
|
||||
lwsl_notice("failed to lookup %s\n",
|
||||
|
|
Loading…
Add table
Reference in a new issue