On 12/17/11 4:38 PM, Steven Jan Springl wrote:

> In the tcpri file, if a port number is appended to a helper module e.g.:
> 
> 1  -  -  -  -  ftp-21
> 
> the following message is produced:
> 
> WARNING: Unrecognized helper (ftp-21) : /etc/shorewallT9/tcpri (line 11)
>

The attached patch seems to resolve the issue.

Thanks, Steven

-Tom
-- 
Tom Eastep        \ When I die, I want to go like my Grandfather who
Shoreline,         \ died peacefully in his sleep. Not screaming like
Washington, USA     \ all of the passengers in his car
http://shorewall.net \________________________________________________
diff --git a/Shorewall/Perl/Shorewall/Chains.pm 
b/Shorewall/Perl/Shorewall/Chains.pm
index 9a631d2..a8c24a0 100644
--- a/Shorewall/Perl/Shorewall/Chains.pm
+++ b/Shorewall/Perl/Shorewall/Chains.pm
@@ -4002,9 +4002,13 @@ sub do_helper( $ ) {
 
     return '' if $helper eq '-';
 
-    warning_message "Unrecognized helper ($helper)" unless $helpers{$helper};
+    my $helper_base = $helper;
 
-    qq(-m helper --helper "$helper" );
+    $helper_base =~ s/-\d+$//;
+
+    warning_message "Unrecognized helper ($helper)" unless 
$helpers{$helper_base};
+
+    qq(-m helper --helper "$helper" ) if defined wantarray;
 }
 
 #
diff --git a/Shorewall/Perl/Shorewall/Raw.pm b/Shorewall/Perl/Shorewall/Raw.pm
index a96381b..ba843b8 100644
--- a/Shorewall/Perl/Shorewall/Raw.pm
+++ b/Shorewall/Perl/Shorewall/Raw.pm
@@ -76,7 +76,7 @@ sub process_notrack_rule( $$$$$$$ ) {
 
            if ( $option eq 'helper' ) {
                fatal_error "Invalid helper' ($args)" if $args =~ /,/;
-               warning_message "Unrecognized helper ($args)" unless 
$helpers{$args};
+               do_helper( $args );
                $action = "CT --helper $args";
            } elsif ( $option eq 'ctevents' ) {
                for ( split ',', $args ) {
------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to