]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Don't send uninitialized fields in dump and local requests
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 14 May 2013 17:36:10 +0000 (19:36 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 15 May 2013 09:02:53 +0000 (11:02 +0200)
client.c

index ecaa819f8416c94cc531232a809d2c8fb0612e20..eadc430af361f59caba6bb6535bcc53605a3ca6c 100644 (file)
--- a/client.c
+++ b/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);