szmarczak / cacheable-lookup

A cacheable dns.lookup(…) that respects TTL :tada:
MIT License
190 stars 29 forks source link

Disable _resolve for IP family if not requested #62

Open edwinclement08 opened 2 years ago

edwinclement08 commented 2 years ago

This prevents adding IPv6 resolution if only IPv4 is requested.

We had a client with a misconfigured DNS server that times out and fails with SERVFAIL(on IPv6). Without this patch, the lookup fails even though the IPv4 promise has been resolved with the IP.

szmarczak commented 2 years ago

Can you add a test for this? Just to confirm that it works.

edwinclement08 commented 2 years ago

Can you add a test for this? Just to confirm that it works.

Getting this error when trying to run the tests on 6.0.4. Are the tests broken or something beyond npm install is needed to set up the test cases?

image
szmarczak commented 2 years ago

It should just work. Can you try npx ava --serial?

edwinclement08 commented 2 years ago

Nope, just timing out

image

Will check in depth another time

szmarczak commented 2 years ago

What OS are you running?

edwinclement08 commented 2 years ago

MacOS Big Sur

On Thu, Aug 4, 2022 at 11:30 PM Szymon Marczak @.***> wrote:

What OS are you running?

— Reply to this email directly, view it on GitHub https://github.com/szmarczak/cacheable-lookup/pull/62#issuecomment-1205592869, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIXLXDYQQXCKZYG4U536ZTVXQALLANCNFSM55R7HGDA . You are receiving this because you authored the thread.Message ID: @.***>

-- Edwin Clement