mirror of
https://github.com/markqvist/Reticulum
synced 2026-11-27 13:52:15 +00:00
Automatically select IPv6 address for IPv6-only interfaces
This commit is contained in:
1 parent
1282061701
commit
212af2f43b
1 file changed
+1
-1
@@ -422,7 +422,7 @@ class TCPServerInterface(Interface):
|
||||
if len(ifaddr) < 1:
|
||||
raise SystemError(f"No addresses available on specified kernel interface \"{name}\" for TCPServerInterface to bind to")
|
||||
|
||||
if prefer_ipv6 and netinfo.AF_INET6 in ifaddr:
|
||||
if (prefer_ipv6 or not netinfo.AF_INET in ifaddr) and netinfo.AF_INET6 in ifaddr:
|
||||
bind_ip = ifaddr[netinfo.AF_INET6][0]["addr"]
|
||||
if bind_ip.lower().startswith("fe80::"):
|
||||
# We'll need to add the interface as scope for link-local addresses
|
||||
|
||||
Reference in new issue
Block a user