From a80b04bd74316901f7c5fe985f4d906b2adb8aff Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 18 Jul 2011 09:45:59 -0700 Subject: [PATCH] Correct formatting of empty arguments to add_commands Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index b0e54a130..6b3c5c5b2 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -728,6 +728,8 @@ sub format_option( $$ ) { sub format_rule( $$;$ ) { my ( $chainref, $ruleref, $suppresshdr ) = @_; + return $ruleref->{cmd} if exists $ruleref->{cmd}; + my $rule = $suppresshdr ? '' : "-A $chainref->{name}"; for ( qw/ p i s o d / ) {