test, win: fix IPv6 detection on Windows
Add proper IPv6 detection on loopback device on Windows. PR-URL: https://github.com/nodejs/node/pull/14865 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
parent
3cf27f1485
commit
ca9b3f27eb
@ -262,7 +262,7 @@ Object.defineProperty(exports, 'hasFipsCrypto', {
|
||||
|
||||
{
|
||||
const iFaces = os.networkInterfaces();
|
||||
const re = /lo/;
|
||||
const re = exports.isWindows ? /Loopback Pseudo-Interface/ : /lo/;
|
||||
exports.hasIPv6 = Object.keys(iFaces).some(function(name) {
|
||||
return re.test(name) && iFaces[name].some(function(info) {
|
||||
return info.family === 'IPv6';
|
||||
|
Loading…
x
Reference in New Issue
Block a user