forked from extern/shorewall_code
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:
parent
15e423ac78
commit
7240cd1e9b
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user