From bd9b5047f3ad14a419dabaa97b2b6ef62c508820 Mon Sep 17 00:00:00 2001 From: Han Xu Date: Wed, 18 Feb 2026 21:48:51 -0800 Subject: [PATCH 1/2] fix a test --- tests/mdns_test.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/mdns_test.rs b/tests/mdns_test.rs index d618f5f..3847ce7 100644 --- a/tests/mdns_test.rs +++ b/tests/mdns_test.rs @@ -755,11 +755,11 @@ fn test_disable_interface_cache() { .duration_since(SystemTime::UNIX_EPOCH) .unwrap(); let instance_name = now.as_micros().to_string(); - let service_ip_addr = my_ip_interfaces() + let service_ip_addr: Vec<_> = my_ip_interfaces() .iter() - .find(|iface| iface.ip().is_ipv4()) .map(|iface| iface.ip()) - .unwrap(); + .filter(|ip| ip.is_ipv4() && !ip.is_loopback()) + .collect(); let host_name = "disabled_intf_host.local."; let port = 5201; @@ -767,7 +767,7 @@ fn test_disable_interface_cache() { ty_domain, &instance_name, host_name, - service_ip_addr, + &service_ip_addr[..], port, None, ) @@ -783,7 +783,7 @@ fn test_disable_interface_cache() { sleep(Duration::from_secs(1)); // Disable the interface for the client. - println!("Disabling interface with IP: {service_ip_addr}"); + println!("Disabling interface with IP: {:?}", service_ip_addr); client.disable_interface(service_ip_addr).unwrap(); // Browse for the service. From 1a083d8003f9da488aea8830c15119d48b4daef4 Mon Sep 17 00:00:00 2001 From: Han Xu Date: Wed, 18 Feb 2026 21:51:13 -0800 Subject: [PATCH 2/2] rename only --- tests/mdns_test.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/mdns_test.rs b/tests/mdns_test.rs index 3847ce7..5440f8c 100644 --- a/tests/mdns_test.rs +++ b/tests/mdns_test.rs @@ -755,7 +755,7 @@ fn test_disable_interface_cache() { .duration_since(SystemTime::UNIX_EPOCH) .unwrap(); let instance_name = now.as_micros().to_string(); - let service_ip_addr: Vec<_> = my_ip_interfaces() + let ipv4_list: Vec<_> = my_ip_interfaces() .iter() .map(|iface| iface.ip()) .filter(|ip| ip.is_ipv4() && !ip.is_loopback()) @@ -767,7 +767,7 @@ fn test_disable_interface_cache() { ty_domain, &instance_name, host_name, - &service_ip_addr[..], + &ipv4_list[..], port, None, ) @@ -783,8 +783,8 @@ fn test_disable_interface_cache() { sleep(Duration::from_secs(1)); // Disable the interface for the client. - println!("Disabling interface with IP: {:?}", service_ip_addr); - client.disable_interface(service_ip_addr).unwrap(); + println!("Disabling interface with IP: {:?}", ipv4_list); + client.disable_interface(ipv4_list).unwrap(); // Browse for the service. let handle = client.browse(ty_domain).unwrap();