do not use dns.ADDRCONFIG for localhost
authorJérémy Lal <kapouer@melix.org>
Fri, 8 Nov 2024 19:05:21 +0000 (20:05 +0100)
committerJérémy Lal <kapouer@melix.org>
Fri, 8 Nov 2024 19:05:21 +0000 (20:05 +0100)
Last-Update: 2020-06-11
Bug-Debian: https://bugs.debian.org/962318
Forwarded: https://github.com/nodejs/node/issues/33816

it fails on IPv6-only systems. Setting it with libc fails on linux.
https://github.com/nodejs/node/issues/33279
https://lists.debian.org/debian-devel/2023/12/msg00011.html

Gbp-Pq: Topic deps
Gbp-Pq: Name localhost-no-addrconfig.patch

lib/net.js
test/sequential/sequential.status

index 6fe798e0f128c4cd60b576d2257463abae35d0cb..a25bd32f634c2c00148057a40a2345feabc07068 100644 (file)
@@ -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
@@ -1339,13 +1340,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;
index 2514c320621680e5f9ac84ccc66b4c18c7187ec4..e85f456f6243b5a2dc98653e2651947614344622 100644 (file)
@@ -24,6 +24,10 @@ test-worker-heapsnapshot-options                : PASS,FLAKY
 # https://github.com/nodejs/node/issues/24403
 test-cli-syntax: PASS,FLAKY
 
+# does not work on IPv6 only host
+test-tls-psk-client: PASS,FLAKY
+test-tls-securepair-client: PASS,FLAKY
+
 [$system==win32]
 # https://github.com/nodejs/node/issues/47116
 test-http-max-sockets: PASS, FLAKY