Closed
Bug 825501
Opened 12 years ago
Closed 11 years ago
Cannot connect to any hosts via a local proxy on http://localhost if the localhost is a dual-stack host
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla21
Tracking | Status | |
---|---|---|
firefox20 | --- | affected |
People
(Reporter: emk, Assigned: emk)
References
(Depends on 1 open bug)
Details
(Keywords: regression)
Attachments
(4 files)
The first broken changeset: http://hg.mozilla.org/integration/mozilla-inbound/rev/e4f69649d417 If I set the IP address (either "127.0.0.1" or "::1") as a proxy location instead of the DNS name ("localhost"), the problem does not occur.
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Comment 2•12 years ago
|
||
Assignee | ||
Comment 3•12 years ago
|
||
Assignee | ||
Comment 4•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e4f69649d417#l3.12 > 3.12 + if ((af != PR_AF_INET) && (flags & RESOLVE_DISABLE_IPV4)) > 3.13 + af = PR_AF_INET6; > 3.14 + This change cannot work because NSPR doesn't support PR_AF_INET6! https://mxr.mozilla.org/mozilla-central/source/nsprpub/pr/src/misc/prnetdb.c?rev=a032bf27fa05&mark=1983-1983#1978
Assignee | ||
Comment 5•12 years ago
|
||
Assignee | ||
Comment 6•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=5d8ac073a6e9
Assignee | ||
Updated•12 years ago
|
status-firefox20:
--- → affected
tracking-firefox20:
--- → ?
Updated•11 years ago
|
Comment 7•11 years ago
|
||
I cannot test this patch, so I'm not very much willing to review it. I'm going to back bug 725587 out, since it is too late in the release cycle now.
Assignee | ||
Comment 8•11 years ago
|
||
The test should be possible only on localhost.
Comment 9•11 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #8) > The test should be possible only on localhost. As I understand you are on Windows and are using a proxy that is capable of accepting connections on ::1, right? What proxy is that?
Assignee | ||
Comment 10•11 years ago
|
||
A self-made proxy :) Seriously, nsServerSocket could create a server on IPv6 addresses, no? https://mxr.mozilla.org/mozilla-central/source/netwerk/base/src/nsServerSocket.cpp?rev=7f5fad93ef78#265
Comment 11•11 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #7) > I cannot test this patch, so I'm not very much willing to review it. > > I'm going to back bug 725587 out, since it is too late in the release cycle > now. can you please confirm this was backed out in which case this bug will no longer be tracked as Firefox20 will be unaffected. Thanks! It appears to me it was backed out https://bugzilla.mozilla.org/show_bug.cgi?id=725587#c20 but will be helpful if you can confirm
Comment 12•11 years ago
|
||
(In reply to bhavana bajaj [:bajaj] from comment #11) > (In reply to Honza Bambas (:mayhemer) from comment #7) > > I cannot test this patch, so I'm not very much willing to review it. > > > > I'm going to back bug 725587 out, since it is too late in the release cycle > > now. > > can you please confirm this was backed out in which case this bug will no > longer be tracked as Firefox20 will be unaffected. Thanks! > > It appears to me it was backed out > https://bugzilla.mozilla.org/show_bug.cgi?id=725587#c20 but will be helpful > if you can confirm Yes, it has been backed out, untracking.
tracking-firefox20:
+ → ---
Comment 13•11 years ago
|
||
Comment on attachment 696667 [details] [diff] [review] Remove IPv4 records manually because PR_GetAddrInfoByName dislike PR_AF_INET6 Review of attachment 696667 [details] [diff] [review]: ----------------------------------------------------------------- r=honzab Masatoshi, thanks! Can you please open a new bug for making this work directly in NSPR?
Attachment #696667 -
Flags: review?(honzab.moz) → review+
Assignee | ||
Comment 14•11 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #13) > Can you please open a new bug for making this work directly in NSPR? Filed bug 834013. But do we still need the NSPR abstraction here? All supported platforms natively support getaddrinfo() now. Another idea is using always (PR_)AF_UNSPEC. At present our hostname cache have a cache entry for each address family even if the hostname is the same. We are sending DNS queries to the server twice (one for AF_UNSPEC, another one for either AF_INET6 or AF_INET). I think it's suboptimal.
Comment 15•11 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #14) > (In reply to Honza Bambas (:mayhemer) from comment #13) > > Can you please open a new bug for making this work directly in NSPR? > > Filed bug 834013. But do we still need the NSPR abstraction here? All > supported platforms natively support getaddrinfo() now. > > Another idea is using always (PR_)AF_UNSPEC. At present our hostname cache > have a cache entry for each address family even if the hostname is the same. > We are sending DNS queries to the server twice (one for AF_UNSPEC, another > one for either AF_INET6 or AF_INET). I think it's suboptimal. Yes, worth to confirm this and probably change the logic a bit. As I understand, you want to do UNSPEC query but let NECKO select families from the list based on demanded flags? If that is so, it sounds definitely as a good idea. Anyway, it's a larger project and we would like to land the h-eyeball fix soon. So let's take this patch now. Please create one more new bug for your idea on the optimization. Thanks!
Assignee | ||
Comment 16•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d6469d32b385
Assignee | ||
Comment 17•11 years ago
|
||
We should really have a test to prevent future regression.
Flags: in-testsuite?
Assignee | ||
Comment 18•11 years ago
|
||
Filed bug 834490 for a further improvement.
Comment 19•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d6469d32b385
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•