summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian May <brian@linuxpenguins.xyz>2016-01-31 19:15:02 +1100
committerBrian May <brian@linuxpenguins.xyz>2016-01-31 19:15:02 +1100
commit4fcf7c73da1394e5466ea00898c8c489903fd28c (patch)
tree6b4dc6437a351a6a372e6d75acb3190690e2123e
parentba8e948c0d7da960184daea1fa4fea0f7ffb9810 (diff)
Fix regression: ensure we do bind
Closes: #68
-rw-r--r--sshuttle/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshuttle/client.py b/sshuttle/client.py
index 2561433..d85ce08 100644
--- a/sshuttle/client.py
+++ b/sshuttle/client.py
@@ -141,13 +141,13 @@ class MultiListener:
def bind(self, address_v6, address_v4):
assert(not self.bind_called)
self.bind_called = True
- if address_v6 and self.v6:
+ if address_v6 is not None:
self.v6 = socket.socket(socket.AF_INET6, self.type, self.proto)
self.v6.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
self.v6.bind(address_v6)
else:
self.v6 = None
- if address_v4 and self.v4:
+ if address_v4 is not None:
self.v4 = socket.socket(socket.AF_INET, self.type, self.proto)
self.v4.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
self.v4.bind(address_v4)