summaryrefslogtreecommitdiffstats
path: root/src/json.h
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2020-07-03 12:42:00 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-07-03 14:11:35 +0200
commit06af0c26f4c46088d8a6f97877f865527bcbc409 (patch)
treef4ba170d0be8a1192a4f23d8c85a5c103e1b2885 /src/json.h
parentd6789f1384eb515f7bbe0d25762ffb82567eec38 (diff)
#990 Use client broadcast address on WoL
Some universities have computers in a different subnet where the ogServer is, but ogServer WoL functionality only supported to send packet to its own subnets. This commit solves this. Now ogServer sends two WoL packets per client, one with the broadcast address of the interface indicated in the config file, the other with the broadcast address calculated with the address and netmask of the client. To ensure that the second WoL works correctly you must configure correctly the IP and netmask of the clients. Also, you have to configure the network of your organization to route WoL packet to the correct subnet.
Diffstat (limited to 'src/json.h')
-rw-r--r--src/json.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/json.h b/src/json.h
index 7c6c61c..ccc5097 100644
--- a/src/json.h
+++ b/src/json.h
@@ -53,6 +53,7 @@ struct og_sync_params {
struct og_msg_params {
const char *ips_array[OG_CLIENTS_MAX];
const char *mac_array[OG_CLIENTS_MAX];
+ const char *netmask_array[OG_CLIENTS_MAX];
unsigned int ips_array_len;
const char *wol_type;
char run_cmd[4096];