diff --git a/src/protocol.py b/src/protocol.py index e5b2c5c2..dca4c942 100644 --- a/src/protocol.py +++ b/src/protocol.py @@ -100,7 +100,10 @@ def checkIPAddress(host, private=False): return False return hostStandardFormat else: - hostStandardFormat = socket.inet_ntop(socket.AF_INET6, host) + try: + hostStandardFormat = socket.inet_ntop(socket.AF_INET6, host) + except ValueError: + return False if hostStandardFormat == "": # This can happen on Windows systems which are not 64-bit compatible # so let us drop the IPv6 address.