Commit 9dac60f9 authored by Julien Muchembled's avatar Julien Muchembled

Add a warning about a possible misuse of multiple --ip arguments

'--ip any' was also broken due to missing parenthesis.
parent ed2846b4
...@@ -159,9 +159,15 @@ def main(): ...@@ -159,9 +159,15 @@ def main():
else: else:
remote_gateway = None remote_gateway = None
forwarder = None forwarder = None
if len(config.ip) > 1 and 'upnp' in config.ip or 'any' in config.ip: if len(config.ip) > 1:
sys.exit("error: argument --ip can be given only once with 'any'" if 'upnp' in config.ip or 'any' in config.ip:
" or 'upnp' value") sys.exit("error: argument --ip can be given only once with"
" 'any' or 'upnp' value")
logging.info("Multiple --ip passed: note that re6st does nothing to"
" make sure that incoming paquets are replied via the correct"
" gateway. So without manual network configuration, this can"
" not be used to accept server connections from multiple"
" gateways.")
if 'upnp' in config.ip or not config.ip: if 'upnp' in config.ip or not config.ip:
logging.info('Attempting automatic configuration via UPnP...') logging.info('Attempting automatic configuration via UPnP...')
try: try:
......
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