mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Test correctly for previous existing entries of linked rules otherwise some bad deletions might happen. Reported-by: http://forum.pfsense.org/index.php/topic,25091.0.html
This commit is contained in:
parent
2b001b5d05
commit
f83fa94292
@ -316,7 +316,7 @@ if ($_POST) {
|
||||
unset($natent['nosync']);
|
||||
|
||||
// If we used to have an associated filter rule, but no-longer should have one
|
||||
if ($a_nat[$id]>0 && ( empty($natent['associated-rule-id']) || $natent['associated-rule-id'] != $a_nat[$id]['associated-rule-id'] ) ) {
|
||||
if (!empty($a_nat[$id]) && ( empty($natent['associated-rule-id']) || $natent['associated-rule-id'] != $a_nat[$id]['associated-rule-id'] ) ) {
|
||||
// Delete the previous rule
|
||||
delete_id($a_nat[$id]['associated-rule-id'], $config['filter']['rule']);
|
||||
mark_subsystem_dirty('filter');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user