From 4a9918899508c7c12aabd8e1d03a3c9ff6b83a83 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Mon, 16 May 2005 02:14:55 +0000 Subject: Ticket 6: Allow NAT to duplicate rules --- usr/local/www/firewall_nat_edit.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'usr/local/www/firewall_nat_edit.php') diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php index 847be62..75f6c11 100755 --- a/usr/local/www/firewall_nat_edit.php +++ b/usr/local/www/firewall_nat_edit.php @@ -42,6 +42,11 @@ $id = $_GET['id']; if (isset($_POST['id'])) $id = $_POST['id']; +if (isset($_GET['dup'])) { + $id = $_GET['dup']; + $after = $_GET['dup']; +} + if (isset($id) && $a_nat[$id]) { $pconfig['extaddr'] = $a_nat[$id]['external-address']; $pconfig['proto'] = $a_nat[$id]['protocol']; @@ -141,8 +146,12 @@ if ($_POST) { if (isset($id) && $a_nat[$id]) $a_nat[$id] = $natent; - else - $a_nat[] = $natent; + else { + if (is_numeric($after)) + array_splice($a_nat, $after+1, 0, array($natent)); + else + $a_nat[] = $natent; + } touch($d_natconfdirty_path); @@ -338,7 +347,7 @@ function ext_rep_change() {
You may enter a description here for your reference (not parsed). - +   -- cgit v1.1