[ntpwg] peer flash bits

Harlan Stenn stenn at maccarony.ntp.org
Fri Mar 11 21:04:24 UTC 2005


In ntp3, the peer flash bits were:

#define TEST1           0x01    /* duplicate packet received */
#define TEST2           0x02    /* bogus packet received */
#define TEST3           0x04    /* protocol unsynchronized */
#define TEST4           0x08    /* peer delay/dispersion bounds check */
#define TEST5           0x10    /* peer authentication failed */
#define TEST6           0x20    /* peer clock unsynchronized */
#define TEST7           0x40    /* peer stratum out of bounds */
#define TEST8           0x80    /* root delay/dispersion bounds check */

In ntp4, the bits became:

#define TEST1           0x0001  /* duplicate packet received */
#define TEST2           0x0002  /* bogus packet received */
#define TEST3           0x0004  /* protocol unsynchronized */
#define TEST4           0x0008  /* access denied or crypto failure */
#define TEST5           0x0010  /* MAC error */
#define TEST6           0x0020  /* peer clock unsynchronized */
#define TEST7           0x0040  /* peer stratum out of bounds */
#define TEST8           0x0080  /* root delay/dispersion bounds check */
#define TEST9           0x0100  /* peer delay/dispersion bounds check */
#define TEST10          0x0200  /* autokey error */
#define TEST11          0x0400  /* protocol error */

It is Bad that peer delay/dispersion moved.  ntpq gets these values in
a hex field and there seems to be no version information in the packet to
indicate how the bits should be decoded.

Dave has just updated this code again and his new code has:

#define TEST1           0x0001  /* duplicate packet */
#define TEST2           0x0002  /* bogus packet */
#define TEST3           0x0004  /* invalid timestamp */
#define TEST4           0x0008  /* access denied */
#define TEST5           0x0010  /* authentication error */
#define TEST6           0x0020  /* peer not synchronized */
#define TEST7           0x0040  /* invalid distance */
#define TEST8           0x0080  /* autokey error */
#define TEST9           0x0100  /* crypto error */

and some of the bits have moved again.

I belive that this is Bad, as we have no way to properly decode the flash
condition.

I think we should:

- make the new bits backward-compatible to the extent possible.
- get version information into these packets
- consider having ntpd send back decoded strings instead of bit strings
  for mode 6 (and mode 7) requests

We're gonna need to advertise the current problem, as different versions
of ntpq will decode (at least) the flash value differently.

H


More information about the ntpwg mailing list