Skip to content

Commit

Permalink
test: apply Linux workaround to Linux only
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Trott authored and Myles Borins committed Mar 21, 2016
1 parent 4aa2c03 commit ba9ad26
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,21 @@ var opensslCli = null;
var inFreeBSDJail = null;
var localhostIPv4 = null;

exports.localIPv6Hosts = [
// Debian/Ubuntu
'ip6-localhost',
'ip6-loopback',

// SUSE
'ipv6-localhost',
'ipv6-loopback',

// Typically universal
'localhost',
];
exports.localIPv6Hosts = ['localhost'];
if (process.platform === 'linux') {
exports.localIPv6Hosts = [
// Debian/Ubuntu
'ip6-localhost',
'ip6-loopback',

// SUSE
'ipv6-localhost',
'ipv6-loopback',

// Typically universal
'localhost',
];
}

Object.defineProperty(exports, 'inFreeBSDJail', {
get: function() {
Expand Down

0 comments on commit ba9ad26

Please sign in to comment.