summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2022-01-31 15:29:21 +0100
committerSimon Rettberg2022-01-31 15:29:21 +0100
commita3739e1a65227dbc5cbb559a9d4639dfdbc6f3b2 (patch)
treeecfe78f7e4380c394ee581c5ec41a84db5b165ee
parent[rebootcontrol] Adapt do new WakeOnLan task (diff)
downloadslx-admin-a3739e1a65227dbc5cbb559a9d4639dfdbc6f3b2.tar.gz
slx-admin-a3739e1a65227dbc5cbb559a9d4639dfdbc6f3b2.tar.xz
slx-admin-a3739e1a65227dbc5cbb559a9d4639dfdbc6f3b2.zip
[rebootcontrol] IP is supposed to be broadcast address in this context
-rw-r--r--modules-available/rebootcontrol/inc/rebootcontrol.inc.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php
index 4883ea04..99e8a4cf 100644
--- a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php
+++ b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php
@@ -333,11 +333,6 @@ class RebootControl
$taskClients = []; // array of arrays with keys [ip, mac, methods]
$taskSsh = []; // SSH configs for task, array of arrays with keys [username, sshkey, ip, port, command]
foreach ($clientList as $client) {
- $c = [
- 'ip' => $client['clientip'],
- 'mac' => $client['macaddr'],
- 'methods' => [],
- ];
$ip = sprintf('%u', ip2long($client['clientip'])); // 32Bit snprintf
unset($subnet);
$subnet = false;
@@ -351,6 +346,11 @@ class RebootControl
$unknown[] = $client;
continue;
}
+ $c = [
+ 'ip' => long2ip($subnet['end']),
+ 'mac' => $client['macaddr'],
+ 'methods' => [],
+ ];
self::findMachinesForSubnet($subnet);
// Highest priority - clients in same subnet, no directed broadcast
// required, should be most reliable