]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[BUG 1597] packet processing ignores RATE KoD packets because of a bug in string...
authorLinux Karlsson <karlsson@ntp.org>
Sat, 31 Jul 2010 19:59:50 +0000 (21:59 +0200)
committerLinux Karlsson <karlsson@ntp.org>
Sat, 31 Jul 2010 19:59:50 +0000 (21:59 +0200)
bk: 4c5480b6mazP9IQmjii0VIeQx_vxcQ

ChangeLog
sntp/networking.c

index 16e4f976079515e458c0559e936fc02938bb2670..3e2f88ded45c592e5f4caca7ec5bc09873f35e80 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
 ---
+
+* [Bug 1597] packet processing ignores RATE KoD packets, because of
+  a bug in string comparison.
+
+---
 (4.2.6p2) 2010/07/09 Released by Harlan Stenn <stenn@ntp.org>
 
 * [Bug 1581] size_t printf format string mismatches, IRIG string buffers
index 92b699cc6f73b78c43b75ed155fc7095ca94465a..ff9afa13e79468efe8f132c8bf13bd90b5c626d2 100644 (file)
@@ -410,11 +410,11 @@ unusable:
                               ref_char[0], ref_char[1], ref_char[2], ref_char[3]);
                /* If it's a KOD packet we'll just use the KOD information */
                if (ref_char[0] != 'X') {
-                       if (strncmp(ref_char, "DENY", 4))
+                       if (strncmp(ref_char, "DENY", 4) == 0)
                                return KOD_DEMOBILIZE;
-                       if (strncmp(ref_char, "RSTR", 4))
+                       if (strncmp(ref_char, "RSTR", 4) == 0)
                                return KOD_DEMOBILIZE;
-                       if (strncmp(ref_char, "RATE", 4))
+                       if (strncmp(ref_char, "RATE", 4) == 0)
                                return KOD_RATE;
                        /* There are other interesting kiss codes which might be interesting for authentication */
                }