From 6bd88d06c6d19d244bb59feb2161a592b2577549 Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 5 May 2007 00:47:15 +0000 Subject: [PATCH] Fix unknown zone handling in Tunnels file git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6245 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Tunnels.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Shorewall-perl/Shorewall/Tunnels.pm b/Shorewall-perl/Shorewall/Tunnels.pm index bc91b5000..0e26a25a3 100644 --- a/Shorewall-perl/Shorewall/Tunnels.pm +++ b/Shorewall-perl/Shorewall/Tunnels.pm @@ -71,6 +71,7 @@ sub setup_tunnels() { unless ( $gatewayzones eq '-' ) { for my $zone ( split /,/, $gatewayzones ) { + fatal_error "Unknown zone ($zone)" unless $zones{zone}; fatal_error "Invalid zone ($zone)" unless $zones{$zone}{type} eq 'ipv4'; $inchainref = ensure_filter_chain "${zone}2${firewall_zone}", 1; $outchainref = ensure_filter_chain "${firewall_zone}2${zone}", 1; @@ -209,6 +210,8 @@ sub setup_tunnels() { sub setup_one_tunnel($$$$) { my ( $kind , $zone, $gateway, $gatewayzones ) = @_; + fatal_error "Unknown zone ($zone)" unless $zones{zone}; + fatal_error "Invalid zone ($zone)" unless $zones{$zone}{type} eq 'ipv4'; my $inchainref = ensure_filter_chain "${zone}2${firewall_zone}", 1;