Merge branch 'ew/force-ipv4'
"git fetch" and friends that make network connections can now be told to only use ipv4 (or ipv6). * ew/force-ipv4: connect & http: support -4 and -6 switches for remote operations
This commit is contained in:
@ -119,6 +119,19 @@ static int set_option(const char *name, const char *value)
|
||||
else
|
||||
return -1;
|
||||
return 0;
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x070a08
|
||||
} else if (!strcmp(name, "family")) {
|
||||
if (!strcmp(value, "ipv4"))
|
||||
git_curl_ipresolve = CURL_IPRESOLVE_V4;
|
||||
else if (!strcmp(value, "ipv6"))
|
||||
git_curl_ipresolve = CURL_IPRESOLVE_V6;
|
||||
else if (!strcmp(value, "all"))
|
||||
git_curl_ipresolve = CURL_IPRESOLVE_WHATEVER;
|
||||
else
|
||||
return -1;
|
||||
return 0;
|
||||
#endif /* LIBCURL_VERSION_NUM >= 0x070a08 */
|
||||
} else {
|
||||
return 1 /* unsupported */;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user