Hans Leidekker : wininet: Use DNS only for proxy auto-detection.

Alexandre Julliard julliard at winehq.org
Tue Nov 30 16:18:51 CST 2021


Module: wine
Branch: master
Commit: d13ec212c3311f671d4519f4d81833635f12505d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d13ec212c3311f671d4519f4d81833635f12505d

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue Nov 30 17:29:09 2021 +0100

wininet: Use DNS only for proxy auto-detection.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52133
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wininet/internet.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index 46fbe86f549..b0fe8a5e3fb 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -2431,7 +2431,7 @@ static WCHAR *detect_proxy_autoconfig_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 = heap_alloc( sizeof("wpad") + strlen(p) )))
@@ -2442,7 +2442,10 @@ static WCHAR *detect_proxy_autoconfig_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 );




More information about the wine-cvs mailing list