forked from extern/shorewall_code
Fix mnemonic handling in tcfilters
This commit is contained in:
parent
a1330cbfdf
commit
ee0667c9da
@ -820,18 +820,23 @@ sub process_tc_filter( ) {
|
||||
if ( $tos ne '-' ) {
|
||||
my $tosval = $tosoptions{$tos};
|
||||
my $mask;
|
||||
$tos = $tosval if $tosval;
|
||||
|
||||
if ( $tos =~ /^0x[0-9a-f]{2}$/ ) {
|
||||
if ( $tosval ) {
|
||||
$tosval =~ s/^tos=//;
|
||||
} else {
|
||||
$tosval = $tos;
|
||||
}
|
||||
|
||||
if ( $tosval =~ /^0x[0-9a-f]{2}$/ ) {
|
||||
$mask = '0xff';
|
||||
} elsif ( $tos =~ /^(0x[0-9a-f]{2})\/(0x[0-9a-f]{2})$/ ) {
|
||||
$tos = $1;
|
||||
$mask = $2;
|
||||
} elsif ( $tosval =~ /^(0x[0-9a-f]{2})\/(0x[0-9a-f]{2})$/ ) {
|
||||
$tosval = $1;
|
||||
$mask = $2;
|
||||
} else {
|
||||
fatal_error "Invalid TOS ($tos)";
|
||||
}
|
||||
|
||||
$rule .= "\\\n match ip tos $tos $mask";
|
||||
$rule .= "\\\n match ip tos $tosval $mask";
|
||||
}
|
||||
|
||||
if ( $length ne '-' ) {
|
||||
|
@ -2,6 +2,8 @@ Changes in Shorewall 4.3.13
|
||||
|
||||
1) Correct typo in Shorewall6 two-interface sample shorewall.conf.
|
||||
|
||||
2) Fix TOS mnemonic handling in /etc/shorewall/tcfilters.
|
||||
|
||||
Changes in Shorewall 4.3.12
|
||||
|
||||
1) Eliminate 'large quantum' warnings.
|
||||
|
@ -111,6 +111,9 @@ released late in 2009.
|
||||
1) A typo in the IPv6 two-interface Sample shorewall6.conf file has
|
||||
been corrected.
|
||||
|
||||
2) When a valid mnemonic such as 'tos-minimize-delay' appeared in the TOS
|
||||
column of /etc/shorewall/tcfilters, a compile-time error resulted.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
K N O W N P R O B L E M S R E M A I N I N G
|
||||
----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user