diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php index 40ede5533b..f4b4587972 100755 --- a/usr/local/www/firewall_nat_edit.php +++ b/usr/local/www/firewall_nat_edit.php @@ -60,6 +60,11 @@ $id = $_GET['id']; if (isset($_POST['id'])) $id = $_POST['id']; +$after = $_GET['after']; + +if (isset($_POST['after'])) + $after = $_POST['after']; + if (isset($_GET['dup'])) { $id = $_GET['dup']; $after = $_GET['dup']; @@ -365,16 +370,6 @@ if ($_POST) { $_POST['filter-rule-association']=='add-unassociated') ) $need_filter_rule = true; - // Determine NAT entry ID now, we need it for the firewall rule - if (isset($id) && $a_nat[$id]) - $a_nat[$id] = $natent; - else { - if (is_numeric($after)) - $id = $after + 1; - else - $id = count($a_nat); - } - if ($need_filter_rule == true) { /* auto-generate a matching firewall rule */ @@ -855,6 +850,7 @@ include("fbegin.inc"); ?> + diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php index b789e28363..55520711cf 100755 --- a/usr/local/www/firewall_nat_out_edit.php +++ b/usr/local/www/firewall_nat_out_edit.php @@ -63,11 +63,15 @@ if (isset($_POST['id'])) { $id = $_POST['id']; } +$after = $_GET['after']; + +if (isset($_POST['after'])) + $after = $_POST['after']; + if (isset($_GET['dup'])) { $id = $_GET['dup']; $after = $_GET['dup']; -} else - unset($after); +} if (isset($id) && $a_out[$id]) { $pconfig['protocol'] = $a_out[$id]['protocol']; @@ -661,6 +665,7 @@ any)");?> +