From 6854f23cca74fad1b131f5bdec7d92c7cc62aec4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 28 Nov 2021 02:51:58 +0100 Subject: [PATCH] [fix] yunomdns: Ignore ipv4 link-local addresses --- bin/yunomdns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/yunomdns b/bin/yunomdns index 0aee28195..11bed3215 100755 --- a/bin/yunomdns +++ b/bin/yunomdns @@ -21,7 +21,7 @@ def get_network_local_interfaces() -> Dict[str, Dict[str, List[str]]]: interfaces = { adapter.name: { - "ipv4": [ip.ip for ip in adapter.ips if ip.is_IPv4 and ip_address(ip.ip).is_private], + "ipv4": [ip.ip for ip in adapter.ips if ip.is_IPv4 and ip_address(ip.ip).is_private and not ip_address(ip.ip).is_link_local], "ipv6": [ip.ip[0] for ip in adapter.ips if ip.is_IPv6 and ip_address(ip.ip[0]).is_private and not ip_address(ip.ip[0]).is_link_local], } for adapter in ifaddr.get_adapters()