diff --git a/Cargo.lock b/Cargo.lock index a7c7b0e..69c979a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -375,9 +375,9 @@ dependencies = [ [[package]] name = "network-interface" -version = "0.1.6" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0bc4480c4518eb8b2599ae2dd7a97b231178ad8fb9a3e6a854fd48a5f54e95c" +checksum = "0d68759ef97fe9c9e46f79ea8736c19f1d28992e24c8dc8ce86752918bfeaae7" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index 73bcf42..8a34824 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/main.rs b/src/main.rs index 54b5d19..d18270b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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());