mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix OpenVPN instance port change.
It had been failing on any change, including valid unused choices.
This commit is contained in:
parent
d6cb86d1f0
commit
5accf1301a
@ -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";
|
||||
}
|
||||
|
||||
|
||||
@ -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'])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user