Skip to content

Commit

Permalink
net: remove implicit setting of DNS hints
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
cjihrig committed Apr 5, 2016
1 parent 757fbac commit b85a50b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b85a50b

Please sign in to comment.