Re: git-fetch vs ipv6 routing issues
From: James Cloos <hidden>
Date: 2016-06-15 22:44:40
quoted
quoted
quoted
quoted
"Daniel" == Daniel Stenberg [off-list ref] writes:
quoted
I just noticed that, given a remote URL with a hostname which has both A and AAAA RRs in the DNS, git-fetch will retry a git-protocol fetch using the v4 address if the v6 address is unreachable, but will not do so when the remote is an http URL.
Daniel> Isn't this simply because libcurl (used for http) has no retry Daniel> functionality on this scenario while git itself has that for the Daniel> git protocol? Yes, that is true. But git could be smarter about it. libcurl has CURLOPT_IPRESOLVE which can be set to any of CURL_IPRESOLVE_WHATEVER, CURL_IPRESOLVE_V4 or CURL_IPRESOLVE_V6. Git could at least allow setting that via a config option and/or an env var, just like it does for libcurl options like CURLOPT_LOW_SPEED_LIMIT. Even better would be to set CURLOPT_CONNECT_ONLY and then try with CURL_IPRESOLVE_WHATEVER, CURL_IPRESOLVE_V6 and CURL_IPRESOLVE_V4 in turn until it gets a connection, and then use CURLINFO_LASTSOCKET and the full URL to do the GET. -JimC -- James Cloos [off-list ref] OpenPGP: 1024D/ED7DAEA6