From 99a0226a438324848adb429d905c671c8af1b84e Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 6 Jun 2010 08:04:28 -0700 Subject: [PATCH] Slight improvement of regular expression used to insert chain name into rules after '-A' Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 96d26a3f4..119365727 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -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' ) { #