Commit 24fea8cd authored by Killian Lufau's avatar Killian Lufau Committed by Julien Muchembled

Remove old fix in ovpn-client

The fix to mark an interface as "up" and indicate its MTU was
useful for machines with a single client, because OpenVPN would fail
to configure them this way in OpenVPN 2.3. It has been fixed in 2.4
so the fix has been removed.

/reviewed-on !14
parent 114a1763
#!/usr/bin/python2 -S #!/usr/bin/python2 -S
import os, sys import os, sys, time
os.write(int(sys.argv[1]), repr((os.environ['common_name'], time.time(),
script_type = os.environ['script_type'] int(os.environ['tls_serial_0']), os.environ['OPENVPN_external_ip'])))
if script_type == 'up':
# OpenVPN unsets PATH before calling hooks
# which is equivalent to set /bin:/usr/bin
os.environ['PATH'] = '/bin:/sbin:/usr/bin:/usr/sbin'
os.execlp('ip', 'ip', 'link', 'set', os.environ['dev'], 'up',
'mtu', os.environ['tun_mtu'])
if script_type == 'route-up':
import time
os.write(int(sys.argv[1]), repr((os.environ['common_name'], time.time(),
int(os.environ['tls_serial_0']), os.environ['OPENVPN_external_ip'])))
...@@ -13,7 +13,6 @@ def openvpn(iface, encrypt, *args, **kw): ...@@ -13,7 +13,6 @@ def openvpn(iface, encrypt, *args, **kw):
'--persist-tun', '--persist-tun',
'--persist-key', '--persist-key',
'--script-security', '2', '--script-security', '2',
'--up', ovpn_client,
#'--user', 'nobody', '--group', 'nogroup', #'--user', 'nobody', '--group', 'nogroup',
] + list(args) ] + list(args)
if ovpn_log: if ovpn_log:
......
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