Brian J. Murrell wrote:
> My perl-fu is getting less and less every day, but I think this is a
> typo at line 392 of shorewall-perl-4.0.6/Shorewall/Actions.pm:
> 
>       my ( $mtarget, $msource,  $mdest,  $mproto,  $mports,  $msports, $ 
> mrate, $muser ) = split_line 1, 8, 'macro file';
> --------------------------------------------------------------------------^
> 

Perl is tolerant of extraneous whitespace after the leading special character.

[EMAIL PROTECTED]:~/shorewall/branches/4.0/Shorewall-perl> perl -e '($foo, $ 
bar) = (1,2); print "$bar\n"'
2
[EMAIL PROTECTED]:~/shorewall/branches/4.0/Shorewall-perl> 


> Now, why am I poking around in here?  Seems my OSPF macro is not being
> expanded correctly.  I believe my macro conforms to the documentation at
> http://www.shorewall.net/Macros.html:
> 
> PARAM DEST    SOURCE  ospf
> PARAM DEST    224.0.0.22 igmp
> PARAM 1.2.3.4 5.6.7.8 ospf
> PARAM SOURCE  DEST    ospf
> PARAM -       224.0.0.5 ospf
> PARAM -       224.0.0.6 ospf
> 
> And I invoke with the following rule:
> 
> OSPF/ACCEPT loc               fw
> 
> However what I get in my loc2fw chain is:
> 
>     0     0 ACCEPT     89   --  *      *       1.2.3.4              5.6.7.8   
>           
>   138 10996 ACCEPT     89   --  *      *       0.0.0.0/0            0.0.0.0/0 
>           
>     0     0 ACCEPT     89   --  *      *       0.0.0.0/0            224.0.0.5 
>           
>     0     0 ACCEPT     89   --  *      *       0.0.0.0/0            224.0.0.6 
>           
> 
> So it seems that lines 1, 2 are not included at all.  line 4 is
> included, but SOURCE and DEST are replaced with "any".  So in summary,
> any lines in my macro with SOURCE and/or DEST are not being handled
> correctly.  This is shorewall[-perl] 4.0.6.

The SOURCE in the first two rules in 'fw'. The first rule will appear in
the 'fw2loc' chain while the second will appear in the 'fw2fw' chain,
which is not what you want. Change that one to:

PARAM   DEST    SOURCE:224.0.0.22 igmp

-Tom
-- 
Tom Eastep    \ Nothing is foolproof to a sufficiently talented fool
Shoreline,     \ http://shorewall.net
Washington USA  \ [EMAIL PROTECTED]
PGP Public Key   \ https://lists.shorewall.net/teastep.pgp.key

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to