dns: exclude loopback link from the single lookup resolution
dns: the lookup of a single address should not be returned if the result is a loopback link
Fixes: https://github.com/nodejs/node/issues/51732
As described in the original issue, I am having problems writing working automated tests:
if /etc/hosts
is modified to have this entry fe80::1 ipv6_loopback
tests are working just fine, but of course it is not a valid solution. I tried to mock the inner workings of the actual dns resolved but I was not able to make it work fine for my test case.
two questions:
- does anybody know how to fix the "broken" test?
- are the new API (the returned values) fine?