summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-07-15 15:09:13 -0400
committerjim-p <jimp@pfsense.org>2016-07-15 15:19:18 -0400
commit0eef97aa1038020dd70fa4ef7156b621b751b34a (patch)
treebc3079822f83fffa726e0b65017c139ff30708db
parent64bac84ebf4a9c3cb7c9aa44218d68b046dbe799 (diff)
downloadpfsense-0eef97aa1038020dd70fa4ef7156b621b751b34a.zip
pfsense-0eef97aa1038020dd70fa4ef7156b621b751b34a.tar.gz
Make a function to resync all OpenVPN CSCs and use it when saving an OpenVPN server. Fixes #6139
-rw-r--r--src/etc/inc/openvpn.inc15
-rw-r--r--src/usr/local/www/vpn_openvpn_server.php1
2 files changed, 11 insertions, 5 deletions
diff --git a/src/etc/inc/openvpn.inc b/src/etc/inc/openvpn.inc
index fe6c369..7f2897a 100644
--- a/src/etc/inc/openvpn.inc
+++ b/src/etc/inc/openvpn.inc
@@ -1270,6 +1270,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";
@@ -1351,11 +1360,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();
}
diff --git a/src/usr/local/www/vpn_openvpn_server.php b/src/usr/local/www/vpn_openvpn_server.php
index f2d0974..57b1040 100644
--- a/src/usr/local/www/vpn_openvpn_server.php
+++ b/src/usr/local/www/vpn_openvpn_server.php
@@ -578,6 +578,7 @@ if ($_POST) {
write_config();
openvpn_resync('server', $server);
+ openvpn_resync_csc_all();
header("Location: vpn_openvpn_server.php");
exit;
OpenPOWER on IntegriCloud