Correct merge_rules() for LAST matches.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-04-19 08:40:01 -07:00
parent 91c4dd2e56
commit 610bdf1aac

View File

@ -1094,6 +1094,10 @@ sub merge_rules( $$$ ) {
set_rule_option( $toref, 'policy', $fromref->{policy} ) if exists $fromref->{policy};
for my $option ( grep( ( $opttype{$_} || 0 ) == LAST, keys %$fromref ) ) {
set_rule_option( $toref, $option, $fromref->{$option} );
}
unless ( $toref->{comment} ) {
$toref->{comment} = $fromref->{comment} if exists $fromref->{comment};
}