aboutsummaryrefslogtreecommitdiff
path: root/lang/node/patches/999-localhost-no-addrconfig.patch
blob: 3b24ce12f50b2fb350e2287b37e1e264b4273e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: do not use dns.ADDRCONFIG for localhost
 it fails on IPv6-only systems. Setting it with libc fails on linux.
 https://github.com/nodejs/node/issues/33279
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2020-06-11
Bug-Debian: https://bugs.debian.org/962318
Forwarded: https://github.com/nodejs/node/issues/33816
--- a/lib/net.js
+++ b/lib/net.js
@@ -1,4 +1,5 @@
 // Copyright Joyent, Inc. and other Node contributors.
+
 //
 // Permission is hereby granted, free of charge, to any person obtaining a
 // copy of this software and associated documentation files (the
@@ -1337,13 +1338,6 @@ function lookupAndConnect(self, options)
     hints: options.hints || 0,
   };
 
-  if (!isWindows &&
-      dnsopts.family !== 4 &&
-      dnsopts.family !== 6 &&
-      dnsopts.hints === 0) {
-    dnsopts.hints = dns.ADDRCONFIG;
-  }
-
   debug('connect: find host', host);
   debug('connect: dns options', dnsopts);
   self._host = host;