mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Make a function to resync all OpenVPN CSCs and use it when saving an OpenVPN server. Fixes #6139
This commit is contained in:
parent
f0314a2a82
commit
1f95431826
@ -1278,6 +1278,15 @@ function openvpn_resync_csc(& $settings) {
|
||||
}
|
||||
}
|
||||
|
||||
function openvpn_resync_csc_all() {
|
||||
global $config;
|
||||
if (is_array($config['openvpn']['openvpn-csc'])) {
|
||||
foreach ($config['openvpn']['openvpn-csc'] as & $settings) {
|
||||
openvpn_resync_csc($settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function openvpn_delete_csc(& $settings) {
|
||||
global $g, $config, $openvpn_tls_server_modes;
|
||||
$csc_base_path = "{$g['varetc_path']}/openvpn-csc";
|
||||
@ -1359,11 +1368,7 @@ function openvpn_resync_all($interface = "") {
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($config['openvpn']['openvpn-csc'])) {
|
||||
foreach ($config['openvpn']['openvpn-csc'] as & $settings) {
|
||||
openvpn_resync_csc($settings);
|
||||
}
|
||||
}
|
||||
openvpn_resync_csc_all();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -578,6 +578,7 @@ if ($_POST) {
|
||||
|
||||
write_config();
|
||||
openvpn_resync('server', $server);
|
||||
openvpn_resync_csc_all();
|
||||
|
||||
header("Location: vpn_openvpn_server.php");
|
||||
exit;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user