Skip to content

Commit b85a50b

Browse files
committed
net: remove implicit setting of DNS hints
This commit removes the implicit setting of the V4MAPPED and ADDRCONFIG DNS flags in createConnection(). As of 39de601, users that need these flags can set them explicitly. PR-URL: #6021 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 757fbac commit b85a50b

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/net.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -949,17 +949,6 @@ function lookupAndConnect(self, options) {
949949
hints: options.hints || 0
950950
};
951951

952-
if (dnsopts.family !== 4 && dnsopts.family !== 6 && dnsopts.hints === 0) {
953-
dnsopts.hints = dns.ADDRCONFIG;
954-
// The AI_V4MAPPED hint is not supported on FreeBSD or Android,
955-
// and getaddrinfo returns EAI_BADFLAGS. However, it seems to be
956-
// supported on most other systems. See
957-
// http://lists.freebsd.org/pipermail/freebsd-bugs/2008-February/028260.html
958-
// for more information on the lack of support for FreeBSD.
959-
if (process.platform !== 'freebsd' && process.platform !== 'android')
960-
dnsopts.hints |= dns.V4MAPPED;
961-
}
962-
963952
debug('connect: find host ' + host);
964953
debug('connect: dns options', dnsopts);
965954
self._host = host;

0 commit comments

Comments
 (0)