* git-fetch vs ipv6 routing issues
@ 2008-05-31 17:56 James Cloos
2008-06-01 7:25 ` Daniel Stenberg
0 siblings, 1 reply; 5+ messages in thread
From: James Cloos @ 2008-05-31 17:56 UTC (permalink / raw)
To: git
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.
(I'm currently running bdb87afb4b4 from last month but will be updating
later today. I don't see any relevant changes in the git log between
then and now.)
-JimC
--
cloos@jhcloos.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-fetch vs ipv6 routing issues
2008-05-31 17:56 git-fetch vs ipv6 routing issues James Cloos
@ 2008-06-01 7:25 ` Daniel Stenberg
2008-06-03 19:53 ` James Cloos
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Stenberg @ 2008-06-01 7:25 UTC (permalink / raw)
To: James Cloos; +Cc: git
On Sat, 31 May 2008, James Cloos wrote:
> 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.
Isn't this simply because libcurl (used for http) has no retry functionality
on this scenario while git itself has that for the git protocol?
--
/ daniel.haxx.se
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-fetch vs ipv6 routing issues
2008-06-01 7:25 ` Daniel Stenberg
@ 2008-06-03 19:53 ` James Cloos
2008-06-03 20:50 ` Daniel Stenberg
0 siblings, 1 reply; 5+ messages in thread
From: James Cloos @ 2008-06-03 19:53 UTC (permalink / raw)
To: git; +Cc: Daniel Stenberg
>>>>> "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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-fetch vs ipv6 routing issues
2008-06-03 19:53 ` James Cloos
@ 2008-06-03 20:50 ` Daniel Stenberg
2008-06-03 23:56 ` James Cloos
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Stenberg @ 2008-06-03 20:50 UTC (permalink / raw)
To: James Cloos; +Cc: git
On Tue, 3 Jun 2008, James Cloos wrote:
> 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.
Perhaps, but I thought the git protocol behavior was to dynamicly back off a
failed connect attempt to try the next? That wouldn't be solvable with any
preset option. It needs code added to/changed in libcurl.
> 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.
Eeek. I really disagree with this suggestion. CURLOPT_CONNECT_ONLY means you
only (TCP or over proxy) connect and nothing more. That would force git to
implement a lot of HTTP details that libcurl already provides.
If you really really insist on letting git do it and not bring this feature to
libcurl, then I'd suggest that you first resolve the host, verify it by any
means you see fit, and then pass the IP to libcurl like in the URL as
"HTTP://12.23.45.67/blabla" with the correct host name in a custom-provided
host: header. It'd let you do the resolving magic and let libcurl do the HTTP
magic. But I wouldn't recommend that either...
--
/ daniel.haxx.se - primary libcurl author
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git-fetch vs ipv6 routing issues
2008-06-03 20:50 ` Daniel Stenberg
@ 2008-06-03 23:56 ` James Cloos
0 siblings, 0 replies; 5+ messages in thread
From: James Cloos @ 2008-06-03 23:56 UTC (permalink / raw)
To: git; +Cc: Daniel Stenberg
>>>>> "Daniel" == Daniel Stenberg <daniel@haxx.se> writes:
Daniel> Eeek. I really disagree with this suggestion. CURLOPT_CONNECT_ONLY
Daniel> means you only (TCP or over proxy) connect and nothing more. That
Daniel> would force git to implement a lot of HTTP details that libcurl
Daniel> already provides.
OK. Then I misread that section of the curl_easy_setopt(3) man page.
I do think git should be able to do this even when compiled against
legacy versions of libcurl, though.
(Of course, even better would be the ability to aviod http altogether.
But some projects I track are only available via http urls....)
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-06-03 23:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-31 17:56 git-fetch vs ipv6 routing issues James Cloos
2008-06-01 7:25 ` Daniel Stenberg
2008-06-03 19:53 ` James Cloos
2008-06-03 20:50 ` Daniel Stenberg
2008-06-03 23:56 ` James Cloos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox