On 03/14/2012 01:14 PM, Steven Jan Springl wrote:
> Tom
> 
> Shorewall accepts tcrule:
> 
> TOS(0x00)  ssp5  fw  tcp  123
> 
> But tcrule:
> 
> TOS(0x00/0xff)  ssp5  fw  tcp  123
> 
> produces the following error message:
> 
> ERROR: Invalid Mark or Mask value (TOS(0x00) : /etc/shorewall2/tcrules (line 
> 65)
> 
> Is this expected?

Steven,

No, it's not.

Patch attached.

Thanks,
-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 5ceecfc..6b9daa5 100644
--- a/Shorewall/Perl/Shorewall/Tc.pm
+++ b/Shorewall/Perl/Shorewall/Tc.pm
@@ -463,7 +463,12 @@ sub process_tc_rule( ) {
 	}
     }
 
-    ($cmd, $rest) = split( '/', $mark, 2 );
+    if ( $mark =~ /^TOS/ ) {
+	$cmd = $mark;
+	$rest = '';
+    } else {
+	($cmd, $rest) = split( '/', $mark, 2 );
+    }
 
     $list = '';
 

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to