elaborate reasons of header parsing failure

This commit is contained in:
clowwindy 2015-06-08 08:29:01 +08:00
parent 16db66675b
commit e74ae193d0

View file

@ -171,8 +171,8 @@ def parse_header(data):
else:
logging.warn('header is too short')
else:
logging.warn('unsupported addrtype %d, maybe wrong password' %
addrtype)
logging.warn('unsupported addrtype %d, maybe wrong password or '
'encryption method' % addrtype)
if dest_addr is None:
return None
return addrtype, to_bytes(dest_addr), dest_port, header_length