Firewall: fixed rules.pl (no INPUT rules where created when using port and prot ...
authorAlexander Marx <amarx@ipfire.org>
Tue, 1 Oct 2013 05:45:58 +0000 (07:45 +0200)
committerAlexander Marx <amarx@ipfire.org>
Tue, 1 Oct 2013 05:45:58 +0000 (07:45 +0200)
This is a bug which was raised due to the last commit

config/forwardfw/rules.pl

index b797c2e0ad3b9af678f78a7594efd8cfd0eef64b..ba2ac037369ad1e1ba1ed9376b08932cf15caec6 100755 (executable)
@@ -538,10 +538,12 @@ sub get_prot
                }
        }elsif($$hash{$key}[11] eq 'ON' && $SRC_TGT eq ''){
                if ($$hash{$key}[14] eq 'TGT_PORT'){
-                       if ($$hash{$key}[15] ne ''){
-                               return "$$hash{$key}[8]";
+                       if ($$hash{$key}[15] ne '' && $$hash{$key}[8] eq ''){
+                               return "TCP,UDP";
                        }elsif($$hash{$key}[13] ne ''){
                                return "$$hash{$key}[8]";
+                       }elsif($$hash{$key}[15] ne ''){
+                               return "$$hash{$key}[8]";
                        }else{
                                return "$$hash{$key}[8]";
                        }