mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-07-08 10:37:25 +02: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:
@ -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)
|
||||
|
Reference in New Issue
Block a user