From 3233df9c6c0987582b7127f1e68cb1f4b058dc59 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 23 May 2025 16:43:24 +0200 Subject: [PATCH] do not resolve ipv4 in curl when using ipv6 --- src/http-mserv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/http-mserv.c b/src/http-mserv.c index 30a6f977d..61db5b103 100644 --- a/src/http-mserv.c +++ b/src/http-mserv.c @@ -220,7 +220,11 @@ HMS_connect (const char *format, ...) curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); - curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); + +#ifdef HAVE_IPV6 + if (!M_CheckParm("-ipv6")) +#endif + curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); curl_easy_setopt(curl, CURLOPT_TIMEOUT, cv_masterserver_timeout.value); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HMS_on_read);