From ce2dbe92ce5f0655670d38502a65c0c53542e361 Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Thu, 19 Dec 2013 17:26:12 +0100 Subject: [PATCH] Firewall: Bugfix - When editing a DNAT rule and setting prot to "all" the port from previus rule was not resettet --- html/cgi-bin/firewall.cgi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index 28a7f0bd2e..741fada01f 100755 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -783,6 +783,10 @@ sub checkrule } $fwdfwsettings{'dnatport'}=join("|",@values); } + #check if a rule with prot tcp or udp and ports is edited and now prot is "all", then delete all ports + if($fwdfwsettings{'PROT'} eq ''){ + $fwdfwsettings{'dnatport'}=''; + } } #check valid remark if ($fwdfwsettings{'ruleremark'} ne '' && !&validremark($fwdfwsettings{'ruleremark'})){ -- 2.39.5