diff options
Diffstat (limited to 'usr/local/www/vpn_openvpn_client.php')
-rw-r--r-- | usr/local/www/vpn_openvpn_client.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php index 87832f4..b7e48c0 100644 --- a/usr/local/www/vpn_openvpn_client.php +++ b/usr/local/www/vpn_openvpn_client.php @@ -132,7 +132,8 @@ if ($_POST) { if ($result = openvpn_validate_port($pconfig['local_port'], 'Local port')) $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"; } |