mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-23 14:08:45 +01:00
Fix rate calculation; restore line inadvertently removed yesterday
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8471 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
69b61dfc55
commit
39eb7a3d1f
@ -1427,6 +1427,7 @@ sub match_source_net( $;$ ) {
|
||||
validate_range $addr1, $addr2;
|
||||
iprange_match . "${invert}--src-range $net ";
|
||||
} elsif ( $net =~ /^(!?)~(.*)$/ ) {
|
||||
fatal_error "MAC address cannot be used in this context" if $restriction >= OUTPUT_RESTRICT;
|
||||
mac_match $net;
|
||||
} elsif ( $net =~ /^(!?)\+/ ) {
|
||||
require_capability( 'IPSET_MATCH' , 'ipset names in Shorewall configuration files' , '' );
|
||||
|
@ -311,7 +311,7 @@ sub rate_to_kbit( $ ) {
|
||||
return $1 * 1000 if $rate =~ /^(\d+)mbit$/i;
|
||||
return $1 * 8000 if $rate =~ /^(\d+)mbps$/i;
|
||||
return $1 * 8 if $rate =~ /^(\d+)kbps$/i;
|
||||
return $1 / 125 if $rate =~ /^(\d+)(bps)?$/;
|
||||
return int($1/125) if $rate =~ /^(\d+)(bps)?$/;
|
||||
fatal_error "Invalid Rate ($rate)";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user