git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-fetch vs ipv6 routing issues

From
James Cloos <cloos@jhcloos.com>
Date
Jun 3, 2008, 19:53 UTC
Message-ID
<m3wsl6guqg.fsf@lugabout.jhcloos.org>
In-Reply-To
<alpine.LRH.1.10.0806010924340.27605@yvahk3.pbagnpgbe.fr>
>>>>> "Daniel" == Daniel Stenberg <daniel@haxx.se> writes:
>> 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 <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6
Previous: Daniel StenbergNext: Daniel Stenberg
Message 3 of 5 in “git-fetch vs ipv6 routing issues”
  1. James CloosMay 31, 2008
  2. Daniel StenbergJun 1, 2008
  3. James CloosJun 3, 2008
  4. Daniel StenbergJun 3, 2008
  5. James CloosJun 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.