Skip to content

Commit 426bdba

Browse files
sfan5nerzhul
authored andcommittedMar 18, 2019
httpfetch: Disable IPv6 here too if requested by settings (#8399)
1 parent c0fb5dd commit 426bdba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

Diff for: ‎src/httpfetch.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ HTTPFetchOngoing::HTTPFetchOngoing(const HTTPFetchRequest &request_,
253253
curl_easy_setopt(curl, CURLOPT_INTERFACE, bind_address.c_str());
254254
}
255255

256+
if (!g_settings->getBool("enable_ipv6")) {
257+
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
258+
}
259+
256260
#if LIBCURL_VERSION_NUM >= 0x071304
257261
// Restrict protocols so that curl vulnerabilities in
258262
// other protocols don't affect us.

0 commit comments

Comments
 (0)
Please sign in to comment.