networkInterfaces() windows detection fix

This commit is contained in:
Sebastian Hildebrandt 2021-04-09 07:34:46 +02:00
parent 350fa16d0d
commit fd20506856
4 changed files with 12 additions and 4 deletions

View File

@ -77,6 +77,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment | | Version | Date | Comment |
| -------------- | -------------- | -------- | | -------------- | -------------- | -------- |
| 5.6.12 | 2021-04-09 | `networkinterfaces()` windows detection fix |
| 5.6.11 | 2021-04-08 | `versions()` parameter sanitation | | 5.6.11 | 2021-04-08 | `versions()` parameter sanitation |
| 5.6.10 | 2021-03-29 | `vboxInfo()` fixed windows bug | | 5.6.10 | 2021-03-29 | `vboxInfo()` fixed windows bug |
| 5.6.9 | 2021-03-28 | `graphics()` fixed nvidia-smi compare bug | | 5.6.9 | 2021-03-28 | `graphics()` fixed nvidia-smi compare bug |

View File

@ -56,6 +56,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<th scope="row">5.6.12</th>
<td>2021-04-09</td>
<td><span class="code">networkInterfaces()</span> windows detection fix</td>
</tr>
<tr> <tr>
<th scope="row">5.6.11</th> <th scope="row">5.6.11</th>
<td>2021-04-08</td> <td>2021-04-08</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png"> <img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div> <div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div> <div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.6.11</span></div> <div class="version">New Version: <span id="version">5.6.12</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button> <button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div> </div>
<div class="down"> <div class="down">
@ -203,7 +203,7 @@
</div> </div>
<div class="row number-section"> <div class="row number-section">
<div class="col-xl-4 col-lg-4 col-md-4 col-12"> <div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">14,225</div> <div class="numbers">14,231</div>
<div class="title">Lines of code</div> <div class="title">Lines of code</div>
</div> </div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12"> <div class="col-xl-4 col-lg-4 col-md-4 col-12">
@ -211,7 +211,7 @@
<div class="title">Downloads last month</div> <div class="title">Downloads last month</div>
</div> </div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12"> <div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">407</div> <div class="numbers">410</div>
<div class="title">Dependents</div> <div class="title">Dependents</div>
</div> </div>
</div> </div>

View File

@ -874,14 +874,16 @@ function networkInterfaces(callback, rescan = true) {
dnsSuffix = getWindowsIfaceDNSsuffix(dnsSuffixes.ifaces, dev); dnsSuffix = getWindowsIfaceDNSsuffix(dnsSuffixes.ifaces, dev);
let foundFirst = false;
nics.forEach(detail => { nics.forEach(detail => {
if (detail.mac === mac) { if (detail.mac === mac && !foundFirst) {
iface = detail.iface || iface; iface = detail.iface || iface;
ifaceName = detail.name; ifaceName = detail.name;
dhcp = detail.dhcp; dhcp = detail.dhcp;
operstate = detail.operstate; operstate = detail.operstate;
speed = detail.speed; speed = detail.speed;
type = detail.type; type = detail.type;
foundFirst = true;
} }
}); });