summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_shaper.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-02-18 20:51:08 +0000
committerErmal Luçi <eri@pfsense.org>2008-02-18 20:51:08 +0000
commit96d1d4adeeaf7d4b69f55ffa5e72bf5f3feaf160 (patch)
tree5e97407e73d6e74a9c7dba94895508b95f179181 /usr/local/www/firewall_shaper.php
parentcedae3d316ebf2cf2c44739964d0bf3118dd7da6 (diff)
downloadpfsense-96d1d4adeeaf7d4b69f55ffa5e72bf5f3feaf160.zip
pfsense-96d1d4adeeaf7d4b69f55ffa5e72bf5f3feaf160.tar.gz
Do not allow a user to add or remove childs on a default queue.
Better prevent them from doing this than dealing with other situarions.
Diffstat (limited to 'usr/local/www/firewall_shaper.php')
-rwxr-xr-xusr/local/www/firewall_shaper.php28
1 files changed, 20 insertions, 8 deletions
diff --git a/usr/local/www/firewall_shaper.php b/usr/local/www/firewall_shaper.php
index 04585d1..c85966a 100755
--- a/usr/local/www/firewall_shaper.php
+++ b/usr/local/www/firewall_shaper.php
@@ -79,9 +79,12 @@ if ($interface) {
$can_enable = true;
else
$can_enable = false;
- if ($queue->CanHaveChilds() && $can_enable)
- $can_add = true;
- else
+ if ($queue->CanHaveChilds() && $can_enable) {
+ if ($queue->GetDefault() <> "")
+ $can_add = false;
+ else
+ $can_add = true;
+ } else
$can_add = false;
}
} else $addnewaltq = true;
@@ -234,7 +237,10 @@ if ($_GET) {
write_config();
touch($d_shaperconfdirty_path);
$can_enable = true;
- $can_add = true;
+ if ($queue->GetDefault() <> "")
+ $can_add = false;
+ else
+ $can_add = true;
}
$output_form .= $altq->build_form();
@@ -248,15 +254,21 @@ if ($_GET) {
array_pop($tmppath);
$tmp->wconfig();
$can_enable = true;
- if ($tmp->CanHaveChilds() && $can_enable)
- $can_add = true;
- else
+ if ($tmp->CanHaveChilds() && $can_enable) {
+ if ($queue->GetDefault() <> "")
+ $can_add = false;
+ else
+ $can_add = true;
+ } else
$can_add = false;
write_config();
touch($d_shaperconfdirty_path);
$can_enable = true;
if ($altq->GetScheduler() != "PRIQ") /* XXX */
- $can_add = true;
+ if ($queue->GetDefault() <> "")
+ $can_add = false;
+ else
+ $can_add = true;
}
$output_form .= $tmp->build_form();
} else
OpenPOWER on IntegriCloud