Commit 1c1d4e07 authored by Franco Fichtner's avatar Franco Fichtner

relayd: iterate safely over monitor_type

parent 6a018ead
......@@ -108,10 +108,15 @@ function relayd_configure_do($kill_first = false)
} else {
$setting = array();
}
if (isset($config['load_balancer']['monitor_type']) && is_array($config['load_balancer']['monitor_type'])) {
$monitors_a = $config['load_balancer']['monitor_type'];
} else {
$monitors_a = array();
}
$check_a = array();
foreach ((array)$config['load_balancer']['monitor_type'] as $type) {
foreach ($monitors_a as $type) {
$type['options'] = isset($type['options']) ? $type['options'] : array();
switch($type['type']) {
case 'icmp':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment