diff options
author | sfan5 <sfan5@live.de> | 2019-03-18 15:06:27 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2019-03-19 02:18:34 +0000 |
commit | 57e0f52aaad7a0dc7738cfa20cfc304294f41e93 (patch) | |
tree | 3499d5a2431f9ccd8028db87183a217c21a17fb2 | |
parent | 1ae0335b626e1c9f31cbaf45509099e4676f2d1a (diff) | |
download | minetest-57e0f52aaad7a0dc7738cfa20cfc304294f41e93.tar.gz minetest-57e0f52aaad7a0dc7738cfa20cfc304294f41e93.tar.bz2 minetest-57e0f52aaad7a0dc7738cfa20cfc304294f41e93.zip |
httpfetch: Disable IPv6 here too if requested by settings (#8399)
-rw-r--r-- | src/httpfetch.cpp | 4 |
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. |