diff options
-rw-r--r-- | etc/inc/filter.inc | 6 | ||||
-rw-r--r-- | etc/inc/gwlb.inc | 14 | ||||
-rw-r--r-- | etc/inc/system.inc | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index f01faee..b842073 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -141,9 +141,9 @@ function filter_configure() { } function delete_states_for_down_gateways() { - global $config; - $a_gateways = return_gateways_array(); - foreach ($a_gateways as $gateway) { + global $config, $gateways_arr; + $gateways_arr = return_gateways_array(); + foreach ($gateways_arr as $gateway) { if($gateway['monitor'] == "down") { $int_ip = get_interface_ip($gateway['interface']); if($int_ip) diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 80cfc40..7e2c021 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -34,7 +34,7 @@ * creates monitoring configuration file */ function setup_gateways_monitor() { - global $config; + global $config, $gateways_arr; global $g; $gateways_arr = return_gateways_array(); if (!is_array($config['gateways']['gateway_item'])) @@ -243,7 +243,7 @@ EOD; /* return the status of the apinger targets as a array */ function return_gateways_status() { - global $config; + global $config, $gateways_arr; global $g; $gateways_arr = return_gateways_array(); @@ -282,7 +282,7 @@ function return_gateways_status() { /* Return all configured gateways on the system */ function return_gateways_array($disabled = false) { - global $config; + global $config, $gateways_arr; $gateways_arr = array(); @@ -365,7 +365,7 @@ function return_gateways_array($disabled = false) { * All gateway groups will be processed before returning the array. */ function return_gateway_groups_array() { - global $config, $g; + global $config, $g, $gateways_arr; /* fetch the current gateways status */ $gateways_status = return_gateways_status(); @@ -475,7 +475,7 @@ function dhclient_update_gateway_groups_defaultroute($interface = "wan") { } function lookup_gateway_ip_by_name($name) { - global $config; + global $config, $gateways_arr; $gateways_arr = return_gateways_array(); if (!empty($gateways_arr[$name])) { @@ -487,7 +487,7 @@ function lookup_gateway_ip_by_name($name) { } function lookup_gateway_monitor_ip_by_name($name) { - global $config; + global $config, $gateways_arr; $gateways_arr = return_gateways_array(); if (!empty($gateways_arr[$name])) { @@ -506,7 +506,7 @@ function lookup_gateway_monitor_ip_by_name($name) { } function lookup_gateway_interface_by_name($name) { - global $config; + global $config, $gateways_arr; $gateways_arr = return_gateways_array(); if (!empty($gateways_arr[$name])) { diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 6281a14..45a8e8c 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -248,7 +248,7 @@ function system_hostname_configure() { } function system_routing_configure() { - global $config, $g; + global $config, $g, $gateways_arr; if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "system_routing_configure() being called $mt\n"; @@ -1418,4 +1418,4 @@ function system_get_dmesg_boot() { return file_get_contents("{$g['varlog_path']}/dmesg.boot"); } -?>
\ No newline at end of file +?> |