EstebanBorai / network-interface

Retrieve system's Network Interfaces on Linux, macOS and Windows on a standardized manner
https://crates.io/crates/network-interface
Apache License 2.0
62 stars 27 forks source link

fix: windows broadcast address lookup #47

Closed mrtnlrsn closed 1 year ago

mrtnlrsn commented 1 year ago

When one network adapter has multiple ipv4 addresses, the previous implementation returned the same broadcast address for all IPs. This is fixed by correctly looking up the broadcast address in the prefix list.

Tested on 3 different Win 10 Home/Pro PCs.

Fixes #46

EstebanBorai commented 1 year ago

Hi @mrtnlrsn! Thanks so much for opening this PR! Could you please run cargo clippy --fix so we can merge this PR?