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_test
|
||||||
do_ratelimit
|
do_ratelimit
|
||||||
do_user
|
do_user
|
||||||
|
do_tos
|
||||||
iprange_match
|
iprange_match
|
||||||
match_source_net
|
match_source_net
|
||||||
match_dest_net
|
match_dest_net
|
||||||
@ -806,6 +807,15 @@ sub do_user( $ ) {
|
|||||||
$rule;
|
$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.
|
# Avoid generating a second '-m iprange' in a single rule.
|
||||||
#
|
#
|
||||||
|
@ -207,7 +207,7 @@ sub process_tc_rule( $$$$$$$$$$ ) {
|
|||||||
expand_rule
|
expand_rule
|
||||||
ensure_chain( 'mangle' , $chain ) ,
|
ensure_chain( 'mangle' , $chain ) ,
|
||||||
NO_RESTRICT ,
|
NO_RESTRICT ,
|
||||||
do_proto( $proto, $ports, $sports) . do_test( $testval, $mask ) ,
|
do_proto( $proto, $ports, $sports) . do_test( $testval, $mask ) . do_tos( $tos ) ,
|
||||||
$source ,
|
$source ,
|
||||||
$dest ,
|
$dest ,
|
||||||
'' ,
|
'' ,
|
||||||
|
Loading…
Reference in New Issue
Block a user