diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php index 0c9229b7e4..84fc0e8724 100755 --- a/usr/local/www/firewall_nat.php +++ b/usr/local/www/firewall_nat.php @@ -82,6 +82,19 @@ if ($_POST) { } } +if ($_GET['act'] == "del") { + if ($a_nat[$_GET['id']]) { + if (isset($a_nat[$_GET['id']]['associated-rule-id'])) { + delete_id($a_nat[$_GET['id']]['associated-rule-id'], $config['filter']['rule']); + } + unset($a_nat[$_GET['id']]); + write_config(); + mark_subsystem_dirty('nat'); + header("Location: firewall_nat.php"); + exit; + } +} + if (isset($_POST['del_x'])) { /* delete selected rules */ if (is_array($_POST['rule']) && count($_POST['rule'])) { @@ -195,7 +208,13 @@ echo "