summaryrefslogtreecommitdiff
path: root/data/templates/openvpn
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-27 19:56:31 +0200
committerGitHub <noreply@github.com>2021-09-27 19:56:31 +0200
commit753757b0fdd61c1b198ec5e1ea9d68e0ada90368 (patch)
tree55abb8a0fee8b1f8962257d3c10158b1e38c4a58 /data/templates/openvpn
parent2f4466802d5448ecee59009686ed7c49c6a392d7 (diff)
parent96681d8bf1ede069b573a4cbe3a2493c374d048e (diff)
downloadvyos-1x-753757b0fdd61c1b198ec5e1ea9d68e0ada90368.tar.gz
vyos-1x-753757b0fdd61c1b198ec5e1ea9d68e0ada90368.zip
Merge pull request #1015 from sever-sever/T690
openvpn: T690: Fix template for gateway and metric
Diffstat (limited to 'data/templates/openvpn')
-rw-r--r--data/templates/openvpn/server.conf.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/templates/openvpn/server.conf.tmpl b/data/templates/openvpn/server.conf.tmpl
index 50bb49134..c96b57fb8 100644
--- a/data/templates/openvpn/server.conf.tmpl
+++ b/data/templates/openvpn/server.conf.tmpl
@@ -76,7 +76,7 @@ server {{ subnet | address_from_cidr }} {{ subnet | netmask_from_cidr }} nopool
{% if server.push_route is defined and server.push_route is not none %}
{% for route, route_config in server.push_route.items() %}
{% if route | is_ipv4 %}
-push "route {{ route | address_from_cidr }} {{ route | netmask_from_cidr }} {{ subnet | first_host_address }} {{ route_config.metric if route_config.metric is defined else "0" }}"
+push "route {{ route | address_from_cidr }} {{ route | netmask_from_cidr }}{% if route_config.metric is defined %} {{ subnet | first_host_address }} {{ route_config.metric }}{% endif %}"
{% elif route | is_ipv6 %}
push "route-ipv6 {{ route }}"
{% endif %}