mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-22 16:03:57 +01:00
This hack is IPv4 specific, ensure it doesn't get used for other
address families.
This commit is contained in:
parent
6b7cf770f5
commit
50849b86b0
3
ssnet.py
3
ssnet.py
@ -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,)))
|
||||
|
Loading…
Reference in New Issue
Block a user