Bug Summary

File:src/usr.sbin/nsd/obj/configparser.c
Warning:line 1678, column 7
Value stored to 'str' is never read

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple amd64-unknown-openbsd7.4 -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name configparser.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 1 -pic-is-pie -mframe-pointer=all -relaxed-aliasing -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -target-feature +retpoline-indirect-calls -target-feature +retpoline-indirect-branches -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/usr/src/usr.sbin/nsd/obj -resource-dir /usr/local/llvm16/lib/clang/16 -I . -I /usr/src/usr.sbin/nsd -internal-isystem /usr/local/llvm16/lib/clang/16/include -internal-externc-isystem /usr/include -O2 -fdebug-compilation-dir=/usr/src/usr.sbin/nsd/obj -ferror-limit 19 -fwrapv -D_RET_PROTECTOR -ret-protector -fcf-protection=branch -fno-jump-tables -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-valloc -fno-builtin-free -fno-builtin-strdup -fno-builtin-strndup -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /home/ben/Projects/scan/2024-01-11-140451-98009-1 -x c configparser.c
1#include <stdlib.h>
2#include <string.h>
3#define YYBYACC1 1
4#define YYMAJOR1 1
5#define YYMINOR9 9
6#define YYLEXc_lex() yylexc_lex()
7#define YYEMPTY-1 -1
8#define yyclearin(c_char=(-1)) (yycharc_char=(YYEMPTY-1))
9#define yyerrok(c_errflag=0) (yyerrflagc_errflag=0)
10#define YYRECOVERING()(c_errflag!=0) (yyerrflagc_errflag!=0)
11#define yyparsec_parse c_parse
12#define yylexc_lex c_lex
13#define yyerrorc_error c_error
14#define yycharc_char c_char
15#define yyvalc_val c_val
16#define yylvalc_lval c_lval
17#define yydebugc_debug c_debug
18#define yynerrsc_nerrs c_nerrs
19#define yyerrflagc_errflag c_errflag
20#define yyssc_ss c_ss
21#define yysslimc_sslim c_sslim
22#define yysspc_ssp c_ssp
23#define yyvsc_vs c_vs
24#define yyvspc_vsp c_vsp
25#define yystacksizec_stacksize c_stacksize
26#define yylhsc_lhs c_lhs
27#define yylenc_len c_len
28#define yydefredc_defred c_defred
29#define yydgotoc_dgoto c_dgoto
30#define yysindexc_sindex c_sindex
31#define yyrindexc_rindex c_rindex
32#define yygindexc_gindex c_gindex
33#define yytablec_table c_table
34#define yycheckc_check c_check
35#define yynamec_name c_name
36#define yyrulec_rule c_rule
37#define YYPREFIX"c_" "c_"
38#line 11 "/usr/src/usr.sbin/nsd/configparser.y"
39#include "config.h"
40
41#include <assert.h>
42#include <errno(*__errno()).h>
43#include <stdio.h>
44#include <string.h>
45
46#include "options.h"
47#include "util.h"
48#include "dname.h"
49#include "tsig.h"
50#include "rrl.h"
51
52int yylexc_lex(void);
53
54#ifdef __cplusplus
55extern "C"
56#endif
57
58/* these need to be global, otherwise they cannot be used inside yacc */
59extern config_parser_state_type *cfg_parser;
60
61static void append_acl(struct acl_options **list, struct acl_options *acl);
62static void add_to_last_acl(struct acl_options **list, char *ac);
63static int parse_boolean(const char *str, int *bln);
64static int parse_expire_expr(const char *str, long long *num, uint8_t *expr);
65static int parse_number(const char *str, long long *num);
66static int parse_range(const char *str, long long *low, long long *high);
67
68struct component {
69 struct component *next;
70 char *str;
71};
72
73#line 47 "/usr/src/usr.sbin/nsd/configparser.y"
74#ifndef YYSTYPE_DEFINED
75#define YYSTYPE_DEFINED
76typedef union {
77 char *str;
78 long long llng;
79 int bln;
80 struct ip_address_option *ip;
81 struct range_option *range;
82 struct cpu_option *cpu;
83 char **strv;
84 struct component *comp;
85} YYSTYPE;
86#endif /* YYSTYPE_DEFINED */
87#line 88 "configparser.c"
88#define STRING257 257
89#define VAR_SERVER258 258
90#define VAR_SERVER_COUNT259 259
91#define VAR_IP_ADDRESS260 260
92#define VAR_IP_TRANSPARENT261 261
93#define VAR_IP_FREEBIND262 262
94#define VAR_REUSEPORT263 263
95#define VAR_SEND_BUFFER_SIZE264 264
96#define VAR_RECEIVE_BUFFER_SIZE265 265
97#define VAR_DEBUG_MODE266 266
98#define VAR_IP4_ONLY267 267
99#define VAR_IP6_ONLY268 268
100#define VAR_DO_IP4269 269
101#define VAR_DO_IP6270 270
102#define VAR_PORT271 271
103#define VAR_USE_SYSTEMD272 272
104#define VAR_VERBOSITY273 273
105#define VAR_USERNAME274 274
106#define VAR_CHROOT275 275
107#define VAR_ZONESDIR276 276
108#define VAR_ZONELISTFILE277 277
109#define VAR_DATABASE278 278
110#define VAR_LOGFILE279 279
111#define VAR_LOG_ONLY_SYSLOG280 280
112#define VAR_PIDFILE281 281
113#define VAR_DIFFFILE282 282
114#define VAR_XFRDFILE283 283
115#define VAR_XFRDIR284 284
116#define VAR_HIDE_VERSION285 285
117#define VAR_HIDE_IDENTITY286 286
118#define VAR_VERSION287 287
119#define VAR_IDENTITY288 288
120#define VAR_NSID289 289
121#define VAR_TCP_COUNT290 290
122#define VAR_TCP_REJECT_OVERFLOW291 291
123#define VAR_TCP_QUERY_COUNT292 292
124#define VAR_TCP_TIMEOUT293 293
125#define VAR_TCP_MSS294 294
126#define VAR_OUTGOING_TCP_MSS295 295
127#define VAR_IPV4_EDNS_SIZE296 296
128#define VAR_IPV6_EDNS_SIZE297 297
129#define VAR_STATISTICS298 298
130#define VAR_XFRD_RELOAD_TIMEOUT299 299
131#define VAR_LOG_TIME_ASCII300 300
132#define VAR_ROUND_ROBIN301 301
133#define VAR_MINIMAL_RESPONSES302 302
134#define VAR_CONFINE_TO_ZONE303 303
135#define VAR_REFUSE_ANY304 304
136#define VAR_ZONEFILES_CHECK305 305
137#define VAR_ZONEFILES_WRITE306 306
138#define VAR_RRL_SIZE307 307
139#define VAR_RRL_RATELIMIT308 308
140#define VAR_RRL_SLIP309 309
141#define VAR_RRL_IPV4_PREFIX_LENGTH310 310
142#define VAR_RRL_IPV6_PREFIX_LENGTH311 311
143#define VAR_RRL_WHITELIST_RATELIMIT312 312
144#define VAR_TLS_SERVICE_KEY313 313
145#define VAR_TLS_SERVICE_PEM314 314
146#define VAR_TLS_SERVICE_OCSP315 315
147#define VAR_TLS_PORT316 316
148#define VAR_TLS_CERT_BUNDLE317 317
149#define VAR_PROXY_PROTOCOL_PORT318 318
150#define VAR_CPU_AFFINITY319 319
151#define VAR_XFRD_CPU_AFFINITY320 320
152#define VAR_SERVER_CPU_AFFINITY321 321
153#define VAR_DROP_UPDATES322 322
154#define VAR_XFRD_TCP_MAX323 323
155#define VAR_XFRD_TCP_PIPELINE324 324
156#define VAR_DNSTAP325 325
157#define VAR_DNSTAP_ENABLE326 326
158#define VAR_DNSTAP_SOCKET_PATH327 327
159#define VAR_DNSTAP_IP328 328
160#define VAR_DNSTAP_TLS329 329
161#define VAR_DNSTAP_TLS_SERVER_NAME330 330
162#define VAR_DNSTAP_TLS_CERT_BUNDLE331 331
163#define VAR_DNSTAP_TLS_CLIENT_KEY_FILE332 332
164#define VAR_DNSTAP_TLS_CLIENT_CERT_FILE333 333
165#define VAR_DNSTAP_SEND_IDENTITY334 334
166#define VAR_DNSTAP_SEND_VERSION335 335
167#define VAR_DNSTAP_IDENTITY336 336
168#define VAR_DNSTAP_VERSION337 337
169#define VAR_DNSTAP_LOG_AUTH_QUERY_MESSAGES338 338
170#define VAR_DNSTAP_LOG_AUTH_RESPONSE_MESSAGES339 339
171#define VAR_REMOTE_CONTROL340 340
172#define VAR_CONTROL_ENABLE341 341
173#define VAR_CONTROL_INTERFACE342 342
174#define VAR_CONTROL_PORT343 343
175#define VAR_SERVER_KEY_FILE344 344
176#define VAR_SERVER_CERT_FILE345 345
177#define VAR_CONTROL_KEY_FILE346 346
178#define VAR_CONTROL_CERT_FILE347 347
179#define VAR_KEY348 348
180#define VAR_ALGORITHM349 349
181#define VAR_SECRET350 350
182#define VAR_TLS_AUTH351 351
183#define VAR_TLS_AUTH_DOMAIN_NAME352 352
184#define VAR_TLS_AUTH_CLIENT_CERT353 353
185#define VAR_TLS_AUTH_CLIENT_KEY354 354
186#define VAR_TLS_AUTH_CLIENT_KEY_PW355 355
187#define VAR_PATTERN356 356
188#define VAR_NAME357 357
189#define VAR_ZONEFILE358 358
190#define VAR_NOTIFY359 359
191#define VAR_PROVIDE_XFR360 360
192#define VAR_ALLOW_QUERY361 361
193#define VAR_AXFR362 362
194#define VAR_UDP363 363
195#define VAR_NOTIFY_RETRY364 364
196#define VAR_ALLOW_NOTIFY365 365
197#define VAR_REQUEST_XFR366 366
198#define VAR_ALLOW_AXFR_FALLBACK367 367
199#define VAR_OUTGOING_INTERFACE368 368
200#define VAR_ANSWER_COOKIE369 369
201#define VAR_COOKIE_SECRET370 370
202#define VAR_COOKIE_SECRET_FILE371 371
203#define VAR_MAX_REFRESH_TIME372 372
204#define VAR_MIN_REFRESH_TIME373 373
205#define VAR_MAX_RETRY_TIME374 374
206#define VAR_MIN_RETRY_TIME375 375
207#define VAR_MIN_EXPIRE_TIME376 376
208#define VAR_MULTI_MASTER_CHECK377 377
209#define VAR_SIZE_LIMIT_XFR378 378
210#define VAR_ZONESTATS379 379
211#define VAR_INCLUDE_PATTERN380 380
212#define VAR_STORE_IXFR381 381
213#define VAR_IXFR_SIZE382 382
214#define VAR_IXFR_NUMBER383 383
215#define VAR_CREATE_IXFR384 384
216#define VAR_ZONE385 385
217#define VAR_RRL_WHITELIST386 386
218#define VAR_SERVERS387 387
219#define VAR_BINDTODEVICE388 388
220#define VAR_SETFIB389 389
221#define VAR_VERIFY390 390
222#define VAR_ENABLE391 391
223#define VAR_VERIFY_ZONE392 392
224#define VAR_VERIFY_ZONES393 393
225#define VAR_VERIFIER394 394
226#define VAR_VERIFIER_COUNT395 395
227#define VAR_VERIFIER_FEED_ZONE396 396
228#define VAR_VERIFIER_TIMEOUT397 397
229#define YYERRCODE256 256
230const short c_lhs[] =
231 { -1,
232 0, 0, 8, 8, 8, 8, 8, 8, 8, 8,
233 9, 17, 17, 20, 18, 18, 18, 18, 18, 18,
234 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
235 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
236 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
237 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
238 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
239 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
240 18, 18, 19, 19, 21, 21, 21, 5, 5, 4,
241 4, 10, 22, 22, 23, 23, 23, 23, 23, 23,
242 23, 23, 23, 23, 23, 23, 23, 23, 11, 24,
243 24, 25, 25, 25, 25, 25, 25, 25, 27, 13,
244 26, 26, 28, 28, 28, 28, 28, 30, 12, 29,
245 29, 31, 31, 31, 33, 15, 32, 32, 34, 34,
246 37, 14, 36, 36, 38, 38, 35, 35, 35, 35,
247 35, 35, 40, 35, 41, 35, 35, 35, 35, 35,
248 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
249 35, 35, 35, 35, 35, 35, 35, 16, 42, 42,
250 43, 43, 43, 43, 43, 43, 43, 43, 6, 7,
251 7, 3, 1, 2, 39, 39,
252};
253const short c_len[] =
254 { 2,
255 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
256 2, 2, 0, 0, 4, 2, 2, 2, 2, 2,
257 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
258 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
259 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
260 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
261 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
262 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
263 2, 2, 0, 2, 2, 2, 2, 0, 2, 1,
264 1, 2, 2, 0, 2, 2, 2, 2, 2, 2,
265 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
266 0, 2, 2, 2, 2, 2, 2, 2, 0, 3,
267 2, 0, 2, 2, 2, 2, 2, 0, 3, 2,
268 0, 2, 2, 2, 0, 3, 2, 0, 2, 1,
269 0, 3, 2, 0, 2, 1, 2, 2, 2, 2,
270 2, 2, 0, 5, 0, 6, 4, 3, 3, 3,
271 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
272 2, 2, 2, 2, 2, 2, 2, 2, 2, 0,
273 2, 2, 2, 2, 2, 2, 2, 2, 2, 0,
274 2, 1, 1, 1, 0, 1,
275};
276const short c_defred[] =
277 { 1,
278 0, 13, 94, 111, 128, 119, 141, 135, 180, 2,
279 3, 4, 5, 6, 7, 8, 9, 10, 0, 0,
280 0, 131, 122, 144, 138, 0, 0, 0, 0, 0,
281 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
282 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
283 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
284 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
285 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
286 0, 0, 0, 0, 0, 0, 88, 90, 91, 0,
287 0, 0, 0, 0, 0, 0, 12, 0, 0, 0,
288 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
289 0, 93, 0, 0, 0, 0, 0, 0, 0, 110,
290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
291 0, 0, 179, 193, 16, 192, 14, 194, 17, 18,
292 46, 19, 20, 21, 26, 27, 28, 29, 45, 22,
293 56, 49, 48, 50, 51, 30, 34, 35, 44, 52,
294 53, 54, 23, 24, 32, 31, 33, 36, 37, 38,
295 39, 40, 41, 42, 43, 47, 55, 65, 66, 67,
296 68, 69, 63, 64, 57, 58, 59, 60, 61, 62,
297 70, 72, 71, 73, 74, 75, 0, 25, 79, 80,
298 76, 77, 78, 82, 95, 96, 97, 98, 99, 100,
299 101, 102, 103, 104, 105, 106, 107, 108, 112, 113,
300 114, 115, 116, 117, 118, 0, 0, 0, 130, 0,
301 0, 0, 0, 0, 121, 0, 0, 0, 0, 0,
302 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
303 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
304 0, 0, 0, 146, 143, 0, 137, 140, 182, 183,
305 181, 184, 190, 185, 186, 188, 187, 83, 89, 133,
306 134, 132, 124, 125, 126, 127, 123, 145, 148, 0,
307 0, 0, 164, 0, 0, 0, 0, 163, 162, 165,
308 166, 167, 168, 169, 151, 150, 149, 152, 170, 171,
309 172, 173, 147, 174, 175, 176, 177, 139, 0, 0,
310 159, 160, 161, 158, 153, 0, 0, 191, 0, 0,
311 0, 84, 0, 155, 157, 85, 86, 87, 196, 154,
312 0, 156,
313};
314const short c_dgoto[] =
315 { 1,
316 135, 139, 137, 96, 197, 274, 319, 10, 11, 12,
317 13, 14, 15, 16, 17, 18, 19, 97, 320, 278,
318 332, 20, 112, 21, 120, 122, 23, 235, 121, 22,
319 229, 124, 25, 267, 264, 123, 24, 265, 340, 333,
320 341, 26, 133,
321};
322const short c_sindex[] =
323 { 0,
324 -224, 0, 0, 0, 0, 0, 0, 0, 0, 0,
325 0, 0, 0, 0, 0, 0, 0, 0, 662, -90,
326 -294, 0, 0, 0, 0, -214, -252, -246, -238, -238,
327 -238, -252, -252, -238, -238, -238, -238, -238, -252, -238,
328 -252, -235, -234, -233, -222, -221, -220, -238, -219, -218,
329 -203, -202, -238, -238, -201, -199, -198, -252, -238, -252,
330 -252, -252, -252, -252, -252, -252, -252, -238, -238, -238,
331 -238, -238, -238, -252, -252, -252, -252, -252, -252, -252,
332 -197, -196, -193, -252, -191, -252, 0, 0, 0, -238,
333 -252, -252, -238, -190, -189, -252, 0, -238, -188, -186,
334 -238, -185, -183, -182, -181, -238, -238, -180, -177, -238,
335 -238, 0, -238, -246, -252, -176, -173, -171, -170, 0,
336 -336, -325, -91, 630, -246, -252, -238, -238, -169, -252,
337 -238, -252, 0, 0, 0, 0, 0, 0, 0, 0,
338 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
339 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
341 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
342 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
343 0, 0, 0, 0, 0, 0, -168, 0, 0, 0,
344 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
345 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
346 0, 0, 0, 0, 0, -167, -166, -165, 0, -164,
347 -163, -162, -161, -160, 0, -159, -155, -153, -150, -147,
348 -252, -146, -257, -238, -145, -252, -252, -252, -252, -144,
349 -238, -252, -143, -139, -238, -252, -252, -238, -138, -238,
350 -169, -238, -252, 0, 0, -137, 0, 0, 0, 0,
351 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
352 0, 0, 0, 0, 0, 0, 0, 0, 0, -136,
353 -135, -134, 0, -132, -131, -129, -128, 0, 0, 0,
354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
355 0, 0, 0, 0, 0, 0, 0, 0, -127, -371,
356 0, 0, 0, 0, 0, -126, -124, 0, -122, -238,
357 -252, 0, -113, 0, 0, 0, 0, 0, 0, 0,
358 -113, 0,};
359const short c_rindex[] =
360 { 0,
361 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
362 0, 0, 0, 0, 0, 0, 0, 0, 404, 405,
363 406, 0, 0, 0, 0, 425, 0, 0, 0, 0,
364 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
365 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
366 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
367 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
368 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
369 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
370 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
371 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
372 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
373 452, 458, 529, 530, 0, 0, 0, 0, 0, 0,
374 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
375 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
376 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
377 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
378 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
379 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
380 0, 0, 0, 0, 0, 0, 203, 0, 0, 0,
381 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
382 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
383 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
385 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
386 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
387 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
388 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
389 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
390 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
391 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
392 0, 0, 0, 0, 0, 0, 0, 0, 1, 336,
393 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
394 0, 0, 63, 0, 0, 0, 0, 0, 0, 0,
395 63, 0,};
396const short c_gindex[] =
397 { 0,
398 76, -28, -110, 0, 0, -228, 0, 0, 0, 0,
399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
400 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
401 0, 0, 0, 0, 21, 0, 0, 0, -195, 0,
402 0, 0, 0,
403};
404#define YYTABLESIZE1033 1033
405const short c_table[] =
406 { 295,
407 189, 140, 141, 220, 134, 144, 145, 146, 147, 148,
408 136, 150, 226, 227, 269, 329, 330, 331, 138, 158,
409 228, 152, 153, 154, 163, 164, 230, 231, 232, 233,
410 169, 234, 315, 2, 155, 156, 157, 159, 160, 178,
411 179, 180, 181, 182, 183, 125, 113, 114, 115, 116,
412 117, 118, 119, 161, 162, 165, 126, 166, 167, 191,
413 192, 198, 195, 193, 201, 195, 202, 203, 206, 205,
414 207, 209, 208, 210, 211, 212, 215, 213, 214, 216,
415 222, 217, 218, 223, 219, 224, 225, 273, 279, 280,
416 281, 282, 283, 284, 285, 286, 287, 288, 271, 272,
417 3, 289, 276, 290, 296, 297, 291, 142, 143, 292,
418 294, 299, 304, 307, 149, 4, 151, 308, 313, 318,
419 321, 322, 323, 5, 324, 325, 6, 326, 327, 328,
420 334, 7, 335, 168, 336, 170, 171, 172, 173, 174,
421 175, 176, 177, 339, 268, 342, 0, 0, 0, 184,
422 185, 186, 187, 188, 189, 190, 0, 0, 0, 194,
423 8, 196, 0, 0, 0, 9, 199, 200, 0, 0,
424 0, 204, 0, 0, 0, 0, 127, 0, 128, 129,
425 130, 131, 132, 0, 0, 0, 0, 0, 0, 0,
426 221, 0, 0, 0, 0, 0, 0, 0, 0, 0,
427 0, 270, 81, 0, 0, 275, 0, 277, 0, 0,
428 0, 0, 0, 0, 0, 298, 0, 0, 0, 0,
429 0, 0, 305, 0, 0, 0, 309, 0, 0, 312,
430 0, 314, 0, 316, 0, 98, 99, 100, 101, 102,
431 103, 104, 105, 106, 107, 108, 109, 110, 111, 0,
432 0, 0, 0, 0, 0, 0, 0, 0, 189, 0,
433 189, 0, 0, 0, 0, 236, 237, 238, 239, 240,
434 0, 189, 241, 242, 243, 244, 245, 0, 0, 0,
435 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
436 256, 257, 258, 0, 259, 0, 0, 0, 0, 0,
437 260, 337, 261, 0, 262, 263, 0, 0, 0, 0,
438 0, 0, 0, 0, 0, 0, 293, 0, 0, 0,
439 195, 300, 301, 302, 303, 189, 0, 306, 0, 0,
440 0, 310, 311, 0, 0, 15, 0, 0, 317, 0,
441 189, 0, 0, 0, 0, 0, 0, 0, 189, 0,
442 0, 189, 0, 0, 0, 0, 189, 189, 189, 189,
443 189, 189, 0, 0, 189, 189, 189, 189, 189, 0,
444 0, 0, 189, 189, 189, 189, 189, 189, 189, 189,
445 189, 189, 189, 189, 189, 189, 189, 195, 0, 0,
446 189, 189, 189, 189, 189, 189, 189, 189, 0, 0,
447 0, 0, 195, 11, 92, 109, 338, 0, 0, 0,
448 195, 0, 0, 195, 0, 0, 0, 0, 195, 195,
449 195, 195, 195, 195, 178, 0, 195, 195, 195, 195,
450 195, 0, 0, 0, 195, 195, 195, 195, 195, 195,
451 195, 195, 195, 195, 195, 195, 195, 195, 195, 0,
452 0, 129, 195, 0, 195, 0, 195, 120, 195, 195,
453 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
454 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
455 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
456 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
457 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
458 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
459 81, 81, 81, 81, 81, 81, 81, 81, 142, 136,
460 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
461 0, 0, 81, 0, 0, 0, 0, 0, 0, 0,
462 81, 0, 0, 81, 0, 0, 0, 0, 81, 0,
463 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
464 0, 81, 81, 81, 0, 0, 0, 0, 0, 0,
465 0, 0, 0, 0, 0, 0, 0, 81, 0, 0,
466 0, 0, 81, 15, 15, 15, 15, 15, 15, 15,
467 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
468 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
469 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
470 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
471 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
472 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
473 15, 11, 92, 109, 0, 0, 0, 0, 0, 0,
474 0, 0, 0, 0, 0, 15, 0, 0, 0, 0,
475 0, 0, 178, 15, 0, 0, 15, 0, 0, 0,
476 0, 15, 0, 0, 0, 0, 0, 0, 0, 0,
477 0, 0, 0, 0, 15, 15, 15, 0, 0, 129,
478 0, 0, 0, 0, 0, 120, 0, 0, 0, 0,
479 15, 0, 0, 0, 0, 15, 0, 0, 11, 92,
480 109, 0, 0, 0, 0, 0, 0, 0, 0, 0,
481 0, 0, 0, 11, 92, 109, 0, 0, 0, 178,
482 0, 11, 92, 109, 11, 92, 109, 0, 0, 11,
483 92, 109, 0, 0, 178, 0, 0, 0, 0, 0,
484 0, 0, 178, 0, 0, 178, 129, 0, 0, 0,
485 178, 0, 120, 0, 0, 0, 142, 136, 11, 92,
486 109, 129, 0, 11, 92, 109, 0, 120, 0, 129,
487 0, 0, 129, 0, 0, 120, 0, 129, 120, 178,
488 0, 0, 0, 120, 178, 0, 0, 0, 0, 0,
489 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
490 0, 0, 0, 0, 0, 0, 129, 0, 0, 0,
491 0, 129, 120, 0, 0, 0, 0, 120, 0, 0,
492 0, 0, 0, 142, 136, 0, 0, 0, 0, 0,
493 0, 0, 0, 0, 0, 0, 0, 0, 142, 136,
494 0, 0, 0, 0, 0, 0, 142, 136, 0, 142,
495 136, 0, 0, 0, 142, 136, 0, 0, 0, 0,
496 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
497 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
498 0, 0, 0, 142, 136, 0, 0, 0, 142, 136,
499 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
500 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
501 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
502 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
503 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
504 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
505 87, 88, 89, 90, 91, 92, 266, 237, 238, 239,
506 240, 0, 0, 241, 242, 243, 244, 245, 0, 0,
507 0, 246, 247, 248, 249, 250, 251, 252, 253, 254,
508 255, 256, 257, 258, 0, 259, 0, 0, 0, 0,
509 0, 260, 0, 261, 0, 262, 263, 0, 0, 0,
510 93, 94, 95,
511};
512const short c_check[] =
513 { 257,
514 0, 30, 31, 114, 257, 34, 35, 36, 37, 38,
515 257, 40, 349, 350, 125, 387, 388, 389, 257, 48,
516 357, 257, 257, 257, 53, 54, 352, 353, 354, 355,
517 59, 357, 261, 258, 257, 257, 257, 257, 257, 68,
518 69, 70, 71, 72, 73, 260, 341, 342, 343, 344,
519 345, 346, 347, 257, 257, 257, 271, 257, 257, 257,
520 257, 90, 0, 257, 93, 257, 257, 257, 257, 98,
521 257, 257, 101, 257, 257, 257, 257, 106, 107, 257,
522 257, 110, 111, 257, 113, 257, 257, 257, 257, 257,
523 257, 257, 257, 257, 257, 257, 257, 257, 127, 128,
524 325, 257, 131, 257, 362, 363, 257, 32, 33, 257,
525 257, 257, 257, 257, 39, 340, 41, 257, 257, 257,
526 257, 257, 257, 348, 257, 257, 351, 257, 257, 257,
527 257, 356, 257, 58, 257, 60, 61, 62, 63, 64,
528 65, 66, 67, 257, 124, 341, -1, -1, -1, 74,
529 75, 76, 77, 78, 79, 80, -1, -1, -1, 84,
530 385, 86, -1, -1, -1, 390, 91, 92, -1, -1,
531 -1, 96, -1, -1, -1, -1, 391, -1, 393, 394,
532 395, 396, 397, -1, -1, -1, -1, -1, -1, -1,
533 115, -1, -1, -1, -1, -1, -1, -1, -1, -1,
534 -1, 126, 0, -1, -1, 130, -1, 132, -1, -1,
535 -1, -1, -1, -1, -1, 244, -1, -1, -1, -1,
536 -1, -1, 251, -1, -1, -1, 255, -1, -1, 258,
537 -1, 260, -1, 262, -1, 326, 327, 328, 329, 330,
538 331, 332, 333, 334, 335, 336, 337, 338, 339, -1,
539 -1, -1, -1, -1, -1, -1, -1, -1, 258, -1,
540 260, -1, -1, -1, -1, 357, 358, 359, 360, 361,
541 -1, 271, 364, 365, 366, 367, 368, -1, -1, -1,
542 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
543 382, 383, 384, -1, 386, -1, -1, -1, -1, -1,
544 392, 330, 394, -1, 396, 397, -1, -1, -1, -1,
545 -1, -1, -1, -1, -1, -1, 241, -1, -1, -1,
546 258, 246, 247, 248, 249, 325, -1, 252, -1, -1,
547 -1, 256, 257, -1, -1, 0, -1, -1, 263, -1,
548 340, -1, -1, -1, -1, -1, -1, -1, 348, -1,
549 -1, 351, -1, -1, -1, -1, 356, 357, 358, 359,
550 360, 361, -1, -1, 364, 365, 366, 367, 368, -1,
551 -1, -1, 372, 373, 374, 375, 376, 377, 378, 379,
552 380, 381, 382, 383, 384, 385, 386, 325, -1, -1,
553 390, 391, 392, 393, 394, 395, 396, 397, -1, -1,
554 -1, -1, 340, 0, 0, 0, 331, -1, -1, -1,
555 348, -1, -1, 351, -1, -1, -1, -1, 356, 357,
556 358, 359, 360, 361, 0, -1, 364, 365, 366, 367,
557 368, -1, -1, -1, 372, 373, 374, 375, 376, 377,
558 378, 379, 380, 381, 382, 383, 384, 385, 386, -1,
559 -1, 0, 390, -1, 392, -1, 394, 0, 396, 397,
560 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
561 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
562 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
563 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
564 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
565 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
566 318, 319, 320, 321, 322, 323, 324, 325, 0, 0,
567 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
568 -1, -1, 340, -1, -1, -1, -1, -1, -1, -1,
569 348, -1, -1, 351, -1, -1, -1, -1, 356, -1,
570 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
571 -1, 369, 370, 371, -1, -1, -1, -1, -1, -1,
572 -1, -1, -1, -1, -1, -1, -1, 385, -1, -1,
573 -1, -1, 390, 258, 259, 260, 261, 262, 263, 264,
574 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
575 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
576 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
577 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
578 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
579 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
580 325, 258, 258, 258, -1, -1, -1, -1, -1, -1,
581 -1, -1, -1, -1, -1, 340, -1, -1, -1, -1,
582 -1, -1, 258, 348, -1, -1, 351, -1, -1, -1,
583 -1, 356, -1, -1, -1, -1, -1, -1, -1, -1,
584 -1, -1, -1, -1, 369, 370, 371, -1, -1, 258,
585 -1, -1, -1, -1, -1, 258, -1, -1, -1, -1,
586 385, -1, -1, -1, -1, 390, -1, -1, 325, 325,
587 325, -1, -1, -1, -1, -1, -1, -1, -1, -1,
588 -1, -1, -1, 340, 340, 340, -1, -1, -1, 325,
589 -1, 348, 348, 348, 351, 351, 351, -1, -1, 356,
590 356, 356, -1, -1, 340, -1, -1, -1, -1, -1,
591 -1, -1, 348, -1, -1, 351, 325, -1, -1, -1,
592 356, -1, 325, -1, -1, -1, 258, 258, 385, 385,
593 385, 340, -1, 390, 390, 390, -1, 340, -1, 348,
594 -1, -1, 351, -1, -1, 348, -1, 356, 351, 385,
595 -1, -1, -1, 356, 390, -1, -1, -1, -1, -1,
596 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
597 -1, -1, -1, -1, -1, -1, 385, -1, -1, -1,
598 -1, 390, 385, -1, -1, -1, -1, 390, -1, -1,
599 -1, -1, -1, 325, 325, -1, -1, -1, -1, -1,
600 -1, -1, -1, -1, -1, -1, -1, -1, 340, 340,
601 -1, -1, -1, -1, -1, -1, 348, 348, -1, 351,
602 351, -1, -1, -1, 356, 356, -1, -1, -1, -1,
603 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
604 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
605 -1, -1, -1, 385, 385, -1, -1, -1, 390, 390,
606 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
607 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
608 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
609 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
610 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
611 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
612 319, 320, 321, 322, 323, 324, 357, 358, 359, 360,
613 361, -1, -1, 364, 365, 366, 367, 368, -1, -1,
614 -1, 372, 373, 374, 375, 376, 377, 378, 379, 380,
615 381, 382, 383, 384, -1, 386, -1, -1, -1, -1,
616 -1, 392, -1, 394, -1, 396, 397, -1, -1, -1,
617 369, 370, 371,
618};
619#define YYFINAL1 1
620#ifndef YYDEBUG0
621#define YYDEBUG0 0
622#endif
623#define YYMAXTOKEN397 397
624#if YYDEBUG0
625const char * const c_name[] =
626 {
627"end-of-file",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,
6280,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,
6290,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,
6300,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,
6310,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,
6320,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,
6330,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"STRING","VAR_SERVER",
634"VAR_SERVER_COUNT","VAR_IP_ADDRESS","VAR_IP_TRANSPARENT","VAR_IP_FREEBIND",
635"VAR_REUSEPORT","VAR_SEND_BUFFER_SIZE","VAR_RECEIVE_BUFFER_SIZE",
636"VAR_DEBUG_MODE","VAR_IP4_ONLY","VAR_IP6_ONLY","VAR_DO_IP4","VAR_DO_IP6",
637"VAR_PORT","VAR_USE_SYSTEMD","VAR_VERBOSITY","VAR_USERNAME","VAR_CHROOT",
638"VAR_ZONESDIR","VAR_ZONELISTFILE","VAR_DATABASE","VAR_LOGFILE",
639"VAR_LOG_ONLY_SYSLOG","VAR_PIDFILE","VAR_DIFFFILE","VAR_XFRDFILE","VAR_XFRDIR",
640"VAR_HIDE_VERSION","VAR_HIDE_IDENTITY","VAR_VERSION","VAR_IDENTITY","VAR_NSID",
641"VAR_TCP_COUNT","VAR_TCP_REJECT_OVERFLOW","VAR_TCP_QUERY_COUNT",
642"VAR_TCP_TIMEOUT","VAR_TCP_MSS","VAR_OUTGOING_TCP_MSS","VAR_IPV4_EDNS_SIZE",
643"VAR_IPV6_EDNS_SIZE","VAR_STATISTICS","VAR_XFRD_RELOAD_TIMEOUT",
644"VAR_LOG_TIME_ASCII","VAR_ROUND_ROBIN","VAR_MINIMAL_RESPONSES",
645"VAR_CONFINE_TO_ZONE","VAR_REFUSE_ANY","VAR_ZONEFILES_CHECK",
646"VAR_ZONEFILES_WRITE","VAR_RRL_SIZE","VAR_RRL_RATELIMIT","VAR_RRL_SLIP",
647"VAR_RRL_IPV4_PREFIX_LENGTH","VAR_RRL_IPV6_PREFIX_LENGTH",
648"VAR_RRL_WHITELIST_RATELIMIT","VAR_TLS_SERVICE_KEY","VAR_TLS_SERVICE_PEM",
649"VAR_TLS_SERVICE_OCSP","VAR_TLS_PORT","VAR_TLS_CERT_BUNDLE",
650"VAR_PROXY_PROTOCOL_PORT","VAR_CPU_AFFINITY","VAR_XFRD_CPU_AFFINITY",
651"VAR_SERVER_CPU_AFFINITY","VAR_DROP_UPDATES","VAR_XFRD_TCP_MAX",
652"VAR_XFRD_TCP_PIPELINE","VAR_DNSTAP","VAR_DNSTAP_ENABLE",
653"VAR_DNSTAP_SOCKET_PATH","VAR_DNSTAP_IP","VAR_DNSTAP_TLS",
654"VAR_DNSTAP_TLS_SERVER_NAME","VAR_DNSTAP_TLS_CERT_BUNDLE",
655"VAR_DNSTAP_TLS_CLIENT_KEY_FILE","VAR_DNSTAP_TLS_CLIENT_CERT_FILE",
656"VAR_DNSTAP_SEND_IDENTITY","VAR_DNSTAP_SEND_VERSION","VAR_DNSTAP_IDENTITY",
657"VAR_DNSTAP_VERSION","VAR_DNSTAP_LOG_AUTH_QUERY_MESSAGES",
658"VAR_DNSTAP_LOG_AUTH_RESPONSE_MESSAGES","VAR_REMOTE_CONTROL",
659"VAR_CONTROL_ENABLE","VAR_CONTROL_INTERFACE","VAR_CONTROL_PORT",
660"VAR_SERVER_KEY_FILE","VAR_SERVER_CERT_FILE","VAR_CONTROL_KEY_FILE",
661"VAR_CONTROL_CERT_FILE","VAR_KEY","VAR_ALGORITHM","VAR_SECRET","VAR_TLS_AUTH",
662"VAR_TLS_AUTH_DOMAIN_NAME","VAR_TLS_AUTH_CLIENT_CERT","VAR_TLS_AUTH_CLIENT_KEY",
663"VAR_TLS_AUTH_CLIENT_KEY_PW","VAR_PATTERN","VAR_NAME","VAR_ZONEFILE",
664"VAR_NOTIFY","VAR_PROVIDE_XFR","VAR_ALLOW_QUERY","VAR_AXFR","VAR_UDP",
665"VAR_NOTIFY_RETRY","VAR_ALLOW_NOTIFY","VAR_REQUEST_XFR",
666"VAR_ALLOW_AXFR_FALLBACK","VAR_OUTGOING_INTERFACE","VAR_ANSWER_COOKIE",
667"VAR_COOKIE_SECRET","VAR_COOKIE_SECRET_FILE","VAR_MAX_REFRESH_TIME",
668"VAR_MIN_REFRESH_TIME","VAR_MAX_RETRY_TIME","VAR_MIN_RETRY_TIME",
669"VAR_MIN_EXPIRE_TIME","VAR_MULTI_MASTER_CHECK","VAR_SIZE_LIMIT_XFR",
670"VAR_ZONESTATS","VAR_INCLUDE_PATTERN","VAR_STORE_IXFR","VAR_IXFR_SIZE",
671"VAR_IXFR_NUMBER","VAR_CREATE_IXFR","VAR_ZONE","VAR_RRL_WHITELIST",
672"VAR_SERVERS","VAR_BINDTODEVICE","VAR_SETFIB","VAR_VERIFY","VAR_ENABLE",
673"VAR_VERIFY_ZONE","VAR_VERIFY_ZONES","VAR_VERIFIER","VAR_VERIFIER_COUNT",
674"VAR_VERIFIER_FEED_ZONE","VAR_VERIFIER_TIMEOUT",
675};
676const char * const c_rule[] =
677 {"$accept : blocks",
678"blocks :",
679"blocks : blocks block",
680"block : server",
681"block : dnstap",
682"block : remote_control",
683"block : key",
684"block : tls_auth",
685"block : pattern",
686"block : zone",
687"block : verify",
688"server : VAR_SERVER server_block",
689"server_block : server_block server_option",
690"server_block :",
691"$$1 :",
692"server_option : VAR_IP_ADDRESS ip_address $$1 socket_options",
693"server_option : VAR_SERVER_COUNT number",
694"server_option : VAR_IP_TRANSPARENT boolean",
695"server_option : VAR_IP_FREEBIND boolean",
696"server_option : VAR_SEND_BUFFER_SIZE number",
697"server_option : VAR_RECEIVE_BUFFER_SIZE number",
698"server_option : VAR_DEBUG_MODE boolean",
699"server_option : VAR_USE_SYSTEMD boolean",
700"server_option : VAR_HIDE_VERSION boolean",
701"server_option : VAR_HIDE_IDENTITY boolean",
702"server_option : VAR_DROP_UPDATES boolean",
703"server_option : VAR_IP4_ONLY boolean",
704"server_option : VAR_IP6_ONLY boolean",
705"server_option : VAR_DO_IP4 boolean",
706"server_option : VAR_DO_IP6 boolean",
707"server_option : VAR_DATABASE STRING",
708"server_option : VAR_IDENTITY STRING",
709"server_option : VAR_VERSION STRING",
710"server_option : VAR_NSID STRING",
711"server_option : VAR_LOGFILE STRING",
712"server_option : VAR_LOG_ONLY_SYSLOG boolean",
713"server_option : VAR_TCP_COUNT number",
714"server_option : VAR_TCP_REJECT_OVERFLOW boolean",
715"server_option : VAR_TCP_QUERY_COUNT number",
716"server_option : VAR_TCP_TIMEOUT number",
717"server_option : VAR_TCP_MSS number",
718"server_option : VAR_OUTGOING_TCP_MSS number",
719"server_option : VAR_IPV4_EDNS_SIZE number",
720"server_option : VAR_IPV6_EDNS_SIZE number",
721"server_option : VAR_PIDFILE STRING",
722"server_option : VAR_PORT number",
723"server_option : VAR_REUSEPORT boolean",
724"server_option : VAR_STATISTICS number",
725"server_option : VAR_CHROOT STRING",
726"server_option : VAR_USERNAME STRING",
727"server_option : VAR_ZONESDIR STRING",
728"server_option : VAR_ZONELISTFILE STRING",
729"server_option : VAR_DIFFFILE STRING",
730"server_option : VAR_XFRDFILE STRING",
731"server_option : VAR_XFRDIR STRING",
732"server_option : VAR_XFRD_RELOAD_TIMEOUT number",
733"server_option : VAR_VERBOSITY number",
734"server_option : VAR_RRL_SIZE number",
735"server_option : VAR_RRL_RATELIMIT number",
736"server_option : VAR_RRL_SLIP number",
737"server_option : VAR_RRL_IPV4_PREFIX_LENGTH number",
738"server_option : VAR_RRL_IPV6_PREFIX_LENGTH number",
739"server_option : VAR_RRL_WHITELIST_RATELIMIT number",
740"server_option : VAR_ZONEFILES_CHECK boolean",
741"server_option : VAR_ZONEFILES_WRITE number",
742"server_option : VAR_LOG_TIME_ASCII boolean",
743"server_option : VAR_ROUND_ROBIN boolean",
744"server_option : VAR_MINIMAL_RESPONSES boolean",
745"server_option : VAR_CONFINE_TO_ZONE boolean",
746"server_option : VAR_REFUSE_ANY boolean",
747"server_option : VAR_TLS_SERVICE_KEY STRING",
748"server_option : VAR_TLS_SERVICE_OCSP STRING",
749"server_option : VAR_TLS_SERVICE_PEM STRING",
750"server_option : VAR_TLS_PORT number",
751"server_option : VAR_TLS_CERT_BUNDLE STRING",
752"server_option : VAR_PROXY_PROTOCOL_PORT number",
753"server_option : VAR_ANSWER_COOKIE boolean",
754"server_option : VAR_COOKIE_SECRET STRING",
755"server_option : VAR_COOKIE_SECRET_FILE STRING",
756"server_option : VAR_XFRD_TCP_MAX number",
757"server_option : VAR_XFRD_TCP_PIPELINE number",
758"server_option : VAR_CPU_AFFINITY cpus",
759"server_option : service_cpu_affinity number",
760"socket_options :",
761"socket_options : socket_options socket_option",
762"socket_option : VAR_SERVERS STRING",
763"socket_option : VAR_BINDTODEVICE boolean",
764"socket_option : VAR_SETFIB number",
765"cpus :",
766"cpus : cpus STRING",
767"service_cpu_affinity : VAR_XFRD_CPU_AFFINITY",
768"service_cpu_affinity : VAR_SERVER_CPU_AFFINITY",
769"dnstap : VAR_DNSTAP dnstap_block",
770"dnstap_block : dnstap_block dnstap_option",
771"dnstap_block :",
772"dnstap_option : VAR_DNSTAP_ENABLE boolean",
773"dnstap_option : VAR_DNSTAP_SOCKET_PATH STRING",
774"dnstap_option : VAR_DNSTAP_IP STRING",
775"dnstap_option : VAR_DNSTAP_TLS boolean",
776"dnstap_option : VAR_DNSTAP_TLS_SERVER_NAME STRING",
777"dnstap_option : VAR_DNSTAP_TLS_CERT_BUNDLE STRING",
778"dnstap_option : VAR_DNSTAP_TLS_CLIENT_KEY_FILE STRING",
779"dnstap_option : VAR_DNSTAP_TLS_CLIENT_CERT_FILE STRING",
780"dnstap_option : VAR_DNSTAP_SEND_IDENTITY boolean",
781"dnstap_option : VAR_DNSTAP_SEND_VERSION boolean",
782"dnstap_option : VAR_DNSTAP_IDENTITY STRING",
783"dnstap_option : VAR_DNSTAP_VERSION STRING",
784"dnstap_option : VAR_DNSTAP_LOG_AUTH_QUERY_MESSAGES boolean",
785"dnstap_option : VAR_DNSTAP_LOG_AUTH_RESPONSE_MESSAGES boolean",
786"remote_control : VAR_REMOTE_CONTROL remote_control_block",
787"remote_control_block : remote_control_block remote_control_option",
788"remote_control_block :",
789"remote_control_option : VAR_CONTROL_ENABLE boolean",
790"remote_control_option : VAR_CONTROL_INTERFACE ip_address",
791"remote_control_option : VAR_CONTROL_PORT number",
792"remote_control_option : VAR_SERVER_KEY_FILE STRING",
793"remote_control_option : VAR_SERVER_CERT_FILE STRING",
794"remote_control_option : VAR_CONTROL_KEY_FILE STRING",
795"remote_control_option : VAR_CONTROL_CERT_FILE STRING",
796"$$2 :",
797"tls_auth : VAR_TLS_AUTH $$2 tls_auth_block",
798"tls_auth_block : tls_auth_block tls_auth_option",
799"tls_auth_block :",
800"tls_auth_option : VAR_NAME STRING",
801"tls_auth_option : VAR_TLS_AUTH_DOMAIN_NAME STRING",
802"tls_auth_option : VAR_TLS_AUTH_CLIENT_CERT STRING",
803"tls_auth_option : VAR_TLS_AUTH_CLIENT_KEY STRING",
804"tls_auth_option : VAR_TLS_AUTH_CLIENT_KEY_PW STRING",
805"$$3 :",
806"key : VAR_KEY $$3 key_block",
807"key_block : key_block key_option",
808"key_block :",
809"key_option : VAR_NAME STRING",
810"key_option : VAR_ALGORITHM STRING",
811"key_option : VAR_SECRET STRING",
812"$$4 :",
813"zone : VAR_ZONE $$4 zone_block",
814"zone_block : zone_block zone_option",
815"zone_block :",
816"zone_option : VAR_NAME STRING",
817"zone_option : pattern_or_zone_option",
818"$$5 :",
819"pattern : VAR_PATTERN $$5 pattern_block",
820"pattern_block : pattern_block pattern_option",
821"pattern_block :",
822"pattern_option : VAR_NAME STRING",
823"pattern_option : pattern_or_zone_option",
824"pattern_or_zone_option : VAR_RRL_WHITELIST STRING",
825"pattern_or_zone_option : VAR_ZONEFILE STRING",
826"pattern_or_zone_option : VAR_ZONESTATS STRING",
827"pattern_or_zone_option : VAR_SIZE_LIMIT_XFR number",
828"pattern_or_zone_option : VAR_MULTI_MASTER_CHECK boolean",
829"pattern_or_zone_option : VAR_INCLUDE_PATTERN STRING",
830"$$6 :",
831"pattern_or_zone_option : VAR_REQUEST_XFR STRING STRING $$6 tlsauth_option",
832"$$7 :",
833"pattern_or_zone_option : VAR_REQUEST_XFR VAR_AXFR STRING STRING $$7 tlsauth_option",
834"pattern_or_zone_option : VAR_REQUEST_XFR VAR_UDP STRING STRING",
835"pattern_or_zone_option : VAR_ALLOW_NOTIFY STRING STRING",
836"pattern_or_zone_option : VAR_NOTIFY STRING STRING",
837"pattern_or_zone_option : VAR_PROVIDE_XFR STRING STRING",
838"pattern_or_zone_option : VAR_ALLOW_QUERY STRING STRING",
839"pattern_or_zone_option : VAR_OUTGOING_INTERFACE STRING",
840"pattern_or_zone_option : VAR_ALLOW_AXFR_FALLBACK boolean",
841"pattern_or_zone_option : VAR_NOTIFY_RETRY number",
842"pattern_or_zone_option : VAR_MAX_REFRESH_TIME number",
843"pattern_or_zone_option : VAR_MIN_REFRESH_TIME number",
844"pattern_or_zone_option : VAR_MAX_RETRY_TIME number",
845"pattern_or_zone_option : VAR_MIN_RETRY_TIME number",
846"pattern_or_zone_option : VAR_MIN_EXPIRE_TIME STRING",
847"pattern_or_zone_option : VAR_STORE_IXFR boolean",
848"pattern_or_zone_option : VAR_IXFR_SIZE number",
849"pattern_or_zone_option : VAR_IXFR_NUMBER number",
850"pattern_or_zone_option : VAR_CREATE_IXFR boolean",
851"pattern_or_zone_option : VAR_VERIFY_ZONE boolean",
852"pattern_or_zone_option : VAR_VERIFIER command",
853"pattern_or_zone_option : VAR_VERIFIER_FEED_ZONE boolean",
854"pattern_or_zone_option : VAR_VERIFIER_TIMEOUT number",
855"verify : VAR_VERIFY verify_block",
856"verify_block : verify_block verify_option",
857"verify_block :",
858"verify_option : VAR_ENABLE boolean",
859"verify_option : VAR_IP_ADDRESS ip_address",
860"verify_option : VAR_PORT number",
861"verify_option : VAR_VERIFY_ZONES boolean",
862"verify_option : VAR_VERIFIER command",
863"verify_option : VAR_VERIFIER_COUNT number",
864"verify_option : VAR_VERIFIER_TIMEOUT number",
865"verify_option : VAR_VERIFIER_FEED_ZONE boolean",
866"command : STRING arguments",
867"arguments :",
868"arguments : arguments STRING",
869"ip_address : STRING",
870"number : STRING",
871"boolean : STRING",
872"tlsauth_option :",
873"tlsauth_option : STRING",
874};
875#endif
876#ifdef YYSTACKSIZE10000
877#undef YYMAXDEPTH10000
878#define YYMAXDEPTH10000 YYSTACKSIZE10000
879#else
880#ifdef YYMAXDEPTH10000
881#define YYSTACKSIZE10000 YYMAXDEPTH10000
882#else
883#define YYSTACKSIZE10000 10000
884#define YYMAXDEPTH10000 10000
885#endif
886#endif
887#define YYINITSTACKSIZE200 200
888/* LINTUSED */
889int yydebugc_debug;
890int yynerrsc_nerrs;
891int yyerrflagc_errflag;
892int yycharc_char;
893short *yysspc_ssp;
894YYSTYPE *yyvspc_vsp;
895YYSTYPE yyvalc_val;
896YYSTYPE yylvalc_lval;
897short *yyssc_ss;
898short *yysslimc_sslim;
899YYSTYPE *yyvsc_vs;
900unsigned int yystacksizec_stacksize;
901int yyparsec_parse(void);
902#line 1150 "/usr/src/usr.sbin/nsd/configparser.y"
903
904static void
905append_acl(struct acl_options **list, struct acl_options *acl)
906{
907 assert(list != NULL)((void)0);
908
909 if(*list == NULL((void *)0)) {
910 *list = acl;
911 } else {
912 struct acl_options *tail = *list;
913 while(tail->next != NULL((void *)0))
914 tail = tail->next;
915 tail->next = acl;
916 }
917}
918
919static void
920add_to_last_acl(struct acl_options **list, char *tls_auth_name)
921{
922 struct acl_options *tail = *list;
923 assert(list != NULL)((void)0);
924 assert(*list != NULL)((void)0);
925 while(tail->next != NULL((void *)0))
926 tail = tail->next;
927 tail->tls_auth_name = tls_auth_name;
928}
929
930static int
931parse_boolean(const char *str, int *bln)
932{
933 if(strcmp(str, "yes") == 0) {
934 *bln = 1;
935 } else if(strcmp(str, "no") == 0) {
936 *bln = 0;
937 } else {
938 return 0;
939 }
940
941 return 1;
942}
943
944static int
945parse_expire_expr(const char *str, long long *num, uint8_t *expr)
946{
947 if(parse_number(str, num)) {
948 *expr = EXPIRE_TIME_HAS_VALUE0;
949 return 1;
950 }
951 if(strcmp(str, REFRESHPLUSRETRYPLUS1_STR"refresh+retry+1") == 0) {
952 *num = 0;
953 *expr = REFRESHPLUSRETRYPLUS12;
954 return 1;
955 }
956 return 0;
957}
958
959static int
960parse_number(const char *str, long long *num)
961{
962 /* ensure string consists entirely of digits */
963 size_t pos = 0;
964 while(str[pos] >= '0' && str[pos] <= '9') {
965 pos++;
966 }
967
968 if(pos != 0 && str[pos] == '\0') {
969 *num = strtoll(str, NULL((void *)0), 10);
970 return 1;
971 }
972
973 return 0;
974}
975
976static int
977parse_range(const char *str, long long *low, long long *high)
978{
979 const char *ptr = str;
980 long long num[2];
981
982 /* require range to begin with a number */
983 if(*ptr < '0' || *ptr > '9') {
984 return 0;
985 }
986
987 num[0] = strtoll(ptr, (char **)&ptr, 10);
988
989 /* require number to be followed by nothing at all or a dash */
990 if(*ptr == '\0') {
991 *low = num[0];
992 *high = num[0];
993 return 1;
994 } else if(*ptr != '-') {
995 return 0;
996 }
997
998 ++ptr;
999 /* require dash to be followed by a number */
1000 if(*ptr < '0' || *ptr > '9') {
1001 return 0;
1002 }
1003
1004 num[1] = strtoll(ptr, (char **)&ptr, 10);
1005
1006 /* require number to be followed by nothing at all */
1007 if(*ptr == '\0') {
1008 if(num[0] < num[1]) {
1009 *low = num[0];
1010 *high = num[1];
1011 } else {
1012 *low = num[1];
1013 *high = num[0];
1014 }
1015 return 1;
1016 }
1017
1018 return 0;
1019}
1020#line 1013 "configparser.c"
1021/* allocate initial stack or double stack size, up to YYMAXDEPTH */
1022static int yygrowstack(void)
1023{
1024 unsigned int newsize;
1025 long sslen;
1026 short *newss;
1027 YYSTYPE *newvs;
1028
1029 if ((newsize = yystacksizec_stacksize) == 0)
1030 newsize = YYINITSTACKSIZE200;
1031 else if (newsize >= YYMAXDEPTH10000)
1032 return -1;
1033 else if ((newsize *= 2) > YYMAXDEPTH10000)
1034 newsize = YYMAXDEPTH10000;
1035 sslen = yysspc_ssp - yyssc_ss;
1036#ifdef SIZE_MAX0xffffffffffffffffUL
1037#define YY_SIZE_MAX0xffffffffffffffffUL SIZE_MAX0xffffffffffffffffUL
1038#else
1039#define YY_SIZE_MAX0xffffffffffffffffUL 0xffffffffU
1040#endif
1041 if (newsize && YY_SIZE_MAX0xffffffffffffffffUL / newsize < sizeof *newss)
1042 goto bail;
1043 newss = (short *)realloc(yyssc_ss, newsize * sizeof *newss);
1044 if (newss == NULL((void *)0))
1045 goto bail;
1046 yyssc_ss = newss;
1047 yysspc_ssp = newss + sslen;
1048 if (newsize && YY_SIZE_MAX0xffffffffffffffffUL / newsize < sizeof *newvs)
1049 goto bail;
1050 newvs = (YYSTYPE *)realloc(yyvsc_vs, newsize * sizeof *newvs);
1051 if (newvs == NULL((void *)0))
1052 goto bail;
1053 yyvsc_vs = newvs;
1054 yyvspc_vsp = newvs + sslen;
1055 yystacksizec_stacksize = newsize;
1056 yysslimc_sslim = yyssc_ss + newsize - 1;
1057 return 0;
1058bail:
1059 if (yyssc_ss)
1060 free(yyssc_ss);
1061 if (yyvsc_vs)
1062 free(yyvsc_vs);
1063 yyssc_ss = yysspc_ssp = NULL((void *)0);
1064 yyvsc_vs = yyvspc_vsp = NULL((void *)0);
1065 yystacksizec_stacksize = 0;
1066 return -1;
1067}
1068
1069#define YYABORTgoto yyabort goto yyabort
1070#define YYREJECTgoto yyabort goto yyabort
1071#define YYACCEPTgoto yyaccept goto yyaccept
1072#define YYERRORgoto yyerrlab goto yyerrlab
1073int
1074yyparsec_parse(void)
1075{
1076 int yym, yyn, yystate;
1077#if YYDEBUG0
1078 const char *yys;
1079
1080 if ((yys = getenv("YYDEBUG")))
1081 {
1082 yyn = *yys;
1083 if (yyn >= '0' && yyn <= '9')
1084 yydebugc_debug = yyn - '0';
1085 }
1086#endif /* YYDEBUG */
1087
1088 yynerrsc_nerrs = 0;
1089 yyerrflagc_errflag = 0;
1090 yycharc_char = (-1);
1091
1092 if (yyssc_ss == NULL((void *)0) && yygrowstack()) goto yyoverflow;
1093 yysspc_ssp = yyssc_ss;
1094 yyvspc_vsp = yyvsc_vs;
1095 *yysspc_ssp = yystate = 0;
1096
1097yyloop:
1098 if ((yyn = yydefredc_defred[yystate]) != 0) goto yyreduce;
1099 if (yycharc_char < 0)
1100 {
1101 if ((yycharc_char = yylexc_lex()) < 0) yycharc_char = 0;
1102#if YYDEBUG0
1103 if (yydebugc_debug)
1104 {
1105 yys = 0;
1106 if (yycharc_char <= YYMAXTOKEN397) yys = yynamec_name[yycharc_char];
1107 if (!yys) yys = "illegal-symbol";
1108 printf("%sdebug: state %d, reading %d (%s)\n",
1109 YYPREFIX"c_", yystate, yycharc_char, yys);
1110 }
1111#endif
1112 }
1113 if ((yyn = yysindexc_sindex[yystate]) && (yyn += yycharc_char) >= 0 &&
1114 yyn <= YYTABLESIZE1033 && yycheckc_check[yyn] == yycharc_char)
1115 {
1116#if YYDEBUG0
1117 if (yydebugc_debug)
1118 printf("%sdebug: state %d, shifting to state %d\n",
1119 YYPREFIX"c_", yystate, yytablec_table[yyn]);
1120#endif
1121 if (yysspc_ssp >= yysslimc_sslim && yygrowstack())
1122 {
1123 goto yyoverflow;
1124 }
1125 *++yysspc_ssp = yystate = yytablec_table[yyn];
1126 *++yyvspc_vsp = yylvalc_lval;
1127 yycharc_char = (-1);
1128 if (yyerrflagc_errflag > 0) --yyerrflagc_errflag;
1129 goto yyloop;
1130 }
1131 if ((yyn = yyrindexc_rindex[yystate]) && (yyn += yycharc_char) >= 0 &&
1132 yyn <= YYTABLESIZE1033 && yycheckc_check[yyn] == yycharc_char)
1133 {
1134 yyn = yytablec_table[yyn];
1135 goto yyreduce;
1136 }
1137 if (yyerrflagc_errflag) goto yyinrecovery;
1138#if defined(__GNUC__4)
1139 goto yynewerror;
1140#endif
1141yynewerror:
1142 yyerrorc_error("syntax error");
1143#if defined(__GNUC__4)
1144 goto yyerrlab;
1145#endif
1146yyerrlab:
1147 ++yynerrsc_nerrs;
1148yyinrecovery:
1149 if (yyerrflagc_errflag < 3)
1150 {
1151 yyerrflagc_errflag = 3;
1152 for (;;)
1153 {
1154 if ((yyn = yysindexc_sindex[*yysspc_ssp]) && (yyn += YYERRCODE256) >= 0 &&
1155 yyn <= YYTABLESIZE1033 && yycheckc_check[yyn] == YYERRCODE256)
1156 {
1157#if YYDEBUG0
1158 if (yydebugc_debug)
1159 printf("%sdebug: state %d, error recovery shifting\
1160 to state %d\n", YYPREFIX"c_", *yysspc_ssp, yytablec_table[yyn]);
1161#endif
1162 if (yysspc_ssp >= yysslimc_sslim && yygrowstack())
1163 {
1164 goto yyoverflow;
1165 }
1166 *++yysspc_ssp = yystate = yytablec_table[yyn];
1167 *++yyvspc_vsp = yylvalc_lval;
1168 goto yyloop;
1169 }
1170 else
1171 {
1172#if YYDEBUG0
1173 if (yydebugc_debug)
1174 printf("%sdebug: error recovery discarding state %d\n",
1175 YYPREFIX"c_", *yysspc_ssp);
1176#endif
1177 if (yysspc_ssp <= yyssc_ss) goto yyabort;
1178 --yysspc_ssp;
1179 --yyvspc_vsp;
1180 }
1181 }
1182 }
1183 else
1184 {
1185 if (yycharc_char == 0) goto yyabort;
1186#if YYDEBUG0
1187 if (yydebugc_debug)
1188 {
1189 yys = 0;
1190 if (yycharc_char <= YYMAXTOKEN397) yys = yynamec_name[yycharc_char];
1191 if (!yys) yys = "illegal-symbol";
1192 printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
1193 YYPREFIX"c_", yystate, yycharc_char, yys);
1194 }
1195#endif
1196 yycharc_char = (-1);
1197 goto yyloop;
1198 }
1199yyreduce:
1200#if YYDEBUG0
1201 if (yydebugc_debug)
1202 printf("%sdebug: state %d, reducing by rule %d (%s)\n",
1203 YYPREFIX"c_", yystate, yyn, yyrulec_rule[yyn]);
1204#endif
1205 yym = yylenc_len[yyn];
1206 if (yym)
1207 yyvalc_val = yyvspc_vsp[1-yym];
1208 else
1209 memset(&yyvalc_val, 0, sizeof yyvalc_val);
1210 switch (yyn)
1211 {
1212case 14:
1213#line 249 "/usr/src/usr.sbin/nsd/configparser.y"
1214{
1215 struct ip_address_option *ip = cfg_parser->opt->ip_addresses;
1216
1217 if(ip == NULL((void *)0)) {
1218 cfg_parser->opt->ip_addresses = yyvspc_vsp[0].ip;
1219 } else {
1220 while(ip->next) { ip = ip->next; }
1221 ip->next = yyvspc_vsp[0].ip;
1222 }
1223
1224 cfg_parser->ip = yyvspc_vsp[0].ip;
1225 }
1226break;
1227case 15:
1228#line 262 "/usr/src/usr.sbin/nsd/configparser.y"
1229{
1230 cfg_parser->ip = NULL((void *)0);
1231 }
1232break;
1233case 16:
1234#line 266 "/usr/src/usr.sbin/nsd/configparser.y"
1235{
1236 if (yyvspc_vsp[0].llng > 0) {
1237 cfg_parser->opt->server_count = (int)yyvspc_vsp[0].llng;
1238 } else {
1239 yyerrorc_error("expected a number greater than zero");
1240 }
1241 }
1242break;
1243case 17:
1244#line 274 "/usr/src/usr.sbin/nsd/configparser.y"
1245{ cfg_parser->opt->ip_transparent = yyvspc_vsp[0].bln; }
1246break;
1247case 18:
1248#line 276 "/usr/src/usr.sbin/nsd/configparser.y"
1249{ cfg_parser->opt->ip_freebind = yyvspc_vsp[0].bln; }
1250break;
1251case 19:
1252#line 278 "/usr/src/usr.sbin/nsd/configparser.y"
1253{ cfg_parser->opt->send_buffer_size = (int)yyvspc_vsp[0].llng; }
1254break;
1255case 20:
1256#line 280 "/usr/src/usr.sbin/nsd/configparser.y"
1257{ cfg_parser->opt->receive_buffer_size = (int)yyvspc_vsp[0].llng; }
1258break;
1259case 21:
1260#line 282 "/usr/src/usr.sbin/nsd/configparser.y"
1261{ cfg_parser->opt->debug_mode = yyvspc_vsp[0].bln; }
1262break;
1263case 22:
1264#line 284 "/usr/src/usr.sbin/nsd/configparser.y"
1265{ /* ignored, obsolete */ }
1266break;
1267case 23:
1268#line 286 "/usr/src/usr.sbin/nsd/configparser.y"
1269{ cfg_parser->opt->hide_version = yyvspc_vsp[0].bln; }
1270break;
1271case 24:
1272#line 288 "/usr/src/usr.sbin/nsd/configparser.y"
1273{ cfg_parser->opt->hide_identity = yyvspc_vsp[0].bln; }
1274break;
1275case 25:
1276#line 290 "/usr/src/usr.sbin/nsd/configparser.y"
1277{ cfg_parser->opt->drop_updates = yyvspc_vsp[0].bln; }
1278break;
1279case 26:
1280#line 292 "/usr/src/usr.sbin/nsd/configparser.y"
1281{ if(yyvspc_vsp[0].bln) { cfg_parser->opt->do_ip4 = 1; cfg_parser->opt->do_ip6 = 0; } }
1282break;
1283case 27:
1284#line 294 "/usr/src/usr.sbin/nsd/configparser.y"
1285{ if(yyvspc_vsp[0].bln) { cfg_parser->opt->do_ip4 = 0; cfg_parser->opt->do_ip6 = 1; } }
1286break;
1287case 28:
1288#line 296 "/usr/src/usr.sbin/nsd/configparser.y"
1289{ cfg_parser->opt->do_ip4 = yyvspc_vsp[0].bln; }
1290break;
1291case 29:
1292#line 298 "/usr/src/usr.sbin/nsd/configparser.y"
1293{ cfg_parser->opt->do_ip6 = yyvspc_vsp[0].bln; }
1294break;
1295case 30:
1296#line 300 "/usr/src/usr.sbin/nsd/configparser.y"
1297{ /* ignored, obsolete */ }
1298break;
1299case 31:
1300#line 302 "/usr/src/usr.sbin/nsd/configparser.y"
1301{ cfg_parser->opt->identity = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1302break;
1303case 32:
1304#line 304 "/usr/src/usr.sbin/nsd/configparser.y"
1305{ cfg_parser->opt->version = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1306break;
1307case 33:
1308#line 306 "/usr/src/usr.sbin/nsd/configparser.y"
1309{
1310 unsigned char* nsid = 0;
1311 size_t nsid_len = strlen(yyvspc_vsp[0].str);
1312
1313 if (strncasecmp(yyvspc_vsp[0].str, "ascii_", 6) == 0) {
1314 nsid_len -= 6; /* discard "ascii_" */
1315 if(nsid_len < 65535) {
1316 cfg_parser->opt->nsid = region_alloc(cfg_parser->opt->region, nsid_len*2+1);
1317 hex_ntop((uint8_t*)yyvspc_vsp[0].str+6, nsid_len, (char*)cfg_parser->opt->nsid, nsid_len*2+1);
1318 } else {
1319 yyerrorc_error("NSID too long");
1320 }
1321 } else if (nsid_len % 2 != 0) {
1322 yyerrorc_error("the NSID must be a hex string of an even length.");
1323 } else {
1324 nsid_len = nsid_len / 2;
1325 if(nsid_len < 65535) {
1326 nsid = xalloc(nsid_len);
1327 if (hex_pton(yyvspc_vsp[0].str, nsid, nsid_len) == -1) {
1328 yyerrorc_error("hex string cannot be parsed in NSID.");
1329 } else {
1330 cfg_parser->opt->nsid = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
1331 }
1332 free(nsid);
1333 } else {
1334 yyerrorc_error("NSID too long");
1335 }
1336 }
1337 }
1338break;
1339case 34:
1340#line 336 "/usr/src/usr.sbin/nsd/configparser.y"
1341{ cfg_parser->opt->logfile = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1342break;
1343case 35:
1344#line 338 "/usr/src/usr.sbin/nsd/configparser.y"
1345{ cfg_parser->opt->log_only_syslog = yyvspc_vsp[0].bln; }
1346break;
1347case 36:
1348#line 340 "/usr/src/usr.sbin/nsd/configparser.y"
1349{
1350 if (yyvspc_vsp[0].llng > 0) {
1351 cfg_parser->opt->tcp_count = (int)yyvspc_vsp[0].llng;
1352 } else {
1353 yyerrorc_error("expected a number greater than zero");
1354 }
1355 }
1356break;
1357case 37:
1358#line 348 "/usr/src/usr.sbin/nsd/configparser.y"
1359{ cfg_parser->opt->tcp_reject_overflow = yyvspc_vsp[0].bln; }
1360break;
1361case 38:
1362#line 350 "/usr/src/usr.sbin/nsd/configparser.y"
1363{ cfg_parser->opt->tcp_query_count = (int)yyvspc_vsp[0].llng; }
1364break;
1365case 39:
1366#line 352 "/usr/src/usr.sbin/nsd/configparser.y"
1367{ cfg_parser->opt->tcp_timeout = (int)yyvspc_vsp[0].llng; }
1368break;
1369case 40:
1370#line 354 "/usr/src/usr.sbin/nsd/configparser.y"
1371{ cfg_parser->opt->tcp_mss = (int)yyvspc_vsp[0].llng; }
1372break;
1373case 41:
1374#line 356 "/usr/src/usr.sbin/nsd/configparser.y"
1375{ cfg_parser->opt->outgoing_tcp_mss = (int)yyvspc_vsp[0].llng; }
1376break;
1377case 42:
1378#line 358 "/usr/src/usr.sbin/nsd/configparser.y"
1379{ cfg_parser->opt->ipv4_edns_size = (size_t)yyvspc_vsp[0].llng; }
1380break;
1381case 43:
1382#line 360 "/usr/src/usr.sbin/nsd/configparser.y"
1383{ cfg_parser->opt->ipv6_edns_size = (size_t)yyvspc_vsp[0].llng; }
1384break;
1385case 44:
1386#line 362 "/usr/src/usr.sbin/nsd/configparser.y"
1387{ cfg_parser->opt->pidfile = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1388break;
1389case 45:
1390#line 364 "/usr/src/usr.sbin/nsd/configparser.y"
1391{
1392 /* port number, stored as a string */
1393 char buf[16];
1394 (void)snprintf(buf, sizeof(buf), "%lld", yyvspc_vsp[0].llng);
1395 cfg_parser->opt->port = region_strdup(cfg_parser->opt->region, buf);
1396 }
1397break;
1398case 46:
1399#line 371 "/usr/src/usr.sbin/nsd/configparser.y"
1400{ cfg_parser->opt->reuseport = yyvspc_vsp[0].bln; }
1401break;
1402case 47:
1403#line 373 "/usr/src/usr.sbin/nsd/configparser.y"
1404{ cfg_parser->opt->statistics = (int)yyvspc_vsp[0].llng; }
1405break;
1406case 48:
1407#line 375 "/usr/src/usr.sbin/nsd/configparser.y"
1408{ cfg_parser->opt->chroot = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1409break;
1410case 49:
1411#line 377 "/usr/src/usr.sbin/nsd/configparser.y"
1412{ cfg_parser->opt->username = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1413break;
1414case 50:
1415#line 379 "/usr/src/usr.sbin/nsd/configparser.y"
1416{ cfg_parser->opt->zonesdir = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1417break;
1418case 51:
1419#line 381 "/usr/src/usr.sbin/nsd/configparser.y"
1420{ cfg_parser->opt->zonelistfile = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1421break;
1422case 52:
1423#line 383 "/usr/src/usr.sbin/nsd/configparser.y"
1424{ /* ignored, obsolete */ }
1425break;
1426case 53:
1427#line 385 "/usr/src/usr.sbin/nsd/configparser.y"
1428{ cfg_parser->opt->xfrdfile = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1429break;
1430case 54:
1431#line 387 "/usr/src/usr.sbin/nsd/configparser.y"
1432{ cfg_parser->opt->xfrdir = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1433break;
1434case 55:
1435#line 389 "/usr/src/usr.sbin/nsd/configparser.y"
1436{ cfg_parser->opt->xfrd_reload_timeout = (int)yyvspc_vsp[0].llng; }
1437break;
1438case 56:
1439#line 391 "/usr/src/usr.sbin/nsd/configparser.y"
1440{ cfg_parser->opt->verbosity = (int)yyvspc_vsp[0].llng; }
1441break;
1442case 57:
1443#line 393 "/usr/src/usr.sbin/nsd/configparser.y"
1444{
1445#ifdef RATELIMIT
1446 if (yyvspc_vsp[0].llng > 0) {
1447 cfg_parser->opt->rrl_size = (size_t)yyvspc_vsp[0].llng;
1448 } else {
1449 yyerrorc_error("expected a number greater than zero");
1450 }
1451#endif
1452 }
1453break;
1454case 58:
1455#line 403 "/usr/src/usr.sbin/nsd/configparser.y"
1456{
1457#ifdef RATELIMIT
1458 cfg_parser->opt->rrl_ratelimit = (size_t)yyvspc_vsp[0].llng;
1459#endif
1460 }
1461break;
1462case 59:
1463#line 409 "/usr/src/usr.sbin/nsd/configparser.y"
1464{
1465#ifdef RATELIMIT
1466 cfg_parser->opt->rrl_slip = (size_t)yyvspc_vsp[0].llng;
1467#endif
1468 }
1469break;
1470case 60:
1471#line 415 "/usr/src/usr.sbin/nsd/configparser.y"
1472{
1473#ifdef RATELIMIT
1474 if (yyvspc_vsp[0].llng > 32) {
1475 yyerrorc_error("invalid IPv4 prefix length");
1476 } else {
1477 cfg_parser->opt->rrl_ipv4_prefix_length = (size_t)yyvspc_vsp[0].llng;
1478 }
1479#endif
1480 }
1481break;
1482case 61:
1483#line 425 "/usr/src/usr.sbin/nsd/configparser.y"
1484{
1485#ifdef RATELIMIT
1486 if (yyvspc_vsp[0].llng > 64) {
1487 yyerrorc_error("invalid IPv6 prefix length");
1488 } else {
1489 cfg_parser->opt->rrl_ipv6_prefix_length = (size_t)yyvspc_vsp[0].llng;
1490 }
1491#endif
1492 }
1493break;
1494case 62:
1495#line 435 "/usr/src/usr.sbin/nsd/configparser.y"
1496{
1497#ifdef RATELIMIT
1498 cfg_parser->opt->rrl_whitelist_ratelimit = (size_t)yyvspc_vsp[0].llng;
1499#endif
1500 }
1501break;
1502case 63:
1503#line 441 "/usr/src/usr.sbin/nsd/configparser.y"
1504{ cfg_parser->opt->zonefiles_check = yyvspc_vsp[0].bln; }
1505break;
1506case 64:
1507#line 443 "/usr/src/usr.sbin/nsd/configparser.y"
1508{ cfg_parser->opt->zonefiles_write = (int)yyvspc_vsp[0].llng; }
1509break;
1510case 65:
1511#line 445 "/usr/src/usr.sbin/nsd/configparser.y"
1512{
1513 cfg_parser->opt->log_time_ascii = yyvspc_vsp[0].bln;
1514 log_time_asc = cfg_parser->opt->log_time_ascii;
1515 }
1516break;
1517case 66:
1518#line 450 "/usr/src/usr.sbin/nsd/configparser.y"
1519{
1520 cfg_parser->opt->round_robin = yyvspc_vsp[0].bln;
1521 round_robin = cfg_parser->opt->round_robin;
1522 }
1523break;
1524case 67:
1525#line 455 "/usr/src/usr.sbin/nsd/configparser.y"
1526{
1527 cfg_parser->opt->minimal_responses = yyvspc_vsp[0].bln;
1528 minimal_responses = cfg_parser->opt->minimal_responses;
1529 }
1530break;
1531case 68:
1532#line 460 "/usr/src/usr.sbin/nsd/configparser.y"
1533{ cfg_parser->opt->confine_to_zone = yyvspc_vsp[0].bln; }
1534break;
1535case 69:
1536#line 462 "/usr/src/usr.sbin/nsd/configparser.y"
1537{ cfg_parser->opt->refuse_any = yyvspc_vsp[0].bln; }
1538break;
1539case 70:
1540#line 464 "/usr/src/usr.sbin/nsd/configparser.y"
1541{ cfg_parser->opt->tls_service_key = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1542break;
1543case 71:
1544#line 466 "/usr/src/usr.sbin/nsd/configparser.y"
1545{ cfg_parser->opt->tls_service_ocsp = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1546break;
1547case 72:
1548#line 468 "/usr/src/usr.sbin/nsd/configparser.y"
1549{ cfg_parser->opt->tls_service_pem = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1550break;
1551case 73:
1552#line 470 "/usr/src/usr.sbin/nsd/configparser.y"
1553{
1554 /* port number, stored as string */
1555 char buf[16];
1556 (void)snprintf(buf, sizeof(buf), "%lld", yyvspc_vsp[0].llng);
1557 cfg_parser->opt->tls_port = region_strdup(cfg_parser->opt->region, buf);
1558 }
1559break;
1560case 74:
1561#line 477 "/usr/src/usr.sbin/nsd/configparser.y"
1562{ cfg_parser->opt->tls_cert_bundle = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1563break;
1564case 75:
1565#line 479 "/usr/src/usr.sbin/nsd/configparser.y"
1566{
1567 struct proxy_protocol_port_list* elem = region_alloc_zero(
1568 cfg_parser->opt->region, sizeof(*elem));
1569 elem->port = yyvspc_vsp[0].llng;
1570 elem->next = cfg_parser->opt->proxy_protocol_port;
1571 cfg_parser->opt->proxy_protocol_port = elem;
1572 }
1573break;
1574case 76:
1575#line 487 "/usr/src/usr.sbin/nsd/configparser.y"
1576{ cfg_parser->opt->answer_cookie = yyvspc_vsp[0].bln; }
1577break;
1578case 77:
1579#line 489 "/usr/src/usr.sbin/nsd/configparser.y"
1580{ cfg_parser->opt->cookie_secret = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1581break;
1582case 78:
1583#line 491 "/usr/src/usr.sbin/nsd/configparser.y"
1584{ cfg_parser->opt->cookie_secret_file = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1585break;
1586case 79:
1587#line 493 "/usr/src/usr.sbin/nsd/configparser.y"
1588{ cfg_parser->opt->xfrd_tcp_max = (int)yyvspc_vsp[0].llng; }
1589break;
1590case 80:
1591#line 495 "/usr/src/usr.sbin/nsd/configparser.y"
1592{ cfg_parser->opt->xfrd_tcp_pipeline = (int)yyvspc_vsp[0].llng; }
1593break;
1594case 81:
1595#line 497 "/usr/src/usr.sbin/nsd/configparser.y"
1596{
1597 cfg_parser->opt->cpu_affinity = yyvspc_vsp[0].cpu;
1598 }
1599break;
1600case 82:
1601#line 501 "/usr/src/usr.sbin/nsd/configparser.y"
1602{
1603 if(yyvspc_vsp[0].llng < 0) {
1604 yyerrorc_error("expected a non-negative number");
1605 YYABORTgoto yyabort;
1606 } else {
1607 struct cpu_map_option *opt, *tail;
1608
1609 opt = cfg_parser->opt->service_cpu_affinity;
1610 while(opt && opt->service != yyvspc_vsp[-1].llng) { opt = opt->next; }
1611
1612 if(opt) {
1613 opt->cpu = yyvspc_vsp[0].llng;
1614 } else {
1615 opt = region_alloc_zero(cfg_parser->opt->region, sizeof(*opt));
1616 opt->service = (int)yyvspc_vsp[-1].llng;
1617 opt->cpu = (int)yyvspc_vsp[0].llng;
1618
1619 tail = cfg_parser->opt->service_cpu_affinity;
1620 if(tail) {
1621 while(tail->next) { tail = tail->next; }
1622 tail->next = opt;
1623 } else {
1624 cfg_parser->opt->service_cpu_affinity = opt;
1625 }
1626 }
1627 }
1628 }
1629break;
1630case 85:
1631#line 535 "/usr/src/usr.sbin/nsd/configparser.y"
1632{
1633 char *tok, *ptr, *str;
1634 struct range_option *servers = NULL((void *)0);
1635 long long first, last;
1636
1637 /* user may specify "0 1", "0" "1", 0 1 or a combination thereof */
1638 for(str = yyvspc_vsp[0].str; (tok = strtok_r(str, " \t", &ptr)); str = NULL((void *)0)) {
1639 struct range_option *opt =
1640 region_alloc(cfg_parser->opt->region, sizeof(*opt));
1641 first = last = 0;
1642 if(!parse_range(tok, &first, &last)) {
1643 yyerrorc_error("invalid server range '%s'", tok);
1644 YYABORTgoto yyabort;
1645 }
1646 assert(first >= 0)((void)0);
1647 assert(last >= 0)((void)0);
1648 opt->next = NULL((void *)0);
1649 opt->first = (int)first;
1650 opt->last = (int)last;
1651 if(servers) {
1652 servers = servers->next = opt;
1653 } else {
1654 servers = cfg_parser->ip->servers = opt;
1655 }
1656 }
1657 }
1658break;
1659case 86:
1660#line 562 "/usr/src/usr.sbin/nsd/configparser.y"
1661{ cfg_parser->ip->dev = yyvspc_vsp[0].bln; }
1662break;
1663case 87:
1664#line 564 "/usr/src/usr.sbin/nsd/configparser.y"
1665{ cfg_parser->ip->fib = yyvspc_vsp[0].llng; }
1666break;
1667case 88:
1668#line 568 "/usr/src/usr.sbin/nsd/configparser.y"
1669{ yyvalc_val.cpu = NULL((void *)0); }
1670break;
1671case 89:
1672#line 570 "/usr/src/usr.sbin/nsd/configparser.y"
1673{
1674 char *tok, *ptr, *str;
1675 struct cpu_option *tail;
1676 long long cpu;
1677
1678 str = yyvspc_vsp[0].str;
Value stored to 'str' is never read
1679 yyvalc_val.cpu = tail = yyvspc_vsp[-1].cpu;
1680 if(tail) {
1681 while(tail->next) { tail = tail->next; }
1682 }
1683
1684 /* Users may specify "0 1", "0" "1", 0 1 or a combination thereof. */
1685 for(str = yyvspc_vsp[0].str; (tok = strtok_r(str, " \t", &ptr)); str = NULL((void *)0)) {
1686 struct cpu_option *opt =
1687 region_alloc_zero(cfg_parser->opt->region, sizeof(*opt));
1688 cpu = 0;
1689 if(!parse_number(tok, &cpu) || cpu < 0) {
1690 yyerrorc_error("expected a positive number");
1691 YYABORTgoto yyabort;
1692 }
1693 assert(cpu >=0)((void)0);
1694 opt->cpu = (int)cpu;
1695 if(tail) {
1696 tail->next = opt;
1697 tail = opt;
1698 } else {
1699 yyvalc_val.cpu = tail = opt;
1700 }
1701 }
1702 }
1703break;
1704case 90:
1705#line 604 "/usr/src/usr.sbin/nsd/configparser.y"
1706{ yyvalc_val.llng = -1; }
1707break;
1708case 91:
1709#line 606 "/usr/src/usr.sbin/nsd/configparser.y"
1710{
1711 if(yyvspc_vsp[0].llng <= 0) {
1712 yyerrorc_error("invalid server identifier");
1713 YYABORTgoto yyabort;
1714 }
1715 yyvalc_val.llng = yyvspc_vsp[0].llng;
1716 }
1717break;
1718case 95:
1719#line 623 "/usr/src/usr.sbin/nsd/configparser.y"
1720{ cfg_parser->opt->dnstap_enable = yyvspc_vsp[0].bln; }
1721break;
1722case 96:
1723#line 625 "/usr/src/usr.sbin/nsd/configparser.y"
1724{ cfg_parser->opt->dnstap_socket_path = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1725break;
1726case 97:
1727#line 627 "/usr/src/usr.sbin/nsd/configparser.y"
1728{ cfg_parser->opt->dnstap_ip = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1729break;
1730case 98:
1731#line 629 "/usr/src/usr.sbin/nsd/configparser.y"
1732{ cfg_parser->opt->dnstap_tls = yyvspc_vsp[0].bln; }
1733break;
1734case 99:
1735#line 631 "/usr/src/usr.sbin/nsd/configparser.y"
1736{ cfg_parser->opt->dnstap_tls_server_name = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1737break;
1738case 100:
1739#line 633 "/usr/src/usr.sbin/nsd/configparser.y"
1740{ cfg_parser->opt->dnstap_tls_cert_bundle = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1741break;
1742case 101:
1743#line 635 "/usr/src/usr.sbin/nsd/configparser.y"
1744{ cfg_parser->opt->dnstap_tls_client_key_file = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1745break;
1746case 102:
1747#line 637 "/usr/src/usr.sbin/nsd/configparser.y"
1748{ cfg_parser->opt->dnstap_tls_client_cert_file = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1749break;
1750case 103:
1751#line 639 "/usr/src/usr.sbin/nsd/configparser.y"
1752{ cfg_parser->opt->dnstap_send_identity = yyvspc_vsp[0].bln; }
1753break;
1754case 104:
1755#line 641 "/usr/src/usr.sbin/nsd/configparser.y"
1756{ cfg_parser->opt->dnstap_send_version = yyvspc_vsp[0].bln; }
1757break;
1758case 105:
1759#line 643 "/usr/src/usr.sbin/nsd/configparser.y"
1760{ cfg_parser->opt->dnstap_identity = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1761break;
1762case 106:
1763#line 645 "/usr/src/usr.sbin/nsd/configparser.y"
1764{ cfg_parser->opt->dnstap_version = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1765break;
1766case 107:
1767#line 647 "/usr/src/usr.sbin/nsd/configparser.y"
1768{ cfg_parser->opt->dnstap_log_auth_query_messages = yyvspc_vsp[0].bln; }
1769break;
1770case 108:
1771#line 649 "/usr/src/usr.sbin/nsd/configparser.y"
1772{ cfg_parser->opt->dnstap_log_auth_response_messages = yyvspc_vsp[0].bln; }
1773break;
1774case 112:
1775#line 660 "/usr/src/usr.sbin/nsd/configparser.y"
1776{ cfg_parser->opt->control_enable = yyvspc_vsp[0].bln; }
1777break;
1778case 113:
1779#line 662 "/usr/src/usr.sbin/nsd/configparser.y"
1780{
1781 struct ip_address_option *ip = cfg_parser->opt->control_interface;
1782 if(ip == NULL((void *)0)) {
1783 cfg_parser->opt->control_interface = yyvspc_vsp[0].ip;
1784 } else {
1785 while(ip->next != NULL((void *)0)) { ip = ip->next; }
1786 ip->next = yyvspc_vsp[0].ip;
1787 }
1788 }
1789break;
1790case 114:
1791#line 672 "/usr/src/usr.sbin/nsd/configparser.y"
1792{
1793 if(yyvspc_vsp[0].llng == 0) {
1794 yyerrorc_error("control port number expected");
1795 } else {
1796 cfg_parser->opt->control_port = (int)yyvspc_vsp[0].llng;
1797 }
1798 }
1799break;
1800case 115:
1801#line 680 "/usr/src/usr.sbin/nsd/configparser.y"
1802{ cfg_parser->opt->server_key_file = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1803break;
1804case 116:
1805#line 682 "/usr/src/usr.sbin/nsd/configparser.y"
1806{ cfg_parser->opt->server_cert_file = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1807break;
1808case 117:
1809#line 684 "/usr/src/usr.sbin/nsd/configparser.y"
1810{ cfg_parser->opt->control_key_file = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1811break;
1812case 118:
1813#line 686 "/usr/src/usr.sbin/nsd/configparser.y"
1814{ cfg_parser->opt->control_cert_file = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
1815break;
1816case 119:
1817#line 691 "/usr/src/usr.sbin/nsd/configparser.y"
1818{
1819 tls_auth_options_type *tls_auth = tls_auth_options_create(cfg_parser->opt->region);
1820 assert(cfg_parser->tls_auth == NULL)((void)0);
1821 cfg_parser->tls_auth = tls_auth;
1822 }
1823break;
1824case 120:
1825#line 697 "/usr/src/usr.sbin/nsd/configparser.y"
1826{
1827 struct tls_auth_options *tls_auth = cfg_parser->tls_auth;
1828 if(tls_auth->name == NULL((void *)0)) {
1829 yyerrorc_error("tls-auth has no name");
1830 } else if(tls_auth->auth_domain_name == NULL((void *)0)) {
1831 yyerrorc_error("tls-auth %s has no auth-domain-name", tls_auth->name);
1832 } else if(tls_auth_options_find(cfg_parser->opt, tls_auth->name)) {
1833 yyerrorc_error("duplicate tls-auth %s", tls_auth->name);
1834 } else {
1835 tls_auth_options_insert(cfg_parser->opt, tls_auth);
1836 cfg_parser->tls_auth = NULL((void *)0);
1837 }
1838 }
1839break;
1840case 123:
1841#line 716 "/usr/src/usr.sbin/nsd/configparser.y"
1842{
1843 dname_type *dname;
1844 dname = (dname_type *)dname_parse(cfg_parser->opt->region, yyvspc_vsp[0].str);
1845 cfg_parser->tls_auth->name = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
1846 if(dname == NULL((void *)0)) {
1847 yyerrorc_error("bad tls-auth name %s", yyvspc_vsp[0].str);
1848 } else {
1849 region_recycle(cfg_parser->opt->region, dname, dname_total_size(dname));
1850 }
1851 }
1852break;
1853case 124:
1854#line 727 "/usr/src/usr.sbin/nsd/configparser.y"
1855{
1856 cfg_parser->tls_auth->auth_domain_name = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
1857 }
1858break;
1859case 125:
1860#line 731 "/usr/src/usr.sbin/nsd/configparser.y"
1861{
1862 cfg_parser->tls_auth->client_cert = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
1863 }
1864break;
1865case 126:
1866#line 735 "/usr/src/usr.sbin/nsd/configparser.y"
1867{
1868 cfg_parser->tls_auth->client_key = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
1869 }
1870break;
1871case 127:
1872#line 739 "/usr/src/usr.sbin/nsd/configparser.y"
1873{
1874 cfg_parser->tls_auth->client_key_pw = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
1875 }
1876break;
1877case 128:
1878#line 746 "/usr/src/usr.sbin/nsd/configparser.y"
1879{
1880 key_options_type *key = key_options_create(cfg_parser->opt->region);
1881 key->algorithm = region_strdup(cfg_parser->opt->region, "sha256");
1882 assert(cfg_parser->key == NULL)((void)0);
1883 cfg_parser->key = key;
1884 }
1885break;
1886case 129:
1887#line 753 "/usr/src/usr.sbin/nsd/configparser.y"
1888{
1889 struct key_options *key = cfg_parser->key;
1890 if(key->name == NULL((void *)0)) {
1891 yyerrorc_error("tsig key has no name");
1892 } else if(key->algorithm == NULL((void *)0)) {
1893 yyerrorc_error("tsig key %s has no algorithm", key->name);
1894 } else if(key->secret == NULL((void *)0)) {
1895 yyerrorc_error("tsig key %s has no secret blob", key->name);
1896 } else if(key_options_find(cfg_parser->opt, key->name)) {
1897 yyerrorc_error("duplicate tsig key %s", key->name);
1898 } else {
1899 key_options_insert(cfg_parser->opt, key);
1900 cfg_parser->key = NULL((void *)0);
1901 }
1902 }
1903break;
1904case 132:
1905#line 774 "/usr/src/usr.sbin/nsd/configparser.y"
1906{
1907 dname_type *dname;
1908
1909 dname = (dname_type *)dname_parse(cfg_parser->opt->region, yyvspc_vsp[0].str);
1910 cfg_parser->key->name = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
1911 if(dname == NULL((void *)0)) {
1912 yyerrorc_error("bad tsig key name %s", yyvspc_vsp[0].str);
1913 } else {
1914 region_recycle(cfg_parser->opt->region, dname, dname_total_size(dname));
1915 }
1916 }
1917break;
1918case 133:
1919#line 786 "/usr/src/usr.sbin/nsd/configparser.y"
1920{
1921 if(tsig_get_algorithm_by_name(yyvspc_vsp[0].str) == NULL((void *)0)) {
1922 yyerrorc_error("bad tsig key algorithm %s", yyvspc_vsp[0].str);
1923 } else {
1924 cfg_parser->key->algorithm = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
1925 }
1926 }
1927break;
1928case 134:
1929#line 794 "/usr/src/usr.sbin/nsd/configparser.y"
1930{
1931 uint8_t data[16384];
1932 int size;
1933
1934 cfg_parser->key->secret = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
1935 size = __b64_pton(yyvspc_vsp[0].str, data, sizeof(data));
1936 if(size == -1) {
1937 yyerrorc_error("cannot base64 decode tsig secret %s",
1938 cfg_parser->key->name?
1939 cfg_parser->key->name:"");
1940 } else if(size != 0) {
1941 memset(data, 0xdd, size); /* wipe secret */
1942 }
1943 }
1944break;
1945case 135:
1946#line 812 "/usr/src/usr.sbin/nsd/configparser.y"
1947{
1948 assert(cfg_parser->pattern == NULL)((void)0);
1949 assert(cfg_parser->zone == NULL)((void)0);
1950 cfg_parser->zone = zone_options_create(cfg_parser->opt->region);
1951 cfg_parser->zone->part_of_config = 1;
1952 cfg_parser->zone->pattern = cfg_parser->pattern =
1953 pattern_options_create(cfg_parser->opt->region);
1954 cfg_parser->zone->pattern->implicit = 1;
1955 }
1956break;
1957case 136:
1958#line 822 "/usr/src/usr.sbin/nsd/configparser.y"
1959{
1960 assert(cfg_parser->zone != NULL)((void)0);
1961 if(cfg_parser->zone->name == NULL((void *)0)) {
1962 yyerrorc_error("zone has no name");
1963 } else if(!nsd_options_insert_zone(cfg_parser->opt, cfg_parser->zone)) {
1964 yyerrorc_error("duplicate zone %s", cfg_parser->zone->name);
1965 } else if(!nsd_options_insert_pattern(cfg_parser->opt, cfg_parser->zone->pattern)) {
1966 yyerrorc_error("duplicate pattern %s", cfg_parser->zone->pattern->pname);
1967 }
1968 cfg_parser->pattern = NULL((void *)0);
1969 cfg_parser->zone = NULL((void *)0);
1970 }
1971break;
1972case 139:
1973#line 840 "/usr/src/usr.sbin/nsd/configparser.y"
1974{
1975 const char *marker = PATTERN_IMPLICIT_MARKER"_implicit_";
1976 char *pname = region_alloc(cfg_parser->opt->region, strlen(yyvspc_vsp[0].str) + strlen(marker) + 1);
1977 memmove(pname, marker, strlen(marker));
1978 memmove(pname + strlen(marker), yyvspc_vsp[0].str, strlen(yyvspc_vsp[0].str) + 1);
1979 cfg_parser->zone->pattern->pname = pname;
1980 cfg_parser->zone->name = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
1981 if(pattern_options_find(cfg_parser->opt, pname)) {
1982 yyerrorc_error("zone %s cannot be created because implicit pattern %s "
1983 "already exists", yyvspc_vsp[0].str, pname);
1984 }
1985 }
1986break;
1987case 141:
1988#line 856 "/usr/src/usr.sbin/nsd/configparser.y"
1989{
1990 assert(cfg_parser->pattern == NULL)((void)0);
1991 cfg_parser->pattern = pattern_options_create(cfg_parser->opt->region);
1992 }
1993break;
1994case 142:
1995#line 861 "/usr/src/usr.sbin/nsd/configparser.y"
1996{
1997 pattern_options_type *pattern = cfg_parser->pattern;
1998 if(pattern->pname == NULL((void *)0)) {
1999 yyerrorc_error("pattern has no name");
2000 } else if(!nsd_options_insert_pattern(cfg_parser->opt, pattern)) {
2001 yyerrorc_error("duplicate pattern %s", pattern->pname);
2002 }
2003 cfg_parser->pattern = NULL((void *)0);
2004 }
2005break;
2006case 145:
2007#line 876 "/usr/src/usr.sbin/nsd/configparser.y"
2008{
2009 if(strchr(yyvspc_vsp[0].str, ' ')) {
2010 yyerrorc_error("space is not allowed in pattern name: '%s'", yyvspc_vsp[0].str);
2011 }
2012 cfg_parser->pattern->pname = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
2013 }
2014break;
2015case 147:
2016#line 886 "/usr/src/usr.sbin/nsd/configparser.y"
2017{
2018#ifdef RATELIMIT
2019 cfg_parser->pattern->rrl_whitelist |= rrlstr2type(yyvspc_vsp[0].str);
2020#endif
2021 }
2022break;
2023case 148:
2024#line 892 "/usr/src/usr.sbin/nsd/configparser.y"
2025{ cfg_parser->pattern->zonefile = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
2026break;
2027case 149:
2028#line 894 "/usr/src/usr.sbin/nsd/configparser.y"
2029{ cfg_parser->pattern->zonestats = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str); }
2030break;
2031case 150:
2032#line 896 "/usr/src/usr.sbin/nsd/configparser.y"
2033{
2034 if(yyvspc_vsp[0].llng > 0) {
2035 cfg_parser->pattern->size_limit_xfr = (int)yyvspc_vsp[0].llng;
2036 } else {
2037 yyerrorc_error("expected a number greater than zero");
2038 }
2039 }
2040break;
2041case 151:
2042#line 904 "/usr/src/usr.sbin/nsd/configparser.y"
2043{ cfg_parser->pattern->multi_master_check = (int)yyvspc_vsp[0].bln; }
2044break;
2045case 152:
2046#line 906 "/usr/src/usr.sbin/nsd/configparser.y"
2047{ config_apply_pattern(cfg_parser->pattern, yyvspc_vsp[0].str); }
2048break;
2049case 153:
2050#line 908 "/usr/src/usr.sbin/nsd/configparser.y"
2051{
2052 acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvspc_vsp[-1].str, yyvspc_vsp[0].str);
2053 if(acl->blocked)
2054 yyerrorc_error("blocked address used for request-xfr");
2055 if(acl->rangetype != acl_range_single)
2056 yyerrorc_error("address range used for request-xfr");
2057 append_acl(&cfg_parser->pattern->request_xfr, acl);
2058 }
2059break;
2060case 154:
2061#line 917 "/usr/src/usr.sbin/nsd/configparser.y"
2062{ }
2063break;
2064case 155:
2065#line 919 "/usr/src/usr.sbin/nsd/configparser.y"
2066{
2067 acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvspc_vsp[-1].str, yyvspc_vsp[0].str);
2068 acl->use_axfr_only = 1;
2069 if(acl->blocked)
2070 yyerrorc_error("blocked address used for request-xfr");
2071 if(acl->rangetype != acl_range_single)
2072 yyerrorc_error("address range used for request-xfr");
2073 append_acl(&cfg_parser->pattern->request_xfr, acl);
2074 }
2075break;
2076case 156:
2077#line 929 "/usr/src/usr.sbin/nsd/configparser.y"
2078{ }
2079break;
2080case 157:
2081#line 931 "/usr/src/usr.sbin/nsd/configparser.y"
2082{
2083 acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvspc_vsp[-1].str, yyvspc_vsp[0].str);
2084 acl->allow_udp = 1;
2085 if(acl->blocked)
2086 yyerrorc_error("blocked address used for request-xfr");
2087 if(acl->rangetype != acl_range_single)
2088 yyerrorc_error("address range used for request-xfr");
2089 append_acl(&cfg_parser->pattern->request_xfr, acl);
2090 }
2091break;
2092case 158:
2093#line 941 "/usr/src/usr.sbin/nsd/configparser.y"
2094{
2095 acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvspc_vsp[-1].str, yyvspc_vsp[0].str);
2096 append_acl(&cfg_parser->pattern->allow_notify, acl);
2097 }
2098break;
2099case 159:
2100#line 946 "/usr/src/usr.sbin/nsd/configparser.y"
2101{
2102 acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvspc_vsp[-1].str, yyvspc_vsp[0].str);
2103 if(acl->blocked)
2104 yyerrorc_error("blocked address used for notify");
2105 if(acl->rangetype != acl_range_single)
2106 yyerrorc_error("address range used for notify");
2107 append_acl(&cfg_parser->pattern->notify, acl);
2108 }
2109break;
2110case 160:
2111#line 955 "/usr/src/usr.sbin/nsd/configparser.y"
2112{
2113 acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvspc_vsp[-1].str, yyvspc_vsp[0].str);
2114 append_acl(&cfg_parser->pattern->provide_xfr, acl);
2115 }
2116break;
2117case 161:
2118#line 960 "/usr/src/usr.sbin/nsd/configparser.y"
2119{
2120 acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvspc_vsp[-1].str, yyvspc_vsp[0].str);
2121 append_acl(&cfg_parser->pattern->allow_query, acl);
2122 }
2123break;
2124case 162:
2125#line 965 "/usr/src/usr.sbin/nsd/configparser.y"
2126{
2127 acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvspc_vsp[0].str, "NOKEY");
2128 append_acl(&cfg_parser->pattern->outgoing_interface, acl);
2129 }
2130break;
2131case 163:
2132#line 970 "/usr/src/usr.sbin/nsd/configparser.y"
2133{
2134 cfg_parser->pattern->allow_axfr_fallback = yyvspc_vsp[0].bln;
2135 cfg_parser->pattern->allow_axfr_fallback_is_default = 0;
2136 }
2137break;
2138case 164:
2139#line 975 "/usr/src/usr.sbin/nsd/configparser.y"
2140{
2141 cfg_parser->pattern->notify_retry = yyvspc_vsp[0].llng;
2142 cfg_parser->pattern->notify_retry_is_default = 0;
2143 }
2144break;
2145case 165:
2146#line 980 "/usr/src/usr.sbin/nsd/configparser.y"
2147{
2148 cfg_parser->pattern->max_refresh_time = yyvspc_vsp[0].llng;
2149 cfg_parser->pattern->max_refresh_time_is_default = 0;
2150 }
2151break;
2152case 166:
2153#line 985 "/usr/src/usr.sbin/nsd/configparser.y"
2154{
2155 cfg_parser->pattern->min_refresh_time = yyvspc_vsp[0].llng;
2156 cfg_parser->pattern->min_refresh_time_is_default = 0;
2157 }
2158break;
2159case 167:
2160#line 990 "/usr/src/usr.sbin/nsd/configparser.y"
2161{
2162 cfg_parser->pattern->max_retry_time = yyvspc_vsp[0].llng;
2163 cfg_parser->pattern->max_retry_time_is_default = 0;
2164 }
2165break;
2166case 168:
2167#line 995 "/usr/src/usr.sbin/nsd/configparser.y"
2168{
2169 cfg_parser->pattern->min_retry_time = yyvspc_vsp[0].llng;
2170 cfg_parser->pattern->min_retry_time_is_default = 0;
2171 }
2172break;
2173case 169:
2174#line 1000 "/usr/src/usr.sbin/nsd/configparser.y"
2175{
2176 long long num;
2177 uint8_t expr;
2178
2179 if (!parse_expire_expr(yyvspc_vsp[0].str, &num, &expr)) {
2180 yyerrorc_error("expected an expire time in seconds or \"refresh+retry+1\"");
2181 YYABORTgoto yyabort; /* trigger a parser error */
2182 }
2183 cfg_parser->pattern->min_expire_time = num;
2184 cfg_parser->pattern->min_expire_time_expr = expr;
2185 }
2186break;
2187case 170:
2188#line 1012 "/usr/src/usr.sbin/nsd/configparser.y"
2189{
2190 cfg_parser->pattern->store_ixfr = yyvspc_vsp[0].bln;
2191 cfg_parser->pattern->store_ixfr_is_default = 0;
2192 }
2193break;
2194case 171:
2195#line 1017 "/usr/src/usr.sbin/nsd/configparser.y"
2196{
2197 cfg_parser->pattern->ixfr_size = yyvspc_vsp[0].llng;
2198 cfg_parser->pattern->ixfr_size_is_default = 0;
2199 }
2200break;
2201case 172:
2202#line 1022 "/usr/src/usr.sbin/nsd/configparser.y"
2203{
2204 cfg_parser->pattern->ixfr_number = yyvspc_vsp[0].llng;
2205 cfg_parser->pattern->ixfr_number_is_default = 0;
2206 }
2207break;
2208case 173:
2209#line 1027 "/usr/src/usr.sbin/nsd/configparser.y"
2210{
2211 cfg_parser->pattern->create_ixfr = yyvspc_vsp[0].bln;
2212 cfg_parser->pattern->create_ixfr_is_default = 0;
2213 }
2214break;
2215case 174:
2216#line 1032 "/usr/src/usr.sbin/nsd/configparser.y"
2217{ cfg_parser->pattern->verify_zone = yyvspc_vsp[0].bln; }
2218break;
2219case 175:
2220#line 1034 "/usr/src/usr.sbin/nsd/configparser.y"
2221{ cfg_parser->pattern->verifier = yyvspc_vsp[0].strv; }
2222break;
2223case 176:
2224#line 1036 "/usr/src/usr.sbin/nsd/configparser.y"
2225{ cfg_parser->pattern->verifier_feed_zone = yyvspc_vsp[0].bln; }
2226break;
2227case 177:
2228#line 1038 "/usr/src/usr.sbin/nsd/configparser.y"
2229{ cfg_parser->pattern->verifier_timeout = yyvspc_vsp[0].llng; }
2230break;
2231case 181:
2232#line 1048 "/usr/src/usr.sbin/nsd/configparser.y"
2233{ cfg_parser->opt->verify_enable = yyvspc_vsp[0].bln; }
2234break;
2235case 182:
2236#line 1050 "/usr/src/usr.sbin/nsd/configparser.y"
2237{
2238 struct ip_address_option *ip = cfg_parser->opt->verify_ip_addresses;
2239 if(!ip) {
2240 cfg_parser->opt->verify_ip_addresses = yyvspc_vsp[0].ip;
2241 } else {
2242 while(ip->next) { ip = ip->next; }
2243 ip->next = yyvspc_vsp[0].ip;
2244 }
2245 }
2246break;
2247case 183:
2248#line 1060 "/usr/src/usr.sbin/nsd/configparser.y"
2249{
2250 /* port number, stored as a string */
2251 char buf[16];
2252 (void)snprintf(buf, sizeof(buf), "%lld", yyvspc_vsp[0].llng);
2253 cfg_parser->opt->verify_port = region_strdup(cfg_parser->opt->region, buf);
2254 }
2255break;
2256case 184:
2257#line 1067 "/usr/src/usr.sbin/nsd/configparser.y"
2258{ cfg_parser->opt->verify_zones = yyvspc_vsp[0].bln; }
2259break;
2260case 185:
2261#line 1069 "/usr/src/usr.sbin/nsd/configparser.y"
2262{ cfg_parser->opt->verifier = yyvspc_vsp[0].strv; }
2263break;
2264case 186:
2265#line 1071 "/usr/src/usr.sbin/nsd/configparser.y"
2266{ cfg_parser->opt->verifier_count = (int)yyvspc_vsp[0].llng; }
2267break;
2268case 187:
2269#line 1073 "/usr/src/usr.sbin/nsd/configparser.y"
2270{ cfg_parser->opt->verifier_timeout = (int)yyvspc_vsp[0].llng; }
2271break;
2272case 188:
2273#line 1075 "/usr/src/usr.sbin/nsd/configparser.y"
2274{ cfg_parser->opt->verifier_feed_zone = yyvspc_vsp[0].bln; }
2275break;
2276case 189:
2277#line 1079 "/usr/src/usr.sbin/nsd/configparser.y"
2278{
2279 char **argv;
2280 size_t argc = 1;
2281 for(struct component *i = yyvspc_vsp[0].comp; i; i = i->next) {
2282 argc++;
2283 }
2284 argv = region_alloc_zero(
2285 cfg_parser->opt->region, (argc + 1) * sizeof(char *));
2286 argc = 0;
2287 argv[argc++] = yyvspc_vsp[-1].str;
2288 for(struct component *j, *i = yyvspc_vsp[0].comp; i; i = j) {
2289 j = i->next;
2290 argv[argc++] = i->str;
2291 region_recycle(cfg_parser->opt->region, i, sizeof(*i));
2292 }
2293 yyvalc_val.strv = argv;
2294 }
2295break;
2296case 190:
2297#line 1098 "/usr/src/usr.sbin/nsd/configparser.y"
2298{ yyvalc_val.comp = NULL((void *)0); }
2299break;
2300case 191:
2301#line 1100 "/usr/src/usr.sbin/nsd/configparser.y"
2302{
2303 struct component *comp = region_alloc_zero(
2304 cfg_parser->opt->region, sizeof(*comp));
2305 comp->str = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
2306 if(yyvspc_vsp[-1].comp) {
2307 struct component *tail = yyvspc_vsp[-1].comp;
2308 while(tail->next) {
2309 tail = tail->next;
2310 }
2311 tail->next = comp;
2312 yyvalc_val.comp = yyvspc_vsp[-1].comp;
2313 } else {
2314 yyvalc_val.comp = comp;
2315 }
2316 }
2317break;
2318case 192:
2319#line 1118 "/usr/src/usr.sbin/nsd/configparser.y"
2320{
2321 struct ip_address_option *ip = region_alloc_zero(
2322 cfg_parser->opt->region, sizeof(*ip));
2323 ip->address = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
2324 ip->fib = -1;
2325 yyvalc_val.ip = ip;
2326 }
2327break;
2328case 193:
2329#line 1128 "/usr/src/usr.sbin/nsd/configparser.y"
2330{
2331 if(!parse_number(yyvspc_vsp[0].str, &yyvalc_val.llng)) {
2332 yyerrorc_error("expected a number");
2333 YYABORTgoto yyabort; /* trigger a parser error */
2334 }
2335 }
2336break;
2337case 194:
2338#line 1137 "/usr/src/usr.sbin/nsd/configparser.y"
2339{
2340 if(!parse_boolean(yyvspc_vsp[0].str, &yyvalc_val.bln)) {
2341 yyerrorc_error("expected yes or no");
2342 YYABORTgoto yyabort; /* trigger a parser error */
2343 }
2344 }
2345break;
2346case 196:
2347#line 1146 "/usr/src/usr.sbin/nsd/configparser.y"
2348{ char *tls_auth_name = region_strdup(cfg_parser->opt->region, yyvspc_vsp[0].str);
2349 add_to_last_acl(&cfg_parser->pattern->request_xfr, tls_auth_name);}
2350break;
2351#line 2344 "configparser.c"
2352 }
2353 yysspc_ssp -= yym;
2354 yystate = *yysspc_ssp;
2355 yyvspc_vsp -= yym;
2356 yym = yylhsc_lhs[yyn];
2357 if (yystate == 0 && yym == 0)
2358 {
2359#if YYDEBUG0
2360 if (yydebugc_debug)
2361 printf("%sdebug: after reduction, shifting from state 0 to\
2362 state %d\n", YYPREFIX"c_", YYFINAL1);
2363#endif
2364 yystate = YYFINAL1;
2365 *++yysspc_ssp = YYFINAL1;
2366 *++yyvspc_vsp = yyvalc_val;
2367 if (yycharc_char < 0)
2368 {
2369 if ((yycharc_char = yylexc_lex()) < 0) yycharc_char = 0;
2370#if YYDEBUG0
2371 if (yydebugc_debug)
2372 {
2373 yys = 0;
2374 if (yycharc_char <= YYMAXTOKEN397) yys = yynamec_name[yycharc_char];
2375 if (!yys) yys = "illegal-symbol";
2376 printf("%sdebug: state %d, reading %d (%s)\n",
2377 YYPREFIX"c_", YYFINAL1, yycharc_char, yys);
2378 }
2379#endif
2380 }
2381 if (yycharc_char == 0) goto yyaccept;
2382 goto yyloop;
2383 }
2384 if ((yyn = yygindexc_gindex[yym]) && (yyn += yystate) >= 0 &&
2385 yyn <= YYTABLESIZE1033 && yycheckc_check[yyn] == yystate)
2386 yystate = yytablec_table[yyn];
2387 else
2388 yystate = yydgotoc_dgoto[yym];
2389#if YYDEBUG0
2390 if (yydebugc_debug)
2391 printf("%sdebug: after reduction, shifting from state %d \
2392to state %d\n", YYPREFIX"c_", *yysspc_ssp, yystate);
2393#endif
2394 if (yysspc_ssp >= yysslimc_sslim && yygrowstack())
2395 {
2396 goto yyoverflow;
2397 }
2398 *++yysspc_ssp = yystate;
2399 *++yyvspc_vsp = yyvalc_val;
2400 goto yyloop;
2401yyoverflow:
2402 yyerrorc_error("yacc stack overflow");
2403yyabort:
2404 if (yyssc_ss)
2405 free(yyssc_ss);
2406 if (yyvsc_vs)
2407 free(yyvsc_vs);
2408 yyssc_ss = yysspc_ssp = NULL((void *)0);
2409 yyvsc_vs = yyvspc_vsp = NULL((void *)0);
2410 yystacksizec_stacksize = 0;
2411 return (1);
2412yyaccept:
2413 if (yyssc_ss)
2414 free(yyssc_ss);
2415 if (yyvsc_vs)
2416 free(yyvsc_vs);
2417 yyssc_ss = yysspc_ssp = NULL((void *)0);
2418 yyvsc_vs = yyvspc_vsp = NULL((void *)0);
2419 yystacksizec_stacksize = 0;
2420 return (0);
2421}