From 1b2749ecbe3038eab4ac12945ef8f036cb58d4bd Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 29 Jan 2020 13:12:15 +0100 Subject: [PATCH] dns: default to verbatim=true in dns.lookup() Switch the default from `ipv4first` to `verbatim` (return them exactly as the resolver sent them to us). PR-URL: https://github.com/nodejs/node/pull/39987 Fixes: https://github.com/nodejs/node/issues/31566 Refs: https://github.com/nodejs/node/issues/6307 Refs: https://github.com/nodejs/node/pull/20710 Refs: https://github.com/nodejs/node/pull/38099 Co-authored-by: treysis Reviewed-By: Antoine du Hamel Reviewed-By: Matteo Collina Reviewed-By: James M Snell Reviewed-By: Michael Dawson --- doc/api/dns.md | 8 +++-- lib/internal/dns/utils.js | 10 ++---- test/common/inspector-helper.js | 3 +- test/parallel/test-cluster-message.js | 2 +- test/parallel/test-http-localaddress.js | 1 + test/parallel/test-http-upgrade-client.js | 2 +- test/parallel/test-http2-connect-options.js | 2 +- test/parallel/test-https-localaddress.js | 1 + .../parallel/test-net-connect-options-port.js | 36 ++++++++++++------- test/parallel/test-net-dns-lookup.js | 6 ++-- test/parallel/test-net-pingpong.js | 4 +-- test/parallel/test-net-remote-address-port.js | 18 +++++----- test/parallel/test-net-writable.js | 4 +-- test/parallel/test-tcp-wrap-listen.js | 4 ++- ...imeout-removes-other-socket-unref-timer.js | 2 +- .../test-tls-client-getephemeralkeyinfo.js | 2 +- test/parallel/test-tls-client-mindhsize.js | 2 +- .../test-tls-wrap-econnreset-localaddress.js | 1 + test/pummel/test-http-upload-timeout.js | 2 +- test/pummel/test-net-pingpong.js | 6 ++-- .../test-https-connect-localport.js | 2 +- test/sequential/test-inspector-open.js | 2 +- .../test-net-better-error-messages-port.js | 2 +- .../test-net-connect-local-error.js | 2 ++ 24 files changed, 70 insertions(+), 54 deletions(-) diff --git a/doc/api/dns.md b/doc/api/dns.md index af9bb60967e..ef90e15a04d 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -170,6 +170,9 @@ section if a custom port is used.