Commit Graph

8 Commits

Author SHA1 Message Date
Abdirahim Musse
ee1f609a9e test: handle EUNATCH
When IPv6 is disabled IBM i returns EUNATCH (errno 42)
instead of EADDRNOTAVAIL.

libuv 1.46.0 adds EUNATCH errno

We can now use error.code to refer to EUNATCH
in node versions that use libuv 1.46.0.

PR-URL: https://github.com/nodejs/node/pull/48050
Refs: https://github.com/nodejs/node/issues/48049
Refs: https://github.com/nodejs/node/pull/46546
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-08-23 14:00:25 -04:00
Fedor Indutny
403a72f8ec
net: fix address iteration with autoSelectFamily
When `autoSelectFamily` is set to `true`, `net.connect` is supposed to
try connecting to both IPv4 and IPv6, interleaving the address types.
Instead, it appears that the array that holds the addresses in the order
they should be attempted was never used after being populated.

PR-URL: https://github.com/nodejs/node/pull/48258
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2023-06-01 20:53:56 +00:00
Paolo Insogna
2d24b29cf4
net: fix family autoselection timeout handling
PR-URL: https://github.com/nodejs/node/pull/47860
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-05-11 16:14:03 +00:00
Paolo Insogna
8b51c1a869 net: enable autoSelectFamily by default
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/46790
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2023-04-05 08:31:56 -07:00
Abdirahim Musse
c2c61e06a3
test: fix IPv6 checks on IBM i
PR-URL: https://github.com/nodejs/node/pull/46546
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-02-23 14:44:58 +00:00
Paolo Insogna
d12d8cd578
net: rework autoSelectFamily implementation
PR-URL: https://github.com/nodejs/node/pull/46587
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-02-23 09:47:13 +00:00
Livia Medeiros
109545a8fa
test: fix test-net-autoselectfamily for kernel without IPv6 support
PR-URL: https://github.com/nodejs/node/pull/45856
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2023-02-18 16:32:05 +00:00
Paolo Insogna
05975d1fb1
net: add autoSelectFamily global getter and setter
PR-URL: https://github.com/nodejs/node/pull/45777
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-12-24 14:44:11 +00:00