154359SrobertoName of the Application: xntp 254359Sroberto 354359SrobertoVersion Number: 4.0.91 454359Sroberto 554359SrobertoDownload Size: 4541953 bytes 654359Sroberto 754359SrobertoDownloaded from: http://www.eecis.udel.edu/~ntp/ 854359Sroberto 954359SrobertoOperating Systems Supported: many 1054359Sroberto 1154359SrobertoOperating Systems Tested: unix 1254359Sroberto 1354359SrobertoTesting 1454359Sroberto 1554359SrobertoDates tested (CPU clock set) 1654359Sroberto 1754359Sroberto 1999-12-31 1854359Sroberto 2000-01-01 1954359Sroberto 2000-02-29 2054359Sroberto 2154359Sroberto Critical fragments of code tested with other dates by special 2254359Sroberto algorithms. 2354359Sroberto 2454359SrobertoHardware Platform: Sun Sparc 2554359Sroberto 2654359SrobertoOS: Solaris 2.6 2754359Sroberto 2854359SrobertoCompiler: gcc 2954359Sroberto 3054359SrobertoVersion: 2.8.1 3154359Sroberto 3254359SrobertoRepairs: 9 3354359Sroberto 3454359SrobertoNo. of files Repaired: 13 3554359Sroberto 3654359Sroberto 3754359SrobertoCompilation of Patches Required: yes 3854359Sroberto 3954359SrobertoResults Description: 4054359Sroberto 4154359Sroberto1) Tested suspicious code. 4254359Sroberto 4354359Sroberto2) Repaired problem code and added documentation to ntp.h. 4454359Sroberto 4554359Sroberto3) Verified ntpd works on critical Y2K dates. 4654359Sroberto 4754359Sroberto 4854359SrobertoComments: 4954359Sroberto 5054359Sroberto1) Errors were found in improper use of tm_year within struct tm, 5154359Sroberto calculations that did not support year 2000 as a leap year 5254359Sroberto (it truly is, despite any unchanged comments remaining in 5354359Sroberto the NTP source), and some incorrect date calculations, while 5454359Sroberto not traditional Y2K errors, would break in the year 2000. 5554359Sroberto 5654359Sroberto2) include/ntpd.h 5754359Sroberto Added some definitions and documentation about the right way 5854359Sroberto of doing things. Definitions used by most, if not all, of 5954359Sroberto the Y2K repairs. 6054359Sroberto 6154359SrobertoCautions: 6254359Sroberto 6354359Sroberto1) Some of the Y2K repairs were to reference clock drivers that 6454359Sroberto we did not have the local hardware to test. While I believe 6554359Sroberto the changes are sound, they really need to be tested. 6654359Sroberto This includes: 6754359Sroberto 6854359Sroberto refclock_arc.c 6954359Sroberto refclock_heath.c 7054359Sroberto refclock_hpgps.c 7154359Sroberto 7254359Sroberto Also, parseutil/dcfd.c is another hardware dependent module that 7354359Sroberto was repaired without live testing. 7454359Sroberto 7554359SrobertoNon-Y2K Problems Observed: 7654359Sroberto 7754359Sroberto1) Inconsistent casts of variables containing time values may 7854359Sroberto make expansion to 64 bit integer values in a portable manner 7954359Sroberto difficult. 8054359Sroberto 8154359Sroberto2) libntp/caltontp.c: 8254359Sroberto Has logic I believe will fail starting in year 2100 or so. 8354359Sroberto Left unchanged/untested as it works well beyond basic NTP 2036 8454359Sroberto limit checked by check_y2k.c. 8554359Sroberto If NTP is implemented on 64-bit machines, this should be fixed 8654359Sroberto 8754359Sroberto3) ntpd/refclock_acts.c: 8854359Sroberto ACTS time format has changed somewhat since the code was written. 8954359Sroberto In particular the '*' '#' character switch no longer occurs... 9054359Sroberto only '*' is typed. 9154359Sroberto 9254359Sroberto NOTE: Author (falsely) stated Y2K is NOT a leap year when it 9354359Sroberto really is. 9454359Sroberto 9554359Sroberto TRUTH: ACTS will go beyond Y2K: it uses FourDigitYear % 100 values 9654359Sroberto for year so year 2000 will revert to "00". 9754359Sroberto 9854359Sroberto 9954359Sroberto4) ntpd/refclock_oncore.c 10054359Sroberto Some very strange logic in manipulating year values: 10154359Sroberto 1122 instance->pp->year = buf[6]*256+buf[7]; 10254359Sroberto Multiply by 256???? 10354359Sroberto 10454359Sroberto Response from PHK: 10554359Sroberto The entire protocol is binary, the year is a 16 bit quantity 10654359Sroberto which according to the manual can have the range 1998-2018. 10754359Sroberto 108