Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ntp resolve conflicts



details:   https://anonhg.NetBSD.org/src/rev/1c4fc67db4ba
branches:  trunk
changeset: 345653:1c4fc67db4ba
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jun 03 20:39:02 2016 +0000

description:
resolve conflicts

diffstat:

 external/bsd/ntp/dist/include/ntp.h            |     3 +-
 external/bsd/ntp/dist/ntpd/keyword-gen.c       |     5 +-
 external/bsd/ntp/dist/ntpd/ntp_config.c        |    10 +-
 external/bsd/ntp/dist/ntpd/ntp_io.c            |    84 +-
 external/bsd/ntp/dist/ntpd/ntp_keyword.h       |  1199 ++++++++++++-----------
 external/bsd/ntp/dist/ntpd/ntp_parser.y        |     4 +-
 external/bsd/ntp/dist/ntpd/ntp_proto.c         |   221 +++-
 external/bsd/ntp/dist/ntpd/ntpd-opts.c         |    16 +-
 external/bsd/ntp/dist/ntpd/ntpd-opts.h         |     8 +-
 external/bsd/ntp/dist/ntpd/refclock_parse.c    |    14 +-
 external/bsd/ntp/dist/ntpdc/ntpdc-opts.c       |    16 +-
 external/bsd/ntp/dist/ntpdc/ntpdc-opts.h       |     8 +-
 external/bsd/ntp/dist/ntpdc/ntpdc.c            |     6 +-
 external/bsd/ntp/dist/ntpq/ntpq-opts.c         |    16 +-
 external/bsd/ntp/dist/ntpq/ntpq-opts.h         |     8 +-
 external/bsd/ntp/dist/ntpq/ntpq.c              |     9 +-
 external/bsd/ntp/dist/ntpsnmpd/ntpsnmpd-opts.c |    16 +-
 external/bsd/ntp/dist/ntpsnmpd/ntpsnmpd-opts.h |     8 +-
 external/bsd/ntp/dist/sntp/sntp-opts.c         |    16 +-
 external/bsd/ntp/dist/sntp/sntp-opts.h         |     8 +-
 external/bsd/ntp/dist/util/ntp-keygen-opts.c   |    16 +-
 external/bsd/ntp/dist/util/ntp-keygen-opts.h   |     8 +-
 external/bsd/ntp/importdate                    |     2 +-
 external/bsd/ntp/include/config.h              |     6 +-
 external/bsd/ntp/scripts/mkver                 |     2 +-
 25 files changed, 926 insertions(+), 783 deletions(-)

diffs (truncated from 2619 to 300 lines):

diff -r 1423c2f609c0 -r 1c4fc67db4ba external/bsd/ntp/dist/include/ntp.h
--- a/external/bsd/ntp/dist/include/ntp.h       Fri Jun 03 20:19:08 2016 +0000
+++ b/external/bsd/ntp/dist/include/ntp.h       Fri Jun 03 20:39:02 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntp.h,v 1.6 2016/05/01 23:32:00 christos Exp $ */
+/*     $NetBSD: ntp.h,v 1.7 2016/06/03 20:39:02 christos Exp $ */
 
 /*
  * ntp.h - NTP definitions for the masses
@@ -725,6 +725,7 @@
 #define        PROTO_UECRYPTO          29
 #define        PROTO_UECRYPTONAK       30
 #define        PROTO_UEDIGEST          31
+#define        PROTO_PCEDIGEST         32
 
 /*
  * Configuration items for the loop filter
diff -r 1423c2f609c0 -r 1c4fc67db4ba external/bsd/ntp/dist/ntpd/keyword-gen.c
--- a/external/bsd/ntp/dist/ntpd/keyword-gen.c  Fri Jun 03 20:19:08 2016 +0000
+++ b/external/bsd/ntp/dist/ntpd/keyword-gen.c  Fri Jun 03 20:39:02 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: keyword-gen.c,v 1.9 2016/05/01 23:32:00 christos Exp $ */
+/*     $NetBSD: keyword-gen.c,v 1.10 2016/06/03 20:39:02 christos Exp $        */
 
 /*
  * keyword-gen.c -- generate keyword scanner finite state machine and
@@ -201,8 +201,9 @@
 { "bclient",           T_Bclient,              FOLLBY_TOKEN },
 { "calibrate",         T_Calibrate,            FOLLBY_TOKEN },
 { "kernel",            T_Kernel,               FOLLBY_TOKEN },
+{ "mode7",             T_Mode7,                FOLLBY_TOKEN },
 { "ntp",               T_Ntp,                  FOLLBY_TOKEN },
-{ "mode7",             T_Mode7,                FOLLBY_TOKEN },
+{ "peer_clear_digest_early",   T_PCEdigest,    FOLLBY_TOKEN },
 { "stats",             T_Stats,                FOLLBY_TOKEN },
 { "unpeer_crypto_early",       T_UEcrypto,     FOLLBY_TOKEN },
 { "unpeer_crypto_nak_early",   T_UEcryptonak,  FOLLBY_TOKEN },
diff -r 1423c2f609c0 -r 1c4fc67db4ba external/bsd/ntp/dist/ntpd/ntp_config.c
--- a/external/bsd/ntp/dist/ntpd/ntp_config.c   Fri Jun 03 20:19:08 2016 +0000
+++ b/external/bsd/ntp/dist/ntpd/ntp_config.c   Fri Jun 03 20:39:02 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntp_config.c,v 1.14 2016/05/01 23:32:00 christos Exp $ */
+/*     $NetBSD: ntp_config.c,v 1.15 2016/06/03 20:39:02 christos Exp $ */
 
 /* ntp_config.c
  *
@@ -2973,12 +2973,16 @@
                        proto_config(PROTO_MONITOR, enable, 0., NULL);
                        break;
 
+               case T_Mode7:
+                       proto_config(PROTO_MODE7, enable, 0., NULL);
+                       break;
+
                case T_Ntp:
                        proto_config(PROTO_NTP, enable, 0., NULL);
                        break;
 
-               case T_Mode7:
-                       proto_config(PROTO_MODE7, enable, 0., NULL);
+               case T_PCEdigest:
+                       proto_config(PROTO_PCEDIGEST, enable, 0., NULL);
                        break;
 
                case T_Stats:
diff -r 1423c2f609c0 -r 1c4fc67db4ba external/bsd/ntp/dist/ntpd/ntp_io.c
--- a/external/bsd/ntp/dist/ntpd/ntp_io.c       Fri Jun 03 20:19:08 2016 +0000
+++ b/external/bsd/ntp/dist/ntpd/ntp_io.c       Fri Jun 03 20:39:02 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntp_io.c,v 1.22 2016/05/01 23:32:00 christos Exp $     */
+/*     $NetBSD: ntp_io.c,v 1.23 2016/06/03 20:39:02 christos Exp $     */
 
 /*
  * ntp_io.c - input/output routines for ntpd.  The socket-opening code
@@ -3328,15 +3328,6 @@
        )
 {
        struct cmsghdr *        cmsghdr;
-#ifdef HAVE_BINTIME
-       struct bintime *        btp;
-#endif
-#ifdef HAVE_TIMESTAMPNS
-       struct timespec *       tsp;
-#endif
-#ifdef HAVE_TIMESTAMP
-       struct timeval *        tvp;
-#endif
        unsigned long           ticks;
        double                  fuzz;
        l_fp                    lfpfuzz;
@@ -3363,49 +3354,58 @@
                        {
 #ifdef HAVE_BINTIME
                        case SCM_BINTIME:
-                               btp = (struct bintime *)CMSG_DATA(cmsghdr);
-                               /*
-                                * bintime documentation is at http://phk.freebsd.dk/pubs/timecounter.pdf
-                                */
-                               nts.l_i = btp->sec + JAN_1970;
-                               nts.l_uf = (u_int32)(btp->frac >> 32);
-                               if (sys_tick > measured_tick &&
-                                   sys_tick > 1e-9) {
-                                       ticks = (unsigned long)(nts.l_uf / (unsigned long)(sys_tick * FRAC));
-                                       nts.l_uf = (unsigned long)(ticks * (unsigned long)(sys_tick * FRAC));
+                               {
+                                       struct bintime  pbt;
+                                       memcpy(&pbt, CMSG_DATA(cmsghdr), sizeof(pbt));
+                                       /*
+                                        * bintime documentation is at http://phk.freebsd.dk/pubs/timecounter.pdf
+                                        */
+                                       nts.l_i = pbt.sec + JAN_1970;
+                                       nts.l_uf = (u_int32)(pbt.frac >> 32);
+                                       if (sys_tick > measured_tick &&
+                                           sys_tick > 1e-9) {
+                                               ticks = (unsigned long)(nts.l_uf / (unsigned long)(sys_tick * FRAC));
+                                               nts.l_uf = (unsigned long)(ticks * (unsigned long)(sys_tick * FRAC));
+                                       }
+                                       DPRINTF(4, ("fetch_timestamp: system bintime network time stamp: %ld.%09lu\n",
+                                                   pbt.sec, (unsigned long)((nts.l_uf / FRAC) * 1e9)));
                                }
-                                DPRINTF(4, ("fetch_timestamp: system bintime network time stamp: %ld.%09lu\n",
-                                            btp->sec, (unsigned long)((nts.l_uf / FRAC) * 1e9)));
                                break;
 #endif  /* HAVE_BINTIME */
 #ifdef HAVE_TIMESTAMPNS
                        case SCM_TIMESTAMPNS:
-                               tsp = UA_PTR(struct timespec, CMSG_DATA(cmsghdr));
-                               if (sys_tick > measured_tick &&
-                                   sys_tick > 1e-9) {
-                                       ticks = (unsigned long)((tsp->tv_nsec * 1e-9) /
-                                                      sys_tick);
-                                       tsp->tv_nsec = (long)(ticks * 1e9 *
-                                                             sys_tick);
+                               {
+                                       struct timespec pts;
+                                       memcpy(&pts, CMSG_DATA(cmsghdr), sizeof(pts));
+                                       if (sys_tick > measured_tick &&
+                                           sys_tick > 1e-9) {
+                                               ticks = (unsigned long)((pts.tv_nsec * 1e-9) /
+                                                                       sys_tick);
+                                               pts.tv_nsec = (long)(ticks * 1e9 *
+                                                                    sys_tick);
+                                       }
+                                       DPRINTF(4, ("fetch_timestamp: system nsec network time stamp: %ld.%09ld\n",
+                                                   pts.tv_sec, pts.tv_nsec));
+                                       nts = tspec_stamp_to_lfp(pts);
                                }
-                               DPRINTF(4, ("fetch_timestamp: system nsec network time stamp: %ld.%09ld\n",
-                                           tsp->tv_sec, tsp->tv_nsec));
-                               nts = tspec_stamp_to_lfp(*tsp);
                                break;
 #endif /* HAVE_TIMESTAMPNS */
 #ifdef HAVE_TIMESTAMP
                        case SCM_TIMESTAMP:
-                               tvp = (struct timeval *)CMSG_DATA(cmsghdr);
-                               if (sys_tick > measured_tick &&
-                                   sys_tick > 1e-6) {
-                                       ticks = (unsigned long)((tvp->tv_usec * 1e-6) /
-                                                      sys_tick);
-                                       tvp->tv_usec = (long)(ticks * 1e6 *
-                                                             sys_tick);
+                               {
+                                       struct timeval  ptv;
+                                       memcpy(&ptv, CMSG_DATA(cmsghdr), sizeof(ptv));
+                                       if (sys_tick > measured_tick &&
+                                           sys_tick > 1e-6) {
+                                               ticks = (unsigned long)((ptv.tv_usec * 1e-6) /
+                                                                       sys_tick);
+                                               ptv.tv_usec = (long)(ticks * 1e6 *
+                                                                   sys_tick);
+                                       }
+                                       DPRINTF(4, ("fetch_timestamp: system usec network time stamp: %jd.%06ld\n",
+                                                   (intmax_t)ptv.tv_sec, (long)ptv.tv_usec));
+                                       nts = tval_stamp_to_lfp(ptv);
                                }
-                               DPRINTF(4, ("fetch_timestamp: system usec network time stamp: %jd.%06ld\n",
-                                           (intmax_t)tvp->tv_sec, (long)tvp->tv_usec));
-                               nts = tval_stamp_to_lfp(*tvp);
                                break;
 #endif  /* HAVE_TIMESTAMP */
                        }
diff -r 1423c2f609c0 -r 1c4fc67db4ba external/bsd/ntp/dist/ntpd/ntp_keyword.h
--- a/external/bsd/ntp/dist/ntpd/ntp_keyword.h  Fri Jun 03 20:19:08 2016 +0000
+++ b/external/bsd/ntp/dist/ntpd/ntp_keyword.h  Fri Jun 03 20:39:02 2016 +0000
@@ -1,8 +1,9 @@
+/*     $NetBSD: ntp_keyword.h,v 1.11 2016/06/03 20:39:02 christos Exp $        */
 /*
  * ntp_keyword.h
  * 
  * NOTE: edit this file with caution, it is generated by keyword-gen.c
- *      Generated 2016-05-01 17:15:52 UTC        diff_ignore_line
+ *      Generated 2016-06-03 20:34:30 UTC        diff_ignore_line
  *
  */
 #include "ntp_scanner.h"
@@ -10,7 +11,7 @@
 
 #define LOWEST_KEYWORD_ID 257
 
-const char * const keyword_text[194] = {
+const char * const keyword_text[195] = {
        /* 0       257                  257 */  "abbrev",
        /* 1       258                  258 */  "age",
        /* 2       259                  259 */  "all",
@@ -133,83 +134,84 @@
        /* 119     376                  376 */  "ntpsigndsocket",
        /* 120     377                  377 */  "orphan",
        /* 121     378                  378 */  "orphanwait",
-       /* 122     379                  379 */  "panic",
-       /* 123     380                  380 */  "peer",
-       /* 124     381                  381 */  "peerstats",
-       /* 125     382                  382 */  "phone",
-       /* 126     383                  383 */  "pid",
-       /* 127     384                  384 */  "pidfile",
-       /* 128     385                  385 */  "pool",
-       /* 129     386                  386 */  "port",
-       /* 130     387                  387 */  "preempt",
-       /* 131     388                  388 */  "prefer",
-       /* 132     389                  389 */  "protostats",
-       /* 133     390                  390 */  "pw",
-       /* 134     391                  391 */  "randfile",
-       /* 135     392                  392 */  "rawstats",
-       /* 136     393                  393 */  "refid",
-       /* 137     394                  394 */  "requestkey",
-       /* 138     395                  395 */  "reset",
-       /* 139     396                  396 */  "restrict",
-       /* 140     397                  397 */  "revoke",
-       /* 141     398                  398 */  "rlimit",
-       /* 142     399                  399 */  "saveconfigdir",
-       /* 143     400                  400 */  "server",
-       /* 144     401                  401 */  "setvar",
-       /* 145     402                  402 */  "source",
-       /* 146     403                  403 */  "stacksize",
-       /* 147     404                  404 */  "statistics",
-       /* 148     405                  405 */  "stats",
-       /* 149     406                  406 */  "statsdir",
-       /* 150     407                  407 */  "step",
-       /* 151     408                  408 */  "stepback",
-       /* 152     409                  409 */  "stepfwd",
-       /* 153     410                  410 */  "stepout",
-       /* 154     411                  411 */  "stratum",
-       /* 155     412                  412 */  NULL,
-       /* 156     413                  413 */  "sys",
-       /* 157     414                  414 */  "sysstats",
-       /* 158     415                  415 */  "tick",
-       /* 159     416                  416 */  "time1",
-       /* 160     417                  417 */  "time2",
-       /* 161     418                  418 */  "timer",
-       /* 162     419                  419 */  "timingstats",
-       /* 163     420                  420 */  "tinker",
-       /* 164     421                  421 */  "tos",
-       /* 165     422                  422 */  "trap",
-       /* 166     423                  423 */  "true",
-       /* 167     424                  424 */  "trustedkey",
-       /* 168     425                  425 */  "ttl",
-       /* 169     426                  426 */  "type",
-       /* 170     427                  427 */  NULL,
-       /* 171     428                  428 */  "unpeer_crypto_early",
-       /* 172     429                  429 */  "unpeer_crypto_nak_early",
-       /* 173     430                  430 */  "unpeer_digest_early",
-       /* 174     431                  431 */  "unconfig",
-       /* 175     432                  432 */  "unpeer",
-       /* 176     433                  433 */  "version",
-       /* 177     434                  434 */  NULL,
-       /* 178     435                  435 */  "week",
-       /* 179     436                  436 */  "wildcard",
-       /* 180     437                  437 */  "xleave",
-       /* 181     438                  438 */  "year",
-       /* 182     439                  439 */  NULL,
+       /* 122     379                  379 */  "peer_clear_digest_early",
+       /* 123     380                  380 */  "panic",
+       /* 124     381                  381 */  "peer",
+       /* 125     382                  382 */  "peerstats",
+       /* 126     383                  383 */  "phone",
+       /* 127     384                  384 */  "pid",
+       /* 128     385                  385 */  "pidfile",
+       /* 129     386                  386 */  "pool",
+       /* 130     387                  387 */  "port",
+       /* 131     388                  388 */  "preempt",
+       /* 132     389                  389 */  "prefer",
+       /* 133     390                  390 */  "protostats",
+       /* 134     391                  391 */  "pw",
+       /* 135     392                  392 */  "randfile",
+       /* 136     393                  393 */  "rawstats",
+       /* 137     394                  394 */  "refid",
+       /* 138     395                  395 */  "requestkey",
+       /* 139     396                  396 */  "reset",
+       /* 140     397                  397 */  "restrict",
+       /* 141     398                  398 */  "revoke",
+       /* 142     399                  399 */  "rlimit",
+       /* 143     400                  400 */  "saveconfigdir",
+       /* 144     401                  401 */  "server",
+       /* 145     402                  402 */  "setvar",
+       /* 146     403                  403 */  "source",
+       /* 147     404                  404 */  "stacksize",
+       /* 148     405                  405 */  "statistics",
+       /* 149     406                  406 */  "stats",
+       /* 150     407                  407 */  "statsdir",
+       /* 151     408                  408 */  "step",
+       /* 152     409                  409 */  "stepback",



Home | Main Index | Thread Index | Old Index