diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 076316c76..4172866f8 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -1836,7 +1836,7 @@ sub assure_cat_state() { sub emitr( $ ) { my $rule = $_[0]; - if ( substr( $rule, 0, 2 ) ne '-A' ) { + if ( ! $rule || substr( $rule, 0, 2 ) ne '-A' ) { # # A command rather than a rule #