On Fri, 2011-12-23 at 07:40 -0200, fabiano stocco2 wrote:
> Hi Almost worked, look at the messages after the patched and
> configured the tcrules.

> Dec 23 07:36:30 galvatronvt1 shorewall[19740]:    ERROR: Unknown Class
> (3:21:21)} : /etc/shorewall/tcrules (line 37)
> Dec 23 07:36:30 galvatronvt1 admin: ERROR:Shorewall restart failed
> 

Please apply the attached patch on top of the first one.

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 a43d2c4..05dffda 100644
--- a/Shorewall/Perl/Shorewall/Tc.pm
+++ b/Shorewall/Perl/Shorewall/Tc.pm
@@ -268,12 +268,15 @@ sub process_tc_rule( ) {
 	    require_capability ('CONNMARK' , "CONNMARK Rules", '' ) if $connmark;
 
 	} else {
-	    fatal_error "Invalid MARK ($originalmark)"
-		unless $remainder || ( $mark =~ /^([0-9a-fA-F]+)$/ and $designator =~ /^([0-9a-fA-F]+)$/ );
+	    unless ( $remainder ) {
+		fatal_error "Invalid MARK ($originalmark)" unless $mark =~ /^([0-9a-fA-F]+)$/ and $designator =~ /^([0-9a-fA-F]+)$/;
+		$chain = 'tcpost';
+		$mark  = $originalmark;
+	    }
 
 	    if ( $config{TC_ENABLED} eq 'Internal' || $config{TC_ENABLED} eq 'Shared' ) {
 		$originalmark = join( ':', normalize_hex( $mark ), normalize_hex( $designator ) );
-		fatal_error "Unknown Class ($originalmark)}" unless ( $device = $classids{$originalmark} );
+		fatal_error "Unknown Class ($originalmark)}" unless ( $device = $classids{$mark} );
 		fatal_error "IFB Classes may not be specified in tcrules" if @{$tcdevices{$device}{redirected}};
 
 		unless ( $tcclasses{$device}{hex_value $designator}{leaf} ) {
@@ -288,11 +291,6 @@ sub process_tc_rule( ) {
 		}
 	    }
 
-	    unless ( $remainder ) {
-		$chain = 'tcpost';
-		$mark  = $originalmark;
-	    }
-
 	    $classid = 1;
 	    $target  = 'CLASSIFY --set-class';
 	}

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to