Closed Bug 1558840 Opened 5 years ago Closed 5 years ago

Expose DNS suffix list (Windows)

Categories

(Core :: Networking: DNS, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: valentin, Assigned: valentin)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Windows:
We already use this API in Firefox, should be easy to surface the info

https://social.msdn.microsoft.com/Forums/vstudio/en-US/085ea547-b376-48a7-83b2-2480cf6b500e/getting-the-dns-suffixes-in-c-without-wmi?forum=vcgeneral
https://docs.microsoft.com/en-us/windows/desktop/api/iphlpapi/nf-iphlpapi-getadaptersaddresses
printf("\tDNS Suffix: %wS\n", pCurrAddresses->DnsSuffix);

Linux:
We call res_ninit already. We need to extract the info from the struct, not clear how well it works

https://stackoverflow.com/questions/12227438/retrieving-dhcp-allocated-domain-suffix-in-linux-c

OSX:
We don't use this API, it's unclear how we'd use it. Linux method might work as well.

https://developer.apple.com/documentation/networkextension/nednssettings/1406658-searchdomains#see-also

Type: defect → enhancement
Priority: -- → P3

There is also a Windows Registry way of getting the DNS suffix list:
https://computerstepbystep.com/dns-suffix-search-list.html

Blocks: 1581159
Blocks: 1582472

Dropping this info from Adam Roach:

Linux puts the values in `/etc/resolv.conf` on a line labeled "search", if configured.

OS X does as well, although that file has historically done a poor job of tracking dynamic changes to network configuration. You can also get it by running `networksetup -getsearchdomains <service>` (see `networksetup -listallnetworkservices` for the list of services), which tells me there has to be some underlying API for retrieving it.

Although we may use this bug to implement the windows version, and spin off other bugs for the rest of the platforms.

Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/71e49603ed69
Add nsINetworkLinkService.dnsSuffixList implementation for windows r=mayhemer
Blocks: 1588217
Blocks: 1588218
Blocks: 1588219
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Assignee: nobody → valentin.gosu
Blocks: 1589076
Priority: P3 → P1
Summary: Expose DNS suffix list → Expose DNS suffix list (Windows)
Depends on: 1590528
Blocks: 1597683
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: