Commit cd0e5924 authored by nanahira's avatar nanahira

optional ipv6 conf

parent 3e49a77e
......@@ -443,10 +443,11 @@ class InventoryBuilder {
//const remoteGatewayMark = remoteGatewayName ? remoteGateway.mark : undefined;
//console.log(remoteGateway.name);
let remoteAddress = remoteGateway.address || null;
if (!localGateway.ipv6 && !remoteGateway.ipv4 && remoteGateway.ipv6) {
const preferV6 = (!remoteGateway.ipv4 || params.ipv6 === 'on') && remoteGateway.ipv6 && params.ipv6 !== 'off';
if (!localGateway.ipv6 && preferV6) {
remoteAddress = null;
}
const resolvedRemoteAddress = remoteAddress ? await this.resolveDomain(remoteAddress, (!remoteGateway.ipv4 || localGateway.ipv6) && remoteGateway.ipv6) : null;
const resolvedRemoteAddress = remoteAddress ? await this.resolveDomain(remoteAddress, preferV6) : null;
const remoteLocalAddress = remote.address;
const remoteNextMark = remote.nextMark;
const remoteDestMark = remote.destMark;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment