Avoid leaving an orphan '!' behind.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-05-01 07:51:24 -07:00
parent 219b2e0761
commit 94c6b37e8e

View File

@ -1565,11 +1565,11 @@ sub replace_references1( $$$ ) {
#
# Prevent multiple '-p', '-i', '-o', '-s' and '-d' matches
#
s/ -p [^ ]+ / / if $hasp;
s/ -i [^ ]+ / / if $hasi;
s/ -o [^ ]+ / / if $haso;
s/ -s [^ ]+ / / if $hass;
s/ -d [^ ]+ / / if $hasd;
s/( !)? -p [^ ]+ / / if $hasp;
s/( !)? -i [^ ]+ / / if $hasi;
s/( !)? -o [^ ]+ / / if $haso;
s/( !)? -s [^ ]+ / / if $hass;
s/( !)? -d [^ ]+ / / if $hasd;
s/\s+-([jg]) $name($|\s)/$matches -$1 ${target}$2/;
add_reference ( $fromref, $tableref->{$target} );
$count++;
@ -1593,11 +1593,11 @@ sub replace_references1( $$$ ) {
#
# Prevent multiple '-p', '-i', '-o', '-s' and '-d' matches
#
s/ -p [^ ]+ / / if $hasp;
s/ -i [^ ]+ / / if $hasi;
s/ -o [^ ]+ / / if $haso;
s/ -s [^ ]+ / / if $hass;
s/ -d [^ ]+ / / if $hasd;
s/( !)? -p [^ ]+ / / if $hasp;
s/( !)? -i [^ ]+ / / if $hasi;
s/( !)? -o [^ ]+ / / if $haso;
s/( !)? -s [^ ]+ / / if $hass;
s/( !)? -d [^ ]+ / / if $hasd;
s/\s+-[jg] $name($|\s)/$matches -j ${target}$1/;
$count++;
trace( $fromref, 'R', $rule, $_ ) if $debug;