Code refactor for DNS suffix
This commit is contained in:
parent
d04af38c44
commit
b97368ba33
@ -278,11 +278,11 @@ function getWindowsDNSsuffixes() {
|
||||
|
||||
function getWindowsIfaceDNSsuffix(ifaces, ifacename) {
|
||||
let dnsSuffix = '';
|
||||
// Adding (.) to ensure ifacename compatibility when duplicated iface-names
|
||||
const interfaceName = ifacename + '.';
|
||||
try {
|
||||
console.log('aca vamos', ifaces);
|
||||
console.log(ifacename);
|
||||
const connectionDnsSuffix = ifaces.filter((iface) => {
|
||||
return ifacename.includes(iface.name);
|
||||
return interfaceName.includes(iface.name + '.');
|
||||
}).map((iface) => iface.dnsSuffix);
|
||||
if(connectionDnsSuffix[0]) {
|
||||
dnsSuffix = connectionDnsSuffix[0];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user