summaryrefslogtreecommitdiff
path: root/lib/net.js
diff options
context:
space:
mode:
authorJosh Dague <daguej@email.uc.edu>2016-01-07 17:42:16 -0800
committerJames M Snell <jasnell@gmail.com>2016-01-08 09:11:32 -0800
commitc64018e1d1675cc5897f89317cb44925276ea644 (patch)
treed77251a9a0c196536ba0294d41dd414952b08997 /lib/net.js
parentfde18b24f105d4a70cf1fda714f93a35722bf517 (diff)
downloadandroid-node-v8-c64018e1d1675cc5897f89317cb44925276ea644.tar.gz
android-node-v8-c64018e1d1675cc5897f89317cb44925276ea644.tar.bz2
android-node-v8-c64018e1d1675cc5897f89317cb44925276ea644.zip
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>
Diffstat (limited to 'lib/net.js')
-rw-r--r--lib/net.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net.js b/lib/net.js
index 672e8fdc79..2cb48c0d58 100644
--- a/lib/net.js
+++ b/lib/net.js
@@ -953,12 +953,12 @@ function lookupAndConnect(self, options) {
if (dnsopts.family !== 4 && dnsopts.family !== 6) {
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
// 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')
+ if (process.platform !== 'freebsd' && process.platform !== 'android')
dnsopts.hints |= dns.V4MAPPED;
}