Skip to content

Commit

Permalink
Update network-interface to v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dns13 committed Mar 5, 2024
1 parent 99ea451 commit a5c3531
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ textplots = "0.8"
rpassword = "7.3"
rustyline = "13.0"
dirs = "5.0"
network-interface = "0.1.5"
network-interface = "1.1"
openssl = "0.10"
openssl-sys = "0.9"
hex = "0.4.3"
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ fn get_ipv6_link_local_from_serial(serial: u32) -> String {
let mut interface = None;

for itf in network_interfaces.iter() {
if let Some(addr) = itf.addr {
let addrs = &itf.addr;
for addr in addrs.iter() {
if addr.ip().is_ipv6() && !addr.ip().is_loopback() {
if &addr.ip().to_string()[..6] == "fe80::" {
interface = Some(itf.name.clone());
Expand Down

0 comments on commit a5c3531

Please sign in to comment.