]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Merge branch '1.29-security'
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 31 Jan 2014 16:06:08 +0000 (17:06 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 31 Jan 2014 16:06:08 +0000 (17:06 +0100)
1  2 
candm.h
client.c
cmdmon.c

diff --cc candm.h
Simple merge
diff --cc client.c
index 467bfdd265309f7cbd227e7f72f62437b8158d0c,e0b3525aab3fe9d2d52418f865664ad299c9f975..1aaf714d094fabd62a2dfe8c495ebc2ba33386df
+++ b/client.c
@@@ -1416,11 -1421,25 +1422,24 @@@ submit_request(CMD_Request *request, CM
            continue;
          }
          
+ #if PROTO_VERSION_NUMBER == 6
+         /* Protocol version 5 is similar to 6 except there is no padding.
+            If a version 5 reply with STT_BADPKTVERSION is received,
+            switch our version and try again. */
+         if (proto_version == PROTO_VERSION_NUMBER &&
+             reply->version == PROTO_VERSION_NUMBER - 1) {
+           proto_version = PROTO_VERSION_NUMBER - 1;
+           continue;
+         }
+ #else
+ #error unknown compatibility with PROTO_VERSION - 1
+ #endif
          /* Good packet received, print out results */
  #if 0
 -        printf("Reply cmd=%d reply=%d stat=%d num=%d tot=%d seq=%d utok=%08lx tok=%d\n",
 +        printf("Reply cmd=%d reply=%d stat=%d seq=%d utok=%08lx tok=%d\n",
                 ntohs(reply->command), ntohs(reply->reply),
 -               ntohs(reply->status), ntohs(reply->number),
 -               ntohs(reply->total),
 +               ntohs(reply->status),
                 ntohl(reply->sequence),
                 ntohl(reply->utoken),
                 ntohl(reply->token));
diff --cc cmdmon.c
Simple merge