summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/vpn_openvpn_csc.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2015-11-30 16:47:14 -0500
committerjim-p <jimp@pfsense.org>2015-11-30 16:50:17 -0500
commit3044a0c27be91e1bb3efe8df4e676e6a9fefc0e5 (patch)
tree9f48c747d036786702da3b31e77ad7e32e1a55e1 /src/usr/local/www/vpn_openvpn_csc.php
parent154b0f807f89f52791eea4f8fe2972872335a2eb (diff)
downloadpfsense-3044a0c27be91e1bb3efe8df4e676e6a9fefc0e5.zip
pfsense-3044a0c27be91e1bb3efe8df4e676e6a9fefc0e5.tar.gz
GUI changes to OpenVPN CSC handling to allow per-server configuration. Ticket #5526
Diffstat (limited to 'src/usr/local/www/vpn_openvpn_csc.php')
-rw-r--r--src/usr/local/www/vpn_openvpn_csc.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/usr/local/www/vpn_openvpn_csc.php b/src/usr/local/www/vpn_openvpn_csc.php
index c9e716e..d5ebde4 100644
--- a/src/usr/local/www/vpn_openvpn_csc.php
+++ b/src/usr/local/www/vpn_openvpn_csc.php
@@ -65,6 +65,8 @@ require("guiconfig.inc");
require_once("openvpn.inc");
require_once("pkg-utils.inc");
+global $openvpn_tls_server_modes;
+
$pgtitle = array(gettext("OpenVPN"), gettext("Client Specific Override"));
$shortcut_section = "openvpn";
@@ -101,6 +103,7 @@ if ($_GET['act'] == "del") {
if ($_GET['act'] == "edit") {
if (isset($id) && $a_csc[$id]) {
+ $pconfig['server_list'] = explode(",", $a_csc[$id]['server_list']);
$pconfig['custom_options'] = $a_csc[$id]['custom_options'];
$pconfig['disable'] = isset($a_csc[$id]['disable']);
$pconfig['common_name'] = $a_csc[$id]['common_name'];
@@ -240,6 +243,7 @@ if ($_POST) {
if (!$input_errors) {
$csc = array();
+ $csc['server_list'] = implode(",", $pconfig['server_list']);
$csc['custom_options'] = $pconfig['custom_options'];
if ($_POST['disable'] == "yes") {
$csc['disable'] = true;
@@ -325,6 +329,24 @@ if($act=="new" || $act=="edit"):
$section = new Form_Section('General Information');
+ $serveroptionlist = array();
+ if (is_array($config['openvpn']['openvpn-server'])) {
+ foreach ($config['openvpn']['openvpn-server'] as $serversettings) {
+ if (in_array($serversettings['mode'], $openvpn_tls_server_modes)) {
+ $serveroptionlist[$serversettings['vpnid']] = "OpenVPN Server {$serversettings['vpnid']}: {$serversettings['description']}";
+ }
+ }
+ }
+
+ $section->addInput(new Form_Select(
+ 'server_list',
+ 'Server List',
+ $pconfig['server_list'],
+ $serveroptionlist,
+ true
+ ))->setHelp('Select the servers for which the override will apply. Selecting no servers will also apply the override to all servers.');
+
+
$section->addInput(new Form_Checkbox(
'disable',
'Disable',
OpenPOWER on IntegriCloud