Skip to content

Commit

Permalink
httpfetch: Disable IPv6 here too if requested by settings (#8399)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 authored and nerzhul committed Mar 18, 2019
1 parent c0fb5dd commit 426bdba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/httpfetch.cpp
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 426bdba

Please sign in to comment.