From: Miroslav Lichvar Date: Mon, 12 Dec 2016 11:50:48 +0000 (+0100) Subject: cmdmon: add reserved fields to ntpdata reply X-Git-Tag: 3.0-pre2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fac1093ebf10f093fa0c5d7587011f8538671a72;p=thirdparty%2Fchrony.git cmdmon: add reserved fields to ntpdata reply This might be useful if ntpdata is changed to not require authorization and new fields need to be added without breaking compatibility. --- diff --git a/candm.h b/candm.h index 75425b92..ff17f428 100644 --- a/candm.h +++ b/candm.h @@ -672,6 +672,7 @@ typedef struct { uint32_t total_tx_count; uint32_t total_rx_count; uint32_t total_valid_count; + uint32_t reserved[4]; int32_t EOR; } RPY_NTPData; diff --git a/cmdmon.c b/cmdmon.c index cbfcdea4..00e9f4e2 100644 --- a/cmdmon.c +++ b/cmdmon.c @@ -1232,6 +1232,7 @@ handle_ntp_data(CMD_Request *rx_message, CMD_Reply *tx_message) tx_message->data.ntp_data.total_tx_count = htonl(report.total_tx_count); tx_message->data.ntp_data.total_rx_count = htonl(report.total_rx_count); tx_message->data.ntp_data.total_valid_count = htonl(report.total_valid_count); + memset(tx_message->data.ntp_data.reserved, 0xff, sizeof (tx_message->data.ntp_data.reserved)); } /* ================================================== */