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:
teastep 2007-04-16 20:11:09 +00:00
parent a8f3e3faa9
commit 349bf85c92

View File

@ -293,10 +293,13 @@ 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";
}