Omit estimator when no avrate.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-11-01 11:16:51 -07:00
parent cfa33e894f
commit b9a7374130

View File

@ -581,13 +581,13 @@ sub handle_in_bandwidth( $$ ) {
emit ( "run_tc qdisc add dev $physical handle ffff: ingress" );
if ( have_capability 'BASIC_FILTER' ) {
emit( "run_tc filter add dev $physical parent ffff: protocol all prio 10 " .
"\\\n estimator $in_interval $in_decay basic \\" );
emit( "run_tc filter add dev $physical parent ffff: protocol all prio 10 " );
if ( $in_rate ) {
emit( " police mpu 64 rate ${in_rate}kbit burst $in_burst action drop\n" );
} else {
emit( " police avrate ${in_avrate}kbit action drop\n" );
emit( " estimator $in_interval $in_decay basic \\",
" police avrate ${in_avrate}kbit action drop\n" );
}
} else {
emit( "run_tc filter add dev $physical parent ffff: protocol all prio 10 " .