aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2019-03-18 15:06:27 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2019-03-18 15:06:27 +0100
commit426bdba7fb90ce97b8bbdf102d770c4e8a27d8c1 (patch)
treea4675423a5a35cb19e3cfaaa85fdd0b43c00f215 /src
parentc0fb5dd3179a0cf70457f5948c0aaca69cbf4c0c (diff)
downloadminetest-426bdba7fb90ce97b8bbdf102d770c4e8a27d8c1.tar.gz
minetest-426bdba7fb90ce97b8bbdf102d770c4e8a27d8c1.tar.bz2
minetest-426bdba7fb90ce97b8bbdf102d770c4e8a27d8c1.zip
httpfetch: Disable IPv6 here too if requested by settings (#8399)
Diffstat (limited to 'src')
-rw-r--r--src/httpfetch.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp
index 6b67e0e13..326b5052f 100644
--- a/src/httpfetch.cpp
+++ b/src/httpfetch.cpp
@@ -253,6 +253,10 @@ HTTPFetchOngoing::HTTPFetchOngoing(const HTTPFetchRequest &request_,
curl_easy_setopt(curl, CURLOPT_INTERFACE, bind_address.c_str());
}
+ if (!g_settings->getBool("enable_ipv6")) {
+ curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
+ }
+
#if LIBCURL_VERSION_NUM >= 0x071304
// Restrict protocols so that curl vulnerabilities in
// other protocols don't affect us.