summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-05-07 20:23:07 +0000
committerErmal Luçi <eri@pfsense.org>2009-05-07 20:23:07 +0000
commit2f1e3ebe185ba8fd59953ccc225176279573e25e (patch)
treee644a759f7e0d1c42c7b991ff16f40bffa5dd2bf /etc
parentf3bcb3e326f9eceb5940999c8d722a7aeb6d7bda (diff)
downloadpfsense-2f1e3ebe185ba8fd59953ccc225176279573e25e.zip
pfsense-2f1e3ebe185ba8fd59953ccc225176279573e25e.tar.gz
Fix correction of openvpn parameters.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/openvpn.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index 543f1ee..9c3d69f 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -168,14 +168,14 @@ function openvpn_get_cipherlist() {
function openvpn_validate_host($value, $name) {
$value = trim($value);
- if (empty($value) || !(is_domain($value) && is_ipaddr($value)))
+ if (empty($value) || !is_domain($value) || !is_ipaddr($value)))
return "The field '$name' must contain a valid IP address or domain name.";
return false;
}
function openvpn_validate_port($value, $name) {
$value = trim($value);
- if (empty($value) || !(is_numeric($value) && ($value > 0) && ($value < 65535)))
+ if (empty($value) || !is_numeric($value) || $value < 0 || ($value > 65535)))
return "The field '$name' must contain a valid port, ranging from 0 to 65535.";
return false;
}
OpenPOWER on IntegriCloud