Skip to content

Commit ba7a247

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
test: apply Linux workaround to Linux only
Do not try Ubuntu/SUSE/Debian-specific hostnames for IPv6 localhost unless we are on Linux. Fixes: #4546 PR-URL: #5471 Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Ben Noorhduis <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent 52a0992 commit ba7a247

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

test/common.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,21 @@ var opensslCli = null;
8080
var inFreeBSDJail = null;
8181
var localhostIPv4 = null;
8282

83-
exports.localIPv6Hosts = [
84-
// Debian/Ubuntu
85-
'ip6-localhost',
86-
'ip6-loopback',
87-
88-
// SUSE
89-
'ipv6-localhost',
90-
'ipv6-loopback',
91-
92-
// Typically universal
93-
'localhost',
94-
];
83+
exports.localIPv6Hosts = ['localhost'];
84+
if (process.platform === 'linux') {
85+
exports.localIPv6Hosts = [
86+
// Debian/Ubuntu
87+
'ip6-localhost',
88+
'ip6-loopback',
89+
90+
// SUSE
91+
'ipv6-localhost',
92+
'ipv6-loopback',
93+
94+
// Typically universal
95+
'localhost',
96+
];
97+
}
9598

9699
Object.defineProperty(exports, 'inFreeBSDJail', {
97100
get: function() {

0 commit comments

Comments
 (0)