Skip to content

Commit c64018e

Browse files
daguejjasnell
authored andcommittedJan 8, 2016
net: fix dns lookup for android
`V4MAPPED` isn't supported by Android either (as of 6.0) PR-URL: #4580 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent fde18b2 commit c64018e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/net.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -953,12 +953,12 @@ function lookupAndConnect(self, options) {
953953

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

0 commit comments

Comments
 (0)
Please sign in to comment.