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 YYBYACC 1 |
4 | #define YYMAJOR 1 |
5 | #define YYMINOR 9 |
6 | #define YYLEX yylex() |
7 | #define YYEMPTY -1 |
8 | #define yyclearin (yychar=(YYEMPTY)) |
9 | #define yyerrok (yyerrflag=0) |
10 | #define YYRECOVERING() (yyerrflag!=0) |
11 | #define yyparse c_parse |
12 | #define yylex c_lex |
13 | #define yyerror c_error |
14 | #define yychar c_char |
15 | #define yyval c_val |
16 | #define yylval c_lval |
17 | #define yydebug c_debug |
18 | #define yynerrs c_nerrs |
19 | #define yyerrflag c_errflag |
20 | #define yyss c_ss |
21 | #define yysslim c_sslim |
22 | #define yyssp c_ssp |
23 | #define yyvs c_vs |
24 | #define yyvsp c_vsp |
25 | #define yystacksize c_stacksize |
26 | #define yylhs c_lhs |
27 | #define yylen c_len |
28 | #define yydefred c_defred |
29 | #define yydgoto c_dgoto |
30 | #define yysindex c_sindex |
31 | #define yyrindex c_rindex |
32 | #define yygindex c_gindex |
33 | #define yytable c_table |
34 | #define yycheck c_check |
35 | #define yyname c_name |
36 | #define yyrule c_rule |
37 | #define YYPREFIX "c_" |
38 | #line 11 "/usr/src/usr.sbin/nsd/configparser.y" |
39 | #include "config.h" |
40 | |
41 | #include <assert.h> |
42 | #include <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 | |
52 | int yylex(void); |
53 | |
54 | #ifdef __cplusplus |
55 | extern "C" |
56 | #endif |
57 | |
58 | |
59 | extern config_parser_state_type *cfg_parser; |
60 | |
61 | static void append_acl(struct acl_options **list, struct acl_options *acl); |
62 | static void add_to_last_acl(struct acl_options **list, char *ac); |
63 | static int parse_boolean(const char *str, int *bln); |
64 | static int parse_expire_expr(const char *str, long long *num, uint8_t *expr); |
65 | static int parse_number(const char *str, long long *num); |
66 | static int parse_range(const char *str, long long *low, long long *high); |
67 | |
68 | struct 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 |
76 | typedef 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 STRING 257 |
89 | #define VAR_SERVER 258 |
90 | #define VAR_SERVER_COUNT 259 |
91 | #define VAR_IP_ADDRESS 260 |
92 | #define VAR_IP_TRANSPARENT 261 |
93 | #define VAR_IP_FREEBIND 262 |
94 | #define VAR_REUSEPORT 263 |
95 | #define VAR_SEND_BUFFER_SIZE 264 |
96 | #define VAR_RECEIVE_BUFFER_SIZE 265 |
97 | #define VAR_DEBUG_MODE 266 |
98 | #define VAR_IP4_ONLY 267 |
99 | #define VAR_IP6_ONLY 268 |
100 | #define VAR_DO_IP4 269 |
101 | #define VAR_DO_IP6 270 |
102 | #define VAR_PORT 271 |
103 | #define VAR_USE_SYSTEMD 272 |
104 | #define VAR_VERBOSITY 273 |
105 | #define VAR_USERNAME 274 |
106 | #define VAR_CHROOT 275 |
107 | #define VAR_ZONESDIR 276 |
108 | #define VAR_ZONELISTFILE 277 |
109 | #define VAR_DATABASE 278 |
110 | #define VAR_LOGFILE 279 |
111 | #define VAR_LOG_ONLY_SYSLOG 280 |
112 | #define VAR_PIDFILE 281 |
113 | #define VAR_DIFFFILE 282 |
114 | #define VAR_XFRDFILE 283 |
115 | #define VAR_XFRDIR 284 |
116 | #define VAR_HIDE_VERSION 285 |
117 | #define VAR_HIDE_IDENTITY 286 |
118 | #define VAR_VERSION 287 |
119 | #define VAR_IDENTITY 288 |
120 | #define VAR_NSID 289 |
121 | #define VAR_TCP_COUNT 290 |
122 | #define VAR_TCP_REJECT_OVERFLOW 291 |
123 | #define VAR_TCP_QUERY_COUNT 292 |
124 | #define VAR_TCP_TIMEOUT 293 |
125 | #define VAR_TCP_MSS 294 |
126 | #define VAR_OUTGOING_TCP_MSS 295 |
127 | #define VAR_IPV4_EDNS_SIZE 296 |
128 | #define VAR_IPV6_EDNS_SIZE 297 |
129 | #define VAR_STATISTICS 298 |
130 | #define VAR_XFRD_RELOAD_TIMEOUT 299 |
131 | #define VAR_LOG_TIME_ASCII 300 |
132 | #define VAR_ROUND_ROBIN 301 |
133 | #define VAR_MINIMAL_RESPONSES 302 |
134 | #define VAR_CONFINE_TO_ZONE 303 |
135 | #define VAR_REFUSE_ANY 304 |
136 | #define VAR_ZONEFILES_CHECK 305 |
137 | #define VAR_ZONEFILES_WRITE 306 |
138 | #define VAR_RRL_SIZE 307 |
139 | #define VAR_RRL_RATELIMIT 308 |
140 | #define VAR_RRL_SLIP 309 |
141 | #define VAR_RRL_IPV4_PREFIX_LENGTH 310 |
142 | #define VAR_RRL_IPV6_PREFIX_LENGTH 311 |
143 | #define VAR_RRL_WHITELIST_RATELIMIT 312 |
144 | #define VAR_TLS_SERVICE_KEY 313 |
145 | #define VAR_TLS_SERVICE_PEM 314 |
146 | #define VAR_TLS_SERVICE_OCSP 315 |
147 | #define VAR_TLS_PORT 316 |
148 | #define VAR_TLS_CERT_BUNDLE 317 |
149 | #define VAR_PROXY_PROTOCOL_PORT 318 |
150 | #define VAR_CPU_AFFINITY 319 |
151 | #define VAR_XFRD_CPU_AFFINITY 320 |
152 | #define VAR_SERVER_CPU_AFFINITY 321 |
153 | #define VAR_DROP_UPDATES 322 |
154 | #define VAR_XFRD_TCP_MAX 323 |
155 | #define VAR_XFRD_TCP_PIPELINE 324 |
156 | #define VAR_DNSTAP 325 |
157 | #define VAR_DNSTAP_ENABLE 326 |
158 | #define VAR_DNSTAP_SOCKET_PATH 327 |
159 | #define VAR_DNSTAP_IP 328 |
160 | #define VAR_DNSTAP_TLS 329 |
161 | #define VAR_DNSTAP_TLS_SERVER_NAME 330 |
162 | #define VAR_DNSTAP_TLS_CERT_BUNDLE 331 |
163 | #define VAR_DNSTAP_TLS_CLIENT_KEY_FILE 332 |
164 | #define VAR_DNSTAP_TLS_CLIENT_CERT_FILE 333 |
165 | #define VAR_DNSTAP_SEND_IDENTITY 334 |
166 | #define VAR_DNSTAP_SEND_VERSION 335 |
167 | #define VAR_DNSTAP_IDENTITY 336 |
168 | #define VAR_DNSTAP_VERSION 337 |
169 | #define VAR_DNSTAP_LOG_AUTH_QUERY_MESSAGES 338 |
170 | #define VAR_DNSTAP_LOG_AUTH_RESPONSE_MESSAGES 339 |
171 | #define VAR_REMOTE_CONTROL 340 |
172 | #define VAR_CONTROL_ENABLE 341 |
173 | #define VAR_CONTROL_INTERFACE 342 |
174 | #define VAR_CONTROL_PORT 343 |
175 | #define VAR_SERVER_KEY_FILE 344 |
176 | #define VAR_SERVER_CERT_FILE 345 |
177 | #define VAR_CONTROL_KEY_FILE 346 |
178 | #define VAR_CONTROL_CERT_FILE 347 |
179 | #define VAR_KEY 348 |
180 | #define VAR_ALGORITHM 349 |
181 | #define VAR_SECRET 350 |
182 | #define VAR_TLS_AUTH 351 |
183 | #define VAR_TLS_AUTH_DOMAIN_NAME 352 |
184 | #define VAR_TLS_AUTH_CLIENT_CERT 353 |
185 | #define VAR_TLS_AUTH_CLIENT_KEY 354 |
186 | #define VAR_TLS_AUTH_CLIENT_KEY_PW 355 |
187 | #define VAR_PATTERN 356 |
188 | #define VAR_NAME 357 |
189 | #define VAR_ZONEFILE 358 |
190 | #define VAR_NOTIFY 359 |
191 | #define VAR_PROVIDE_XFR 360 |
192 | #define VAR_ALLOW_QUERY 361 |
193 | #define VAR_AXFR 362 |
194 | #define VAR_UDP 363 |
195 | #define VAR_NOTIFY_RETRY 364 |
196 | #define VAR_ALLOW_NOTIFY 365 |
197 | #define VAR_REQUEST_XFR 366 |
198 | #define VAR_ALLOW_AXFR_FALLBACK 367 |
199 | #define VAR_OUTGOING_INTERFACE 368 |
200 | #define VAR_ANSWER_COOKIE 369 |
201 | #define VAR_COOKIE_SECRET 370 |
202 | #define VAR_COOKIE_SECRET_FILE 371 |
203 | #define VAR_MAX_REFRESH_TIME 372 |
204 | #define VAR_MIN_REFRESH_TIME 373 |
205 | #define VAR_MAX_RETRY_TIME 374 |
206 | #define VAR_MIN_RETRY_TIME 375 |
207 | #define VAR_MIN_EXPIRE_TIME 376 |
208 | #define VAR_MULTI_MASTER_CHECK 377 |
209 | #define VAR_SIZE_LIMIT_XFR 378 |
210 | #define VAR_ZONESTATS 379 |
211 | #define VAR_INCLUDE_PATTERN 380 |
212 | #define VAR_STORE_IXFR 381 |
213 | #define VAR_IXFR_SIZE 382 |
214 | #define VAR_IXFR_NUMBER 383 |
215 | #define VAR_CREATE_IXFR 384 |
216 | #define VAR_ZONE 385 |
217 | #define VAR_RRL_WHITELIST 386 |
218 | #define VAR_SERVERS 387 |
219 | #define VAR_BINDTODEVICE 388 |
220 | #define VAR_SETFIB 389 |
221 | #define VAR_VERIFY 390 |
222 | #define VAR_ENABLE 391 |
223 | #define VAR_VERIFY_ZONE 392 |
224 | #define VAR_VERIFY_ZONES 393 |
225 | #define VAR_VERIFIER 394 |
226 | #define VAR_VERIFIER_COUNT 395 |
227 | #define VAR_VERIFIER_FEED_ZONE 396 |
228 | #define VAR_VERIFIER_TIMEOUT 397 |
229 | #define YYERRCODE 256 |
230 | const 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 | }; |
253 | const 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 | }; |
276 | const 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 | }; |
314 | const 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 | }; |
322 | const 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,}; |
359 | const 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,}; |
396 | const 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 YYTABLESIZE 1033 |
405 | const 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 | }; |
512 | const 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 YYFINAL 1 |
620 | #ifndef YYDEBUG |
621 | #define YYDEBUG 0 |
622 | #endif |
623 | #define YYMAXTOKEN 397 |
624 | #if YYDEBUG |
625 | const 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, |
628 | 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,0, |
629 | 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,0, |
630 | 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,0, |
631 | 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,0, |
632 | 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,0, |
633 | 0,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 | }; |
676 | const 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 YYSTACKSIZE |
877 | #undef YYMAXDEPTH |
878 | #define YYMAXDEPTH YYSTACKSIZE |
879 | #else |
880 | #ifdef YYMAXDEPTH |
881 | #define YYSTACKSIZE YYMAXDEPTH |
882 | #else |
883 | #define YYSTACKSIZE 10000 |
884 | #define YYMAXDEPTH 10000 |
885 | #endif |
886 | #endif |
887 | #define YYINITSTACKSIZE 200 |
888 | |
889 | int yydebug; |
890 | int yynerrs; |
891 | int yyerrflag; |
892 | int yychar; |
893 | short *yyssp; |
894 | YYSTYPE *yyvsp; |
895 | YYSTYPE yyval; |
896 | YYSTYPE yylval; |
897 | short *yyss; |
898 | short *yysslim; |
899 | YYSTYPE *yyvs; |
900 | unsigned int yystacksize; |
901 | int yyparse(void); |
902 | #line 1150 "/usr/src/usr.sbin/nsd/configparser.y" |
903 | |
904 | static void |
905 | append_acl(struct acl_options **list, struct acl_options *acl) |
906 | { |
907 | assert(list != NULL); |
908 | |
909 | if(*list == NULL) { |
910 | *list = acl; |
911 | } else { |
912 | struct acl_options *tail = *list; |
913 | while(tail->next != NULL) |
914 | tail = tail->next; |
915 | tail->next = acl; |
916 | } |
917 | } |
918 | |
919 | static void |
920 | add_to_last_acl(struct acl_options **list, char *tls_auth_name) |
921 | { |
922 | struct acl_options *tail = *list; |
923 | assert(list != NULL); |
924 | assert(*list != NULL); |
925 | while(tail->next != NULL) |
926 | tail = tail->next; |
927 | tail->tls_auth_name = tls_auth_name; |
928 | } |
929 | |
930 | static int |
931 | parse_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 | |
944 | static int |
945 | parse_expire_expr(const char *str, long long *num, uint8_t *expr) |
946 | { |
947 | if(parse_number(str, num)) { |
948 | *expr = EXPIRE_TIME_HAS_VALUE; |
949 | return 1; |
950 | } |
951 | if(strcmp(str, REFRESHPLUSRETRYPLUS1_STR) == 0) { |
952 | *num = 0; |
953 | *expr = REFRESHPLUSRETRYPLUS1; |
954 | return 1; |
955 | } |
956 | return 0; |
957 | } |
958 | |
959 | static int |
960 | parse_number(const char *str, long long *num) |
961 | { |
962 | |
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, 10); |
970 | return 1; |
971 | } |
972 | |
973 | return 0; |
974 | } |
975 | |
976 | static int |
977 | parse_range(const char *str, long long *low, long long *high) |
978 | { |
979 | const char *ptr = str; |
980 | long long num[2]; |
981 | |
982 | |
983 | if(*ptr < '0' || *ptr > '9') { |
984 | return 0; |
985 | } |
986 | |
987 | num[0] = strtoll(ptr, (char **)&ptr, 10); |
988 | |
989 | |
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 | |
1000 | if(*ptr < '0' || *ptr > '9') { |
1001 | return 0; |
1002 | } |
1003 | |
1004 | num[1] = strtoll(ptr, (char **)&ptr, 10); |
1005 | |
1006 | |
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 | |
1022 | static int yygrowstack(void) |
1023 | { |
1024 | unsigned int newsize; |
1025 | long sslen; |
1026 | short *newss; |
1027 | YYSTYPE *newvs; |
1028 | |
1029 | if ((newsize = yystacksize) == 0) |
| 28 | | Assuming the condition is false | |
|
| |
1030 | newsize = YYINITSTACKSIZE; |
1031 | else if (newsize >= YYMAXDEPTH) |
| 30 | | Assuming 'newsize' is < YYMAXDEPTH | |
|
| |
1032 | return -1; |
1033 | else if ((newsize *= 2) > YYMAXDEPTH) |
| 32 | | Assuming the condition is false | |
|
| |
1034 | newsize = YYMAXDEPTH; |
1035 | sslen = yyssp - yyss; |
1036 | #ifdef SIZE_MAX |
1037 | #define YY_SIZE_MAX SIZE_MAX |
1038 | #else |
1039 | #define YY_SIZE_MAX 0xffffffffU |
1040 | #endif |
1041 | if (newsize && YY_SIZE_MAX / newsize < sizeof *newss) |
| 34 | | Assuming 'newsize' is 0 | |
|
1042 | goto bail; |
1043 | newss = (short *)realloc(yyss, newsize * sizeof *newss); |
1044 | if (newss == NULL) |
| 35 | | Assuming 'newss' is not equal to NULL | |
|
| |
1045 | goto bail; |
1046 | yyss = newss; |
1047 | yyssp = newss + sslen; |
1048 | if (newsize && YY_SIZE_MAX / newsize < sizeof *newvs) |
1049 | goto bail; |
1050 | newvs = (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs); |
1051 | if (newvs == NULL) |
| 37 | | Assuming 'newvs' is not equal to NULL | |
|
| |
1052 | goto bail; |
1053 | yyvs = newvs; |
1054 | yyvsp = newvs + sslen; |
1055 | yystacksize = newsize; |
1056 | yysslim = yyss + newsize - 1; |
1057 | return 0; |
1058 | bail: |
1059 | if (yyss) |
1060 | free(yyss); |
1061 | if (yyvs) |
1062 | free(yyvs); |
1063 | yyss = yyssp = NULL; |
1064 | yyvs = yyvsp = NULL; |
1065 | yystacksize = 0; |
1066 | return -1; |
1067 | } |
1068 | |
1069 | #define YYABORT goto yyabort |
1070 | #define YYREJECT goto yyabort |
1071 | #define YYACCEPT goto yyaccept |
1072 | #define YYERROR goto yyerrlab |
1073 | int |
1074 | yyparse(void) |
1075 | { |
1076 | int yym, yyn, yystate; |
1077 | #if YYDEBUG |
1078 | const char *yys; |
1079 | |
1080 | if ((yys = getenv("YYDEBUG"))) |
1081 | { |
1082 | yyn = *yys; |
1083 | if (yyn >= '0' && yyn <= '9') |
1084 | yydebug = yyn - '0'; |
1085 | } |
1086 | #endif /* YYDEBUG */ |
1087 | |
1088 | yynerrs = 0; |
1089 | yyerrflag = 0; |
1090 | yychar = (-1); |
1091 | |
1092 | if (yyss == NULL && yygrowstack()) goto yyoverflow; |
| 1 | Assuming 'c_ss' is not equal to NULL | |
|
1093 | yyssp = yyss; |
1094 | yyvsp = yyvs; |
1095 | *yyssp = yystate = 0; |
1096 | |
1097 | yyloop: |
1098 | if ((yyn = yydefred[yystate]) != 0) goto yyreduce; |
| |
| 3 | | Control jumps to line 1205 | |
|
| |
1099 | if (yychar < 0) |
1100 | { |
1101 | if ((yychar = yylex()) < 0) yychar = 0; |
1102 | #if YYDEBUG |
1103 | if (yydebug) |
1104 | { |
1105 | yys = 0; |
1106 | if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; |
1107 | if (!yys) yys = "illegal-symbol"; |
1108 | printf("%sdebug: state %d, reading %d (%s)\n", |
1109 | YYPREFIX, yystate, yychar, yys); |
1110 | } |
1111 | #endif |
1112 | } |
1113 | if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && |
| 14 | | Assuming 'yyn' is not equal to 0 | |
|
| 15 | | Assuming the condition is false | |
|
1114 | yyn <= YYTABLESIZE && yycheck[yyn] == yychar) |
1115 | { |
1116 | #if YYDEBUG |
1117 | if (yydebug) |
1118 | printf("%sdebug: state %d, shifting to state %d\n", |
1119 | YYPREFIX, yystate, yytable[yyn]); |
1120 | #endif |
1121 | if (yyssp >= yysslim && yygrowstack()) |
1122 | { |
1123 | goto yyoverflow; |
1124 | } |
1125 | *++yyssp = yystate = yytable[yyn]; |
1126 | *++yyvsp = yylval; |
1127 | yychar = (-1); |
1128 | if (yyerrflag > 0) --yyerrflag; |
1129 | goto yyloop; |
1130 | } |
1131 | if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && |
| |
1132 | yyn <= YYTABLESIZE && yycheck[yyn] == yychar) |
1133 | { |
1134 | yyn = yytable[yyn]; |
1135 | goto yyreduce; |
1136 | } |
1137 | if (yyerrflag) goto yyinrecovery; |
| 17 | | Assuming 'c_errflag' is not equal to 0 | |
|
| |
| 19 | | Control jumps to line 1149 | |
|
1138 | #if defined(__GNUC__) |
1139 | goto yynewerror; |
1140 | #endif |
1141 | yynewerror: |
1142 | yyerror("syntax error"); |
1143 | #if defined(__GNUC__) |
1144 | goto yyerrlab; |
1145 | #endif |
1146 | yyerrlab: |
1147 | ++yynerrs; |
1148 | yyinrecovery: |
1149 | if (yyerrflag < 3) |
| 20 | | Assuming 'c_errflag' is < 3 | |
|
| |
1150 | { |
1151 | yyerrflag = 3; |
1152 | for (;;) |
1153 | { |
1154 | if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && |
| 22 | | Assuming 'yyn' is not equal to 0 | |
|
| 23 | | Assuming the condition is true | |
|
1155 | yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) |
| 24 | | Assuming 'yyn' is <= YYTABLESIZE | |
|
| 25 | | Assuming the condition is true | |
|
1156 | { |
1157 | #if YYDEBUG |
1158 | if (yydebug) |
1159 | printf("%sdebug: state %d, error recovery shifting\ |
1160 | to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); |
1161 | #endif |
1162 | if (yyssp >= yysslim && yygrowstack()) |
| 26 | | Assuming 'c_ssp' is >= 'c_sslim' | |
|
| |
| 39 | | Returning from 'yygrowstack' | |
|
| |
1163 | { |
1164 | goto yyoverflow; |
1165 | } |
1166 | *++yyssp = yystate = yytable[yyn]; |
| 41 | | Use of memory allocated with size zero |
|
1167 | *++yyvsp = yylval; |
1168 | goto yyloop; |
1169 | } |
1170 | else |
1171 | { |
1172 | #if YYDEBUG |
1173 | if (yydebug) |
1174 | printf("%sdebug: error recovery discarding state %d\n", |
1175 | YYPREFIX, *yyssp); |
1176 | #endif |
1177 | if (yyssp <= yyss) goto yyabort; |
1178 | --yyssp; |
1179 | --yyvsp; |
1180 | } |
1181 | } |
1182 | } |
1183 | else |
1184 | { |
1185 | if (yychar == 0) goto yyabort; |
1186 | #if YYDEBUG |
1187 | if (yydebug) |
1188 | { |
1189 | yys = 0; |
1190 | if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; |
1191 | if (!yys) yys = "illegal-symbol"; |
1192 | printf("%sdebug: state %d, error recovery discards token %d (%s)\n", |
1193 | YYPREFIX, yystate, yychar, yys); |
1194 | } |
1195 | #endif |
1196 | yychar = (-1); |
1197 | goto yyloop; |
1198 | } |
1199 | yyreduce: |
1200 | #if YYDEBUG |
1201 | if (yydebug) |
1202 | printf("%sdebug: state %d, reducing by rule %d (%s)\n", |
1203 | YYPREFIX, yystate, yyn, yyrule[yyn]); |
1204 | #endif |
1205 | yym = yylen[yyn]; |
1206 | if (yym) |
| |
1207 | yyval = yyvsp[1-yym]; |
1208 | else |
1209 | memset(&yyval, 0, sizeof yyval); |
1210 | switch (yyn) |
| 5 | | 'Default' branch taken. Execution continues on line 2353 | |
|
1211 | { |
1212 | case 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) { |
1218 | cfg_parser->opt->ip_addresses = yyvsp[0].ip; |
1219 | } else { |
1220 | while(ip->next) { ip = ip->next; } |
1221 | ip->next = yyvsp[0].ip; |
1222 | } |
1223 | |
1224 | cfg_parser->ip = yyvsp[0].ip; |
1225 | } |
1226 | break; |
1227 | case 15: |
1228 | #line 262 "/usr/src/usr.sbin/nsd/configparser.y" |
1229 | { |
1230 | cfg_parser->ip = NULL; |
1231 | } |
1232 | break; |
1233 | case 16: |
1234 | #line 266 "/usr/src/usr.sbin/nsd/configparser.y" |
1235 | { |
1236 | if (yyvsp[0].llng > 0) { |
1237 | cfg_parser->opt->server_count = (int)yyvsp[0].llng; |
1238 | } else { |
1239 | yyerror("expected a number greater than zero"); |
1240 | } |
1241 | } |
1242 | break; |
1243 | case 17: |
1244 | #line 274 "/usr/src/usr.sbin/nsd/configparser.y" |
1245 | { cfg_parser->opt->ip_transparent = yyvsp[0].bln; } |
1246 | break; |
1247 | case 18: |
1248 | #line 276 "/usr/src/usr.sbin/nsd/configparser.y" |
1249 | { cfg_parser->opt->ip_freebind = yyvsp[0].bln; } |
1250 | break; |
1251 | case 19: |
1252 | #line 278 "/usr/src/usr.sbin/nsd/configparser.y" |
1253 | { cfg_parser->opt->send_buffer_size = (int)yyvsp[0].llng; } |
1254 | break; |
1255 | case 20: |
1256 | #line 280 "/usr/src/usr.sbin/nsd/configparser.y" |
1257 | { cfg_parser->opt->receive_buffer_size = (int)yyvsp[0].llng; } |
1258 | break; |
1259 | case 21: |
1260 | #line 282 "/usr/src/usr.sbin/nsd/configparser.y" |
1261 | { cfg_parser->opt->debug_mode = yyvsp[0].bln; } |
1262 | break; |
1263 | case 22: |
1264 | #line 284 "/usr/src/usr.sbin/nsd/configparser.y" |
1265 | { } |
1266 | break; |
1267 | case 23: |
1268 | #line 286 "/usr/src/usr.sbin/nsd/configparser.y" |
1269 | { cfg_parser->opt->hide_version = yyvsp[0].bln; } |
1270 | break; |
1271 | case 24: |
1272 | #line 288 "/usr/src/usr.sbin/nsd/configparser.y" |
1273 | { cfg_parser->opt->hide_identity = yyvsp[0].bln; } |
1274 | break; |
1275 | case 25: |
1276 | #line 290 "/usr/src/usr.sbin/nsd/configparser.y" |
1277 | { cfg_parser->opt->drop_updates = yyvsp[0].bln; } |
1278 | break; |
1279 | case 26: |
1280 | #line 292 "/usr/src/usr.sbin/nsd/configparser.y" |
1281 | { if(yyvsp[0].bln) { cfg_parser->opt->do_ip4 = 1; cfg_parser->opt->do_ip6 = 0; } } |
1282 | break; |
1283 | case 27: |
1284 | #line 294 "/usr/src/usr.sbin/nsd/configparser.y" |
1285 | { if(yyvsp[0].bln) { cfg_parser->opt->do_ip4 = 0; cfg_parser->opt->do_ip6 = 1; } } |
1286 | break; |
1287 | case 28: |
1288 | #line 296 "/usr/src/usr.sbin/nsd/configparser.y" |
1289 | { cfg_parser->opt->do_ip4 = yyvsp[0].bln; } |
1290 | break; |
1291 | case 29: |
1292 | #line 298 "/usr/src/usr.sbin/nsd/configparser.y" |
1293 | { cfg_parser->opt->do_ip6 = yyvsp[0].bln; } |
1294 | break; |
1295 | case 30: |
1296 | #line 300 "/usr/src/usr.sbin/nsd/configparser.y" |
1297 | { } |
1298 | break; |
1299 | case 31: |
1300 | #line 302 "/usr/src/usr.sbin/nsd/configparser.y" |
1301 | { cfg_parser->opt->identity = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1302 | break; |
1303 | case 32: |
1304 | #line 304 "/usr/src/usr.sbin/nsd/configparser.y" |
1305 | { cfg_parser->opt->version = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1306 | break; |
1307 | case 33: |
1308 | #line 306 "/usr/src/usr.sbin/nsd/configparser.y" |
1309 | { |
1310 | unsigned char* nsid = 0; |
1311 | size_t nsid_len = strlen(yyvsp[0].str); |
1312 | |
1313 | if (strncasecmp(yyvsp[0].str, "ascii_", 6) == 0) { |
1314 | nsid_len -= 6; |
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*)yyvsp[0].str+6, nsid_len, (char*)cfg_parser->opt->nsid, nsid_len*2+1); |
1318 | } else { |
1319 | yyerror("NSID too long"); |
1320 | } |
1321 | } else if (nsid_len % 2 != 0) { |
1322 | yyerror("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(yyvsp[0].str, nsid, nsid_len) == -1) { |
1328 | yyerror("hex string cannot be parsed in NSID."); |
1329 | } else { |
1330 | cfg_parser->opt->nsid = region_strdup(cfg_parser->opt->region, yyvsp[0].str); |
1331 | } |
1332 | free(nsid); |
1333 | } else { |
1334 | yyerror("NSID too long"); |
1335 | } |
1336 | } |
1337 | } |
1338 | break; |
1339 | case 34: |
1340 | #line 336 "/usr/src/usr.sbin/nsd/configparser.y" |
1341 | { cfg_parser->opt->logfile = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1342 | break; |
1343 | case 35: |
1344 | #line 338 "/usr/src/usr.sbin/nsd/configparser.y" |
1345 | { cfg_parser->opt->log_only_syslog = yyvsp[0].bln; } |
1346 | break; |
1347 | case 36: |
1348 | #line 340 "/usr/src/usr.sbin/nsd/configparser.y" |
1349 | { |
1350 | if (yyvsp[0].llng > 0) { |
1351 | cfg_parser->opt->tcp_count = (int)yyvsp[0].llng; |
1352 | } else { |
1353 | yyerror("expected a number greater than zero"); |
1354 | } |
1355 | } |
1356 | break; |
1357 | case 37: |
1358 | #line 348 "/usr/src/usr.sbin/nsd/configparser.y" |
1359 | { cfg_parser->opt->tcp_reject_overflow = yyvsp[0].bln; } |
1360 | break; |
1361 | case 38: |
1362 | #line 350 "/usr/src/usr.sbin/nsd/configparser.y" |
1363 | { cfg_parser->opt->tcp_query_count = (int)yyvsp[0].llng; } |
1364 | break; |
1365 | case 39: |
1366 | #line 352 "/usr/src/usr.sbin/nsd/configparser.y" |
1367 | { cfg_parser->opt->tcp_timeout = (int)yyvsp[0].llng; } |
1368 | break; |
1369 | case 40: |
1370 | #line 354 "/usr/src/usr.sbin/nsd/configparser.y" |
1371 | { cfg_parser->opt->tcp_mss = (int)yyvsp[0].llng; } |
1372 | break; |
1373 | case 41: |
1374 | #line 356 "/usr/src/usr.sbin/nsd/configparser.y" |
1375 | { cfg_parser->opt->outgoing_tcp_mss = (int)yyvsp[0].llng; } |
1376 | break; |
1377 | case 42: |
1378 | #line 358 "/usr/src/usr.sbin/nsd/configparser.y" |
1379 | { cfg_parser->opt->ipv4_edns_size = (size_t)yyvsp[0].llng; } |
1380 | break; |
1381 | case 43: |
1382 | #line 360 "/usr/src/usr.sbin/nsd/configparser.y" |
1383 | { cfg_parser->opt->ipv6_edns_size = (size_t)yyvsp[0].llng; } |
1384 | break; |
1385 | case 44: |
1386 | #line 362 "/usr/src/usr.sbin/nsd/configparser.y" |
1387 | { cfg_parser->opt->pidfile = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1388 | break; |
1389 | case 45: |
1390 | #line 364 "/usr/src/usr.sbin/nsd/configparser.y" |
1391 | { |
1392 | |
1393 | char buf[16]; |
1394 | (void)snprintf(buf, sizeof(buf), "%lld", yyvsp[0].llng); |
1395 | cfg_parser->opt->port = region_strdup(cfg_parser->opt->region, buf); |
1396 | } |
1397 | break; |
1398 | case 46: |
1399 | #line 371 "/usr/src/usr.sbin/nsd/configparser.y" |
1400 | { cfg_parser->opt->reuseport = yyvsp[0].bln; } |
1401 | break; |
1402 | case 47: |
1403 | #line 373 "/usr/src/usr.sbin/nsd/configparser.y" |
1404 | { cfg_parser->opt->statistics = (int)yyvsp[0].llng; } |
1405 | break; |
1406 | case 48: |
1407 | #line 375 "/usr/src/usr.sbin/nsd/configparser.y" |
1408 | { cfg_parser->opt->chroot = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1409 | break; |
1410 | case 49: |
1411 | #line 377 "/usr/src/usr.sbin/nsd/configparser.y" |
1412 | { cfg_parser->opt->username = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1413 | break; |
1414 | case 50: |
1415 | #line 379 "/usr/src/usr.sbin/nsd/configparser.y" |
1416 | { cfg_parser->opt->zonesdir = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1417 | break; |
1418 | case 51: |
1419 | #line 381 "/usr/src/usr.sbin/nsd/configparser.y" |
1420 | { cfg_parser->opt->zonelistfile = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1421 | break; |
1422 | case 52: |
1423 | #line 383 "/usr/src/usr.sbin/nsd/configparser.y" |
1424 | { } |
1425 | break; |
1426 | case 53: |
1427 | #line 385 "/usr/src/usr.sbin/nsd/configparser.y" |
1428 | { cfg_parser->opt->xfrdfile = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1429 | break; |
1430 | case 54: |
1431 | #line 387 "/usr/src/usr.sbin/nsd/configparser.y" |
1432 | { cfg_parser->opt->xfrdir = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1433 | break; |
1434 | case 55: |
1435 | #line 389 "/usr/src/usr.sbin/nsd/configparser.y" |
1436 | { cfg_parser->opt->xfrd_reload_timeout = (int)yyvsp[0].llng; } |
1437 | break; |
1438 | case 56: |
1439 | #line 391 "/usr/src/usr.sbin/nsd/configparser.y" |
1440 | { cfg_parser->opt->verbosity = (int)yyvsp[0].llng; } |
1441 | break; |
1442 | case 57: |
1443 | #line 393 "/usr/src/usr.sbin/nsd/configparser.y" |
1444 | { |
1445 | #ifdef RATELIMIT |
1446 | if (yyvsp[0].llng > 0) { |
1447 | cfg_parser->opt->rrl_size = (size_t)yyvsp[0].llng; |
1448 | } else { |
1449 | yyerror("expected a number greater than zero"); |
1450 | } |
1451 | #endif |
1452 | } |
1453 | break; |
1454 | case 58: |
1455 | #line 403 "/usr/src/usr.sbin/nsd/configparser.y" |
1456 | { |
1457 | #ifdef RATELIMIT |
1458 | cfg_parser->opt->rrl_ratelimit = (size_t)yyvsp[0].llng; |
1459 | #endif |
1460 | } |
1461 | break; |
1462 | case 59: |
1463 | #line 409 "/usr/src/usr.sbin/nsd/configparser.y" |
1464 | { |
1465 | #ifdef RATELIMIT |
1466 | cfg_parser->opt->rrl_slip = (size_t)yyvsp[0].llng; |
1467 | #endif |
1468 | } |
1469 | break; |
1470 | case 60: |
1471 | #line 415 "/usr/src/usr.sbin/nsd/configparser.y" |
1472 | { |
1473 | #ifdef RATELIMIT |
1474 | if (yyvsp[0].llng > 32) { |
1475 | yyerror("invalid IPv4 prefix length"); |
1476 | } else { |
1477 | cfg_parser->opt->rrl_ipv4_prefix_length = (size_t)yyvsp[0].llng; |
1478 | } |
1479 | #endif |
1480 | } |
1481 | break; |
1482 | case 61: |
1483 | #line 425 "/usr/src/usr.sbin/nsd/configparser.y" |
1484 | { |
1485 | #ifdef RATELIMIT |
1486 | if (yyvsp[0].llng > 64) { |
1487 | yyerror("invalid IPv6 prefix length"); |
1488 | } else { |
1489 | cfg_parser->opt->rrl_ipv6_prefix_length = (size_t)yyvsp[0].llng; |
1490 | } |
1491 | #endif |
1492 | } |
1493 | break; |
1494 | case 62: |
1495 | #line 435 "/usr/src/usr.sbin/nsd/configparser.y" |
1496 | { |
1497 | #ifdef RATELIMIT |
1498 | cfg_parser->opt->rrl_whitelist_ratelimit = (size_t)yyvsp[0].llng; |
1499 | #endif |
1500 | } |
1501 | break; |
1502 | case 63: |
1503 | #line 441 "/usr/src/usr.sbin/nsd/configparser.y" |
1504 | { cfg_parser->opt->zonefiles_check = yyvsp[0].bln; } |
1505 | break; |
1506 | case 64: |
1507 | #line 443 "/usr/src/usr.sbin/nsd/configparser.y" |
1508 | { cfg_parser->opt->zonefiles_write = (int)yyvsp[0].llng; } |
1509 | break; |
1510 | case 65: |
1511 | #line 445 "/usr/src/usr.sbin/nsd/configparser.y" |
1512 | { |
1513 | cfg_parser->opt->log_time_ascii = yyvsp[0].bln; |
1514 | log_time_asc = cfg_parser->opt->log_time_ascii; |
1515 | } |
1516 | break; |
1517 | case 66: |
1518 | #line 450 "/usr/src/usr.sbin/nsd/configparser.y" |
1519 | { |
1520 | cfg_parser->opt->round_robin = yyvsp[0].bln; |
1521 | round_robin = cfg_parser->opt->round_robin; |
1522 | } |
1523 | break; |
1524 | case 67: |
1525 | #line 455 "/usr/src/usr.sbin/nsd/configparser.y" |
1526 | { |
1527 | cfg_parser->opt->minimal_responses = yyvsp[0].bln; |
1528 | minimal_responses = cfg_parser->opt->minimal_responses; |
1529 | } |
1530 | break; |
1531 | case 68: |
1532 | #line 460 "/usr/src/usr.sbin/nsd/configparser.y" |
1533 | { cfg_parser->opt->confine_to_zone = yyvsp[0].bln; } |
1534 | break; |
1535 | case 69: |
1536 | #line 462 "/usr/src/usr.sbin/nsd/configparser.y" |
1537 | { cfg_parser->opt->refuse_any = yyvsp[0].bln; } |
1538 | break; |
1539 | case 70: |
1540 | #line 464 "/usr/src/usr.sbin/nsd/configparser.y" |
1541 | { cfg_parser->opt->tls_service_key = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1542 | break; |
1543 | case 71: |
1544 | #line 466 "/usr/src/usr.sbin/nsd/configparser.y" |
1545 | { cfg_parser->opt->tls_service_ocsp = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1546 | break; |
1547 | case 72: |
1548 | #line 468 "/usr/src/usr.sbin/nsd/configparser.y" |
1549 | { cfg_parser->opt->tls_service_pem = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1550 | break; |
1551 | case 73: |
1552 | #line 470 "/usr/src/usr.sbin/nsd/configparser.y" |
1553 | { |
1554 | |
1555 | char buf[16]; |
1556 | (void)snprintf(buf, sizeof(buf), "%lld", yyvsp[0].llng); |
1557 | cfg_parser->opt->tls_port = region_strdup(cfg_parser->opt->region, buf); |
1558 | } |
1559 | break; |
1560 | case 74: |
1561 | #line 477 "/usr/src/usr.sbin/nsd/configparser.y" |
1562 | { cfg_parser->opt->tls_cert_bundle = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1563 | break; |
1564 | case 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 = yyvsp[0].llng; |
1570 | elem->next = cfg_parser->opt->proxy_protocol_port; |
1571 | cfg_parser->opt->proxy_protocol_port = elem; |
1572 | } |
1573 | break; |
1574 | case 76: |
1575 | #line 487 "/usr/src/usr.sbin/nsd/configparser.y" |
1576 | { cfg_parser->opt->answer_cookie = yyvsp[0].bln; } |
1577 | break; |
1578 | case 77: |
1579 | #line 489 "/usr/src/usr.sbin/nsd/configparser.y" |
1580 | { cfg_parser->opt->cookie_secret = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1581 | break; |
1582 | case 78: |
1583 | #line 491 "/usr/src/usr.sbin/nsd/configparser.y" |
1584 | { cfg_parser->opt->cookie_secret_file = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1585 | break; |
1586 | case 79: |
1587 | #line 493 "/usr/src/usr.sbin/nsd/configparser.y" |
1588 | { cfg_parser->opt->xfrd_tcp_max = (int)yyvsp[0].llng; } |
1589 | break; |
1590 | case 80: |
1591 | #line 495 "/usr/src/usr.sbin/nsd/configparser.y" |
1592 | { cfg_parser->opt->xfrd_tcp_pipeline = (int)yyvsp[0].llng; } |
1593 | break; |
1594 | case 81: |
1595 | #line 497 "/usr/src/usr.sbin/nsd/configparser.y" |
1596 | { |
1597 | cfg_parser->opt->cpu_affinity = yyvsp[0].cpu; |
1598 | } |
1599 | break; |
1600 | case 82: |
1601 | #line 501 "/usr/src/usr.sbin/nsd/configparser.y" |
1602 | { |
1603 | if(yyvsp[0].llng < 0) { |
1604 | yyerror("expected a non-negative number"); |
1605 | YYABORT; |
1606 | } else { |
1607 | struct cpu_map_option *opt, *tail; |
1608 | |
1609 | opt = cfg_parser->opt->service_cpu_affinity; |
1610 | while(opt && opt->service != yyvsp[-1].llng) { opt = opt->next; } |
1611 | |
1612 | if(opt) { |
1613 | opt->cpu = yyvsp[0].llng; |
1614 | } else { |
1615 | opt = region_alloc_zero(cfg_parser->opt->region, sizeof(*opt)); |
1616 | opt->service = (int)yyvsp[-1].llng; |
1617 | opt->cpu = (int)yyvsp[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 | } |
1629 | break; |
1630 | case 85: |
1631 | #line 535 "/usr/src/usr.sbin/nsd/configparser.y" |
1632 | { |
1633 | char *tok, *ptr, *str; |
1634 | struct range_option *servers = NULL; |
1635 | long long first, last; |
1636 | |
1637 | |
1638 | for(str = yyvsp[0].str; (tok = strtok_r(str, " \t", &ptr)); str = NULL) { |
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 | yyerror("invalid server range '%s'", tok); |
1644 | YYABORT; |
1645 | } |
1646 | assert(first >= 0); |
1647 | assert(last >= 0); |
1648 | opt->next = NULL; |
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 | } |
1658 | break; |
1659 | case 86: |
1660 | #line 562 "/usr/src/usr.sbin/nsd/configparser.y" |
1661 | { cfg_parser->ip->dev = yyvsp[0].bln; } |
1662 | break; |
1663 | case 87: |
1664 | #line 564 "/usr/src/usr.sbin/nsd/configparser.y" |
1665 | { cfg_parser->ip->fib = yyvsp[0].llng; } |
1666 | break; |
1667 | case 88: |
1668 | #line 568 "/usr/src/usr.sbin/nsd/configparser.y" |
1669 | { yyval.cpu = NULL; } |
1670 | break; |
1671 | case 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 = yyvsp[0].str; |
1679 | yyval.cpu = tail = yyvsp[-1].cpu; |
1680 | if(tail) { |
1681 | while(tail->next) { tail = tail->next; } |
1682 | } |
1683 | |
1684 | |
1685 | for(str = yyvsp[0].str; (tok = strtok_r(str, " \t", &ptr)); str = NULL) { |
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 | yyerror("expected a positive number"); |
1691 | YYABORT; |
1692 | } |
1693 | assert(cpu >=0); |
1694 | opt->cpu = (int)cpu; |
1695 | if(tail) { |
1696 | tail->next = opt; |
1697 | tail = opt; |
1698 | } else { |
1699 | yyval.cpu = tail = opt; |
1700 | } |
1701 | } |
1702 | } |
1703 | break; |
1704 | case 90: |
1705 | #line 604 "/usr/src/usr.sbin/nsd/configparser.y" |
1706 | { yyval.llng = -1; } |
1707 | break; |
1708 | case 91: |
1709 | #line 606 "/usr/src/usr.sbin/nsd/configparser.y" |
1710 | { |
1711 | if(yyvsp[0].llng <= 0) { |
1712 | yyerror("invalid server identifier"); |
1713 | YYABORT; |
1714 | } |
1715 | yyval.llng = yyvsp[0].llng; |
1716 | } |
1717 | break; |
1718 | case 95: |
1719 | #line 623 "/usr/src/usr.sbin/nsd/configparser.y" |
1720 | { cfg_parser->opt->dnstap_enable = yyvsp[0].bln; } |
1721 | break; |
1722 | case 96: |
1723 | #line 625 "/usr/src/usr.sbin/nsd/configparser.y" |
1724 | { cfg_parser->opt->dnstap_socket_path = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1725 | break; |
1726 | case 97: |
1727 | #line 627 "/usr/src/usr.sbin/nsd/configparser.y" |
1728 | { cfg_parser->opt->dnstap_ip = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1729 | break; |
1730 | case 98: |
1731 | #line 629 "/usr/src/usr.sbin/nsd/configparser.y" |
1732 | { cfg_parser->opt->dnstap_tls = yyvsp[0].bln; } |
1733 | break; |
1734 | case 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, yyvsp[0].str); } |
1737 | break; |
1738 | case 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, yyvsp[0].str); } |
1741 | break; |
1742 | case 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, yyvsp[0].str); } |
1745 | break; |
1746 | case 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, yyvsp[0].str); } |
1749 | break; |
1750 | case 103: |
1751 | #line 639 "/usr/src/usr.sbin/nsd/configparser.y" |
1752 | { cfg_parser->opt->dnstap_send_identity = yyvsp[0].bln; } |
1753 | break; |
1754 | case 104: |
1755 | #line 641 "/usr/src/usr.sbin/nsd/configparser.y" |
1756 | { cfg_parser->opt->dnstap_send_version = yyvsp[0].bln; } |
1757 | break; |
1758 | case 105: |
1759 | #line 643 "/usr/src/usr.sbin/nsd/configparser.y" |
1760 | { cfg_parser->opt->dnstap_identity = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1761 | break; |
1762 | case 106: |
1763 | #line 645 "/usr/src/usr.sbin/nsd/configparser.y" |
1764 | { cfg_parser->opt->dnstap_version = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1765 | break; |
1766 | case 107: |
1767 | #line 647 "/usr/src/usr.sbin/nsd/configparser.y" |
1768 | { cfg_parser->opt->dnstap_log_auth_query_messages = yyvsp[0].bln; } |
1769 | break; |
1770 | case 108: |
1771 | #line 649 "/usr/src/usr.sbin/nsd/configparser.y" |
1772 | { cfg_parser->opt->dnstap_log_auth_response_messages = yyvsp[0].bln; } |
1773 | break; |
1774 | case 112: |
1775 | #line 660 "/usr/src/usr.sbin/nsd/configparser.y" |
1776 | { cfg_parser->opt->control_enable = yyvsp[0].bln; } |
1777 | break; |
1778 | case 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) { |
1783 | cfg_parser->opt->control_interface = yyvsp[0].ip; |
1784 | } else { |
1785 | while(ip->next != NULL) { ip = ip->next; } |
1786 | ip->next = yyvsp[0].ip; |
1787 | } |
1788 | } |
1789 | break; |
1790 | case 114: |
1791 | #line 672 "/usr/src/usr.sbin/nsd/configparser.y" |
1792 | { |
1793 | if(yyvsp[0].llng == 0) { |
1794 | yyerror("control port number expected"); |
1795 | } else { |
1796 | cfg_parser->opt->control_port = (int)yyvsp[0].llng; |
1797 | } |
1798 | } |
1799 | break; |
1800 | case 115: |
1801 | #line 680 "/usr/src/usr.sbin/nsd/configparser.y" |
1802 | { cfg_parser->opt->server_key_file = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1803 | break; |
1804 | case 116: |
1805 | #line 682 "/usr/src/usr.sbin/nsd/configparser.y" |
1806 | { cfg_parser->opt->server_cert_file = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1807 | break; |
1808 | case 117: |
1809 | #line 684 "/usr/src/usr.sbin/nsd/configparser.y" |
1810 | { cfg_parser->opt->control_key_file = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1811 | break; |
1812 | case 118: |
1813 | #line 686 "/usr/src/usr.sbin/nsd/configparser.y" |
1814 | { cfg_parser->opt->control_cert_file = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
1815 | break; |
1816 | case 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); |
1821 | cfg_parser->tls_auth = tls_auth; |
1822 | } |
1823 | break; |
1824 | case 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) { |
1829 | yyerror("tls-auth has no name"); |
1830 | } else if(tls_auth->auth_domain_name == NULL) { |
1831 | yyerror("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 | yyerror("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; |
1837 | } |
1838 | } |
1839 | break; |
1840 | case 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, yyvsp[0].str); |
1845 | cfg_parser->tls_auth->name = region_strdup(cfg_parser->opt->region, yyvsp[0].str); |
1846 | if(dname == NULL) { |
1847 | yyerror("bad tls-auth name %s", yyvsp[0].str); |
1848 | } else { |
1849 | region_recycle(cfg_parser->opt->region, dname, dname_total_size(dname)); |
1850 | } |
1851 | } |
1852 | break; |
1853 | case 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, yyvsp[0].str); |
1857 | } |
1858 | break; |
1859 | case 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, yyvsp[0].str); |
1863 | } |
1864 | break; |
1865 | case 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, yyvsp[0].str); |
1869 | } |
1870 | break; |
1871 | case 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, yyvsp[0].str); |
1875 | } |
1876 | break; |
1877 | case 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); |
1883 | cfg_parser->key = key; |
1884 | } |
1885 | break; |
1886 | case 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) { |
1891 | yyerror("tsig key has no name"); |
1892 | } else if(key->algorithm == NULL) { |
1893 | yyerror("tsig key %s has no algorithm", key->name); |
1894 | } else if(key->secret == NULL) { |
1895 | yyerror("tsig key %s has no secret blob", key->name); |
1896 | } else if(key_options_find(cfg_parser->opt, key->name)) { |
1897 | yyerror("duplicate tsig key %s", key->name); |
1898 | } else { |
1899 | key_options_insert(cfg_parser->opt, key); |
1900 | cfg_parser->key = NULL; |
1901 | } |
1902 | } |
1903 | break; |
1904 | case 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, yyvsp[0].str); |
1910 | cfg_parser->key->name = region_strdup(cfg_parser->opt->region, yyvsp[0].str); |
1911 | if(dname == NULL) { |
1912 | yyerror("bad tsig key name %s", yyvsp[0].str); |
1913 | } else { |
1914 | region_recycle(cfg_parser->opt->region, dname, dname_total_size(dname)); |
1915 | } |
1916 | } |
1917 | break; |
1918 | case 133: |
1919 | #line 786 "/usr/src/usr.sbin/nsd/configparser.y" |
1920 | { |
1921 | if(tsig_get_algorithm_by_name(yyvsp[0].str) == NULL) { |
1922 | yyerror("bad tsig key algorithm %s", yyvsp[0].str); |
1923 | } else { |
1924 | cfg_parser->key->algorithm = region_strdup(cfg_parser->opt->region, yyvsp[0].str); |
1925 | } |
1926 | } |
1927 | break; |
1928 | case 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, yyvsp[0].str); |
1935 | size = __b64_pton(yyvsp[0].str, data, sizeof(data)); |
1936 | if(size == -1) { |
1937 | yyerror("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); |
1942 | } |
1943 | } |
1944 | break; |
1945 | case 135: |
1946 | #line 812 "/usr/src/usr.sbin/nsd/configparser.y" |
1947 | { |
1948 | assert(cfg_parser->pattern == NULL); |
1949 | assert(cfg_parser->zone == NULL); |
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 | } |
1956 | break; |
1957 | case 136: |
1958 | #line 822 "/usr/src/usr.sbin/nsd/configparser.y" |
1959 | { |
1960 | assert(cfg_parser->zone != NULL); |
1961 | if(cfg_parser->zone->name == NULL) { |
1962 | yyerror("zone has no name"); |
1963 | } else if(!nsd_options_insert_zone(cfg_parser->opt, cfg_parser->zone)) { |
1964 | yyerror("duplicate zone %s", cfg_parser->zone->name); |
1965 | } else if(!nsd_options_insert_pattern(cfg_parser->opt, cfg_parser->zone->pattern)) { |
1966 | yyerror("duplicate pattern %s", cfg_parser->zone->pattern->pname); |
1967 | } |
1968 | cfg_parser->pattern = NULL; |
1969 | cfg_parser->zone = NULL; |
1970 | } |
1971 | break; |
1972 | case 139: |
1973 | #line 840 "/usr/src/usr.sbin/nsd/configparser.y" |
1974 | { |
1975 | const char *marker = PATTERN_IMPLICIT_MARKER; |
1976 | char *pname = region_alloc(cfg_parser->opt->region, strlen(yyvsp[0].str) + strlen(marker) + 1); |
1977 | memmove(pname, marker, strlen(marker)); |
1978 | memmove(pname + strlen(marker), yyvsp[0].str, strlen(yyvsp[0].str) + 1); |
1979 | cfg_parser->zone->pattern->pname = pname; |
1980 | cfg_parser->zone->name = region_strdup(cfg_parser->opt->region, yyvsp[0].str); |
1981 | if(pattern_options_find(cfg_parser->opt, pname)) { |
1982 | yyerror("zone %s cannot be created because implicit pattern %s " |
1983 | "already exists", yyvsp[0].str, pname); |
1984 | } |
1985 | } |
1986 | break; |
1987 | case 141: |
1988 | #line 856 "/usr/src/usr.sbin/nsd/configparser.y" |
1989 | { |
1990 | assert(cfg_parser->pattern == NULL); |
1991 | cfg_parser->pattern = pattern_options_create(cfg_parser->opt->region); |
1992 | } |
1993 | break; |
1994 | case 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) { |
1999 | yyerror("pattern has no name"); |
2000 | } else if(!nsd_options_insert_pattern(cfg_parser->opt, pattern)) { |
2001 | yyerror("duplicate pattern %s", pattern->pname); |
2002 | } |
2003 | cfg_parser->pattern = NULL; |
2004 | } |
2005 | break; |
2006 | case 145: |
2007 | #line 876 "/usr/src/usr.sbin/nsd/configparser.y" |
2008 | { |
2009 | if(strchr(yyvsp[0].str, ' ')) { |
2010 | yyerror("space is not allowed in pattern name: '%s'", yyvsp[0].str); |
2011 | } |
2012 | cfg_parser->pattern->pname = region_strdup(cfg_parser->opt->region, yyvsp[0].str); |
2013 | } |
2014 | break; |
2015 | case 147: |
2016 | #line 886 "/usr/src/usr.sbin/nsd/configparser.y" |
2017 | { |
2018 | #ifdef RATELIMIT |
2019 | cfg_parser->pattern->rrl_whitelist |= rrlstr2type(yyvsp[0].str); |
2020 | #endif |
2021 | } |
2022 | break; |
2023 | case 148: |
2024 | #line 892 "/usr/src/usr.sbin/nsd/configparser.y" |
2025 | { cfg_parser->pattern->zonefile = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
2026 | break; |
2027 | case 149: |
2028 | #line 894 "/usr/src/usr.sbin/nsd/configparser.y" |
2029 | { cfg_parser->pattern->zonestats = region_strdup(cfg_parser->opt->region, yyvsp[0].str); } |
2030 | break; |
2031 | case 150: |
2032 | #line 896 "/usr/src/usr.sbin/nsd/configparser.y" |
2033 | { |
2034 | if(yyvsp[0].llng > 0) { |
2035 | cfg_parser->pattern->size_limit_xfr = (int)yyvsp[0].llng; |
2036 | } else { |
2037 | yyerror("expected a number greater than zero"); |
2038 | } |
2039 | } |
2040 | break; |
2041 | case 151: |
2042 | #line 904 "/usr/src/usr.sbin/nsd/configparser.y" |
2043 | { cfg_parser->pattern->multi_master_check = (int)yyvsp[0].bln; } |
2044 | break; |
2045 | case 152: |
2046 | #line 906 "/usr/src/usr.sbin/nsd/configparser.y" |
2047 | { config_apply_pattern(cfg_parser->pattern, yyvsp[0].str); } |
2048 | break; |
2049 | case 153: |
2050 | #line 908 "/usr/src/usr.sbin/nsd/configparser.y" |
2051 | { |
2052 | acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvsp[-1].str, yyvsp[0].str); |
2053 | if(acl->blocked) |
2054 | yyerror("blocked address used for request-xfr"); |
2055 | if(acl->rangetype != acl_range_single) |
2056 | yyerror("address range used for request-xfr"); |
2057 | append_acl(&cfg_parser->pattern->request_xfr, acl); |
2058 | } |
2059 | break; |
2060 | case 154: |
2061 | #line 917 "/usr/src/usr.sbin/nsd/configparser.y" |
2062 | { } |
2063 | break; |
2064 | case 155: |
2065 | #line 919 "/usr/src/usr.sbin/nsd/configparser.y" |
2066 | { |
2067 | acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvsp[-1].str, yyvsp[0].str); |
2068 | acl->use_axfr_only = 1; |
2069 | if(acl->blocked) |
2070 | yyerror("blocked address used for request-xfr"); |
2071 | if(acl->rangetype != acl_range_single) |
2072 | yyerror("address range used for request-xfr"); |
2073 | append_acl(&cfg_parser->pattern->request_xfr, acl); |
2074 | } |
2075 | break; |
2076 | case 156: |
2077 | #line 929 "/usr/src/usr.sbin/nsd/configparser.y" |
2078 | { } |
2079 | break; |
2080 | case 157: |
2081 | #line 931 "/usr/src/usr.sbin/nsd/configparser.y" |
2082 | { |
2083 | acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvsp[-1].str, yyvsp[0].str); |
2084 | acl->allow_udp = 1; |
2085 | if(acl->blocked) |
2086 | yyerror("blocked address used for request-xfr"); |
2087 | if(acl->rangetype != acl_range_single) |
2088 | yyerror("address range used for request-xfr"); |
2089 | append_acl(&cfg_parser->pattern->request_xfr, acl); |
2090 | } |
2091 | break; |
2092 | case 158: |
2093 | #line 941 "/usr/src/usr.sbin/nsd/configparser.y" |
2094 | { |
2095 | acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvsp[-1].str, yyvsp[0].str); |
2096 | append_acl(&cfg_parser->pattern->allow_notify, acl); |
2097 | } |
2098 | break; |
2099 | case 159: |
2100 | #line 946 "/usr/src/usr.sbin/nsd/configparser.y" |
2101 | { |
2102 | acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvsp[-1].str, yyvsp[0].str); |
2103 | if(acl->blocked) |
2104 | yyerror("blocked address used for notify"); |
2105 | if(acl->rangetype != acl_range_single) |
2106 | yyerror("address range used for notify"); |
2107 | append_acl(&cfg_parser->pattern->notify, acl); |
2108 | } |
2109 | break; |
2110 | case 160: |
2111 | #line 955 "/usr/src/usr.sbin/nsd/configparser.y" |
2112 | { |
2113 | acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvsp[-1].str, yyvsp[0].str); |
2114 | append_acl(&cfg_parser->pattern->provide_xfr, acl); |
2115 | } |
2116 | break; |
2117 | case 161: |
2118 | #line 960 "/usr/src/usr.sbin/nsd/configparser.y" |
2119 | { |
2120 | acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvsp[-1].str, yyvsp[0].str); |
2121 | append_acl(&cfg_parser->pattern->allow_query, acl); |
2122 | } |
2123 | break; |
2124 | case 162: |
2125 | #line 965 "/usr/src/usr.sbin/nsd/configparser.y" |
2126 | { |
2127 | acl_options_type *acl = parse_acl_info(cfg_parser->opt->region, yyvsp[0].str, "NOKEY"); |
2128 | append_acl(&cfg_parser->pattern->outgoing_interface, acl); |
2129 | } |
2130 | break; |
2131 | case 163: |
2132 | #line 970 "/usr/src/usr.sbin/nsd/configparser.y" |
2133 | { |
2134 | cfg_parser->pattern->allow_axfr_fallback = yyvsp[0].bln; |
2135 | cfg_parser->pattern->allow_axfr_fallback_is_default = 0; |
2136 | } |
2137 | break; |
2138 | case 164: |
2139 | #line 975 "/usr/src/usr.sbin/nsd/configparser.y" |
2140 | { |
2141 | cfg_parser->pattern->notify_retry = yyvsp[0].llng; |
2142 | cfg_parser->pattern->notify_retry_is_default = 0; |
2143 | } |
2144 | break; |
2145 | case 165: |
2146 | #line 980 "/usr/src/usr.sbin/nsd/configparser.y" |
2147 | { |
2148 | cfg_parser->pattern->max_refresh_time = yyvsp[0].llng; |
2149 | cfg_parser->pattern->max_refresh_time_is_default = 0; |
2150 | } |
2151 | break; |
2152 | case 166: |
2153 | #line 985 "/usr/src/usr.sbin/nsd/configparser.y" |
2154 | { |
2155 | cfg_parser->pattern->min_refresh_time = yyvsp[0].llng; |
2156 | cfg_parser->pattern->min_refresh_time_is_default = 0; |
2157 | } |
2158 | break; |
2159 | case 167: |
2160 | #line 990 "/usr/src/usr.sbin/nsd/configparser.y" |
2161 | { |
2162 | cfg_parser->pattern->max_retry_time = yyvsp[0].llng; |
2163 | cfg_parser->pattern->max_retry_time_is_default = 0; |
2164 | } |
2165 | break; |
2166 | case 168: |
2167 | #line 995 "/usr/src/usr.sbin/nsd/configparser.y" |
2168 | { |
2169 | cfg_parser->pattern->min_retry_time = yyvsp[0].llng; |
2170 | cfg_parser->pattern->min_retry_time_is_default = 0; |
2171 | } |
2172 | break; |
2173 | case 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(yyvsp[0].str, &num, &expr)) { |
2180 | yyerror("expected an expire time in seconds or \"refresh+retry+1\""); |
2181 | YYABORT; |
2182 | } |
2183 | cfg_parser->pattern->min_expire_time = num; |
2184 | cfg_parser->pattern->min_expire_time_expr = expr; |
2185 | } |
2186 | break; |
2187 | case 170: |
2188 | #line 1012 "/usr/src/usr.sbin/nsd/configparser.y" |
2189 | { |
2190 | cfg_parser->pattern->store_ixfr = yyvsp[0].bln; |
2191 | cfg_parser->pattern->store_ixfr_is_default = 0; |
2192 | } |
2193 | break; |
2194 | case 171: |
2195 | #line 1017 "/usr/src/usr.sbin/nsd/configparser.y" |
2196 | { |
2197 | cfg_parser->pattern->ixfr_size = yyvsp[0].llng; |
2198 | cfg_parser->pattern->ixfr_size_is_default = 0; |
2199 | } |
2200 | break; |
2201 | case 172: |
2202 | #line 1022 "/usr/src/usr.sbin/nsd/configparser.y" |
2203 | { |
2204 | cfg_parser->pattern->ixfr_number = yyvsp[0].llng; |
2205 | cfg_parser->pattern->ixfr_number_is_default = 0; |
2206 | } |
2207 | break; |
2208 | case 173: |
2209 | #line 1027 "/usr/src/usr.sbin/nsd/configparser.y" |
2210 | { |
2211 | cfg_parser->pattern->create_ixfr = yyvsp[0].bln; |
2212 | cfg_parser->pattern->create_ixfr_is_default = 0; |
2213 | } |
2214 | break; |
2215 | case 174: |
2216 | #line 1032 "/usr/src/usr.sbin/nsd/configparser.y" |
2217 | { cfg_parser->pattern->verify_zone = yyvsp[0].bln; } |
2218 | break; |
2219 | case 175: |
2220 | #line 1034 "/usr/src/usr.sbin/nsd/configparser.y" |
2221 | { cfg_parser->pattern->verifier = yyvsp[0].strv; } |
2222 | break; |
2223 | case 176: |
2224 | #line 1036 "/usr/src/usr.sbin/nsd/configparser.y" |
2225 | { cfg_parser->pattern->verifier_feed_zone = yyvsp[0].bln; } |
2226 | break; |
2227 | case 177: |
2228 | #line 1038 "/usr/src/usr.sbin/nsd/configparser.y" |
2229 | { cfg_parser->pattern->verifier_timeout = yyvsp[0].llng; } |
2230 | break; |
2231 | case 181: |
2232 | #line 1048 "/usr/src/usr.sbin/nsd/configparser.y" |
2233 | { cfg_parser->opt->verify_enable = yyvsp[0].bln; } |
2234 | break; |
2235 | case 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 = yyvsp[0].ip; |
2241 | } else { |
2242 | while(ip->next) { ip = ip->next; } |
2243 | ip->next = yyvsp[0].ip; |
2244 | } |
2245 | } |
2246 | break; |
2247 | case 183: |
2248 | #line 1060 "/usr/src/usr.sbin/nsd/configparser.y" |
2249 | { |
2250 | |
2251 | char buf[16]; |
2252 | (void)snprintf(buf, sizeof(buf), "%lld", yyvsp[0].llng); |
2253 | cfg_parser->opt->verify_port = region_strdup(cfg_parser->opt->region, buf); |
2254 | } |
2255 | break; |
2256 | case 184: |
2257 | #line 1067 "/usr/src/usr.sbin/nsd/configparser.y" |
2258 | { cfg_parser->opt->verify_zones = yyvsp[0].bln; } |
2259 | break; |
2260 | case 185: |
2261 | #line 1069 "/usr/src/usr.sbin/nsd/configparser.y" |
2262 | { cfg_parser->opt->verifier = yyvsp[0].strv; } |
2263 | break; |
2264 | case 186: |
2265 | #line 1071 "/usr/src/usr.sbin/nsd/configparser.y" |
2266 | { cfg_parser->opt->verifier_count = (int)yyvsp[0].llng; } |
2267 | break; |
2268 | case 187: |
2269 | #line 1073 "/usr/src/usr.sbin/nsd/configparser.y" |
2270 | { cfg_parser->opt->verifier_timeout = (int)yyvsp[0].llng; } |
2271 | break; |
2272 | case 188: |
2273 | #line 1075 "/usr/src/usr.sbin/nsd/configparser.y" |
2274 | { cfg_parser->opt->verifier_feed_zone = yyvsp[0].bln; } |
2275 | break; |
2276 | case 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 = yyvsp[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++] = yyvsp[-1].str; |
2288 | for(struct component *j, *i = yyvsp[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 | yyval.strv = argv; |
2294 | } |
2295 | break; |
2296 | case 190: |
2297 | #line 1098 "/usr/src/usr.sbin/nsd/configparser.y" |
2298 | { yyval.comp = NULL; } |
2299 | break; |
2300 | case 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, yyvsp[0].str); |
2306 | if(yyvsp[-1].comp) { |
2307 | struct component *tail = yyvsp[-1].comp; |
2308 | while(tail->next) { |
2309 | tail = tail->next; |
2310 | } |
2311 | tail->next = comp; |
2312 | yyval.comp = yyvsp[-1].comp; |
2313 | } else { |
2314 | yyval.comp = comp; |
2315 | } |
2316 | } |
2317 | break; |
2318 | case 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, yyvsp[0].str); |
2324 | ip->fib = -1; |
2325 | yyval.ip = ip; |
2326 | } |
2327 | break; |
2328 | case 193: |
2329 | #line 1128 "/usr/src/usr.sbin/nsd/configparser.y" |
2330 | { |
2331 | if(!parse_number(yyvsp[0].str, &yyval.llng)) { |
2332 | yyerror("expected a number"); |
2333 | YYABORT; |
2334 | } |
2335 | } |
2336 | break; |
2337 | case 194: |
2338 | #line 1137 "/usr/src/usr.sbin/nsd/configparser.y" |
2339 | { |
2340 | if(!parse_boolean(yyvsp[0].str, &yyval.bln)) { |
2341 | yyerror("expected yes or no"); |
2342 | YYABORT; |
2343 | } |
2344 | } |
2345 | break; |
2346 | case 196: |
2347 | #line 1146 "/usr/src/usr.sbin/nsd/configparser.y" |
2348 | { char *tls_auth_name = region_strdup(cfg_parser->opt->region, yyvsp[0].str); |
2349 | add_to_last_acl(&cfg_parser->pattern->request_xfr, tls_auth_name);} |
2350 | break; |
2351 | #line 2344 "configparser.c" |
2352 | } |
2353 | yyssp -= yym; |
2354 | yystate = *yyssp; |
2355 | yyvsp -= yym; |
2356 | yym = yylhs[yyn]; |
2357 | if (yystate == 0 && yym == 0) |
| |
2358 | { |
2359 | #if YYDEBUG |
2360 | if (yydebug) |
2361 | printf("%sdebug: after reduction, shifting from state 0 to\ |
2362 | state %d\n", YYPREFIX, YYFINAL); |
2363 | #endif |
2364 | yystate = YYFINAL; |
2365 | *++yyssp = YYFINAL; |
2366 | *++yyvsp = yyval; |
2367 | if (yychar < 0) |
| |
2368 | { |
2369 | if ((yychar = yylex()) < 0) yychar = 0; |
| 8 | | Assuming the condition is false | |
|
| |
2370 | #if YYDEBUG |
2371 | if (yydebug) |
2372 | { |
2373 | yys = 0; |
2374 | if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; |
2375 | if (!yys) yys = "illegal-symbol"; |
2376 | printf("%sdebug: state %d, reading %d (%s)\n", |
2377 | YYPREFIX, YYFINAL, yychar, yys); |
2378 | } |
2379 | #endif |
2380 | } |
2381 | if (yychar == 0) goto yyaccept; |
| 10 | | Assuming 'c_char' is not equal to 0 | |
|
| |
2382 | goto yyloop; |
| 12 | | Control jumps to line 1098 | |
|
2383 | } |
2384 | if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && |
2385 | yyn <= YYTABLESIZE && yycheck[yyn] == yystate) |
2386 | yystate = yytable[yyn]; |
2387 | else |
2388 | yystate = yydgoto[yym]; |
2389 | #if YYDEBUG |
2390 | if (yydebug) |
2391 | printf("%sdebug: after reduction, shifting from state %d \ |
2392 | to state %d\n", YYPREFIX, *yyssp, yystate); |
2393 | #endif |
2394 | if (yyssp >= yysslim && yygrowstack()) |
2395 | { |
2396 | goto yyoverflow; |
2397 | } |
2398 | *++yyssp = yystate; |
2399 | *++yyvsp = yyval; |
2400 | goto yyloop; |
2401 | yyoverflow: |
2402 | yyerror("yacc stack overflow"); |
2403 | yyabort: |
2404 | if (yyss) |
2405 | free(yyss); |
2406 | if (yyvs) |
2407 | free(yyvs); |
2408 | yyss = yyssp = NULL; |
2409 | yyvs = yyvsp = NULL; |
2410 | yystacksize = 0; |
2411 | return (1); |
2412 | yyaccept: |
2413 | if (yyss) |
2414 | free(yyss); |
2415 | if (yyvs) |
2416 | free(yyvs); |
2417 | yyss = yyssp = NULL; |
2418 | yyvs = yyvsp = NULL; |
2419 | yystacksize = 0; |
2420 | return (0); |
2421 | } |