Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/internal/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const tcp = require('btcp');
const udp = require('budp');
const bio = require('bufio');
const util = require('../util');
const hasIPv6 = IP.getPublic('ipv6').length > 0;
const hasIPv6 = IP.getInterfaces('ipv6').length > 0;

/**
* Base
Expand Down
7 changes: 6 additions & 1 deletion lib/resolver/ub.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class UnboundResolver extends EventEmitter {
constructor(options) {
super();

this.inet6 = false;
this.inet6 = IP.getInterfaces('ipv6').length > 0;;
this.tcp = false;
this.forceTCP = false;
this.maxAttempts = 3;
Expand Down Expand Up @@ -141,6 +141,11 @@ class UnboundResolver extends EventEmitter {
this.minimize = options.minimize;
}

if (options.inet6 != null) {
assert(typeof options.inet6 === 'boolean');
this.inet6 = options.inet6;
}

return this;
}

Expand Down