From 285de10662731bb67e946e7e112bb4cf892173bf Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Tue, 1 Oct 2013 07:45:58 +0200 Subject: [PATCH] Firewall: fixed rules.pl (no INPUT rules where created when using port and prot "all") This is a bug which was raised due to the last commit --- config/forwardfw/rules.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/forwardfw/rules.pl b/config/forwardfw/rules.pl index b797c2e0a..ba2ac0373 100755 --- a/config/forwardfw/rules.pl +++ b/config/forwardfw/rules.pl @@ -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]"; } -- 2.39.2