mirror of
https://github.com/opnsense/core.git
synced 2026-10-12 02:20:36 +00:00
VPN: OpenVPN: Instances - improve keepalive validation, mentioned in https://github.com/opnsense/core/pull/10174
(cherry picked from commit 43dc040cfb)
This commit is contained in:
committed by
Franco Fichtner
parent
d2dcdbefe2
commit
fb4f91c2a3
@@ -189,6 +189,11 @@ class OpenVPN extends BaseModel
|
||||
gettext('Timeout must be at least twice the interval value.'),
|
||||
$key . ".keepalive_timeout"
|
||||
));
|
||||
} elseif ($instance->keepalive_interval->isEmpty() xor $instance->keepalive_timeout->isEmpty()) {
|
||||
$messages->appendMessage(new Message(
|
||||
gettext('To configure keepalive, both interval and timout need to be specified.'),
|
||||
$key . ".keepalive_timeout"
|
||||
));
|
||||
}
|
||||
|
||||
if ($instance->dev_type == 'ovpn' && strpos($instance->proto, 'udp') === false) {
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
<MinimumValue>0</MinimumValue>
|
||||
</keepalive_interval>
|
||||
<keepalive_timeout type="IntegerField">
|
||||
<MinimumValue>0</MinimumValue>
|
||||
<MinimumValue>1</MinimumValue>
|
||||
</keepalive_timeout>
|
||||
<reneg-sec type="IntegerField">
|
||||
<MinimumValue>0</MinimumValue>
|
||||
|
||||
Reference in New Issue
Block a user