replace ipaddr.js
This commit is contained in:
+2
-2
@@ -30,7 +30,7 @@ const apps = require('./apps.js'),
|
||||
dashboard = require('./dashboard.js'),
|
||||
debug = require('debug')('box:dns'),
|
||||
domains = require('./domains.js'),
|
||||
ipaddr = require('ipaddr.js'),
|
||||
ipaddr = require('./ipaddr.js'),
|
||||
mail = require('./mail.js'),
|
||||
mailServer = require('./mailserver.js'),
|
||||
network = require('./network.js'),
|
||||
@@ -141,7 +141,7 @@ async function checkDnsRecords(subdomain, domain) {
|
||||
const ipv6Records = await getDnsRecords(subdomain, domain, 'AAAA');
|
||||
|
||||
// if empty OR exactly one record with the ip, we don't need to overwrite
|
||||
if (ipv6Records.length !== 0 && (ipv6Records.length !== 1 || ipaddr.parse(ipv6Records[0]).toRFC5952String() !== ipv6)) return { needsOverwrite: true };
|
||||
if (ipv6Records.length !== 0 && (ipv6Records.length !== 1 || !ipaddr.isEqual(ipv6Records[0], ipv6))) return { needsOverwrite: true };
|
||||
}
|
||||
|
||||
return { needsOverwrite: false }; // one record exists and in sync
|
||||
|
||||
Reference in New Issue
Block a user