diff options
| author | Berik Ashimov <berik@ashimov.com> | 2026-09-18 14:10:41 +0500 |
|---|---|---|
| committer | Berik Ashimov <berik@ashimov.com> | 2026-09-18 14:10:41 +0500 |
| commit | f931a8703c7b9d421ded01636cd201bc3c466da5 (patch) | |
| tree | edd9a0e96165f17905814b1d5b6630ca6aca35a7 /data | |
| parent | 03500232bca1e1e2eda017428171faf9b4a3dc27 (diff) | |
| download | vyos-1x-f931a8703c7b9d421ded01636cd201bc3c466da5.tar.gz vyos-1x-f931a8703c7b9d421ded01636cd201bc3c466da5.zip | |
openvpn: T9334: stop rendering "keepalive 0 0"
An interval of 0 is how the CLI turns keepalive off, and it rendered
"keepalive 0 0" because OpenVPN skipped its own sanity checks on that
pair. OpenVPN 2.7.6 dropped the exception and now refuses to start:
"keepalive ping: Must be an integer between 1 and 86400, not 0".
Leave the directive out of the file instead. Nothing then sets ping or
ping-restart, which is the keepalive-off the interval asked for, and a
saved configuration still commits untouched.
Diffstat (limited to 'data')
| -rw-r--r-- | data/templates/openvpn/server.conf.j2 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/data/templates/openvpn/server.conf.j2 b/data/templates/openvpn/server.conf.j2 index b0acf828a..ee05f9bfd 100644 --- a/data/templates/openvpn/server.conf.j2 +++ b/data/templates/openvpn/server.conf.j2 @@ -107,7 +107,9 @@ max-clients {{ server.max_connections }} client-config-dir /run/openvpn/ccd/{{ ifname }} {% endif %} {% endif %} +{% if keep_alive.interval | int > 0 %} keepalive {{ keep_alive.interval }} {{ keep_alive.interval | int * keep_alive.failure_count | int }} +{% endif %} management /run/openvpn/openvpn-mgmt-intf unix {% if server is vyos_defined %} {% if server.reject_unconfigured_clients is vyos_defined %} |
