[Git][NTPsec/ntpsec][master] Remove obsolete comments about replay.
Eric S. Raymond
gitlab at mg.gitlab.com
Fri Sep 30 09:51:42 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
3d67f3cc by Eric S. Raymond at 2016-09-30T05:51:05-04:00
Remove obsolete comments about replay.
- - - - -
3 changed files:
- ntpd/ntp_io.c
- ntpd/ntp_monitor.c
- ntpd/ntp_proto.c
Changes:
=====================================
ntpd/ntp_io.c
=====================================
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -3242,10 +3242,6 @@ fetch_timestamp(
break;
#endif /* USE_SCM_TIMESTAMP */
}
- /*
- * RNG call does not have to be recorded for replay
- * because the fuzzed timestamp is recorded.
- */
fuzz = ntp_random() * 2. / FRAC * sys_fuzz;
DTOLFP(fuzz, &lfpfuzz);
L_ADD(&nts, &lfpfuzz);
@@ -3621,10 +3617,8 @@ input_handler(
#ifdef ENABLE_DEBUG_TIMING
get_systime(&ts_e);
/*
- * (ts_e - ts) is the amount of time we spent
- * processing this gob of file descriptors. Log
- * it. Because it's only used for logging, this
- * get_systime doesn't have to be captured/replayed.
+ * (ts_e - ts) is the amount of time we spent processing this
+ * gob of file descriptors. Log it.
*/
L_SUB(&ts_e, &ts);
collect_timing(NULL, "input handler", 1, &ts_e);
=====================================
ntpd/ntp_monitor.c
=====================================
--- a/ntpd/ntp_monitor.c
+++ b/ntpd/ntp_monitor.c
@@ -445,12 +445,7 @@ ntp_monitor(
if (NULL == mon_free)
mon_getmoremem();
UNLINK_HEAD_SLIST(mon, mon_free, hash_next);
- /*
- * Preempt from the MRU list if old enough.
- * Warning: this means that with monitoring enabled,
- * replay behavior will be nondeterministic. Alas.
- * Has to be this way for some unit tests to build.
- */
+ /* preempt from the MRU list if old enough. */
} else if (ntp_random() / (2.0 * FRAC) >
(double)oldest_age / mon_age) {
return ~(RES_LIMITED | RES_KOD) & flags;
=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -1355,8 +1355,7 @@ peer_clear(
} else {
/*
* Randomizing the next poll interval used to be done with
- * ntp_random(); this leads to replay-mode problems and is
- * unnecessary, any deterministic but uniformly
+ * ntp_random(); any deterministic but uniformly
* distributed function of the peer state would be good
* enough. Furthermore, changing the function creates no
* interop problems. For security reasons (to prevent
@@ -2729,10 +2728,6 @@ measure_tick_fuzz(void)
DTOLFP(MINSTEP, &minstep);
get_systime(&last);
for (i = 0; i < MAXLOOPS && changes < MINCHANGES; i++) {
- /*
- * Not intercepted because it's called a variable
- * number of times, which screws up replay.
- */
get_systime(&val);
ldiff = val;
L_SUB(&ldiff, &last);
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/3d67f3cc7d7f4ff9bffa67dcfe64e16d2801eb67
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160930/4ccd8e64/attachment.html>
More information about the vc
mailing list