From 66fdc9f6a7eedf95ba9b8fbda6a02006cde0d18b Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 25 Feb 2014 12:48:25 -0800 Subject: [PATCH] Call directive_callback for directives without '?' Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index cd0849b73..4baaf76ec 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -3382,6 +3382,7 @@ sub read_a_line($) { if ( $comments_allowed && $currentline =~ /^\s*COMMENT\b/ ) { process_comment unless $nocomment; + $directive_callback->( 'COMMENT', $currentline ) if $directive_callback; $currentline = ''; $currentlinenumber = 0; next @@ -3393,6 +3394,7 @@ sub read_a_line($) { fatal_error( "Invalid format ($format)" ) unless $format =~ /\d+/; fatal_error( "Format must be between 1 and $max_format" ) unless $format && $format <= $max_format; $file_format = $format; + $directive_callback->( 'FORMAT', $currentline ) if $directive_callback; $currentline = ''; $currentlinenumber = 0; next @@ -3433,6 +3435,7 @@ sub read_a_line($) { fatal_error "Invalid SECTION name ($sectionname)" unless $sectionname =~ /^[-_\da-zA-Z]+$/; fatal_error "This file does not allow ?SECTION" unless $section_function; $section_function->($sectionname); + $directive_callback->( 'SECTION', $currentline ) if $directive_callback; $currentline = ''; } else { fatal_error "Non-ASCII gunk in file" if ( $options && CHECK_GUNK ) && $currentline =~ /[^\s[:print:]]/;