Module: wine Branch: master Commit: 859f9daada0292a2ce69e5302424905f3b1e335d URL: https://source.winehq.org/git/wine.git/?a=commit;h=859f9daada0292a2ce69e5302...
Author: Hans Leidekker hans@codeweavers.com Date: Tue Nov 30 17:29:08 2021 +0100
winhttp: Use DNS only for proxy auto-detection.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52133 Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winhttp/session.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index 3c8cb0fa992..2620bf30ac0 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -1466,7 +1466,7 @@ static WCHAR *detect_autoproxyconfig_url_dns(void) while ((p = strchr( p, '.' )) && is_domain_suffix( p + 1, domain )) { char *name; - struct addrinfo *ai; + struct addrinfo *ai, hints; int res;
if (!(name = malloc( sizeof("wpad") + strlen(p) ))) @@ -1477,7 +1477,10 @@ static WCHAR *detect_autoproxyconfig_url_dns(void) } strcpy( name, "wpad" ); strcat( name, p ); - res = getaddrinfo( name, NULL, NULL, &ai ); + memset( &hints, 0, sizeof(hints) ); + hints.ai_flags = AI_ALL | AI_DNS_ONLY; + hints.ai_family = AF_UNSPEC; + res = getaddrinfo( name, NULL, &hints, &ai ); if (!res) { ret = build_wpad_url( name, ai );