forked from extern/shorewall_code
Fix non-calculated rates
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5952 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
a8f3e3faa9
commit
349bf85c92
@ -293,9 +293,12 @@ sub validate_tc_device( $$$ ) {
|
||||
sub convert_rate( $$ ) {
|
||||
my ($full, $rate) = @_;
|
||||
|
||||
$rate =~ s/\bfull\b/$full/g;
|
||||
|
||||
$rate = eval "int( $rate )";
|
||||
if ( $rate =~ /\bfull\b/ ) {
|
||||
$rate =~ s/\bfull\b/$full/g;
|
||||
$rate = eval "int( $rate )";
|
||||
} else {
|
||||
$rate = rate_to_kbit $rate
|
||||
}
|
||||
|
||||
"${rate}kbit";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user