mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] yunomdns: Ignore ipv4 link-local addresses
This commit is contained in:
parent
e3f33d6c20
commit
6854f23cca
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ def get_network_local_interfaces() -> Dict[str, Dict[str, List[str]]]:
|
||||||
|
|
||||||
interfaces = {
|
interfaces = {
|
||||||
adapter.name: {
|
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],
|
"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()
|
for adapter in ifaddr.get_adapters()
|
||||||
|
|
Loading…
Add table
Reference in a new issue