[ntp:bugs] [Bug 1245] New: Broken xmt time sent in fast_xmit() of 4.2.5p187
Martin Burnicki via the NTP Bugzilla
bugzilla at ntp.org
Mon Jul 13 15:06:40 UTC 2009
http://bugs.ntp.org/1245
Summary: Broken xmt time sent in fast_xmit() of 4.2.5p187
Product: ntp
Version: 4.2.5
Platform: Other
OS/Version: N/A
Status: NEW
Severity: normal
Priority: P3
Component: ntpd
AssignedTo: stenn at ntp.org
ReportedBy: burnicki at ntp.org
CC: bugs at ntp.org
While running some tests to verify the fix for bug #1242 I stumbled across a
problem which has been introduced in p187.
The symptom was that ntpd p187 sends reply packets where the xmt timestamp is
broken. This did not happen in p186.
A quick look at the changes for p187 shows that in ntp_proto.c, in the
fast_xmit() function in line 3252 (at the end of the "else" part after "if
(flags & RES_KOD)" a line has been added to set the xmt timestamp in the reply
package from the xmt_tx variable:
HTONL_FP(&xmt_tx, &xpkt.xmt)
However, the xmt_tx variable is a local variable which has not been set in the
execution part before. get_systime(&xmt_tx) needs to be called before, similar
to other execution paths in fast_xmit().
The xmt timestamp in some of the reply packets looks OK at the first glance, so
the bug is not so obvious. I think this is when some previous value on the
stack has not been overwritten since an earlier all.
Martin
--
Martin Burnicki <burnicki at ntp.org>
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the bugs
mailing list