Buggy WNRO fixup

Hal Murray halmurray at sonic.net
Thu Dec 23 03:15:32 UTC 2021


[The lists have a 2 day delay.  Please be sure to cc me if you have anything 
helpful to contribute.]

The code is in ntpd/ntp_wrapdate.c

Is anybody familiar with that code?  I've looked a bit but haven't figured out 
what is supposed to happen and/or what is going wrong.

Does anybody have a device where that code is working correctly?  It seems a 
bit strange that I'm the first one to try it so I'm wondering what I'm doing 
that's different/interesting.


The code has a useful logging message, but that got lost with the date jumping 
around.  logrotate moved the log file where I was looking out from under me.

20 Dec 12:22:32 ntpd[40363]: NMEA(1) Changed GPS epoch warp to -4096 weeks

>From clockstats:
60252 73357.789 127.127.20.1 $GPRMC,202237.000,A,3726.0794,N,12212.2674,W,0.00,
300.06,060502,,,A*71
60252 73421.789 127.127.20.1 $GPRMC,202341.000,A,3726.0892,N,12212.2540,W,0.00,
93.98,060502,,,A*42

The "02" in 060502 is the year.  That's about 20 years ago.  I haven't figured 
out if it has wrapped once or twice but 4 is clearly wrong.

The bad date is Nov  4  2023. 1024 weeks is 19.6 years.  Mid 2002 +19.6 is 
late 2021 or early 2022.  So we are close to the border between 1 and 2.  
There is some fudging in the code that may be getting confused in that case.





-- 
These are my opinions.  I hate spam.





More information about the devel mailing list