]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
nts: check for NTS NAK specifically when responding
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 2 Apr 2024 09:33:04 +0000 (11:33 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 2 Apr 2024 09:33:04 +0000 (11:33 +0200)
Ignore other KoD codes than NTS NAK when deciding if the server response
should not be authenticated.

nts_ntp_server.c

index be69a2baf24db2f778b421196e1887e4f9eeb8e6..5d46c29619b036584dccfc4875503f3e91a0d49b 100644 (file)
@@ -279,7 +279,7 @@ NNS_GenerateResponseAuth(NTP_Packet *request, NTP_PacketInfo *req_info,
   }
 
   /* NTS NAK response does not have any other fields */
-  if (kod)
+  if (kod == NTP_KOD_NTS_NAK)
     return 1;
 
   for (i = 0, plaintext_length = 0; i < server->num_cookies; i++) {