Hello tech@,

On receiving a packet with unsupported versions rdate(8) says
that "Received NTP version %u, need 4 or lower". This is not quite
true. Supported versions are 1, 2, 3, 4 and not 0.

Index: ntp.c
===================================================================
RCS file: /cvs/src/usr.sbin/rdate/ntp.c,v
retrieving revision 1.33
diff -u -p -r1.33 ntp.c
--- ntp.c       16 Jan 2015 06:40:20 -0000      1.33
+++ ntp.c       3 May 2017 10:26:10 -0000
@@ -347,8 +347,8 @@ retry:

        if (data->version < NTP_VERSION_MIN ||
            data->version > NTP_VERSION_MAX) {
-               warnx("Received NTP version %u, need %u or lower",
-                   data->version, NTP_VERSION);
+               warnx("Received NTP version %u, need at least %u or at most %u",
+                   data->version, NTP_VERSION_MIN, NTP_VERSION_MAX);
                return (1);
        }

Reply via email to