From: Miroslav Lichvar Date: Tue, 14 May 2013 17:36:10 +0000 (+0200) Subject: Don't send uninitialized fields in dump and local requests X-Git-Tag: 1.28-pre1~80 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=52657945d80999359cef3b17e185f1abfb97590f;p=thirdparty%2Fchrony.git Don't send uninitialized fields in dump and local requests --- diff --git a/client.c b/client.c index ecaa819f..eadc430a 100644 --- 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);