Make shaper first match - fix a months old oversight.
This commit is contained in:
Scott Ullrich 2005-12-16 05:25:47 +00:00
parent 8b7207755b
commit 3cd71852aa
2 changed files with 7 additions and 2 deletions

View File

@ -97,7 +97,12 @@ function filter_configure_sync() {
$altq_queues = filter_generate_altq_queues($altq_ints);
/* generate altq rules */
if($g['booting'] == true) echo " altq-rules ";
$pf_altq_rules = filter_generate_pf_altq_rules();
/* Setup a default rule that tags ALL packets as unshaped
* we'll match only unshaped packets in the shaper code later
* this allows the shaper to be first match
*/
$pf_altq_rules = "block any tag unshaped label SHAPER: first match rule\n";
$pf_altq_rules .= filter_generate_pf_altq_rules();
}
/* enable pf if we need to, otherwise disable */

View File

@ -590,7 +590,7 @@ function filter_generate_pf_altq_rules() {
$line .= "{$flags}/SAFRPU ";
$qtag = "{$direction}queue";
$line .= " keep state tag {$rule[$qtag]} ";
$line .= " keep state tagged unshaped tag {$rule[$qtag]} ";
$line .= "\n";
$shaperrules .= $line;