diff --git a/CHANGES b/CHANGES index be2461007..f686897c0 100644 --- a/CHANGES +++ b/CHANGES @@ -2438,4 +2438,5 @@ [7.1.3] * Fix security issue where an admin can impersonate an owner * block list: can upload up to 2MB +* dns: fix issue where link local address was picked up for ipv6 diff --git a/src/docker.js b/src/docker.js index 86921648c..a4f7f564a 100644 --- a/src/docker.js +++ b/src/docker.js @@ -247,12 +247,12 @@ function getAddresses() { const addresses = []; for (const phy of physicalDevices) { - const inet = safe.JSON.parse(safe.child_process.execSync(`ip -f inet -j addr show ${phy.name}`, { encoding: 'utf8' })); + const inet = safe.JSON.parse(safe.child_process.execSync(`ip -f inet -j addr show dev ${phy.name} scope global`, { encoding: 'utf8' })); for (const r of inet) { const address = safe.query(r, 'addr_info[0].local'); if (address) addresses.push(address); } - const inet6 = safe.JSON.parse(safe.child_process.execSync(`ip -f inet6 -j addr show ${phy.name}`, { encoding: 'utf8' })); + const inet6 = safe.JSON.parse(safe.child_process.execSync(`ip -f inet6 -j addr show dev ${phy.name} scope global`, { encoding: 'utf8' })); for (const r of inet6) { const address = safe.query(r, 'addr_info[0].local'); if (address) addresses.push(address);