On 2/8/11 3:24 PM, Steven Jan Springl wrote:
> Tom
> 
> The following accounting rules also produces the error:
> 
> ACCOUNT(net2lan,192.168.0.0/24)  LOG  eth0  eth1
> ACCOUNT(net2lan,192.168.0.0/24)  NFLOG  eth0  eth1

The attached patch should catch all such issues.

-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/Chains.pm 
b/Shorewall/Perl/Shorewall/Chains.pm
index 65f9d76..76280b0 100644
--- a/Shorewall/Perl/Shorewall/Chains.pm
+++ b/Shorewall/Perl/Shorewall/Chains.pm
@@ -1270,7 +1270,7 @@ sub ensure_accounting_chain( $$ )
        fatal_error "Non-accounting chain ($chain) used in an accounting rule" 
unless $chainref->{accounting};
     } else {
        fatal_error "Chain name ($chain) too long" if length $chain > 29;
-       fatal_error "Invalid Chain name ($chain)" unless $chain =~ /^[-\w]+$/;
+       fatal_error "Invalid Chain name ($chain)" if $targets{$chain} || ! 
$chain =~ /^[-\w]+$/;
        $chainref = new_chain 'filter' , $chain;
        $chainref->{accounting} = 1;
        $chainref->{referenced} = 1;

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to