networkInterfaces() cleaned up testVirtualNic
This commit is contained in:
+1
-1
@@ -137,7 +137,7 @@ function fsSize(drive, callback) {
|
||||
}
|
||||
}
|
||||
if (_linux) {
|
||||
cmd = 'export LC_ALL=C; df -lkPTx squashfs; unset LC_ALL';
|
||||
cmd = 'df -lkPTx squashfs';
|
||||
execSync('cat /proc/mounts 2>/dev/null').toString().split('\n').filter(line => {
|
||||
return line.startsWith('/');
|
||||
}).forEach((line) => {
|
||||
|
||||
+2
-2
@@ -673,9 +673,9 @@ function getLinuxIfaceIEEE8021xState(authenticationProtocol) {
|
||||
}
|
||||
|
||||
function testVirtualNic(iface, ifaceName, mac) {
|
||||
const virtualMacs = ['00:00:00:00:00:00', '00:03:FF', '00:05:69', '00:0C:29', '00:0F:4B', '00:0F:4B', '00:13:07', '00:13:BE', '00:15:5d', '00:16:3E', '00:1C:42', '00:21:F6', '00:21:F6', '00:24:0B', '00:24:0B', '00:50:56', '00:A0:B1', '00:E0:C8', '08:00:27', '0A:00:27', '18:92:2C', '16:DF:49', '3C:F3:92', '54:52:00', 'FC:15:97'];
|
||||
const virtualMacs = ['00:00:00:00:00:00', '00:03:FF', '00:05:69', '00:0C:29', '00:0F:4B', '00:13:07', '00:13:BE', '00:15:5d', '00:16:3E', '00:1C:42', '00:21:F6', '00:24:0B', '00:50:56', '00:A0:B1', '00:E0:C8', '08:00:27', '0A:00:27', '18:92:2C', '16:DF:49', '3C:F3:92', '54:52:00', 'FC:15:97'];
|
||||
if (mac) {
|
||||
return virtualMacs.filter(item => { return mac.toUpperCase().toUpperCase().startsWith(item.substr(0, mac.length)); }).length > 0 ||
|
||||
return virtualMacs.filter(item => { return mac.toUpperCase().toUpperCase().startsWith(item.substring(0, mac.length)); }).length > 0 ||
|
||||
iface.toLowerCase().indexOf(' virtual ') > -1 ||
|
||||
ifaceName.toLowerCase().indexOf(' virtual ') > -1 ||
|
||||
iface.toLowerCase().indexOf('vethernet ') > -1 ||
|
||||
|
||||
Reference in New Issue
Block a user