Commit 50849b86 authored by Brian May's avatar Brian May

This hack is IPv4 specific, ensure it doesn't get used for other

address families.
parent 6b7cf770
......@@ -128,7 +128,8 @@ class SockWrapper:
return # already connected
self.rsock.setblocking(False)
debug3('%r: trying connect to %r\n' % (self, self.connect_to))
if socket.inet_aton(self.connect_to[0])[0] == '\0':
family = self.rsock.family
if family==socket.AF_INET and socket.inet_pton(family, self.connect_to[0])[0] == '\0':
self.seterr(Exception("Can't connect to %r: "
"IP address starts with zero\n"
% (self.connect_to,)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment