NTS update

Eric S. Raymond esr at thyrsus.com
Sat Mar 2 00:12:34 UTC 2019


Hal Murray <hmurray at megapathdsl.net>:
> [0 not showing up in ntpq -p t column for NTS clients.]
> 
> Eric said:
> > I'd fix this, but I'm not sure whether you're talking server or client side.
> 
> The problem is in ntpq.  Somebody returns 0 for slots that don't exist.  The 
> check for >= 0 needs to do a preliminary check to see if the slot exists.

That sounds like the problem is somewhere in this stretch of code, around
line 1110 of pylib/utils.py:

       elif hmode == ntp.magic.MODE_CLIENT:
            if PeerSummary.is_clock(variables):
                ptype = 'l'     # local refclock
            elif dstadr_refid == "POOL":
                ptype = 'p'     # pool
            elif srcadr.startswith("224."):
                ptype = 'a'     # manycastclient (compatibility with Classic)
            elif ntscookies > 0:
                # FIXME: Will foo up if there are ever more than 9 cookies
                ptype = chr(ntscookies + ord('0'))
            else:
                ptype = 'u'     # unicast

I've tried defaulting ntscookies to -1 and testing for > that - change pushed.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.




More information about the devel mailing list