summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_openvpn.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-01-30 02:25:00 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-01-30 02:25:00 +0000
commit4f8e387ddd4cb91d86fdf6f32558d66527338f2a (patch)
tree64ab88429aa0bc8c05885a11de2452d7f16ec2d9 /usr/local/www/vpn_openvpn.php
parent989c7b5715e51ea5398181bff765c7e21bad6e03 (diff)
downloadpfsense-4f8e387ddd4cb91d86fdf6f32558d66527338f2a.zip
pfsense-4f8e387ddd4cb91d86fdf6f32558d66527338f2a.tar.gz
OpenVPN cleanups by mposch@gmail.com
Diffstat (limited to 'usr/local/www/vpn_openvpn.php')
-rwxr-xr-xusr/local/www/vpn_openvpn.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr/local/www/vpn_openvpn.php b/usr/local/www/vpn_openvpn.php
index 95d3dc9..d6d3684 100755
--- a/usr/local/www/vpn_openvpn.php
+++ b/usr/local/www/vpn_openvpn.php
@@ -50,7 +50,7 @@ if ($_POST) {
unset($input_errors);
/* input validation */
- if ($_POST['enable']) {
+ if (isset($_POST['enable'])) {
$reqdfields = explode(" ", "tun_iface bind_iface ipblock");
$reqdfieldsn = explode(",", "Tunnel type,Interface binding,IP address block start");
@@ -59,7 +59,7 @@ if ($_POST) {
}
/* need a test here to make sure prefix and max_clients are coherent */
-
+
/* Sort out the cert+key files */
if (is_null($_POST['ca_cert']))
$input_errors[] = "You must provide a CA certificate file";
@@ -84,7 +84,6 @@ if ($_POST) {
if (!$input_errors) {
$server =& $config['ovpn']['server'];
$server['enable'] = $_POST['enable'] ? true : false;
-
/* Make sure that the tunnel interface type has not changed */
if ($server['tun_iface'] != $_POST['tun_iface']){
$server['tun_iface'] = $_POST['tun_iface'];
@@ -133,7 +132,7 @@ if ($_POST) {
}
else{
ovpn_lock();
- $retval = ovpn_config_server();
+ $retval = ovpn_config_server($server['enable']);
ovpn_unlock();
}
$savemsg = get_std_save_message($retval);
OpenPOWER on IntegriCloud