Catch Rate Calculation Errors

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8438 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2008-04-18 23:27:05 +00:00
parent 15e423ac78
commit 7240cd1e9b

View File

@ -402,6 +402,7 @@ sub convert_rate( $$ ) {
if ( $rate =~ /\bfull\b/ ) { if ( $rate =~ /\bfull\b/ ) {
$rate =~ s/\bfull\b/$full/g; $rate =~ s/\bfull\b/$full/g;
$rate = eval "int( $rate )"; $rate = eval "int( $rate )";
fatal_error "Invalid Rate ($_[1])" unless defined $rate;
} else { } else {
$rate = rate_to_kbit $rate $rate = rate_to_kbit $rate
} }