[ntp:bugs] [Bug 1241] New: ntpd rejects LOCALCLOCK by synch loop check

Matsushita Kozo via the NTP Bugzilla bugzilla at ntp.org
Thu Jul 2 09:31:54 UTC 2009


http://bugs.ntp.org/1241

           Summary: ntpd rejects LOCALCLOCK by synch loop check
           Product: ntp
           Version: 4.2.4
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: ntpd
        AssignedTo: stenn at ntp.org
        ReportedBy: matsushita.kouz at jp.fujitsu.com
                CC: bugs at ntp.org


The problem occurs by NTP. NTP version is v4.2.4p0.

[problem]
The NTP client doesn't synchronize with the rebooting NTP server. 
The problem occurs by the following flows. 
1. The NTP server stops temporarily. 
2. The NTP client refers to local clock. 
3. The NTP server reboots. 
4. The NTP client doesn't synchronize though recognizes the NTP server. 

Then, I examined NTP Bugzilla, and found the article on Bugzilla Bug 514
(ntpd rejects local clock). 

The problem disappeared by the following corrections of synch loop(TEST12) of
ntp_proto.c that existed in this article. 

---------------------------------------------
in ntp_proto.c
    if (peer->stratum > 1 && peer->refid != htonl(LOOPBACKADR) && 
        (peer->refid == peer->dstadr->addr_refid || peer->refid ==
         sys_refid))
        rval |= TEST12;		/* synch loop */
----------------
    if (peer->stratum > 1 && peer->refid != htonl(LOOPBACKADR) &&
        peer->refclktype != REFCLK_LOCALCLOCK &&
        (peer->refid == peer->dstadr->addr_refid || peer->refid ==
         sys_refid))
        rval |= TEST12;		/* synch loop */
----------------------------------------------

Isn't this fix necessary?

Or, is it a mistake to transmit the packet by which the NTP server put 
local clock ID(127.127.1.0) in refid field?

Kozo.

-- 
Matsushita Kozo <matsushita.kouz at jp.fujitsu.com>



------- 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