auto-nets: retrieve routes only if using auto-nets

There's a known issue that makes sshuttle crash if there are too
many routes on the remote host (that don't fit in 64KB). This patch
requests the routes only if auto-nets is specified on the command
line.
This commit is contained in:
Vasil Kolev
2019-01-27 12:55:21 +02:00
committed by Brian May
parent 0e99adc5d1
commit 8e35f049e2
3 changed files with 15 additions and 7 deletions

View File

@ -453,7 +453,8 @@ def _main(tcp_listener, udp_listener, fw, ssh_cmd, remotename,
stderr=ssyslog._p and ssyslog._p.stdin,
options=dict(latency_control=latency_control,
auto_hosts=auto_hosts,
to_nameserver=to_nameserver))
to_nameserver=to_nameserver,
auto_nets=auto_nets))
except socket.error as e:
if e.args[0] == errno.EPIPE:
raise Fatal("failed to establish ssh session (1)")