From 6126ae67e6895c365f1400daf5f2835f1ce5b4b9 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 24 Dec 2012 13:50:26 -0800 Subject: [PATCH] Don't apply AUTOCOMMENT or comment continuation to inline actions. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Rules.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 26fe6e173..e02fac432 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -1781,8 +1781,6 @@ sub process_macro ($$$$$$$$$$$$$$$$$$$) { sub process_inline ($$$$$$$$$$$$$$$$$$$$) { my ($inline, $chainref, $loglevel, $target, $param, $source, $dest, $proto, $ports, $sports, $origdest, $rate, $user, $mark, $connlimit, $time, $headers, $condition, $helper, $wildcard ) = @_; - my $nocomment = no_comment; - my $generated = 0; my ( $level, $tag ) = split( ':', $loglevel, 2 ); @@ -1799,7 +1797,7 @@ sub process_inline ($$$$$$$$$$$$$$$$$$$$) { push_open $inlinefile, 2, 1, 1; - macro_comment $inline; + push_comment(''); while ( read_a_line( NORMAL_READ ) ) { my ( $mtarget, @@ -1821,7 +1819,7 @@ sub process_inline ($$$$$$$$$$$$$$$$$$$$) { fatal_error 'TARGET must be specified' if $mtarget eq '-'; if ( $mtarget eq 'COMMENT' ) { - process_comment unless $nocomment; + process_comment; next; } @@ -1895,14 +1893,14 @@ sub process_inline ($$$$$$$$$$$$$$$$$$$$) { progress_message " Rule \"$currentline\" $done"; } + pop_comment; + pop_open; progress_message "..End inline action $inlinefile"; pop_action_params( $oldparms ); - clear_comment unless $nocomment; - return $generated; }