diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-04-20 20:54:56 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-04-20 21:05:36 +0200 |
commit | fc46751976c17da34aedc591bff737c1090f2704 (patch) | |
tree | e8cb99e75c4e101bbeb311d61d469baa03824627 /data/templates/openvpn | |
parent | fa7d691122683f1b4869d56be8cb2d7665814f9d (diff) | |
download | vyos-1x-fc46751976c17da34aedc591bff737c1090f2704.tar.gz vyos-1x-fc46751976c17da34aedc591bff737c1090f2704.zip |
openvpn: T2339: fix for IPv4 local-host addresses
Commit bb9f998 introduced a bug where openvpn fails to start if
'local-host' is an IPv4 address due to 'proto' wanting a IPv6 socket.
This adds a conditional check and uses normal proto if it's IPv4.
Diffstat (limited to 'data/templates/openvpn')
-rw-r--r-- | data/templates/openvpn/server.conf.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/templates/openvpn/server.conf.tmpl b/data/templates/openvpn/server.conf.tmpl index 396888c0f..75ab602f8 100644 --- a/data/templates/openvpn/server.conf.tmpl +++ b/data/templates/openvpn/server.conf.tmpl @@ -18,7 +18,7 @@ dev {{ intf }} persist-key iproute /usr/libexec/vyos/system/unpriv-ip -proto {% if 'tcp-active' in protocol -%}tcp6-client{% elif 'tcp-passive' in protocol -%}tcp6-server{% else %}udp6{% endif %} +proto {{ protocol_real }} {%- if local_host %} local {{ local_host }} |