Commit 606ef1b6 authored by Jondy Zhao's avatar Jondy Zhao

Remove option --tls-timeout of openvpn in the Cygwin.

Keep option --persist-tun of openvpn in the Cygwin.
Add tap-drivers before babeld opened.
parent 6a9571a9
...@@ -10,7 +10,7 @@ def openvpn(iface, encrypt, *args, **kw): ...@@ -10,7 +10,7 @@ def openvpn(iface, encrypt, *args, **kw):
args = ['openvpn', args = ['openvpn',
'--dev-type', 'tap', '--dev-type', 'tap',
'--dev-node' if sys.platform == 'cygwin' else '--dev', iface, '--dev-node' if sys.platform == 'cygwin' else '--dev', iface,
'' if sys.platform == 'cygwin' else '--persist-tun', '--persist-tun',
'--persist-key', '--persist-key',
'--script-security', '2', '--script-security', '2',
'--up', ovpn_client, '--up', ovpn_client,
......
...@@ -292,6 +292,11 @@ def main(): ...@@ -292,6 +292,11 @@ def main():
call(if_rt[:3] + ['add', 'proto', 'static'] + if_rt[4:]) call(if_rt[:3] + ['add', 'proto', 'static'] + if_rt[4:])
ip('route', 'unreachable', *x) ip('route', 'unreachable', *x)
# adding tap-windows driver will break others, so we add
# all drivers here
if sys.platform == 'cygwin':
[ ip('vpntap', 'dev', x) for x in tunnel_interfaces ]
config.babel_args += config.iface_list config.babel_args += config.iface_list
cleanup.append(plib.router(subnet, config.hello, config.table, cleanup.append(plib.router(subnet, config.hello, config.table,
os.path.join(config.log, 'babeld.log'), os.path.join(config.log, 'babeld.log'),
...@@ -305,11 +310,6 @@ def main(): ...@@ -305,11 +310,6 @@ def main():
for cmd in config.daemon or (): for cmd in config.daemon or ():
cleanup.append(utils.Popen(cmd, shell=True).stop) cleanup.append(utils.Popen(cmd, shell=True).stop)
# adding tap-windows driver will break others, so we add
# all drivers here
if sys.platform == 'cygwin':
[ ip('vpntap', 'dev', x) for x in tunnel_interfaces ]
# main loop # main loop
if tunnel_manager is None: if tunnel_manager is None:
sys.exit(os.WEXITSTATUS(os.wait()[1])) sys.exit(os.WEXITSTATUS(os.wait()[1]))
......
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