mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
dns: accept 'IPv4' and 'IPv6' for family
Refs: https://github.com/nodejs/node/issues/43014 PR-URL: https://github.com/nodejs/node/pull/43054 Fixes: https://github.com/nodejs/node/issues/43014 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
1 parent
74716ada2e
commit
70b516e4db
27 files changed
+88
-54
No files matched your search
@@ -39,10 +39,10 @@ const internalInterfaces = Object.values(os.networkInterfaces()).flat().filter(
|
||||
);
|
||||
for (const iface of internalInterfaces) {
|
||||
testListeningOptions.push({
|
||||
hostname: iface?.family === 6 ? `[${iface.address}]` : iface?.address,
|
||||
hostname: iface?.family === 'IPv6' ? `[${iface?.address}]` : iface?.address,
|
||||
listenOptions: {
|
||||
host: iface?.address,
|
||||
ipv6Only: iface?.family === 6
|
||||
ipv6Only: iface?.family === 'IPv6'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user