diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-03-05 16:28:03 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-03-05 16:28:03 +0000 |
commit | 06f619150f295879eca53853ba368d561501c612 (patch) | |
tree | bbd50cba0df926b092eb04537831f9334850d2ae | |
parent | 01ba0a7229613235b16e7c7a11683143abd69508 (diff) | |
download | pfsense-06f619150f295879eca53853ba368d561501c612.zip pfsense-06f619150f295879eca53853ba368d561501c612.tar.gz |
Propperly initialize variables so they function is as expected.
-rw-r--r-- | etc/inc/config.gui.inc | 2 | ||||
-rw-r--r-- | etc/inc/config.lib.inc | 1 | ||||
-rw-r--r-- | etc/inc/filter.inc | 9 | ||||
-rw-r--r-- | etc/inc/globals.inc | 1 |
4 files changed, 10 insertions, 3 deletions
diff --git a/etc/inc/config.gui.inc b/etc/inc/config.gui.inc index d56703f..5fa3377 100644 --- a/etc/inc/config.gui.inc +++ b/etc/inc/config.gui.inc @@ -46,6 +46,8 @@ * DISABLE_PHP_LINT_CHECKING */ +require_once("globals.inc"); + /* do not load this file twice. */ if($config_inc_loaded == true) return; diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc index 255b45a..8c392ec 100644 --- a/etc/inc/config.lib.inc +++ b/etc/inc/config.lib.inc @@ -43,6 +43,7 @@ pfSense_MODULE: config */ +$config_parsed = false; /****f* config/encrypted_configxml * NAME diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 4070117..817155f 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -218,6 +218,7 @@ function filter_configure_sync() { if(file_exists("{$g['tmp_path']}/rules.debug")) copy("{$g['tmp_path']}/rules.debug", "{$g['tmp_path']}/rules.debug.old"); + $rules = ""; $rules .= "{$aliases} \n"; update_filter_reload_status("Setting up logging information"); $rules .= filter_setup_logging_interfaces(); @@ -458,7 +459,7 @@ function filter_generate_aliases() { echo "filter_generate_aliases() being called $mt\n"; } $alias = "#System aliases\n "; - $aliases .= "loopback = \"{ lo0 }\"\n"; + $aliases = "loopback = \"{ lo0 }\"\n"; foreach ($FilterIflist as $if => $ifcfg) { $aliases .= "{$ifcfg['descr']} = \"{ {$ifcfg['if']}"; @@ -884,7 +885,8 @@ function filter_nat_rules_generate_if($if, $src = "any", $srcport = "", $dst = " function filter_nat_rules_generate() { global $config, $g, $after_filter_configure_run, $FilterIflist; - $natrules .= "nat-anchor \"natearly/*\"\n"; + + $natrules = "nat-anchor \"natearly/*\"\n"; if(file_exists("{$g['tmp_path']}/rules.natearly.packages")) $natrules .= file_get_contents("{$g['tmp_path']}/rules.natearly.packages"); @@ -1021,7 +1023,7 @@ function filter_nat_rules_generate() { "{$macroortable}", 5060, "", 5060, $target, 5060, false); $natrules .= filter_nat_rules_generate_if($if, "{$macroortable}", null, "", null, $target, null, isset($ifcfg['nonat'])); - $natrule .= "\n"; + $natrules .= "\n"; } } endif; @@ -1622,6 +1624,7 @@ function filter_generate_user_rule($rule) { } } + $line = ""; /* exception(s) to a user rules can go here. */ /* rules with a gateway or pool should create another rule for routing to vpns */ if(($aline['route'] <> "") && (trim($aline['type']) == "pass") && strstr($dst, "any")) { diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index 6f72a65..6d71390 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -163,4 +163,5 @@ $sysctls = array("net.inet.ip.portrange.first" => "1024", "hw.bce.tso_enable" => "0" ); +$config_inc_loaded = false; ?> |