mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:35:06 -05:00
Don't send uninitialized fields in dump and local requests
This commit is contained in:
2
client.c
2
client.c
@@ -545,6 +545,7 @@ static void
|
||||
process_cmd_dump(CMD_Request *msg, char *line)
|
||||
{
|
||||
msg->command = htons(REQ_DUMP);
|
||||
msg->data.dump.pad = htonl(0);
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
@@ -615,6 +616,7 @@ process_cmd_local(CMD_Request *msg, const char *line)
|
||||
return 0;
|
||||
} else if (!strncmp(p, "off", 3)) {
|
||||
msg->data.local.on_off = htonl(0);
|
||||
msg->data.local.stratum = htonl(0);
|
||||
} else if (sscanf(p, "stratum%d", &stratum) == 1) {
|
||||
msg->data.local.on_off = htonl(1);
|
||||
msg->data.local.stratum = htonl(stratum);
|
||||
|
||||
Reference in New Issue
Block a user