summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-07-12 19:57:42 -0400
committerjim-p <jimp@pfsense.org>2011-07-12 19:57:42 -0400
commit8b6313a4d3eb1895b6c855436a50606cc7691ad4 (patch)
tree97784c2235366f00f42961dd4557e82fadf1ce8c /usr/local/www/firewall_rules_edit.php
parent13b9dba9aae25edf62d6cd58c7446329b0dd913c (diff)
parentfd3e19f3bf9499b944263c0acaeaa6446260f197 (diff)
downloadpfsense-8b6313a4d3eb1895b6c855436a50606cc7691ad4.zip
pfsense-8b6313a4d3eb1895b6c855436a50606cc7691ad4.tar.gz
Merge remote-tracking branch 'upstream/master'
Conflicts: etc/inc/easyrule.inc etc/inc/filter.inc etc/inc/interfaces.inc etc/inc/services.inc etc/inc/xmlrpc_client.inc usr/local/www/fbegin.inc usr/local/www/services_dhcp.php
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index e935e15..6591ad1 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -305,6 +305,26 @@ if ($_POST) {
$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']))
$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'])
+ if (is_alias($_POST['srcendport_cust']))
+ $input_errors[] = 'If you put port alias in Source port range to: field you must put the same port alias in from: field';
+ if ( $_POST['srcbeginport_cust'] && $_POST['srcendport_cust']){
+ if (is_alias($_POST['srcendport_cust']) && is_alias($_POST['srcendport_cust']) && $_POST['srcbeginport_cust'] != $_POST['srcendport_cust'])
+ $input_errors[] = 'The same port alias must be used in Source port range from: and to: fields';
+ if ((is_alias($_POST['srcbeginport_cust']) && (!is_alias($_POST['srcendport_cust']) && $_POST['srcendport_cust']!='')) ||
+ ((!is_alias($_POST['srcbeginport_cust']) && $_POST['srcbeginport_cust']!='') && is_alias($_POST['srcendport_cust'])))
+ $input_errors[] = 'You cannot specify numbers and port aliases at the same time in Source port range from: and to: field';
+ }
+ if ( !$_POST['dstbeginport_cust'] && $_POST['dstendport_cust'])
+ if (is_alias($_POST['dstendport_cust']))
+ $input_errors[] = 'If you put port alias in Destination port range to: field you must put the same port alias in from: field';
+ if ( $_POST['dstbeginport_cust'] && $_POST['dstendport_cust']){
+ if (is_alias($_POST['dstendport_cust']) && is_alias($_POST['dstendport_cust']) && $_POST['dstbeginport_cust'] != $_POST['dstendport_cust'])
+ $input_errors[] = 'The same port alias must be used in Destination port range from: and to: fields';
+ if ((is_alias($_POST['dstbeginport_cust']) && (!is_alias($_POST['dstendport_cust']) && $_POST['dstendport_cust']!='')) ||
+ ((!is_alias($_POST['dstbeginport_cust']) && $_POST['dstbeginport_cust']!='') && is_alias($_POST['dstendport_cust'])))
+ $input_errors[] = 'You cannot specify numbers and port aliases at the same time in Destination port range from: and to: field';
+ }
/* if user enters an alias and selects "network" then disallow. */
if($_POST['srctype'] == "network") {
OpenPOWER on IntegriCloud