Commit f5b794e8 authored by Julien Muchembled's avatar Julien Muchembled

Fix server-less mode (--max-clients=0)

parent dcf95b36
...@@ -197,6 +197,7 @@ def main(): ...@@ -197,6 +197,7 @@ def main():
config.disable_proto = () config.disable_proto = ()
address = [] address = []
server_tunnels = {} server_tunnels = {}
forwarder = None
if config.client: if config.client:
config.babel_args.append('re6stnet') config.babel_args.append('re6stnet')
elif config.max_clients: elif config.max_clients:
...@@ -217,7 +218,6 @@ def main(): ...@@ -217,7 +218,6 @@ def main():
return gw_list[0] return gw_list[0]
else: else:
remote_gateway = None remote_gateway = None
forwarder = None
if len(config.ip) > 1: if len(config.ip) > 1:
if 'upnp' in config.ip or 'any' in config.ip: if 'upnp' in config.ip or 'any' in config.ip:
sys.exit("error: argument --ip can be given only once with" sys.exit("error: argument --ip can be given only once with"
...@@ -247,6 +247,8 @@ def main(): ...@@ -247,6 +247,8 @@ def main():
ip_changed = None ip_changed = None
for x in pp: for x in pp:
server_tunnels.setdefault('re6stnet-' + x[1], x) server_tunnels.setdefault('re6stnet-' + x[1], x)
else:
ip_changed = remote_gateway = None
def call(cmd): def call(cmd):
logging.debug('%r', cmd) logging.debug('%r', cmd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment