do not use dns.ADDRCONFIG for localhost
authorJérémy Lal <kapouer@melix.org>
Sun, 7 Dec 2025 23:23:49 +0000 (00:23 +0100)
committerJérémy Lal <kapouer@melix.org>
Sun, 7 Dec 2025 23:23:49 +0000 (00:23 +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 8019c5a4be8aa7fad3826301270362bab1e801f8..a115b4867a45e1e4e207a6bbc7c2fc4ee683f3d3 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
@@ -1371,13 +1372,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 f6c9c77379930a8234cd4c5f933c261d6bd1a238..9eed04a5d0d95f5c7d0373242a39076620f7060b 100644 (file)
@@ -13,6 +13,10 @@ test-watch-mode-inspect: PASS, FLAKY
 # https://github.com/nodejs/node/issues/47409
 test-http2-large-file: 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/49630
 test-single-executable-application-snapshot: PASS, FLAKY