mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
zeroconf: don't allow ipv6 addresses
This commit is contained in:
parent
ccfb3c24ba
commit
505e1dc92b
@ -52,7 +52,7 @@ def getip():
|
||||
|
||||
# Generic method, sometimes gives useless results
|
||||
dumbip = socket.gethostbyaddr(socket.gethostname())[2][0]
|
||||
if not dumbip.startswith('127.'):
|
||||
if not dumbip.startswith('127.') and ':' not in dumbip:
|
||||
return dumbip
|
||||
|
||||
# works elsewhere, but actually sends a packet
|
||||
|
Loading…
Reference in New Issue
Block a user