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 <evanlucas@me.com>
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
  • Loading branch information
Trott authored and Fishrock123 committed Mar 2, 2016
1 parent c4d9cdb commit 81348e8
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 81348e8

Please sign in to comment.