2 * configparser.y -- yacc grammar for unbound configuration files
4 * Copyright (c) 2001-2006, NLnet Labs. All rights reserved.
6 * Copyright (c) 2007, NLnet Labs. All rights reserved.
8 * This software is open source.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
14 * Redistributions of source code must retain the above copyright notice,
15 * this list of conditions and the following disclaimer.
17 * Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
21 * Neither the name of the NLNET LABS nor the names of its contributors may
22 * be used to endorse or promote products derived from this software without
23 * specific prior written permission.
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
31 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47 #include "util/configyyrename.h"
48 #include "util/config_file.h"
49 #include "util/net_help.h"
52 void ub_c_error(const char *message);
54 /* these need to be global, otherwise they cannot be used inside yacc */
55 extern struct config_parser_state* cfg_parser;
58 #define OUTYY(s) printf s /* used ONLY when debugging */
68 %token SPACE LETTER NEWLINE COMMENT COLON ANY ZONESTR
69 %token <str> STRING_ARG
70 %token VAR_SERVER VAR_VERBOSITY VAR_NUM_THREADS VAR_PORT
71 %token VAR_OUTGOING_RANGE VAR_INTERFACE
72 %token VAR_DO_IP4 VAR_DO_IP6 VAR_PREFER_IP6 VAR_DO_UDP VAR_DO_TCP
73 %token VAR_TCP_MSS VAR_OUTGOING_TCP_MSS
74 %token VAR_CHROOT VAR_USERNAME VAR_DIRECTORY VAR_LOGFILE VAR_PIDFILE
75 %token VAR_MSG_CACHE_SIZE VAR_MSG_CACHE_SLABS VAR_NUM_QUERIES_PER_THREAD
76 %token VAR_RRSET_CACHE_SIZE VAR_RRSET_CACHE_SLABS VAR_OUTGOING_NUM_TCP
77 %token VAR_INFRA_HOST_TTL VAR_INFRA_LAME_TTL VAR_INFRA_CACHE_SLABS
78 %token VAR_INFRA_CACHE_NUMHOSTS VAR_INFRA_CACHE_LAME_SIZE VAR_NAME
79 %token VAR_STUB_ZONE VAR_STUB_HOST VAR_STUB_ADDR VAR_TARGET_FETCH_POLICY
80 %token VAR_HARDEN_SHORT_BUFSIZE VAR_HARDEN_LARGE_QUERIES
81 %token VAR_FORWARD_ZONE VAR_FORWARD_HOST VAR_FORWARD_ADDR
82 %token VAR_DO_NOT_QUERY_ADDRESS VAR_HIDE_IDENTITY VAR_HIDE_VERSION
83 %token VAR_IDENTITY VAR_VERSION VAR_HARDEN_GLUE VAR_MODULE_CONF
84 %token VAR_TRUST_ANCHOR_FILE VAR_TRUST_ANCHOR VAR_VAL_OVERRIDE_DATE
85 %token VAR_BOGUS_TTL VAR_VAL_CLEAN_ADDITIONAL VAR_VAL_PERMISSIVE_MODE
86 %token VAR_INCOMING_NUM_TCP VAR_MSG_BUFFER_SIZE VAR_KEY_CACHE_SIZE
87 %token VAR_KEY_CACHE_SLABS VAR_TRUSTED_KEYS_FILE
88 %token VAR_VAL_NSEC3_KEYSIZE_ITERATIONS VAR_USE_SYSLOG
89 %token VAR_OUTGOING_INTERFACE VAR_ROOT_HINTS VAR_DO_NOT_QUERY_LOCALHOST
90 %token VAR_CACHE_MAX_TTL VAR_HARDEN_DNSSEC_STRIPPED VAR_ACCESS_CONTROL
91 %token VAR_LOCAL_ZONE VAR_LOCAL_DATA VAR_INTERFACE_AUTOMATIC
92 %token VAR_STATISTICS_INTERVAL VAR_DO_DAEMONIZE VAR_USE_CAPS_FOR_ID
93 %token VAR_STATISTICS_CUMULATIVE VAR_OUTGOING_PORT_PERMIT
94 %token VAR_OUTGOING_PORT_AVOID VAR_DLV_ANCHOR_FILE VAR_DLV_ANCHOR
95 %token VAR_NEG_CACHE_SIZE VAR_HARDEN_REFERRAL_PATH VAR_PRIVATE_ADDRESS
96 %token VAR_PRIVATE_DOMAIN VAR_REMOTE_CONTROL VAR_CONTROL_ENABLE
97 %token VAR_CONTROL_INTERFACE VAR_CONTROL_PORT VAR_SERVER_KEY_FILE
98 %token VAR_SERVER_CERT_FILE VAR_CONTROL_KEY_FILE VAR_CONTROL_CERT_FILE
99 %token VAR_CONTROL_USE_CERT
100 %token VAR_EXTENDED_STATISTICS VAR_LOCAL_DATA_PTR VAR_JOSTLE_TIMEOUT
101 %token VAR_STUB_PRIME VAR_UNWANTED_REPLY_THRESHOLD VAR_LOG_TIME_ASCII
102 %token VAR_DOMAIN_INSECURE VAR_PYTHON VAR_PYTHON_SCRIPT VAR_VAL_SIG_SKEW_MIN
103 %token VAR_VAL_SIG_SKEW_MAX VAR_CACHE_MIN_TTL VAR_VAL_LOG_LEVEL
104 %token VAR_AUTO_TRUST_ANCHOR_FILE VAR_KEEP_MISSING VAR_ADD_HOLDDOWN
105 %token VAR_DEL_HOLDDOWN VAR_SO_RCVBUF VAR_EDNS_BUFFER_SIZE VAR_PREFETCH
106 %token VAR_PREFETCH_KEY VAR_SO_SNDBUF VAR_SO_REUSEPORT VAR_HARDEN_BELOW_NXDOMAIN
107 %token VAR_IGNORE_CD_FLAG VAR_LOG_QUERIES VAR_TCP_UPSTREAM VAR_SSL_UPSTREAM
108 %token VAR_SSL_SERVICE_KEY VAR_SSL_SERVICE_PEM VAR_SSL_PORT VAR_FORWARD_FIRST
109 %token VAR_STUB_FIRST VAR_MINIMAL_RESPONSES VAR_RRSET_ROUNDROBIN
110 %token VAR_MAX_UDP_SIZE VAR_DELAY_CLOSE
111 %token VAR_UNBLOCK_LAN_ZONES VAR_INSECURE_LAN_ZONES
112 %token VAR_INFRA_CACHE_MIN_RTT
113 %token VAR_DNS64_PREFIX VAR_DNS64_SYNTHALL
114 %token VAR_DNSTAP VAR_DNSTAP_ENABLE VAR_DNSTAP_SOCKET_PATH
115 %token VAR_DNSTAP_SEND_IDENTITY VAR_DNSTAP_SEND_VERSION
116 %token VAR_DNSTAP_IDENTITY VAR_DNSTAP_VERSION
117 %token VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES
118 %token VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES
119 %token VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES
120 %token VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES
121 %token VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES
122 %token VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES
123 %token VAR_HARDEN_ALGO_DOWNGRADE VAR_IP_TRANSPARENT
124 %token VAR_DISABLE_DNSSEC_LAME_CHECK
125 %token VAR_RATELIMIT VAR_RATELIMIT_SLABS VAR_RATELIMIT_SIZE
126 %token VAR_RATELIMIT_FOR_DOMAIN VAR_RATELIMIT_BELOW_DOMAIN VAR_RATELIMIT_FACTOR
127 %token VAR_CAPS_WHITELIST VAR_CACHE_MAX_NEGATIVE_TTL VAR_PERMIT_SMALL_HOLDDOWN
128 %token VAR_QNAME_MINIMISATION VAR_IP_FREEBIND VAR_DEFINE_TAG VAR_LOCAL_ZONE_TAG
129 %token VAR_ACCESS_CONTROL_TAG VAR_LOCAL_ZONE_OVERRIDE
130 %token VAR_ACCESS_CONTROL_TAG_ACTION VAR_ACCESS_CONTROL_TAG_DATA
133 toplevelvars: /* empty */ | toplevelvars toplevelvar ;
134 toplevelvar: serverstart contents_server | stubstart contents_stub |
135 forwardstart contents_forward | pythonstart contents_py |
136 rcstart contents_rc | dtstart contents_dt
139 /* server: declaration */
140 serverstart: VAR_SERVER
142 OUTYY(("\nP(server:)\n"));
145 contents_server: contents_server content_server
147 content_server: server_num_threads | server_verbosity | server_port |
148 server_outgoing_range | server_do_ip4 |
149 server_do_ip6 | server_prefer_ip6 |
150 server_do_udp | server_do_tcp |
151 server_tcp_mss | server_outgoing_tcp_mss |
152 server_interface | server_chroot | server_username |
153 server_directory | server_logfile | server_pidfile |
154 server_msg_cache_size | server_msg_cache_slabs |
155 server_num_queries_per_thread | server_rrset_cache_size |
156 server_rrset_cache_slabs | server_outgoing_num_tcp |
157 server_infra_host_ttl | server_infra_lame_ttl |
158 server_infra_cache_slabs | server_infra_cache_numhosts |
159 server_infra_cache_lame_size | server_target_fetch_policy |
160 server_harden_short_bufsize | server_harden_large_queries |
161 server_do_not_query_address | server_hide_identity |
162 server_hide_version | server_identity | server_version |
163 server_harden_glue | server_module_conf | server_trust_anchor_file |
164 server_trust_anchor | server_val_override_date | server_bogus_ttl |
165 server_val_clean_additional | server_val_permissive_mode |
166 server_incoming_num_tcp | server_msg_buffer_size |
167 server_key_cache_size | server_key_cache_slabs |
168 server_trusted_keys_file | server_val_nsec3_keysize_iterations |
169 server_use_syslog | server_outgoing_interface | server_root_hints |
170 server_do_not_query_localhost | server_cache_max_ttl |
171 server_harden_dnssec_stripped | server_access_control |
172 server_local_zone | server_local_data | server_interface_automatic |
173 server_statistics_interval | server_do_daemonize |
174 server_use_caps_for_id | server_statistics_cumulative |
175 server_outgoing_port_permit | server_outgoing_port_avoid |
176 server_dlv_anchor_file | server_dlv_anchor | server_neg_cache_size |
177 server_harden_referral_path | server_private_address |
178 server_private_domain | server_extended_statistics |
179 server_local_data_ptr | server_jostle_timeout |
180 server_unwanted_reply_threshold | server_log_time_ascii |
181 server_domain_insecure | server_val_sig_skew_min |
182 server_val_sig_skew_max | server_cache_min_ttl | server_val_log_level |
183 server_auto_trust_anchor_file | server_add_holddown |
184 server_del_holddown | server_keep_missing | server_so_rcvbuf |
185 server_edns_buffer_size | server_prefetch | server_prefetch_key |
186 server_so_sndbuf | server_harden_below_nxdomain | server_ignore_cd_flag |
187 server_log_queries | server_tcp_upstream | server_ssl_upstream |
188 server_ssl_service_key | server_ssl_service_pem | server_ssl_port |
189 server_minimal_responses | server_rrset_roundrobin | server_max_udp_size |
190 server_so_reuseport | server_delay_close |
191 server_unblock_lan_zones | server_insecure_lan_zones |
192 server_dns64_prefix | server_dns64_synthall |
193 server_infra_cache_min_rtt | server_harden_algo_downgrade |
194 server_ip_transparent | server_ratelimit | server_ratelimit_slabs |
195 server_ratelimit_size | server_ratelimit_for_domain |
196 server_ratelimit_below_domain | server_ratelimit_factor |
197 server_caps_whitelist | server_cache_max_negative_ttl |
198 server_permit_small_holddown | server_qname_minimisation |
199 server_ip_freebind | server_define_tag | server_local_zone_tag |
200 server_disable_dnssec_lame_check | server_access_control_tag |
201 server_local_zone_override | server_access_control_tag_action |
202 server_access_control_tag_data
204 stubstart: VAR_STUB_ZONE
206 struct config_stub* s;
207 OUTYY(("\nP(stub_zone:)\n"));
208 s = (struct config_stub*)calloc(1, sizeof(struct config_stub));
210 s->next = cfg_parser->cfg->stubs;
211 cfg_parser->cfg->stubs = s;
213 yyerror("out of memory");
216 contents_stub: contents_stub content_stub
218 content_stub: stub_name | stub_host | stub_addr | stub_prime | stub_first
220 forwardstart: VAR_FORWARD_ZONE
222 struct config_stub* s;
223 OUTYY(("\nP(forward_zone:)\n"));
224 s = (struct config_stub*)calloc(1, sizeof(struct config_stub));
226 s->next = cfg_parser->cfg->forwards;
227 cfg_parser->cfg->forwards = s;
229 yyerror("out of memory");
232 contents_forward: contents_forward content_forward
234 content_forward: forward_name | forward_host | forward_addr | forward_first
236 server_num_threads: VAR_NUM_THREADS STRING_ARG
238 OUTYY(("P(server_num_threads:%s)\n", $2));
239 if(atoi($2) == 0 && strcmp($2, "0") != 0)
240 yyerror("number expected");
241 else cfg_parser->cfg->num_threads = atoi($2);
245 server_verbosity: VAR_VERBOSITY STRING_ARG
247 OUTYY(("P(server_verbosity:%s)\n", $2));
248 if(atoi($2) == 0 && strcmp($2, "0") != 0)
249 yyerror("number expected");
250 else cfg_parser->cfg->verbosity = atoi($2);
254 server_statistics_interval: VAR_STATISTICS_INTERVAL STRING_ARG
256 OUTYY(("P(server_statistics_interval:%s)\n", $2));
257 if(strcmp($2, "") == 0 || strcmp($2, "0") == 0)
258 cfg_parser->cfg->stat_interval = 0;
259 else if(atoi($2) == 0)
260 yyerror("number expected");
261 else cfg_parser->cfg->stat_interval = atoi($2);
265 server_statistics_cumulative: VAR_STATISTICS_CUMULATIVE STRING_ARG
267 OUTYY(("P(server_statistics_cumulative:%s)\n", $2));
268 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
269 yyerror("expected yes or no.");
270 else cfg_parser->cfg->stat_cumulative = (strcmp($2, "yes")==0);
274 server_extended_statistics: VAR_EXTENDED_STATISTICS STRING_ARG
276 OUTYY(("P(server_extended_statistics:%s)\n", $2));
277 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
278 yyerror("expected yes or no.");
279 else cfg_parser->cfg->stat_extended = (strcmp($2, "yes")==0);
283 server_port: VAR_PORT STRING_ARG
285 OUTYY(("P(server_port:%s)\n", $2));
287 yyerror("port number expected");
288 else cfg_parser->cfg->port = atoi($2);
292 server_interface: VAR_INTERFACE STRING_ARG
294 OUTYY(("P(server_interface:%s)\n", $2));
295 if(cfg_parser->cfg->num_ifs == 0)
296 cfg_parser->cfg->ifs = calloc(1, sizeof(char*));
297 else cfg_parser->cfg->ifs = realloc(cfg_parser->cfg->ifs,
298 (cfg_parser->cfg->num_ifs+1)*sizeof(char*));
299 if(!cfg_parser->cfg->ifs)
300 yyerror("out of memory");
302 cfg_parser->cfg->ifs[cfg_parser->cfg->num_ifs++] = $2;
305 server_outgoing_interface: VAR_OUTGOING_INTERFACE STRING_ARG
307 OUTYY(("P(server_outgoing_interface:%s)\n", $2));
308 if(cfg_parser->cfg->num_out_ifs == 0)
309 cfg_parser->cfg->out_ifs = calloc(1, sizeof(char*));
310 else cfg_parser->cfg->out_ifs = realloc(
311 cfg_parser->cfg->out_ifs,
312 (cfg_parser->cfg->num_out_ifs+1)*sizeof(char*));
313 if(!cfg_parser->cfg->out_ifs)
314 yyerror("out of memory");
316 cfg_parser->cfg->out_ifs[
317 cfg_parser->cfg->num_out_ifs++] = $2;
320 server_outgoing_range: VAR_OUTGOING_RANGE STRING_ARG
322 OUTYY(("P(server_outgoing_range:%s)\n", $2));
324 yyerror("number expected");
325 else cfg_parser->cfg->outgoing_num_ports = atoi($2);
329 server_outgoing_port_permit: VAR_OUTGOING_PORT_PERMIT STRING_ARG
331 OUTYY(("P(server_outgoing_port_permit:%s)\n", $2));
332 if(!cfg_mark_ports($2, 1,
333 cfg_parser->cfg->outgoing_avail_ports, 65536))
334 yyerror("port number or range (\"low-high\") expected");
338 server_outgoing_port_avoid: VAR_OUTGOING_PORT_AVOID STRING_ARG
340 OUTYY(("P(server_outgoing_port_avoid:%s)\n", $2));
341 if(!cfg_mark_ports($2, 0,
342 cfg_parser->cfg->outgoing_avail_ports, 65536))
343 yyerror("port number or range (\"low-high\") expected");
347 server_outgoing_num_tcp: VAR_OUTGOING_NUM_TCP STRING_ARG
349 OUTYY(("P(server_outgoing_num_tcp:%s)\n", $2));
350 if(atoi($2) == 0 && strcmp($2, "0") != 0)
351 yyerror("number expected");
352 else cfg_parser->cfg->outgoing_num_tcp = atoi($2);
356 server_incoming_num_tcp: VAR_INCOMING_NUM_TCP STRING_ARG
358 OUTYY(("P(server_incoming_num_tcp:%s)\n", $2));
359 if(atoi($2) == 0 && strcmp($2, "0") != 0)
360 yyerror("number expected");
361 else cfg_parser->cfg->incoming_num_tcp = atoi($2);
365 server_interface_automatic: VAR_INTERFACE_AUTOMATIC STRING_ARG
367 OUTYY(("P(server_interface_automatic:%s)\n", $2));
368 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
369 yyerror("expected yes or no.");
370 else cfg_parser->cfg->if_automatic = (strcmp($2, "yes")==0);
374 server_do_ip4: VAR_DO_IP4 STRING_ARG
376 OUTYY(("P(server_do_ip4:%s)\n", $2));
377 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
378 yyerror("expected yes or no.");
379 else cfg_parser->cfg->do_ip4 = (strcmp($2, "yes")==0);
383 server_do_ip6: VAR_DO_IP6 STRING_ARG
385 OUTYY(("P(server_do_ip6:%s)\n", $2));
386 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
387 yyerror("expected yes or no.");
388 else cfg_parser->cfg->do_ip6 = (strcmp($2, "yes")==0);
392 server_do_udp: VAR_DO_UDP STRING_ARG
394 OUTYY(("P(server_do_udp:%s)\n", $2));
395 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
396 yyerror("expected yes or no.");
397 else cfg_parser->cfg->do_udp = (strcmp($2, "yes")==0);
401 server_do_tcp: VAR_DO_TCP STRING_ARG
403 OUTYY(("P(server_do_tcp:%s)\n", $2));
404 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
405 yyerror("expected yes or no.");
406 else cfg_parser->cfg->do_tcp = (strcmp($2, "yes")==0);
410 server_prefer_ip6: VAR_PREFER_IP6 STRING_ARG
412 OUTYY(("P(server_prefer_ip6:%s)\n", $2));
413 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
414 yyerror("expected yes or no.");
415 else cfg_parser->cfg->prefer_ip6 = (strcmp($2, "yes")==0);
419 server_tcp_mss: VAR_TCP_MSS STRING_ARG
421 OUTYY(("P(server_tcp_mss:%s)\n", $2));
422 if(atoi($2) == 0 && strcmp($2, "0") != 0)
423 yyerror("number expected");
424 else cfg_parser->cfg->tcp_mss = atoi($2);
428 server_outgoing_tcp_mss: VAR_OUTGOING_TCP_MSS STRING_ARG
430 OUTYY(("P(server_outgoing_tcp_mss:%s)\n", $2));
431 if(atoi($2) == 0 && strcmp($2, "0") != 0)
432 yyerror("number expected");
433 else cfg_parser->cfg->outgoing_tcp_mss = atoi($2);
437 server_tcp_upstream: VAR_TCP_UPSTREAM STRING_ARG
439 OUTYY(("P(server_tcp_upstream:%s)\n", $2));
440 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
441 yyerror("expected yes or no.");
442 else cfg_parser->cfg->tcp_upstream = (strcmp($2, "yes")==0);
446 server_ssl_upstream: VAR_SSL_UPSTREAM STRING_ARG
448 OUTYY(("P(server_ssl_upstream:%s)\n", $2));
449 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
450 yyerror("expected yes or no.");
451 else cfg_parser->cfg->ssl_upstream = (strcmp($2, "yes")==0);
455 server_ssl_service_key: VAR_SSL_SERVICE_KEY STRING_ARG
457 OUTYY(("P(server_ssl_service_key:%s)\n", $2));
458 free(cfg_parser->cfg->ssl_service_key);
459 cfg_parser->cfg->ssl_service_key = $2;
462 server_ssl_service_pem: VAR_SSL_SERVICE_PEM STRING_ARG
464 OUTYY(("P(server_ssl_service_pem:%s)\n", $2));
465 free(cfg_parser->cfg->ssl_service_pem);
466 cfg_parser->cfg->ssl_service_pem = $2;
469 server_ssl_port: VAR_SSL_PORT STRING_ARG
471 OUTYY(("P(server_ssl_port:%s)\n", $2));
473 yyerror("port number expected");
474 else cfg_parser->cfg->ssl_port = atoi($2);
478 server_do_daemonize: VAR_DO_DAEMONIZE STRING_ARG
480 OUTYY(("P(server_do_daemonize:%s)\n", $2));
481 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
482 yyerror("expected yes or no.");
483 else cfg_parser->cfg->do_daemonize = (strcmp($2, "yes")==0);
487 server_use_syslog: VAR_USE_SYSLOG STRING_ARG
489 OUTYY(("P(server_use_syslog:%s)\n", $2));
490 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
491 yyerror("expected yes or no.");
492 else cfg_parser->cfg->use_syslog = (strcmp($2, "yes")==0);
493 #if !defined(HAVE_SYSLOG_H) && !defined(UB_ON_WINDOWS)
494 if(strcmp($2, "yes") == 0)
495 yyerror("no syslog services are available. "
496 "(reconfigure and compile to add)");
501 server_log_time_ascii: VAR_LOG_TIME_ASCII STRING_ARG
503 OUTYY(("P(server_log_time_ascii:%s)\n", $2));
504 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
505 yyerror("expected yes or no.");
506 else cfg_parser->cfg->log_time_ascii = (strcmp($2, "yes")==0);
510 server_log_queries: VAR_LOG_QUERIES STRING_ARG
512 OUTYY(("P(server_log_queries:%s)\n", $2));
513 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
514 yyerror("expected yes or no.");
515 else cfg_parser->cfg->log_queries = (strcmp($2, "yes")==0);
519 server_chroot: VAR_CHROOT STRING_ARG
521 OUTYY(("P(server_chroot:%s)\n", $2));
522 free(cfg_parser->cfg->chrootdir);
523 cfg_parser->cfg->chrootdir = $2;
526 server_username: VAR_USERNAME STRING_ARG
528 OUTYY(("P(server_username:%s)\n", $2));
529 free(cfg_parser->cfg->username);
530 cfg_parser->cfg->username = $2;
533 server_directory: VAR_DIRECTORY STRING_ARG
535 OUTYY(("P(server_directory:%s)\n", $2));
536 free(cfg_parser->cfg->directory);
537 cfg_parser->cfg->directory = $2;
538 /* change there right away for includes relative to this */
542 w_config_adjust_directory(cfg_parser->cfg);
544 d = cfg_parser->cfg->directory;
545 /* adjust directory if we have already chroot,
546 * like, we reread after sighup */
547 if(cfg_parser->chroot && cfg_parser->chroot[0] &&
548 strncmp(d, cfg_parser->chroot, strlen(
549 cfg_parser->chroot)) == 0)
550 d += strlen(cfg_parser->chroot);
552 log_err("cannot chdir to directory: %s (%s)",
557 server_logfile: VAR_LOGFILE STRING_ARG
559 OUTYY(("P(server_logfile:%s)\n", $2));
560 free(cfg_parser->cfg->logfile);
561 cfg_parser->cfg->logfile = $2;
562 cfg_parser->cfg->use_syslog = 0;
565 server_pidfile: VAR_PIDFILE STRING_ARG
567 OUTYY(("P(server_pidfile:%s)\n", $2));
568 free(cfg_parser->cfg->pidfile);
569 cfg_parser->cfg->pidfile = $2;
572 server_root_hints: VAR_ROOT_HINTS STRING_ARG
574 OUTYY(("P(server_root_hints:%s)\n", $2));
575 if(!cfg_strlist_insert(&cfg_parser->cfg->root_hints, $2))
576 yyerror("out of memory");
579 server_dlv_anchor_file: VAR_DLV_ANCHOR_FILE STRING_ARG
581 OUTYY(("P(server_dlv_anchor_file:%s)\n", $2));
582 free(cfg_parser->cfg->dlv_anchor_file);
583 cfg_parser->cfg->dlv_anchor_file = $2;
586 server_dlv_anchor: VAR_DLV_ANCHOR STRING_ARG
588 OUTYY(("P(server_dlv_anchor:%s)\n", $2));
589 if(!cfg_strlist_insert(&cfg_parser->cfg->dlv_anchor_list, $2))
590 yyerror("out of memory");
593 server_auto_trust_anchor_file: VAR_AUTO_TRUST_ANCHOR_FILE STRING_ARG
595 OUTYY(("P(server_auto_trust_anchor_file:%s)\n", $2));
596 if(!cfg_strlist_insert(&cfg_parser->cfg->
597 auto_trust_anchor_file_list, $2))
598 yyerror("out of memory");
601 server_trust_anchor_file: VAR_TRUST_ANCHOR_FILE STRING_ARG
603 OUTYY(("P(server_trust_anchor_file:%s)\n", $2));
604 if(!cfg_strlist_insert(&cfg_parser->cfg->
605 trust_anchor_file_list, $2))
606 yyerror("out of memory");
609 server_trusted_keys_file: VAR_TRUSTED_KEYS_FILE STRING_ARG
611 OUTYY(("P(server_trusted_keys_file:%s)\n", $2));
612 if(!cfg_strlist_insert(&cfg_parser->cfg->
613 trusted_keys_file_list, $2))
614 yyerror("out of memory");
617 server_trust_anchor: VAR_TRUST_ANCHOR STRING_ARG
619 OUTYY(("P(server_trust_anchor:%s)\n", $2));
620 if(!cfg_strlist_insert(&cfg_parser->cfg->trust_anchor_list, $2))
621 yyerror("out of memory");
624 server_domain_insecure: VAR_DOMAIN_INSECURE STRING_ARG
626 OUTYY(("P(server_domain_insecure:%s)\n", $2));
627 if(!cfg_strlist_insert(&cfg_parser->cfg->domain_insecure, $2))
628 yyerror("out of memory");
631 server_hide_identity: VAR_HIDE_IDENTITY STRING_ARG
633 OUTYY(("P(server_hide_identity:%s)\n", $2));
634 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
635 yyerror("expected yes or no.");
636 else cfg_parser->cfg->hide_identity = (strcmp($2, "yes")==0);
640 server_hide_version: VAR_HIDE_VERSION STRING_ARG
642 OUTYY(("P(server_hide_version:%s)\n", $2));
643 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
644 yyerror("expected yes or no.");
645 else cfg_parser->cfg->hide_version = (strcmp($2, "yes")==0);
649 server_identity: VAR_IDENTITY STRING_ARG
651 OUTYY(("P(server_identity:%s)\n", $2));
652 free(cfg_parser->cfg->identity);
653 cfg_parser->cfg->identity = $2;
656 server_version: VAR_VERSION STRING_ARG
658 OUTYY(("P(server_version:%s)\n", $2));
659 free(cfg_parser->cfg->version);
660 cfg_parser->cfg->version = $2;
663 server_so_rcvbuf: VAR_SO_RCVBUF STRING_ARG
665 OUTYY(("P(server_so_rcvbuf:%s)\n", $2));
666 if(!cfg_parse_memsize($2, &cfg_parser->cfg->so_rcvbuf))
667 yyerror("buffer size expected");
671 server_so_sndbuf: VAR_SO_SNDBUF STRING_ARG
673 OUTYY(("P(server_so_sndbuf:%s)\n", $2));
674 if(!cfg_parse_memsize($2, &cfg_parser->cfg->so_sndbuf))
675 yyerror("buffer size expected");
679 server_so_reuseport: VAR_SO_REUSEPORT STRING_ARG
681 OUTYY(("P(server_so_reuseport:%s)\n", $2));
682 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
683 yyerror("expected yes or no.");
684 else cfg_parser->cfg->so_reuseport =
685 (strcmp($2, "yes")==0);
689 server_ip_transparent: VAR_IP_TRANSPARENT STRING_ARG
691 OUTYY(("P(server_ip_transparent:%s)\n", $2));
692 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
693 yyerror("expected yes or no.");
694 else cfg_parser->cfg->ip_transparent =
695 (strcmp($2, "yes")==0);
699 server_ip_freebind: VAR_IP_FREEBIND STRING_ARG
701 OUTYY(("P(server_ip_freebind:%s)\n", $2));
702 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
703 yyerror("expected yes or no.");
704 else cfg_parser->cfg->ip_freebind =
705 (strcmp($2, "yes")==0);
709 server_edns_buffer_size: VAR_EDNS_BUFFER_SIZE STRING_ARG
711 OUTYY(("P(server_edns_buffer_size:%s)\n", $2));
713 yyerror("number expected");
714 else if (atoi($2) < 12)
715 yyerror("edns buffer size too small");
716 else if (atoi($2) > 65535)
717 cfg_parser->cfg->edns_buffer_size = 65535;
718 else cfg_parser->cfg->edns_buffer_size = atoi($2);
722 server_msg_buffer_size: VAR_MSG_BUFFER_SIZE STRING_ARG
724 OUTYY(("P(server_msg_buffer_size:%s)\n", $2));
726 yyerror("number expected");
727 else if (atoi($2) < 4096)
728 yyerror("message buffer size too small (use 4096)");
729 else cfg_parser->cfg->msg_buffer_size = atoi($2);
733 server_msg_cache_size: VAR_MSG_CACHE_SIZE STRING_ARG
735 OUTYY(("P(server_msg_cache_size:%s)\n", $2));
736 if(!cfg_parse_memsize($2, &cfg_parser->cfg->msg_cache_size))
737 yyerror("memory size expected");
741 server_msg_cache_slabs: VAR_MSG_CACHE_SLABS STRING_ARG
743 OUTYY(("P(server_msg_cache_slabs:%s)\n", $2));
745 yyerror("number expected");
747 cfg_parser->cfg->msg_cache_slabs = atoi($2);
748 if(!is_pow2(cfg_parser->cfg->msg_cache_slabs))
749 yyerror("must be a power of 2");
754 server_num_queries_per_thread: VAR_NUM_QUERIES_PER_THREAD STRING_ARG
756 OUTYY(("P(server_num_queries_per_thread:%s)\n", $2));
758 yyerror("number expected");
759 else cfg_parser->cfg->num_queries_per_thread = atoi($2);
763 server_jostle_timeout: VAR_JOSTLE_TIMEOUT STRING_ARG
765 OUTYY(("P(server_jostle_timeout:%s)\n", $2));
766 if(atoi($2) == 0 && strcmp($2, "0") != 0)
767 yyerror("number expected");
768 else cfg_parser->cfg->jostle_time = atoi($2);
772 server_delay_close: VAR_DELAY_CLOSE STRING_ARG
774 OUTYY(("P(server_delay_close:%s)\n", $2));
775 if(atoi($2) == 0 && strcmp($2, "0") != 0)
776 yyerror("number expected");
777 else cfg_parser->cfg->delay_close = atoi($2);
781 server_unblock_lan_zones: VAR_UNBLOCK_LAN_ZONES STRING_ARG
783 OUTYY(("P(server_unblock_lan_zones:%s)\n", $2));
784 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
785 yyerror("expected yes or no.");
786 else cfg_parser->cfg->unblock_lan_zones =
787 (strcmp($2, "yes")==0);
791 server_insecure_lan_zones: VAR_INSECURE_LAN_ZONES STRING_ARG
793 OUTYY(("P(server_insecure_lan_zones:%s)\n", $2));
794 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
795 yyerror("expected yes or no.");
796 else cfg_parser->cfg->insecure_lan_zones =
797 (strcmp($2, "yes")==0);
801 server_rrset_cache_size: VAR_RRSET_CACHE_SIZE STRING_ARG
803 OUTYY(("P(server_rrset_cache_size:%s)\n", $2));
804 if(!cfg_parse_memsize($2, &cfg_parser->cfg->rrset_cache_size))
805 yyerror("memory size expected");
809 server_rrset_cache_slabs: VAR_RRSET_CACHE_SLABS STRING_ARG
811 OUTYY(("P(server_rrset_cache_slabs:%s)\n", $2));
813 yyerror("number expected");
815 cfg_parser->cfg->rrset_cache_slabs = atoi($2);
816 if(!is_pow2(cfg_parser->cfg->rrset_cache_slabs))
817 yyerror("must be a power of 2");
822 server_infra_host_ttl: VAR_INFRA_HOST_TTL STRING_ARG
824 OUTYY(("P(server_infra_host_ttl:%s)\n", $2));
825 if(atoi($2) == 0 && strcmp($2, "0") != 0)
826 yyerror("number expected");
827 else cfg_parser->cfg->host_ttl = atoi($2);
831 server_infra_lame_ttl: VAR_INFRA_LAME_TTL STRING_ARG
833 OUTYY(("P(server_infra_lame_ttl:%s)\n", $2));
834 verbose(VERB_DETAIL, "ignored infra-lame-ttl: %s (option "
835 "removed, use infra-host-ttl)", $2);
839 server_infra_cache_numhosts: VAR_INFRA_CACHE_NUMHOSTS STRING_ARG
841 OUTYY(("P(server_infra_cache_numhosts:%s)\n", $2));
843 yyerror("number expected");
844 else cfg_parser->cfg->infra_cache_numhosts = atoi($2);
848 server_infra_cache_lame_size: VAR_INFRA_CACHE_LAME_SIZE STRING_ARG
850 OUTYY(("P(server_infra_cache_lame_size:%s)\n", $2));
851 verbose(VERB_DETAIL, "ignored infra-cache-lame-size: %s "
852 "(option removed, use infra-cache-numhosts)", $2);
856 server_infra_cache_slabs: VAR_INFRA_CACHE_SLABS STRING_ARG
858 OUTYY(("P(server_infra_cache_slabs:%s)\n", $2));
860 yyerror("number expected");
862 cfg_parser->cfg->infra_cache_slabs = atoi($2);
863 if(!is_pow2(cfg_parser->cfg->infra_cache_slabs))
864 yyerror("must be a power of 2");
869 server_infra_cache_min_rtt: VAR_INFRA_CACHE_MIN_RTT STRING_ARG
871 OUTYY(("P(server_infra_cache_min_rtt:%s)\n", $2));
872 if(atoi($2) == 0 && strcmp($2, "0") != 0)
873 yyerror("number expected");
874 else cfg_parser->cfg->infra_cache_min_rtt = atoi($2);
878 server_target_fetch_policy: VAR_TARGET_FETCH_POLICY STRING_ARG
880 OUTYY(("P(server_target_fetch_policy:%s)\n", $2));
881 free(cfg_parser->cfg->target_fetch_policy);
882 cfg_parser->cfg->target_fetch_policy = $2;
885 server_harden_short_bufsize: VAR_HARDEN_SHORT_BUFSIZE STRING_ARG
887 OUTYY(("P(server_harden_short_bufsize:%s)\n", $2));
888 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
889 yyerror("expected yes or no.");
890 else cfg_parser->cfg->harden_short_bufsize =
891 (strcmp($2, "yes")==0);
895 server_harden_large_queries: VAR_HARDEN_LARGE_QUERIES STRING_ARG
897 OUTYY(("P(server_harden_large_queries:%s)\n", $2));
898 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
899 yyerror("expected yes or no.");
900 else cfg_parser->cfg->harden_large_queries =
901 (strcmp($2, "yes")==0);
905 server_harden_glue: VAR_HARDEN_GLUE STRING_ARG
907 OUTYY(("P(server_harden_glue:%s)\n", $2));
908 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
909 yyerror("expected yes or no.");
910 else cfg_parser->cfg->harden_glue =
911 (strcmp($2, "yes")==0);
915 server_harden_dnssec_stripped: VAR_HARDEN_DNSSEC_STRIPPED STRING_ARG
917 OUTYY(("P(server_harden_dnssec_stripped:%s)\n", $2));
918 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
919 yyerror("expected yes or no.");
920 else cfg_parser->cfg->harden_dnssec_stripped =
921 (strcmp($2, "yes")==0);
925 server_harden_below_nxdomain: VAR_HARDEN_BELOW_NXDOMAIN STRING_ARG
927 OUTYY(("P(server_harden_below_nxdomain:%s)\n", $2));
928 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
929 yyerror("expected yes or no.");
930 else cfg_parser->cfg->harden_below_nxdomain =
931 (strcmp($2, "yes")==0);
935 server_harden_referral_path: VAR_HARDEN_REFERRAL_PATH STRING_ARG
937 OUTYY(("P(server_harden_referral_path:%s)\n", $2));
938 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
939 yyerror("expected yes or no.");
940 else cfg_parser->cfg->harden_referral_path =
941 (strcmp($2, "yes")==0);
945 server_harden_algo_downgrade: VAR_HARDEN_ALGO_DOWNGRADE STRING_ARG
947 OUTYY(("P(server_harden_algo_downgrade:%s)\n", $2));
948 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
949 yyerror("expected yes or no.");
950 else cfg_parser->cfg->harden_algo_downgrade =
951 (strcmp($2, "yes")==0);
955 server_use_caps_for_id: VAR_USE_CAPS_FOR_ID STRING_ARG
957 OUTYY(("P(server_use_caps_for_id:%s)\n", $2));
958 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
959 yyerror("expected yes or no.");
960 else cfg_parser->cfg->use_caps_bits_for_id =
961 (strcmp($2, "yes")==0);
965 server_caps_whitelist: VAR_CAPS_WHITELIST STRING_ARG
967 OUTYY(("P(server_caps_whitelist:%s)\n", $2));
968 if(!cfg_strlist_insert(&cfg_parser->cfg->caps_whitelist, $2))
969 yyerror("out of memory");
972 server_private_address: VAR_PRIVATE_ADDRESS STRING_ARG
974 OUTYY(("P(server_private_address:%s)\n", $2));
975 if(!cfg_strlist_insert(&cfg_parser->cfg->private_address, $2))
976 yyerror("out of memory");
979 server_private_domain: VAR_PRIVATE_DOMAIN STRING_ARG
981 OUTYY(("P(server_private_domain:%s)\n", $2));
982 if(!cfg_strlist_insert(&cfg_parser->cfg->private_domain, $2))
983 yyerror("out of memory");
986 server_prefetch: VAR_PREFETCH STRING_ARG
988 OUTYY(("P(server_prefetch:%s)\n", $2));
989 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
990 yyerror("expected yes or no.");
991 else cfg_parser->cfg->prefetch = (strcmp($2, "yes")==0);
995 server_prefetch_key: VAR_PREFETCH_KEY STRING_ARG
997 OUTYY(("P(server_prefetch_key:%s)\n", $2));
998 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
999 yyerror("expected yes or no.");
1000 else cfg_parser->cfg->prefetch_key = (strcmp($2, "yes")==0);
1004 server_unwanted_reply_threshold: VAR_UNWANTED_REPLY_THRESHOLD STRING_ARG
1006 OUTYY(("P(server_unwanted_reply_threshold:%s)\n", $2));
1007 if(atoi($2) == 0 && strcmp($2, "0") != 0)
1008 yyerror("number expected");
1009 else cfg_parser->cfg->unwanted_threshold = atoi($2);
1013 server_do_not_query_address: VAR_DO_NOT_QUERY_ADDRESS STRING_ARG
1015 OUTYY(("P(server_do_not_query_address:%s)\n", $2));
1016 if(!cfg_strlist_insert(&cfg_parser->cfg->donotqueryaddrs, $2))
1017 yyerror("out of memory");
1020 server_do_not_query_localhost: VAR_DO_NOT_QUERY_LOCALHOST STRING_ARG
1022 OUTYY(("P(server_do_not_query_localhost:%s)\n", $2));
1023 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1024 yyerror("expected yes or no.");
1025 else cfg_parser->cfg->donotquery_localhost =
1026 (strcmp($2, "yes")==0);
1030 server_access_control: VAR_ACCESS_CONTROL STRING_ARG STRING_ARG
1032 OUTYY(("P(server_access_control:%s %s)\n", $2, $3));
1033 if(strcmp($3, "deny")!=0 && strcmp($3, "refuse")!=0 &&
1034 strcmp($3, "deny_non_local")!=0 &&
1035 strcmp($3, "refuse_non_local")!=0 &&
1036 strcmp($3, "allow")!=0 &&
1037 strcmp($3, "allow_snoop")!=0) {
1038 yyerror("expected deny, refuse, deny_non_local, "
1039 "refuse_non_local, allow or allow_snoop "
1040 "in access control action");
1042 if(!cfg_str2list_insert(&cfg_parser->cfg->acls, $2, $3))
1043 fatal_exit("out of memory adding acl");
1047 server_module_conf: VAR_MODULE_CONF STRING_ARG
1049 OUTYY(("P(server_module_conf:%s)\n", $2));
1050 free(cfg_parser->cfg->module_conf);
1051 cfg_parser->cfg->module_conf = $2;
1054 server_val_override_date: VAR_VAL_OVERRIDE_DATE STRING_ARG
1056 OUTYY(("P(server_val_override_date:%s)\n", $2));
1057 if(*$2 == '\0' || strcmp($2, "0") == 0) {
1058 cfg_parser->cfg->val_date_override = 0;
1059 } else if(strlen($2) == 14) {
1060 cfg_parser->cfg->val_date_override =
1061 cfg_convert_timeval($2);
1062 if(!cfg_parser->cfg->val_date_override)
1063 yyerror("bad date/time specification");
1066 yyerror("number expected");
1067 cfg_parser->cfg->val_date_override = atoi($2);
1072 server_val_sig_skew_min: VAR_VAL_SIG_SKEW_MIN STRING_ARG
1074 OUTYY(("P(server_val_sig_skew_min:%s)\n", $2));
1075 if(*$2 == '\0' || strcmp($2, "0") == 0) {
1076 cfg_parser->cfg->val_sig_skew_min = 0;
1078 cfg_parser->cfg->val_sig_skew_min = atoi($2);
1079 if(!cfg_parser->cfg->val_sig_skew_min)
1080 yyerror("number expected");
1085 server_val_sig_skew_max: VAR_VAL_SIG_SKEW_MAX STRING_ARG
1087 OUTYY(("P(server_val_sig_skew_max:%s)\n", $2));
1088 if(*$2 == '\0' || strcmp($2, "0") == 0) {
1089 cfg_parser->cfg->val_sig_skew_max = 0;
1091 cfg_parser->cfg->val_sig_skew_max = atoi($2);
1092 if(!cfg_parser->cfg->val_sig_skew_max)
1093 yyerror("number expected");
1098 server_cache_max_ttl: VAR_CACHE_MAX_TTL STRING_ARG
1100 OUTYY(("P(server_cache_max_ttl:%s)\n", $2));
1101 if(atoi($2) == 0 && strcmp($2, "0") != 0)
1102 yyerror("number expected");
1103 else cfg_parser->cfg->max_ttl = atoi($2);
1107 server_cache_max_negative_ttl: VAR_CACHE_MAX_NEGATIVE_TTL STRING_ARG
1109 OUTYY(("P(server_cache_max_negative_ttl:%s)\n", $2));
1110 if(atoi($2) == 0 && strcmp($2, "0") != 0)
1111 yyerror("number expected");
1112 else cfg_parser->cfg->max_negative_ttl = atoi($2);
1116 server_cache_min_ttl: VAR_CACHE_MIN_TTL STRING_ARG
1118 OUTYY(("P(server_cache_min_ttl:%s)\n", $2));
1119 if(atoi($2) == 0 && strcmp($2, "0") != 0)
1120 yyerror("number expected");
1121 else cfg_parser->cfg->min_ttl = atoi($2);
1125 server_bogus_ttl: VAR_BOGUS_TTL STRING_ARG
1127 OUTYY(("P(server_bogus_ttl:%s)\n", $2));
1128 if(atoi($2) == 0 && strcmp($2, "0") != 0)
1129 yyerror("number expected");
1130 else cfg_parser->cfg->bogus_ttl = atoi($2);
1134 server_val_clean_additional: VAR_VAL_CLEAN_ADDITIONAL STRING_ARG
1136 OUTYY(("P(server_val_clean_additional:%s)\n", $2));
1137 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1138 yyerror("expected yes or no.");
1139 else cfg_parser->cfg->val_clean_additional =
1140 (strcmp($2, "yes")==0);
1144 server_val_permissive_mode: VAR_VAL_PERMISSIVE_MODE STRING_ARG
1146 OUTYY(("P(server_val_permissive_mode:%s)\n", $2));
1147 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1148 yyerror("expected yes or no.");
1149 else cfg_parser->cfg->val_permissive_mode =
1150 (strcmp($2, "yes")==0);
1154 server_ignore_cd_flag: VAR_IGNORE_CD_FLAG STRING_ARG
1156 OUTYY(("P(server_ignore_cd_flag:%s)\n", $2));
1157 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1158 yyerror("expected yes or no.");
1159 else cfg_parser->cfg->ignore_cd = (strcmp($2, "yes")==0);
1163 server_val_log_level: VAR_VAL_LOG_LEVEL STRING_ARG
1165 OUTYY(("P(server_val_log_level:%s)\n", $2));
1166 if(atoi($2) == 0 && strcmp($2, "0") != 0)
1167 yyerror("number expected");
1168 else cfg_parser->cfg->val_log_level = atoi($2);
1172 server_val_nsec3_keysize_iterations: VAR_VAL_NSEC3_KEYSIZE_ITERATIONS STRING_ARG
1174 OUTYY(("P(server_val_nsec3_keysize_iterations:%s)\n", $2));
1175 free(cfg_parser->cfg->val_nsec3_key_iterations);
1176 cfg_parser->cfg->val_nsec3_key_iterations = $2;
1179 server_add_holddown: VAR_ADD_HOLDDOWN STRING_ARG
1181 OUTYY(("P(server_add_holddown:%s)\n", $2));
1182 if(atoi($2) == 0 && strcmp($2, "0") != 0)
1183 yyerror("number expected");
1184 else cfg_parser->cfg->add_holddown = atoi($2);
1188 server_del_holddown: VAR_DEL_HOLDDOWN STRING_ARG
1190 OUTYY(("P(server_del_holddown:%s)\n", $2));
1191 if(atoi($2) == 0 && strcmp($2, "0") != 0)
1192 yyerror("number expected");
1193 else cfg_parser->cfg->del_holddown = atoi($2);
1197 server_keep_missing: VAR_KEEP_MISSING STRING_ARG
1199 OUTYY(("P(server_keep_missing:%s)\n", $2));
1200 if(atoi($2) == 0 && strcmp($2, "0") != 0)
1201 yyerror("number expected");
1202 else cfg_parser->cfg->keep_missing = atoi($2);
1206 server_permit_small_holddown: VAR_PERMIT_SMALL_HOLDDOWN STRING_ARG
1208 OUTYY(("P(server_permit_small_holddown:%s)\n", $2));
1209 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1210 yyerror("expected yes or no.");
1211 else cfg_parser->cfg->permit_small_holddown =
1212 (strcmp($2, "yes")==0);
1215 server_key_cache_size: VAR_KEY_CACHE_SIZE STRING_ARG
1217 OUTYY(("P(server_key_cache_size:%s)\n", $2));
1218 if(!cfg_parse_memsize($2, &cfg_parser->cfg->key_cache_size))
1219 yyerror("memory size expected");
1223 server_key_cache_slabs: VAR_KEY_CACHE_SLABS STRING_ARG
1225 OUTYY(("P(server_key_cache_slabs:%s)\n", $2));
1227 yyerror("number expected");
1229 cfg_parser->cfg->key_cache_slabs = atoi($2);
1230 if(!is_pow2(cfg_parser->cfg->key_cache_slabs))
1231 yyerror("must be a power of 2");
1236 server_neg_cache_size: VAR_NEG_CACHE_SIZE STRING_ARG
1238 OUTYY(("P(server_neg_cache_size:%s)\n", $2));
1239 if(!cfg_parse_memsize($2, &cfg_parser->cfg->neg_cache_size))
1240 yyerror("memory size expected");
1244 server_local_zone: VAR_LOCAL_ZONE STRING_ARG STRING_ARG
1246 OUTYY(("P(server_local_zone:%s %s)\n", $2, $3));
1247 if(strcmp($3, "static")!=0 && strcmp($3, "deny")!=0 &&
1248 strcmp($3, "refuse")!=0 && strcmp($3, "redirect")!=0 &&
1249 strcmp($3, "transparent")!=0 && strcmp($3, "nodefault")!=0
1250 && strcmp($3, "typetransparent")!=0
1251 && strcmp($3, "always_transparent")!=0
1252 && strcmp($3, "always_refuse")!=0
1253 && strcmp($3, "always_nxdomain")!=0
1254 && strcmp($3, "inform")!=0 && strcmp($3, "inform_deny")!=0)
1255 yyerror("local-zone type: expected static, deny, "
1256 "refuse, redirect, transparent, "
1257 "typetransparent, inform, inform_deny, "
1258 "always_transparent, always_refuse, "
1259 "always_nxdomain or nodefault");
1260 else if(strcmp($3, "nodefault")==0) {
1261 if(!cfg_strlist_insert(&cfg_parser->cfg->
1262 local_zones_nodefault, $2))
1263 fatal_exit("out of memory adding local-zone");
1266 if(!cfg_str2list_insert(&cfg_parser->cfg->local_zones,
1268 fatal_exit("out of memory adding local-zone");
1272 server_local_data: VAR_LOCAL_DATA STRING_ARG
1274 OUTYY(("P(server_local_data:%s)\n", $2));
1275 if(!cfg_strlist_insert(&cfg_parser->cfg->local_data, $2))
1276 fatal_exit("out of memory adding local-data");
1279 server_local_data_ptr: VAR_LOCAL_DATA_PTR STRING_ARG
1282 OUTYY(("P(server_local_data_ptr:%s)\n", $2));
1283 ptr = cfg_ptr_reverse($2);
1286 if(!cfg_strlist_insert(&cfg_parser->cfg->
1288 fatal_exit("out of memory adding local-data");
1290 yyerror("local-data-ptr could not be reversed");
1294 server_minimal_responses: VAR_MINIMAL_RESPONSES STRING_ARG
1296 OUTYY(("P(server_minimal_responses:%s)\n", $2));
1297 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1298 yyerror("expected yes or no.");
1299 else cfg_parser->cfg->minimal_responses =
1300 (strcmp($2, "yes")==0);
1304 server_rrset_roundrobin: VAR_RRSET_ROUNDROBIN STRING_ARG
1306 OUTYY(("P(server_rrset_roundrobin:%s)\n", $2));
1307 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1308 yyerror("expected yes or no.");
1309 else cfg_parser->cfg->rrset_roundrobin =
1310 (strcmp($2, "yes")==0);
1314 server_max_udp_size: VAR_MAX_UDP_SIZE STRING_ARG
1316 OUTYY(("P(server_max_udp_size:%s)\n", $2));
1317 cfg_parser->cfg->max_udp_size = atoi($2);
1321 server_dns64_prefix: VAR_DNS64_PREFIX STRING_ARG
1323 OUTYY(("P(dns64_prefix:%s)\n", $2));
1324 free(cfg_parser->cfg->dns64_prefix);
1325 cfg_parser->cfg->dns64_prefix = $2;
1328 server_dns64_synthall: VAR_DNS64_SYNTHALL STRING_ARG
1330 OUTYY(("P(server_dns64_synthall:%s)\n", $2));
1331 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1332 yyerror("expected yes or no.");
1333 else cfg_parser->cfg->dns64_synthall = (strcmp($2, "yes")==0);
1337 server_define_tag: VAR_DEFINE_TAG STRING_ARG
1340 OUTYY(("P(server_define_tag:%s)\n", $2));
1341 while((p=strsep(&s, " \t\n")) != NULL) {
1343 if(!config_add_tag(cfg_parser->cfg, p))
1344 yyerror("could not define-tag, "
1351 server_local_zone_tag: VAR_LOCAL_ZONE_TAG STRING_ARG STRING_ARG
1354 uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, $3,
1357 OUTYY(("P(server_local_zone_tag:%s)\n", $2));
1359 yyerror("could not parse tags, (define-tag them first)");
1361 if(!cfg_strbytelist_insert(
1362 &cfg_parser->cfg->local_zone_tags,
1363 $2, bitlist, len)) {
1364 yyerror("out of memory");
1370 server_access_control_tag: VAR_ACCESS_CONTROL_TAG STRING_ARG STRING_ARG
1373 uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, $3,
1376 OUTYY(("P(server_access_control_tag:%s)\n", $2));
1378 yyerror("could not parse tags, (define-tag them first)");
1380 if(!cfg_strbytelist_insert(
1381 &cfg_parser->cfg->acl_tags,
1382 $2, bitlist, len)) {
1383 yyerror("out of memory");
1389 server_access_control_tag_action: VAR_ACCESS_CONTROL_TAG_ACTION STRING_ARG STRING_ARG STRING_ARG
1391 OUTYY(("P(server_access_control_tag_action:%s %s %s)\n", $2, $3, $4));
1392 if(!cfg_str3list_insert(&cfg_parser->cfg->acl_tag_actions,
1394 yyerror("out of memory");
1401 server_access_control_tag_data: VAR_ACCESS_CONTROL_TAG_DATA STRING_ARG STRING_ARG STRING_ARG
1403 OUTYY(("P(server_access_control_tag_data:%s %s %s)\n", $2, $3, $4));
1404 if(!cfg_str3list_insert(&cfg_parser->cfg->acl_tag_datas,
1406 yyerror("out of memory");
1413 server_local_zone_override: VAR_LOCAL_ZONE_OVERRIDE STRING_ARG STRING_ARG STRING_ARG
1415 OUTYY(("P(server_local_zone_override:%s %s %s)\n", $2, $3, $4));
1416 if(!cfg_str3list_insert(&cfg_parser->cfg->local_zone_overrides,
1418 yyerror("out of memory");
1425 server_ratelimit: VAR_RATELIMIT STRING_ARG
1427 OUTYY(("P(server_ratelimit:%s)\n", $2));
1428 if(atoi($2) == 0 && strcmp($2, "0") != 0)
1429 yyerror("number expected");
1430 else cfg_parser->cfg->ratelimit = atoi($2);
1434 server_ratelimit_size: VAR_RATELIMIT_SIZE STRING_ARG
1436 OUTYY(("P(server_ratelimit_size:%s)\n", $2));
1437 if(!cfg_parse_memsize($2, &cfg_parser->cfg->ratelimit_size))
1438 yyerror("memory size expected");
1442 server_ratelimit_slabs: VAR_RATELIMIT_SLABS STRING_ARG
1444 OUTYY(("P(server_ratelimit_slabs:%s)\n", $2));
1446 yyerror("number expected");
1448 cfg_parser->cfg->ratelimit_slabs = atoi($2);
1449 if(!is_pow2(cfg_parser->cfg->ratelimit_slabs))
1450 yyerror("must be a power of 2");
1455 server_ratelimit_for_domain: VAR_RATELIMIT_FOR_DOMAIN STRING_ARG STRING_ARG
1457 OUTYY(("P(server_ratelimit_for_domain:%s %s)\n", $2, $3));
1458 if(atoi($3) == 0 && strcmp($3, "0") != 0) {
1459 yyerror("number expected");
1461 if(!cfg_str2list_insert(&cfg_parser->cfg->
1462 ratelimit_for_domain, $2, $3))
1463 fatal_exit("out of memory adding "
1464 "ratelimit-for-domain");
1468 server_ratelimit_below_domain: VAR_RATELIMIT_BELOW_DOMAIN STRING_ARG STRING_ARG
1470 OUTYY(("P(server_ratelimit_below_domain:%s %s)\n", $2, $3));
1471 if(atoi($3) == 0 && strcmp($3, "0") != 0) {
1472 yyerror("number expected");
1474 if(!cfg_str2list_insert(&cfg_parser->cfg->
1475 ratelimit_below_domain, $2, $3))
1476 fatal_exit("out of memory adding "
1477 "ratelimit-below-domain");
1481 server_ratelimit_factor: VAR_RATELIMIT_FACTOR STRING_ARG
1483 OUTYY(("P(server_ratelimit_factor:%s)\n", $2));
1484 if(atoi($2) == 0 && strcmp($2, "0") != 0)
1485 yyerror("number expected");
1486 else cfg_parser->cfg->ratelimit_factor = atoi($2);
1490 server_qname_minimisation: VAR_QNAME_MINIMISATION STRING_ARG
1492 OUTYY(("P(server_qname_minimisation:%s)\n", $2));
1493 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1494 yyerror("expected yes or no.");
1495 else cfg_parser->cfg->qname_minimisation =
1496 (strcmp($2, "yes")==0);
1500 stub_name: VAR_NAME STRING_ARG
1502 OUTYY(("P(name:%s)\n", $2));
1503 if(cfg_parser->cfg->stubs->name)
1504 yyerror("stub name override, there must be one name "
1505 "for one stub-zone");
1506 free(cfg_parser->cfg->stubs->name);
1507 cfg_parser->cfg->stubs->name = $2;
1510 stub_host: VAR_STUB_HOST STRING_ARG
1512 OUTYY(("P(stub-host:%s)\n", $2));
1513 if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->hosts, $2))
1514 yyerror("out of memory");
1517 stub_addr: VAR_STUB_ADDR STRING_ARG
1519 OUTYY(("P(stub-addr:%s)\n", $2));
1520 if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->addrs, $2))
1521 yyerror("out of memory");
1524 stub_first: VAR_STUB_FIRST STRING_ARG
1526 OUTYY(("P(stub-first:%s)\n", $2));
1527 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1528 yyerror("expected yes or no.");
1529 else cfg_parser->cfg->stubs->isfirst=(strcmp($2, "yes")==0);
1533 stub_prime: VAR_STUB_PRIME STRING_ARG
1535 OUTYY(("P(stub-prime:%s)\n", $2));
1536 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1537 yyerror("expected yes or no.");
1538 else cfg_parser->cfg->stubs->isprime =
1539 (strcmp($2, "yes")==0);
1543 forward_name: VAR_NAME STRING_ARG
1545 OUTYY(("P(name:%s)\n", $2));
1546 if(cfg_parser->cfg->forwards->name)
1547 yyerror("forward name override, there must be one "
1548 "name for one forward-zone");
1549 free(cfg_parser->cfg->forwards->name);
1550 cfg_parser->cfg->forwards->name = $2;
1553 forward_host: VAR_FORWARD_HOST STRING_ARG
1555 OUTYY(("P(forward-host:%s)\n", $2));
1556 if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->hosts, $2))
1557 yyerror("out of memory");
1560 forward_addr: VAR_FORWARD_ADDR STRING_ARG
1562 OUTYY(("P(forward-addr:%s)\n", $2));
1563 if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->addrs, $2))
1564 yyerror("out of memory");
1567 forward_first: VAR_FORWARD_FIRST STRING_ARG
1569 OUTYY(("P(forward-first:%s)\n", $2));
1570 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1571 yyerror("expected yes or no.");
1572 else cfg_parser->cfg->forwards->isfirst=(strcmp($2, "yes")==0);
1576 rcstart: VAR_REMOTE_CONTROL
1578 OUTYY(("\nP(remote-control:)\n"));
1581 contents_rc: contents_rc content_rc
1583 content_rc: rc_control_enable | rc_control_interface | rc_control_port |
1584 rc_server_key_file | rc_server_cert_file | rc_control_key_file |
1585 rc_control_cert_file | rc_control_use_cert
1587 rc_control_enable: VAR_CONTROL_ENABLE STRING_ARG
1589 OUTYY(("P(control_enable:%s)\n", $2));
1590 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1591 yyerror("expected yes or no.");
1592 else cfg_parser->cfg->remote_control_enable =
1593 (strcmp($2, "yes")==0);
1597 rc_control_port: VAR_CONTROL_PORT STRING_ARG
1599 OUTYY(("P(control_port:%s)\n", $2));
1601 yyerror("control port number expected");
1602 else cfg_parser->cfg->control_port = atoi($2);
1606 rc_control_interface: VAR_CONTROL_INTERFACE STRING_ARG
1608 OUTYY(("P(control_interface:%s)\n", $2));
1609 if(!cfg_strlist_insert(&cfg_parser->cfg->control_ifs, $2))
1610 yyerror("out of memory");
1613 rc_control_use_cert: VAR_CONTROL_USE_CERT STRING_ARG
1615 OUTYY(("P(control_use_cert:%s)\n", $2));
1616 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1617 yyerror("expected yes or no.");
1618 else cfg_parser->cfg->remote_control_use_cert =
1619 (strcmp($2, "yes")==0);
1623 rc_server_key_file: VAR_SERVER_KEY_FILE STRING_ARG
1625 OUTYY(("P(rc_server_key_file:%s)\n", $2));
1626 free(cfg_parser->cfg->server_key_file);
1627 cfg_parser->cfg->server_key_file = $2;
1630 rc_server_cert_file: VAR_SERVER_CERT_FILE STRING_ARG
1632 OUTYY(("P(rc_server_cert_file:%s)\n", $2));
1633 free(cfg_parser->cfg->server_cert_file);
1634 cfg_parser->cfg->server_cert_file = $2;
1637 rc_control_key_file: VAR_CONTROL_KEY_FILE STRING_ARG
1639 OUTYY(("P(rc_control_key_file:%s)\n", $2));
1640 free(cfg_parser->cfg->control_key_file);
1641 cfg_parser->cfg->control_key_file = $2;
1644 rc_control_cert_file: VAR_CONTROL_CERT_FILE STRING_ARG
1646 OUTYY(("P(rc_control_cert_file:%s)\n", $2));
1647 free(cfg_parser->cfg->control_cert_file);
1648 cfg_parser->cfg->control_cert_file = $2;
1653 OUTYY(("\nP(dnstap:)\n"));
1656 contents_dt: contents_dt content_dt
1658 content_dt: dt_dnstap_enable | dt_dnstap_socket_path |
1659 dt_dnstap_send_identity | dt_dnstap_send_version |
1660 dt_dnstap_identity | dt_dnstap_version |
1661 dt_dnstap_log_resolver_query_messages |
1662 dt_dnstap_log_resolver_response_messages |
1663 dt_dnstap_log_client_query_messages |
1664 dt_dnstap_log_client_response_messages |
1665 dt_dnstap_log_forwarder_query_messages |
1666 dt_dnstap_log_forwarder_response_messages
1668 dt_dnstap_enable: VAR_DNSTAP_ENABLE STRING_ARG
1670 OUTYY(("P(dt_dnstap_enable:%s)\n", $2));
1671 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1672 yyerror("expected yes or no.");
1673 else cfg_parser->cfg->dnstap = (strcmp($2, "yes")==0);
1676 dt_dnstap_socket_path: VAR_DNSTAP_SOCKET_PATH STRING_ARG
1678 OUTYY(("P(dt_dnstap_socket_path:%s)\n", $2));
1679 free(cfg_parser->cfg->dnstap_socket_path);
1680 cfg_parser->cfg->dnstap_socket_path = $2;
1683 dt_dnstap_send_identity: VAR_DNSTAP_SEND_IDENTITY STRING_ARG
1685 OUTYY(("P(dt_dnstap_send_identity:%s)\n", $2));
1686 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1687 yyerror("expected yes or no.");
1688 else cfg_parser->cfg->dnstap_send_identity = (strcmp($2, "yes")==0);
1691 dt_dnstap_send_version: VAR_DNSTAP_SEND_VERSION STRING_ARG
1693 OUTYY(("P(dt_dnstap_send_version:%s)\n", $2));
1694 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1695 yyerror("expected yes or no.");
1696 else cfg_parser->cfg->dnstap_send_version = (strcmp($2, "yes")==0);
1699 dt_dnstap_identity: VAR_DNSTAP_IDENTITY STRING_ARG
1701 OUTYY(("P(dt_dnstap_identity:%s)\n", $2));
1702 free(cfg_parser->cfg->dnstap_identity);
1703 cfg_parser->cfg->dnstap_identity = $2;
1706 dt_dnstap_version: VAR_DNSTAP_VERSION STRING_ARG
1708 OUTYY(("P(dt_dnstap_version:%s)\n", $2));
1709 free(cfg_parser->cfg->dnstap_version);
1710 cfg_parser->cfg->dnstap_version = $2;
1713 dt_dnstap_log_resolver_query_messages: VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES STRING_ARG
1715 OUTYY(("P(dt_dnstap_log_resolver_query_messages:%s)\n", $2));
1716 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1717 yyerror("expected yes or no.");
1718 else cfg_parser->cfg->dnstap_log_resolver_query_messages =
1719 (strcmp($2, "yes")==0);
1722 dt_dnstap_log_resolver_response_messages: VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES STRING_ARG
1724 OUTYY(("P(dt_dnstap_log_resolver_response_messages:%s)\n", $2));
1725 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1726 yyerror("expected yes or no.");
1727 else cfg_parser->cfg->dnstap_log_resolver_response_messages =
1728 (strcmp($2, "yes")==0);
1731 dt_dnstap_log_client_query_messages: VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES STRING_ARG
1733 OUTYY(("P(dt_dnstap_log_client_query_messages:%s)\n", $2));
1734 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1735 yyerror("expected yes or no.");
1736 else cfg_parser->cfg->dnstap_log_client_query_messages =
1737 (strcmp($2, "yes")==0);
1740 dt_dnstap_log_client_response_messages: VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES STRING_ARG
1742 OUTYY(("P(dt_dnstap_log_client_response_messages:%s)\n", $2));
1743 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1744 yyerror("expected yes or no.");
1745 else cfg_parser->cfg->dnstap_log_client_response_messages =
1746 (strcmp($2, "yes")==0);
1749 dt_dnstap_log_forwarder_query_messages: VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES STRING_ARG
1751 OUTYY(("P(dt_dnstap_log_forwarder_query_messages:%s)\n", $2));
1752 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1753 yyerror("expected yes or no.");
1754 else cfg_parser->cfg->dnstap_log_forwarder_query_messages =
1755 (strcmp($2, "yes")==0);
1758 dt_dnstap_log_forwarder_response_messages: VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES STRING_ARG
1760 OUTYY(("P(dt_dnstap_log_forwarder_response_messages:%s)\n", $2));
1761 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1762 yyerror("expected yes or no.");
1763 else cfg_parser->cfg->dnstap_log_forwarder_response_messages =
1764 (strcmp($2, "yes")==0);
1767 pythonstart: VAR_PYTHON
1769 OUTYY(("\nP(python:)\n"));
1772 contents_py: contents_py content_py
1774 content_py: py_script
1776 py_script: VAR_PYTHON_SCRIPT STRING_ARG
1778 OUTYY(("P(python-script:%s)\n", $2));
1779 free(cfg_parser->cfg->python_script);
1780 cfg_parser->cfg->python_script = $2;
1782 server_disable_dnssec_lame_check: VAR_DISABLE_DNSSEC_LAME_CHECK STRING_ARG
1784 OUTYY(("P(disable_dnssec_lame_check:%s)\n", $2));
1785 if (strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1786 yyerror("expected yes or no.");
1787 else cfg_parser->cfg->disable_dnssec_lame_check =
1788 (strcmp($2, "yes")==0);
1793 /* parse helper routines could be here */