summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-17 18:39:21 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-17 18:39:21 +0100
commitf8a8ee02d0ede240f555ffa558665df686df24a8 (patch)
tree612e14c6cfdfd147b395cc7db15f4d900f34b7ed /data
parente0fdf9b4d746e751d0c12c1e6bd2d10daf22ec76 (diff)
downloadvyos-1x-f8a8ee02d0ede240f555ffa558665df686df24a8.tar.gz
vyos-1x-f8a8ee02d0ede240f555ffa558665df686df24a8.zip
openvpn: T2381: bugfix rendering multiple openvpn-options from CLI
The CLI statement "set interfaces openvpn vtun10 openvpn-option '--tun-mtu 1500 --fragment 1300 --mssfix'" will render in vtun10.conf to: --tun-mtu 1500 --fragment 1300 --mssfix On startup OpenVPN complains about: openvpn-vtun10: Options error: Unrecognized option or missing or extra parameter(s) in vtun10.conf:76: tun-mtu (2.4.7) The options must be split on -- to a new configuration line.
Diffstat (limited to 'data')
-rw-r--r--data/templates/openvpn/server.conf.tmpl6
1 files changed, 5 insertions, 1 deletions
diff --git a/data/templates/openvpn/server.conf.tmpl b/data/templates/openvpn/server.conf.tmpl
index b3b0c936a..79288e40f 100644
--- a/data/templates/openvpn/server.conf.tmpl
+++ b/data/templates/openvpn/server.conf.tmpl
@@ -281,6 +281,10 @@ compat-names
# Custom options added by user (not validated)
#
{% for option in openvpn_option %}
-{{ option }}
+{% for argument in option.split('--') %}
+{% if argument is defined and argument != '' %}
+--{{ argument }}
+{% endif %}
+{% endfor %}
{% endfor %}
{% endif %}