diff options
-rwxr-xr-x | usr/local/www/firewall_nat.php | 13 | ||||
-rwxr-xr-x | usr/local/www/firewall_nat_out.php | 9 |
2 files changed, 13 insertions, 9 deletions
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php index a210813..42a7211 100755 --- a/usr/local/www/firewall_nat.php +++ b/usr/local/www/firewall_nat.php @@ -33,18 +33,22 @@ require("guiconfig.inc"); -if (!is_array($config['nat']['rule'])) { +if (!is_array($config['nat']['rule'])) $config['nat']['rule'] = array(); -} -nat_rules_sort(); + $a_nat = &$config['nat']['rule']; +nat_rules_sort(); if ($_POST) { $pconfig = $_POST; if ($_POST['apply']) { + + write_config(); + $retval = 0; + if (!file_exists($d_sysrebootreqd_path)) { config_lock(); $retval |= filter_configure(); @@ -62,9 +66,6 @@ if ($_POST) { unlink($d_filterconfdirty_path); } } - - - } if ($_GET['act'] == "del") { diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php index 721bc3a..b9ed904 100755 --- a/usr/local/www/firewall_nat_out.php +++ b/usr/local/www/firewall_nat_out.php @@ -51,10 +51,13 @@ if ($_POST) { if (!file_exists($d_sysrebootreqd_path)) { config_lock(); - $retval |= filter_configure(); - config_unlock(); + $retval |= filter_configure(); + config_unlock(); } - $savemsg = get_std_save_message($retval); + if(stristr($retval, "error") <> true) + $savemsg = get_std_save_message($retval); + else + $savemsg = $retval; if ($retval == 0) { if (file_exists($d_natconfdirty_path)) |