File: localhost-no-addrconfig.patch

package info (click to toggle)
nodejs 22.21.1%2Bdfsg%2B~cs22.19.0-3
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 251,924 kB
  • sloc: cpp: 1,542,927; javascript: 597,777; ansic: 114,330; python: 60,784; sh: 4,155; makefile: 2,914; asm: 1,750; pascal: 1,565; perl: 248; lisp: 222; xml: 42
file content (43 lines) | stat: -rw-r--r-- 1,385 bytes parent folder | download | duplicates (2)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
 https://lists.debian.org/debian-devel/2023/12/msg00011.html
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
@@ -1371,13 +1372,6 @@
     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;
--- a/test/sequential/sequential.status
+++ b/test/sequential/sequential.status
@@ -13,6 +13,10 @@
 # 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