summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-01-11 21:07:25 +0000
committerErmal Luçi <eri@pfsense.org>2008-01-11 21:07:25 +0000
commit197bfe966c677a4ffca27610cdf1dc2a22a6a289 (patch)
treeecf9230a6fc3d92822c1b7ba974a9fbc72a091d0 /usr/local/www/firewall_rules_edit.php
parent9daeb964853d3251c3304cb6dfbc05bda843987a (diff)
downloadpfsense-197bfe966c677a4ffca27610cdf1dc2a22a6a289.zip
pfsense-197bfe966c677a4ffca27610cdf1dc2a22a6a289.tar.gz
Bring in the new traffic shaper.
It is capable of multi interface shaping. Also bring the wizard up-to-date. Now it is capable of doing multi interface too.
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php57
1 files changed, 57 insertions, 0 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 290b9dc..2733d52 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -115,6 +115,10 @@ if (isset($id) && $a_filter[$id]) {
/* Multi-WAN next-hop support */
$pconfig['gateway'] = $a_filter[$id]['gateway'];
+ /* Shaper support */
+ $pconfig['defaultqueue'] = $a_filter[$id]['defaultqueue'];
+ $pconfig['ackqueue'] = $a_filter[$id]['ackqueue'];
+
//schedule support
$pconfig['sched'] = $a_filter[$id]['sched'];
@@ -288,6 +292,13 @@ if ($_POST) {
if( $_POST['proto'] != "tcp" )
$input_errors[] = "OS detection is only valid with protocol tcp.";
+ if ($_POST['ackqueue'] && $_POST['ackqueue'] != "none") {
+ if ($_POST['defaultqueue'] == "none" )
+ $input_errors[] = "You have to select a queue when you select an acknowledge queue too.";
+ else if ($_POST['ackqueue'] == $_POST['defaultqueue'])
+ $input_errors[] = "Acknokledge queue and Queue cannot be the same.";
+ }
+
if (!$input_errors) {
$filterent = array();
$filterent['type'] = $_POST['type'];
@@ -346,6 +357,12 @@ if ($_POST) {
if ($_POST['gateway'] != "") {
$filterent['gateway'] = $_POST['gateway'];
}
+
+ if (isset($_POST['defaultqueue']) && $_POST['defaultqueue'] != "none") {
+ $filterent['defaultqueue'] = $_POST['defaultqueue'];
+ if (isset($_POST['ackqueue']) && $_POST['ackqueue'] != "none")
+ $filterent['ackqueue'] = $_POST['ackqueue'];
+ }
if ($_POST['sched'] != "") {
$filterent['sched'] = $_POST['sched'];
@@ -883,6 +900,46 @@ include("head.inc");
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell">Ackqueue/Queue</td>
+ <td width="78%" class="vtable">
+ <select name="ackqueue">
+<?php
+ if (!is_array($altq_list_queues))
+ read_altq_config(); /* XXX: */
+ foreach ($GLOBALS['allqueue_list'] as $q) {
+ echo "<option value=\"$q\"";
+ if ($q == $pconfig['ackqueue']) {
+ $qselected = 1;
+ echo " SELECTED";
+ }
+ echo ">{$q}</option>";
+ }
+ echo "<option value=\"none\"";
+ if (!$qselected) echo " SELECTED";
+ echo " >none</option>";
+?>
+ </select> /
+ <select name="defaultqueue">
+<?php
+ $qselected = 0;
+ foreach ($GLOBALS['allqueue_list'] as $q) {
+ echo "<option value=\"$q\"";
+ if ($q == $pconfig['defaultqueue']) {
+ $qselected = 1;
+ echo " SELECTED";
+ }
+ echo ">{$q}</option>";
+ }
+ echo "<option value=\"none\"";
+ if (!$qselected) echo " SELECTED";
+ echo " >none</option>";
+?>
+ </select>
+ <br />
+ <span class="vexpl">Choose the Acknowledge Queue only if you have selected Queue.</span>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell">Description</td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="52" maxlength="52" value="<?=htmlspecialchars($pconfig['descr']);?>">
OpenPOWER on IntegriCloud