[PATCH] Fix the "NTPv7" version mangling in ntpd.

Frank TEO frank128 at ymail.com
Wed Jan 9 09:27:39 UTC 2013


I am using ntpdate-4.2.6p3-4 from Fedora 15.
I am using busybox ntpd with "-l" option.

Before applying this NTPv7 patch. ntpdate do not accept busybox ntpd response.
$ ntpdate -p 1 -q 192.168.1.10
server 192.168.1.10, stratum 0, offset 0.000000, delay 0.00000
 9 Jan 16:12:32 ntpdate[29662]: no server suitable for synchronization found 

Using Wireshark to capture network traffic between ntpdate and busybox ntpd, 
I could see that the "Flags" for NTP is equal to 0x3c.
Version number: 7

After applying this patch. The "Flags" become 0x24. Version number become 4.
Now ntpdate is willing to accept busybox ntpd response.
$ ntpdate -p 1 -q 192.168.1.10
server 192.168.1.10, stratum 4, offset -0.009547, delay 0.02811
 9 Jan 17:03:44 ntpdate[12941]: adjust time server 192.168.1.10 offset -0.009547 sec


Regards
Frank TEO



More information about the busybox mailing list