Commits (3)
......@@ -120,7 +120,7 @@ On macOS you can use this command to turn off the Apple version of NTP:
sudo launchctl unload /System/Library/LaunchDaemons/org.ntp.ntpd.plist
Under Mac OS X 10.6.8 (Snow Leopard) and proibably older versions, you
Under Mac OS X 10.6.8 (Snow Leopard) and probably older versions, you
may find that configuration fails with a message about -o being an
unknown option. This is due to a bad interaction with waf. To work
around this, find your waflib/Tools/ under the waf temporary
......@@ -139,16 +139,17 @@ def peer_detail(variables, showunits=False):
peerfmt = """\
unreach=%(unreach)d hmode=%(hmode)d pmode=%(pmode)d hpoll=%(hpoll)d \
ppoll=%(ppoll)d headway=%(headway)s flash=%(flash)s keyid=%(keyid)s
filtdelay = %(filtdelay)s
filtoffset = %(filtoffset)s
filtdisp = %(filtdisp)s
return peerfmt % vcopy
str = peerfmt % vcopy
return str.expandtabs()
class Fatal(Exception):
......@@ -1338,14 +1338,21 @@ class ControlSession:
def fetch_nonce(self):
Receive a nonce that can be replayed - combats source address spoofing
Ask for, and get, a nonce that can be replayed.
This combats source address spoofing
self.nonce_xmit = time.time()
if not self.response.startswith(polybytes("nonce=")):
print("## Nonce expected: %s" % self.response)
raise ControlException(SERR_BADNONCE)
return polystr(self.response.strip())
for i in range(3):
# retry 4 times
self.nonce_xmit = time.time()
if self.response.startswith(polybytes("nonce=")):
return polystr(self.response.strip())
# maybe a delay between tries?
# uh, oh, no nonce seen
# this print probably never can be seen...
print("## Nonce expected: %s" % self.response)
raise ControlException(SERR_BADNONCE)
def mrulist(self, variables=None, rawhook=None, direct=None):
"Retrieve MRU list data"