From 4e8c5411b5e6b50cf4568467f6c93b2aebc17406 Mon Sep 17 00:00:00 2001 From: vieira Date: Mon, 6 Nov 2017 01:07:10 +0000 Subject: [PATCH] Also register por for dns proxy and for pairs in use by other procs --- sshuttle/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sshuttle/client.py b/sshuttle/client.py index e495730..b5f46b4 100644 --- a/sshuttle/client.py +++ b/sshuttle/client.py @@ -684,6 +684,7 @@ def main(listenip_v6, listenip_v4, except socket.error as e: if e.errno == errno.EADDRINUSE: last_e = e + used_ports.append(port) else: raise e @@ -724,10 +725,12 @@ def main(listenip_v6, listenip_v4, try: dns_listener.bind(lv6, lv4) bound = True + used_ports.append(port) break except socket.error as e: if e.errno == errno.EADDRINUSE: last_e = e + used_ports.append(port) else: raise e debug2('\n')