From 7faa4d19b4ef3be76b205c9be51a2e164611fa5f Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 17 Dec 2008 02:18:33 +0000 Subject: [PATCH] Fix exclusion in the IPv6 hosts file git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9085 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Rules.pm | 6 +++--- Shorewall-perl/Shorewall/Zones.pm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Shorewall-perl/Shorewall/Rules.pm b/Shorewall-perl/Shorewall/Rules.pm index 3c61ae4b3..2cac3d6ba 100644 --- a/Shorewall-perl/Shorewall/Rules.pm +++ b/Shorewall-perl/Shorewall/Rules.pm @@ -1608,7 +1608,7 @@ sub generate_matrix() { my $num = 1; for my $host ( @{$exclusionsref} ) { - my ( $interface, $net ) = split /:/, $host; + my ( $interface, $net ) = split /\|/, $host; insert_rule $chainref , $num++, join( '', match_dest_dev $interface , match_dest_net( $net ), '-j RETURN' ); } } @@ -1620,7 +1620,7 @@ sub generate_matrix() { my ( $chainref, $exclusionsref ) = @_; for my $host ( @{$exclusionsref} ) { - my ( $interface, $net ) = split /:/, $host; + my ( $interface, $net ) = split /\|/, $host; add_rule $chainref , join( '', match_dest_dev $interface, match_dest_net( $net ), '-j RETURN' ); } } @@ -1664,7 +1664,7 @@ sub generate_matrix() { add_rule ensure_filter_chain( "${zone}2${zone}", 1 ) , '-j ACCEPT' if rules_target( $zone, $zone ) eq 'ACCEPT'; for my $host ( @$exclusions ) { - my ( $interface, $net ) = split /:/, $host; + my ( $interface, $net ) = split /\|/, $host; my $rule = match_source_dev( $interface ) . match_source_net( $net ) . '-j RETURN'; add_rule $frwd_ref , $rule; add_rule $in_ref , $rule; diff --git a/Shorewall-perl/Shorewall/Zones.pm b/Shorewall-perl/Shorewall/Zones.pm index 88b40a25a..410b58473 100644 --- a/Shorewall-perl/Shorewall/Zones.pm +++ b/Shorewall-perl/Shorewall/Zones.pm @@ -529,7 +529,7 @@ sub add_group_to_zone($$$$$) validate_host $host, 0; } - push @$new, $switched ? "$interface:$host" : $host; + push @$new, $switched ? "$interface|$host" : $host; } $zoneref->{options}{in_out}{routeback} = 1 if $options->{routeback};