diff options
author | Ermal <eri@pfsense.org> | 2010-05-13 18:56:07 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-05-13 18:56:07 +0000 |
commit | f83fa942920b3ef8cd23f35ad3237985b895a1eb (patch) | |
tree | ab8c331e89f3ae8e2a8e9081c7c7f53ca7c0ce91 /usr/local/www/firewall_nat_edit.php | |
parent | 2b001b5d05c967ca758fb95479d1ef77da3c0110 (diff) | |
download | pfsense-f83fa942920b3ef8cd23f35ad3237985b895a1eb.zip pfsense-f83fa942920b3ef8cd23f35ad3237985b895a1eb.tar.gz |
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
Diffstat (limited to 'usr/local/www/firewall_nat_edit.php')
-rwxr-xr-x | usr/local/www/firewall_nat_edit.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php index d840d35..2b415ec 100755 --- a/usr/local/www/firewall_nat_edit.php +++ b/usr/local/www/firewall_nat_edit.php @@ -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'); |