summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizards
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-07-15 19:17:59 +0000
committerErmal <eri@pfsense.org>2011-07-15 19:17:59 +0000
commit058a4f1c03f548575941010f1e0c0048f1e3e313 (patch)
treee3dc95f062e3003cd117b57f175e8e21c8f573cf /usr/local/www/wizards
parent8f864d33eac460cc34189b7eb399144a2975f880 (diff)
downloadpfsense-058a4f1c03f548575941010f1e0c0048f1e3e313.zip
pfsense-058a4f1c03f548575941010f1e0c0048f1e3e313.tar.gz
Respect the p2p catchall setting.
Diffstat (limited to 'usr/local/www/wizards')
-rw-r--r--usr/local/www/wizards/traffic_shaper_wizard.inc74
-rwxr-xr-xusr/local/www/wizards/traffic_shaper_wizard_dedicated.inc54
-rwxr-xr-xusr/local/www/wizards/traffic_shaper_wizard_multi_all.inc54
-rw-r--r--usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc54
4 files changed, 122 insertions, 114 deletions
diff --git a/usr/local/www/wizards/traffic_shaper_wizard.inc b/usr/local/www/wizards/traffic_shaper_wizard.inc
index cbd30ad..37d5f5c 100644
--- a/usr/local/www/wizards/traffic_shaper_wizard.inc
+++ b/usr/local/www/wizards/traffic_shaper_wizard.inc
@@ -1044,43 +1044,45 @@ function apply_all_choosen_items() {
} else
$remainbw = 100 - $remainbw;
- if ($sched == "PRIQ")
- $q =& new priq_queue();
- else if ($sched == "CBQ")
- $q =& new cbq_queue();
- else if ($sched == "HFSC")
- $q =& new hfsc_queue();
- $tmpcf = array();
- $tmpcf['name'] = "qLink";
- $tmpcf['priority'] = 1;
- $tmpcf['enabled'] = "on";
- $tmpcf['default'] = "on";
- $tmpcf['ecn'] = "on";
- if ($sched == "CBQ") {
- $tmpcf['borrow'] = "on";
- $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
- $tmpcf['bandwidthtype'] = "%";
- } else if ($sched == "HFSC") {
- $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
- $tmpcf['bandwidthtype'] = "%";
+ if (!$p2pcatchall) {
+ if ($sched == "PRIQ")
+ $q =& new priq_queue();
+ else if ($sched == "CBQ")
+ $q =& new cbq_queue();
+ else if ($sched == "HFSC")
+ $q =& new hfsc_queue();
+ $tmpcf = array();
+ $tmpcf['name'] = "qLink";
+ $tmpcf['priority'] = 1;
+ $tmpcf['enabled'] = "on";
+ $tmpcf['default'] = "on";
+ $tmpcf['ecn'] = "on";
+ if ($sched == "CBQ") {
+ $tmpcf['borrow'] = "on";
+ $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
+ $tmpcf['bandwidthtype'] = "%";
+ } else if ($sched == "HFSC") {
+ $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
+ $tmpcf['bandwidthtype'] = "%";
+ }
+ array_push($tmppath, $tmpcf['name']);
+ $qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors);
+ array_pop($tmppath);
+ //echo "qDefault <br />";
+ //var_dump($input_errors);
+ $qtmp->wconfig();
}
- array_push($tmppath, $tmpcf['name']);
- $qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors);
- array_pop($tmppath);
- //echo "qDefault <br />";
- //var_dump($input_errors);
- $qtmp->wconfig();
- if ($sched != "PRIQ") {
- if ($sched == "CBQ")
- $q =& new cbq_queue();
- else if ($sched == "HFSC")
- $q =& new hfsc_queue();
- $tmpcf = array();
- $tmpcf['name'] = "qInternet";
- //$tmpcf['priority'] = 6;
- $tmpcf['ecn'] = "on";
- $tmpcf['enabled'] = "on";
+ if ($sched != "PRIQ") {
+ if ($sched == "CBQ")
+ $q =& new cbq_queue();
+ else if ($sched == "HFSC")
+ $q =& new hfsc_queue();
+ $tmpcf = array();
+ $tmpcf['name'] = "qInternet";
+ //$tmpcf['priority'] = 6;
+ $tmpcf['ecn'] = "on";
+ $tmpcf['enabled'] = "on";
If ($sched == "CBQ") {
$tmpcf['bandwidth'] = $lanbw/1000;
$tmpcf['bandwidthtype'] = "Kb";
@@ -1156,7 +1158,7 @@ function apply_all_choosen_items() {
$tmpcf['bandwidth'] = $p2pcatchbw;
$tmpcf['bandwidthtype'] = $p2pcatchbwunit;
}
- //$tmpcf['default'] = "on";
+ $tmpcf['default'] = "on";
} else {
if ($sched == "CBQ") {
$tmpcf['borrow'] = "on";
diff --git a/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc b/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
index 8b73e4a..23fd493 100755
--- a/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
+++ b/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
@@ -1107,32 +1107,34 @@ function apply_all_choosen_items() {
$remainbw = 100 - $remainbw;
}
- if ($sched == "PRIQ")
- $q =& new priq_queue();
- else if ($sched == "CBQ")
- $q =& new cbq_queue();
- else if ($sched == "HFSC")
- $q =& new hfsc_queue();
- $tmpcf = array();
- $tmpcf['name'] = "qLink";
- $tmpcf['priority'] = 3;
- $tmpcf['enabled'] = "on";
- $tmpcf['default'] = "on";
- $tmpcf['ecn'] = "on";
- if ($sched == "CBQ") {
- $tmpcf['borrow'] = "on";
- $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
- $tmpcf['bandwidthtype'] = "%";
- } else if ($sched == "HFSC") {
- $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
- $tmpcf['bandwidthtype'] = "%";
+ if (!$p2pcatchall) {
+ if ($sched == "PRIQ")
+ $q =& new priq_queue();
+ else if ($sched == "CBQ")
+ $q =& new cbq_queue();
+ else if ($sched == "HFSC")
+ $q =& new hfsc_queue();
+ $tmpcf = array();
+ $tmpcf['name'] = "qLink";
+ $tmpcf['priority'] = 3;
+ $tmpcf['enabled'] = "on";
+ $tmpcf['default'] = "on";
+ $tmpcf['ecn'] = "on";
+ if ($sched == "CBQ") {
+ $tmpcf['borrow'] = "on";
+ $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
+ $tmpcf['bandwidthtype'] = "%";
+ } else if ($sched == "HFSC") {
+ $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
+ $tmpcf['bandwidthtype'] = "%";
+ }
+ array_push($tmppath, $tmpcf['name']);
+ $qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors);
+ array_pop($tmppath);
+ //echo "qDefault <br />";
+ //var_dump($input_errors);
+ $qtmp->wconfig();
}
- array_push($tmppath, $tmpcf['name']);
- $qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors);
- array_pop($tmppath);
- //echo "qDefault <br />";
- //var_dump($input_errors);
- $qtmp->wconfig();
if ($sched != "PRIQ") {
if ($sched == "CBQ")
@@ -1219,7 +1221,7 @@ function apply_all_choosen_items() {
$tmpcf['bandwidth'] = $p2pcatchbw;
$tmpcf['bandwidthtype'] = $p2pcatchbwunit;
}
- //$tmpcf['default'] = "on";
+ $tmpcf['default'] = "on";
} else {
if ($sched == "CBQ") {
$tmpcf['borrow'] = "on";
diff --git a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
index 539258b..e9dced5 100755
--- a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
+++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
@@ -1155,32 +1155,34 @@ function apply_all_choosen_items() {
$remainbw = 100 - $remainbw;
}
- if ($sched == "PRIQ")
- $q =& new priq_queue();
- else if ($sched == "CBQ")
- $q =& new cbq_queue();
- else if ($sched == "HFSC")
- $q =& new hfsc_queue();
- $tmpcf = array();
- $tmpcf['name'] = "qLink";
- $tmpcf['priority'] = 1;
- $tmpcf['enabled'] = "on";
- $tmpcf['default'] = "on";
- $tmpcf['ecn'] = "on";
- if ($sched == "CBQ") {
- $tmpcf['borrow'] = "on";
- $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
- $tmpcf['bandwidthtype'] = "%";
- } else if ($sched == "HFSC") {
- $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
- $tmpcf['bandwidthtype'] = "%";
+ if (!$p2pcatchall) {
+ if ($sched == "PRIQ")
+ $q =& new priq_queue();
+ else if ($sched == "CBQ")
+ $q =& new cbq_queue();
+ else if ($sched == "HFSC")
+ $q =& new hfsc_queue();
+ $tmpcf = array();
+ $tmpcf['name'] = "qLink";
+ $tmpcf['priority'] = 1;
+ $tmpcf['enabled'] = "on";
+ $tmpcf['default'] = "on";
+ $tmpcf['ecn'] = "on";
+ if ($sched == "CBQ") {
+ $tmpcf['borrow'] = "on";
+ $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
+ $tmpcf['bandwidthtype'] = "%";
+ } else if ($sched == "HFSC") {
+ $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
+ $tmpcf['bandwidthtype'] = "%";
+ }
+ array_push($tmppath, $tmpcf['name']);
+ $qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors);
+ array_pop($tmppath);
+ //echo "qDefault <br />";
+ //var_dump($input_errors);
+ $qtmp->wconfig();
}
- array_push($tmppath, $tmpcf['name']);
- $qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors);
- array_pop($tmppath);
- //echo "qDefault <br />";
- //var_dump($input_errors);
- $qtmp->wconfig();
if ($sched != "PRIQ") {
if ($sched == "CBQ")
@@ -1268,7 +1270,7 @@ function apply_all_choosen_items() {
$tmpcf['bandwidth'] = $p2pcatchbw;
$tmpcf['bandwidthtype'] = $p2pcatchbwunit;
}
- //$tmpcf['default'] = "on";
+ $tmpcf['default'] = "on";
} else {
if ($sched == "CBQ") {
diff --git a/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc b/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc
index eeed81b..48fbdb5 100644
--- a/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc
+++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc
@@ -547,32 +547,34 @@ function apply_all_choosen_items() {
$remainbw = 100 - $remainbw;
}
- if ($sched == "PRIQ")
- $q =& new priq_queue();
- else if ($sched == "CBQ")
- $q =& new cbq_queue();
- else if ($sched == "HFSC")
- $q =& new hfsc_queue();
- $tmpcf = array();
- $tmpcf['name'] = "qLink";
- $tmpcf['priority'] = 1;
- $tmpcf['enabled'] = "on";
- $tmpcf['default'] = "on";
- $tmpcf['ecn'] = "on";
- if ($sched == "CBQ") {
- $tmpcf['borrow'] = "on";
- $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
- $tmpcf['bandwidthtype'] = "%";
- } else if ($sched == "HFSC") {
- $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
- $tmpcf['bandwidthtype'] = "%";
+ if (!$p2pcatchall) {
+ if ($sched == "PRIQ")
+ $q =& new priq_queue();
+ else if ($sched == "CBQ")
+ $q =& new cbq_queue();
+ else if ($sched == "HFSC")
+ $q =& new hfsc_queue();
+ $tmpcf = array();
+ $tmpcf['name'] = "qLink";
+ $tmpcf['priority'] = 1;
+ $tmpcf['enabled'] = "on";
+ $tmpcf['default'] = "on";
+ $tmpcf['ecn'] = "on";
+ if ($sched == "CBQ") {
+ $tmpcf['borrow'] = "on";
+ $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
+ $tmpcf['bandwidthtype'] = "%";
+ } else if ($sched == "HFSC") {
+ $tmpcf['bandwidth'] = 20; /* 20% bandwidth */
+ $tmpcf['bandwidthtype'] = "%";
+ }
+ array_push($tmppath, $tmpcf['name']);
+ $qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors);
+ array_pop($tmppath);
+ //echo "qDefault <br />";
+ //var_dump($input_errors);
+ $qtmp->wconfig();
}
- array_push($tmppath, $tmpcf['name']);
- $qtmp =& $altq->add_queue($q, &$tmpcf, &$tmppath, $input_errors);
- array_pop($tmppath);
- //echo "qDefault <br />";
- //var_dump($input_errors);
- $qtmp->wconfig();
if ($sched != "PRIQ") {
if ($sched == "CBQ")
@@ -663,7 +665,7 @@ function apply_all_choosen_items() {
$tmpcf['bandwidth'] = $p2pcatchbw;
$tmpcf['bandwidthtype'] = $p2pcatchbwunit;
}
- //$tmpcf['default'] = "on";
+ $tmpcf['default'] = "on";
} else {
if ($sched == "CBQ") {
OpenPOWER on IntegriCloud