networkInterfaces loopback internal detection (windows)
This commit is contained in:
parent
35d835b61e
commit
e756186225
@ -451,7 +451,7 @@ function parseLinesDarwinNics(sections) {
|
|||||||
if (isNaN(nic.mtu)) {
|
if (isNaN(nic.mtu)) {
|
||||||
nic.mtu = -1;
|
nic.mtu = -1;
|
||||||
}
|
}
|
||||||
nic.internal = parts[0].indexOf('LOOPBACK') > -1;
|
nic.internal = parts[0].toLowerCase().indexOf('loopback') > -1;
|
||||||
section.forEach(line => {
|
section.forEach(line => {
|
||||||
if (line.trim().startsWith('ether ')) {
|
if (line.trim().startsWith('ether ')) {
|
||||||
nic.mac = line.split('ether ')[1].toLowerCase().trim();
|
nic.mac = line.split('ether ')[1].toLowerCase().trim();
|
||||||
@ -884,7 +884,7 @@ function networkInterfaces(callback, rescan = true) {
|
|||||||
ieee8021xAuth = IEEE8021x.protocol;
|
ieee8021xAuth = IEEE8021x.protocol;
|
||||||
ieee8021xState = IEEE8021x.state;
|
ieee8021xState = IEEE8021x.state;
|
||||||
}
|
}
|
||||||
let internal = (ifaces[dev] && ifaces[dev][0]) ? ifaces[dev][0].internal : null;
|
let internal = (ifaces[dev] && ifaces[dev][0]) ? ifaces[dev][0].internal : !!(dev.toLowerCase().indexOf('loopback') > -1 || ifaceName.toLowerCase().indexOf('loopback') > -1);
|
||||||
const virtual = internal ? false : testVirtualNic(dev, ifaceName, mac);
|
const virtual = internal ? false : testVirtualNic(dev, ifaceName, mac);
|
||||||
result.push({
|
result.push({
|
||||||
iface: dev,
|
iface: dev,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user