Tom Eastep wrote:
> Tom Eastep wrote:
>> David Rothenberger wrote:
>>> After upgrading to 4.4.2, "shorewall check" yields this error if my
>>> routestopped file includes the "routeback" option:
>>>
>>>     ERROR: Internal error in Shorewall::Config::emit at 
>>> /usr/share/shorewall/Shorewall/Config.pm line 823 : 
>>> /etc/shorewall/routestopped (line 2)
>>>
>>> "shorewall restart" works fine, as does "shorewall check" when
>>> routeback isn't specified.
>>>
>> The attached patch corrects the problem:
> 
>> patch /usr/share/shorewall/Shorewall/Compiler.pm < routestopped.diff
> 
> 
> The attached patch is actually better:
> 
>    patch /usr/share/shorewall/Shorewall/Rules.pm < routestopped.diff
> 

Three's the charm

-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 b06aced..c049289 100644
--- a/Shorewall/Perl/Shorewall/Rules.pm
+++ b/Shorewall/Perl/Shorewall/Rules.pm
@@ -330,6 +330,8 @@ sub process_routestopped() {
 	}
 
 	unless ( $options eq '-' ) {
+	    my $chainref = $filter_table->{FORWARD};
+
 	    for my $option (split /,/, $options ) {
 		if ( $option eq 'routeback' ) {
 		    if ( $routeback ) {
@@ -341,7 +343,7 @@ sub process_routestopped() {
 			    my $source = match_source_net $host;
 			    my $dest   = match_dest_net   $host;
 
-			    emit "run_iptables -A FORWARD -i $interface -o $interface $source $dest -j ACCEPT";
+			    add_rule $chainref , "-i $interface -o $interface $source $dest -j ACCEPT";
 			    clearrule;
 			}
 		    }

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Shorewall-users mailing list
Shorewall-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to