Closed Bug 697415 Opened 13 years ago Closed 8 years ago

Windows dual stack hosts with Teredo tunneling enabled don't resolve IPv6 hosts - use AI_ALL flag for GetAddrInfo

Categories

(NSPR :: NSPR, defect)

All
Windows 7
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mayhemer, Assigned: mayhemer)

References

()

Details

Attachments

(1 file)

Attached patch v1Splinter Review
This is experimental.  

During work on happy eyeballs patch I was playing with my Windows 7 machine fully able to communicate ipv6 through the virtual ipv6 bridge.  To note, my ISP doesn't directly support IPv6.

I am able to connect and communicate via ipv6 addresses like 2a00:1450:8007::63 (that is ipv6.google.com) using putty and get a content from server running on that address.  To get the address I instructed nslookup to look for all types of records (set type=all).

I was wondering why Firefox is not able to connect ipv6.google.com when it is actually physically possible.


The solution for this is to use AI_ALL flag when calling GetAddrInfo.

That completely made possible to connect http://ipv6.google.com/ and get content from that site.  Also http://ipv6-test.com/ tells me that I'm IPv6 capable thought Teredo tunnel.

No other browser (IE/CH/Fx7) is capable of that.

Question is, why aren't we and anyone else already doing that?  Is it worth to set this flag?

I have only tested on my Windows 7 IPv6 bridged machine.  Didn't try on WinXP, other systems.
Attachment #569658 - Flags: feedback?(wtc)
Updating summary.  

I can perfectly see the symptoms on my Win7 machine with working Teredo tunneling interface.  

The host is able of pinging ipv6 addresses ; when nslookup is instructed for 'set type=all', it can also resolve e.g. ipv6.google.com to an IPv6 address.  

However, none of the browsers is actually able to connect the site.  

AI_ALL on GetAddrInfo makes it possible in Firefox.
OS: All → Windows 7
Summary: Use AI_ALL flag for GetAddrInfo → Windows dual stack hosts with Teredo tunneling enabled don't resolve IPv6 hosts - use AI_ALL flag for GetAddrInfo
Found an article on Microsoft's Tech Net why GetAddrInfo behaves this way on Windows.  

It seems that MS is not willing to implicitly use Teredo tunnel for IPv6 connectivity.  Teredo is meant as a "last resort for IPv6":

"The DNS Client service in Windows Vista has been designed to minimize the impact on DNS servers when performing DNS name queries through the following behavior:

    * If the host has only link-local or Teredo IPv6 addresses assigned, the DNS Client service sends a single query for A records.

    * If the host has at least one IPv6 address assigned that is not a link-local or Teredo address, the DNS Client service sends a DNS query for A records and then a separate DNS query to the same DNS server for AAAA records. If an A record query times out or has an error (other than name not found), the corresponding AAAA record query is not sent."

Until applications, as e.g. ping with -6 argument, are not explicitly instructed to use IPv6, Teredo is not considered and lookups are made only for A records.

So, we might consider to add a pref (at Gecko) to use IPv6 (+4) explicitly.

At the moment, I don't know how this flag influences Linux/Unix/Mac systems.
Comment on attachment 569658 [details] [diff] [review]
v1

Dropping f request, but I still would be interested in opinions.
Attachment #569658 - Flags: feedback?(wtc)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: