From ee85696af53a6f2c71641935a35590a102f1afa8 Mon Sep 17 00:00:00 2001 From: OlivierHecart Date: Wed, 3 Jan 2024 14:30:37 +0100 Subject: [PATCH] Zenoh only considers UP and RUNNING network interfaces (#573) --- commons/zenoh-util/src/std_only/net/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/commons/zenoh-util/src/std_only/net/mod.rs b/commons/zenoh-util/src/std_only/net/mod.rs index 9d221eefa2..fd5a215952 100644 --- a/commons/zenoh-util/src/std_only/net/mod.rs +++ b/commons/zenoh-util/src/std_only/net/mod.rs @@ -206,6 +206,7 @@ pub fn get_local_addresses() -> ZResult> { { Ok(pnet_datalink::interfaces() .into_iter() + .filter(|iface| iface.is_up() && iface.is_running()) .flat_map(|iface| iface.ips) .map(|ipnet| ipnet.ip()) .collect())