From: Juergen Perlinger Date: Tue, 2 Oct 2018 15:38:18 +0000 (+0200) Subject: [Bug 3527] fudgeval2 anomaly in mode7 clock info packet X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8cb66ab6bcaab380a9f2825b1c35456d29f01f2;p=thirdparty%2Fntp.git [Bug 3527] fudgeval2 anomaly in mode7 clock info packet bk: 5bb390eatI7s18i07bGSDWJUC3AOLw --- diff --git a/ChangeLog b/ChangeLog index f381a093c..87e695061 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +--- +* [Bug 3527] fudgeval2 anomaly in mode7 clock info packet + - 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 diff --git a/ntpd/ntp_request.c b/ntpd/ntp_request.c index 19d9b0d82..408a0f51d 100644 --- a/ntpd/ntp_request.c +++ b/ntpd/ntp_request.c @@ -2536,6 +2536,11 @@ get_clock_info( DTOLFP(clock_stat.fudgetime2, <mp); HTONL_FP(<mp, &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); diff --git a/ntpdc/ntpdc_ops.c b/ntpdc/ntpdc_ops.c index 586ed7f05..9c60c30a2 100644 --- a/ntpdc/ntpdc_ops.c +++ b/ntpdc/ntpdc_ops.c @@ -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",