On 4/6/11 4:45 AM, Steven Jan Springl wrote: > > No. This is a bug in the Shorewall compiler that Tom will need to look at.
Indeed. Patch attached. -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 c1e7b11..870c25c 100644
--- a/Shorewall/Perl/Shorewall/Chains.pm
+++ b/Shorewall/Perl/Shorewall/Chains.pm
@@ -1667,13 +1667,14 @@ sub delete_references( $ ) {
#
sub replace_references( $$ ) {
my ( $chainref, $target ) = @_;
- my $tableref = $chain_table{$chainref->{table}};
- my $count = 0;
- my $name = $chainref->{name};
+ my $tableref = $chain_table{$chainref->{table}};
+ my $count = 0;
+ my $name = $chainref->{name};
+ my $targetref = $tableref->{$target};
$name =~ s/\+/\\+/;
- if ( ! $tableref->{$target}{builtin} ) {
+ if ( $targetref ) {
#
# The target is a chain -- use the jump type from each referencing rule
#
@@ -1683,7 +1684,7 @@ sub replace_references( $$ ) {
for ( @{$fromref->{rules}} ) {
$rule++;
if ( s/ -([jg]) $name(\s|$)/ -$1 ${target}$2/ ) {
- add_reference ( $fromref, $tableref->{$target} );
+ add_reference ( $fromref, $targetref );
$count++;
trace( $fromref, 'R', $rule, $_ ) if $debug;
}
@@ -1693,7 +1694,7 @@ sub replace_references( $$ ) {
}
}
- delete $tableref->{$target}{references}{$chainref->{name}};
+ delete $targetref->{references}{$chainref->{name}};
} else {
#
# The target is a builtin -- we must use '-j'
@@ -1704,7 +1705,6 @@ sub replace_references( $$ ) {
for ( @{$fromref->{rules}} ) {
$rule++;
if ( s/ -[jg] $name(\s|$)/ -j ${target}$1/ ) {
- add_reference ( $fromref, $tableref->{$target} );
$count++ ;
trace( $fromref, 'R', $rule, $_ ) if $debug;
}
@@ -1713,8 +1713,6 @@ sub replace_references( $$ ) {
delete $chainref->{references}{$fromref->{name}};
}
}
-
- delete $tableref->{$target}{references}{$chainref->{name}};
}
progress_message " $count references to chain $chainref->{name} replaced"
if $count;
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev
_______________________________________________ Shorewall-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-users
