net: fix dns lookup for android
`V4MAPPED` isn't supported by Android either (as of 6.0) PR-URL: https://github.com/nodejs/node/pull/4580 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
fde18b24f1
commit
c64018e1d1
@ -953,12 +953,12 @@ function lookupAndConnect(self, options) {
|
|||||||
|
|
||||||
if (dnsopts.family !== 4 && dnsopts.family !== 6) {
|
if (dnsopts.family !== 4 && dnsopts.family !== 6) {
|
||||||
dnsopts.hints = dns.ADDRCONFIG;
|
dnsopts.hints = dns.ADDRCONFIG;
|
||||||
// The AI_V4MAPPED hint is not supported on FreeBSD, and getaddrinfo
|
// 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
|
// returns EAI_BADFLAGS. However, it seems to be supported on most other
|
||||||
// systems. See
|
// systems. See
|
||||||
// http://lists.freebsd.org/pipermail/freebsd-bugs/2008-February/028260.html
|
// http://lists.freebsd.org/pipermail/freebsd-bugs/2008-February/028260.html
|
||||||
// for more information on the lack of support for FreeBSD.
|
// for more information on the lack of support for FreeBSD.
|
||||||
if (process.platform !== 'freebsd')
|
if (process.platform !== 'freebsd' && process.platform !== 'android')
|
||||||
dnsopts.hints |= dns.V4MAPPED;
|
dnsopts.hints |= dns.V4MAPPED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user