mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Unbreak PRIQ queue creation for VoIP, Penalty Box, and P2P options. Fixes #7913
This commit is contained in:
parent
9c33d1b79b
commit
10e93284be
@ -704,40 +704,46 @@ function apply_all_chosen_items() {
|
||||
$upfactor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}uploadspeed"]);
|
||||
$upbw = floatval($config['ezshaper']['step2']["conn{$i}upload"]) * $upfactor;
|
||||
|
||||
if ($sched != "PRIQ" && $config['ezshaper']['step3']['enable']) {
|
||||
if ($config['ezshaper']['step3']['enable']) {
|
||||
$voip = true;
|
||||
$voipbw = $config['ezshaper']['step3']["conn{$i}upload"];
|
||||
$voipbwunit = $config['ezshaper']['step3']["conn{$i}uploadspeed"];
|
||||
if ($voipbwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($voipbwunit);
|
||||
$remainbw += $voipbw * $factor;
|
||||
if ($sched != "PRIQ") {
|
||||
$voipbw = $config['ezshaper']['step3']["conn{$i}upload"];
|
||||
$voipbwunit = $config['ezshaper']['step3']["conn{$i}uploadspeed"];
|
||||
if ($voipbwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($voipbwunit);
|
||||
$remainbw += $voipbw * $factor;
|
||||
}
|
||||
}
|
||||
if ($sched != "PRIQ" && $config['ezshaper']['step4']['enable']) {
|
||||
if ($config['ezshaper']['step4']['enable']) {
|
||||
$penalty = true;
|
||||
$penaltybw = $config['ezshaper']['step4']['bandwidth'];
|
||||
$penaltybwunit = $config['ezshaper']['step4']['bandwidthunit'];
|
||||
if ($penaltybwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($penaltybwunit);
|
||||
$remainbw += $penaltybw * $factor;
|
||||
if ($sched != "PRIQ") {
|
||||
$penaltybw = $config['ezshaper']['step4']['bandwidth'];
|
||||
$penaltybwunit = $config['ezshaper']['step4']['bandwidthunit'];
|
||||
if ($penaltybwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($penaltybwunit);
|
||||
$remainbw += $penaltybw * $factor;
|
||||
}
|
||||
} else {
|
||||
$penalty = false;
|
||||
$penaltybw = 0;
|
||||
}
|
||||
if ($sched != "PRIQ" && $config['ezshaper']['step5']['enable']) {
|
||||
if ($config['ezshaper']['step5']['enable']) {
|
||||
$p2p = true;
|
||||
if ($config['ezshaper']['step5']['p2pcatchall']) {
|
||||
$p2pcatchall = true;
|
||||
$p2pcatchbw = $config['ezshaper']['step5']['bandwidth'];
|
||||
$p2pcatchbwunit = $config['ezshaper']['step5']['bandwidthunit'];
|
||||
if ($p2pcatchbwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($p2pcatchbwunit);
|
||||
$remainbw += $p2pcatchbw * $factor;
|
||||
if ($sched != "PRIQ") {
|
||||
$p2pcatchbw = $config['ezshaper']['step5']['bandwidth'];
|
||||
$p2pcatchbwunit = $config['ezshaper']['step5']['bandwidthunit'];
|
||||
if ($p2pcatchbwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($p2pcatchbwunit);
|
||||
$remainbw += $p2pcatchbw * $factor;
|
||||
}
|
||||
} else {
|
||||
$p2pcatchall = false;
|
||||
$p2pcatchbw = 0;
|
||||
@ -1087,43 +1093,49 @@ function apply_all_chosen_items() {
|
||||
$otherpriority = false;
|
||||
$remainbw = 0;
|
||||
|
||||
if ($sched != "PRIQ" && $config['ezshaper']['step3']['enable']) {
|
||||
if ($config['ezshaper']['step3']['enable']) {
|
||||
$voip = true;
|
||||
$voipbw = $config['ezshaper']['step3']["local{$i}download"];
|
||||
$voipbwunit = $config['ezshaper']['step3']["local{$i}downloadspeed"];
|
||||
if ($sched != HFSC) {
|
||||
if ($voipbwunit == "%")
|
||||
if ($sched != "PRIQ") {
|
||||
$voipbw = $config['ezshaper']['step3']["local{$i}download"];
|
||||
$voipbwunit = $config['ezshaper']['step3']["local{$i}downloadspeed"];
|
||||
if ($sched != HFSC) {
|
||||
if ($voipbwunit == "%")
|
||||
$factor = $downbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($voipbwunit);
|
||||
$remainbw += floatval($voipbw) * $factor;
|
||||
} else
|
||||
$remainbw += 32000; /* 32Kbit/s reserved for HFSC link sharing */
|
||||
}
|
||||
}
|
||||
if ($config['ezshaper']['step4']['enable']) {
|
||||
$penalty = true;
|
||||
if ($sched != "PRIQ") {
|
||||
$penaltybw = $config['ezshaper']['step4']['bandwidth'];
|
||||
$penaltybwunit = $config['ezshaper']['step4']['bandwidthunit'];
|
||||
if ($penaltybwunit == "%")
|
||||
$factor = $downbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($voipbwunit);
|
||||
$remainbw += floatval($voipbw) * $factor;
|
||||
} else
|
||||
$remainbw += 32000; /* 32Kbit/s reserved for HFSC link sharing */
|
||||
}
|
||||
if ($sched != "PRIQ" && $config['ezshaper']['step4']['enable']) {
|
||||
$penalty = true;
|
||||
$penaltybw = $config['ezshaper']['step4']['bandwidth'];
|
||||
$penaltybwunit = $config['ezshaper']['step4']['bandwidthunit'];
|
||||
if ($penaltybwunit == "%")
|
||||
$factor = $downbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($penaltybwunit);
|
||||
$remainbw += floatval($penaltybw) * $factor;
|
||||
$factor = wizard_get_bandwidthtype_scale($penaltybwunit);
|
||||
$remainbw += floatval($penaltybw) * $factor;
|
||||
}
|
||||
} else {
|
||||
$penalty = false;
|
||||
$penaltybw = 0;
|
||||
}
|
||||
if ($sched != "PRIQ" && $config['ezshaper']['step5']['enable']) {
|
||||
if ($config['ezshaper']['step5']['enable']) {
|
||||
$p2p = true;
|
||||
if ($config['ezshaper']['step5']['p2pcatchall']) {
|
||||
$p2pcatchall = true;
|
||||
$p2pcatchbw = $config['ezshaper']['step5']['bandwidth'];
|
||||
$p2pcatchbwunit = $config['ezshaper']['step5']['bandwidthunit'];
|
||||
if ($p2pcatchbwunit == "%")
|
||||
$factor = $downbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($p2pcatchbwunit);
|
||||
$remainbw += floatval($p2pcatchbw) * $factor;
|
||||
if ($sched != "PRIQ") {
|
||||
$p2pcatchbw = $config['ezshaper']['step5']['bandwidth'];
|
||||
$p2pcatchbwunit = $config['ezshaper']['step5']['bandwidthunit'];
|
||||
if ($p2pcatchbwunit == "%")
|
||||
$factor = $downbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($p2pcatchbwunit);
|
||||
$remainbw += floatval($p2pcatchbw) * $factor;
|
||||
}
|
||||
} else {
|
||||
$p2pcatchall = false;
|
||||
$p2pcatchbw = 0;
|
||||
|
||||
@ -772,40 +772,46 @@ function apply_all_chosen_items() {
|
||||
$upfactor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}uploadspeed"]);
|
||||
$upbw = floatval($config['ezshaper']['step2']["conn{$i}upload"]) * $upfactor;
|
||||
|
||||
if ($sched != "PRIQ" && $config['ezshaper']['step3']['enable']) {
|
||||
if ($config['ezshaper']['step3']['enable']) {
|
||||
$voip = true;
|
||||
$voipbw = $config['ezshaper']['step3']["conn{$i}upload"];
|
||||
$voipbwunit = $config['ezshaper']['step3']["conn{$i}uploadspeed"];
|
||||
if ($voipbwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($voipbwunit);
|
||||
$remainbw += $voipbw * $factor;
|
||||
if ($sched != "PRIQ") {
|
||||
$voipbw = $config['ezshaper']['step3']["conn{$i}upload"];
|
||||
$voipbwunit = $config['ezshaper']['step3']["conn{$i}uploadspeed"];
|
||||
if ($voipbwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($voipbwunit);
|
||||
$remainbw += $voipbw * $factor;
|
||||
}
|
||||
}
|
||||
if ($sched != "PRIQ" && $config['ezshaper']['step4']['enable']) {
|
||||
if ($config['ezshaper']['step4']['enable']) {
|
||||
$penalty = true;
|
||||
$penaltybw = $config['ezshaper']['step4']['bandwidth'];
|
||||
$penaltybwunit = $config['ezshaper']['step4']['bandwidthunit'];
|
||||
if ($penaltybwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($penaltybwunit);
|
||||
$remainbw += $penaltybw * $factor;
|
||||
if ($sched != "PRIQ") {
|
||||
$penaltybw = $config['ezshaper']['step4']['bandwidth'];
|
||||
$penaltybwunit = $config['ezshaper']['step4']['bandwidthunit'];
|
||||
if ($penaltybwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($penaltybwunit);
|
||||
$remainbw += $penaltybw * $factor;
|
||||
}
|
||||
} else {
|
||||
$penalty = false;
|
||||
$penaltybw = 0;
|
||||
}
|
||||
if ($sched != "PRIQ" && $config['ezshaper']['step5']['enable']) {
|
||||
if ($config['ezshaper']['step5']['enable']) {
|
||||
$p2p = true;
|
||||
if ($config['ezshaper']['step5']['p2pcatchall']) {
|
||||
$p2pcatchall = true;
|
||||
$p2pcatchbw = $config['ezshaper']['step5']['bandwidth'];
|
||||
$p2pcatchbwunit = $config['ezshaper']['step5']['bandwidthunit'];
|
||||
if ($p2pcatchbwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($p2pcatchbwunit);
|
||||
$remainbw += $p2pcatchbw * $factor;
|
||||
if ($sched != "PRIQ") {
|
||||
$p2pcatchbw = $config['ezshaper']['step5']['bandwidth'];
|
||||
$p2pcatchbwunit = $config['ezshaper']['step5']['bandwidthunit'];
|
||||
if ($p2pcatchbwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($p2pcatchbwunit);
|
||||
$remainbw += $p2pcatchbw * $factor;
|
||||
}
|
||||
} else {
|
||||
$p2pcatchall = false;
|
||||
$p2pcatchbw = 0;
|
||||
@ -1168,43 +1174,49 @@ function apply_all_chosen_items() {
|
||||
$otherpriority = false;
|
||||
$remainbw = 0;
|
||||
|
||||
if ($sched != "PRIQ" && $config['ezshaper']['step3']['enable']) {
|
||||
if ($config['ezshaper']['step3']['enable']) {
|
||||
$voip = true;
|
||||
$voipbw = $config['ezshaper']['step3']["local{$i}download"];
|
||||
$voipbwunit = $config['ezshaper']['step3']["local{$i}downloadspeed"];
|
||||
if ($sched != HFSC) {
|
||||
if ($voipbwunit == "%")
|
||||
if ($sched != "PRIQ") {
|
||||
$voipbw = $config['ezshaper']['step3']["local{$i}download"];
|
||||
$voipbwunit = $config['ezshaper']['step3']["local{$i}downloadspeed"];
|
||||
if ($sched != HFSC) {
|
||||
if ($voipbwunit == "%")
|
||||
$factor = $lanbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($voipbwunit);
|
||||
$remainbw += floatval($voipbw) * $factor;
|
||||
} else
|
||||
$remainbw += 32000; /* 32Kbit/s reserved for HFSC link sharing */
|
||||
}
|
||||
}
|
||||
if ($config['ezshaper']['step4']['enable']) {
|
||||
$penalty = true;
|
||||
if ($sched != "PRIQ") {
|
||||
$penaltybw = $config['ezshaper']['step4']['bandwidth'];
|
||||
$penaltybwunit = $config['ezshaper']['step4']['bandwidthunit'];
|
||||
if ($penaltybwunit == "%")
|
||||
$factor = $lanbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($voipbwunit);
|
||||
$remainbw += floatval($voipbw) * $factor;
|
||||
} else
|
||||
$remainbw += 32000; /* 32Kbit/s reserved for HFSC link sharing */
|
||||
}
|
||||
if ($sched != "PRIQ" && $config['ezshaper']['step4']['enable']) {
|
||||
$penalty = true;
|
||||
$penaltybw = $config['ezshaper']['step4']['bandwidth'];
|
||||
$penaltybwunit = $config['ezshaper']['step4']['bandwidthunit'];
|
||||
if ($penaltybwunit == "%")
|
||||
$factor = $lanbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($penaltybwunit);
|
||||
$remainbw += floatval($penaltybw) * $factor;
|
||||
$factor = wizard_get_bandwidthtype_scale($penaltybwunit);
|
||||
$remainbw += floatval($penaltybw) * $factor;
|
||||
}
|
||||
} else {
|
||||
$penalty = false;
|
||||
$penaltybw = 0;
|
||||
}
|
||||
if ($sched != "PRIQ" && $config['ezshaper']['step5']['enable']) {
|
||||
if ($config['ezshaper']['step5']['enable']) {
|
||||
$p2p = true;
|
||||
if ($config['ezshaper']['step5']['p2pcatchall']) {
|
||||
$p2pcatchall = true;
|
||||
$p2pcatchbw = $config['ezshaper']['step5']['bandwidth'];
|
||||
$p2pcatchbwunit = $config['ezshaper']['step5']['bandwidthunit'];
|
||||
if ($p2pcatchbwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($p2pcatchbwunit);
|
||||
$remainbw += floatval($p2pcatchbw) * $factor;
|
||||
if ($sched != "PRIQ") {
|
||||
$p2pcatchbw = $config['ezshaper']['step5']['bandwidth'];
|
||||
$p2pcatchbwunit = $config['ezshaper']['step5']['bandwidthunit'];
|
||||
if ($p2pcatchbwunit == "%")
|
||||
$factor = $upbw/100;
|
||||
else
|
||||
$factor = wizard_get_bandwidthtype_scale($p2pcatchbwunit);
|
||||
$remainbw += floatval($p2pcatchbw) * $factor;
|
||||
}
|
||||
} else {
|
||||
$p2pcatchall = false;
|
||||
$p2pcatchbw = 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user