Fix unknown zone handling in Tunnels file

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6245 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-05-05 00:47:15 +00:00
parent bd9e9345ab
commit 6bd88d06c6

View File

@ -71,6 +71,7 @@ sub setup_tunnels() {
unless ( $gatewayzones eq '-' ) { unless ( $gatewayzones eq '-' ) {
for my $zone ( split /,/, $gatewayzones ) { for my $zone ( split /,/, $gatewayzones ) {
fatal_error "Unknown zone ($zone)" unless $zones{zone};
fatal_error "Invalid zone ($zone)" unless $zones{$zone}{type} eq 'ipv4'; fatal_error "Invalid zone ($zone)" unless $zones{$zone}{type} eq 'ipv4';
$inchainref = ensure_filter_chain "${zone}2${firewall_zone}", 1; $inchainref = ensure_filter_chain "${zone}2${firewall_zone}", 1;
$outchainref = ensure_filter_chain "${firewall_zone}2${zone}", 1; $outchainref = ensure_filter_chain "${firewall_zone}2${zone}", 1;
@ -209,6 +210,8 @@ sub setup_tunnels() {
sub setup_one_tunnel($$$$) { sub setup_one_tunnel($$$$) {
my ( $kind , $zone, $gateway, $gatewayzones ) = @_; my ( $kind , $zone, $gateway, $gatewayzones ) = @_;
fatal_error "Unknown zone ($zone)" unless $zones{zone};
fatal_error "Invalid zone ($zone)" unless $zones{$zone}{type} eq 'ipv4'; fatal_error "Invalid zone ($zone)" unless $zones{$zone}{type} eq 'ipv4';
my $inchainref = ensure_filter_chain "${zone}2${firewall_zone}", 1; my $inchainref = ensure_filter_chain "${zone}2${firewall_zone}", 1;