From 6f15caa2221fd9593909da237e2142827653b39e Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 9 May 2007 15:08:39 +0000 Subject: [PATCH] Fix 'DEST = all' git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6299 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Rules.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Shorewall-perl/Shorewall/Rules.pm b/Shorewall-perl/Shorewall/Rules.pm index d9d8cd955..aafab8a06 100644 --- a/Shorewall-perl/Shorewall/Rules.pm +++ b/Shorewall-perl/Shorewall/Rules.pm @@ -1117,7 +1117,7 @@ sub process_rule1 ( $$$$$$$$$$ ) { # # Process a Record in the rules file # -# Deals with the ugliness of wildcard zones ('all' in rules). +# Deals with the ugliness of wildcard zones ('all' in SOURCE and/or DEST column). # sub process_rule ( $$$$$$$$$$ ) { my ( $target, $source, $dest, $proto, $ports, $sports, $origdest, $ratelimit, $user, $mark ) = @_; @@ -1150,6 +1150,8 @@ sub process_rule ( $$$$$$$$$$ ) { } elsif ( $source eq 'all-' ) { $source = 'all'; $includesrcfw = 0; + } else { + fatal_error "Invalid SOURCE ($source)" unless $source eq 'all'; } } @@ -1161,10 +1163,13 @@ sub process_rule ( $$$$$$$$$$ ) { $dest = 'all'; $intrazone = 1; $includedstfw = 0; - } elsif ( $source eq 'all-' ) { + } elsif ( $dest eq 'all-' ) { $dest = 'all'; $includedstfw = 0; + } else { + fatal_error "Invalid DEST ($dest)" unless $dest eq 'all'; } + } my $action = isolate_basic_target $target;