Skip to content

Commit

Permalink
httpfetch: Disable IPv6 here too if requested by settings (minetest#8399
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sfan5 authored and rubenwardy committed Mar 19, 2019
1 parent 1ae0335 commit 57e0f52
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/httpfetch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 57e0f52

Please sign in to comment.