mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
VPN: OpenVPN: Clients - When receiving carp events for client mode openvpn instances, treat INIT the same as BACKUP as both modes aren't active. experiment for https://github.com/opnsense/core/issues/6506
This commit is contained in:
parent
8f9d7e823b
commit
e2a1e8c312
@ -917,9 +917,9 @@ function openvpn_restart($mode, $settings, $carp_event = false)
|
||||
$interface_details = legacy_interface_details(get_real_interface($interface));
|
||||
if (
|
||||
!empty($interface_details) && !empty($interface_details['carp'][$vhid]) &&
|
||||
$interface_details['carp'][$vhid]['status'] == 'BACKUP'
|
||||
in_array($interface_details['carp'][$vhid]['status'], ['BACKUP' ,'INIT'])
|
||||
) {
|
||||
/* do not restart a client if we are a CARP backup instance */
|
||||
/* do not restart a client if we are a CARP backup instance or unplugged (init)*/
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ require_once("plugins.inc.d/openvpn.inc");
|
||||
$subsystem = !empty($argv[1]) ? $argv[1] : '';
|
||||
$type = !empty($argv[2]) ? $argv[2] : '';
|
||||
|
||||
if ($type != 'MASTER' && $type != 'BACKUP') {
|
||||
if (!in_array($type, ['MASTER', 'BACKUP', 'INIT'])) {
|
||||
log_msg("Carp '$type' event unknown from source '{$subsystem}'");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user