summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-03-27 22:15:20 +0545
committerRenato Botelho <renato@netgate.com>2017-03-27 14:41:08 -0300
commite4958a8fe2591ceac61ae615d2dd1bb092cca2ed (patch)
tree6360c63553954824191b4ea767905c3063f6306f /src/usr
parent33cb7cc2728d4b6faf502d21c480781765dd7577 (diff)
downloadpfsense-e4958a8fe2591ceac61ae615d2dd1bb092cca2ed.zip
pfsense-e4958a8fe2591ceac61ae615d2dd1bb092cca2ed.tar.gz
Add underscores to is_port* function names
(cherry picked from commit 593e9fe32d2959cd823fe5da55714ccfb9a0e958)
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/firewall_aliases_edit.php2
-rw-r--r--src/usr/local/www/firewall_aliases_import.php2
-rw-r--r--src/usr/local/www/firewall_nat_edit.php10
-rw-r--r--src/usr/local/www/firewall_nat_out_edit.php6
-rw-r--r--src/usr/local/www/firewall_rules_edit.php8
-rw-r--r--src/usr/local/www/load_balancer_pool_edit.php2
-rw-r--r--src/usr/local/www/load_balancer_virtual_server_edit.php2
7 files changed, 16 insertions, 16 deletions
diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php
index b370b72..64879e5 100644
--- a/src/usr/local/www/firewall_aliases_edit.php
+++ b/src/usr/local/www/firewall_aliases_edit.php
@@ -463,7 +463,7 @@ if ($_POST) {
}
}
} else if ($_POST['type'] == "port") {
- if (!is_portorrange($input_address)) {
+ if (!is_port_or_range($input_address)) {
$input_errors[] = sprintf(gettext("%s is not a valid port or alias."), $input_address);
}
} else if ($_POST['type'] == "host" || $_POST['type'] == "network") {
diff --git a/src/usr/local/www/firewall_aliases_import.php b/src/usr/local/www/firewall_aliases_import.php
index f59db15..97bb582 100644
--- a/src/usr/local/www/firewall_aliases_import.php
+++ b/src/usr/local/www/firewall_aliases_import.php
@@ -153,7 +153,7 @@ if ($_POST) {
if ($tab == "port") {
// Port alias
if (!empty($impip)) {
- if (is_portorrange($impip)) {
+ if (is_port_or_range($impip)) {
$imported_ips[] = $impip;
$imported_descs[] = $impdesc;
} else {
diff --git a/src/usr/local/www/firewall_nat_edit.php b/src/usr/local/www/firewall_nat_edit.php
index 1b1bd82..1077f57 100644
--- a/src/usr/local/www/firewall_nat_edit.php
+++ b/src/usr/local/www/firewall_nat_edit.php
@@ -292,20 +292,20 @@ if ($_POST) {
$input_errors[] = sprintf(gettext("Redirect target IP must be IPv4."));
}
- if ($_POST['srcbeginport'] && !is_portoralias($_POST['srcbeginport'])) {
+ if ($_POST['srcbeginport'] && !is_port_or_alias($_POST['srcbeginport'])) {
$input_errors[] = sprintf(gettext("%s is not a valid start source port. It must be a port alias or integer between 1 and 65535."), $_POST['srcbeginport']);
}
- if ($_POST['srcendport'] && !is_portoralias($_POST['srcendport'])) {
+ if ($_POST['srcendport'] && !is_port_or_alias($_POST['srcendport'])) {
$input_errors[] = sprintf(gettext("%s is not a valid end source port. It must be a port alias or integer between 1 and 65535."), $_POST['srcendport']);
}
- if ($_POST['dstbeginport'] && !is_portoralias($_POST['dstbeginport'])) {
+ if ($_POST['dstbeginport'] && !is_port_or_alias($_POST['dstbeginport'])) {
$input_errors[] = sprintf(gettext("%s is not a valid start destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstbeginport']);
}
- if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport'])) {
+ if ($_POST['dstendport'] && !is_port_or_alias($_POST['dstendport'])) {
$input_errors[] = sprintf(gettext("%s is not a valid end destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstendport']);
}
- if ((strtoupper($_POST['proto']) == "TCP" || strtoupper($_POST['proto']) == "UDP" || strtoupper($_POST['proto']) == "TCP/UDP") && (!isset($_POST['nordr']) && !is_portoralias($_POST['localbeginport']))) {
+ if ((strtoupper($_POST['proto']) == "TCP" || strtoupper($_POST['proto']) == "UDP" || strtoupper($_POST['proto']) == "TCP/UDP") && (!isset($_POST['nordr']) && !is_port_or_alias($_POST['localbeginport']))) {
$input_errors[] = sprintf(gettext("A valid redirect target port must be specified. It must be a port alias or integer between 1 and 65535."), $_POST['localbeginport']);
}
diff --git a/src/usr/local/www/firewall_nat_out_edit.php b/src/usr/local/www/firewall_nat_out_edit.php
index 7b28e7a..0ca8933 100644
--- a/src/usr/local/www/firewall_nat_out_edit.php
+++ b/src/usr/local/www/firewall_nat_out_edit.php
@@ -206,15 +206,15 @@ if ($_POST) {
$_POST['natport'] = trim($_POST['natport']);
}
- if ($protocol_uses_ports && $_POST['sourceport'] <> "" && !is_portorrangeoralias($_POST['sourceport'])) {
+ if ($protocol_uses_ports && $_POST['sourceport'] <> "" && !is_port_or_range_or_alias($_POST['sourceport'])) {
$input_errors[] = gettext("A valid port or port alias must be supplied for the source port entry.");
}
- if ($protocol_uses_ports && $_POST['dstport'] <> "" && !is_portorrangeoralias($_POST['dstport'])) {
+ if ($protocol_uses_ports && $_POST['dstport'] <> "" && !is_port_or_range_or_alias($_POST['dstport'])) {
$input_errors[] = gettext("A valid port or port alias must be supplied for the destination port entry.");
}
- if ($protocol_uses_ports && $_POST['natport'] <> "" && !is_portorrangeoralias($_POST['natport']) && !isset($_POST['nonat'])) {
+ if ($protocol_uses_ports && $_POST['natport'] <> "" && !is_port_or_range_or_alias($_POST['natport']) && !isset($_POST['nonat'])) {
$input_errors[] = gettext("A valid port must be supplied for the NAT port entry.");
}
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index 4a7eab4..2ccf127 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -511,16 +511,16 @@ if ($_POST) {
$_POST['dstendport'] = 0;
}
- if ($_POST['srcbeginport'] && !is_portoralias($_POST['srcbeginport'])) {
+ if ($_POST['srcbeginport'] && !is_port_or_alias($_POST['srcbeginport'])) {
$input_errors[] = sprintf(gettext("%s is not a valid start source port. It must be a port alias or integer between 1 and 65535."), $_POST['srcbeginport']);
}
- if ($_POST['srcendport'] && !is_portoralias($_POST['srcendport'])) {
+ if ($_POST['srcendport'] && !is_port_or_alias($_POST['srcendport'])) {
$input_errors[] = sprintf(gettext("%s is not a valid end source port. It must be a port alias or integer between 1 and 65535."), $_POST['srcendport']);
}
- if ($_POST['dstbeginport'] && !is_portoralias($_POST['dstbeginport'])) {
+ if ($_POST['dstbeginport'] && !is_port_or_alias($_POST['dstbeginport'])) {
$input_errors[] = sprintf(gettext("%s is not a valid start destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstbeginport']);
}
- if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport'])) {
+ if ($_POST['dstendport'] && !is_port_or_alias($_POST['dstendport'])) {
$input_errors[] = sprintf(gettext("%s is not a valid end destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstendport']);
}
if (!$_POST['srcbeginport_cust'] && $_POST['srcendport_cust']) {
diff --git a/src/usr/local/www/load_balancer_pool_edit.php b/src/usr/local/www/load_balancer_pool_edit.php
index b93044c..6346b1b 100644
--- a/src/usr/local/www/load_balancer_pool_edit.php
+++ b/src/usr/local/www/load_balancer_pool_edit.php
@@ -129,7 +129,7 @@ if ($_POST) {
$input_errors[] = sprintf(gettext("Sorry, an alias is already named %s."), $_POST['name']);
}
- if (!is_portoralias($_POST['port'])) {
+ if (!is_port_or_alias($_POST['port'])) {
$input_errors[] = gettext("The port must be an integer between 1 and 65535, or a port alias.");
}
diff --git a/src/usr/local/www/load_balancer_virtual_server_edit.php b/src/usr/local/www/load_balancer_virtual_server_edit.php
index 1ae1653..b18d289 100644
--- a/src/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/src/usr/local/www/load_balancer_virtual_server_edit.php
@@ -125,7 +125,7 @@ if ($_POST) {
$input_errors[] = gettext("The 'name' field must be 32 characters or less.");
}
- if ($_POST['port'] != "" && !is_portoralias($_POST['port'])) {
+ if ($_POST['port'] != "" && !is_port_or_alias($_POST['port'])) {
$input_errors[] = gettext("The port must be an integer between 1 and 65535, a port alias, or left blank.");
}
OpenPOWER on IntegriCloud