summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-06-01 19:51:18 +0000
committerErmal <eri@pfsense.org>2012-06-01 19:51:18 +0000
commit85a236e9dd5db87197ed6855995da609bf310bff (patch)
tree7ef1016f01b61c6a76c4d47f6bd28c1acc1bc964 /usr/local/www/firewall_rules_edit.php
parent730b614846c740a1f8d501ca48bcc20198aeff84 (diff)
downloadpfsense-85a236e9dd5db87197ed6855995da609bf310bff.zip
pfsense-85a236e9dd5db87197ed6855995da609bf310bff.tar.gz
Fixes #2428. Reference limiters in rules by name to avoid issues. Also put upgrade code for existing configs. The same fix is necessary for 2.0.x though not sure how this should be committed there.
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 13f4287..cfae019 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -190,6 +190,13 @@ $if = $pconfig['interface'];
if (isset($_GET['dup']))
unset($id);
+read_altq_config(); /* XXX: */
+$qlist =& get_unique_queue_list();
+read_dummynet_config(); /* XXX: */
+$dnqlist =& get_unique_dnqueue_list();
+read_layer7_config();
+$l7clist =& get_l7_unique_list();
+
if ($_POST) {
unset($input_errors);
@@ -441,9 +448,9 @@ if ($_POST) {
$input_errors[] = gettext("You must select a queue for the In direction before selecting one for Out too.");
else if ($_POST['pdnpipe'] == $_POST['dnpipe'])
$input_errors[] = gettext("In and Out Queue cannot be the same.");
- else if ($pdnpipe[0] == "?" && $dnpipe[0] <> "?")
+ else if ($dnqlist[$_POST['pdnpipe']][0] == "?" && $dnqlist[$_POST['dnpipe']][0] <> "?")
$input_errors[] = gettext("You cannot select one queue and one virtual interface for IN and Out. both must be from the same type.");
- else if ($dnpipe[0] == "?" && $pdnpipe[0] <> "?")
+ else if ($dnqlist[$_POST['dnpipe']][0] == "?" && $dnqlist[$_POST['pdnpipe']][0] <> "?")
$input_errors[] = gettext("You cannot select one queue and one virtual interface for IN and Out. both must be from the same type.");
}
if( !empty($_POST['ruleid']) && !ctype_digit($_POST['ruleid']))
@@ -650,13 +657,6 @@ if ($_POST) {
}
}
-read_altq_config(); /* XXX: */
-$qlist =& get_unique_queue_list();
-read_dummynet_config(); /* XXX: */
-$dnqlist =& get_unique_dnqueue_list();
-read_layer7_config();
-$l7clist =& get_l7_unique_list();
-
$pgtitle = array(gettext("Firewall"),gettext("Rules"),gettext("Edit"));
$statusurl = "status_filter_reload.php";
$logurl = "diag_logs_filter.php";
@@ -1423,8 +1423,8 @@ $i--): ?>
foreach ($dnqlist as $dnq => $dnqkey) {
if($dnq == "")
continue;
- echo "<option value=\"$dnqkey\"";
- if ($dnqkey == $pconfig['dnpipe']) {
+ echo "<option value=\"$dnq\"";
+ if ($dnq == $pconfig['dnpipe']) {
$dnqselected = 1;
echo " SELECTED";
}
@@ -1441,8 +1441,8 @@ $i--): ?>
foreach ($dnqlist as $dnq => $dnqkey) {
if($dnq == "")
continue;
- echo "<option value=\"$dnqkey\"";
- if ($dnqkey == $pconfig['pdnpipe']) {
+ echo "<option value=\"$dnq\"";
+ if ($dnq == $pconfig['pdnpipe']) {
$dnqselected = 1;
echo " SELECTED";
}
OpenPOWER on IntegriCloud