diff --git a/re6st/plib.py b/re6st/plib.py index d8b8859eff87ae8e11347570f51843af5a90234d..2715242ff7ff297bc857dce544ef3649354a3326 100644 --- a/re6st/plib.py +++ b/re6st/plib.py @@ -42,8 +42,7 @@ def server(iface, max_clients, dh_path, pipe_fd, port, proto, encrypt, *args, ** def client(iface, address_list, encrypt, *args, **kw): remote = ['--nobind', '--client'] for ip, port, proto in address_list: - remote += '--remote', ip, port, \ - proto + '-client' if proto in ('tcp', 'tcp6') else proto + remote += '--remote', ip, port, proto remote += args return openvpn(iface, encrypt, *remote, **kw) diff --git a/re6st/registry.py b/re6st/registry.py index 7843a7d4446314cbfb2f73f08f06e301aa028066..f35c66c55774473a038e95975c8e608c1d132a74 100644 --- a/re6st/registry.py +++ b/re6st/registry.py @@ -281,7 +281,6 @@ class RegistryServer(object): peers = deque(('%u/%u' % (int(self.prefix, 2), len(self.prefix)),)) cookie = hex(random.randint(0, 1<<32))[2:] graph = dict.fromkeys(peers) - asked = 0 while True: r, w, _ = select.select([self.sock], [self.sock] if peers else [], [], 1) diff --git a/re6st/utils.py b/re6st/utils.py index a75205ec1c1317eb66d2c4645245401c358c5dd6..4cd19ca38a44eaebfa088d8c57df2edf68117507 100644 --- a/re6st/utils.py +++ b/re6st/utils.py @@ -200,8 +200,9 @@ def dump_address(address): def parse_address(address_list): for address in address_list.split(';'): try: - ip, port, proto = address.split(',') - yield ip, str(port), proto + a = ip, port, proto = address.split(',') + int(port) + yield a except ValueError, e: logging.warning("Failed to parse node address %r (%s)", address, e)