From 2154560df2faea920f8fc01f2efea0b5dd07979f Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 14 Apr 2014 12:32:55 +0000 Subject: Unset these globals after use --- usr/local/www/firewall_nat_out.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'usr/local/www') diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php index 322a289..1d993b8 100644 --- a/usr/local/www/firewall_nat_out.php +++ b/usr/local/www/firewall_nat_out.php @@ -47,6 +47,7 @@ require_once("filter.inc"); require_once("shaper.inc"); global $FilterIflist; +global $GatewaysList; if (!is_array($config['nat']['outbound'])) $config['nat']['outbound'] = array(); @@ -88,6 +89,8 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") { */ if(empty($FilterIflist)) filter_generate_optcfg_array(); + if(empty($GatewaysList)) + filter_generate_gateways(); $tonathosts = filter_nat_rules_automatic_tonathosts(true); $automatic_rules = filter_nat_rules_outbound_automatic(""); @@ -117,6 +120,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") { } } $savemsg = gettext("Default rules for each interface have been created."); + unset($FilterIflist, $GatewaysList); } $config['nat']['outbound']['mode'] = $_POST['mode']; @@ -526,6 +530,7 @@ if (is_subsystem_dirty('natconf')) if(empty($GatewaysList)) filter_generate_gateways(); $automatic_rules = filter_nat_rules_outbound_automatic(implode(" ", filter_nat_rules_automatic_tonathosts())); + unset($FilterIflist, $GatewaysList); ?>     -- cgit v1.1