1*abb0f93cSkardelName of the Application: xntp 2*abb0f93cSkardel 3*abb0f93cSkardelVersion Number: 4.0.91 4*abb0f93cSkardel 5*abb0f93cSkardelDownload Size: 4541953 bytes 6*abb0f93cSkardel 7*abb0f93cSkardelDownloaded from: http://www.eecis.udel.edu/~ntp/ 8*abb0f93cSkardel 9*abb0f93cSkardelOperating Systems Supported: many 10*abb0f93cSkardel 11*abb0f93cSkardelOperating Systems Tested: unix 12*abb0f93cSkardel 13*abb0f93cSkardelTesting 14*abb0f93cSkardel 15*abb0f93cSkardelDates tested (CPU clock set) 16*abb0f93cSkardel 17*abb0f93cSkardel 1999-12-31 18*abb0f93cSkardel 2000-01-01 19*abb0f93cSkardel 2000-02-29 20*abb0f93cSkardel 21*abb0f93cSkardel Critical fragments of code tested with other dates by special 22*abb0f93cSkardel algorithms. 23*abb0f93cSkardel 24*abb0f93cSkardelHardware Platform: Sun Sparc 25*abb0f93cSkardel 26*abb0f93cSkardelOS: Solaris 2.6 27*abb0f93cSkardel 28*abb0f93cSkardelCompiler: gcc 29*abb0f93cSkardel 30*abb0f93cSkardelVersion: 2.8.1 31*abb0f93cSkardel 32*abb0f93cSkardelRepairs: 9 33*abb0f93cSkardel 34*abb0f93cSkardelNo. of files Repaired: 13 35*abb0f93cSkardel 36*abb0f93cSkardel 37*abb0f93cSkardelCompilation of Patches Required: yes 38*abb0f93cSkardel 39*abb0f93cSkardelResults Description: 40*abb0f93cSkardel 41*abb0f93cSkardel1) Tested suspicious code. 42*abb0f93cSkardel 43*abb0f93cSkardel2) Repaired problem code and added documentation to ntp.h. 44*abb0f93cSkardel 45*abb0f93cSkardel3) Verified ntpd works on critical Y2K dates. 46*abb0f93cSkardel 47*abb0f93cSkardel 48*abb0f93cSkardelComments: 49*abb0f93cSkardel 50*abb0f93cSkardel1) Errors were found in improper use of tm_year within struct tm, 51*abb0f93cSkardel calculations that did not support year 2000 as a leap year 52*abb0f93cSkardel (it truly is, despite any unchanged comments remaining in 53*abb0f93cSkardel the NTP source), and some incorrect date calculations, while 54*abb0f93cSkardel not traditional Y2K errors, would break in the year 2000. 55*abb0f93cSkardel 56*abb0f93cSkardel2) include/ntpd.h 57*abb0f93cSkardel Added some definitions and documentation about the right way 58*abb0f93cSkardel of doing things. Definitions used by most, if not all, of 59*abb0f93cSkardel the Y2K repairs. 60*abb0f93cSkardel 61*abb0f93cSkardelCautions: 62*abb0f93cSkardel 63*abb0f93cSkardel1) Some of the Y2K repairs were to reference clock drivers that 64*abb0f93cSkardel we did not have the local hardware to test. While I believe 65*abb0f93cSkardel the changes are sound, they really need to be tested. 66*abb0f93cSkardel This includes: 67*abb0f93cSkardel 68*abb0f93cSkardel refclock_arc.c 69*abb0f93cSkardel refclock_heath.c 70*abb0f93cSkardel refclock_hpgps.c 71*abb0f93cSkardel 72*abb0f93cSkardel Also, parseutil/dcfd.c is another hardware dependent module that 73*abb0f93cSkardel was repaired without live testing. 74*abb0f93cSkardel 75*abb0f93cSkardelNon-Y2K Problems Observed: 76*abb0f93cSkardel 77*abb0f93cSkardel1) Inconsistent casts of variables containing time values may 78*abb0f93cSkardel make expansion to 64 bit integer values in a portable manner 79*abb0f93cSkardel difficult. 80*abb0f93cSkardel 81*abb0f93cSkardel2) libntp/caltontp.c: 82*abb0f93cSkardel Has logic I believe will fail starting in year 2100 or so. 83*abb0f93cSkardel Left unchanged/untested as it works well beyond basic NTP 2036 84*abb0f93cSkardel limit checked by check_y2k.c. 85*abb0f93cSkardel If NTP is implemented on 64-bit machines, this should be fixed 86*abb0f93cSkardel 87*abb0f93cSkardel3) ntpd/refclock_acts.c: 88*abb0f93cSkardel ACTS time format has changed somewhat since the code was written. 89*abb0f93cSkardel In particular the '*' '#' character switch no longer occurs... 90*abb0f93cSkardel only '*' is typed. 91*abb0f93cSkardel 92*abb0f93cSkardel NOTE: Author (falsely) stated Y2K is NOT a leap year when it 93*abb0f93cSkardel really is. 94*abb0f93cSkardel 95*abb0f93cSkardel TRUTH: ACTS will go beyond Y2K: it uses FourDigitYear % 100 values 96*abb0f93cSkardel for year so year 2000 will revert to "00". 97*abb0f93cSkardel 98*abb0f93cSkardel 99*abb0f93cSkardel4) ntpd/refclock_oncore.c 100*abb0f93cSkardel Some very strange logic in manipulating year values: 101*abb0f93cSkardel 1122 instance->pp->year = buf[6]*256+buf[7]; 102*abb0f93cSkardel Multiply by 256???? 103*abb0f93cSkardel 104*abb0f93cSkardel Response from PHK: 105*abb0f93cSkardel The entire protocol is binary, the year is a 16 bit quantity 106*abb0f93cSkardel which according to the manual can have the range 1998-2018. 107*abb0f93cSkardel 108