From 3c23a6d8938ee75dae7b015bb417359200febd14 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 false (reorder the result so that IPv4 addresses come before IPv6 addresses) to true (return them exactly as the resolver sent them to us.) Fixes: https://github.com/nodejs/node/issues/31566 Refs: https://github.com/nodejs/node/issues/6307 Refs: https://github.com/nodejs/node/pull/20710 Reissue of https://github.com/nodejs/node/pull/31567 --- doc/api/dns.md | 7 ++++--- lib/dns.js | 4 ++-- lib/internal/dns/promises.js | 4 ++-- test/sequential/test-net-better-error-messages-port.js | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/api/dns.md b/doc/api/dns.md index cdb948309f173f..868a5039bf237e 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -163,6 +163,9 @@ section if a custom port is used.