From b85a50b6da5bbd7e9c8902a13dfbe1a142fd786a Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 2 Apr 2016 09:50:58 -0400 Subject: [PATCH] net: remove implicit setting of DNS hints This commit removes the implicit setting of the V4MAPPED and ADDRCONFIG DNS flags in createConnection(). As of 39de601e1c3eda92eb2e37eca4e6aa960f206f39, users that need these flags can set them explicitly. PR-URL: https://github.com/nodejs/node/pull/6021 Reviewed-By: James M Snell Reviewed-By: Evan Lucas Reviewed-By: Ben Noordhuis --- lib/net.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/net.js b/lib/net.js index 37797bedbc..61ff7327fb 100644 --- a/lib/net.js +++ b/lib/net.js @@ -949,17 +949,6 @@ function lookupAndConnect(self, options) { hints: options.hints || 0 }; - if (dnsopts.family !== 4 && dnsopts.family !== 6 && dnsopts.hints === 0) { - dnsopts.hints = dns.ADDRCONFIG; - // The AI_V4MAPPED hint is not supported on FreeBSD or Android, - // and getaddrinfo returns EAI_BADFLAGS. However, it seems to be - // supported on most other systems. See - // http://lists.freebsd.org/pipermail/freebsd-bugs/2008-February/028260.html - // for more information on the lack of support for FreeBSD. - if (process.platform !== 'freebsd' && process.platform !== 'android') - dnsopts.hints |= dns.V4MAPPED; - } - debug('connect: find host ' + host); debug('connect: dns options', dnsopts); self._host = host;