#endif
double *create_dval(double val);
void destroy_restrict_node(struct restrict_node *my_node);
+ static int is_sane_resolved_address(struct sockaddr_storage peeraddr, int hmode);
+ static int get_correct_host_mode(int hmode);
+ static void save_and_apply_config_tree(void);
+ void getconfig(int argc,char *argv[]);
#if !defined(SIM)
-static struct sockaddr_storage *get_next_address(struct address_node *addr);
+static sockaddr_u *get_next_address(struct address_node *addr);
#endif
- static void config_other_modes(void);
- static void config_auth(void);
- static void config_tos(void);
- static void config_monitor(void);
- static void config_access(void);
- static void config_tinker(void);
- static void config_system_opts(void);
- static void config_logconfig(void);
- static void config_phone(void);
- static void config_qos(void);
- static void config_setvar(void);
- static void config_ttl(void);
- static void config_trap(void);
- static void config_fudge(void);
- static void config_vars(void);
- static int is_sane_resolved_address(sockaddr_u *peeraddr, int hmode);
- static int get_correct_host_mode(int hmode);
- static void config_peers(void);
- static void config_unpeers(void);
- static void config_ntpd(void);
+ static void config_other_modes(struct config_tree *);
+ static void config_auth(struct config_tree *);
+ static void config_tos(struct config_tree *);
+ static void config_monitor(struct config_tree *);
+ static void config_access(struct config_tree *);
+ static void config_tinker(struct config_tree *);
+ static void config_system_opts(struct config_tree *);
+ static void config_logconfig(struct config_tree *);
+ static void config_phone(struct config_tree *);
+ static void config_qos(struct config_tree *);
+ static void config_setvar(struct config_tree *);
+ static void config_ttl(struct config_tree *);
+ static void config_trap(struct config_tree *);
+ static void config_fudge(struct config_tree *);
+ static void config_vars(struct config_tree *);
+ static void config_peers(struct config_tree *);
+ static void config_unpeers(struct config_tree *);
+
+ static void config_ntpd(struct config_tree *);
#ifdef SIM
- static void config_sim(void);
- static void config_ntpdsim(void);
+ static void config_sim(struct config_tree *);
+ static void config_ntpdsim(struct config_tree *);
#endif
- void getconfig(int argc,char *argv[]);
+
enum gnn_type {
t_UNK, /* Unknown */
t_REF, /* Refclock */
*/
static void
- config_other_modes(void)
+ config_other_modes(
+ struct config_tree *ptree
+ )
{
-
- struct sockaddr_storage addr_sock;
+ sockaddr_u addr_sock;
struct address_node *addr_node;
- if (my_config.broadcastclient) {
- proto_config(PROTO_BROADCLIENT,
- my_config.broadcastclient, 0., NULL);
- my_config.broadcastclient = 0;
- }
+ if (ptree->broadcastclient)
+ proto_config(PROTO_BROADCLIENT, ptree->broadcastclient, 0., NULL);
/* Configure the many-cast servers */
- if (!empty(my_config.manycastserver)) {
- while (!empty(my_config.manycastserver)) {
- addr_node = dequeue(my_config.manycastserver);
-
- ZERO_SOCK(&addr_sock);
- AF(&addr_sock) = (u_short)addr_node->type;
+ addr_node = queue_head(ptree->manycastserver);
+ if (addr_node != NULL) {
+ do {
+ memset((char *)&addr_sock, 0, sizeof(addr_sock));
+ addr_sock.ss_family = (u_short)addr_node->type;
- if (getnetnum(addr_node->address, &addr_sock,
- 1, t_UNK) == 1)
- proto_config(PROTO_MULTICAST_ADD, 0,
- 0., &addr_sock);
+ if (getnetnum(addr_node->address, &addr_sock, 1, t_UNK) == 1)
+ proto_config(PROTO_MULTICAST_ADD, 0, 0., &addr_sock);
- destroy_address_node(addr_node);
- }
+ addr_node = next_node(addr_node);
+ } while (addr_node != NULL);
sys_manycastserver = 1;
}
}
+ #ifdef DEBUG
static void
- config_auth(void)
+ free_config_other_modes(
+ struct config_tree *ptree
+ )
+ {
+ struct address_node *addr_node;
+
+ while (NULL != (addr_node = dequeue(ptree->manycastserver)))
+ destroy_address_node(addr_node);
+
+ while (NULL != (addr_node = dequeue(ptree->multicastclient)))
+ destroy_address_node(addr_node);
+ }
+ #endif /* DEBUG */
+
+
+ static void
+ config_auth(
+ struct config_tree *ptree
+ )
{
+ u_char rankey[9];
struct attr_val *my_val;
int *key_val;
- u_char rankey[9];
int i;
/* Crypto Command */
- while (!empty(my_config.auth.crypto_cmd_list)) {
- my_val = dequeue(my_config.auth.crypto_cmd_list);
+ my_val = queue_head(ptree->auth.crypto_cmd_list);
#ifdef OPENSSL
+ while (my_val != NULL) {
crypto_config(my_val->attr, my_val->value.s);
- #endif /* OPENSSL */
- free(my_val->value.s);
- free_node(my_val);
+ my_val = next_node(my_val);
}
- DESTROY_QUEUE(my_config.auth.crypto_cmd_list);
+ #endif /* OPENSSL */
/* Keysdir Command */
- if (my_config.auth.keysdir) {
+ if (ptree->auth.keysdir) {
if (keysdir != default_keysdir)
free(keysdir);
- keysdir = my_config.auth.keysdir;
- my_config.auth.keysdir = NULL;
+ keysdir = estrdup(ptree->auth.keysdir);
}
+
/* ntp_signd_socket Command */
- if (my_config.auth.ntp_signd_socket) {
+ if (ptree->auth.ntp_signd_socket) {
if (ntp_signd_socket != default_ntp_signd_socket)
free(ntp_signd_socket);
- ntp_signd_socket = my_config.auth.ntp_signd_socket;
- my_config.auth.ntp_signd_socket = NULL;
+ ntp_signd_socket = estrdup(ptree->auth.ntp_signd_socket);
}
#ifdef OPENSSL
static void
- config_access(void)
+ config_access(
+ struct config_tree *ptree
+ )
{
+ static int warned_signd;
struct attr_val * my_opt;
struct restrict_node * my_node;
- struct sockaddr_storage addr_sock;
- struct sockaddr_storage addr_mask;
+ int * curr_flag;
+ sockaddr_u addr_sock;
+ sockaddr_u addr_mask;
int flags;
int mflags;
int restrict_default;
+ const char * signd_warning =
+#ifdef HAVE_NTP_SIGND
+ "MS-SNTP signd operations currently block ntpd degrading service to all clients.";
+#else
+ "mssntp restrict bit ignored, this ntpd was configured without --enable-ntp-signd.";
+#endif
/* Configure the discard options */
- while (!empty(my_config.discard_opts)) {
- my_opt = dequeue(my_config.discard_opts);
+ my_opt = queue_head(ptree->discard_opts);
+ while (my_opt != NULL) {
switch(my_opt->attr) {
}
/* Configure the restrict options */
- while (!empty(my_config.restrict_opts)) {
- my_node = dequeue(my_config.restrict_opts);
+ my_node = queue_head(ptree->restrict_opts);
+ while (my_node != NULL) {
- memset(&addr_sock, 0, sizeof addr_sock);
+ ZERO_SOCK(&addr_sock);
if (NULL == my_node->addr) {
/*
hack_restrict(RESTRICT_FLAGS, &addr_sock, &addr_mask,
mflags, flags);
+ if ((RES_MSSNTP & flags) && !warned_signd) {
+ warned_signd = 1;
+ fprintf(stderr, "%s\n", signd_warning);
+ msyslog(LOG_WARNING, signd_warning);
+ }
+
+ my_node = next_node(my_node);
+ }
+ }
+
+
+ #ifdef DEBUG
+ static void
+ free_config_access(
+ struct config_tree *ptree
+ )
+ {
+ struct attr_val * my_opt;
+ struct restrict_node * my_node;
+ int * curr_flag;
+
+ while (NULL != (my_opt = dequeue(ptree->discard_opts)))
+ free_node(my_opt);
+
+ while (NULL != (my_node = dequeue(ptree->restrict_opts))) {
+ while (NULL != (curr_flag = dequeue(my_node->flags)))
+ free_node(curr_flag);
+
destroy_restrict_node(my_node);
}
}
sys_ttlmax = i - 1;
}
+
+ #ifdef DEBUG
static void
- config_trap(void)
+ free_config_ttl(
+ struct config_tree *ptree
+ )
{
+ /* coming DESTROY_QUEUE(ptree->ttl) is enough */
+ }
+ #endif /* DEBUG */
+
+ static void
+ config_trap(
+ struct config_tree *ptree
+ )
+ {
struct addr_opts_node *curr_trap;
struct attr_val *curr_opt;
- struct sockaddr_storage addr_sock;
- struct sockaddr_storage peeraddr;
+ sockaddr_u addr_sock;
+ sockaddr_u peeraddr;
struct address_node *addr_node;
struct interface *localaddr;
u_short port_no;
* ensure that it is sane
*/
addr_node = curr_fudge->addr;
- memset((char *)&addr_sock, 0, sizeof(addr_sock));
+ ZERO_SOCK(&addr_sock);
- if (getnetnum(addr_node->address, &addr_sock, 1, t_REF) != 1)
+ if (getnetnum(addr_node->address, &addr_sock, 1, t_REF)
+ != 1)
err_flag = 1;
if (!ISREFCLOCKADR(&addr_sock)) {
}
/* Parse all the options to the fudge command */
- memset((void *)&clock_stat, 0, sizeof clock_stat);
+ memset(&clock_stat, 0, sizeof(clock_stat));
- while (!empty(curr_fudge->options)) {
- curr_opt = (struct attr_val *) dequeue(curr_fudge->options);
-
+ curr_opt = queue_head(curr_fudge->options);
+ while (curr_opt != NULL) {
/* The attribute field is used to store the flag.
* Set haveflags with it
*/
}
static void
- config_peers(void)
+ config_peers(
+ struct config_tree *ptree
+ )
{
struct addrinfo *res, *res_bak;
- struct sockaddr_storage peeraddr;
+ sockaddr_u peeraddr;
struct peer_node *curr_peer;
int hmode;
int status;
free_node(curr_peer);
}
}
+ #endif /* DEBUG */
+
static void
- config_unpeers(void)
+ config_unpeers(
+ struct config_tree *ptree
+ )
{
struct addrinfo *res, *res_bak;
- struct sockaddr_storage peeraddr;
+ sockaddr_u peeraddr;
struct unpeer_node *curr_unpeer;
struct peer *peer;
int status;
int found;
- while (!empty(my_config.unpeers)) {
- curr_unpeer = (struct unpeer_node *) dequeue(my_config.unpeers);
+ while (!empty(ptree->unpeers)) {
+ curr_unpeer = (struct unpeer_node *) dequeue(ptree->unpeers);
- /* Attempt to resolve the address */
- memset((char *)&peeraddr, 0, sizeof(peeraddr));
- peeraddr.ss_family = (u_short)curr_unpeer->addr->type;
+ /*
+ * Either AssocID will be zero, and we unpeer by name/
+ * address addr, or it is nonzero and addr NULL.
+ */
+ if (curr_unpeer->assocID) {
+ peer = findpeerbyassoc((u_int)curr_unpeer->assocID);
+ if (peer != NULL) {
+ peer_clear(peer, "GONE");
+ unpeer(peer);
+ }
+
+ /* Ok, everything done. Free up peer node memory */
+ free_node(curr_unpeer);
+ continue;
+ }
- status = get_multiple_netnums(curr_unpeer->addr->address, &peeraddr, &res, 0, t_UNK);
+ /* Attempt to resolve the name or address */
+ ZERO_SOCK(&peeraddr);
+ AF(&peeraddr) = (u_short)curr_unpeer->addr->type;
+
+ status = get_multiple_netnums(
+ curr_unpeer->addr->address, &peeraddr, &res, 0,
+ t_UNK);
/* I don't know why getnetnum would return -1.
* The old code had this test, so I guess it must be
case 50:
/* Line 1455 of yacc.c */
-#line 408 "ntp_parser.y"
+#line 409 "ntp_parser.y"
- { my_config.broadcastclient = SIMPLE; }
+ { cfgt.broadcastclient = SIMPLE; }
break;
case 51:
/* Line 1455 of yacc.c */
-#line 410 "ntp_parser.y"
+#line 411 "ntp_parser.y"
- { my_config.broadcastclient = NOVOLLEY; }
+ { cfgt.broadcastclient = NOVOLLEY; }
break;
case 52:
/* Line 1455 of yacc.c */
-#line 412 "ntp_parser.y"
+#line 413 "ntp_parser.y"
- { append_queue(my_config.manycastserver, (yyvsp[(2) - (2)].Queue)); }
+ { append_queue(cfgt.manycastserver, (yyvsp[(2) - (2)].Queue)); }
break;
case 53:
/* Line 1455 of yacc.c */
-#line 414 "ntp_parser.y"
+#line 415 "ntp_parser.y"
- { append_queue(my_config.multicastclient, (yyvsp[(2) - (2)].Queue)); }
+ { append_queue(cfgt.multicastclient, (yyvsp[(2) - (2)].Queue)); }
break;
case 54:
/* Line 1455 of yacc.c */
-#line 425 "ntp_parser.y"
+#line 426 "ntp_parser.y"
- { my_config.auth.autokey = (yyvsp[(2) - (2)].Integer); }
+ { cfgt.auth.autokey = (yyvsp[(2) - (2)].Integer); }
break;
case 55:
/* Line 1455 of yacc.c */
-#line 427 "ntp_parser.y"
+#line 428 "ntp_parser.y"
- { my_config.auth.control_key = (yyvsp[(2) - (2)].Integer); }
+ { cfgt.auth.control_key = (yyvsp[(2) - (2)].Integer); }
break;
case 56:
/* Line 1455 of yacc.c */
-#line 429 "ntp_parser.y"
+#line 430 "ntp_parser.y"
{
- if (my_config.auth.crypto_cmd_list != NULL)
- append_queue(my_config.auth.crypto_cmd_list, (yyvsp[(2) - (2)].Queue));
+ if (cfgt.auth.crypto_cmd_list != NULL)
+ append_queue(cfgt.auth.crypto_cmd_list, (yyvsp[(2) - (2)].Queue));
else
- my_config.auth.crypto_cmd_list = (yyvsp[(2) - (2)].Queue);
+ cfgt.auth.crypto_cmd_list = (yyvsp[(2) - (2)].Queue);
cryptosw++;
}
break;
case 57:
/* Line 1455 of yacc.c */
-#line 437 "ntp_parser.y"
+#line 438 "ntp_parser.y"
- { my_config.auth.keys = (yyvsp[(2) - (2)].String); }
+ { cfgt.auth.keys = (yyvsp[(2) - (2)].String); }
break;
case 58:
/* Line 1455 of yacc.c */
-#line 439 "ntp_parser.y"
+#line 440 "ntp_parser.y"
- { my_config.auth.keysdir = (yyvsp[(2) - (2)].String); }
+ { cfgt.auth.keysdir = (yyvsp[(2) - (2)].String); }
break;
case 59:
/* Line 1455 of yacc.c */
-#line 441 "ntp_parser.y"
+#line 442 "ntp_parser.y"
- { my_config.auth.request_key = (yyvsp[(2) - (2)].Integer); }
+ { cfgt.auth.request_key = (yyvsp[(2) - (2)].Integer); }
break;
case 60:
/* Line 1455 of yacc.c */
-#line 443 "ntp_parser.y"
+#line 444 "ntp_parser.y"
- { my_config.auth.trusted_key_list = (yyvsp[(2) - (2)].Queue); }
+ { cfgt.auth.trusted_key_list = (yyvsp[(2) - (2)].Queue); }
break;
case 61:
/* Line 1455 of yacc.c */
-#line 445 "ntp_parser.y"
+#line 446 "ntp_parser.y"
- { my_config.auth.ntp_signd_socket = (yyvsp[(2) - (2)].String); }
+ { cfgt.auth.ntp_signd_socket = (yyvsp[(2) - (2)].String); }
break;
case 63:
case 70:
/* Line 1455 of yacc.c */
-#line 469 "ntp_parser.y"
+#line 470 "ntp_parser.y"
- { my_config.auth.revoke = (yyvsp[(2) - (2)].Integer); }
+ { cfgt.auth.revoke = (yyvsp[(2) - (2)].Integer); }
break;
case 71:
case 72:
/* Line 1455 of yacc.c */
-#line 481 "ntp_parser.y"
+#line 482 "ntp_parser.y"
- { append_queue(my_config.orphan_cmds,(yyvsp[(2) - (2)].Queue)); }
+ { append_queue(cfgt.orphan_cmds,(yyvsp[(2) - (2)].Queue)); }
break;
case 73:
case 86:
/* Line 1455 of yacc.c */
-#line 521 "ntp_parser.y"
+#line 522 "ntp_parser.y"
- { append_queue(my_config.stats_list, (yyvsp[(2) - (2)].Queue)); }
+ { append_queue(cfgt.stats_list, (yyvsp[(2) - (2)].Queue)); }
break;
case 87:
/* Line 1455 of yacc.c */
-#line 523 "ntp_parser.y"
+#line 524 "ntp_parser.y"
- { my_config.stats_dir = (yyvsp[(2) - (2)].String); }
+ { cfgt.stats_dir = (yyvsp[(2) - (2)].String); }
break;
case 88:
/* Line 1455 of yacc.c */
-#line 525 "ntp_parser.y"
+#line 526 "ntp_parser.y"
{
- enqueue(my_config.filegen_opts,
+ enqueue(cfgt.filegen_opts,
create_filegen_node((yyvsp[(2) - (3)].VoidPtr), (yyvsp[(3) - (3)].Queue)));
}
break;
case 114:
/* Line 1455 of yacc.c */
-#line 588 "ntp_parser.y"
+#line 589 "ntp_parser.y"
{
- append_queue(my_config.discard_opts, (yyvsp[(2) - (2)].Queue));
+ append_queue(cfgt.discard_opts, (yyvsp[(2) - (2)].Queue));
}
break;
case 115:
/* Line 1455 of yacc.c */
-#line 592 "ntp_parser.y"
+#line 593 "ntp_parser.y"
{
- enqueue(my_config.restrict_opts,
+ enqueue(cfgt.restrict_opts,
create_restrict_node((yyvsp[(2) - (3)].Address_node), NULL, (yyvsp[(3) - (3)].Queue), ip_file->line_no));
}
break;
case 116:
/* Line 1455 of yacc.c */
-#line 597 "ntp_parser.y"
+#line 598 "ntp_parser.y"
{
- enqueue(my_config.restrict_opts,
+ enqueue(cfgt.restrict_opts,
create_restrict_node(NULL, NULL, (yyvsp[(3) - (3)].Queue), ip_file->line_no));
}
break;
case 117:
/* Line 1455 of yacc.c */
-#line 602 "ntp_parser.y"
+#line 603 "ntp_parser.y"
{
- enqueue(my_config.restrict_opts,
+ enqueue(cfgt.restrict_opts,
create_restrict_node(
create_address_node(
estrdup("0.0.0.0"),
case 118:
/* Line 1455 of yacc.c */
-#line 615 "ntp_parser.y"
+#line 616 "ntp_parser.y"
{
- enqueue(my_config.restrict_opts,
+ enqueue(cfgt.restrict_opts,
create_restrict_node(
create_address_node(
estrdup("::"),
case 119:
/* Line 1455 of yacc.c */
-#line 628 "ntp_parser.y"
+#line 629 "ntp_parser.y"
{
- enqueue(my_config.restrict_opts,
+ enqueue(cfgt.restrict_opts,
create_restrict_node((yyvsp[(2) - (5)].Address_node), (yyvsp[(4) - (5)].Address_node), (yyvsp[(5) - (5)].Queue), ip_file->line_no));
}
break;
case 141:
/* Line 1455 of yacc.c */
-#line 676 "ntp_parser.y"
- { enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); }
+#line 674 "ntp_parser.y"
- { enqueue(my_config.fudge, create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Queue))); }
++ { enqueue(cfgt.fudge, create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Queue))); }
break;
case 142:
/* Line 1455 of yacc.c */
#line 707 "ntp_parser.y"
- { append_queue(my_config.enable_opts,(yyvsp[(2) - (2)].Queue)); }
- { append_queue(cfgt.disable_opts,(yyvsp[(2) - (2)].Queue)); }
++ { append_queue(cfgt.enable_opts,(yyvsp[(2) - (2)].Queue)); }
break;
case 153:
/* Line 1455 of yacc.c */
-#line 711 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); }
+#line 709 "ntp_parser.y"
- { append_queue(my_config.disable_opts,(yyvsp[(2) - (2)].Queue)); }
++ { append_queue(cfgt.disable_opts,(yyvsp[(2) - (2)].Queue)); }
break;
case 154:
case 163:
/* Line 1455 of yacc.c */
-#line 735 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); }
+#line 733 "ntp_parser.y"
- { append_queue(my_config.tinker, (yyvsp[(2) - (2)].Queue)); }
++ { append_queue(cfgt.tinker, (yyvsp[(2) - (2)].Queue)); }
break;
case 164:
/* Line 1455 of yacc.c */
#line 779 "ntp_parser.y"
- { enqueue(my_config.vars, create_attr_dval(T_Broadcastdelay, (yyvsp[(2) - (2)].Double))); }
- { enqueue(cfgt.vars, create_attr_ival(T_Calldelay, (yyvsp[(2) - (2)].Integer))); }
++ { enqueue(cfgt.vars, create_attr_dval(T_Broadcastdelay, (yyvsp[(2) - (2)].Double))); }
break;
case 176:
/* Line 1455 of yacc.c */
#line 781 "ntp_parser.y"
- { enqueue(my_config.vars, create_attr_ival(T_Calldelay, (yyvsp[(2) - (2)].Integer))); }
- { enqueue(cfgt.vars, create_attr_dval(T_Tick, (yyvsp[(2) - (2)].Double))); }
++ { enqueue(cfgt.vars, create_attr_ival(T_Calldelay, (yyvsp[(2) - (2)].Integer))); }
break;
case 177:
/* Line 1455 of yacc.c */
#line 783 "ntp_parser.y"
- { enqueue(my_config.vars, create_attr_dval(T_Tick, (yyvsp[(2) - (2)].Double))); }
- { /* Null action, possibly all null parms */ }
++ { enqueue(cfgt.vars, create_attr_dval(T_Tick, (yyvsp[(2) - (2)].Double))); }
break;
case 178:
case 179:
/* Line 1455 of yacc.c */
-#line 788 "ntp_parser.y"
- { enqueue(cfgt.vars, create_attr_sval(T_Pidfile, (yyvsp[(2) - (2)].String))); }
+#line 787 "ntp_parser.y"
- { enqueue(my_config.vars, create_attr_sval(T_Leapfile, (yyvsp[(2) - (2)].String))); }
++ { enqueue(cfgt.vars, create_attr_sval(T_Leapfile, (yyvsp[(2) - (2)].String))); }
break;
case 180:
/* Line 1455 of yacc.c */
#line 790 "ntp_parser.y"
- { enqueue(my_config.vars, create_attr_sval(T_Pidfile, (yyvsp[(2) - (2)].String))); }
- { enqueue(cfgt.vars, create_attr_sval(T_Logfile, (yyvsp[(2) - (2)].String))); }
++ { enqueue(cfgt.vars, create_attr_sval(T_Pidfile, (yyvsp[(2) - (2)].String))); }
break;
case 181:
/* Line 1455 of yacc.c */
#line 792 "ntp_parser.y"
- { enqueue(my_config.vars, create_attr_sval(T_Logfile, (yyvsp[(2) - (2)].String))); }
- { enqueue(cfgt.vars, create_attr_ival(T_Automax, (yyvsp[(2) - (2)].Integer))); }
++ { enqueue(cfgt.vars, create_attr_sval(T_Logfile, (yyvsp[(2) - (2)].String))); }
break;
case 182:
/* Line 1455 of yacc.c */
-#line 795 "ntp_parser.y"
- { append_queue(cfgt.logconfig, (yyvsp[(2) - (2)].Queue)); }
+#line 794 "ntp_parser.y"
- { enqueue(my_config.vars, create_attr_ival(T_Automax, (yyvsp[(2) - (2)].Integer))); }
++ { enqueue(cfgt.vars, create_attr_ival(T_Automax, (yyvsp[(2) - (2)].Integer))); }
break;
case 183:
/* Line 1455 of yacc.c */
#line 797 "ntp_parser.y"
- { append_queue(my_config.logconfig, (yyvsp[(2) - (2)].Queue)); }
- { append_queue(cfgt.phone, (yyvsp[(2) - (2)].Queue)); }
++ { append_queue(cfgt.logconfig, (yyvsp[(2) - (2)].Queue)); }
break;
case 184:
/* Line 1455 of yacc.c */
#line 799 "ntp_parser.y"
- { append_queue(my_config.phone, (yyvsp[(2) - (2)].Queue)); }
- { enqueue(cfgt.setvar, (yyvsp[(2) - (2)].Set_var)); }
++ { append_queue(cfgt.phone, (yyvsp[(2) - (2)].Queue)); }
break;
case 185:
/* Line 1455 of yacc.c */
#line 801 "ntp_parser.y"
- { enqueue(my_config.setvar, (yyvsp[(2) - (2)].Set_var)); }
- { enqueue(cfgt.trap, create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Queue))); }
++ { enqueue(cfgt.setvar, (yyvsp[(2) - (2)].Set_var)); }
break;
case 186:
/* Line 1455 of yacc.c */
#line 803 "ntp_parser.y"
- { enqueue(my_config.trap, create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Queue))); }
- { append_queue(cfgt.ttl, (yyvsp[(2) - (2)].Queue)); }
++ { enqueue(cfgt.trap, create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Queue))); }
break;
case 187:
/* Line 1455 of yacc.c */
#line 805 "ntp_parser.y"
- { append_queue(my_config.ttl, (yyvsp[(2) - (2)].Queue)); }
- { enqueue(cfgt.qos, create_attr_sval(T_Qos, (yyvsp[(2) - (2)].String))); }
++ { append_queue(cfgt.ttl, (yyvsp[(2) - (2)].Queue)); }
break;
case 188:
/* Line 1455 of yacc.c */
-#line 809 "ntp_parser.y"
- { enqueue(cfgt.vars, create_attr_sval(T_Driftfile, (yyvsp[(1) - (1)].String))); }
+#line 807 "ntp_parser.y"
- { enqueue(my_config.qos, create_attr_sval(T_Qos, (yyvsp[(2) - (2)].String))); }
++ { enqueue(cfgt.qos, create_attr_sval(T_Qos, (yyvsp[(2) - (2)].String))); }
break;
case 189:
/* Line 1455 of yacc.c */
#line 811 "ntp_parser.y"
- { enqueue(my_config.vars, create_attr_sval(T_Driftfile, (yyvsp[(1) - (1)].String))); }
- { enqueue(cfgt.vars, create_attr_dval(T_WanderThreshold, (yyvsp[(2) - (2)].Double)));
- enqueue(cfgt.vars, create_attr_sval(T_Driftfile, (yyvsp[(1) - (2)].String))); }
++ { enqueue(cfgt.vars, create_attr_sval(T_Driftfile, (yyvsp[(1) - (1)].String))); }
break;
case 190:
/* Line 1455 of yacc.c */
-#line 814 "ntp_parser.y"
- { enqueue(cfgt.vars, create_attr_sval(T_Driftfile, "\0")); }
+#line 813 "ntp_parser.y"
- { enqueue(my_config.vars, create_attr_dval(T_WanderThreshold, (yyvsp[(2) - (2)].Double)));
- enqueue(my_config.vars, create_attr_sval(T_Driftfile, (yyvsp[(1) - (2)].String))); }
++ { enqueue(cfgt.vars, create_attr_dval(T_WanderThreshold, (yyvsp[(2) - (2)].Double)));
++ enqueue(cfgt.vars, create_attr_sval(T_Driftfile, (yyvsp[(1) - (2)].String))); }
break;
case 191:
/* Line 1455 of yacc.c */
-#line 819 "ntp_parser.y"
- { (yyval.Set_var) = create_setvar_node((yyvsp[(1) - (4)].String), (yyvsp[(3) - (4)].String), DEF); }
+#line 816 "ntp_parser.y"
- { enqueue(my_config.vars, create_attr_sval(T_Driftfile, "\0")); }
++ { enqueue(cfgt.vars, create_attr_sval(T_Driftfile, "\0")); }
break;
case 192:
{ (yyval.Double) = (yyvsp[(1) - (1)].Double); }
break;
- case 211:
+ case 212:
/* Line 1455 of yacc.c */
-#line 900 "ntp_parser.y"
+#line 902 "ntp_parser.y"
{
- my_config.sim_details = create_sim_node((yyvsp[(3) - (5)].Queue), (yyvsp[(4) - (5)].Queue));
+ cfgt.sim_details = create_sim_node((yyvsp[(3) - (5)].Queue), (yyvsp[(4) - (5)].Queue));
/* Reset the old_config_style variable */
old_config_style = 1;