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 /src | |
| 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 'src')
| -rwxr-xr-x | src/conf_mode/interfaces_openvpn.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces_openvpn.py b/src/conf_mode/interfaces_openvpn.py index 2b235c057..3cf416c3c 100755 --- a/src/conf_mode/interfaces_openvpn.py +++ b/src/conf_mode/interfaces_openvpn.py @@ -542,9 +542,8 @@ def verify(openvpn): failure_count = int(keep_alive['failure_count']) timeout = interval * failure_count - # A zero interval renders "keepalive 0 0", on which OpenVPN skips its - # own sanity checks - that is how a configuration turns keepalive off, - # so only an enabled one has to satisfy them + # A zero interval turns keepalive off and renders no directive at + # all, so only an enabled one has to satisfy them if interval > 0: # the timeout has to be at least twice the interval, which the CLI # ranges do not enforce |
