mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
#298 try filtering out network interfaces that have no associated MAC addresses
This commit is contained in:
parent
bf97480532
commit
f6f5031bfd
@ -167,6 +167,10 @@ public class InetAddressUtils {
|
||||
.filter(i -> i.getParent() == null && !i.isVirtual()).collect(toList());
|
||||
|
||||
for (NetworkInterface networkInterface : interfaces) {
|
||||
try {
|
||||
if (networkInterface.getHardwareAddress() == null) continue;
|
||||
} catch (SocketException ignore) {}
|
||||
|
||||
for (InterfaceAddress ifAddr : networkInterface.getInterfaceAddresses()) {
|
||||
anyAddress = ifAddr;
|
||||
InetAddress addr = ifAddr.getAddress();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user