Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: remove implicit setting of DNS hints #6021

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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