diff options
author | jim-p <jim@pingle.org> | 2009-04-09 16:19:13 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2009-04-09 16:19:13 -0400 |
commit | 5accf1301ac3bb5b03b7a37fcd86349a45ca16a5 (patch) | |
tree | fd04407d4653f35336842dee17ec5f2ea5b025ff /usr/local/www/vpn_openvpn_server.php | |
parent | d6cb86d1f0669ff3f59ca9bc444b8516d7ccefaa (diff) | |
download | pfsense-5accf1301ac3bb5b03b7a37fcd86349a45ca16a5.zip pfsense-5accf1301ac3bb5b03b7a37fcd86349a45ca16a5.tar.gz |
Fix OpenVPN instance port change.
It had been failing on any change, including valid unused choices.
Diffstat (limited to 'usr/local/www/vpn_openvpn_server.php')
-rw-r--r-- | usr/local/www/vpn_openvpn_server.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php index f6a0a8d..3da69ae 100644 --- a/usr/local/www/vpn_openvpn_server.php +++ b/usr/local/www/vpn_openvpn_server.php @@ -177,7 +177,8 @@ if ($_POST) { if ($result = openvpn_validate_cidr($pconfig['local_network'], 'Local network')) $input_errors[] = $result; - if (openvpn_port_used($pconfig['protocol'], $pconfig['local_port']) != $vpnid) + $portused = openvpn_port_used($pconfig['protocol'], $pconfig['local_port']); + if (($portused != $vpnid) && ($portused != 0)) $input_errors[] = "The specified 'Local port' is in use. Please select another value"; if (!$tls_mode && !$pconfig['autokey_enable']) |