[ntp:bk-ntp-stable-send] BitKeeper diffs

Harlan Stenn stenn at deacon.udel.edu
Wed Aug 18 05:17:58 UTC 2010


#### ChangeSet ####
2010-07-31 21:59:50+02:00, linus at beam.lund.zozs.se 
  [BUG 1597] packet processing ignores RATE KoD packets because of a bug in string comparison.

==== ChangeLog ====
2010-07-31 21:59:50+02:00, linus at beam.lund.zozs.se +5 -0
  [BUG 1597] packet processing ignores RATE KoD packets because of a bug in string comparison.

--- 1.646/ChangeLog	2010-07-08 22:25:55 -04:00
+++ 1.646.1.1/ChangeLog	2010-07-31 15:59:50 -04:00
@@ -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 at ntp.org>
 
 * [Bug 1581] size_t printf format string mismatches, IRIG string buffers

==== sntp/networking.c ====
2010-07-31 21:59:50+02:00, linus at beam.lund.zozs.se +3 -3
  [BUG 1597] packet processing ignores RATE KoD packets because of a bug in string comparison.

--- 1.35/sntp/networking.c	2010-05-13 11:39:46 -04:00
+++ 1.36/sntp/networking.c	2010-07-31 15:59:50 -04:00
@@ -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 */
 		}


More information about the bk-ntp-stable-send mailing list