Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 799aa74

Browse filesBrowse files
daguejMyles Borins
authored andcommitted
net: fix dns lookup for android
`V4MAPPED` isn't supported by Android either (as of 6.0) PR-URL: #4580 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 97aaeb8 commit 799aa74
Copy full SHA for 799aa74

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎lib/net.js‎

Copy file name to clipboardExpand all lines: lib/net.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,12 +951,12 @@ function lookupAndConnect(self, options) {
951951

952952
if (dnsopts.family !== 4 && dnsopts.family !== 6) {
953953
dnsopts.hints = dns.ADDRCONFIG;
954-
// The AI_V4MAPPED hint is not supported on FreeBSD, and getaddrinfo
954+
// The AI_V4MAPPED hint is not supported on FreeBSD or Android, and getaddrinfo
955955
// returns EAI_BADFLAGS. However, it seems to be supported on most other
956956
// systems. See
957957
// http://lists.freebsd.org/pipermail/freebsd-bugs/2008-February/028260.html
958958
// for more information on the lack of support for FreeBSD.
959-
if (process.platform !== 'freebsd')
959+
if (process.platform !== 'freebsd' && process.platform !== 'android')
960960
dnsopts.hints |= dns.V4MAPPED;
961961
}
962962

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.