On Tue, 2011-06-21 at 21:25 +0100, Steven Jan Springl wrote: > If the rules file contains: > > DEFAULTS 1.1.1.1 > > the following messages are produced: > > Use of uninitialized value $dest in pattern match (m//) > at /usr/share/shorewall/Shorewall/Rules.pm line 2377, <$currentfile> line 15. > > Use of uninitialized value $input in substitution (s///) > at /usr/share/shorewall/Shorewall/Rules.pm line 2303, <$currentfile> line 15. > > Use of uninitialized value $input in pattern match (m//) > at /usr/share/shorewall/Shorewall/Rules.pm line 2311, <$currentfile> line 15. > > Use of uninitialized value $input in pattern match (m//) > at /usr/share/shorewall/Shorewall/Rules.pm line 2344, <$currentfile> line 15. > > Use of uninitialized value $list in pattern match (m//) > at /usr/share/shorewall/Shorewall/Config.pm line 1278, <$currentfile> line > 15. > > Use of uninitialized value $list in split > at /usr/share/shorewall/Shorewall/Config.pm line 1280, <$currentfile> line > 15. > > Use of uninitialized value $dest in split > at /usr/share/shorewall/Shorewall/Rules.pm line 2401, <$currentfile> line 15. > > Use of uninitialized value $_[0] in hash element > at /usr/share/shorewall/Shorewall/Zones.pm line 775, <$currentfile> line 15.
Steven, This patch seems to eliminate the problem. -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/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm
index 9e6ef08..cf18b9b 100644
--- a/Shorewall/Perl/Shorewall/Rules.pm
+++ b/Shorewall/Perl/Shorewall/Rules.pm
@@ -2373,11 +2373,20 @@ sub process_rule ( ) {
#
process_section( 'NEW' ) unless $section;
+ if ( $target eq 'DEFAULTS' ) {
+ if ( @actionstack ) {
+ default_action_params( split_list $source, 'defaults' );
+ next;
+ }
+
+ fatal_error "DEFAULTS is only allowed in an ACTION file";
+ }
+
if ( $source =~ /^none(:.*)?$/i || $dest =~ /^none(:.*)?$/i ) {
progress_message "Rule \"$currentline\" ignored.";
return 1;
}
-
+
my $intrazone = 0;
my $wild = 0;
my $thisline = $currentline; #We must save $currentline because it is overwritten by macro expansion
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________ Shorewall-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-devel
