Skip to content

Commit

Permalink
try to lookup ipv6 interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed May 5, 2023
1 parent bcc39fe commit 7732127
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions xpra/net/net_util.py
Expand Up @@ -168,9 +168,6 @@ def get_iface(ip) -> str:
return None
else:
return iface
if ip.find(":")>=0:
#ipv6?
return None
if any(x for x in ip if (".:0123456789").find(x)<0):
#extra characters, assume this is a hostname:
try:
Expand All @@ -188,9 +185,13 @@ def get_iface(ip) -> str:
log("get_iface(%s) sockaddr=%s", ip, sockaddr)
ip = sockaddr[0]

ip_parts = ip.split(".")
if len(ip_parts)!=4:
return None
if ip.find(":")>=0:
#ipv6?
ip_parts = ip.split(":")
else:
ip_parts = ip.split(".")
if len(ip_parts)!=4:
return None

best_match = None
get_bind_IPs()
Expand Down

0 comments on commit 7732127

Please sign in to comment.