mirror of
https://github.com/yggdrasil-network/water.git
synced 2025-05-19 08:25:09 +03:00
Windows: don't trip over empty HardwareAddr when enumerating interfaces (this happens sometimes when miniport/VPN adapters are active on the system)
This commit is contained in:
parent
acc9cc2bfa
commit
fd331bda3f
1 changed files with 3 additions and 0 deletions
|
@ -300,6 +300,9 @@ func openDev(config Config) (ifce *Interface, err error) {
|
|||
}
|
||||
|
||||
for _, v := range ifces {
|
||||
if len(v.HardwareAddr) < 6 {
|
||||
continue
|
||||
}
|
||||
if bytes.Equal(v.HardwareAddr[:6], mac[:6]) {
|
||||
ifce.name = v.Name
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue