forked from extern/shorewall_code
Add TOS handling to tcrules processing
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5607 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
8f82d7f161
commit
319bea7308
@ -84,6 +84,7 @@ our @EXPORT = qw( STANDARD
|
||||
do_test
|
||||
do_ratelimit
|
||||
do_user
|
||||
do_tos
|
||||
iprange_match
|
||||
match_source_net
|
||||
match_dest_net
|
||||
@ -805,6 +806,15 @@ sub do_user( $ ) {
|
||||
|
||||
$rule;
|
||||
}
|
||||
|
||||
#
|
||||
# Create a "-m tos" match for the passed TOS[/MASK]
|
||||
#
|
||||
sub do_tos( $ ) {
|
||||
my $tos = $_[0];
|
||||
|
||||
$tos && $tos ne '-' ? "-m tos --tos $tos " : '';
|
||||
}
|
||||
|
||||
#
|
||||
# Avoid generating a second '-m iprange' in a single rule.
|
||||
|
@ -207,7 +207,7 @@ sub process_tc_rule( $$$$$$$$$$ ) {
|
||||
expand_rule
|
||||
ensure_chain( 'mangle' , $chain ) ,
|
||||
NO_RESTRICT ,
|
||||
do_proto( $proto, $ports, $sports) . do_test( $testval, $mask ) ,
|
||||
do_proto( $proto, $ports, $sports) . do_test( $testval, $mask ) . do_tos( $tos ) ,
|
||||
$source ,
|
||||
$dest ,
|
||||
'' ,
|
||||
|
Loading…
Reference in New Issue
Block a user