On 9/9/12 2:04 PM, Mr Dash Four wrote: > >> Some examples in the LARTC HOWTO suggest that only unclassified packets >> are passed to the next priority. So it sounds like using different >> priority classes would help in your case. >> > In the meantime I performed this experiment and it doesn't seem to be > working as expected. > > How is shorewall setting this priority (the "priority" column value in > tcclasses) and where can I find it in the "raw" tc statements, because > the only thing I am seeing is statement upon statement with "prio 10" set?
Yes -- the priority for rules generated by tcfilters is 10 for IPv4 and 11 for IPv6. Attached is a patch that adds a PRIORITY column to the tcfilters file. The minimum priority that can be specified in the column is 12. -Tom -- Tom Eastep \ When I die, I want to go like my Grandfather who Shoreline, \ died peacefully in his sleep. Not screaming like Washington, USA \ all of the passengers in his car http://shorewall.net \________________________________________________
diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm
index 8ac2140..5a16818 100644
--- a/Shorewall/Perl/Shorewall/Tc.pm
+++ b/Shorewall/Perl/Shorewall/Tc.pm
@@ -1353,7 +1353,7 @@ my %validlengths = ( 32 => '0xffe0', 64 => '0xffc0', 128
=> '0xff80', 256 => '0x
#
sub process_tc_filter() {
- my ( $devclass, $source, $dest , $proto, $portlist , $sportlist, $tos,
$length ) = split_line 'tcfilters file', { class => 0, source => 1, dest => 2,
proto => 3, dport => 4, sport => 5, tos => 6, length => 7 };
+ my ( $devclass, $source, $dest , $proto, $portlist , $sportlist, $tos,
$length, $priority ) = split_line 'tcfilters file', { class => 0, source => 1,
dest => 2, proto => 3, dport => 4, sport => 5, tos => 6, length => 7 , priority
=> 8 };
fatal_error 'CLASS must be specified' if $devclass eq '-';
@@ -1365,6 +1365,11 @@ sub process_tc_filter() {
my ( $ip, $ip32, $prio , $lo ) = $family == F_IPV4 ? ('ip', 'ip', 10, 2 )
: ('ipv6', 'ip6', 11 , 4 );
+ if ( $priority ne '-' ) {
+ $prio = numeric_value $priority;
+ fatal_error "Invalid priority ($priority)" unless defined $prio &&
$prio >= 12;
+ }
+
my $devref;
if ( $device =~ /^[\da-fA-F]+$/ && ! $tcdevices{$device} ) {
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Shorewall-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-devel
