[Git][NTPsec/ntpsec][master] Restore an awful crock in ntp_control.c that turned out to be functional.
Eric S. Raymond
gitlab at mg.gitlab.com
Tue Jan 29 22:51:26 UTC 2019
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
a1d90d36 by Eric S. Raymond at 2019-01-29T22:50:37Z
Restore an awful crock in ntp_control.c that turned out to be functional.
- - - - -
1 changed file:
- ntpd/ntp_control.c
Changes:
=====================================
ntpd/ntp_control.c
=====================================
@@ -26,6 +26,7 @@
#include "lib_strbuf.h"
#include "ntp_syscall.h"
#include "ntp_auth.h"
+#include "ntp_endian.h"
#include "timespecops.h"
/* undefine to suppress random tags and get fixed emission order */
@@ -2435,15 +2436,16 @@ ctl_putclock(
break;
case CC_FUDGEVAL2:
- /*
- * ESR: NTP Classic sometimes shipped this as a refid string,
- * which seems wrong. If you need to look at that code,
- * any version of NTP Classic or NTPsec before January
- * 2019 has it that way.
- */
+ /* Yes, the clocl refid is passed as a 32 bit in fudgeval2 */
if (mustput || (pcs->haveflags & CLK_HAVEVAL2)) {
- ctl_putint(clock_var[id].text,
- pcs->fudgeval2);
+ refid_t stringized;
+ ntp_be32enc(stringized, pcs->fudgeval2);
+ if (pcs->fudgeval1 > 1)
+ ctl_putadr(clock_var[id].text,
+ &stringized, NULL);
+ else
+ ctl_putrefid(clock_var[id].text,
+ stringized);
}
break;
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a1d90d36cd6e74fa9b1320a02894a5fd9ac67d87
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a1d90d36cd6e74fa9b1320a02894a5fd9ac67d87
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190129/8364db4c/attachment-0001.html>
More information about the vc
mailing list