1
1
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 .
This commit is contained in:
vieira 2017-10-18 22:54:44 +00:00 committed by Brian May
parent 29cd75b6f7
commit e173eb6016

View File

@ -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)