[ntp:bk-ntp-dev-send] BitKeeper diffs

Harlan Stenn stenn at deacon.udel.edu
Fri Jun 22 06:15:06 UTC 2007


#### ChangeSet ####
2007-06-22 02:11:30-04:00, stenn at deacon.udel.edu 
  Leapsecond file support

==== ChangeLog ====
2007-06-22 02:11:16-04:00, stenn at deacon.udel.edu +2 -2
  Leapsecond file support

--- 1.74/ChangeLog	2007-06-22 01:00:47 -04:00
+++ 1.75/ChangeLog	2007-06-22 02:11:16 -04:00
@@ -1,10 +1,10 @@
 * Start using 'design by contract' assertions.
 * Allow null driftfile.
-* More leap second fixes from Dave Mills.
+* leap second infrastructure fixes from Dave Mills.
 * Use YYERROR_VERBOSE for the new parser, and fix related BUILT_SOURCES.
 * [Bug #629] changes to ensure broadcast works including on wildcard addresses
 * [Bug 853] get_node() must return a pointer to maximally-aligned memory.
-* Leap file fixes from Dave Mills.
+* Initial leap file fixes from Dave Mills.
 * [Bug 858] Recent leapfile changes broke without OPENSSL.
 * Use a char for DIR_SEP, not a string.
 * [Bug 850] driftfile parsing changes.

==== include/ntp.h ====
2007-06-22 02:11:16-04:00, stenn at deacon.udel.edu +1 -0
  Leapsecond file support

--- 1.132/include/ntp.h	2007-06-10 03:24:37 -04:00
+++ 1.133/include/ntp.h	2007-06-22 02:11:16 -04:00
@@ -772,6 +772,7 @@ struct pkt {
 #define	STATS_FREQ_FILE		1	/* configure drift file */
 #define STATS_STATSDIR		2	/* directory prefix for stats files */
 #define	STATS_PID_FILE		3	/* configure ntpd PID file */
+#define	STATS_LEAP_FILE		4	/* configure ntpd leapseconds file */
 
 #define MJD_1900		15020	/* MJD for 1 Jan 1900 */
 

==== ntpd/ntp_config.c ====
2007-06-22 02:11:16-04:00, stenn at deacon.udel.edu +6 -1
  Leapsecond file support

--- 1.157/ntpd/ntp_config.c	2007-06-22 01:25:05 -04:00
+++ 1.158/ntpd/ntp_config.c	2007-06-22 02:11:16 -04:00
@@ -183,6 +183,7 @@ int old_config_style = 1;    /* A boolea
 
 extern int sys_maxclock;
 extern char *stats_drift_file;	/* name of the driftfile */
+extern char *leapseconds_file_name; /*name of the leapseconds file */
 
 /* FUNCTION PROTOTYPES */
 
@@ -1570,8 +1571,12 @@ config_vars(void)
 				free(curr_var->value.s);
 			}
 			break;
-			case T_DriftMinutes:
+		    case T_DriftMinutes:
 			stats_write_period = 60 * curr_var->value.i;
+			break;
+		    case T_Leapfile:
+			stats_config(STATS_LEAP_FILE, curr_var->value.s);
+			free(curr_var->value.s);
 			break;
 		    case T_Pidfile:
 			stats_config(STATS_PID_FILE, curr_var->value.s);

==== ntpd/ntp_config.c ====
2007-06-22 01:25:05-04:00, stenn at deacon.udel.edu +1 -0
  More leapsecond fixes from Dave Mills

--- 1.156/ntpd/ntp_config.c	2007-06-12 17:59:35 -04:00
+++ 1.157/ntpd/ntp_config.c	2007-06-22 01:25:05 -04:00
@@ -749,6 +749,7 @@ struct key_tok keyword_list[] = {
 	{ "filegen",		T_Filegen,         NO_ARG },
 	{ "fudge",		T_Fudge,           SINGLE_ARG },
 	{ "includefile",	T_Includefile,     SINGLE_ARG },
+	{ "leapfile",		T_Leapfile,	   SINGLE_ARG },
 	{ "logconfig",		T_Logconfig,       SINGLE_ARG },
 	{ "logfile",		T_Logfile,         SINGLE_ARG },
 	{ "manycastclient",	T_Manycastclient,  SINGLE_ARG },

==== ntpd/ntp_control.c ====
2007-06-22 01:25:05-04:00, stenn at deacon.udel.edu +3 -4
  More leapsecond fixes from Dave Mills

--- 1.93/ntpd/ntp_control.c	2007-05-08 20:32:36 -04:00
+++ 1.94/ntpd/ntp_control.c	2007-06-22 01:25:05 -04:00
@@ -1441,17 +1441,16 @@ ctl_putsys(
 			ctl_putstr(sys_var[CS_IDENT].text,
 			    mvpar_file, strlen(mvpar_file));
 		break;
+#endif /* OPENSSL */
 
 	case CS_LEAPTAB:
-		if (tai_leap.fstamp != 0)
-			ctl_putfs(sys_var[CS_LEAPTAB].text,
-			    ntohl(tai_leap.fstamp));
+		ctl_putuint(sys_var[CS_LEAPTAB].text,
+		    leap_sec);
 		break;
 
 	case CS_TAI:
 		ctl_putuint(sys_var[CS_TAI].text, sys_tai);
 		break;
-#endif /* OPENSSL */
 	}
 }
 

==== ntpd/ntp_parser.c ====
2007-06-22 01:25:05-04:00, stenn at deacon.udel.edu +684 -675
  More leapsecond fixes from Dave Mills

--- 1.13/ntpd/ntp_parser.c	2007-06-19 03:13:33 -04:00
+++ 1.14/ntpd/ntp_parser.c	2007-06-22 01:25:05 -04:00
@@ -1,4 +1,4 @@
-/* A Bison parser, made from /usa/neal/neal.ntp-dev/A.pogo/ntpd/../../ntpd/ntp_parser.y
+/* A Bison parser, made from /backroom/ntp-dev/A.deacon/ntpd/../../ntpd/ntp_parser.y
    by GNU bison 1.35.  */
 
 #define YYBISON 1  /* Identify Bison output.  */
@@ -62,97 +62,98 @@
 # define	T_Keysdir	313
 # define	T_Kod	314
 # define	T_Leap	315
-# define	T_Limited	316
-# define	T_Link	317
-# define	T_Logconfig	318
-# define	T_Logfile	319
-# define	T_Loopstats	320
-# define	T_Lowpriotrap	321
-# define	T_Manycastclient	322
-# define	T_Manycastserver	323
-# define	T_Mask	324
-# define	T_Maxclock	325
-# define	T_Maxdist	326
-# define	T_Maxhop	327
-# define	T_Maxpoll	328
-# define	T_Minclock	329
-# define	T_Mindist	330
-# define	T_Minimum	331
-# define	T_Minpoll	332
-# define	T_Minsane	333
-# define	T_Mode	334
-# define	T_Monitor	335
-# define	T_Month	336
-# define	T_Multicastclient	337
-# define	T_Mvpar	338
-# define	T_Nolink	339
-# define	T_Nomodify	340
-# define	T_None	341
-# define	T_Nopeer	342
-# define	T_Noquery	343
-# define	T_Noselect	344
-# define	T_Noserve	345
-# define	T_Notrap	346
-# define	T_Notrust	347
-# define	T_Novolley	348
-# define	T_Ntp	349
-# define	T_Ntpport	350
-# define	T_Orphan	351
-# define	T_Panic	352
-# define	T_Peer	353
-# define	T_Peerstats	354
-# define	T_Phone	355
-# define	T_Pid	356
-# define	T_Pidfile	357
-# define	T_Pool	358
-# define	T_Port	359
-# define	T_Pps	360
-# define	T_Preempt	361
-# define	T_Prefer	362
-# define	T_Pw	363
-# define	T_RandFile	364
-# define	T_Rawstats	365
-# define	T_Refid	366
-# define	T_Requestkey	367
-# define	T_Restrict	368
-# define	T_Revoke	369
-# define	T_Server	370
-# define	T_Setvar	371
-# define	T_Sign	372
-# define	T_Statistics	373
-# define	T_Stats	374
-# define	T_Statsdir	375
-# define	T_Step	376
-# define	T_Stepout	377
-# define	T_Stratum	378
-# define	T_String	379
-# define	T_Sysstats	380
-# define	T_Tick	381
-# define	T_Time1	382
-# define	T_Time2	383
-# define	T_Tinker	384
-# define	T_Tos	385
-# define	T_Trap	386
-# define	T_True	387
-# define	T_Trustedkey	388
-# define	T_Ttl	389
-# define	T_Type	390
-# define	T_Version	391
-# define	T_Week	392
-# define	T_Year	393
-# define	T_Flag	394
-# define	T_Void	395
-# define	T_EOC	396
-# define	T_Simulate	397
-# define	T_Beep_Delay	398
-# define	T_Sim_Duration	399
-# define	T_Server_Offset	400
-# define	T_Duration	401
-# define	T_Freq_Offset	402
-# define	T_Wander	403
-# define	T_Jitter	404
-# define	T_Prop_Delay	405
-# define	T_Proc_Delay	406
+# define	T_Leapfile	316
+# define	T_Limited	317
+# define	T_Link	318
+# define	T_Logconfig	319
+# define	T_Logfile	320
+# define	T_Loopstats	321
+# define	T_Lowpriotrap	322
+# define	T_Manycastclient	323
+# define	T_Manycastserver	324
+# define	T_Mask	325
+# define	T_Maxclock	326
+# define	T_Maxdist	327
+# define	T_Maxhop	328
+# define	T_Maxpoll	329
+# define	T_Minclock	330
+# define	T_Mindist	331
+# define	T_Minimum	332
+# define	T_Minpoll	333
+# define	T_Minsane	334
+# define	T_Mode	335
+# define	T_Monitor	336
+# define	T_Month	337
+# define	T_Multicastclient	338
+# define	T_Mvpar	339
+# define	T_Nolink	340
+# define	T_Nomodify	341
+# define	T_None	342
+# define	T_Nopeer	343
+# define	T_Noquery	344
+# define	T_Noselect	345
+# define	T_Noserve	346
+# define	T_Notrap	347
+# define	T_Notrust	348
+# define	T_Novolley	349
+# define	T_Ntp	350
+# define	T_Ntpport	351
+# define	T_Orphan	352
+# define	T_Panic	353
+# define	T_Peer	354
+# define	T_Peerstats	355
+# define	T_Phone	356
+# define	T_Pid	357
+# define	T_Pidfile	358
+# define	T_Pool	359
+# define	T_Port	360
+# define	T_Pps	361
+# define	T_Preempt	362
+# define	T_Prefer	363
+# define	T_Pw	364
+# define	T_RandFile	365
+# define	T_Rawstats	366
+# define	T_Refid	367
+# define	T_Requestkey	368
+# define	T_Restrict	369
+# define	T_Revoke	370
+# define	T_Server	371
+# define	T_Setvar	372
+# define	T_Sign	373
+# define	T_Statistics	374
+# define	T_Stats	375
+# define	T_Statsdir	376
+# define	T_Step	377
+# define	T_Stepout	378
+# define	T_Stratum	379
+# define	T_String	380
+# define	T_Sysstats	381
+# define	T_Tick	382
+# define	T_Time1	383
+# define	T_Time2	384
+# define	T_Tinker	385
+# define	T_Tos	386
+# define	T_Trap	387
+# define	T_True	388
+# define	T_Trustedkey	389
+# define	T_Ttl	390
+# define	T_Type	391
+# define	T_Version	392
+# define	T_Week	393
+# define	T_Year	394
+# define	T_Flag	395
+# define	T_Void	396
+# define	T_EOC	397
+# define	T_Simulate	398
+# define	T_Beep_Delay	399
+# define	T_Sim_Duration	400
+# define	T_Server_Offset	401
+# define	T_Duration	402
+# define	T_Freq_Offset	403
+# define	T_Wander	404
+# define	T_Jitter	405
+# define	T_Prop_Delay	406
+# define	T_Proc_Delay	407
 
 #line 11 "ntp_parser.y"
 
@@ -238,12 +239,12 @@ typedef union {
 
 
 
-#define	YYFINAL		361
+#define	YYFINAL		363
 #define	YYFLAG		-32768
-#define	YYNTBASE	158
+#define	YYNTBASE	159
 
 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
-#define YYTRANSLATE(x) ((unsigned)(x) <= 406 ? yytranslate[x] : 220)
+#define YYTRANSLATE(x) ((unsigned)(x) <= 407 ? yytranslate[x] : 221)
 
 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
 static const short yytranslate[] =
@@ -252,15 +253,15 @@ static const short yytranslate[] =
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   154,     2,   155,     2,     2,     2,     2,
+       2,     2,     2,   155,     2,   156,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,   153,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,   154,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   156,     2,   157,     2,     2,     2,     2,
+       2,     2,     2,   157,     2,   158,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -288,7 +289,7 @@ static const short yytranslate[] =
      116,   117,   118,   119,   120,   121,   122,   123,   124,   125,
      126,   127,   128,   129,   130,   131,   132,   133,   134,   135,
      136,   137,   138,   139,   140,   141,   142,   143,   144,   145,
-     146,   147,   148,   149,   150,   151,   152
+     146,   147,   148,   149,   150,   151,   152,   153
 };
 
 #if YYDEBUG
@@ -311,77 +312,77 @@ static const short yyprhs[] =
      357,   360,   363,   366,   369,   372,   374,   376,   378,   380,
      382,   384,   386,   388,   391,   394,   396,   399,   402,   405,
      408,   411,   414,   417,   421,   423,   426,   429,   432,   435,
-     438,   441,   444,   447,   450,   453,   457,   460,   462,   465,
-     466,   471,   475,   478,   480,   483,   486,   489,   491,   494,
-     496,   498,   500,   502,   505,   507,   510,   512,   515,   517,
-     519,   521,   523,   525,   527,   533,   535,   539,   542,   546,
-     550,   553,   555,   561,   566,   570,   572,   574,   577,   579,
-     586,   590,   593,   597,   601,   605,   609
+     438,   441,   444,   447,   450,   453,   456,   460,   463,   465,
+     468,   469,   474,   478,   481,   483,   486,   489,   492,   494,
+     497,   499,   501,   503,   505,   508,   510,   513,   515,   518,
+     520,   522,   524,   526,   528,   530,   536,   538,   542,   545,
+     549,   553,   556,   558,   564,   569,   573,   575,   577,   580,
+     582,   589,   593,   596,   600,   604,   608,   612
 };
 static const short yyrhs[] =
 {
-     159,     0,   159,   160,   142,     0,   160,   142,     0,     1,
-     142,     0,     0,   161,     0,   167,     0,   168,     0,   174,
-       0,   180,     0,   171,     0,   185,     0,   188,     0,   191,
-       0,   194,     0,   207,     0,   162,   163,   165,     0,   162,
-     163,     0,   116,     0,   104,     0,    99,     0,    11,     0,
-      68,     0,   164,     0,   125,     0,    54,   125,     0,    47,
-       0,    48,     0,   165,   166,     0,   166,     0,     6,     0,
-      14,     0,    49,     0,    57,    54,     0,    78,    54,     0,
-      74,    54,     0,    90,     0,   107,     0,   108,     0,   133,
-       0,   135,    54,     0,    80,    54,     0,   137,    54,     0,
-      12,     0,    12,    94,     0,    69,   204,     0,    83,   204,
-       0,     6,    54,     0,    21,    54,     0,    22,   169,     0,
-      58,   125,     0,    59,   125,     0,   113,    54,     0,   115,
-      54,     0,   134,   202,     0,   169,   170,     0,   170,     0,
-      18,   125,     0,    61,   125,     0,   110,   125,     0,    45,
-     125,     0,   118,   125,     0,    50,   125,     0,    51,   125,
-       0,    44,   125,     0,    84,   125,     0,   109,   125,     0,
-     131,   172,     0,   172,   173,     0,   173,     0,    17,    54,
-       0,    41,    54,     0,    20,   205,     0,    97,    54,     0,
-      76,   206,     0,    72,   206,     0,    75,   206,     0,    71,
-     206,     0,    79,    54,     0,    10,    54,     0,    73,    54,
-       0,   119,   175,     0,   121,   125,     0,    36,   176,   177,
-       0,   175,   176,     0,   176,     0,    19,     0,    23,     0,
-      66,     0,   100,     0,   111,     0,   126,     0,   177,   178,
-       0,   178,     0,    35,   125,     0,   136,   179,     0,    63,
-       0,    85,     0,    32,     0,    26,     0,    87,     0,   102,
-       0,    24,     0,   138,     0,    82,     0,   139,     0,     3,
-       0,    27,   183,     0,   114,   163,   181,     0,   114,    25,
-     181,     0,   114,   164,    70,   164,   181,     0,     0,   181,
-     182,     0,    52,     0,    60,     0,    62,     0,    67,     0,
-      86,     0,    88,     0,    89,     0,    91,     0,    92,     0,
-      93,     0,    96,     0,   137,     0,   183,   184,     0,   184,
-       0,     8,    54,     0,    77,    54,     0,    81,    54,     0,
-      43,   163,   186,     0,   186,   187,     0,   187,     0,   128,
-     206,     0,   129,   206,     0,   124,    54,     0,   112,   125,
-       0,    37,   205,     0,    38,   205,     0,    39,   205,     0,
-      40,   205,     0,    32,   189,     0,    26,   189,     0,   189,
-     190,     0,   190,     0,     5,     0,     9,     0,    15,     0,
-      56,     0,    81,     0,    95,     0,   120,     0,   130,   192,
-       0,   192,   193,     0,   193,     0,     4,   206,     0,    28,
-     206,     0,    42,   206,     0,    46,   206,     0,    98,   206,
-       0,   122,   206,     0,   123,   206,     0,    53,   125,   160,
-       0,    33,     0,    13,   206,     0,    16,    54,     0,   127,
-     206,     0,    30,   195,     0,   103,   125,     0,    65,   125,
-       0,     7,    54,     0,    64,   199,     0,   101,   203,     0,
-     117,   196,     0,   132,   164,   197,     0,   135,   202,     0,
-     125,     0,   125,    54,     0,     0,   125,   153,   125,    25,
-       0,   125,   153,   125,     0,   197,   198,     0,   198,     0,
-     105,    54,     0,    55,   164,     0,   199,   200,     0,   200,
-       0,   201,   125,     0,   125,     0,   154,     0,   155,     0,
-     153,     0,   202,    54,     0,    54,     0,   203,   125,     0,
-     125,     0,   204,   163,     0,   163,     0,    54,     0,   133,
-       0,    34,     0,    54,     0,    29,     0,   208,   156,   209,
-     211,   157,     0,   143,     0,   209,   210,   142,     0,   210,
-     142,     0,   144,   153,   206,     0,   145,   153,   206,     0,
-     211,   212,     0,   212,     0,   214,   156,   213,   216,   157,
-       0,   146,   153,   206,   142,     0,   116,   153,   215,     0,
-     164,     0,   125,     0,   216,   217,     0,   217,     0,   147,
-     153,   206,   156,   218,   157,     0,   218,   219,   142,     0,
-     219,   142,     0,   148,   153,   206,     0,   149,   153,   206,
-       0,   150,   153,   206,     0,   151,   153,   206,     0,   152,
-     153,   206,     0
+     160,     0,   160,   161,   143,     0,   161,   143,     0,     1,
+     143,     0,     0,   162,     0,   168,     0,   169,     0,   175,
+       0,   181,     0,   172,     0,   186,     0,   189,     0,   192,
+       0,   195,     0,   208,     0,   163,   164,   166,     0,   163,
+     164,     0,   117,     0,   105,     0,   100,     0,    11,     0,
+      69,     0,   165,     0,   126,     0,    54,   126,     0,    47,
+       0,    48,     0,   166,   167,     0,   167,     0,     6,     0,
+      14,     0,    49,     0,    57,    54,     0,    79,    54,     0,
+      75,    54,     0,    91,     0,   108,     0,   109,     0,   134,
+       0,   136,    54,     0,    81,    54,     0,   138,    54,     0,
+      12,     0,    12,    95,     0,    70,   205,     0,    84,   205,
+       0,     6,    54,     0,    21,    54,     0,    22,   170,     0,
+      58,   126,     0,    59,   126,     0,   114,    54,     0,   116,
+      54,     0,   135,   203,     0,   170,   171,     0,   171,     0,
+      18,   126,     0,    61,   126,     0,   111,   126,     0,    45,
+     126,     0,   119,   126,     0,    50,   126,     0,    51,   126,
+       0,    44,   126,     0,    85,   126,     0,   110,   126,     0,
+     132,   173,     0,   173,   174,     0,   174,     0,    17,    54,
+       0,    41,    54,     0,    20,   206,     0,    98,    54,     0,
+      77,   207,     0,    73,   207,     0,    76,   207,     0,    72,
+     207,     0,    80,    54,     0,    10,    54,     0,    74,    54,
+       0,   120,   176,     0,   122,   126,     0,    36,   177,   178,
+       0,   176,   177,     0,   177,     0,    19,     0,    23,     0,
+      67,     0,   101,     0,   112,     0,   127,     0,   178,   179,
+       0,   179,     0,    35,   126,     0,   137,   180,     0,    64,
+       0,    86,     0,    32,     0,    26,     0,    88,     0,   103,
+       0,    24,     0,   139,     0,    83,     0,   140,     0,     3,
+       0,    27,   184,     0,   115,   164,   182,     0,   115,    25,
+     182,     0,   115,   165,    71,   165,   182,     0,     0,   182,
+     183,     0,    52,     0,    60,     0,    63,     0,    68,     0,
+      87,     0,    89,     0,    90,     0,    92,     0,    93,     0,
+      94,     0,    97,     0,   138,     0,   184,   185,     0,   185,
+       0,     8,    54,     0,    78,    54,     0,    82,    54,     0,
+      43,   164,   187,     0,   187,   188,     0,   188,     0,   129,
+     207,     0,   130,   207,     0,   125,    54,     0,   113,   126,
+       0,    37,   206,     0,    38,   206,     0,    39,   206,     0,
+      40,   206,     0,    32,   190,     0,    26,   190,     0,   190,
+     191,     0,   191,     0,     5,     0,     9,     0,    15,     0,
+      56,     0,    82,     0,    96,     0,   121,     0,   131,   193,
+       0,   193,   194,     0,   194,     0,     4,   207,     0,    28,
+     207,     0,    42,   207,     0,    46,   207,     0,    99,   207,
+       0,   123,   207,     0,   124,   207,     0,    53,   126,   161,
+       0,    33,     0,    13,   207,     0,    16,    54,     0,   128,
+     207,     0,    30,   196,     0,    62,   126,     0,   104,   126,
+       0,    66,   126,     0,     7,    54,     0,    65,   200,     0,
+     102,   204,     0,   118,   197,     0,   133,   165,   198,     0,
+     136,   203,     0,   126,     0,   126,    54,     0,     0,   126,
+     154,   126,    25,     0,   126,   154,   126,     0,   198,   199,
+       0,   199,     0,   106,    54,     0,    55,   165,     0,   200,
+     201,     0,   201,     0,   202,   126,     0,   126,     0,   155,
+       0,   156,     0,   154,     0,   203,    54,     0,    54,     0,
+     204,   126,     0,   126,     0,   205,   164,     0,   164,     0,
+      54,     0,   134,     0,    34,     0,    54,     0,    29,     0,
+     209,   157,   210,   212,   158,     0,   144,     0,   210,   211,
+     143,     0,   211,   143,     0,   145,   154,   207,     0,   146,
+     154,   207,     0,   212,   213,     0,   213,     0,   215,   157,
+     214,   217,   158,     0,   147,   154,   207,   143,     0,   117,
+     154,   216,     0,   165,     0,   126,     0,   217,   218,     0,
+     218,     0,   148,   154,   207,   157,   219,   158,     0,   219,
+     220,   143,     0,   220,   143,     0,   149,   154,   207,     0,
+     150,   154,   207,     0,   151,   154,   207,     0,   152,   154,
+     207,     0,   153,   154,   207,     0
 };
 
 #endif
@@ -390,29 +391,29 @@ static const short yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
 static const short yyrline[] =
 {
-       0,   301,   305,   306,   311,   321,   322,   323,   324,   325,
-     326,   327,   328,   329,   330,   331,   332,   340,   346,   355,
-     356,   357,   358,   359,   363,   364,   365,   381,   382,   386,
-     387,   392,   393,   394,   395,   396,   397,   398,   399,   400,
-     401,   402,   403,   404,   414,   416,   418,   420,   431,   433,
-     435,   441,   443,   445,   447,   449,   454,   455,   459,   461,
-     463,   465,   467,   469,   471,   473,   475,   477,   487,   492,
-     493,   497,   499,   501,   503,   505,   507,   509,   511,   513,
-     515,   517,   527,   529,   531,   539,   540,   544,   546,   548,
-     550,   552,   554,   559,   560,   564,   565,   566,   567,   568,
-     569,   573,   574,   575,   576,   577,   578,   579,   588,   590,
-     595,   600,   608,   609,   613,   614,   615,   616,   617,   618,
-     619,   620,   621,   622,   623,   624,   628,   629,   633,   634,
-     635,   643,   648,   649,   653,   655,   657,   659,   661,   663,
-     665,   667,   676,   678,   683,   684,   688,   689,   690,   691,
-     692,   693,   695,   703,   707,   708,   712,   713,   714,   715,
-     716,   717,   718,   726,   742,   748,   750,   752,   754,   757,
-     759,   761,   764,   766,   768,   770,   772,   776,   778,   781,
-     786,   788,   794,   795,   799,   800,   805,   806,   810,   811,
-     828,   829,   830,   839,   840,   844,   845,   849,   850,   854,
-     863,   864,   868,   869,   877,   892,   896,   897,   901,   902,
-     906,   907,   911,   916,   920,   924,   925,   929,   930,   934,
-     939,   940,   944,   946,   948,   950,   952
+       0,   302,   306,   307,   312,   322,   323,   324,   325,   326,
+     327,   328,   329,   330,   331,   332,   333,   341,   347,   356,
+     357,   358,   359,   360,   364,   365,   366,   382,   383,   387,
+     388,   393,   394,   395,   396,   397,   398,   399,   400,   401,
+     402,   403,   404,   405,   415,   417,   419,   421,   432,   434,
+     436,   442,   444,   446,   448,   450,   455,   456,   460,   462,
+     464,   466,   468,   470,   472,   474,   476,   478,   488,   493,
+     494,   498,   500,   502,   504,   506,   508,   510,   512,   514,
+     516,   518,   528,   530,   532,   540,   541,   545,   547,   549,
+     551,   553,   555,   560,   561,   565,   566,   567,   568,   569,
+     570,   574,   575,   576,   577,   578,   579,   580,   589,   591,
+     596,   601,   609,   610,   614,   615,   616,   617,   618,   619,
+     620,   621,   622,   623,   624,   625,   629,   630,   634,   635,
+     636,   644,   649,   650,   654,   656,   658,   660,   662,   664,
+     666,   668,   677,   679,   684,   685,   689,   690,   691,   692,
+     693,   694,   696,   704,   708,   709,   713,   714,   715,   716,
+     717,   718,   719,   727,   743,   749,   751,   753,   755,   757,
+     760,   762,   764,   767,   769,   771,   773,   775,   779,   781,
+     784,   789,   791,   797,   798,   802,   803,   808,   809,   813,
+     814,   831,   832,   833,   842,   843,   847,   848,   852,   853,
+     857,   866,   867,   871,   872,   880,   895,   899,   900,   904,
+     905,   909,   910,   914,   919,   923,   927,   928,   932,   933,
+     937,   942,   943,   947,   949,   951,   953,   955
 };
 #endif
 
@@ -433,8 +434,8 @@ static const char *const yytname[] =
   "T_Fudge", "T_Gqpar", "T_Host", "T_Huffpuff", "T_IPv4_address", 
   "T_IPv6_address", "T_Iburst", "T_Ident", "T_Iffpar", "T_Ignore", 
   "T_Includefile", "T_Integer", "T_Interface", "T_Kernel", "T_Key", 
-  "T_Keys", "T_Keysdir", "T_Kod", "T_Leap", "T_Limited", "T_Link", 
-  "T_Logconfig", "T_Logfile", "T_Loopstats", "T_Lowpriotrap", 
+  "T_Keys", "T_Keysdir", "T_Kod", "T_Leap", "T_Leapfile", "T_Limited", 
+  "T_Link", "T_Logconfig", "T_Logfile", "T_Loopstats", "T_Lowpriotrap", 
   "T_Manycastclient", "T_Manycastserver", "T_Mask", "T_Maxclock", 
   "T_Maxdist", "T_Maxhop", "T_Maxpoll", "T_Minclock", "T_Mindist", 
   "T_Minimum", "T_Minpoll", "T_Minsane", "T_Mode", "T_Monitor", "T_Month", 
@@ -475,29 +476,29 @@ static const char *const yytname[] =
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
 static const short yyr1[] =
 {
-       0,   158,   159,   159,   159,   160,   160,   160,   160,   160,
-     160,   160,   160,   160,   160,   160,   160,   161,   161,   162,
-     162,   162,   162,   162,   163,   163,   163,   164,   164,   165,
-     165,   166,   166,   166,   166,   166,   166,   166,   166,   166,
-     166,   166,   166,   166,   167,   167,   167,   167,   168,   168,
-     168,   168,   168,   168,   168,   168,   169,   169,   170,   170,
-     170,   170,   170,   170,   170,   170,   170,   170,   171,   172,
-     172,   173,   173,   173,   173,   173,   173,   173,   173,   173,
-     173,   173,   174,   174,   174,   175,   175,   176,   176,   176,
-     176,   176,   176,   177,   177,   178,   178,   178,   178,   178,
-     178,   179,   179,   179,   179,   179,   179,   179,   180,   180,
-     180,   180,   181,   181,   182,   182,   182,   182,   182,   182,
-     182,   182,   182,   182,   182,   182,   183,   183,   184,   184,
-     184,   185,   186,   186,   187,   187,   187,   187,   187,   187,
-     187,   187,   188,   188,   189,   189,   190,   190,   190,   190,
-     190,   190,   190,   191,   192,   192,   193,   193,   193,   193,
-     193,   193,   193,   194,   194,   194,   194,   194,   194,   194,
-     194,   194,   194,   194,   194,   194,   194,   195,   195,   195,
-     196,   196,   197,   197,   198,   198,   199,   199,   200,   200,
-     201,   201,   201,   202,   202,   203,   203,   204,   204,   205,
-     205,   205,   206,   206,   207,   208,   209,   209,   210,   210,
-     211,   211,   212,   213,   214,   215,   215,   216,   216,   217,
-     218,   218,   219,   219,   219,   219,   219
+       0,   159,   160,   160,   160,   161,   161,   161,   161,   161,
+     161,   161,   161,   161,   161,   161,   161,   162,   162,   163,
+     163,   163,   163,   163,   164,   164,   164,   165,   165,   166,
+     166,   167,   167,   167,   167,   167,   167,   167,   167,   167,
+     167,   167,   167,   167,   168,   168,   168,   168,   169,   169,
+     169,   169,   169,   169,   169,   169,   170,   170,   171,   171,
+     171,   171,   171,   171,   171,   171,   171,   171,   172,   173,
+     173,   174,   174,   174,   174,   174,   174,   174,   174,   174,
+     174,   174,   175,   175,   175,   176,   176,   177,   177,   177,
+     177,   177,   177,   178,   178,   179,   179,   179,   179,   179,
+     179,   180,   180,   180,   180,   180,   180,   180,   181,   181,
+     181,   181,   182,   182,   183,   183,   183,   183,   183,   183,
+     183,   183,   183,   183,   183,   183,   184,   184,   185,   185,
+     185,   186,   187,   187,   188,   188,   188,   188,   188,   188,
+     188,   188,   189,   189,   190,   190,   191,   191,   191,   191,
+     191,   191,   191,   192,   193,   193,   194,   194,   194,   194,
+     194,   194,   194,   195,   195,   195,   195,   195,   195,   195,
+     195,   195,   195,   195,   195,   195,   195,   195,   196,   196,
+     196,   197,   197,   198,   198,   199,   199,   200,   200,   201,
+     201,   202,   202,   202,   203,   203,   204,   204,   205,   205,
+     206,   206,   206,   207,   207,   208,   209,   210,   210,   211,
+     211,   212,   212,   213,   214,   215,   216,   216,   217,   217,
+     218,   219,   219,   220,   220,   220,   220,   220
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -520,12 +521,12 @@ static const short yyr2[] =
        2,     2,     2,     2,     2,     1,     1,     1,     1,     1,
        1,     1,     1,     2,     2,     1,     2,     2,     2,     2,
        2,     2,     2,     3,     1,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     3,     2,     1,     2,     0,
-       4,     3,     2,     1,     2,     2,     2,     1,     2,     1,
-       1,     1,     1,     2,     1,     2,     1,     2,     1,     1,
-       1,     1,     1,     1,     5,     1,     3,     2,     3,     3,
-       2,     1,     5,     4,     3,     1,     1,     2,     1,     6,
-       3,     2,     3,     3,     3,     3,     3
+       2,     2,     2,     2,     2,     2,     3,     2,     1,     2,
+       0,     4,     3,     2,     1,     2,     2,     2,     1,     2,
+       1,     1,     1,     1,     2,     1,     2,     1,     2,     1,
+       1,     1,     1,     1,     1,     5,     1,     3,     2,     3,
+       3,     2,     1,     5,     4,     3,     1,     1,     2,     1,
+       6,     3,     2,     3,     3,     3,     3,     3
 };
 
 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
@@ -534,225 +535,229 @@ static const short yyr2[] =
 static const short yydefact[] =
 {
        0,     0,     0,     0,    22,    44,     0,     0,     0,     0,
-       0,     0,   179,     0,   164,     0,     0,     0,     0,     0,
-       0,     0,    23,     0,     0,    21,     0,     0,    20,     0,
-       0,     0,    19,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   205,     1,     0,     6,     0,     7,     8,    11,
-       9,    10,    12,    13,    14,    15,    16,     0,     4,    48,
-     171,    45,   203,   202,   165,   166,    49,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    50,    57,   146,
-     147,   148,   149,   150,   151,   152,   143,   145,     0,     0,
-       0,   108,   127,   177,   168,   142,    87,    88,    89,    90,
-      91,    92,     0,    27,    28,     0,    25,     0,    24,     5,
-      51,    52,   189,   192,   190,   191,   172,   187,     0,   170,
-     198,    46,    47,   196,   173,   169,    53,   112,   112,    24,
-      54,     0,   174,    82,    86,    83,   167,     0,     0,     0,
-       0,     0,     0,     0,   153,   155,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    68,    70,     0,
-     194,    55,   176,     0,     3,    18,     0,    58,    65,    61,
-      63,    64,    59,    66,    67,    60,    62,    56,   144,   128,
-     129,   130,   126,   178,   100,    99,     0,    97,    98,     0,
-      84,    94,    26,     0,     0,     0,     0,     0,     0,     0,
-       0,   131,   133,   163,   186,   188,   197,   195,   110,   109,
-       0,     0,    85,   156,   157,   158,   159,   160,   161,   162,
-     154,    80,    71,   201,   199,   200,    73,    72,    78,    76,
-      81,    77,    75,    79,    74,    69,     0,     0,   175,   183,
-     193,     2,    31,    32,    33,     0,     0,     0,     0,    37,
-      38,    39,    40,     0,     0,    17,    30,     0,     0,     0,
-       0,    95,   107,   103,   105,   101,   102,   104,   106,    96,
-      93,   138,   139,   140,   141,   137,   136,   134,   135,   132,
-     114,   115,   116,   117,   118,   119,   120,   121,   122,   123,
-     124,   125,   113,   112,   181,   185,   184,   182,    34,    36,
-      35,    42,    41,    43,    29,     0,     0,     0,     0,     0,
-     211,     0,   207,   111,   180,   208,   209,     0,   206,   204,
-     210,     0,   216,   215,   214,     0,     0,     0,     0,     0,
-     218,     0,     0,   212,   217,   213,     0,     0,     0,     0,
+       0,     0,   180,     0,   164,     0,     0,     0,     0,     0,
+       0,     0,     0,    23,     0,     0,    21,     0,     0,    20,
+       0,     0,     0,    19,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   206,     1,     0,     6,     0,     7,     8,
+      11,     9,    10,    12,    13,    14,    15,    16,     0,     4,
+      48,   172,    45,   204,   203,   165,   166,    49,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    50,    57,
+     146,   147,   148,   149,   150,   151,   152,   143,   145,     0,
+       0,     0,   108,   127,   178,   168,   142,    87,    88,    89,
+      90,    91,    92,     0,    27,    28,     0,    25,     0,    24,
+       5,    51,    52,   169,   190,   193,   191,   192,   173,   188,
+       0,   171,   199,    46,    47,   197,   174,   170,    53,   112,
+     112,    24,    54,     0,   175,    82,    86,    83,   167,     0,
+       0,     0,     0,     0,     0,     0,   153,   155,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    68,
+      70,     0,   195,    55,   177,     0,     3,    18,     0,    58,
+      65,    61,    63,    64,    59,    66,    67,    60,    62,    56,
+     144,   128,   129,   130,   126,   179,   100,    99,     0,    97,
+      98,     0,    84,    94,    26,     0,     0,     0,     0,     0,
+       0,     0,     0,   131,   133,   163,   187,   189,   198,   196,
+     110,   109,     0,     0,    85,   156,   157,   158,   159,   160,
+     161,   162,   154,    80,    71,   202,   200,   201,    73,    72,
+      78,    76,    81,    77,    75,    79,    74,    69,     0,     0,
+     176,   184,   194,     2,    31,    32,    33,     0,     0,     0,
+       0,    37,    38,    39,    40,     0,     0,    17,    30,     0,
+       0,     0,     0,    95,   107,   103,   105,   101,   102,   104,
+     106,    96,    93,   138,   139,   140,   141,   137,   136,   134,
+     135,   132,   114,   115,   116,   117,   118,   119,   120,   121,
+     122,   123,   124,   125,   113,   112,   182,   186,   185,   183,
+      34,    36,    35,    42,    41,    43,    29,     0,     0,     0,
+       0,     0,   212,     0,   208,   111,   181,   209,   210,     0,
+     207,   205,   211,     0,   217,   216,   215,     0,     0,     0,
+       0,     0,   219,     0,     0,   213,   218,   214,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     219,     0,   221,   222,   223,   224,   225,   226,   220,     0,
-       0,     0
+       0,     0,   220,     0,   222,   223,   224,   225,   226,   227,
+     221,     0,     0,     0
 };
 
 static const short yydefgoto[] =
 {
-     359,    43,    44,    45,    46,   120,   108,   255,   256,    47,
-      48,    77,    78,    49,   157,   158,    50,   133,   102,   190,
-     191,   269,    51,   208,   292,    91,    92,    52,   201,   202,
-      53,    86,    87,    54,   144,   145,    55,    94,   132,   238,
-     239,   116,   117,   118,   161,   124,   121,   226,    64,    56,
-      57,   259,   260,   309,   310,   326,   311,   324,   329,   330,
-     343,   344
+     361,    44,    45,    46,    47,   122,   109,   257,   258,    48,
+      49,    78,    79,    50,   159,   160,    51,   135,   103,   192,
+     193,   271,    52,   210,   294,    92,    93,    53,   203,   204,
+      54,    87,    88,    55,   146,   147,    56,    95,   134,   240,
+     241,   118,   119,   120,   163,   126,   123,   228,    65,    57,
+      58,   261,   262,   311,   312,   328,   313,   326,   331,   332,
+     345,   346
 };
 
 static const short yypact[] =
 {
-      26,  -125,   -34,   -26,-32768,   -64,   -23,     0,     6,   363,
-      78,    -5,   -60,    78,-32768,    44,   -43,   -57,   -52,   -50,
-     -55,   -48,-32768,   -43,   -43,-32768,   -47,   -45,-32768,    27,
-     140,    32,-32768,   -37,    44,    -9,   -23,    15,   176,    -7,
-      35,    35,-32768,   203,   -46,-32768,   -43,-32768,-32768,-32768,
-  -32768,-32768,-32768,-32768,-32768,-32768,-32768,   -32,-32768,-32768,
-  -32768,-32768,-32768,-32768,-32768,-32768,-32768,     1,     7,     8,
-      11,    21,    25,    41,    46,    47,    53,   363,-32768,-32768,
-  -32768,-32768,-32768,-32768,-32768,-32768,    78,-32768,    77,    81,
-      97,    -5,-32768,    98,-32768,    78,-32768,-32768,-32768,-32768,
-  -32768,-32768,   -14,-32768,-32768,    55,-32768,   152,-32768,   336,
-  -32768,-32768,-32768,-32768,-32768,-32768,   -55,-32768,    57,-32768,
-  -32768,   -43,   -43,-32768,    59,-32768,-32768,-32768,-32768,   127,
-  -32768,    52,-32768,    44,-32768,-32768,-32768,   -23,   -23,   -23,
-     -23,   -23,   -23,   -23,    15,-32768,   150,   157,   -10,   164,
-     -23,   -23,   166,   -23,   -23,   167,   168,   176,-32768,   -41,
-  -32768,   169,   169,    64,-32768,   105,  -122,-32768,-32768,-32768,
+      25,  -113,   -19,    -9,-32768,   -55,   -10,    -6,     8,   364,
+      54,    -3,   -62,    54,-32768,   154,   -41,   -56,   -53,   -50,
+     -49,    29,   -46,-32768,   -41,   -41,-32768,   -45,   -40,-32768,
+      34,    18,    35,-32768,   -33,   154,    -2,   -10,    14,   423,
+     -25,    42,    42,-32768,   203,   -32,-32768,   -41,-32768,-32768,
+  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -34,-32768,
+  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,     0,    20,
+      26,    28,    33,    36,    40,    44,    50,    62,   364,-32768,
+  -32768,-32768,-32768,-32768,-32768,-32768,-32768,    54,-32768,    63,
+      97,   138,    -3,-32768,   140,-32768,    54,-32768,-32768,-32768,
+  -32768,-32768,-32768,   -15,-32768,-32768,    70,-32768,    61,-32768,
+     337,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    29,-32768,
+      76,-32768,-32768,   -41,   -41,-32768,    78,-32768,-32768,-32768,
+  -32768,   136,-32768,    57,-32768,   154,-32768,-32768,-32768,   -10,
+     -10,   -10,   -10,   -10,   -10,   -10,    14,-32768,   158,   159,
+     -20,   163,   -10,   -10,   164,   -10,   -10,   166,   172,   423,
+  -32768,   -39,-32768,   173,   173,    85,-32768,   114,  -118,-32768,
   -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-  -32768,-32768,-32768,-32768,-32768,-32768,   101,-32768,-32768,    10,
-     -14,-32768,-32768,   -10,   -10,   -10,   -10,   102,   174,   -23,
-     -23,   152,-32768,-32768,-32768,-32768,-32768,-32768,   394,   394,
-      -7,   106,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   105,-32768,
+  -32768,     9,   -15,-32768,-32768,   -20,   -20,   -20,   -20,   106,
+     180,   -10,   -10,    61,-32768,-32768,-32768,-32768,-32768,-32768,
+     419,   419,   -25,   111,-32768,-32768,-32768,-32768,-32768,-32768,
   -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-  -32768,-32768,-32768,-32768,-32768,-32768,    -7,   178,   -41,-32768,
-  -32768,-32768,-32768,-32768,-32768,   180,   183,   187,   189,-32768,
-  -32768,-32768,-32768,   190,   191,   105,-32768,   100,   104,  -109,
-     108,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -25,   184,
+     -39,-32768,-32768,-32768,-32768,-32768,-32768,   186,   187,   188,
+     189,-32768,-32768,-32768,-32768,   190,   191,   114,-32768,    93,
+      95,   -92,   108,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
   -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
   -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-  -32768,-32768,-32768,-32768,   229,-32768,-32768,-32768,-32768,-32768,
-  -32768,-32768,-32768,-32768,-32768,   -23,   -23,   107,   116,   -91,
-  -32768,   103,-32768,   394,-32768,-32768,-32768,     3,-32768,-32768,
-  -32768,   117,-32768,-32768,-32768,   113,   128,   -23,   121,  -131,
-  -32768,   135,   -23,-32768,-32768,-32768,   122,   149,   126,   129,
-     130,   131,   132,    51,   145,   -23,   -23,   -23,   -23,   -23,
-  -32768,   147,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   290,
-     292,-32768
+  -32768,-32768,-32768,-32768,-32768,-32768,   228,-32768,-32768,-32768,
+  -32768,-32768,-32768,-32768,-32768,-32768,-32768,   -10,   -10,   100,
+     115,  -108,-32768,   102,-32768,   419,-32768,-32768,-32768,   -44,
+  -32768,-32768,-32768,   110,-32768,-32768,-32768,   109,   112,   -10,
+     113,  -119,-32768,   121,   -10,-32768,-32768,-32768,   117,   -18,
+     122,   123,   124,   128,   129,    48,   132,   -10,   -10,   -10,
+     -10,   -10,-32768,   141,-32768,-32768,-32768,-32768,-32768,-32768,
+  -32768,   285,   286,-32768
 };
 
 static const short yypgoto[] =
 {
-  -32768,-32768,   -35,-32768,-32768,    -1,   -29,-32768,    38,-32768,
-  -32768,-32768,   217,-32768,-32768,   138,-32768,-32768,   -25,-32768,
-     115,-32768,-32768,  -126,-32768,-32768,   212,-32768,-32768,   114,
-  -32768,   295,   -40,-32768,-32768,   170,-32768,-32768,-32768,-32768,
-      83,-32768,   207,-32768,   284,-32768,   302,   -19,   -36,-32768,
-  -32768,-32768,    68,-32768,    19,-32768,-32768,-32768,-32768,     2,
-  -32768,   -11
+  -32768,-32768,   -36,-32768,-32768,   156,   -30,-32768,    31,-32768,
+  -32768,-32768,   212,-32768,-32768,   134,-32768,-32768,   -14,-32768,
+      99,-32768,-32768,  -128,-32768,-32768,   202,-32768,-32768,    92,
+  -32768,   283,   -72,-32768,-32768,   152,-32768,-32768,-32768,-32768,
+      59,-32768,   182,-32768,   259,-32768,   277,   -17,   -37,-32768,
+  -32768,-32768,    43,-32768,    -5,-32768,-32768,-32768,-32768,   -22,
+  -32768,   -29
 };
 
 
-#define	YYLAST		531
+#define	YYLAST		557
 
 
 static const short yytable[] =
 {
-     136,   129,   209,    88,   103,   104,    62,   307,   163,   134,
-     159,   105,   184,   262,   236,   107,   328,    58,   185,   137,
-      59,   186,   257,   258,   223,   307,   333,     1,    60,   128,
-      61,    63,     2,     3,   263,   257,   258,     4,     5,     6,
-     103,   104,     7,   138,   224,   165,   178,     8,     9,   187,
-     103,   104,    10,    11,    65,   178,    12,   139,    13,    14,
-      66,   140,    15,    96,   237,    93,   319,    97,   109,    16,
-     112,   188,    89,   110,   203,   111,    90,   119,   123,    17,
-     125,   126,   106,    79,    18,    19,   130,    80,   131,   160,
-      20,    21,   264,    81,    22,    23,   164,   265,   113,   114,
-     115,   213,   214,   215,   216,   217,   218,   219,   212,    24,
-      98,   242,   266,   141,   228,   229,   135,   231,   232,   243,
-     206,   206,   189,   225,   166,    25,   167,    26,   322,    27,
-      28,   179,   168,   169,    82,   180,   170,   142,   143,    29,
-      30,    31,    32,    33,    99,    34,   171,    35,   267,   268,
-     172,   181,   183,    36,   244,   100,    37,    38,    39,    83,
-      40,    41,   245,   277,   278,   127,   173,   313,    -5,    42,
-     101,   174,   175,    84,   271,   272,   273,   274,   176,   246,
-     192,   293,   205,   247,   207,   248,   146,   103,   104,   193,
-     194,   195,   196,   147,   105,   249,   148,   210,    85,   338,
-     339,   340,   341,   342,   221,   211,   241,   295,   350,     2,
-       3,   222,   250,   251,     4,     5,     6,   149,   227,     7,
-     230,   233,   234,   240,     8,     9,   261,   275,   276,    10,
-      11,   294,   296,    12,   298,    13,    14,   299,   252,    15,
-     253,   300,   254,   301,   302,   303,    16,   150,   151,   152,
-     312,   153,   154,   305,   314,   155,    17,   306,   318,   321,
-     317,    18,    19,   325,   197,   106,   327,    20,    21,   315,
-     316,    22,    23,   156,   332,   328,   198,   335,   337,   345,
-     199,   200,   346,   347,   348,   349,    24,   352,   323,   358,
-     360,   331,   361,   304,   177,   235,   336,   338,   339,   340,
-     341,   342,    25,   182,    26,   270,    27,    28,    95,   353,
-     354,   355,   356,   357,   220,   279,    29,    30,    31,    32,
-      33,   297,    34,   204,    35,   162,   122,   308,   320,     0,
-      36,   334,   351,    37,    38,    39,     0,    40,    41,     0,
-       0,     0,     2,     3,     0,    -5,    42,     4,     5,     6,
-       0,     0,     7,     0,     0,     0,     0,     8,     9,     0,
-       0,     0,    10,    11,     0,     0,    12,     0,    13,    14,
-       0,     0,    15,     0,     0,     0,     0,     0,     0,    16,
-       0,    67,     0,     0,     0,     0,     0,     0,     0,    17,
-       0,     0,     0,     0,    18,    19,     0,     0,     0,     0,
-      20,    21,     0,     0,    22,    23,     0,    68,    69,     0,
-       0,     0,     0,    70,    71,     0,     0,     0,     0,    24,
-       0,     0,     0,     0,    72,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    25,     0,    26,     0,    27,
-      28,     0,     0,     0,     0,     0,   280,    73,     0,    29,
-      30,    31,    32,    33,   281,    34,   282,    35,     0,     0,
-       0,   283,     0,    36,     0,     0,    37,    38,    39,     0,
-      40,    41,    74,    75,     0,     0,     0,     0,     0,    42,
-     284,    76,   285,   286,     0,   287,   288,   289,     0,     0,
-     290,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     138,   131,   211,   104,   105,    89,   104,   105,   165,   309,
+     161,   186,   264,   106,   225,   180,   238,   187,   139,    63,
+     188,   136,   104,   105,   180,   309,     1,   259,   260,   330,
+      59,     2,     3,   265,   226,    60,     4,     5,     6,   335,
+      62,     7,   140,   129,    64,    61,     8,     9,    66,   189,
+     321,    10,    11,   259,   260,    12,   141,    13,    14,    80,
+     142,    15,    67,    81,    94,   104,   105,   239,    16,    82,
+     110,   190,   106,   111,   205,    90,   112,   113,    17,    91,
+     121,   125,   324,    18,    19,   107,   127,    20,   128,   132,
+      21,    22,   266,   133,    23,    24,   162,   267,   195,   196,
+     197,   198,   215,   216,   217,   218,   219,   220,   221,    25,
+      83,   166,   268,   143,   227,   230,   231,   181,   233,   234,
+     244,   214,   191,   168,   137,    26,   169,    27,   245,    28,
+      29,   340,   341,   342,   343,   344,    84,   144,   145,    30,
+      31,    32,    33,    34,   107,    35,   170,    36,   269,   270,
+      85,   182,   171,    37,   172,   114,    38,    39,    40,   173,
+      41,    42,   174,   246,   279,   280,   175,   315,    -5,    43,
+     176,   247,   108,    97,   199,    86,   177,    98,   273,   274,
+     275,   276,   295,   115,   116,   117,   200,   130,   178,   248,
+     201,   202,   183,   249,   185,   250,   194,   340,   341,   342,
+     343,   344,   207,   167,   209,   251,   352,   212,   297,     2,
+       3,   213,   223,   224,     4,     5,     6,   229,   232,     7,
+     235,    99,   252,   253,     8,     9,   236,   242,   243,    10,
+      11,   263,   277,    12,   278,    13,    14,   296,   298,    15,
+     300,   301,   302,   303,   304,   305,    16,   307,   254,   308,
+     255,   314,   256,   316,   319,   100,    17,   327,   320,   323,
+     330,    18,    19,   329,   337,    20,   101,   334,    21,    22,
+     317,   318,    23,    24,   339,   354,   347,   348,   349,   208,
+     208,   102,   350,   351,   360,   362,   363,    25,   306,   325,
+     179,   272,   333,   237,   184,   281,    96,   338,   222,   299,
+     206,   164,   124,    26,   310,    27,   322,    28,    29,   336,
+     355,   356,   357,   358,   359,     0,   353,    30,    31,    32,
+      33,    34,     0,    35,     0,    36,     0,     0,     0,     0,
+       0,    37,     0,     0,    38,    39,    40,     0,    41,    42,
+       0,     0,     0,     2,     3,     0,    -5,    43,     4,     5,
+       6,     0,     0,     7,     0,     0,     0,     0,     8,     9,
+       0,     0,     0,    10,    11,     0,     0,    12,     0,    13,
+      14,     0,     0,    15,     0,     0,     0,     0,     0,     0,
+      16,     0,    68,     0,     0,     0,     0,     0,     0,     0,
+      17,     0,     0,     0,     0,    18,    19,     0,     0,    20,
+       0,     0,    21,    22,     0,     0,    23,    24,    69,    70,
+       0,     0,     0,     0,    71,    72,     0,     0,     0,     0,
+       0,    25,     0,     0,     0,    73,     0,     0,     0,     0,
+       0,     0,     0,   148,     0,     0,     0,    26,     0,    27,
+     149,    28,    29,   150,     0,     0,     0,     0,     0,    74,
+       0,    30,    31,    32,    33,    34,     0,    35,     0,    36,
+       0,     0,     0,     0,   151,    37,     0,     0,    38,    39,
+      40,   282,    41,    42,    75,    76,     0,     0,     0,   283,
+       0,    43,   284,    77,     0,     0,     0,   285,     0,     0,
+       0,     0,     0,     0,     0,   152,   153,   154,     0,   155,
+     156,     0,     0,   157,     0,     0,   286,     0,   287,   288,
+       0,   289,   290,   291,     0,     0,   292,     0,     0,     0,
+       0,   158,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   291
+       0,     0,     0,     0,     0,     0,     0,   293
 };
 
 static const short yycheck[] =
 {
-      36,    30,   128,     8,    47,    48,    29,   116,    43,    34,
-      39,    54,    26,     3,    55,    16,   147,   142,    32,     4,
-      54,    35,   144,   145,    34,   116,   157,     1,    54,    30,
-      94,    54,     6,     7,    24,   144,   145,    11,    12,    13,
-      47,    48,    16,    28,    54,    46,    86,    21,    22,    63,
-      47,    48,    26,    27,    54,    95,    30,    42,    32,    33,
-      54,    46,    36,    19,   105,   125,   157,    23,   125,    43,
-     125,    85,    77,   125,   109,   125,    81,   125,   125,    53,
-     125,    54,   125,     5,    58,    59,    54,     9,   125,    54,
-      64,    65,    82,    15,    68,    69,   142,    87,   153,   154,
-     155,   137,   138,   139,   140,   141,   142,   143,   133,    83,
-      66,     6,   102,    98,   150,   151,   125,   153,   154,    14,
-     121,   122,   136,   133,   156,    99,   125,   101,   125,   103,
-     104,    54,   125,   125,    56,    54,   125,   122,   123,   113,
-     114,   115,   116,   117,   100,   119,   125,   121,   138,   139,
-     125,    54,    54,   127,    49,   111,   130,   131,   132,    81,
-     134,   135,    57,   199,   200,    25,   125,   293,   142,   143,
-     126,   125,   125,    95,   193,   194,   195,   196,   125,    74,
-     125,   210,   125,    78,   125,    80,    10,    47,    48,    37,
-      38,    39,    40,    17,    54,    90,    20,    70,   120,   148,
-     149,   150,   151,   152,    54,   153,   142,   236,   157,     6,
-       7,    54,   107,   108,    11,    12,    13,    41,    54,    16,
-      54,    54,    54,    54,    21,    22,   125,   125,    54,    26,
-      27,   125,    54,    30,    54,    32,    33,    54,   133,    36,
-     135,    54,   137,    54,    54,    54,    43,    71,    72,    73,
-     142,    75,    76,   153,    25,    79,    53,   153,   142,   156,
-     153,    58,    59,   146,   112,   125,   153,    64,    65,   305,
-     306,    68,    69,    97,   153,   147,   124,   142,   156,   153,
-     128,   129,   153,   153,   153,   153,    83,   142,   317,   142,
-       0,   327,     0,   255,    77,   157,   332,   148,   149,   150,
-     151,   152,    99,    91,   101,   190,   103,   104,    13,   345,
-     346,   347,   348,   349,   144,   201,   113,   114,   115,   116,
-     117,   238,   119,   116,   121,    41,    24,   259,   309,    -1,
-     127,   329,   343,   130,   131,   132,    -1,   134,   135,    -1,
-      -1,    -1,     6,     7,    -1,   142,   143,    11,    12,    13,
-      -1,    -1,    16,    -1,    -1,    -1,    -1,    21,    22,    -1,
-      -1,    -1,    26,    27,    -1,    -1,    30,    -1,    32,    33,
-      -1,    -1,    36,    -1,    -1,    -1,    -1,    -1,    -1,    43,
-      -1,    18,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    53,
-      -1,    -1,    -1,    -1,    58,    59,    -1,    -1,    -1,    -1,
-      64,    65,    -1,    -1,    68,    69,    -1,    44,    45,    -1,
-      -1,    -1,    -1,    50,    51,    -1,    -1,    -1,    -1,    83,
-      -1,    -1,    -1,    -1,    61,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    99,    -1,   101,    -1,   103,
-     104,    -1,    -1,    -1,    -1,    -1,    52,    84,    -1,   113,
-     114,   115,   116,   117,    60,   119,    62,   121,    -1,    -1,
-      -1,    67,    -1,   127,    -1,    -1,   130,   131,   132,    -1,
-     134,   135,   109,   110,    -1,    -1,    -1,    -1,    -1,   143,
-      86,   118,    88,    89,    -1,    91,    92,    93,    -1,    -1,
-      96,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      37,    31,   130,    47,    48,     8,    47,    48,    44,   117,
+      40,    26,     3,    54,    34,    87,    55,    32,     4,    29,
+      35,    35,    47,    48,    96,   117,     1,   145,   146,   148,
+     143,     6,     7,    24,    54,    54,    11,    12,    13,   158,
+      95,    16,    28,    25,    54,    54,    21,    22,    54,    64,
+     158,    26,    27,   145,   146,    30,    42,    32,    33,     5,
+      46,    36,    54,     9,   126,    47,    48,   106,    43,    15,
+     126,    86,    54,   126,   110,    78,   126,   126,    53,    82,
+     126,   126,   126,    58,    59,   126,   126,    62,    54,    54,
+      65,    66,    83,   126,    69,    70,    54,    88,    37,    38,
+      39,    40,   139,   140,   141,   142,   143,   144,   145,    84,
+      56,   143,   103,    99,   134,   152,   153,    54,   155,   156,
+       6,   135,   137,   157,   126,   100,   126,   102,    14,   104,
+     105,   149,   150,   151,   152,   153,    82,   123,   124,   114,
+     115,   116,   117,   118,   126,   120,   126,   122,   139,   140,
+      96,    54,   126,   128,   126,   126,   131,   132,   133,   126,
+     135,   136,   126,    49,   201,   202,   126,   295,   143,   144,
+     126,    57,    16,    19,   113,   121,   126,    23,   195,   196,
+     197,   198,   212,   154,   155,   156,   125,    31,   126,    75,
+     129,   130,    54,    79,    54,    81,   126,   149,   150,   151,
+     152,   153,   126,    47,   126,    91,   158,    71,   238,     6,
+       7,   154,    54,    54,    11,    12,    13,    54,    54,    16,
+      54,    67,   108,   109,    21,    22,    54,    54,   143,    26,
+      27,   126,   126,    30,    54,    32,    33,   126,    54,    36,
+      54,    54,    54,    54,    54,    54,    43,   154,   134,   154,
+     136,   143,   138,    25,   154,   101,    53,   147,   143,   157,
+     148,    58,    59,   154,   143,    62,   112,   154,    65,    66,
+     307,   308,    69,    70,   157,   143,   154,   154,   154,   123,
+     124,   127,   154,   154,   143,     0,     0,    84,   257,   319,
+      78,   192,   329,   159,    92,   203,    13,   334,   146,   240,
+     118,    42,    25,   100,   261,   102,   311,   104,   105,   331,
+     347,   348,   349,   350,   351,    -1,   345,   114,   115,   116,
+     117,   118,    -1,   120,    -1,   122,    -1,    -1,    -1,    -1,
+      -1,   128,    -1,    -1,   131,   132,   133,    -1,   135,   136,
+      -1,    -1,    -1,     6,     7,    -1,   143,   144,    11,    12,
+      13,    -1,    -1,    16,    -1,    -1,    -1,    -1,    21,    22,
+      -1,    -1,    -1,    26,    27,    -1,    -1,    30,    -1,    32,
+      33,    -1,    -1,    36,    -1,    -1,    -1,    -1,    -1,    -1,
+      43,    -1,    18,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      53,    -1,    -1,    -1,    -1,    58,    59,    -1,    -1,    62,
+      -1,    -1,    65,    66,    -1,    -1,    69,    70,    44,    45,
+      -1,    -1,    -1,    -1,    50,    51,    -1,    -1,    -1,    -1,
+      -1,    84,    -1,    -1,    -1,    61,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    10,    -1,    -1,    -1,   100,    -1,   102,
+      17,   104,   105,    20,    -1,    -1,    -1,    -1,    -1,    85,
+      -1,   114,   115,   116,   117,   118,    -1,   120,    -1,   122,
+      -1,    -1,    -1,    -1,    41,   128,    -1,    -1,   131,   132,
+     133,    52,   135,   136,   110,   111,    -1,    -1,    -1,    60,
+      -1,   144,    63,   119,    -1,    -1,    -1,    68,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    72,    73,    74,    -1,    76,
+      77,    -1,    -1,    80,    -1,    -1,    87,    -1,    89,    90,
+      -1,    92,    93,    94,    -1,    -1,    97,    -1,    -1,    -1,
+      -1,    98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   137
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   138
 };
 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
 #line 3 "/usr/local/gnu/share/bison/bison.simple"
@@ -1462,7 +1467,7 @@ yyreduce:
   switch (yyn) {
 
 case 4:
-#line 312 "ntp_parser.y"
+#line 313 "ntp_parser.y"
 { 
 					if (input_from_file == 1) {
                     	msyslog(LOG_INFO, "parse error %s line %d ignored\n",
@@ -1472,7 +1477,7 @@ case 4:
                 }
     break;
 case 17:
-#line 341 "ntp_parser.y"
+#line 342 "ntp_parser.y"
 { 
                         struct peer_node *my_node =  create_peer_node(yyvsp[-2].Integer, yyvsp[-1].Address_node, yyvsp[0].Queue); 
                         if (my_node)
@@ -1480,7 +1485,7 @@ case 17:
                     }
     break;
 case 18:
-#line 347 "ntp_parser.y"
+#line 348 "ntp_parser.y"
 { 
                         struct peer_node *my_node = create_peer_node(yyvsp[-1].Integer, yyvsp[0].Address_node, NULL); 
                         if (my_node)
@@ -1488,35 +1493,35 @@ case 18:
                     }
     break;
 case 19:
-#line 355 "ntp_parser.y"
+#line 356 "ntp_parser.y"
 { yyval.Integer = T_Server; }
     break;
 case 20:
-#line 356 "ntp_parser.y"
+#line 357 "ntp_parser.y"
 { yyval.Integer = T_Pool; }
     break;
 case 21:
-#line 357 "ntp_parser.y"
+#line 358 "ntp_parser.y"
 { yyval.Integer = T_Peer; }
     break;
 case 22:
-#line 358 "ntp_parser.y"
+#line 359 "ntp_parser.y"
 { yyval.Integer = T_Broadcast; }
     break;
 case 23:
-#line 359 "ntp_parser.y"
+#line 360 "ntp_parser.y"
 { yyval.Integer = T_Manycastclient; }
     break;
 case 24:
-#line 363 "ntp_parser.y"
+#line 364 "ntp_parser.y"
 { yyval.Address_node = yyvsp[0].Address_node; }
     break;
 case 25:
-#line 364 "ntp_parser.y"
+#line 365 "ntp_parser.y"
 { yyval.Address_node = create_address_node(yyvsp[0].String, default_ai_family); }
     break;
 case 26:
-#line 366 "ntp_parser.y"
+#line 367 "ntp_parser.y"
 {
                         if (yyvsp[-1].Integer == -4)
                             yyval.Address_node = create_address_node(yyvsp[0].String, AF_INET);
@@ -1529,99 +1534,99 @@ case 26:
                     }
     break;
 case 27:
-#line 381 "ntp_parser.y"
+#line 382 "ntp_parser.y"
 { yyval.Address_node = create_address_node(yyvsp[0].String, AF_INET); }
     break;
 case 28:
-#line 382 "ntp_parser.y"
+#line 383 "ntp_parser.y"
 { yyval.Address_node = create_address_node(yyvsp[0].String, AF_INET6); }
     break;
 case 29:
-#line 386 "ntp_parser.y"
+#line 387 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Attr_val); }
     break;
 case 30:
-#line 387 "ntp_parser.y"
+#line 388 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(yyvsp[0].Attr_val); }
     break;
 case 31:
-#line 392 "ntp_parser.y"
+#line 393 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, FLAG_SKEY | FLAG_AUTHENABLE); }
     break;
 case 32:
-#line 393 "ntp_parser.y"
+#line 394 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, FLAG_BURST); }
     break;
 case 33:
-#line 394 "ntp_parser.y"
+#line 395 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, FLAG_IBURST); }
     break;
 case 34:
-#line 395 "ntp_parser.y"
+#line 396 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Key, yyvsp[0].Integer); }
     break;
 case 35:
-#line 396 "ntp_parser.y"
+#line 397 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Minpoll, yyvsp[0].Integer); }
     break;
 case 36:
-#line 397 "ntp_parser.y"
+#line 398 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Maxpoll, yyvsp[0].Integer); }
     break;
 case 37:
-#line 398 "ntp_parser.y"
+#line 399 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, FLAG_NOSELECT);}
     break;
 case 38:
-#line 399 "ntp_parser.y"
+#line 400 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, FLAG_PREEMPT); }
     break;
 case 39:
-#line 400 "ntp_parser.y"
+#line 401 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, FLAG_PREFER); }
     break;
 case 40:
-#line 401 "ntp_parser.y"
+#line 402 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, FLAG_TRUE); }
     break;
 case 41:
-#line 402 "ntp_parser.y"
+#line 403 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Ttl, yyvsp[0].Integer); }
     break;
 case 42:
-#line 403 "ntp_parser.y"
+#line 404 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Mode, yyvsp[0].Integer); }
     break;
 case 43:
-#line 404 "ntp_parser.y"
+#line 405 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Version, yyvsp[0].Integer); }
     break;
 case 44:
-#line 415 "ntp_parser.y"
+#line 416 "ntp_parser.y"
 { my_config.broadcastclient = SIMPLE; }
     break;
 case 45:
-#line 417 "ntp_parser.y"
+#line 418 "ntp_parser.y"
 { my_config.broadcastclient = NOVOLLEY;  }
     break;
 case 46:
-#line 419 "ntp_parser.y"
+#line 420 "ntp_parser.y"
 { append_queue(my_config.manycastserver, yyvsp[0].Queue);  }
     break;
 case 47:
-#line 421 "ntp_parser.y"
+#line 422 "ntp_parser.y"
 { append_queue(my_config.multicastclient, yyvsp[0].Queue);  }
     break;
 case 48:
-#line 432 "ntp_parser.y"
+#line 433 "ntp_parser.y"
 { my_config.auth.autokey = yyvsp[0].Integer;  }
     break;
 case 49:
-#line 434 "ntp_parser.y"
+#line 435 "ntp_parser.y"
 { my_config.auth.control_key = yyvsp[0].Integer;  }
     break;
 case 50:
-#line 436 "ntp_parser.y"
+#line 437 "ntp_parser.y"
 { if (my_config.auth.crypto_cmd_list != NULL) 
 					append_queue(my_config.auth.crypto_cmd_list, yyvsp[0].Queue); 
 		 		else 
@@ -1629,467 +1634,467 @@ case 50:
 			}
     break;
 case 51:
-#line 442 "ntp_parser.y"
+#line 443 "ntp_parser.y"
 { my_config.auth.keys = yyvsp[0].String;  }
     break;
 case 52:
-#line 444 "ntp_parser.y"
+#line 445 "ntp_parser.y"
 { my_config.auth.keysdir = yyvsp[0].String;  }
     break;
 case 53:
-#line 446 "ntp_parser.y"
+#line 447 "ntp_parser.y"
 { my_config.auth.requested_key = yyvsp[0].Integer;  }
     break;
 case 54:
-#line 448 "ntp_parser.y"
+#line 449 "ntp_parser.y"
 { my_config.auth.revoke = yyvsp[0].Integer;  }
     break;
 case 55:
-#line 450 "ntp_parser.y"
+#line 451 "ntp_parser.y"
 { my_config.auth.trusted_key_list = yyvsp[0].Queue;  }
     break;
 case 56:
-#line 454 "ntp_parser.y"
+#line 455 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Attr_val); }
     break;
 case 57:
-#line 455 "ntp_parser.y"
+#line 456 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(yyvsp[0].Attr_val); }
     break;
 case 58:
-#line 460 "ntp_parser.y"
+#line 461 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(CRYPTO_CONF_CERT, yyvsp[0].String); }
     break;
 case 59:
-#line 462 "ntp_parser.y"
+#line 463 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(CRYPTO_CONF_LEAP, yyvsp[0].String); }
     break;
 case 60:
-#line 464 "ntp_parser.y"
+#line 465 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(CRYPTO_CONF_RAND, yyvsp[0].String); }
     break;
 case 61:
-#line 466 "ntp_parser.y"
+#line 467 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(CRYPTO_CONF_PRIV, yyvsp[0].String); }
     break;
 case 62:
-#line 468 "ntp_parser.y"
+#line 469 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(CRYPTO_CONF_SIGN, yyvsp[0].String); }
     break;
 case 63:
-#line 470 "ntp_parser.y"
+#line 471 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(CRYPTO_CONF_IDENT, yyvsp[0].String); }
     break;
 case 64:
-#line 472 "ntp_parser.y"
+#line 473 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(CRYPTO_CONF_IFFPAR, yyvsp[0].String); }
     break;
 case 65:
-#line 474 "ntp_parser.y"
+#line 475 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(CRYPTO_CONF_GQPAR, yyvsp[0].String); }
     break;
 case 66:
-#line 476 "ntp_parser.y"
+#line 477 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(CRYPTO_CONF_MVPAR, yyvsp[0].String); }
     break;
 case 67:
-#line 478 "ntp_parser.y"
+#line 479 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(CRYPTO_CONF_PW, yyvsp[0].String); }
     break;
 case 68:
-#line 488 "ntp_parser.y"
+#line 489 "ntp_parser.y"
 { append_queue(my_config.orphan_cmds,yyvsp[0].Queue);  }
     break;
 case 69:
-#line 492 "ntp_parser.y"
+#line 493 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Attr_val); }
     break;
 case 70:
-#line 493 "ntp_parser.y"
+#line 494 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(yyvsp[0].Attr_val); }
     break;
 case 71:
-#line 498 "ntp_parser.y"
+#line 499 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(PROTO_CEILING, (double)yyvsp[0].Integer); }
     break;
 case 72:
-#line 500 "ntp_parser.y"
+#line 501 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(PROTO_FLOOR, (double)yyvsp[0].Integer); }
     break;
 case 73:
-#line 502 "ntp_parser.y"
+#line 503 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(PROTO_COHORT, (double)yyvsp[0].Integer); }
     break;
 case 74:
-#line 504 "ntp_parser.y"
+#line 505 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(PROTO_ORPHAN, (double)yyvsp[0].Integer); }
     break;
 case 75:
-#line 506 "ntp_parser.y"
+#line 507 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(PROTO_MINDISP, yyvsp[0].Double); }
     break;
 case 76:
-#line 508 "ntp_parser.y"
+#line 509 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(PROTO_MAXDIST, yyvsp[0].Double); }
     break;
 case 77:
-#line 510 "ntp_parser.y"
+#line 511 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(PROTO_MINCLOCK, yyvsp[0].Double); }
     break;
 case 78:
-#line 512 "ntp_parser.y"
+#line 513 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(PROTO_MAXCLOCK, yyvsp[0].Double); }
     break;
 case 79:
-#line 514 "ntp_parser.y"
+#line 515 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(PROTO_MINSANE, (double)yyvsp[0].Integer); }
     break;
 case 80:
-#line 516 "ntp_parser.y"
+#line 517 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(PROTO_BEACON, (double)yyvsp[0].Integer); }
     break;
 case 81:
-#line 518 "ntp_parser.y"
+#line 519 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(PROTO_MAXHOP, (double)yyvsp[0].Integer); }
     break;
 case 82:
-#line 528 "ntp_parser.y"
+#line 529 "ntp_parser.y"
 { append_queue(my_config.stats_list, yyvsp[0].Queue);  }
     break;
 case 83:
-#line 530 "ntp_parser.y"
+#line 531 "ntp_parser.y"
 { my_config.stats_dir = yyvsp[0].String;  }
     break;
 case 84:
-#line 532 "ntp_parser.y"
+#line 533 "ntp_parser.y"
 {
                         enqueue(my_config.filegen_opts, 
                                 create_filegen_node(yyvsp[-1].VoidPtr, yyvsp[0].Queue));                         
                     }
     break;
 case 85:
-#line 539 "ntp_parser.y"
+#line 540 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].VoidPtr); }
     break;
 case 86:
-#line 540 "ntp_parser.y"
+#line 541 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(yyvsp[0].VoidPtr); }
     break;
 case 87:
-#line 545 "ntp_parser.y"
+#line 546 "ntp_parser.y"
 { yyval.VoidPtr = create_pval("clockstats"); }
     break;
 case 88:
-#line 547 "ntp_parser.y"
+#line 548 "ntp_parser.y"
 { yyval.VoidPtr = create_pval("cryptostats"); }
     break;
 case 89:
-#line 549 "ntp_parser.y"
+#line 550 "ntp_parser.y"
 { yyval.VoidPtr = create_pval("loopstats"); }
     break;
 case 90:
-#line 551 "ntp_parser.y"
+#line 552 "ntp_parser.y"
 { yyval.VoidPtr = create_pval("peerstats"); }
     break;
 case 91:
-#line 553 "ntp_parser.y"
+#line 554 "ntp_parser.y"
 { yyval.VoidPtr = create_pval("rawstats"); }
     break;
 case 92:
-#line 555 "ntp_parser.y"
+#line 556 "ntp_parser.y"
 { yyval.VoidPtr = create_pval("sysstats"); }
     break;
 case 93:
-#line 559 "ntp_parser.y"
+#line 560 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Attr_val); }
     break;
 case 94:
-#line 560 "ntp_parser.y"
+#line 561 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(yyvsp[0].Attr_val); }
     break;
 case 95:
-#line 564 "ntp_parser.y"
+#line 565 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(T_File, yyvsp[0].String); }
     break;
 case 96:
-#line 565 "ntp_parser.y"
+#line 566 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Type, yyvsp[0].Integer); }
     break;
 case 97:
-#line 566 "ntp_parser.y"
+#line 567 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, T_Link); }
     break;
 case 98:
-#line 567 "ntp_parser.y"
+#line 568 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, T_Nolink); }
     break;
 case 99:
-#line 568 "ntp_parser.y"
+#line 569 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, T_Enable); }
     break;
 case 100:
-#line 569 "ntp_parser.y"
+#line 570 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, T_Disable); }
     break;
 case 101:
-#line 573 "ntp_parser.y"
+#line 574 "ntp_parser.y"
 { yyval.Integer = FILEGEN_NONE; }
     break;
 case 102:
-#line 574 "ntp_parser.y"
+#line 575 "ntp_parser.y"
 { yyval.Integer = FILEGEN_PID; }
     break;
 case 103:
-#line 575 "ntp_parser.y"
+#line 576 "ntp_parser.y"
 { yyval.Integer = FILEGEN_DAY; }
     break;
 case 104:
-#line 576 "ntp_parser.y"
+#line 577 "ntp_parser.y"
 { yyval.Integer = FILEGEN_WEEK; }
     break;
 case 105:
-#line 577 "ntp_parser.y"
+#line 578 "ntp_parser.y"
 { yyval.Integer = FILEGEN_MONTH; }
     break;
 case 106:
-#line 578 "ntp_parser.y"
+#line 579 "ntp_parser.y"
 { yyval.Integer = FILEGEN_YEAR; }
     break;
 case 107:
-#line 579 "ntp_parser.y"
+#line 580 "ntp_parser.y"
 { yyval.Integer = FILEGEN_AGE; }
     break;
 case 108:
-#line 589 "ntp_parser.y"
+#line 590 "ntp_parser.y"
 {   append_queue(my_config.discard_opts, yyvsp[0].Queue); }
     break;
 case 109:
-#line 591 "ntp_parser.y"
+#line 592 "ntp_parser.y"
 { 
                         enqueue(my_config.restrict_opts, 
                                 create_restrict_node(yyvsp[-1].Address_node, NULL, yyvsp[0].Queue, ip_file->line_no));                          
                     }
     break;
 case 110:
-#line 596 "ntp_parser.y"
+#line 597 "ntp_parser.y"
 { 
                         enqueue(my_config.restrict_opts, 
                                 create_restrict_node(NULL, NULL, yyvsp[0].Queue, ip_file->line_no)); 
                     }
     break;
 case 111:
-#line 601 "ntp_parser.y"
+#line 602 "ntp_parser.y"
 { 
                         enqueue(my_config.restrict_opts, 
                                 create_restrict_node(yyvsp[-3].Address_node, yyvsp[-1].Address_node, yyvsp[0].Queue, ip_file->line_no)); 
                     }
     break;
 case 112:
-#line 608 "ntp_parser.y"
+#line 609 "ntp_parser.y"
 { yyval.Queue = create_queue(); }
     break;
 case 113:
-#line 609 "ntp_parser.y"
+#line 610 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].VoidPtr); }
     break;
 case 114:
-#line 613 "ntp_parser.y"
+#line 614 "ntp_parser.y"
 { yyval.VoidPtr = create_ival(RES_IGNORE); }
     break;
 case 115:
-#line 614 "ntp_parser.y"
+#line 615 "ntp_parser.y"
 { yyval.VoidPtr = create_ival(RES_DEMOBILIZE); }
     break;
 case 116:
-#line 615 "ntp_parser.y"
+#line 616 "ntp_parser.y"
 { yyval.VoidPtr = create_ival(RES_LIMITED); }
     break;
 case 117:
-#line 616 "ntp_parser.y"
+#line 617 "ntp_parser.y"
 { yyval.VoidPtr = create_ival(RES_LPTRAP); }
     break;
 case 118:
-#line 617 "ntp_parser.y"
+#line 618 "ntp_parser.y"
 { yyval.VoidPtr = create_ival(RES_NOMODIFY); }
     break;
 case 119:
-#line 618 "ntp_parser.y"
+#line 619 "ntp_parser.y"
 { yyval.VoidPtr = create_ival(RES_NOPEER); }
     break;
 case 120:
-#line 619 "ntp_parser.y"
+#line 620 "ntp_parser.y"
 { yyval.VoidPtr = create_ival(RES_NOQUERY); }
     break;
 case 121:
-#line 620 "ntp_parser.y"
+#line 621 "ntp_parser.y"
 { yyval.VoidPtr = create_ival(RES_DONTSERVE); }
     break;
 case 122:
-#line 621 "ntp_parser.y"
+#line 622 "ntp_parser.y"
 { yyval.VoidPtr = create_ival(RES_NOTRAP); }
     break;
 case 123:
-#line 622 "ntp_parser.y"
+#line 623 "ntp_parser.y"
 { yyval.VoidPtr = create_ival(RES_DONTTRUST); }
     break;
 case 124:
-#line 623 "ntp_parser.y"
+#line 624 "ntp_parser.y"
 { yyval.VoidPtr = create_ival(RESM_NTPONLY); }
     break;
 case 125:
-#line 624 "ntp_parser.y"
+#line 625 "ntp_parser.y"
 { yyval.VoidPtr = create_ival(RES_VERSION); }
     break;
 case 126:
-#line 628 "ntp_parser.y"
+#line 629 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Attr_val); }
     break;
 case 127:
-#line 629 "ntp_parser.y"
+#line 630 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(yyvsp[0].Attr_val); }
     break;
 case 128:
-#line 633 "ntp_parser.y"
+#line 634 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Average, yyvsp[0].Integer); }
     break;
 case 129:
-#line 634 "ntp_parser.y"
+#line 635 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Minimum, yyvsp[0].Integer); }
     break;
 case 130:
-#line 635 "ntp_parser.y"
+#line 636 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Monitor, yyvsp[0].Integer); }
     break;
 case 131:
-#line 644 "ntp_parser.y"
+#line 645 "ntp_parser.y"
 { enqueue(my_config.fudge, create_addr_opts_node(yyvsp[-1].Address_node, yyvsp[0].Queue));  }
     break;
 case 132:
-#line 648 "ntp_parser.y"
+#line 649 "ntp_parser.y"
 { enqueue(yyvsp[-1].Queue, yyvsp[0].Attr_val); }
     break;
 case 133:
-#line 649 "ntp_parser.y"
+#line 650 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(yyvsp[0].Attr_val); }
     break;
 case 134:
-#line 654 "ntp_parser.y"
+#line 655 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(CLK_HAVETIME1, yyvsp[0].Double); }
     break;
 case 135:
-#line 656 "ntp_parser.y"
+#line 657 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(CLK_HAVETIME2, yyvsp[0].Double); }
     break;
 case 136:
-#line 658 "ntp_parser.y"
+#line 659 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(CLK_HAVEVAL1,  yyvsp[0].Integer); }
     break;
 case 137:
-#line 660 "ntp_parser.y"
+#line 661 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(CLK_HAVEVAL2,  yyvsp[0].String); }
     break;
 case 138:
-#line 662 "ntp_parser.y"
+#line 663 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(CLK_HAVEFLAG1, yyvsp[0].Integer); }
     break;
 case 139:
-#line 664 "ntp_parser.y"
+#line 665 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(CLK_HAVEFLAG2, yyvsp[0].Integer); }
     break;
 case 140:
-#line 666 "ntp_parser.y"
+#line 667 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(CLK_HAVEFLAG3, yyvsp[0].Integer); }
     break;
 case 141:
-#line 668 "ntp_parser.y"
+#line 669 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(CLK_HAVEFLAG4, yyvsp[0].Integer); }
     break;
 case 142:
-#line 677 "ntp_parser.y"
+#line 678 "ntp_parser.y"
 { append_queue(my_config.enable_opts,yyvsp[0].Queue);  }
     break;
 case 143:
-#line 679 "ntp_parser.y"
+#line 680 "ntp_parser.y"
 { append_queue(my_config.disable_opts,yyvsp[0].Queue);  }
     break;
 case 144:
-#line 683 "ntp_parser.y"
+#line 684 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Attr_val); }
     break;
 case 145:
-#line 684 "ntp_parser.y"
+#line 685 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(yyvsp[0].Attr_val); }
     break;
 case 146:
-#line 688 "ntp_parser.y"
+#line 689 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, PROTO_AUTHENTICATE); }
     break;
 case 147:
-#line 689 "ntp_parser.y"
+#line 690 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, PROTO_BROADCLIENT); }
     break;
 case 148:
-#line 690 "ntp_parser.y"
+#line 691 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, PROTO_CAL); }
     break;
 case 149:
-#line 691 "ntp_parser.y"
+#line 692 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, PROTO_KERNEL); }
     break;
 case 150:
-#line 692 "ntp_parser.y"
+#line 693 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, PROTO_MONITOR); }
     break;
 case 151:
-#line 693 "ntp_parser.y"
+#line 694 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, PROTO_NTP); }
     break;
 case 152:
-#line 695 "ntp_parser.y"
+#line 696 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Flag, PROTO_FILEGEN); }
     break;
 case 153:
-#line 703 "ntp_parser.y"
+#line 704 "ntp_parser.y"
 { append_queue(my_config.tinker, yyvsp[0].Queue);  }
     break;
 case 154:
-#line 707 "ntp_parser.y"
+#line 708 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Attr_val); }
     break;
 case 155:
-#line 708 "ntp_parser.y"
+#line 709 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(yyvsp[0].Attr_val); }
     break;
 case 156:
-#line 712 "ntp_parser.y"
+#line 713 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(LOOP_ALLAN, yyvsp[0].Double); }
     break;
 case 157:
-#line 713 "ntp_parser.y"
+#line 714 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(LOOP_PHI, yyvsp[0].Double); }
     break;
 case 158:
-#line 714 "ntp_parser.y"
+#line 715 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(LOOP_FREQ, yyvsp[0].Double); }
     break;
 case 159:
-#line 715 "ntp_parser.y"
+#line 716 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(LOOP_HUFFPUFF, yyvsp[0].Double); }
     break;
 case 160:
-#line 716 "ntp_parser.y"
+#line 717 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(LOOP_PANIC, yyvsp[0].Double); }
     break;
 case 161:
-#line 717 "ntp_parser.y"
+#line 718 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(LOOP_MAX, yyvsp[0].Double); }
     break;
 case 162:
-#line 718 "ntp_parser.y"
+#line 719 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(LOOP_MINSTEP, yyvsp[0].Double); }
     break;
 case 163:
-#line 727 "ntp_parser.y"
+#line 728 "ntp_parser.y"
 {
                     if (curr_include_level >= MAXINCLUDELEVEL) {
                         fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
@@ -2107,112 +2112,116 @@ case 163:
                 }
     break;
 case 164:
-#line 743 "ntp_parser.y"
+#line 744 "ntp_parser.y"
 {
                     while (curr_include_level != -1) 
                         FCLOSE(fp[curr_include_level--]);
                 }
     break;
 case 165:
-#line 749 "ntp_parser.y"
+#line 750 "ntp_parser.y"
 { enqueue(my_config.vars, create_attr_dval(T_Broadcastdelay, yyvsp[0].Double));  }
     break;
 case 166:
-#line 751 "ntp_parser.y"
+#line 752 "ntp_parser.y"
 { enqueue(my_config.vars, create_attr_ival(T_Calldelay, yyvsp[0].Integer));  }
     break;
 case 167:
-#line 753 "ntp_parser.y"
+#line 754 "ntp_parser.y"
 { enqueue(my_config.vars, create_attr_dval(T_Tick, yyvsp[0].Double));  }
     break;
 case 168:
-#line 755 "ntp_parser.y"
+#line 756 "ntp_parser.y"
 { /* Null action, possibly all null parms */ }
     break;
 case 169:
 #line 758 "ntp_parser.y"
-{ enqueue(my_config.vars, create_attr_sval(T_Pidfile, yyvsp[0].String));  }
+{ enqueue(my_config.vars, create_attr_sval(T_Leapfile, yyvsp[0].String)); }
     break;
 case 170:
-#line 760 "ntp_parser.y"
-{ enqueue(my_config.vars, create_attr_sval(T_Logfile, yyvsp[0].String));  }
+#line 761 "ntp_parser.y"
+{ enqueue(my_config.vars, create_attr_sval(T_Pidfile, yyvsp[0].String));  }
     break;
 case 171:
-#line 762 "ntp_parser.y"
-{ enqueue(my_config.vars, create_attr_ival(T_Automax, yyvsp[0].Integer));  }
+#line 763 "ntp_parser.y"
+{ enqueue(my_config.vars, create_attr_sval(T_Logfile, yyvsp[0].String));  }
     break;
 case 172:
 #line 765 "ntp_parser.y"
-{ append_queue(my_config.logconfig, yyvsp[0].Queue);  }
+{ enqueue(my_config.vars, create_attr_ival(T_Automax, yyvsp[0].Integer));  }
     break;
 case 173:
-#line 767 "ntp_parser.y"
-{ append_queue(my_config.phone, yyvsp[0].Queue);  }
+#line 768 "ntp_parser.y"
+{ append_queue(my_config.logconfig, yyvsp[0].Queue);  }
     break;
 case 174:
-#line 769 "ntp_parser.y"
-{ enqueue(my_config.setvar, yyvsp[0].Set_var);  }
+#line 770 "ntp_parser.y"
+{ append_queue(my_config.phone, yyvsp[0].Queue);  }
     break;
 case 175:
-#line 771 "ntp_parser.y"
-{ enqueue(my_config.trap, create_addr_opts_node(yyvsp[-1].Address_node, yyvsp[0].Queue));  }
+#line 772 "ntp_parser.y"
+{ enqueue(my_config.setvar, yyvsp[0].Set_var);  }
     break;
 case 176:
-#line 773 "ntp_parser.y"
-{ append_queue(my_config.ttl, yyvsp[0].Queue); }
+#line 774 "ntp_parser.y"
+{ enqueue(my_config.trap, create_addr_opts_node(yyvsp[-1].Address_node, yyvsp[0].Queue));  }
     break;
 case 177:
-#line 777 "ntp_parser.y"
-{ enqueue(my_config.vars, create_attr_sval(T_Driftfile, yyvsp[0].String)); }
+#line 776 "ntp_parser.y"
+{ append_queue(my_config.ttl, yyvsp[0].Queue); }
     break;
 case 178:
-#line 779 "ntp_parser.y"
+#line 780 "ntp_parser.y"
+{ enqueue(my_config.vars, create_attr_sval(T_Driftfile, yyvsp[0].String)); }
+    break;
+case 179:
+#line 782 "ntp_parser.y"
 { enqueue(my_config.vars, create_attr_ival(T_DriftMinutes, yyvsp[0].Integer)); 
 		  enqueue(my_config.vars, create_attr_sval(T_Driftfile, yyvsp[-1].String)); }
     break;
-case 179:
-#line 781 "ntp_parser.y"
+case 180:
+#line 784 "ntp_parser.y"
 { /* Null driftfile,  indicated by null string "\0" */ 
 		  enqueue(my_config.vars, create_attr_sval(T_Driftfile, "\0")); }
     break;
-case 180:
-#line 787 "ntp_parser.y"
+case 181:
+#line 790 "ntp_parser.y"
 { yyval.Set_var = create_setvar_node(yyvsp[-3].String, yyvsp[-1].String, DEF); }
     break;
-case 181:
-#line 789 "ntp_parser.y"
+case 182:
+#line 792 "ntp_parser.y"
 { yyval.Set_var = create_setvar_node(yyvsp[-2].String, yyvsp[0].String, 0); }
     break;
-case 182:
-#line 794 "ntp_parser.y"
+case 183:
+#line 797 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Attr_val); }
     break;
-case 183:
-#line 795 "ntp_parser.y"
+case 184:
+#line 798 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(yyvsp[0].Attr_val); }
     break;
-case 184:
-#line 799 "ntp_parser.y"
+case 185:
+#line 802 "ntp_parser.y"
 { yyval.Attr_val = create_attr_ival(T_Port, yyvsp[0].Integer); }
     break;
-case 185:
-#line 800 "ntp_parser.y"
+case 186:
+#line 803 "ntp_parser.y"
 { yyval.Attr_val = create_attr_pval(T_Interface, yyvsp[0].Address_node); }
     break;
-case 186:
-#line 805 "ntp_parser.y"
+case 187:
+#line 808 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Attr_val); }
     break;
-case 187:
-#line 806 "ntp_parser.y"
+case 188:
+#line 809 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(yyvsp[0].Attr_val); }
     break;
-case 188:
-#line 810 "ntp_parser.y"
+case 189:
+#line 813 "ntp_parser.y"
 { yyval.Attr_val = create_attr_sval(yyvsp[-1].Integer, yyvsp[0].String); }
     break;
-case 189:
-#line 812 "ntp_parser.y"
+case 190:
+#line 815 "ntp_parser.y"
 { 
                     /* YUCK!! This is needed because '+' and '-' are not special characters 
                      * while '=' is. 
@@ -2227,44 +2236,44 @@ case 189:
                         yyval.Attr_val = create_attr_sval(prefix, type);
                 }
     break;
-case 190:
-#line 828 "ntp_parser.y"
+case 191:
+#line 831 "ntp_parser.y"
 { yyval.Integer = '+'; }
     break;
-case 191:
-#line 829 "ntp_parser.y"
+case 192:
+#line 832 "ntp_parser.y"
 { yyval.Integer = '-'; }
     break;
-case 192:
-#line 830 "ntp_parser.y"
+case 193:
+#line 833 "ntp_parser.y"
 { yyval.Integer = '='; }
     break;
-case 193:
-#line 839 "ntp_parser.y"
+case 194:
+#line 842 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, create_ival(yyvsp[0].Integer)); }
     break;
-case 194:
-#line 840 "ntp_parser.y"
+case 195:
+#line 843 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(create_ival(yyvsp[0].Integer)); }
     break;
-case 195:
-#line 844 "ntp_parser.y"
+case 196:
+#line 847 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, create_pval(yyvsp[0].String)); }
     break;
-case 196:
-#line 845 "ntp_parser.y"
+case 197:
+#line 848 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(create_pval(yyvsp[0].String)); }
     break;
-case 197:
-#line 849 "ntp_parser.y"
+case 198:
+#line 852 "ntp_parser.y"
 { yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Address_node); }
     break;
-case 198:
-#line 850 "ntp_parser.y"
+case 199:
+#line 853 "ntp_parser.y"
 { yyval.Queue = enqueue_in_new_queue(yyvsp[0].Address_node); }
     break;
-case 199:
-#line 855 "ntp_parser.y"
+case 200:
+#line 858 "ntp_parser.y"
 { 
                     if (yyvsp[0].Integer != 0 && yyvsp[0].Integer != 1) {
                         yyerror("Integer value is not boolean (0 or 1). Assuming 1");
@@ -2274,24 +2283,24 @@ case 199:
                         yyval.Integer = yyvsp[0].Integer; 
                 }
     break;
-case 200:
-#line 863 "ntp_parser.y"
+case 201:
+#line 866 "ntp_parser.y"
 { yyval.Integer = 1; }
     break;
-case 201:
-#line 864 "ntp_parser.y"
+case 202:
+#line 867 "ntp_parser.y"
 { yyval.Integer = 0; }
     break;
-case 202:
-#line 868 "ntp_parser.y"
+case 203:
+#line 871 "ntp_parser.y"
 { yyval.Double = (double)yyvsp[0].Integer; }
     break;
-case 203:
-#line 869 "ntp_parser.y"
+case 204:
+#line 872 "ntp_parser.y"
 { yyval.Double = yyvsp[0].Double; }
     break;
-case 204:
-#line 878 "ntp_parser.y"
+case 205:
+#line 881 "ntp_parser.y"
 {
                  my_config.sim_details = create_sim_node(yyvsp[-2].Queue, yyvsp[-1].Queue);
 
@@ -2299,92 +2308,92 @@ case 204:
                  old_config_style = 1;
              }
     break;
-case 205:
-#line 892 "ntp_parser.y"
-{ old_config_style = 0; }
-    break;
 case 206:
-#line 896 "ntp_parser.y"
-{ yyval.Queue = enqueue(yyvsp[-2].Queue, yyvsp[-1].Attr_val); }
+#line 895 "ntp_parser.y"
+{ old_config_style = 0; }
     break;
 case 207:
-#line 897 "ntp_parser.y"
-{ yyval.Queue = enqueue_in_new_queue(yyvsp[-1].Attr_val); }
+#line 899 "ntp_parser.y"
+{ yyval.Queue = enqueue(yyvsp[-2].Queue, yyvsp[-1].Attr_val); }
     break;
 case 208:
-#line 901 "ntp_parser.y"
-{ yyval.Attr_val = create_attr_dval(T_Beep_Delay, yyvsp[0].Double); }
+#line 900 "ntp_parser.y"
+{ yyval.Queue = enqueue_in_new_queue(yyvsp[-1].Attr_val); }
     break;
 case 209:
-#line 902 "ntp_parser.y"
-{ yyval.Attr_val = create_attr_dval(T_Sim_Duration, yyvsp[0].Double); }
+#line 904 "ntp_parser.y"
+{ yyval.Attr_val = create_attr_dval(T_Beep_Delay, yyvsp[0].Double); }
     break;
 case 210:
-#line 906 "ntp_parser.y"
-{ yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Sim_server); }
+#line 905 "ntp_parser.y"
+{ yyval.Attr_val = create_attr_dval(T_Sim_Duration, yyvsp[0].Double); }
     break;
 case 211:
-#line 907 "ntp_parser.y"
-{ yyval.Queue = enqueue_in_new_queue(yyvsp[0].Sim_server); }
+#line 909 "ntp_parser.y"
+{ yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Sim_server); }
     break;
 case 212:
-#line 912 "ntp_parser.y"
-{ yyval.Sim_server = create_sim_server(yyvsp[-4].Address_node, yyvsp[-2].Double, yyvsp[-1].Queue); }
+#line 910 "ntp_parser.y"
+{ yyval.Queue = enqueue_in_new_queue(yyvsp[0].Sim_server); }
     break;
 case 213:
-#line 916 "ntp_parser.y"
-{ yyval.Double = yyvsp[-1].Double; }
+#line 915 "ntp_parser.y"
+{ yyval.Sim_server = create_sim_server(yyvsp[-4].Address_node, yyvsp[-2].Double, yyvsp[-1].Queue); }
     break;
 case 214:
-#line 920 "ntp_parser.y"
-{ yyval.Address_node = yyvsp[0].Address_node; }
+#line 919 "ntp_parser.y"
+{ yyval.Double = yyvsp[-1].Double; }
     break;
 case 215:
-#line 924 "ntp_parser.y"
+#line 923 "ntp_parser.y"
 { yyval.Address_node = yyvsp[0].Address_node; }
     break;
 case 216:
-#line 925 "ntp_parser.y"
-{ yyval.Address_node = create_address_node(yyvsp[0].String, T_String); }
+#line 927 "ntp_parser.y"
+{ yyval.Address_node = yyvsp[0].Address_node; }
     break;
 case 217:
-#line 929 "ntp_parser.y"
-{ yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Sim_script); }
+#line 928 "ntp_parser.y"
+{ yyval.Address_node = create_address_node(yyvsp[0].String, T_String); }
     break;
 case 218:
-#line 930 "ntp_parser.y"
-{ yyval.Queue = enqueue_in_new_queue(yyvsp[0].Sim_script); }
+#line 932 "ntp_parser.y"
+{ yyval.Queue = enqueue(yyvsp[-1].Queue, yyvsp[0].Sim_script); }
     break;
 case 219:
-#line 935 "ntp_parser.y"
-{ yyval.Sim_script = create_sim_script_info(yyvsp[-3].Double, yyvsp[-1].Queue); }
+#line 933 "ntp_parser.y"
+{ yyval.Queue = enqueue_in_new_queue(yyvsp[0].Sim_script); }
     break;
 case 220:
-#line 939 "ntp_parser.y"
-{ yyval.Queue = enqueue(yyvsp[-2].Queue, yyvsp[-1].Attr_val); }
+#line 938 "ntp_parser.y"
+{ yyval.Sim_script = create_sim_script_info(yyvsp[-3].Double, yyvsp[-1].Queue); }
     break;
 case 221:
-#line 940 "ntp_parser.y"
-{ yyval.Queue = enqueue_in_new_queue(yyvsp[-1].Attr_val); }
+#line 942 "ntp_parser.y"
+{ yyval.Queue = enqueue(yyvsp[-2].Queue, yyvsp[-1].Attr_val); }
     break;
 case 222:
-#line 945 "ntp_parser.y"
-{ yyval.Attr_val = create_attr_dval(T_Freq_Offset, yyvsp[0].Double); }
+#line 943 "ntp_parser.y"
+{ yyval.Queue = enqueue_in_new_queue(yyvsp[-1].Attr_val); }
     break;
 case 223:
-#line 947 "ntp_parser.y"
-{ yyval.Attr_val = create_attr_dval(T_Wander, yyvsp[0].Double); }
+#line 948 "ntp_parser.y"
+{ yyval.Attr_val = create_attr_dval(T_Freq_Offset, yyvsp[0].Double); }
     break;
 case 224:
-#line 949 "ntp_parser.y"
-{ yyval.Attr_val = create_attr_dval(T_Jitter, yyvsp[0].Double); }
+#line 950 "ntp_parser.y"
+{ yyval.Attr_val = create_attr_dval(T_Wander, yyvsp[0].Double); }
     break;
 case 225:
-#line 951 "ntp_parser.y"
-{ yyval.Attr_val = create_attr_dval(T_Prop_Delay, yyvsp[0].Double); }
+#line 952 "ntp_parser.y"
+{ yyval.Attr_val = create_attr_dval(T_Jitter, yyvsp[0].Double); }
     break;
 case 226:
-#line 953 "ntp_parser.y"
+#line 954 "ntp_parser.y"
+{ yyval.Attr_val = create_attr_dval(T_Prop_Delay, yyvsp[0].Double); }
+    break;
+case 227:
+#line 956 "ntp_parser.y"
 { yyval.Attr_val = create_attr_dval(T_Proc_Delay, yyvsp[0].Double); }
     break;
 }
@@ -2620,7 +2629,7 @@ yyreturn:
 #endif
   return yyresult;
 }
-#line 957 "ntp_parser.y"
+#line 960 "ntp_parser.y"
 
 
 /* KEYWORDS

==== ntpd/ntp_parser.h ====
2007-06-22 01:25:05-04:00, stenn at deacon.udel.edu +92 -91
  More leapsecond fixes from Dave Mills

--- 1.5/ntpd/ntp_parser.h	2007-06-19 02:36:13 -04:00
+++ 1.6/ntpd/ntp_parser.h	2007-06-22 01:25:05 -04:00
@@ -78,97 +78,98 @@ typedef union {
 # define	T_Keysdir	313
 # define	T_Kod	314
 # define	T_Leap	315
-# define	T_Limited	316
-# define	T_Link	317
-# define	T_Logconfig	318
-# define	T_Logfile	319
-# define	T_Loopstats	320
-# define	T_Lowpriotrap	321
-# define	T_Manycastclient	322
-# define	T_Manycastserver	323
-# define	T_Mask	324
-# define	T_Maxclock	325
-# define	T_Maxdist	326
-# define	T_Maxhop	327
-# define	T_Maxpoll	328
-# define	T_Minclock	329
-# define	T_Mindist	330
-# define	T_Minimum	331
-# define	T_Minpoll	332
-# define	T_Minsane	333
-# define	T_Mode	334
-# define	T_Monitor	335
-# define	T_Month	336
-# define	T_Multicastclient	337
-# define	T_Mvpar	338
-# define	T_Nolink	339
-# define	T_Nomodify	340
-# define	T_None	341
-# define	T_Nopeer	342
-# define	T_Noquery	343
-# define	T_Noselect	344
-# define	T_Noserve	345
-# define	T_Notrap	346
-# define	T_Notrust	347
-# define	T_Novolley	348
-# define	T_Ntp	349
-# define	T_Ntpport	350
-# define	T_Orphan	351
-# define	T_Panic	352
-# define	T_Peer	353
-# define	T_Peerstats	354
-# define	T_Phone	355
-# define	T_Pid	356
-# define	T_Pidfile	357
-# define	T_Pool	358
-# define	T_Port	359
-# define	T_Pps	360
-# define	T_Preempt	361
-# define	T_Prefer	362
-# define	T_Pw	363
-# define	T_RandFile	364
-# define	T_Rawstats	365
-# define	T_Refid	366
-# define	T_Requestkey	367
-# define	T_Restrict	368
-# define	T_Revoke	369
-# define	T_Server	370
-# define	T_Setvar	371
-# define	T_Sign	372
-# define	T_Statistics	373
-# define	T_Stats	374
-# define	T_Statsdir	375
-# define	T_Step	376
-# define	T_Stepout	377
-# define	T_Stratum	378
-# define	T_String	379
-# define	T_Sysstats	380
-# define	T_Tick	381
-# define	T_Time1	382
-# define	T_Time2	383
-# define	T_Tinker	384
-# define	T_Tos	385
-# define	T_Trap	386
-# define	T_True	387
-# define	T_Trustedkey	388
-# define	T_Ttl	389
-# define	T_Type	390
-# define	T_Version	391
-# define	T_Week	392
-# define	T_Year	393
-# define	T_Flag	394
-# define	T_Void	395
-# define	T_EOC	396
-# define	T_Simulate	397
-# define	T_Beep_Delay	398
-# define	T_Sim_Duration	399
-# define	T_Server_Offset	400
-# define	T_Duration	401
-# define	T_Freq_Offset	402
-# define	T_Wander	403
-# define	T_Jitter	404
-# define	T_Prop_Delay	405
-# define	T_Proc_Delay	406
+# define	T_Leapfile	316
+# define	T_Limited	317
+# define	T_Link	318
+# define	T_Logconfig	319
+# define	T_Logfile	320
+# define	T_Loopstats	321
+# define	T_Lowpriotrap	322
+# define	T_Manycastclient	323
+# define	T_Manycastserver	324
+# define	T_Mask	325
+# define	T_Maxclock	326
+# define	T_Maxdist	327
+# define	T_Maxhop	328
+# define	T_Maxpoll	329
+# define	T_Minclock	330
+# define	T_Mindist	331
+# define	T_Minimum	332
+# define	T_Minpoll	333
+# define	T_Minsane	334
+# define	T_Mode	335
+# define	T_Monitor	336
+# define	T_Month	337
+# define	T_Multicastclient	338
+# define	T_Mvpar	339
+# define	T_Nolink	340
+# define	T_Nomodify	341
+# define	T_None	342
+# define	T_Nopeer	343
+# define	T_Noquery	344
+# define	T_Noselect	345
+# define	T_Noserve	346
+# define	T_Notrap	347
+# define	T_Notrust	348
+# define	T_Novolley	349
+# define	T_Ntp	350
+# define	T_Ntpport	351
+# define	T_Orphan	352
+# define	T_Panic	353
+# define	T_Peer	354
+# define	T_Peerstats	355
+# define	T_Phone	356
+# define	T_Pid	357
+# define	T_Pidfile	358
+# define	T_Pool	359
+# define	T_Port	360
+# define	T_Pps	361
+# define	T_Preempt	362
+# define	T_Prefer	363
+# define	T_Pw	364
+# define	T_RandFile	365
+# define	T_Rawstats	366
+# define	T_Refid	367
+# define	T_Requestkey	368
+# define	T_Restrict	369
+# define	T_Revoke	370
+# define	T_Server	371
+# define	T_Setvar	372
+# define	T_Sign	373
+# define	T_Statistics	374
+# define	T_Stats	375
+# define	T_Statsdir	376
+# define	T_Step	377
+# define	T_Stepout	378
+# define	T_Stratum	379
+# define	T_String	380
+# define	T_Sysstats	381
+# define	T_Tick	382
+# define	T_Time1	383
+# define	T_Time2	384
+# define	T_Tinker	385
+# define	T_Tos	386
+# define	T_Trap	387
+# define	T_True	388
+# define	T_Trustedkey	389
+# define	T_Ttl	390
+# define	T_Type	391
+# define	T_Version	392
+# define	T_Week	393
+# define	T_Year	394
+# define	T_Flag	395
+# define	T_Void	396
+# define	T_EOC	397
+# define	T_Simulate	398
+# define	T_Beep_Delay	399
+# define	T_Sim_Duration	400
+# define	T_Server_Offset	401
+# define	T_Duration	402
+# define	T_Freq_Offset	403
+# define	T_Wander	404
+# define	T_Jitter	405
+# define	T_Prop_Delay	406
+# define	T_Proc_Delay	407
 
 
 extern YYSTYPE yylval;

==== ntpd/ntp_parser.y ====
2007-06-22 01:25:05-04:00, stenn at deacon.udel.edu +3 -0
  More leapsecond fixes from Dave Mills

--- 1.10/ntpd/ntp_parser.y	2007-06-19 02:34:55 -04:00
+++ 1.11/ntpd/ntp_parser.y	2007-06-22 01:25:05 -04:00
@@ -142,6 +142,7 @@
 %token		T_Keysdir
 %token		T_Kod
 %token		T_Leap
+%token		T_Leapfile
 %token		T_Limited
 %token		T_Link
 %token		T_Logconfig
@@ -753,6 +754,8 @@ miscellaneous_command
                     { enqueue(my_config.vars, create_attr_dval(T_Tick, $2));  }
 	|	T_Driftfile drift_parm
          { /* Null action, possibly all null parms */ }
+	|	T_Leapfile T_String 
+		{ enqueue(my_config.vars, create_attr_sval(T_Leapfile, $2)); }
 
 	|	T_Pidfile T_String 
                     { enqueue(my_config.vars, create_attr_sval(T_Pidfile, $2));  }

==== ntpd/ntp_proto.c ====
2007-06-22 01:25:05-04:00, stenn at deacon.udel.edu +65 -68
  More leapsecond fixes from Dave Mills

--- 1.254/ntpd/ntp_proto.c	2007-06-19 18:49:38 -04:00
+++ 1.255/ntpd/ntp_proto.c	2007-06-22 01:25:05 -04:00
@@ -228,7 +228,7 @@ transmit(
 			 * otherwise, bump it by three.
 			 */
 			if (peer->flags & FLAG_IBURST &&
-			    peer->unreach == 0) {
+			    peer->unreach < NTP_UNREACH) {
 				peer->burst = NTP_BURST;
 			}
 			if (!(peer->flags & FLAG_PREEMPT))	
@@ -1330,6 +1330,10 @@ clock_update(void)
 		 * future. If triggered by upstream server leap bits and
 		 * the number of bits is at least the sanity threshold,
 		 * schedule a leap for the end of the current month.
+		 *
+		 * If the kernel code is available and enabled, pass the
+		 * current TAI offset to the kernel. Note, if the leap
+		 * hasn't been taken yet, decrement the offset.
 		 */
 		get_systime(&now);
 		if (leap_sec == 0) {
@@ -1337,7 +1341,13 @@ clock_update(void)
 				if (leap_sw == 0) {
 					leap_sw++;
 					sys_tai--;
-					loop_config(LOOP_LEAP, sys_tai);
+					msyslog(LOG_NOTICE,
+					    "TAI offset %d s", sys_tai);
+#ifdef KERNEL_PLL
+					if (pll_control && kern_enable)
+						loop_config(LOOP_LEAP,
+						    0);
+#endif /* KERNEL_PLL */
 				}
 				if (leap_ins - now.l_ui < 28 * 86400)
 					leap_sec = leap_ins - now.l_ui;
@@ -1359,8 +1369,6 @@ clock_update(void)
 			leap_sec = 0;
 		}
 
-printf("xxx %d %d %d %d %d %lu\n", sys_leap, sys_tai, leap_sw, sys_minsane, leap_next, leap_sec);
-
 		/*
 		 * If this is the first time the clock is set,
 		 * reset the leap bits.
@@ -1545,7 +1553,6 @@ peer_crypto_clear(
 #ifdef OPENSSL
 	peer->assoc = 0;
 	peer->crypto = 0;
-
 	if (peer->pkey != NULL)
 		EVP_PKEY_free(peer->pkey);
 	peer->pkey = NULL;
@@ -1553,39 +1560,28 @@ peer_crypto_clear(
 	if (peer->subject != NULL)
 		free(peer->subject);
 	peer->subject = NULL;
-
 	if (peer->issuer != NULL)
 		free(peer->issuer);
 	peer->issuer = NULL;
-
 	peer->pkeyid = 0;
-
 	peer->pcookie = 0;
-
 	if (peer->ident_pkey != NULL)
 		EVP_PKEY_free(peer->ident_pkey);
 	peer->ident_pkey = NULL;
-	
 	memset(&peer->fstamp, 0, sizeof(peer->fstamp));
-
 	if (peer->iffval != NULL)
 		BN_free(peer->iffval);
 	peer->iffval = NULL;
-
 	if (peer->grpkey != NULL)
 		BN_free(peer->grpkey);
 	peer->grpkey = NULL;
-
 	value_free(&peer->cookval);
 	value_free(&peer->recval);
-
 	if (peer->cmmd != NULL) {
 		free(peer->cmmd);
 		peer->cmmd = NULL;
 	}
-
 	key_expire(peer);
-
 	value_free(&peer->encrypt);
 #endif /* OPENSSL */
 }
@@ -2337,7 +2333,7 @@ clock_select(void)
 #ifdef DEBUG
 		if (debug > 1)
 			printf("select: combine offset %.6f\n",
-			   sys_offset);
+			    sys_offset);
 #endif
 	}
 
@@ -2500,13 +2496,14 @@ peer_xmit(
 		get_systime(&peer->xmt);
 		HTONL_FP(&peer->xmt, &xpkt.xmt);
 		sendpkt(&peer->srcadr, peer->dstadr, sys_ttl[peer->ttl],
-			&xpkt, sendlen);
+		    &xpkt, sendlen);
 		peer->sent++;
 #ifdef DEBUG
 		if (debug)
 			printf("transmit: at %ld %s->%s mode %d\n",
-			       current_time, peer->dstadr ? stoa(&peer->dstadr->sin) : "-",
-			       stoa(&peer->srcadr), peer->hmode);
+		    	    current_time, peer->dstadr ?
+			    stoa(&peer->dstadr->sin) : "-",
+		            stoa(&peer->srcadr), peer->hmode);
 #endif
 		return;
 	}
@@ -2578,20 +2575,20 @@ peer_xmit(
 		exten = NULL;
 		switch (peer->hmode) {
 
-			/*
-			 * In broadcast server mode the autokey values are
-			 * required by the broadcast clients. Push them when a
-			 * new keylist is generated; otherwise, push the
-			 * association message so the client can request them at
-			 * other times.
-			 */
+		/*
+		 * In broadcast server mode the autokey values are
+		 * required by the broadcast clients. Push them when a
+		 * new keylist is generated; otherwise, push the
+		 * association message so the client can request them at
+		 * other times.
+		 */
 		case MODE_BROADCAST:
 			if (peer->flags & FLAG_ASSOC)
 				exten = crypto_args(peer, CRYPTO_AUTO |
-						    CRYPTO_RESP, NULL);
+				    CRYPTO_RESP, NULL);
 			else
 				exten = crypto_args(peer, CRYPTO_ASSOC |
-						    CRYPTO_RESP, NULL);
+				    CRYPTO_RESP, NULL);
 			break;
 
 		/*
@@ -2614,10 +2611,10 @@ peer_xmit(
 			 */
 			if (!peer->crypto)
 				exten = crypto_args(peer, CRYPTO_ASSOC,
-						    sys_hostname);
+				    sys_hostname);
 			else if (!(peer->crypto & CRYPTO_FLAG_VALID))
 				exten = crypto_args(peer, CRYPTO_CERT,
-						    peer->issuer);
+				    peer->issuer);
 
 			/*
 			 * Identity. Note we have to sign the
@@ -2627,11 +2624,11 @@ peer_xmit(
 			 */
 			else if (!(peer->crypto & CRYPTO_FLAG_VRFY))
 				exten = crypto_args(peer,
-						    crypto_ident(peer), NULL);
+				    crypto_ident(peer), NULL);
 			else if (sys_leap != LEAP_NOTINSYNC &&
-				 !(peer->crypto & CRYPTO_FLAG_SIGN))
+			    !(peer->crypto & CRYPTO_FLAG_SIGN))
 				exten = crypto_args(peer, CRYPTO_SIGN,
-						    sys_hostname);
+				    sys_hostname);
 
 			/*
 			 * Autokey. We request the cookie only when the
@@ -2644,8 +2641,8 @@ peer_xmit(
 			 * the autokey values without being asked.
 			 */
 			else if (sys_leap != LEAP_NOTINSYNC &&
-				 peer->leap != LEAP_NOTINSYNC &&
-				 !(peer->crypto & CRYPTO_FLAG_AGREE))
+			    peer->leap != LEAP_NOTINSYNC &&
+			    !(peer->crypto & CRYPTO_FLAG_AGREE))
 				exten = crypto_args(peer, CRYPTO_COOK,
 						    NULL);
 			else if (peer->flags & FLAG_ASSOC)
@@ -2660,11 +2657,11 @@ peer_xmit(
 			 * server and client are synchronized.
 			 */
 			else if (sys_leap != LEAP_NOTINSYNC &&
-				 peer->leap != LEAP_NOTINSYNC &&
-				 peer->crypto & CRYPTO_FLAG_TAI &&
-				 !(peer->crypto & CRYPTO_FLAG_LEAP))
+			    peer->leap != LEAP_NOTINSYNC &&
+			    peer->crypto & CRYPTO_FLAG_TAI &&
+			    !(peer->crypto & CRYPTO_FLAG_LEAP))
 				exten = crypto_args(peer, CRYPTO_TAI,
-						    NULL);
+				    NULL);
 			break;
 
 		/*
@@ -2695,17 +2692,17 @@ peer_xmit(
 			 */
 			if (!peer->crypto)
 				exten = crypto_args(peer, CRYPTO_ASSOC,
-						    sys_hostname);
+				    sys_hostname);
 			else if (!(peer->crypto & CRYPTO_FLAG_VALID))
 				exten = crypto_args(peer, CRYPTO_CERT,
-						    peer->issuer);
+				    peer->issuer);
 
 			/*
 			 * Identity
 			 */
 			else if (!(peer->crypto & CRYPTO_FLAG_VRFY))
 				exten = crypto_args(peer,
-						    crypto_ident(peer), NULL);
+				    crypto_ident(peer), NULL);
 
 			/*
 			 * Autokey
@@ -2714,9 +2711,9 @@ peer_xmit(
 				exten = crypto_args(peer, CRYPTO_COOK,
 						    NULL);
 			else if (!(peer->crypto & CRYPTO_FLAG_AUTO) &&
-				 (peer->cast_flags & MDF_BCLNT))
+			    (peer->cast_flags & MDF_BCLNT))
 				exten = crypto_args(peer, CRYPTO_AUTO,
-						    NULL);
+				    NULL);
 
 			/*
 			 * Postamble. We can sign the certificate here,
@@ -2727,10 +2724,10 @@ peer_xmit(
 				exten = crypto_args(peer, CRYPTO_SIGN,
 						    sys_hostname);
 			else if (sys_leap != LEAP_NOTINSYNC &&
-				 peer->crypto & CRYPTO_FLAG_TAI &&
-				 !(peer->crypto & CRYPTO_FLAG_LEAP))
+			    peer->crypto & CRYPTO_FLAG_TAI &&
+			    !(peer->crypto & CRYPTO_FLAG_LEAP))
 				exten = crypto_args(peer, CRYPTO_TAI,
-						    NULL);
+				    NULL);
 			break;
 		}
 
@@ -2753,7 +2750,7 @@ peer_xmit(
 
 			if (exten->opcode != 0) {
 				ltemp = crypto_xmit(&xpkt,
-						       &peer->srcadr, sendlen, exten, 0);
+				    &peer->srcadr, sendlen, exten, 0);
 				if (ltemp == 0) {
 					peer->flash |= TEST9; /* crypto error */
 					free(exten);
@@ -2808,7 +2805,7 @@ peer_xmit(
 		exit (-1);
 	}
 	sendpkt(&peer->srcadr, peer->dstadr, sys_ttl[peer->ttl], &xpkt,
-		sendlen);
+	    sendlen);
 
 	/*
 	 * Calculate the encryption delay. Keep the minimum over
@@ -2826,20 +2823,20 @@ peer_xmit(
 #ifdef OPENSSL
 #ifdef DEBUG
 	if (debug)
-		printf(
-			"transmit: at %ld %s->%s mode %d keyid %08x len %d mac %d index %d\n",
-			current_time, peer->dstadr ? ntoa(&peer->dstadr->sin) : "-",
-			ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen -
-			authlen, authlen, peer->keynumber);
+		printf("transmit: at %ld %s->%s mode %d keyid %08x len %d mac %d index %d\n",
+		    current_time, peer->dstadr ?
+		    ntoa(&peer->dstadr->sin) : "-",
+	 	    ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen -
+		    authlen, authlen, peer->keynumber);
 #endif
 #else
 #ifdef DEBUG
 	if (debug)
-		printf(
-			"transmit: at %ld %s->%s mode %d keyid %08x len %d mac %d\n",
-			current_time, peer->dstadr ? ntoa(&peer->dstadr->sin) : "-",
-			ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen -
-			authlen, authlen);
+		printf("transmit: at %ld %s->%s mode %d keyid %08x len %d mac %d\n",
+		    current_time, peer->dstadr ?
+		    ntoa(&peer->dstadr->sin) : "-",
+		    ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen -
+		    authlen, authlen);
 #endif
 #endif /* OPENSSL */
 }
@@ -3087,7 +3084,7 @@ key_expire(
  *
  * A peer is unfit for synchronization if
  * > TEST10 bad leap or stratum below floor or at or above ceiling
- * > TEST11 root distance exceeded
+ * > TEST11 root distance exceeded for remote peer
  * > TEST12 a direct or indirect synchronization loop would form
  * > TEST13 unreachable or noselect
  */
@@ -3111,12 +3108,12 @@ peer_unfit(
 		rval |= TEST10;		/* stratum out of bounds */
 
 	/*
-	 * A distance error occurs if the root distance is greater than
-	 * or equal to the distance threshold plus the increment due to
-	 * one poll interval.
+	 * A distance error for a remote peer occurs if the root
+	 * distance is greater than or equal to the distance threshold
+	 * plus the increment due to one poll interval.
 	 */
-	if (root_distance(peer) >= sys_maxdist + clock_phi *
-	    ULOGTOD(sys_poll))
+	if (!(peer->flags & FLAG_REFCLOCK) && root_distance(peer) >=
+	    sys_maxdist + clock_phi * ULOGTOD(sys_poll))
 		rval |= TEST11;		/* distance exceeded */
 
 	/*
@@ -3126,8 +3123,8 @@ peer_unfit(
 	 * the orphan parent.
 	 */
 	if (peer->stratum > 1 && peer->refid != htonl(LOOPBACKADR) &&
-	    ((!peer->dstadr || peer->refid == peer->dstadr->addr_refid) ||
-	    peer->refid == sys_refid))
+	    ((!peer->dstadr || peer->refid ==
+	    peer->dstadr->addr_refid) || peer->refid == sys_refid))
 		rval |= TEST12;		/* synch loop */
 
 	/*

==== ntpd/ntp_timer.c ====
2007-06-22 01:25:06-04:00, stenn at deacon.udel.edu +20 -7
  More leapsecond fixes from Dave Mills

--- 1.37/ntpd/ntp_timer.c	2007-06-19 18:49:42 -04:00
+++ 1.38/ntpd/ntp_timer.c	2007-06-22 01:25:06 -04:00
@@ -23,6 +23,10 @@
 # include "ntp_timer.h"
 #endif
 
+#ifdef KERNEL_PLL
+#include "ntp_syscall.h"
+#endif /* KERNEL_PLL */
+
 /*
  * These routines provide support for the event timer.	The timer is
  * implemented by an interrupt routine which sets a flag once every
@@ -33,7 +37,6 @@
  * dispatched to the transmit procedure.  Finally, we call the hourly
  * procedure to do cleanup and print a message.
  */
-
 volatile int interface_interval = 300;     /* update interface every 5 minutes as default */
 	  
 /*
@@ -63,7 +66,6 @@ volatile u_long alarm_overflow;
 #define HOUR	(60 * 60)
 
 u_long current_time;		/* seconds since startup */
-static int tai_sw;		/* kernel TAI switch */
 
 /*
  * Stats.  Number of overflows and number of calls to transmit().
@@ -263,7 +265,7 @@ timer(void)
 #ifdef OPENSSL
 	char	statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
 #endif /* OPENSSL */
-	u_int n;
+	u_int	n;
 
 	current_time += (1<<EVENT_TIMEOUT);
 
@@ -286,9 +288,9 @@ timer(void)
 	}
 
 	/*
-	 * Now dispatch any peers whose event timer has expired. Be careful
-	 * here, since the peer structure might go away as the result of
-	 * the call.
+	 * Now dispatch any peers whose event timer has expired. Be
+	 * careful here, since the peer structure might go away as the
+	 * result of the call.
 	 */
 	for (n = 0; n < NTP_HASH_SIZE; n++) {
 		for (peer = peer_hash[n]; peer != 0; peer = next_peer) {
@@ -309,7 +311,10 @@ timer(void)
 	}
 
 	/*
-	 * Leapseconds.
+	 * Leapseconds. When the time remaining decrements to zero,
+	 * increment the TAI offset. If the kernel code is not available
+	 * or disabled, Do the leap crudely. There are of course races
+	 * here, cheerfully ignored.
 	 */
 	if (leap_sec > 0) {
 		sys_leap = LEAP_ADDSECOND;
@@ -320,7 +325,15 @@ timer(void)
 				sys_tai++;
 				msyslog(LOG_NOTICE, "TAI offset %d s",
 				    sys_tai);
+#ifdef KERNEL_PLL
+				if (!(pll_control && kern_enable))
+					step_systime(-1.0);
+#else /* KERNEL_PLL */
+				step_systime(-1.0);
+#endif /* KERNEL_PLL */
 			}
+			msyslog(LOG_NOTICE, "leap second %+.6f s",
+			    -1.0);
 		}
 	}
 

==== ntpd/ntp_util.c ====
2007-06-22 02:11:16-04:00, stenn at deacon.udel.edu +11 -1
  Leapsecond file support

--- 1.52/ntpd/ntp_util.c	2007-06-22 01:25:06 -04:00
+++ 1.53/ntpd/ntp_util.c	2007-06-22 02:11:16 -04:00
@@ -11,6 +11,7 @@
 #include "ntp_filegen.h"
 #include "ntp_if.h"
 #include "ntp_stdlib.h"
+#include "ntp_assert.h"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -54,7 +55,7 @@
  * File names
  */
 static	char *key_file_name;		/* keys file name */
-static	char *leapseconds_file_name;	/* leapseconds file name */
+char	*leapseconds_file_name;		/* leapseconds file name */
 char	*stats_drift_file;		/* frequency file name */
 static	char *stats_temp_file;		/* temp frequency file name */
 int stats_write_period = 3600;		/* seconds between writes. */
@@ -296,6 +297,10 @@ stats_config(
 			strcpy(parameter,"STATS_FREQ_FILE");
 			break;
 
+		    case STATS_LEAP_FILE:
+			strcpy(parameter,"STATS_LEAP_FILE");
+			break;
+
 		    case STATS_STATSDIR:
 			strcpy(parameter,"STATS_STATSDIR");
 			break;
@@ -457,6 +462,10 @@ stats_config(
 		fclose(fp);;
 		break;
 
+	    case STATS_LEAP_FILE:
+		leapseconds_file_name = invalue;
+		break;
+
 	    default:
 		/* oh well */
 		break;
@@ -753,6 +762,7 @@ leap_file(
 	char	*dp;
 	int	i;
 
+	NTP_REQUIRE(cp != NULL);
 	/*
 	 * Open the file and discard comment lines. If the first
 	 * character of the file name is not '/', prepend the keys

==== ntpd/ntp_util.c ====
2007-06-22 01:25:06-04:00, stenn at deacon.udel.edu +44 -43
  More leapsecond fixes from Dave Mills

--- 1.51/ntpd/ntp_util.c	2007-06-20 01:51:24 -04:00
+++ 1.52/ntpd/ntp_util.c	2007-06-22 01:25:06 -04:00
@@ -54,8 +54,9 @@
  * File names
  */
 static	char *key_file_name;		/* keys file name */
+static	char *leapseconds_file_name;	/* leapseconds file name */
+char	*stats_drift_file;		/* frequency file name */
 static	char *stats_temp_file;		/* temp frequency file name */
-char *stats_drift_file;			/* frequency file name */
 int stats_write_period = 3600;		/* seconds between writes. */
 
 /*
@@ -121,12 +122,11 @@ init_util(void)
 #ifdef OPENSSL
 	filegen_register(&statsdir[0], "cryptostats", &cryptostats);
 #endif /* OPENSSL */
-
 #ifdef DEBUG_TIMING
 	filegen_register(&statsdir[0], "timingstats", &timingstats);
-#endif
+#endif /* DEBUG_TIMING */
 
-leap_file("/etc/leapseconds");	/***** temp for debug *****/
+leap_file("/etc/ntp.leap");	/***** temp for debug *****/
 
 }
 
@@ -372,7 +372,7 @@ stats_config(
 		    "frequency initialized %.3f PPM from %s",
 			old_drift * 1e6, stats_drift_file);
 
-		leap_file("/etc/leapseconds");
+		leap_file("/etc/ntp.leap");
 
 		break;
 	
@@ -396,7 +396,8 @@ stats_config(
 			if (value_l == 0)
 				add_dir_sep = 0;
 			else
-				add_dir_sep = (DIR_SEP == value[value_l - 1]);
+				add_dir_sep = (DIR_SEP ==
+				    value[value_l - 1]);
 
 			if (add_dir_sep)
 			    snprintf(statsdir, sizeof(statsdir),
@@ -698,11 +699,46 @@ record_crypto_stats(
 #endif /* OPENSSL */
 
 
+#ifdef DEBUG_TIMING
+/*
+ * record_timing_stats - write timing statistics to file
+ *
+ * file format:
+ * day (mjd)
+ * time (s past midnight)
+ * text message
+ */
+void
+record_timing_stats(
+	const char *text
+	)
+{
+	static unsigned int flshcnt;
+	l_fp	now;
+	u_long	day;
+
+	if (!stats_control)
+		return;
+
+	get_systime(&now);
+	filegen_setup(&timingstats, now.l_ui);
+	day = now.l_ui / 86400 + MJD_1900;
+	now.l_ui %= 86400;
+	if (timingstats.fp != NULL) {
+		fprintf(timingstats.fp, "%lu %s %s\n", day, lfptoa(&now,
+		    3), text);
+		if (++flshcnt % 100 == 0)
+			fflush(timingstats.fp);
+	}
+}
+#endif
+
+
 /*
- * leap_file - load leapseconds table from file
+ * leap_file - read leapseconds file
  *
  * Read the ERTS leapsecond file in NIST text format and extract the
- * NTP seconds of the latest leap and TAI offset after the leap..
+ * NTP seconds of the latest leap and TAI offset after the leap.
  */
 static void
 leap_file(
@@ -821,41 +857,6 @@ leap_month(
 	 */
 	return (*ptr * L_DAY - ltemp - L_DAY);
 }
-
-
-#ifdef DEBUG_TIMING
-/*
- * record_crypto_stats - write crypto statistics to file
- *
- * file format:
- * day (mjd)
- * time (s past midnight)
- * text message
- */
-void
-record_timing_stats(
-	const char *text
-	)
-{
-	static unsigned int flshcnt;
-	l_fp	now;
-	u_long	day;
-
-	if (!stats_control)
-		return;
-
-	get_systime(&now);
-	filegen_setup(&timingstats, now.l_ui);
-	day = now.l_ui / 86400 + MJD_1900;
-	now.l_ui %= 86400;
-	if (timingstats.fp != NULL) {
-		fprintf(timingstats.fp, "%lu %s %s\n", day, lfptoa(&now,
-		    3), text);
-		if (++flshcnt % 100 == 0)
-			fflush(timingstats.fp);
-	}
-}
-#endif
 
 
 /*


More information about the bk-ntp-dev-send mailing list