Commit a6be6881 authored by Julien Muchembled's avatar Julien Muchembled

Apply tun_mtu when starting TAP interfaces

For the moment, this does nothing since it should always be 1500.
parent 1322079e
...@@ -5,7 +5,8 @@ if os.environ['script_type'] == 'up': ...@@ -5,7 +5,8 @@ if os.environ['script_type'] == 'up':
# OpenVPN unsets PATH before calling hooks # OpenVPN unsets PATH before calling hooks
# which is equivalent to set /bin:/usr/bin # which is equivalent to set /bin:/usr/bin
os.environ['PATH'] = '/bin:/sbin:/usr/bin:/usr/sbin' os.environ['PATH'] = '/bin:/sbin:/usr/bin:/usr/sbin'
os.execlp('ip', 'ip', 'link', 'set', os.environ['dev'], 'up') os.execlp('ip', 'ip', 'link', 'set', os.environ['dev'], 'up',
'mtu', os.environ['tun_mtu'])
# Write into pipe external ip address received # Write into pipe external ip address received
os.write(int(sys.argv[1]), '%(script_type)s %(common_name)s %(OPENVPN_external_ip)s\n' % os.environ) os.write(int(sys.argv[1]), '%(script_type)s %(common_name)s %(OPENVPN_external_ip)s\n' % os.environ)
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