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