]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Firewall: Bugfix - When editing a DNAT rule and setting prot to "all" the port from...
authorAlexander Marx <amarx@ipfire.org>
Thu, 19 Dec 2013 16:26:12 +0000 (17:26 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 20 Dec 2013 11:08:43 +0000 (12:08 +0100)
html/cgi-bin/firewall.cgi

index 28a7f0bd2eba15296adea1963caa11aae6754cf6..741fada01f689dc797ffc79022e837c974e042c2 100755 (executable)
@@ -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'})){