From c64018e1d1675cc5897f89317cb44925276ea644 Mon Sep 17 00:00:00 2001 From: Josh Dague Date: Thu, 7 Jan 2016 17:42:16 -0800 Subject: [PATCH] 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 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- lib/net.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/net.js b/lib/net.js index 672e8fdc798a3a..2cb48c0d589a42 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; }