On Wed, 2 Dec 2015, Fatemah Alharbi wrote:
> I’m using the latest version of Firefox on my Windows 10 Home edition and
> Linux Ubuntu 14.04 LTS desktops. I noticed that Firefox always sends two DNS
> requests: A and AAAA requests. I did an experiment to see which API is used
> by Firefox and found that the API getaddrinfo() does send 2 DNS requests on
> my Linux machine while it sends only one A request on my Windows machine.
> This doesn’t guarantee that Firefox always uses this API. Does Firefox uses
> multiple APIs depending on the OS? I would like to know which API does
> Firefox use when sending DNS requests.
Firefox uses getaddrinfo() both on Windows and Linux. See
netwerk/dns/GetAddrInfo.cpp (the bigger part of that being special Android
code). The differences you see between Windows and Linux, I guess is because
of differences in IPv6 setup or connectivity somehow. Or possibly due to
getaddrinfo() implementation differences. I didn't spot any IPv6/IPv4
differences between platforms in the Firefox name resolving code.
--
/
daniel.haxx.se