dns: Add dns.ALL hints flag constant
This change adds the dns.ALL
flag and allows it to be passed in the dns.lookup
hints option. I changed the relevant tests that I could find and added some basic documentation.
The documentation I wrote for that flag is based on how it is documented in man 3 getaddrinfo
. However, the reason for this change is that we recently discovered that getaddrinfo
(and therefore dns.lookup
) behaves differently on different operating systems. In particular, on Linux it behaves as documented, but on Mac, the default behavior of getaddrinfo
is as though the AI_ADDRCONFIG
flag is set, and AI_ALL
makes it act as though that flag is unset (i.e. the default Linux behavior). Setting AI_ALL
appears to be the only way to get that behavior on Mac, and that is why I would like it to be available.
I am not sure if it would be better to explicitly document that part of the OS-specific behavior in the dns
module documentation.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines