Slight improvement of regular expression used to insert chain name into rules after '-A'

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-06-06 08:04:28 -07:00
parent fdc3b698a9
commit 99a0226a43

View File

@ -3535,7 +3535,7 @@ sub emitr( $$ ) {
assert( $chain );
if ( $rule ) {
my $replaced = ($rule =~ s/( ?)-A /$1-A $chain /);
my $replaced = ($rule =~ s/((^|[ "])?)-A /$1-A $chain /);
if ( substr( $rule, 0, 2 ) eq '-A' ) {
#