From: Lukasz Kawczynski Date: Thu, 8 Dec 2016 13:48:12 +0000 (+0000) Subject: Honour Acquire::ForceIPv4/6 in the https transport X-Git-Tag: 1.4_beta3~24^2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/49b91f6903804183dbe1abb12ce1f9803a3dee5f?ds=sidebyside;hp=--cc Honour Acquire::ForceIPv4/6 in the https transport --- 49b91f6903804183dbe1abb12ce1f9803a3dee5f diff --git a/methods/https.cc b/methods/https.cc index b2d05136c..1bdd394ad 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -361,6 +361,11 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, DL_MIN_SPEED); curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, timeout); + if(_config->FindB("Acquire::ForceIPv4", false) == true) + curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); + else if(_config->FindB("Acquire::ForceIPv6", false) == true) + curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6); + // debug if (Debug == true) curl_easy_setopt(curl, CURLOPT_VERBOSE, true);