]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Check in chronyc that command in reply is same as requested
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 12 Nov 2009 14:06:40 +0000 (15:06 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 12 Nov 2009 14:07:36 +0000 (15:07 +0100)
client.c

index 12578c8a43104083ee0016c70d82a569cbf2ceb9..0521d9b4bf65b296b8a9ea745988acaafe847569 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1320,7 +1320,8 @@ submit_request(CMD_Request *request, CMD_Reply *reply, int *reply_auth_ok)
         bad_header = ((reply->version != PROTO_VERSION_NUMBER) ||
                       (reply->pkt_type != PKT_TYPE_CMD_REPLY) ||
                       (reply->res1 != 0) ||
-                      (reply->res2 != 0));
+                      (reply->res2 != 0) ||
+                      (reply->command != request->command));
         
         if (bad_header) {
           n_attempts++;