mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 19:55:52 +02:00
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:
committed by
Michael Tremer
parent
99e5d97623
commit
cf576a12e5
@@ -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>";
|
||||
|
||||
Reference in New Issue
Block a user