On 11/19/12 4:25 PM, Tom Eastep wrote:
> On 11/19/2012 11:41 AM, Tom Eastep wrote:
>> On 11/19/12 7:47 AM, Mr Dash Four wrote:
> 
>>> This might not sound like a big deal, but when I wish to use a single
>>> macro in various policy statements for different directions ($FW->net,
>>> net->$FW etc), when I get a packet logged, I won't know which chain this
>>> packet originated from, or, at the very least, I have to scratch my head
>>> to find out. If I were able to deploy macros in the "policy" instead,
>>> this problem goes away as the macro will be included "inline" with the
>>> appropriate labels and comments to boot.
>>
>> I'll take a look at this. But in the mean time, you can achieve the same
>> goal by simply placing your logging rules at the end of the rules file
>> with SOURCE and DEST set to 'all'.
> 
> Attached is a lightly-tested patch that allows a macro to be used as a
> default action. Please try it and provide feedback.

This one is needed also.

-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/Rules.pm 
b/Shorewall/Perl/Shorewall/Rules.pm
index 27dcffc..f5c2d05 100644
--- a/Shorewall/Perl/Shorewall/Rules.pm
+++ b/Shorewall/Perl/Shorewall/Rules.pm
@@ -1132,7 +1132,7 @@ sub merge_levels ($$) {
 sub find_macro( $ )
 {
     my $macro = $_[0];
-    my $macrofile = find_file $macro =~ /^macro\./ ? $macro : "macro.$macro";
+    my $macrofile = find_file( $macro =~ /^macro\./ ? $macro : "macro.$macro" 
);
 
     if ( -f $macrofile ) {
        $macros{$macro} = $macrofile;

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to