Forward Firewall: Bugfix: when editing an rule, the default ACTION (ACCEPT,DROP,REJECT) was set depending on Firewallmode. Now it checks, if a rule is edited and value is set to rule action

This commit is contained in:
Alexander Marx
2013-01-18 10:18:25 +01:00
committed by Michael Tremer
parent 99e5d97623
commit cf576a12e5

View File

@@ -1014,15 +1014,21 @@ print <<END;
END
foreach ("ACCEPT","DROP","REJECT")
{
if($fwdfwsettings{'POLICY'} eq 'MODE2'){
$fwdfwsettings{'RULE_ACTION'} = 'DROP';
}
if ($_ eq $fwdfwsettings{'RULE_ACTION'})
{
print"<option selected>$_</option>";
if($fwdfwsettings{'updatefwrule'} eq 'on'){
print"<option ";
print "selected='selected'" if ($fwdfwsettings{'RULE_ACTION'} eq $_);
print">$_</option>";
}else{
print"<option>$_</option>";
if($fwdfwsettings{'POLICY'} eq 'MODE2'){
$fwdfwsettings{'RULE_ACTION'} = 'DROP';
}
if ($_ eq $fwdfwsettings{'RULE_ACTION'})
{
print"<option selected>$_</option>";
}else{
print"<option>$_</option>";
}
}
}
print"</select></td></tr></table><hr>";