diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 0206f9100..1f8d5ee65 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -82,6 +82,7 @@ our @EXPORT = ( qw( state_imatch split_action get_target_param + get_target_param1 get_inline_matches handle_inline @@ -8430,7 +8431,7 @@ sub get_inline_matches( $ ) { } # -# Split the passed target into the basic target and parameter (previously duplicated in this file) +# Split the passed target into the basic target and parameter # sub get_target_param( $ ) { my ( $target, $param ) = split '/', $_[0]; @@ -8442,6 +8443,16 @@ sub get_target_param( $ ) { ( $target, $param ); } +sub get_target_param1( $ ) { + my $target = $_[0]; + + if ( $target =~ /^(.*?)[(](.*)[)]$/ ) { + ( $1, $2 ); + } else { + ( $target, '' ); + } +} + sub handle_inline( $$$$ ) { my ( $action, $basictarget, $param, $loglevel ) = @_; my $inline_matches = get_inline_matches(1);