diff --git a/CHANGELOG.md b/CHANGELOG.md
index 459f52f9..2b48b860 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -82,7 +82,8 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
-| 5.17.11 | 2023-02-27 | `blockDevices()` raid added label, uuid (linux) |
+| 5.17.12 | 2023-02-28 | `uuid()` fix unique mac address issue (Android) |
+| 5.17.11 | 2023-02-27 | `blockDevices()` raid added label, uuid (linux) |
| 5.17.10 | 2023-02-23 | `blockDevices()` fixed parsing raids (linux) |
| 5.17.9 | 2023-02-11 | `system()` fixed model Apple Silicon |
| 5.17.8 | 2023-01-30 | `system()` improved virtual host detection for Parallels |
diff --git a/docs/history.html b/docs/history.html
index b21100ee..117bcb44 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -57,6 +57,11 @@
Full version history
+
+ 5.17.12 |
+ 2023-02-28 |
+ uuid() fix unique mac address issue (Android) |
+
5.17.11 |
2023-02-27 |
diff --git a/docs/index.html b/docs/index.html
index cf6ad69e..323ba5ed 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -170,7 +170,7 @@
systeminformation
- New Version: 5.17.10
+ New Version: 5.17.12
diff --git a/lib/osinfo.js b/lib/osinfo.js
index ffb95b38..65207e2b 100644
--- a/lib/osinfo.js
+++ b/lib/osinfo.js
@@ -1047,25 +1047,29 @@ function shell(callback) {
exports.shell = shell;
function getUniqueMacAdresses() {
- const ifaces = os.networkInterfaces();
let macs = [];
- for (let dev in ifaces) {
- if ({}.hasOwnProperty.call(ifaces, dev)) {
- ifaces[dev].forEach(function (details) {
- if (details && details.mac && details.mac !== '00:00:00:00:00:00') {
- const mac = details.mac.toLowerCase();
- if (macs.indexOf(mac) === -1) {
- macs.push(mac);
+ try {
+ const ifaces = os.networkInterfaces();
+ for (let dev in ifaces) {
+ if ({}.hasOwnProperty.call(ifaces, dev)) {
+ ifaces[dev].forEach(function (details) {
+ if (details && details.mac && details.mac !== '00:00:00:00:00:00') {
+ const mac = details.mac.toLowerCase();
+ if (macs.indexOf(mac) === -1) {
+ macs.push(mac);
+ }
}
- }
- });
+ });
+ }
}
+ macs = macs.sort(function (a, b) {
+ if (a < b) { return -1; }
+ if (a > b) { return 1; }
+ return 0;
+ });
+ } catch (e) {
+ macs.push('00:00:00:00:00:00');
}
- macs = macs.sort(function (a, b) {
- if (a < b) { return -1; }
- if (a > b) { return 1; }
- return 0;
- });
return macs;
}