mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-02-26 15:23:11 +01:00
Skip empty lines on incoming routes data
If we receive no routes from server or if, for some reason, we receive some empty lines, we should skip them instead of crashing. Fixes on of the problems in #147.
This commit is contained in:
parent
29cd75b6f7
commit
e173eb6016
@ -489,6 +489,7 @@ def _main(tcp_listener, udp_listener, fw, ssh_cmd, remotename,
|
||||
def onroutes(routestr):
|
||||
if auto_nets:
|
||||
for line in routestr.strip().split(b'\n'):
|
||||
if not line: break
|
||||
(family, ip, width) = line.split(b',', 2)
|
||||
family = int(family)
|
||||
width = int(width)
|
||||
|
Loading…
Reference in New Issue
Block a user