From a5fd67e1b7317fae71d82aff20ee72cef5b4a710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Wed, 16 Jul 2008 20:40:40 +0000 Subject: Allow user to select dummynet pipes/queues. --- usr/local/www/firewall_rules_edit.php | 65 +++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) (limited to 'usr') diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index beec337..70d973f 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -140,6 +140,8 @@ if (isset($id) && $a_filter[$id]) { /* Shaper support */ $pconfig['defaultqueue'] = $a_filter[$id]['defaultqueue']; $pconfig['ackqueue'] = $a_filter[$id]['ackqueue']; + $pconfig['dnpipe'] = $a_filter[$id]['dnpipe']; + $pconfig['pdnpipe'] = $a_filter[$id]['pdnpipe']; //schedule support $pconfig['sched'] = $a_filter[$id]['sched']; @@ -324,6 +326,16 @@ if ($_POST) { else if ($_POST['ackqueue'] == $_POST['defaultqueue']) $input_errors[] = "Acknokledge queue and Queue cannot be the same."; } + if ($_POST['pdnpipe'] && $_POST['pdnpipe'] != "none") { + if ($_POST['dnpipe'] == "none" ) + $input_errors[] = "You must select a queue for the In direction before selecting one for Out too."; + else if ($_POST['pdnpipe'] == $_POST['dnpipe']) + $input_errors[] = "In and Out Queue cannot be the same."; + else if ($pdnpipe[0] == "?" && $dnpipe[0] <> "?") + $input_errors[] = "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] <> "?") + $input_errors[] = "You cannot select one queue and one virtual interface for IN and Out. both must be from the same type."; + } if (!$input_errors) { $filterent = array(); @@ -409,6 +421,12 @@ if ($_POST) { $filterent['ackqueue'] = $_POST['ackqueue']; } + if (isset($_POST['dnpipe']) && $_POST['dnpipe'] != "none") { + $filterent['dnpipe'] = $_POST['dnpipe']; + if (isset($_POST['pdnpipe']) && $_POST['pdnpipe'] != "none") + $filterent['pdnpipe'] = $_POST['pdnpipe']; + } + if ($_POST['sched'] != "") { $filterent['sched'] = $_POST['sched']; } @@ -1010,6 +1028,53 @@ on another rule.")?> + In/Out + + / + +
+ Choose the Out queue/Virtual interface only if you have selected In too.
The Out selection is applied to traffic going out the interface the rule is created, In is the incoming one.
If you are creating a rule on the Floating tab if the direction is In then the same rules apply, if the direction is out the selections are reverted Out is for incoming and In is for outgoing and if you do not select any direction use only the In since the Out selection does not make sense in there to prevent oddities.
+ + + + Ackqueue/Queue