]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3527] fudgeval2 anomaly in mode7 clock info packet
authorJuergen Perlinger <perlinger@ntp.org>
Tue, 2 Oct 2018 15:38:18 +0000 (17:38 +0200)
committerJuergen Perlinger <perlinger@ntp.org>
Tue, 2 Oct 2018 15:38:18 +0000 (17:38 +0200)
bk: 5bb390eatI7s18i07bGSDWJUC3AOLw

ChangeLog
ntpd/ntp_request.c
ntpdc/ntpdc_ops.c

index f381a093cf948c1202162000eaf2d8abbf1a1dcf..87e6950614e0be2b8adbb198e3381701ea980d1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+---
+* [Bug 3527] fudgeval2 anomaly in mode7 clock info packet <perlinger@ntp.org>
+  - Found by Gerry Garvey. Can't be fixed without causing serious interop
+    issues. Left a comment to fix this in protocol version 5.
+
 ---
 (4.2.8p12) 2018/08/14 Released by Harlan Stenn <stenn@ntp.org>
 
index 19d9b0d829c52552311f38b97e01271d80c3f369..408a0f51d987fc290126a1e8bf3102c882232229 100644 (file)
@@ -2536,6 +2536,11 @@ get_clock_info(
                DTOLFP(clock_stat.fudgetime2, &ltmp);
                HTONL_FP(&ltmp, &ic->fudgetime2);
                ic->fudgeval1 = htonl((u_int32)clock_stat.fudgeval1);
+               /* [Bug3527] ist still there: ic->fudgeval2 is effectively
+                * host order here, since clockstat.fudgeval2 is already
+                * in network byte order! Needs fixing the whole chain,
+                * possibly in NTP protocol v5...
+                */
                ic->fudgeval2 = htonl(clock_stat.fudgeval2);
 
                free_varlist(clock_stat.kv_list);
index 586ed7f058827ea68a5d2993aa93d80b88fce558..9c60c30a2507b9c4e31ee6f8e132652ee56b4208 100644 (file)
@@ -2713,6 +2713,10 @@ again:
                               lfptoa(&ts, 6));
                (void) fprintf(fp, "stratum:              %ld\n",
                               (u_long)ntohl(cl->fudgeval1));
+               /* [Bug3527] ist still there: fudgeval2 is effectively
+                * host order here. Needs fixing the whole chain,
+                * possibly in NTP protocol v5...
+                */
                (void) fprintf(fp, "reference ID:         %s\n",
                               refid_string(ntohl(cl->fudgeval2), 0));
                (void) fprintf(fp, "fudge flags:          0x%x\n",