1 /* A Bison parser, made by GNU Bison 3.0.4. */ 2 3 /* Bison implementation for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. 6 7 This program is free software: you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation, either version 3 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 19 20 /* As a special exception, you may create a larger work that contains 21 part or all of the Bison parser skeleton and distribute that work 22 under terms of your choice, so long as that work isn't itself a 23 parser generator using the skeleton or a modified version thereof 24 as a parser skeleton. Alternatively, if you modify or redistribute 25 the parser skeleton itself, you may (at your option) remove this 26 special exception, which will cause the skeleton and the resulting 27 Bison output files to be licensed under the GNU General Public 28 License without this special exception. 29 30 This special exception was added by the Free Software Foundation in 31 version 2.2 of Bison. */ 32 33 /* C LALR(1) parser skeleton written by Richard Stallman, by 34 simplifying the original so-called "semantic" parser. */ 35 36 /* All symbols defined below should begin with yy or YY, to avoid 37 infringing on user name space. This should be done even for local 38 variables, as they might otherwise be expanded by user macros. 39 There are some unavoidable exceptions within include files to 40 define necessary library symbols; they are noted "INFRINGES ON 41 USER NAME SPACE" below. */ 42 43 /* Identify Bison output. */ 44 #define YYBISON 1 45 46 /* Bison version. */ 47 #define YYBISON_VERSION "3.0.4" 48 49 /* Skeleton name. */ 50 #define YYSKELETON_NAME "yacc.c" 51 52 /* Pure parsers. */ 53 #define YYPURE 0 54 55 /* Push parsers. */ 56 #define YYPUSH 0 57 58 /* Pull parsers. */ 59 #define YYPULL 1 60 61 62 63 64 /* Copy the first part of user declarations. */ 65 #line 38 "util/configparser.y" /* yacc.c:339 */ 66 67 #include "config.h" 68 69 #include <stdarg.h> 70 #include <stdio.h> 71 #include <string.h> 72 #include <stdlib.h> 73 #include <assert.h> 74 75 #include "util/configyyrename.h" 76 #include "util/config_file.h" 77 #include "util/net_help.h" 78 79 int ub_c_lex(void); 80 void ub_c_error(const char *message); 81 82 static void validate_respip_action(const char* action); 83 84 /* these need to be global, otherwise they cannot be used inside yacc */ 85 extern struct config_parser_state* cfg_parser; 86 87 #if 0 88 #define OUTYY(s) printf s /* used ONLY when debugging */ 89 #else 90 #define OUTYY(s) 91 #endif 92 93 94 #line 95 "util/configparser.c" /* yacc.c:339 */ 95 96 # ifndef YY_NULLPTR 97 # if defined __cplusplus && 201103L <= __cplusplus 98 # define YY_NULLPTR nullptr 99 # else 100 # define YY_NULLPTR 0 101 # endif 102 # endif 103 104 /* Enabling verbose error messages. */ 105 #ifdef YYERROR_VERBOSE 106 # undef YYERROR_VERBOSE 107 # define YYERROR_VERBOSE 1 108 #else 109 # define YYERROR_VERBOSE 0 110 #endif 111 112 /* In a future release of Bison, this section will be replaced 113 by #include "configparser.h". */ 114 #ifndef YY_YY_UTIL_CONFIGPARSER_H_INCLUDED 115 # define YY_YY_UTIL_CONFIGPARSER_H_INCLUDED 116 /* Debug traces. */ 117 #ifndef YYDEBUG 118 # define YYDEBUG 0 119 #endif 120 #if YYDEBUG 121 extern int yydebug; 122 #endif 123 124 /* Token type. */ 125 #ifndef YYTOKENTYPE 126 # define YYTOKENTYPE 127 enum yytokentype 128 { 129 SPACE = 258, 130 LETTER = 259, 131 NEWLINE = 260, 132 COMMENT = 261, 133 COLON = 262, 134 ANY = 263, 135 ZONESTR = 264, 136 STRING_ARG = 265, 137 VAR_SERVER = 266, 138 VAR_VERBOSITY = 267, 139 VAR_NUM_THREADS = 268, 140 VAR_PORT = 269, 141 VAR_OUTGOING_RANGE = 270, 142 VAR_INTERFACE = 271, 143 VAR_DO_IP4 = 272, 144 VAR_DO_IP6 = 273, 145 VAR_PREFER_IP6 = 274, 146 VAR_DO_UDP = 275, 147 VAR_DO_TCP = 276, 148 VAR_TCP_MSS = 277, 149 VAR_OUTGOING_TCP_MSS = 278, 150 VAR_CHROOT = 279, 151 VAR_USERNAME = 280, 152 VAR_DIRECTORY = 281, 153 VAR_LOGFILE = 282, 154 VAR_PIDFILE = 283, 155 VAR_MSG_CACHE_SIZE = 284, 156 VAR_MSG_CACHE_SLABS = 285, 157 VAR_NUM_QUERIES_PER_THREAD = 286, 158 VAR_RRSET_CACHE_SIZE = 287, 159 VAR_RRSET_CACHE_SLABS = 288, 160 VAR_OUTGOING_NUM_TCP = 289, 161 VAR_INFRA_HOST_TTL = 290, 162 VAR_INFRA_LAME_TTL = 291, 163 VAR_INFRA_CACHE_SLABS = 292, 164 VAR_INFRA_CACHE_NUMHOSTS = 293, 165 VAR_INFRA_CACHE_LAME_SIZE = 294, 166 VAR_NAME = 295, 167 VAR_STUB_ZONE = 296, 168 VAR_STUB_HOST = 297, 169 VAR_STUB_ADDR = 298, 170 VAR_TARGET_FETCH_POLICY = 299, 171 VAR_HARDEN_SHORT_BUFSIZE = 300, 172 VAR_HARDEN_LARGE_QUERIES = 301, 173 VAR_FORWARD_ZONE = 302, 174 VAR_FORWARD_HOST = 303, 175 VAR_FORWARD_ADDR = 304, 176 VAR_DO_NOT_QUERY_ADDRESS = 305, 177 VAR_HIDE_IDENTITY = 306, 178 VAR_HIDE_VERSION = 307, 179 VAR_IDENTITY = 308, 180 VAR_VERSION = 309, 181 VAR_HARDEN_GLUE = 310, 182 VAR_MODULE_CONF = 311, 183 VAR_TRUST_ANCHOR_FILE = 312, 184 VAR_TRUST_ANCHOR = 313, 185 VAR_VAL_OVERRIDE_DATE = 314, 186 VAR_BOGUS_TTL = 315, 187 VAR_VAL_CLEAN_ADDITIONAL = 316, 188 VAR_VAL_PERMISSIVE_MODE = 317, 189 VAR_INCOMING_NUM_TCP = 318, 190 VAR_MSG_BUFFER_SIZE = 319, 191 VAR_KEY_CACHE_SIZE = 320, 192 VAR_KEY_CACHE_SLABS = 321, 193 VAR_TRUSTED_KEYS_FILE = 322, 194 VAR_VAL_NSEC3_KEYSIZE_ITERATIONS = 323, 195 VAR_USE_SYSLOG = 324, 196 VAR_OUTGOING_INTERFACE = 325, 197 VAR_ROOT_HINTS = 326, 198 VAR_DO_NOT_QUERY_LOCALHOST = 327, 199 VAR_CACHE_MAX_TTL = 328, 200 VAR_HARDEN_DNSSEC_STRIPPED = 329, 201 VAR_ACCESS_CONTROL = 330, 202 VAR_LOCAL_ZONE = 331, 203 VAR_LOCAL_DATA = 332, 204 VAR_INTERFACE_AUTOMATIC = 333, 205 VAR_STATISTICS_INTERVAL = 334, 206 VAR_DO_DAEMONIZE = 335, 207 VAR_USE_CAPS_FOR_ID = 336, 208 VAR_STATISTICS_CUMULATIVE = 337, 209 VAR_OUTGOING_PORT_PERMIT = 338, 210 VAR_OUTGOING_PORT_AVOID = 339, 211 VAR_DLV_ANCHOR_FILE = 340, 212 VAR_DLV_ANCHOR = 341, 213 VAR_NEG_CACHE_SIZE = 342, 214 VAR_HARDEN_REFERRAL_PATH = 343, 215 VAR_PRIVATE_ADDRESS = 344, 216 VAR_PRIVATE_DOMAIN = 345, 217 VAR_REMOTE_CONTROL = 346, 218 VAR_CONTROL_ENABLE = 347, 219 VAR_CONTROL_INTERFACE = 348, 220 VAR_CONTROL_PORT = 349, 221 VAR_SERVER_KEY_FILE = 350, 222 VAR_SERVER_CERT_FILE = 351, 223 VAR_CONTROL_KEY_FILE = 352, 224 VAR_CONTROL_CERT_FILE = 353, 225 VAR_CONTROL_USE_CERT = 354, 226 VAR_EXTENDED_STATISTICS = 355, 227 VAR_LOCAL_DATA_PTR = 356, 228 VAR_JOSTLE_TIMEOUT = 357, 229 VAR_STUB_PRIME = 358, 230 VAR_UNWANTED_REPLY_THRESHOLD = 359, 231 VAR_LOG_TIME_ASCII = 360, 232 VAR_DOMAIN_INSECURE = 361, 233 VAR_PYTHON = 362, 234 VAR_PYTHON_SCRIPT = 363, 235 VAR_VAL_SIG_SKEW_MIN = 364, 236 VAR_VAL_SIG_SKEW_MAX = 365, 237 VAR_CACHE_MIN_TTL = 366, 238 VAR_VAL_LOG_LEVEL = 367, 239 VAR_AUTO_TRUST_ANCHOR_FILE = 368, 240 VAR_KEEP_MISSING = 369, 241 VAR_ADD_HOLDDOWN = 370, 242 VAR_DEL_HOLDDOWN = 371, 243 VAR_SO_RCVBUF = 372, 244 VAR_EDNS_BUFFER_SIZE = 373, 245 VAR_PREFETCH = 374, 246 VAR_PREFETCH_KEY = 375, 247 VAR_SO_SNDBUF = 376, 248 VAR_SO_REUSEPORT = 377, 249 VAR_HARDEN_BELOW_NXDOMAIN = 378, 250 VAR_IGNORE_CD_FLAG = 379, 251 VAR_LOG_QUERIES = 380, 252 VAR_LOG_REPLIES = 381, 253 VAR_TCP_UPSTREAM = 382, 254 VAR_SSL_UPSTREAM = 383, 255 VAR_SSL_SERVICE_KEY = 384, 256 VAR_SSL_SERVICE_PEM = 385, 257 VAR_SSL_PORT = 386, 258 VAR_FORWARD_FIRST = 387, 259 VAR_STUB_SSL_UPSTREAM = 388, 260 VAR_FORWARD_SSL_UPSTREAM = 389, 261 VAR_STUB_FIRST = 390, 262 VAR_MINIMAL_RESPONSES = 391, 263 VAR_RRSET_ROUNDROBIN = 392, 264 VAR_MAX_UDP_SIZE = 393, 265 VAR_DELAY_CLOSE = 394, 266 VAR_UNBLOCK_LAN_ZONES = 395, 267 VAR_INSECURE_LAN_ZONES = 396, 268 VAR_INFRA_CACHE_MIN_RTT = 397, 269 VAR_DNS64_PREFIX = 398, 270 VAR_DNS64_SYNTHALL = 399, 271 VAR_DNSTAP = 400, 272 VAR_DNSTAP_ENABLE = 401, 273 VAR_DNSTAP_SOCKET_PATH = 402, 274 VAR_DNSTAP_SEND_IDENTITY = 403, 275 VAR_DNSTAP_SEND_VERSION = 404, 276 VAR_DNSTAP_IDENTITY = 405, 277 VAR_DNSTAP_VERSION = 406, 278 VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES = 407, 279 VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES = 408, 280 VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES = 409, 281 VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES = 410, 282 VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES = 411, 283 VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES = 412, 284 VAR_RESPONSE_IP_TAG = 413, 285 VAR_RESPONSE_IP = 414, 286 VAR_RESPONSE_IP_DATA = 415, 287 VAR_HARDEN_ALGO_DOWNGRADE = 416, 288 VAR_IP_TRANSPARENT = 417, 289 VAR_DISABLE_DNSSEC_LAME_CHECK = 418, 290 VAR_IP_RATELIMIT = 419, 291 VAR_IP_RATELIMIT_SLABS = 420, 292 VAR_IP_RATELIMIT_SIZE = 421, 293 VAR_RATELIMIT = 422, 294 VAR_RATELIMIT_SLABS = 423, 295 VAR_RATELIMIT_SIZE = 424, 296 VAR_RATELIMIT_FOR_DOMAIN = 425, 297 VAR_RATELIMIT_BELOW_DOMAIN = 426, 298 VAR_IP_RATELIMIT_FACTOR = 427, 299 VAR_RATELIMIT_FACTOR = 428, 300 VAR_SEND_CLIENT_SUBNET = 429, 301 VAR_CLIENT_SUBNET_ZONE = 430, 302 VAR_CLIENT_SUBNET_ALWAYS_FORWARD = 431, 303 VAR_CLIENT_SUBNET_OPCODE = 432, 304 VAR_MAX_CLIENT_SUBNET_IPV4 = 433, 305 VAR_MAX_CLIENT_SUBNET_IPV6 = 434, 306 VAR_CAPS_WHITELIST = 435, 307 VAR_CACHE_MAX_NEGATIVE_TTL = 436, 308 VAR_PERMIT_SMALL_HOLDDOWN = 437, 309 VAR_QNAME_MINIMISATION = 438, 310 VAR_QNAME_MINIMISATION_STRICT = 439, 311 VAR_IP_FREEBIND = 440, 312 VAR_DEFINE_TAG = 441, 313 VAR_LOCAL_ZONE_TAG = 442, 314 VAR_ACCESS_CONTROL_TAG = 443, 315 VAR_LOCAL_ZONE_OVERRIDE = 444, 316 VAR_ACCESS_CONTROL_TAG_ACTION = 445, 317 VAR_ACCESS_CONTROL_TAG_DATA = 446, 318 VAR_VIEW = 447, 319 VAR_ACCESS_CONTROL_VIEW = 448, 320 VAR_VIEW_FIRST = 449, 321 VAR_SERVE_EXPIRED = 450, 322 VAR_FAKE_DSA = 451, 323 VAR_FAKE_SHA1 = 452, 324 VAR_LOG_IDENTITY = 453, 325 VAR_HIDE_TRUSTANCHOR = 454, 326 VAR_TRUST_ANCHOR_SIGNALING = 455, 327 VAR_USE_SYSTEMD = 456, 328 VAR_SHM_ENABLE = 457, 329 VAR_SHM_KEY = 458, 330 VAR_DNSCRYPT = 459, 331 VAR_DNSCRYPT_ENABLE = 460, 332 VAR_DNSCRYPT_PORT = 461, 333 VAR_DNSCRYPT_PROVIDER = 462, 334 VAR_DNSCRYPT_SECRET_KEY = 463, 335 VAR_DNSCRYPT_PROVIDER_CERT = 464, 336 VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE = 465, 337 VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS = 466, 338 VAR_DNSCRYPT_NONCE_CACHE_SIZE = 467, 339 VAR_DNSCRYPT_NONCE_CACHE_SLABS = 468, 340 VAR_IPSECMOD_ENABLED = 469, 341 VAR_IPSECMOD_HOOK = 470, 342 VAR_IPSECMOD_IGNORE_BOGUS = 471, 343 VAR_IPSECMOD_MAX_TTL = 472, 344 VAR_IPSECMOD_WHITELIST = 473, 345 VAR_IPSECMOD_STRICT = 474, 346 VAR_CACHEDB = 475, 347 VAR_CACHEDB_BACKEND = 476, 348 VAR_CACHEDB_SECRETSEED = 477, 349 VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM = 478 350 }; 351 #endif 352 /* Tokens. */ 353 #define SPACE 258 354 #define LETTER 259 355 #define NEWLINE 260 356 #define COMMENT 261 357 #define COLON 262 358 #define ANY 263 359 #define ZONESTR 264 360 #define STRING_ARG 265 361 #define VAR_SERVER 266 362 #define VAR_VERBOSITY 267 363 #define VAR_NUM_THREADS 268 364 #define VAR_PORT 269 365 #define VAR_OUTGOING_RANGE 270 366 #define VAR_INTERFACE 271 367 #define VAR_DO_IP4 272 368 #define VAR_DO_IP6 273 369 #define VAR_PREFER_IP6 274 370 #define VAR_DO_UDP 275 371 #define VAR_DO_TCP 276 372 #define VAR_TCP_MSS 277 373 #define VAR_OUTGOING_TCP_MSS 278 374 #define VAR_CHROOT 279 375 #define VAR_USERNAME 280 376 #define VAR_DIRECTORY 281 377 #define VAR_LOGFILE 282 378 #define VAR_PIDFILE 283 379 #define VAR_MSG_CACHE_SIZE 284 380 #define VAR_MSG_CACHE_SLABS 285 381 #define VAR_NUM_QUERIES_PER_THREAD 286 382 #define VAR_RRSET_CACHE_SIZE 287 383 #define VAR_RRSET_CACHE_SLABS 288 384 #define VAR_OUTGOING_NUM_TCP 289 385 #define VAR_INFRA_HOST_TTL 290 386 #define VAR_INFRA_LAME_TTL 291 387 #define VAR_INFRA_CACHE_SLABS 292 388 #define VAR_INFRA_CACHE_NUMHOSTS 293 389 #define VAR_INFRA_CACHE_LAME_SIZE 294 390 #define VAR_NAME 295 391 #define VAR_STUB_ZONE 296 392 #define VAR_STUB_HOST 297 393 #define VAR_STUB_ADDR 298 394 #define VAR_TARGET_FETCH_POLICY 299 395 #define VAR_HARDEN_SHORT_BUFSIZE 300 396 #define VAR_HARDEN_LARGE_QUERIES 301 397 #define VAR_FORWARD_ZONE 302 398 #define VAR_FORWARD_HOST 303 399 #define VAR_FORWARD_ADDR 304 400 #define VAR_DO_NOT_QUERY_ADDRESS 305 401 #define VAR_HIDE_IDENTITY 306 402 #define VAR_HIDE_VERSION 307 403 #define VAR_IDENTITY 308 404 #define VAR_VERSION 309 405 #define VAR_HARDEN_GLUE 310 406 #define VAR_MODULE_CONF 311 407 #define VAR_TRUST_ANCHOR_FILE 312 408 #define VAR_TRUST_ANCHOR 313 409 #define VAR_VAL_OVERRIDE_DATE 314 410 #define VAR_BOGUS_TTL 315 411 #define VAR_VAL_CLEAN_ADDITIONAL 316 412 #define VAR_VAL_PERMISSIVE_MODE 317 413 #define VAR_INCOMING_NUM_TCP 318 414 #define VAR_MSG_BUFFER_SIZE 319 415 #define VAR_KEY_CACHE_SIZE 320 416 #define VAR_KEY_CACHE_SLABS 321 417 #define VAR_TRUSTED_KEYS_FILE 322 418 #define VAR_VAL_NSEC3_KEYSIZE_ITERATIONS 323 419 #define VAR_USE_SYSLOG 324 420 #define VAR_OUTGOING_INTERFACE 325 421 #define VAR_ROOT_HINTS 326 422 #define VAR_DO_NOT_QUERY_LOCALHOST 327 423 #define VAR_CACHE_MAX_TTL 328 424 #define VAR_HARDEN_DNSSEC_STRIPPED 329 425 #define VAR_ACCESS_CONTROL 330 426 #define VAR_LOCAL_ZONE 331 427 #define VAR_LOCAL_DATA 332 428 #define VAR_INTERFACE_AUTOMATIC 333 429 #define VAR_STATISTICS_INTERVAL 334 430 #define VAR_DO_DAEMONIZE 335 431 #define VAR_USE_CAPS_FOR_ID 336 432 #define VAR_STATISTICS_CUMULATIVE 337 433 #define VAR_OUTGOING_PORT_PERMIT 338 434 #define VAR_OUTGOING_PORT_AVOID 339 435 #define VAR_DLV_ANCHOR_FILE 340 436 #define VAR_DLV_ANCHOR 341 437 #define VAR_NEG_CACHE_SIZE 342 438 #define VAR_HARDEN_REFERRAL_PATH 343 439 #define VAR_PRIVATE_ADDRESS 344 440 #define VAR_PRIVATE_DOMAIN 345 441 #define VAR_REMOTE_CONTROL 346 442 #define VAR_CONTROL_ENABLE 347 443 #define VAR_CONTROL_INTERFACE 348 444 #define VAR_CONTROL_PORT 349 445 #define VAR_SERVER_KEY_FILE 350 446 #define VAR_SERVER_CERT_FILE 351 447 #define VAR_CONTROL_KEY_FILE 352 448 #define VAR_CONTROL_CERT_FILE 353 449 #define VAR_CONTROL_USE_CERT 354 450 #define VAR_EXTENDED_STATISTICS 355 451 #define VAR_LOCAL_DATA_PTR 356 452 #define VAR_JOSTLE_TIMEOUT 357 453 #define VAR_STUB_PRIME 358 454 #define VAR_UNWANTED_REPLY_THRESHOLD 359 455 #define VAR_LOG_TIME_ASCII 360 456 #define VAR_DOMAIN_INSECURE 361 457 #define VAR_PYTHON 362 458 #define VAR_PYTHON_SCRIPT 363 459 #define VAR_VAL_SIG_SKEW_MIN 364 460 #define VAR_VAL_SIG_SKEW_MAX 365 461 #define VAR_CACHE_MIN_TTL 366 462 #define VAR_VAL_LOG_LEVEL 367 463 #define VAR_AUTO_TRUST_ANCHOR_FILE 368 464 #define VAR_KEEP_MISSING 369 465 #define VAR_ADD_HOLDDOWN 370 466 #define VAR_DEL_HOLDDOWN 371 467 #define VAR_SO_RCVBUF 372 468 #define VAR_EDNS_BUFFER_SIZE 373 469 #define VAR_PREFETCH 374 470 #define VAR_PREFETCH_KEY 375 471 #define VAR_SO_SNDBUF 376 472 #define VAR_SO_REUSEPORT 377 473 #define VAR_HARDEN_BELOW_NXDOMAIN 378 474 #define VAR_IGNORE_CD_FLAG 379 475 #define VAR_LOG_QUERIES 380 476 #define VAR_LOG_REPLIES 381 477 #define VAR_TCP_UPSTREAM 382 478 #define VAR_SSL_UPSTREAM 383 479 #define VAR_SSL_SERVICE_KEY 384 480 #define VAR_SSL_SERVICE_PEM 385 481 #define VAR_SSL_PORT 386 482 #define VAR_FORWARD_FIRST 387 483 #define VAR_STUB_SSL_UPSTREAM 388 484 #define VAR_FORWARD_SSL_UPSTREAM 389 485 #define VAR_STUB_FIRST 390 486 #define VAR_MINIMAL_RESPONSES 391 487 #define VAR_RRSET_ROUNDROBIN 392 488 #define VAR_MAX_UDP_SIZE 393 489 #define VAR_DELAY_CLOSE 394 490 #define VAR_UNBLOCK_LAN_ZONES 395 491 #define VAR_INSECURE_LAN_ZONES 396 492 #define VAR_INFRA_CACHE_MIN_RTT 397 493 #define VAR_DNS64_PREFIX 398 494 #define VAR_DNS64_SYNTHALL 399 495 #define VAR_DNSTAP 400 496 #define VAR_DNSTAP_ENABLE 401 497 #define VAR_DNSTAP_SOCKET_PATH 402 498 #define VAR_DNSTAP_SEND_IDENTITY 403 499 #define VAR_DNSTAP_SEND_VERSION 404 500 #define VAR_DNSTAP_IDENTITY 405 501 #define VAR_DNSTAP_VERSION 406 502 #define VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES 407 503 #define VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES 408 504 #define VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES 409 505 #define VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES 410 506 #define VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES 411 507 #define VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES 412 508 #define VAR_RESPONSE_IP_TAG 413 509 #define VAR_RESPONSE_IP 414 510 #define VAR_RESPONSE_IP_DATA 415 511 #define VAR_HARDEN_ALGO_DOWNGRADE 416 512 #define VAR_IP_TRANSPARENT 417 513 #define VAR_DISABLE_DNSSEC_LAME_CHECK 418 514 #define VAR_IP_RATELIMIT 419 515 #define VAR_IP_RATELIMIT_SLABS 420 516 #define VAR_IP_RATELIMIT_SIZE 421 517 #define VAR_RATELIMIT 422 518 #define VAR_RATELIMIT_SLABS 423 519 #define VAR_RATELIMIT_SIZE 424 520 #define VAR_RATELIMIT_FOR_DOMAIN 425 521 #define VAR_RATELIMIT_BELOW_DOMAIN 426 522 #define VAR_IP_RATELIMIT_FACTOR 427 523 #define VAR_RATELIMIT_FACTOR 428 524 #define VAR_SEND_CLIENT_SUBNET 429 525 #define VAR_CLIENT_SUBNET_ZONE 430 526 #define VAR_CLIENT_SUBNET_ALWAYS_FORWARD 431 527 #define VAR_CLIENT_SUBNET_OPCODE 432 528 #define VAR_MAX_CLIENT_SUBNET_IPV4 433 529 #define VAR_MAX_CLIENT_SUBNET_IPV6 434 530 #define VAR_CAPS_WHITELIST 435 531 #define VAR_CACHE_MAX_NEGATIVE_TTL 436 532 #define VAR_PERMIT_SMALL_HOLDDOWN 437 533 #define VAR_QNAME_MINIMISATION 438 534 #define VAR_QNAME_MINIMISATION_STRICT 439 535 #define VAR_IP_FREEBIND 440 536 #define VAR_DEFINE_TAG 441 537 #define VAR_LOCAL_ZONE_TAG 442 538 #define VAR_ACCESS_CONTROL_TAG 443 539 #define VAR_LOCAL_ZONE_OVERRIDE 444 540 #define VAR_ACCESS_CONTROL_TAG_ACTION 445 541 #define VAR_ACCESS_CONTROL_TAG_DATA 446 542 #define VAR_VIEW 447 543 #define VAR_ACCESS_CONTROL_VIEW 448 544 #define VAR_VIEW_FIRST 449 545 #define VAR_SERVE_EXPIRED 450 546 #define VAR_FAKE_DSA 451 547 #define VAR_FAKE_SHA1 452 548 #define VAR_LOG_IDENTITY 453 549 #define VAR_HIDE_TRUSTANCHOR 454 550 #define VAR_TRUST_ANCHOR_SIGNALING 455 551 #define VAR_USE_SYSTEMD 456 552 #define VAR_SHM_ENABLE 457 553 #define VAR_SHM_KEY 458 554 #define VAR_DNSCRYPT 459 555 #define VAR_DNSCRYPT_ENABLE 460 556 #define VAR_DNSCRYPT_PORT 461 557 #define VAR_DNSCRYPT_PROVIDER 462 558 #define VAR_DNSCRYPT_SECRET_KEY 463 559 #define VAR_DNSCRYPT_PROVIDER_CERT 464 560 #define VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE 465 561 #define VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS 466 562 #define VAR_DNSCRYPT_NONCE_CACHE_SIZE 467 563 #define VAR_DNSCRYPT_NONCE_CACHE_SLABS 468 564 #define VAR_IPSECMOD_ENABLED 469 565 #define VAR_IPSECMOD_HOOK 470 566 #define VAR_IPSECMOD_IGNORE_BOGUS 471 567 #define VAR_IPSECMOD_MAX_TTL 472 568 #define VAR_IPSECMOD_WHITELIST 473 569 #define VAR_IPSECMOD_STRICT 474 570 #define VAR_CACHEDB 475 571 #define VAR_CACHEDB_BACKEND 476 572 #define VAR_CACHEDB_SECRETSEED 477 573 #define VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM 478 574 575 /* Value type. */ 576 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 577 578 union YYSTYPE 579 { 580 #line 66 "util/configparser.y" /* yacc.c:355 */ 581 582 char* str; 583 584 #line 585 "util/configparser.c" /* yacc.c:355 */ 585 }; 586 587 typedef union YYSTYPE YYSTYPE; 588 # define YYSTYPE_IS_TRIVIAL 1 589 # define YYSTYPE_IS_DECLARED 1 590 #endif 591 592 593 extern YYSTYPE yylval; 594 595 int yyparse (void); 596 597 #endif /* !YY_YY_UTIL_CONFIGPARSER_H_INCLUDED */ 598 599 /* Copy the second part of user declarations. */ 600 601 #line 602 "util/configparser.c" /* yacc.c:358 */ 602 603 #ifdef short 604 # undef short 605 #endif 606 607 #ifdef YYTYPE_UINT8 608 typedef YYTYPE_UINT8 yytype_uint8; 609 #else 610 typedef unsigned char yytype_uint8; 611 #endif 612 613 #ifdef YYTYPE_INT8 614 typedef YYTYPE_INT8 yytype_int8; 615 #else 616 typedef signed char yytype_int8; 617 #endif 618 619 #ifdef YYTYPE_UINT16 620 typedef YYTYPE_UINT16 yytype_uint16; 621 #else 622 typedef unsigned short int yytype_uint16; 623 #endif 624 625 #ifdef YYTYPE_INT16 626 typedef YYTYPE_INT16 yytype_int16; 627 #else 628 typedef short int yytype_int16; 629 #endif 630 631 #ifndef YYSIZE_T 632 # ifdef __SIZE_TYPE__ 633 # define YYSIZE_T __SIZE_TYPE__ 634 # elif defined size_t 635 # define YYSIZE_T size_t 636 # elif ! defined YYSIZE_T 637 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 638 # define YYSIZE_T size_t 639 # else 640 # define YYSIZE_T unsigned int 641 # endif 642 #endif 643 644 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 645 646 #ifndef YY_ 647 # if defined YYENABLE_NLS && YYENABLE_NLS 648 # if ENABLE_NLS 649 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 650 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 651 # endif 652 # endif 653 # ifndef YY_ 654 # define YY_(Msgid) Msgid 655 # endif 656 #endif 657 658 #ifndef YY_ATTRIBUTE 659 # if (defined __GNUC__ \ 660 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 661 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 662 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 663 # else 664 # define YY_ATTRIBUTE(Spec) /* empty */ 665 # endif 666 #endif 667 668 #ifndef YY_ATTRIBUTE_PURE 669 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 670 #endif 671 672 #ifndef YY_ATTRIBUTE_UNUSED 673 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 674 #endif 675 676 #if !defined _Noreturn \ 677 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) 678 # if defined _MSC_VER && 1200 <= _MSC_VER 679 # define _Noreturn __declspec (noreturn) 680 # else 681 # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) 682 # endif 683 #endif 684 685 /* Suppress unused-variable warnings by "using" E. */ 686 #if ! defined lint || defined __GNUC__ 687 # define YYUSE(E) ((void) (E)) 688 #else 689 # define YYUSE(E) /* empty */ 690 #endif 691 692 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 693 /* Suppress an incorrect diagnostic about yylval being uninitialized. */ 694 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 695 _Pragma ("GCC diagnostic push") \ 696 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 697 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 698 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 699 _Pragma ("GCC diagnostic pop") 700 #else 701 # define YY_INITIAL_VALUE(Value) Value 702 #endif 703 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 704 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 705 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 706 #endif 707 #ifndef YY_INITIAL_VALUE 708 # define YY_INITIAL_VALUE(Value) /* Nothing. */ 709 #endif 710 711 712 #if ! defined yyoverflow || YYERROR_VERBOSE 713 714 /* The parser invokes alloca or malloc; define the necessary symbols. */ 715 716 # ifdef YYSTACK_USE_ALLOCA 717 # if YYSTACK_USE_ALLOCA 718 # ifdef __GNUC__ 719 # define YYSTACK_ALLOC __builtin_alloca 720 # elif defined __BUILTIN_VA_ARG_INCR 721 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 722 # elif defined _AIX 723 # define YYSTACK_ALLOC __alloca 724 # elif defined _MSC_VER 725 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 726 # define alloca _alloca 727 # else 728 # define YYSTACK_ALLOC alloca 729 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 730 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 731 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 732 # ifndef EXIT_SUCCESS 733 # define EXIT_SUCCESS 0 734 # endif 735 # endif 736 # endif 737 # endif 738 # endif 739 740 # ifdef YYSTACK_ALLOC 741 /* Pacify GCC's 'empty if-body' warning. */ 742 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 743 # ifndef YYSTACK_ALLOC_MAXIMUM 744 /* The OS might guarantee only one guard page at the bottom of the stack, 745 and a page size can be as small as 4096 bytes. So we cannot safely 746 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 747 to allow for a few compiler-allocated temporary stack slots. */ 748 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 749 # endif 750 # else 751 # define YYSTACK_ALLOC YYMALLOC 752 # define YYSTACK_FREE YYFREE 753 # ifndef YYSTACK_ALLOC_MAXIMUM 754 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 755 # endif 756 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 757 && ! ((defined YYMALLOC || defined malloc) \ 758 && (defined YYFREE || defined free))) 759 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 760 # ifndef EXIT_SUCCESS 761 # define EXIT_SUCCESS 0 762 # endif 763 # endif 764 # ifndef YYMALLOC 765 # define YYMALLOC malloc 766 # if ! defined malloc && ! defined EXIT_SUCCESS 767 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 768 # endif 769 # endif 770 # ifndef YYFREE 771 # define YYFREE free 772 # if ! defined free && ! defined EXIT_SUCCESS 773 void free (void *); /* INFRINGES ON USER NAME SPACE */ 774 # endif 775 # endif 776 # endif 777 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 778 779 780 #if (! defined yyoverflow \ 781 && (! defined __cplusplus \ 782 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 783 784 /* A type that is properly aligned for any stack member. */ 785 union yyalloc 786 { 787 yytype_int16 yyss_alloc; 788 YYSTYPE yyvs_alloc; 789 }; 790 791 /* The size of the maximum gap between one aligned stack and the next. */ 792 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 793 794 /* The size of an array large to enough to hold all stacks, each with 795 N elements. */ 796 # define YYSTACK_BYTES(N) \ 797 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 798 + YYSTACK_GAP_MAXIMUM) 799 800 # define YYCOPY_NEEDED 1 801 802 /* Relocate STACK from its old location to the new one. The 803 local variables YYSIZE and YYSTACKSIZE give the old and new number of 804 elements in the stack, and YYPTR gives the new location of the 805 stack. Advance YYPTR to a properly aligned location for the next 806 stack. */ 807 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 808 do \ 809 { \ 810 YYSIZE_T yynewbytes; \ 811 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 812 Stack = &yyptr->Stack_alloc; \ 813 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 814 yyptr += yynewbytes / sizeof (*yyptr); \ 815 } \ 816 while (0) 817 818 #endif 819 820 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 821 /* Copy COUNT objects from SRC to DST. The source and destination do 822 not overlap. */ 823 # ifndef YYCOPY 824 # if defined __GNUC__ && 1 < __GNUC__ 825 # define YYCOPY(Dst, Src, Count) \ 826 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 827 # else 828 # define YYCOPY(Dst, Src, Count) \ 829 do \ 830 { \ 831 YYSIZE_T yyi; \ 832 for (yyi = 0; yyi < (Count); yyi++) \ 833 (Dst)[yyi] = (Src)[yyi]; \ 834 } \ 835 while (0) 836 # endif 837 # endif 838 #endif /* !YYCOPY_NEEDED */ 839 840 /* YYFINAL -- State number of the termination state. */ 841 #define YYFINAL 2 842 /* YYLAST -- Last index in YYTABLE. */ 843 #define YYLAST 452 844 845 /* YYNTOKENS -- Number of terminals. */ 846 #define YYNTOKENS 224 847 /* YYNNTS -- Number of nonterminals. */ 848 #define YYNNTS 241 849 /* YYNRULES -- Number of rules. */ 850 #define YYNRULES 461 851 /* YYNSTATES -- Number of states. */ 852 #define YYNSTATES 692 853 854 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned 855 by yylex, with out-of-bounds checking. */ 856 #define YYUNDEFTOK 2 857 #define YYMAXUTOK 478 858 859 #define YYTRANSLATE(YYX) \ 860 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 861 862 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM 863 as returned by yylex, without out-of-bounds checking. */ 864 static const yytype_uint8 yytranslate[] = 865 { 866 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 867 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 868 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 869 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 870 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 871 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 872 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 873 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 874 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 875 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 876 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 877 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 878 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 879 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 880 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 881 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 882 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 883 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 884 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 885 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 886 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 887 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 888 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 889 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 890 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 891 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 892 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 893 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 894 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 895 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 896 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 897 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 898 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 899 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 900 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 901 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 902 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 903 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 904 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 905 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 906 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 907 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 908 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 909 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 910 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 911 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 912 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 913 215, 216, 217, 218, 219, 220, 221, 222, 223 914 }; 915 916 #if YYDEBUG 917 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ 918 static const yytype_uint16 yyrline[] = 919 { 920 0, 157, 157, 157, 158, 158, 159, 159, 160, 160, 921 160, 162, 163, 167, 172, 173, 174, 174, 174, 175, 922 175, 176, 176, 177, 177, 178, 178, 179, 179, 179, 923 180, 180, 180, 181, 181, 182, 182, 183, 183, 184, 924 184, 185, 185, 186, 186, 187, 187, 188, 188, 189, 925 189, 189, 190, 190, 190, 191, 191, 191, 192, 192, 926 193, 193, 194, 194, 195, 195, 196, 196, 196, 197, 927 197, 198, 198, 199, 199, 199, 200, 200, 201, 201, 928 202, 202, 203, 203, 203, 204, 204, 205, 205, 206, 929 206, 207, 207, 208, 208, 209, 209, 209, 210, 210, 930 211, 211, 211, 212, 212, 212, 213, 213, 213, 214, 931 214, 214, 214, 215, 215, 215, 216, 216, 216, 217, 932 217, 218, 218, 219, 219, 220, 220, 221, 221, 221, 933 222, 222, 223, 223, 224, 225, 225, 226, 226, 227, 934 227, 228, 229, 229, 230, 230, 231, 231, 232, 232, 935 232, 233, 233, 234, 234, 235, 235, 236, 236, 237, 936 237, 237, 238, 238, 238, 239, 239, 239, 240, 240, 937 241, 241, 242, 242, 243, 243, 244, 246, 258, 259, 938 260, 260, 260, 260, 260, 261, 263, 275, 276, 277, 939 277, 277, 277, 278, 280, 294, 295, 296, 296, 296, 940 296, 297, 297, 297, 299, 308, 317, 328, 337, 346, 941 355, 366, 375, 386, 399, 414, 425, 442, 459, 472, 942 487, 496, 505, 514, 523, 532, 541, 550, 559, 568, 943 577, 586, 595, 604, 613, 622, 631, 638, 645, 654, 944 663, 672, 686, 695, 704, 713, 720, 727, 753, 761, 945 768, 775, 782, 789, 797, 805, 813, 820, 831, 838, 946 847, 856, 865, 872, 879, 887, 895, 905, 915, 925, 947 938, 949, 957, 970, 979, 988, 997, 1007, 1017, 1025, 948 1038, 1047, 1055, 1064, 1072, 1085, 1094, 1101, 1111, 1121, 949 1131, 1141, 1151, 1161, 1171, 1181, 1188, 1195, 1202, 1211, 950 1220, 1229, 1236, 1246, 1263, 1270, 1288, 1301, 1314, 1323, 951 1332, 1341, 1350, 1360, 1370, 1379, 1388, 1401, 1414, 1423, 952 1430, 1439, 1448, 1457, 1466, 1474, 1487, 1495, 1523, 1530, 953 1545, 1555, 1565, 1572, 1579, 1588, 1602, 1621, 1640, 1652, 954 1664, 1676, 1687, 1706, 1716, 1725, 1733, 1741, 1754, 1767, 955 1780, 1793, 1802, 1811, 1821, 1831, 1844, 1857, 1868, 1881, 956 1892, 1905, 1915, 1922, 1929, 1938, 1948, 1958, 1968, 1975, 957 1982, 1991, 2001, 2011, 2040, 2050, 2058, 2067, 2082, 2091, 958 2096, 2097, 2098, 2098, 2098, 2099, 2099, 2099, 2100, 2100, 959 2102, 2112, 2121, 2128, 2138, 2145, 2152, 2159, 2166, 2171, 960 2172, 2173, 2173, 2174, 2174, 2175, 2175, 2176, 2177, 2178, 961 2179, 2180, 2181, 2183, 2191, 2198, 2206, 2214, 2221, 2228, 962 2237, 2246, 2255, 2264, 2273, 2282, 2287, 2288, 2289, 2291, 963 2297, 2307, 2314, 2323, 2331, 2337, 2338, 2340, 2340, 2340, 964 2341, 2341, 2342, 2343, 2344, 2345, 2347, 2357, 2367, 2374, 965 2381, 2388, 2396, 2409, 2417, 2430, 2435, 2436, 2437, 2437, 966 2439, 2453 967 }; 968 #endif 969 970 #if YYDEBUG || YYERROR_VERBOSE || 0 971 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 972 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 973 static const char *const yytname[] = 974 { 975 "$end", "error", "$undefined", "SPACE", "LETTER", "NEWLINE", "COMMENT", 976 "COLON", "ANY", "ZONESTR", "STRING_ARG", "VAR_SERVER", "VAR_VERBOSITY", 977 "VAR_NUM_THREADS", "VAR_PORT", "VAR_OUTGOING_RANGE", "VAR_INTERFACE", 978 "VAR_DO_IP4", "VAR_DO_IP6", "VAR_PREFER_IP6", "VAR_DO_UDP", "VAR_DO_TCP", 979 "VAR_TCP_MSS", "VAR_OUTGOING_TCP_MSS", "VAR_CHROOT", "VAR_USERNAME", 980 "VAR_DIRECTORY", "VAR_LOGFILE", "VAR_PIDFILE", "VAR_MSG_CACHE_SIZE", 981 "VAR_MSG_CACHE_SLABS", "VAR_NUM_QUERIES_PER_THREAD", 982 "VAR_RRSET_CACHE_SIZE", "VAR_RRSET_CACHE_SLABS", "VAR_OUTGOING_NUM_TCP", 983 "VAR_INFRA_HOST_TTL", "VAR_INFRA_LAME_TTL", "VAR_INFRA_CACHE_SLABS", 984 "VAR_INFRA_CACHE_NUMHOSTS", "VAR_INFRA_CACHE_LAME_SIZE", "VAR_NAME", 985 "VAR_STUB_ZONE", "VAR_STUB_HOST", "VAR_STUB_ADDR", 986 "VAR_TARGET_FETCH_POLICY", "VAR_HARDEN_SHORT_BUFSIZE", 987 "VAR_HARDEN_LARGE_QUERIES", "VAR_FORWARD_ZONE", "VAR_FORWARD_HOST", 988 "VAR_FORWARD_ADDR", "VAR_DO_NOT_QUERY_ADDRESS", "VAR_HIDE_IDENTITY", 989 "VAR_HIDE_VERSION", "VAR_IDENTITY", "VAR_VERSION", "VAR_HARDEN_GLUE", 990 "VAR_MODULE_CONF", "VAR_TRUST_ANCHOR_FILE", "VAR_TRUST_ANCHOR", 991 "VAR_VAL_OVERRIDE_DATE", "VAR_BOGUS_TTL", "VAR_VAL_CLEAN_ADDITIONAL", 992 "VAR_VAL_PERMISSIVE_MODE", "VAR_INCOMING_NUM_TCP", "VAR_MSG_BUFFER_SIZE", 993 "VAR_KEY_CACHE_SIZE", "VAR_KEY_CACHE_SLABS", "VAR_TRUSTED_KEYS_FILE", 994 "VAR_VAL_NSEC3_KEYSIZE_ITERATIONS", "VAR_USE_SYSLOG", 995 "VAR_OUTGOING_INTERFACE", "VAR_ROOT_HINTS", "VAR_DO_NOT_QUERY_LOCALHOST", 996 "VAR_CACHE_MAX_TTL", "VAR_HARDEN_DNSSEC_STRIPPED", "VAR_ACCESS_CONTROL", 997 "VAR_LOCAL_ZONE", "VAR_LOCAL_DATA", "VAR_INTERFACE_AUTOMATIC", 998 "VAR_STATISTICS_INTERVAL", "VAR_DO_DAEMONIZE", "VAR_USE_CAPS_FOR_ID", 999 "VAR_STATISTICS_CUMULATIVE", "VAR_OUTGOING_PORT_PERMIT", 1000 "VAR_OUTGOING_PORT_AVOID", "VAR_DLV_ANCHOR_FILE", "VAR_DLV_ANCHOR", 1001 "VAR_NEG_CACHE_SIZE", "VAR_HARDEN_REFERRAL_PATH", "VAR_PRIVATE_ADDRESS", 1002 "VAR_PRIVATE_DOMAIN", "VAR_REMOTE_CONTROL", "VAR_CONTROL_ENABLE", 1003 "VAR_CONTROL_INTERFACE", "VAR_CONTROL_PORT", "VAR_SERVER_KEY_FILE", 1004 "VAR_SERVER_CERT_FILE", "VAR_CONTROL_KEY_FILE", "VAR_CONTROL_CERT_FILE", 1005 "VAR_CONTROL_USE_CERT", "VAR_EXTENDED_STATISTICS", "VAR_LOCAL_DATA_PTR", 1006 "VAR_JOSTLE_TIMEOUT", "VAR_STUB_PRIME", "VAR_UNWANTED_REPLY_THRESHOLD", 1007 "VAR_LOG_TIME_ASCII", "VAR_DOMAIN_INSECURE", "VAR_PYTHON", 1008 "VAR_PYTHON_SCRIPT", "VAR_VAL_SIG_SKEW_MIN", "VAR_VAL_SIG_SKEW_MAX", 1009 "VAR_CACHE_MIN_TTL", "VAR_VAL_LOG_LEVEL", "VAR_AUTO_TRUST_ANCHOR_FILE", 1010 "VAR_KEEP_MISSING", "VAR_ADD_HOLDDOWN", "VAR_DEL_HOLDDOWN", 1011 "VAR_SO_RCVBUF", "VAR_EDNS_BUFFER_SIZE", "VAR_PREFETCH", 1012 "VAR_PREFETCH_KEY", "VAR_SO_SNDBUF", "VAR_SO_REUSEPORT", 1013 "VAR_HARDEN_BELOW_NXDOMAIN", "VAR_IGNORE_CD_FLAG", "VAR_LOG_QUERIES", 1014 "VAR_LOG_REPLIES", "VAR_TCP_UPSTREAM", "VAR_SSL_UPSTREAM", 1015 "VAR_SSL_SERVICE_KEY", "VAR_SSL_SERVICE_PEM", "VAR_SSL_PORT", 1016 "VAR_FORWARD_FIRST", "VAR_STUB_SSL_UPSTREAM", "VAR_FORWARD_SSL_UPSTREAM", 1017 "VAR_STUB_FIRST", "VAR_MINIMAL_RESPONSES", "VAR_RRSET_ROUNDROBIN", 1018 "VAR_MAX_UDP_SIZE", "VAR_DELAY_CLOSE", "VAR_UNBLOCK_LAN_ZONES", 1019 "VAR_INSECURE_LAN_ZONES", "VAR_INFRA_CACHE_MIN_RTT", "VAR_DNS64_PREFIX", 1020 "VAR_DNS64_SYNTHALL", "VAR_DNSTAP", "VAR_DNSTAP_ENABLE", 1021 "VAR_DNSTAP_SOCKET_PATH", "VAR_DNSTAP_SEND_IDENTITY", 1022 "VAR_DNSTAP_SEND_VERSION", "VAR_DNSTAP_IDENTITY", "VAR_DNSTAP_VERSION", 1023 "VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES", 1024 "VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES", 1025 "VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES", 1026 "VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES", 1027 "VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES", 1028 "VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES", "VAR_RESPONSE_IP_TAG", 1029 "VAR_RESPONSE_IP", "VAR_RESPONSE_IP_DATA", "VAR_HARDEN_ALGO_DOWNGRADE", 1030 "VAR_IP_TRANSPARENT", "VAR_DISABLE_DNSSEC_LAME_CHECK", 1031 "VAR_IP_RATELIMIT", "VAR_IP_RATELIMIT_SLABS", "VAR_IP_RATELIMIT_SIZE", 1032 "VAR_RATELIMIT", "VAR_RATELIMIT_SLABS", "VAR_RATELIMIT_SIZE", 1033 "VAR_RATELIMIT_FOR_DOMAIN", "VAR_RATELIMIT_BELOW_DOMAIN", 1034 "VAR_IP_RATELIMIT_FACTOR", "VAR_RATELIMIT_FACTOR", 1035 "VAR_SEND_CLIENT_SUBNET", "VAR_CLIENT_SUBNET_ZONE", 1036 "VAR_CLIENT_SUBNET_ALWAYS_FORWARD", "VAR_CLIENT_SUBNET_OPCODE", 1037 "VAR_MAX_CLIENT_SUBNET_IPV4", "VAR_MAX_CLIENT_SUBNET_IPV6", 1038 "VAR_CAPS_WHITELIST", "VAR_CACHE_MAX_NEGATIVE_TTL", 1039 "VAR_PERMIT_SMALL_HOLDDOWN", "VAR_QNAME_MINIMISATION", 1040 "VAR_QNAME_MINIMISATION_STRICT", "VAR_IP_FREEBIND", "VAR_DEFINE_TAG", 1041 "VAR_LOCAL_ZONE_TAG", "VAR_ACCESS_CONTROL_TAG", 1042 "VAR_LOCAL_ZONE_OVERRIDE", "VAR_ACCESS_CONTROL_TAG_ACTION", 1043 "VAR_ACCESS_CONTROL_TAG_DATA", "VAR_VIEW", "VAR_ACCESS_CONTROL_VIEW", 1044 "VAR_VIEW_FIRST", "VAR_SERVE_EXPIRED", "VAR_FAKE_DSA", "VAR_FAKE_SHA1", 1045 "VAR_LOG_IDENTITY", "VAR_HIDE_TRUSTANCHOR", "VAR_TRUST_ANCHOR_SIGNALING", 1046 "VAR_USE_SYSTEMD", "VAR_SHM_ENABLE", "VAR_SHM_KEY", "VAR_DNSCRYPT", 1047 "VAR_DNSCRYPT_ENABLE", "VAR_DNSCRYPT_PORT", "VAR_DNSCRYPT_PROVIDER", 1048 "VAR_DNSCRYPT_SECRET_KEY", "VAR_DNSCRYPT_PROVIDER_CERT", 1049 "VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE", 1050 "VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS", 1051 "VAR_DNSCRYPT_NONCE_CACHE_SIZE", "VAR_DNSCRYPT_NONCE_CACHE_SLABS", 1052 "VAR_IPSECMOD_ENABLED", "VAR_IPSECMOD_HOOK", "VAR_IPSECMOD_IGNORE_BOGUS", 1053 "VAR_IPSECMOD_MAX_TTL", "VAR_IPSECMOD_WHITELIST", "VAR_IPSECMOD_STRICT", 1054 "VAR_CACHEDB", "VAR_CACHEDB_BACKEND", "VAR_CACHEDB_SECRETSEED", 1055 "VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM", "$accept", "toplevelvars", 1056 "toplevelvar", "serverstart", "contents_server", "content_server", 1057 "stubstart", "contents_stub", "content_stub", "forwardstart", 1058 "contents_forward", "content_forward", "viewstart", "contents_view", 1059 "content_view", "server_num_threads", "server_verbosity", 1060 "server_statistics_interval", "server_statistics_cumulative", 1061 "server_extended_statistics", "server_shm_enable", "server_shm_key", 1062 "server_port", "server_send_client_subnet", "server_client_subnet_zone", 1063 "server_client_subnet_always_forward", "server_client_subnet_opcode", 1064 "server_max_client_subnet_ipv4", "server_max_client_subnet_ipv6", 1065 "server_interface", "server_outgoing_interface", "server_outgoing_range", 1066 "server_outgoing_port_permit", "server_outgoing_port_avoid", 1067 "server_outgoing_num_tcp", "server_incoming_num_tcp", 1068 "server_interface_automatic", "server_do_ip4", "server_do_ip6", 1069 "server_do_udp", "server_do_tcp", "server_prefer_ip6", "server_tcp_mss", 1070 "server_outgoing_tcp_mss", "server_tcp_upstream", 1071 "server_udp_upstream_without_downstream", "server_ssl_upstream", 1072 "server_ssl_service_key", "server_ssl_service_pem", "server_ssl_port", 1073 "server_use_systemd", "server_do_daemonize", "server_use_syslog", 1074 "server_log_time_ascii", "server_log_queries", "server_log_replies", 1075 "server_chroot", "server_username", "server_directory", "server_logfile", 1076 "server_pidfile", "server_root_hints", "server_dlv_anchor_file", 1077 "server_dlv_anchor", "server_auto_trust_anchor_file", 1078 "server_trust_anchor_file", "server_trusted_keys_file", 1079 "server_trust_anchor", "server_trust_anchor_signaling", 1080 "server_domain_insecure", "server_hide_identity", "server_hide_version", 1081 "server_hide_trustanchor", "server_identity", "server_version", 1082 "server_so_rcvbuf", "server_so_sndbuf", "server_so_reuseport", 1083 "server_ip_transparent", "server_ip_freebind", "server_edns_buffer_size", 1084 "server_msg_buffer_size", "server_msg_cache_size", 1085 "server_msg_cache_slabs", "server_num_queries_per_thread", 1086 "server_jostle_timeout", "server_delay_close", 1087 "server_unblock_lan_zones", "server_insecure_lan_zones", 1088 "server_rrset_cache_size", "server_rrset_cache_slabs", 1089 "server_infra_host_ttl", "server_infra_lame_ttl", 1090 "server_infra_cache_numhosts", "server_infra_cache_lame_size", 1091 "server_infra_cache_slabs", "server_infra_cache_min_rtt", 1092 "server_target_fetch_policy", "server_harden_short_bufsize", 1093 "server_harden_large_queries", "server_harden_glue", 1094 "server_harden_dnssec_stripped", "server_harden_below_nxdomain", 1095 "server_harden_referral_path", "server_harden_algo_downgrade", 1096 "server_use_caps_for_id", "server_caps_whitelist", 1097 "server_private_address", "server_private_domain", "server_prefetch", 1098 "server_prefetch_key", "server_unwanted_reply_threshold", 1099 "server_do_not_query_address", "server_do_not_query_localhost", 1100 "server_access_control", "server_module_conf", 1101 "server_val_override_date", "server_val_sig_skew_min", 1102 "server_val_sig_skew_max", "server_cache_max_ttl", 1103 "server_cache_max_negative_ttl", "server_cache_min_ttl", 1104 "server_bogus_ttl", "server_val_clean_additional", 1105 "server_val_permissive_mode", "server_ignore_cd_flag", 1106 "server_serve_expired", "server_fake_dsa", "server_fake_sha1", 1107 "server_val_log_level", "server_val_nsec3_keysize_iterations", 1108 "server_add_holddown", "server_del_holddown", "server_keep_missing", 1109 "server_permit_small_holddown", "server_key_cache_size", 1110 "server_key_cache_slabs", "server_neg_cache_size", "server_local_zone", 1111 "server_local_data", "server_local_data_ptr", "server_minimal_responses", 1112 "server_rrset_roundrobin", "server_max_udp_size", "server_dns64_prefix", 1113 "server_dns64_synthall", "server_define_tag", "server_local_zone_tag", 1114 "server_access_control_tag", "server_access_control_tag_action", 1115 "server_access_control_tag_data", "server_local_zone_override", 1116 "server_access_control_view", "server_response_ip_tag", 1117 "server_ip_ratelimit", "server_ratelimit", "server_ip_ratelimit_size", 1118 "server_ratelimit_size", "server_ip_ratelimit_slabs", 1119 "server_ratelimit_slabs", "server_ratelimit_for_domain", 1120 "server_ratelimit_below_domain", "server_ip_ratelimit_factor", 1121 "server_ratelimit_factor", "server_qname_minimisation", 1122 "server_qname_minimisation_strict", "server_ipsecmod_enabled", 1123 "server_ipsecmod_ignore_bogus", "server_ipsecmod_hook", 1124 "server_ipsecmod_max_ttl", "server_ipsecmod_whitelist", 1125 "server_ipsecmod_strict", "stub_name", "stub_host", "stub_addr", 1126 "stub_first", "stub_ssl_upstream", "stub_prime", "forward_name", 1127 "forward_host", "forward_addr", "forward_first", "forward_ssl_upstream", 1128 "view_name", "view_local_zone", "view_response_ip", 1129 "view_response_ip_data", "view_local_data", "view_local_data_ptr", 1130 "view_first", "rcstart", "contents_rc", "content_rc", 1131 "rc_control_enable", "rc_control_port", "rc_control_interface", 1132 "rc_control_use_cert", "rc_server_key_file", "rc_server_cert_file", 1133 "rc_control_key_file", "rc_control_cert_file", "dtstart", "contents_dt", 1134 "content_dt", "dt_dnstap_enable", "dt_dnstap_socket_path", 1135 "dt_dnstap_send_identity", "dt_dnstap_send_version", 1136 "dt_dnstap_identity", "dt_dnstap_version", 1137 "dt_dnstap_log_resolver_query_messages", 1138 "dt_dnstap_log_resolver_response_messages", 1139 "dt_dnstap_log_client_query_messages", 1140 "dt_dnstap_log_client_response_messages", 1141 "dt_dnstap_log_forwarder_query_messages", 1142 "dt_dnstap_log_forwarder_response_messages", "pythonstart", 1143 "contents_py", "content_py", "py_script", 1144 "server_disable_dnssec_lame_check", "server_log_identity", 1145 "server_response_ip", "server_response_ip_data", "dnscstart", 1146 "contents_dnsc", "content_dnsc", "dnsc_dnscrypt_enable", 1147 "dnsc_dnscrypt_port", "dnsc_dnscrypt_provider", 1148 "dnsc_dnscrypt_provider_cert", "dnsc_dnscrypt_secret_key", 1149 "dnsc_dnscrypt_shared_secret_cache_size", 1150 "dnsc_dnscrypt_shared_secret_cache_slabs", 1151 "dnsc_dnscrypt_nonce_cache_size", "dnsc_dnscrypt_nonce_cache_slabs", 1152 "cachedbstart", "contents_cachedb", "content_cachedb", 1153 "cachedb_backend_name", "cachedb_secret_seed", YY_NULLPTR 1154 }; 1155 #endif 1156 1157 # ifdef YYPRINT 1158 /* YYTOKNUM[NUM] -- (External) token number corresponding to the 1159 (internal) symbol number NUM (which must be that of a token). */ 1160 static const yytype_uint16 yytoknum[] = 1161 { 1162 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 1163 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 1164 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 1165 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 1166 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 1167 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 1168 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 1169 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 1170 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 1171 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 1172 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 1173 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 1174 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 1175 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 1176 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 1177 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 1178 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 1179 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 1180 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 1181 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 1182 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 1183 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 1184 475, 476, 477, 478 1185 }; 1186 # endif 1187 1188 #define YYPACT_NINF -215 1189 1190 #define yypact_value_is_default(Yystate) \ 1191 (!!((Yystate) == (-215))) 1192 1193 #define YYTABLE_NINF -1 1194 1195 #define yytable_value_is_error(Yytable_value) \ 1196 0 1197 1198 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 1199 STATE-NUM. */ 1200 static const yytype_int16 yypact[] = 1201 { 1202 -215, 0, -215, -215, -215, -215, -215, -215, -215, -215, 1203 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1204 -215, -215, 209, -38, -34, -39, -44, -130, -105, -177, 1205 -214, -1, 2, 3, 29, 30, 32, 33, 34, 35, 1206 36, 46, 47, 48, 49, 50, 51, 53, 54, 56, 1207 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 1208 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 1209 77, 78, 79, 80, 82, 83, 84, 86, 89, 91, 1210 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 1211 103, 104, 105, 106, 107, 108, 109, 112, 113, 114, 1212 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 1213 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 1214 136, 137, 138, 139, 140, 141, 142, 143, 144, 146, 1215 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 1216 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 1217 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 1218 177, 178, 179, 180, 181, 183, 184, 185, 186, 187, 1219 188, 189, 190, 191, 192, 193, 195, 196, 197, 198, 1220 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 1221 239, 240, -215, -215, -215, -215, -215, -215, -215, -215, 1222 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1223 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1224 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1225 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1226 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1227 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1228 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1229 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1230 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1231 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1232 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1233 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1234 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1235 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1236 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1237 -215, -215, -215, -215, 241, 242, 246, 247, 248, 290, 1238 -215, -215, -215, -215, -215, -215, -215, 291, 292, 293, 1239 294, 295, -215, -215, -215, -215, -215, -215, 296, 297, 1240 298, 302, 306, 307, 331, -215, -215, -215, -215, -215, 1241 -215, -215, -215, 332, 333, 334, 344, 345, 346, 347, 1242 348, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1243 349, 350, 351, 352, 353, 354, 355, 356, 391, 393, 1244 403, 404, -215, -215, -215, -215, -215, -215, -215, -215, 1245 -215, -215, -215, -215, -215, 405, -215, -215, 406, 407, 1246 408, 409, 410, 411, 412, 419, 420, -215, -215, -215, 1247 -215, -215, -215, -215, -215, -215, -215, 421, 423, -215, 1248 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1249 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1250 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1251 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1252 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1253 -215, -215, -215, -215, -215, -215, -215, -215, 424, 425, 1254 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1255 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1256 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1257 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1258 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1259 -215, -215, 426, 427, 428, -215, -215, -215, -215, -215, 1260 -215, -215, -215, -215, 429, 430, -215, -215, -215, -215, 1261 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1262 -215, 431, 432, 433, 434, 435, 436, -215, -215, -215, 1263 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1264 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1265 -215, -215, -215, -215, -215, 437, -215, -215, 438, 439, 1266 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1267 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1268 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1269 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1270 -215, -215, 440, 441, 442, -215, -215, -215, -215, -215, 1271 -215, -215 1272 }; 1273 1274 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. 1275 Performed when YYTABLE does not specify something else to do. Zero 1276 means the default is an error. */ 1277 static const yytype_uint16 yydefact[] = 1278 { 1279 2, 0, 1, 13, 177, 186, 379, 425, 398, 194, 1280 434, 455, 3, 15, 179, 188, 196, 381, 400, 427, 1281 436, 457, 4, 5, 6, 10, 8, 9, 7, 11, 1282 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1283 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1284 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1285 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1286 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1287 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1288 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1289 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1292 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1293 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1294 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1295 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1296 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1297 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1298 0, 0, 14, 16, 17, 76, 79, 88, 165, 166, 1299 18, 138, 139, 140, 141, 142, 143, 27, 67, 19, 1300 80, 81, 38, 60, 75, 20, 21, 23, 24, 22, 1301 25, 26, 111, 176, 112, 113, 114, 115, 161, 77, 1302 66, 92, 109, 110, 28, 29, 30, 31, 32, 68, 1303 82, 83, 98, 54, 64, 55, 169, 93, 48, 49, 1304 168, 50, 51, 102, 106, 119, 127, 148, 103, 61, 1305 33, 34, 35, 90, 120, 121, 122, 36, 37, 39, 1306 40, 42, 43, 41, 125, 44, 45, 46, 52, 71, 1307 107, 85, 126, 78, 144, 86, 87, 104, 105, 91, 1308 47, 69, 72, 53, 56, 94, 95, 70, 145, 96, 1309 57, 58, 59, 108, 158, 159, 167, 97, 65, 99, 1310 100, 101, 146, 62, 63, 84, 73, 74, 89, 116, 1311 117, 118, 123, 124, 149, 150, 152, 154, 155, 153, 1312 156, 162, 128, 129, 132, 133, 130, 131, 134, 135, 1313 137, 136, 147, 157, 170, 172, 171, 173, 174, 175, 1314 151, 160, 163, 164, 0, 0, 0, 0, 0, 0, 1315 178, 180, 181, 182, 184, 185, 183, 0, 0, 0, 1316 0, 0, 187, 189, 190, 191, 192, 193, 0, 0, 1317 0, 0, 0, 0, 0, 195, 197, 198, 201, 202, 1318 199, 203, 200, 0, 0, 0, 0, 0, 0, 0, 1319 0, 380, 382, 384, 383, 389, 385, 386, 387, 388, 1320 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1321 0, 0, 399, 401, 402, 403, 404, 405, 406, 407, 1322 408, 409, 410, 411, 412, 0, 426, 428, 0, 0, 1323 0, 0, 0, 0, 0, 0, 0, 435, 437, 438, 1324 439, 441, 440, 442, 443, 444, 445, 0, 0, 456, 1325 458, 459, 205, 204, 211, 220, 218, 226, 227, 230, 1326 228, 229, 231, 232, 245, 246, 247, 248, 249, 271, 1327 272, 273, 278, 279, 223, 280, 281, 284, 282, 283, 1328 286, 287, 288, 301, 259, 260, 262, 263, 289, 304, 1329 254, 256, 305, 311, 312, 313, 224, 270, 324, 325, 1330 255, 319, 241, 219, 250, 302, 308, 290, 0, 0, 1331 328, 225, 206, 240, 294, 207, 221, 222, 251, 252, 1332 326, 292, 296, 297, 208, 329, 274, 300, 242, 258, 1333 306, 307, 310, 318, 253, 322, 320, 321, 264, 269, 1334 298, 299, 265, 266, 291, 314, 243, 244, 233, 235, 1335 236, 237, 238, 330, 331, 332, 275, 276, 277, 285, 1336 333, 334, 0, 0, 0, 293, 267, 430, 343, 347, 1337 345, 344, 348, 346, 0, 0, 351, 352, 212, 213, 1338 214, 215, 216, 217, 295, 309, 323, 353, 354, 268, 1339 335, 0, 0, 0, 0, 0, 0, 315, 316, 317, 1340 431, 261, 257, 239, 209, 210, 355, 357, 356, 358, 1341 359, 360, 234, 361, 362, 363, 366, 365, 364, 367, 1342 368, 369, 370, 371, 372, 0, 376, 377, 0, 0, 1343 378, 390, 392, 391, 394, 395, 396, 397, 393, 413, 1344 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 1345 424, 429, 446, 447, 448, 450, 449, 451, 452, 453, 1346 454, 460, 461, 303, 327, 342, 432, 433, 349, 350, 1347 336, 337, 0, 0, 0, 341, 373, 374, 375, 340, 1348 338, 339 1349 }; 1350 1351 /* YYPGOTO[NTERM-NUM]. */ 1352 static const yytype_int16 yypgoto[] = 1353 { 1354 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1355 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1356 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1357 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1358 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1359 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1360 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1361 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1362 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1363 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1364 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1365 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1366 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1367 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1368 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1369 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1370 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1371 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1372 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1373 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1374 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1375 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1376 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1377 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1378 -215 1379 }; 1380 1381 /* YYDEFGOTO[NTERM-NUM]. */ 1382 static const yytype_int16 yydefgoto[] = 1383 { 1384 -1, 1, 12, 13, 22, 192, 14, 23, 360, 15, 1385 24, 372, 16, 25, 385, 193, 194, 195, 196, 197, 1386 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 1387 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 1388 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 1389 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 1390 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 1391 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 1392 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 1393 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 1394 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 1395 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 1396 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 1397 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 1398 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 1399 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 1400 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 1401 348, 349, 361, 362, 363, 364, 365, 366, 373, 374, 1402 375, 376, 377, 386, 387, 388, 389, 390, 391, 392, 1403 17, 26, 401, 402, 403, 404, 405, 406, 407, 408, 1404 409, 18, 27, 422, 423, 424, 425, 426, 427, 428, 1405 429, 430, 431, 432, 433, 434, 19, 28, 436, 437, 1406 350, 351, 352, 353, 20, 29, 447, 448, 449, 450, 1407 451, 452, 453, 454, 455, 456, 21, 30, 459, 460, 1408 461 1409 }; 1410 1411 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If 1412 positive, shift that token. If negative, reduce the rule whose 1413 number is the opposite. If YYTABLE_NINF, syntax error. */ 1414 static const yytype_uint16 yytable[] = 1415 { 1416 2, 378, 354, 435, 355, 356, 367, 457, 458, 462, 1417 0, 3, 463, 464, 368, 369, 410, 411, 412, 413, 1418 414, 415, 416, 417, 418, 419, 420, 421, 438, 439, 1419 440, 441, 442, 443, 444, 445, 446, 379, 380, 465, 1420 466, 4, 467, 468, 469, 470, 471, 5, 393, 394, 1421 395, 396, 397, 398, 399, 400, 472, 473, 474, 475, 1422 476, 477, 381, 478, 479, 357, 480, 481, 482, 483, 1423 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 1424 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 1425 504, 6, 505, 506, 507, 358, 508, 359, 370, 509, 1426 371, 510, 511, 512, 513, 514, 515, 7, 516, 517, 1427 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 1428 382, 383, 528, 529, 530, 531, 532, 533, 534, 535, 1429 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 1430 546, 547, 548, 549, 550, 8, 551, 552, 553, 554, 1431 555, 556, 557, 558, 559, 384, 560, 561, 562, 563, 1432 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 1433 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 1434 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 1435 594, 595, 9, 596, 597, 598, 599, 600, 601, 602, 1436 603, 604, 605, 606, 10, 607, 608, 609, 610, 611, 1437 612, 613, 614, 615, 616, 617, 618, 619, 620, 0, 1438 11, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1439 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 1440 50, 51, 52, 53, 54, 55, 56, 57, 58, 621, 1441 622, 623, 624, 59, 60, 61, 625, 626, 627, 62, 1442 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 1443 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 1444 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 1445 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 1446 628, 629, 630, 631, 632, 633, 634, 635, 636, 103, 1447 104, 105, 637, 106, 107, 108, 638, 639, 109, 110, 1448 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 1449 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 1450 131, 640, 641, 642, 643, 132, 133, 134, 135, 136, 1451 137, 138, 139, 140, 644, 645, 646, 647, 648, 649, 1452 650, 651, 652, 653, 654, 655, 656, 141, 142, 143, 1453 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 1454 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 1455 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 1456 174, 657, 175, 658, 176, 177, 178, 179, 180, 181, 1457 182, 183, 184, 659, 660, 661, 662, 663, 664, 665, 1458 666, 667, 668, 185, 186, 187, 188, 189, 190, 669, 1459 670, 671, 191, 672, 673, 674, 675, 676, 677, 678, 1460 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 1461 689, 690, 691 1462 }; 1463 1464 static const yytype_int16 yycheck[] = 1465 { 1466 0, 40, 40, 108, 42, 43, 40, 221, 222, 10, 1467 -1, 11, 10, 10, 48, 49, 146, 147, 148, 149, 1468 150, 151, 152, 153, 154, 155, 156, 157, 205, 206, 1469 207, 208, 209, 210, 211, 212, 213, 76, 77, 10, 1470 10, 41, 10, 10, 10, 10, 10, 47, 92, 93, 1471 94, 95, 96, 97, 98, 99, 10, 10, 10, 10, 1472 10, 10, 101, 10, 10, 103, 10, 10, 10, 10, 1473 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1474 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1475 10, 91, 10, 10, 10, 133, 10, 135, 132, 10, 1476 134, 10, 10, 10, 10, 10, 10, 107, 10, 10, 1477 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1478 159, 160, 10, 10, 10, 10, 10, 10, 10, 10, 1479 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1480 10, 10, 10, 10, 10, 145, 10, 10, 10, 10, 1481 10, 10, 10, 10, 10, 194, 10, 10, 10, 10, 1482 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1483 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1484 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1485 10, 10, 192, 10, 10, 10, 10, 10, 10, 10, 1486 10, 10, 10, 10, 204, 10, 10, 10, 10, 10, 1487 10, 10, 10, 10, 10, 10, 10, 10, 10, -1, 1488 220, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1489 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1490 31, 32, 33, 34, 35, 36, 37, 38, 39, 10, 1491 10, 10, 10, 44, 45, 46, 10, 10, 10, 50, 1492 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 1493 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 1494 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 1495 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 1496 10, 10, 10, 10, 10, 10, 10, 10, 10, 100, 1497 101, 102, 10, 104, 105, 106, 10, 10, 109, 110, 1498 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 1499 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 1500 131, 10, 10, 10, 10, 136, 137, 138, 139, 140, 1501 141, 142, 143, 144, 10, 10, 10, 10, 10, 10, 1502 10, 10, 10, 10, 10, 10, 10, 158, 159, 160, 1503 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 1504 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 1505 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 1506 191, 10, 193, 10, 195, 196, 197, 198, 199, 200, 1507 201, 202, 203, 10, 10, 10, 10, 10, 10, 10, 1508 10, 10, 10, 214, 215, 216, 217, 218, 219, 10, 1509 10, 10, 223, 10, 10, 10, 10, 10, 10, 10, 1510 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1511 10, 10, 10 1512 }; 1513 1514 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 1515 symbol of state STATE-NUM. */ 1516 static const yytype_uint16 yystos[] = 1517 { 1518 0, 225, 0, 11, 41, 47, 91, 107, 145, 192, 1519 204, 220, 226, 227, 230, 233, 236, 414, 425, 440, 1520 448, 460, 228, 231, 234, 237, 415, 426, 441, 449, 1521 461, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1522 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1523 31, 32, 33, 34, 35, 36, 37, 38, 39, 44, 1524 45, 46, 50, 51, 52, 53, 54, 55, 56, 57, 1525 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 1526 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 1527 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 1528 88, 89, 90, 100, 101, 102, 104, 105, 106, 109, 1529 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 1530 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 1531 130, 131, 136, 137, 138, 139, 140, 141, 142, 143, 1532 144, 158, 159, 160, 161, 162, 163, 164, 165, 166, 1533 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 1534 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 1535 187, 188, 189, 190, 191, 193, 195, 196, 197, 198, 1536 199, 200, 201, 202, 203, 214, 215, 216, 217, 218, 1537 219, 223, 229, 239, 240, 241, 242, 243, 244, 245, 1538 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 1539 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 1540 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 1541 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 1542 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 1543 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 1544 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 1545 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 1546 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 1547 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 1548 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 1549 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 1550 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 1551 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 1552 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 1553 444, 445, 446, 447, 40, 42, 43, 103, 133, 135, 1554 232, 396, 397, 398, 399, 400, 401, 40, 48, 49, 1555 132, 134, 235, 402, 403, 404, 405, 406, 40, 76, 1556 77, 101, 159, 160, 194, 238, 407, 408, 409, 410, 1557 411, 412, 413, 92, 93, 94, 95, 96, 97, 98, 1558 99, 416, 417, 418, 419, 420, 421, 422, 423, 424, 1559 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 1560 156, 157, 427, 428, 429, 430, 431, 432, 433, 434, 1561 435, 436, 437, 438, 439, 108, 442, 443, 205, 206, 1562 207, 208, 209, 210, 211, 212, 213, 450, 451, 452, 1563 453, 454, 455, 456, 457, 458, 459, 221, 222, 462, 1564 463, 464, 10, 10, 10, 10, 10, 10, 10, 10, 1565 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1566 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1567 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1568 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1569 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1570 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1571 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1572 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1573 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1574 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1575 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1576 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1577 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1578 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1579 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1580 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1581 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1582 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1583 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1584 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1585 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1586 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1587 10, 10 1588 }; 1589 1590 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 1591 static const yytype_uint16 yyr1[] = 1592 { 1593 0, 224, 225, 225, 226, 226, 226, 226, 226, 226, 1594 226, 226, 226, 227, 228, 228, 229, 229, 229, 229, 1595 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1596 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1597 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1598 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1599 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1600 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1601 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1602 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1603 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1604 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1605 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1606 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1607 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1608 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1609 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 1610 229, 229, 229, 229, 229, 229, 229, 230, 231, 231, 1611 232, 232, 232, 232, 232, 232, 233, 234, 234, 235, 1612 235, 235, 235, 235, 236, 237, 237, 238, 238, 238, 1613 238, 238, 238, 238, 239, 240, 241, 242, 243, 244, 1614 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 1615 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 1616 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 1617 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 1618 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 1619 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 1620 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 1621 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 1622 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 1623 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 1624 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 1625 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 1626 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 1627 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 1628 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 1629 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 1630 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 1631 415, 415, 416, 416, 416, 416, 416, 416, 416, 416, 1632 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 1633 426, 427, 427, 427, 427, 427, 427, 427, 427, 427, 1634 427, 427, 427, 428, 429, 430, 431, 432, 433, 434, 1635 435, 436, 437, 438, 439, 440, 441, 441, 442, 443, 1636 444, 445, 446, 447, 448, 449, 449, 450, 450, 450, 1637 450, 450, 450, 450, 450, 450, 451, 452, 453, 454, 1638 455, 456, 457, 458, 459, 460, 461, 461, 462, 462, 1639 463, 464 1640 }; 1641 1642 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ 1643 static const yytype_uint8 yyr2[] = 1644 { 1645 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1646 2, 2, 2, 1, 2, 0, 1, 1, 1, 1, 1647 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1648 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1649 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1650 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1651 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1652 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1653 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1654 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1655 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1656 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1657 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1658 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1659 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1660 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1661 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1662 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1663 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1664 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1665 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1666 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1667 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1668 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1669 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1670 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1671 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1672 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1673 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1674 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1675 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 1676 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1677 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 1678 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 1679 4, 3, 3, 2, 2, 2, 2, 2, 2, 3, 1680 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1681 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1682 2, 2, 2, 3, 3, 3, 2, 2, 2, 1, 1683 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1684 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1685 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1686 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1687 2, 2, 2, 2, 2, 1, 2, 0, 1, 2, 1688 2, 2, 3, 3, 1, 2, 0, 1, 1, 1, 1689 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1690 2, 2, 2, 2, 2, 1, 2, 0, 1, 1, 1691 2, 2 1692 }; 1693 1694 1695 #define yyerrok (yyerrstatus = 0) 1696 #define yyclearin (yychar = YYEMPTY) 1697 #define YYEMPTY (-2) 1698 #define YYEOF 0 1699 1700 #define YYACCEPT goto yyacceptlab 1701 #define YYABORT goto yyabortlab 1702 #define YYERROR goto yyerrorlab 1703 1704 1705 #define YYRECOVERING() (!!yyerrstatus) 1706 1707 #define YYBACKUP(Token, Value) \ 1708 do \ 1709 if (yychar == YYEMPTY) \ 1710 { \ 1711 yychar = (Token); \ 1712 yylval = (Value); \ 1713 YYPOPSTACK (yylen); \ 1714 yystate = *yyssp; \ 1715 goto yybackup; \ 1716 } \ 1717 else \ 1718 { \ 1719 yyerror (YY_("syntax error: cannot back up")); \ 1720 YYERROR; \ 1721 } \ 1722 while (0) 1723 1724 /* Error token number */ 1725 #define YYTERROR 1 1726 #define YYERRCODE 256 1727 1728 1729 1730 /* Enable debugging if requested. */ 1731 #if YYDEBUG 1732 1733 # ifndef YYFPRINTF 1734 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 1735 # define YYFPRINTF fprintf 1736 # endif 1737 1738 # define YYDPRINTF(Args) \ 1739 do { \ 1740 if (yydebug) \ 1741 YYFPRINTF Args; \ 1742 } while (0) 1743 1744 /* This macro is provided for backward compatibility. */ 1745 #ifndef YY_LOCATION_PRINT 1746 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 1747 #endif 1748 1749 1750 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 1751 do { \ 1752 if (yydebug) \ 1753 { \ 1754 YYFPRINTF (stderr, "%s ", Title); \ 1755 yy_symbol_print (stderr, \ 1756 Type, Value); \ 1757 YYFPRINTF (stderr, "\n"); \ 1758 } \ 1759 } while (0) 1760 1761 1762 /*----------------------------------------. 1763 | Print this symbol's value on YYOUTPUT. | 1764 `----------------------------------------*/ 1765 1766 static void 1767 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1768 { 1769 FILE *yyo = yyoutput; 1770 YYUSE (yyo); 1771 if (!yyvaluep) 1772 return; 1773 # ifdef YYPRINT 1774 if (yytype < YYNTOKENS) 1775 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1776 # endif 1777 YYUSE (yytype); 1778 } 1779 1780 1781 /*--------------------------------. 1782 | Print this symbol on YYOUTPUT. | 1783 `--------------------------------*/ 1784 1785 static void 1786 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1787 { 1788 YYFPRINTF (yyoutput, "%s %s (", 1789 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); 1790 1791 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 1792 YYFPRINTF (yyoutput, ")"); 1793 } 1794 1795 /*------------------------------------------------------------------. 1796 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 1797 | TOP (included). | 1798 `------------------------------------------------------------------*/ 1799 1800 static void 1801 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 1802 { 1803 YYFPRINTF (stderr, "Stack now"); 1804 for (; yybottom <= yytop; yybottom++) 1805 { 1806 int yybot = *yybottom; 1807 YYFPRINTF (stderr, " %d", yybot); 1808 } 1809 YYFPRINTF (stderr, "\n"); 1810 } 1811 1812 # define YY_STACK_PRINT(Bottom, Top) \ 1813 do { \ 1814 if (yydebug) \ 1815 yy_stack_print ((Bottom), (Top)); \ 1816 } while (0) 1817 1818 1819 /*------------------------------------------------. 1820 | Report that the YYRULE is going to be reduced. | 1821 `------------------------------------------------*/ 1822 1823 static void 1824 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) 1825 { 1826 unsigned long int yylno = yyrline[yyrule]; 1827 int yynrhs = yyr2[yyrule]; 1828 int yyi; 1829 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 1830 yyrule - 1, yylno); 1831 /* The symbols being reduced. */ 1832 for (yyi = 0; yyi < yynrhs; yyi++) 1833 { 1834 YYFPRINTF (stderr, " $%d = ", yyi + 1); 1835 yy_symbol_print (stderr, 1836 yystos[yyssp[yyi + 1 - yynrhs]], 1837 &(yyvsp[(yyi + 1) - (yynrhs)]) 1838 ); 1839 YYFPRINTF (stderr, "\n"); 1840 } 1841 } 1842 1843 # define YY_REDUCE_PRINT(Rule) \ 1844 do { \ 1845 if (yydebug) \ 1846 yy_reduce_print (yyssp, yyvsp, Rule); \ 1847 } while (0) 1848 1849 /* Nonzero means print parse trace. It is left uninitialized so that 1850 multiple parsers can coexist. */ 1851 int yydebug; 1852 #else /* !YYDEBUG */ 1853 # define YYDPRINTF(Args) 1854 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 1855 # define YY_STACK_PRINT(Bottom, Top) 1856 # define YY_REDUCE_PRINT(Rule) 1857 #endif /* !YYDEBUG */ 1858 1859 1860 /* YYINITDEPTH -- initial size of the parser's stacks. */ 1861 #ifndef YYINITDEPTH 1862 # define YYINITDEPTH 200 1863 #endif 1864 1865 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 1866 if the built-in stack extension method is used). 1867 1868 Do not make this value too large; the results are undefined if 1869 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 1870 evaluated with infinite-precision integer arithmetic. */ 1871 1872 #ifndef YYMAXDEPTH 1873 # define YYMAXDEPTH 10000 1874 #endif 1875 1876 1877 #if YYERROR_VERBOSE 1878 1879 # ifndef yystrlen 1880 # if defined __GLIBC__ && defined _STRING_H 1881 # define yystrlen strlen 1882 # else 1883 /* Return the length of YYSTR. */ 1884 static YYSIZE_T 1885 yystrlen (const char *yystr) 1886 { 1887 YYSIZE_T yylen; 1888 for (yylen = 0; yystr[yylen]; yylen++) 1889 continue; 1890 return yylen; 1891 } 1892 # endif 1893 # endif 1894 1895 # ifndef yystpcpy 1896 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1897 # define yystpcpy stpcpy 1898 # else 1899 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1900 YYDEST. */ 1901 static char * 1902 yystpcpy (char *yydest, const char *yysrc) 1903 { 1904 char *yyd = yydest; 1905 const char *yys = yysrc; 1906 1907 while ((*yyd++ = *yys++) != '\0') 1908 continue; 1909 1910 return yyd - 1; 1911 } 1912 # endif 1913 # endif 1914 1915 # ifndef yytnamerr 1916 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1917 quotes and backslashes, so that it's suitable for yyerror. The 1918 heuristic is that double-quoting is unnecessary unless the string 1919 contains an apostrophe, a comma, or backslash (other than 1920 backslash-backslash). YYSTR is taken from yytname. If YYRES is 1921 null, do not copy; instead, return the length of what the result 1922 would have been. */ 1923 static YYSIZE_T 1924 yytnamerr (char *yyres, const char *yystr) 1925 { 1926 if (*yystr == '"') 1927 { 1928 YYSIZE_T yyn = 0; 1929 char const *yyp = yystr; 1930 1931 for (;;) 1932 switch (*++yyp) 1933 { 1934 case '\'': 1935 case ',': 1936 goto do_not_strip_quotes; 1937 1938 case '\\': 1939 if (*++yyp != '\\') 1940 goto do_not_strip_quotes; 1941 /* Fall through. */ 1942 default: 1943 if (yyres) 1944 yyres[yyn] = *yyp; 1945 yyn++; 1946 break; 1947 1948 case '"': 1949 if (yyres) 1950 yyres[yyn] = '\0'; 1951 return yyn; 1952 } 1953 do_not_strip_quotes: ; 1954 } 1955 1956 if (! yyres) 1957 return yystrlen (yystr); 1958 1959 return yystpcpy (yyres, yystr) - yyres; 1960 } 1961 # endif 1962 1963 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 1964 about the unexpected token YYTOKEN for the state stack whose top is 1965 YYSSP. 1966 1967 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 1968 not large enough to hold the message. In that case, also set 1969 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 1970 required number of bytes is too large to store. */ 1971 static int 1972 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 1973 yytype_int16 *yyssp, int yytoken) 1974 { 1975 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); 1976 YYSIZE_T yysize = yysize0; 1977 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1978 /* Internationalized format string. */ 1979 const char *yyformat = YY_NULLPTR; 1980 /* Arguments of yyformat. */ 1981 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1982 /* Number of reported tokens (one for the "unexpected", one per 1983 "expected"). */ 1984 int yycount = 0; 1985 1986 /* There are many possibilities here to consider: 1987 - If this state is a consistent state with a default action, then 1988 the only way this function was invoked is if the default action 1989 is an error action. In that case, don't check for expected 1990 tokens because there are none. 1991 - The only way there can be no lookahead present (in yychar) is if 1992 this state is a consistent state with a default action. Thus, 1993 detecting the absence of a lookahead is sufficient to determine 1994 that there is no unexpected or expected token to report. In that 1995 case, just report a simple "syntax error". 1996 - Don't assume there isn't a lookahead just because this state is a 1997 consistent state with a default action. There might have been a 1998 previous inconsistent state, consistent state with a non-default 1999 action, or user semantic action that manipulated yychar. 2000 - Of course, the expected token list depends on states to have 2001 correct lookahead information, and it depends on the parser not 2002 to perform extra reductions after fetching a lookahead from the 2003 scanner and before detecting a syntax error. Thus, state merging 2004 (from LALR or IELR) and default reductions corrupt the expected 2005 token list. However, the list is correct for canonical LR with 2006 one exception: it will still contain any token that will not be 2007 accepted due to an error action in a later state. 2008 */ 2009 if (yytoken != YYEMPTY) 2010 { 2011 int yyn = yypact[*yyssp]; 2012 yyarg[yycount++] = yytname[yytoken]; 2013 if (!yypact_value_is_default (yyn)) 2014 { 2015 /* Start YYX at -YYN if negative to avoid negative indexes in 2016 YYCHECK. In other words, skip the first -YYN actions for 2017 this state because they are default actions. */ 2018 int yyxbegin = yyn < 0 ? -yyn : 0; 2019 /* Stay within bounds of both yycheck and yytname. */ 2020 int yychecklim = YYLAST - yyn + 1; 2021 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 2022 int yyx; 2023 2024 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 2025 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 2026 && !yytable_value_is_error (yytable[yyx + yyn])) 2027 { 2028 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 2029 { 2030 yycount = 1; 2031 yysize = yysize0; 2032 break; 2033 } 2034 yyarg[yycount++] = yytname[yyx]; 2035 { 2036 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); 2037 if (! (yysize <= yysize1 2038 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 2039 return 2; 2040 yysize = yysize1; 2041 } 2042 } 2043 } 2044 } 2045 2046 switch (yycount) 2047 { 2048 # define YYCASE_(N, S) \ 2049 case N: \ 2050 yyformat = S; \ 2051 break 2052 YYCASE_(0, YY_("syntax error")); 2053 YYCASE_(1, YY_("syntax error, unexpected %s")); 2054 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 2055 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 2056 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 2057 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 2058 # undef YYCASE_ 2059 } 2060 2061 { 2062 YYSIZE_T yysize1 = yysize + yystrlen (yyformat); 2063 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 2064 return 2; 2065 yysize = yysize1; 2066 } 2067 2068 if (*yymsg_alloc < yysize) 2069 { 2070 *yymsg_alloc = 2 * yysize; 2071 if (! (yysize <= *yymsg_alloc 2072 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 2073 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 2074 return 1; 2075 } 2076 2077 /* Avoid sprintf, as that infringes on the user's name space. 2078 Don't have undefined behavior even if the translation 2079 produced a string with the wrong number of "%s"s. */ 2080 { 2081 char *yyp = *yymsg; 2082 int yyi = 0; 2083 while ((*yyp = *yyformat) != '\0') 2084 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 2085 { 2086 yyp += yytnamerr (yyp, yyarg[yyi++]); 2087 yyformat += 2; 2088 } 2089 else 2090 { 2091 yyp++; 2092 yyformat++; 2093 } 2094 } 2095 return 0; 2096 } 2097 #endif /* YYERROR_VERBOSE */ 2098 2099 /*-----------------------------------------------. 2100 | Release the memory associated to this symbol. | 2101 `-----------------------------------------------*/ 2102 2103 static void 2104 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 2105 { 2106 YYUSE (yyvaluep); 2107 if (!yymsg) 2108 yymsg = "Deleting"; 2109 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 2110 2111 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 2112 YYUSE (yytype); 2113 YY_IGNORE_MAYBE_UNINITIALIZED_END 2114 } 2115 2116 2117 2118 2119 /* The lookahead symbol. */ 2120 int yychar; 2121 2122 /* The semantic value of the lookahead symbol. */ 2123 YYSTYPE yylval; 2124 /* Number of syntax errors so far. */ 2125 int yynerrs; 2126 2127 2128 /*----------. 2129 | yyparse. | 2130 `----------*/ 2131 2132 int 2133 yyparse (void) 2134 { 2135 int yystate; 2136 /* Number of tokens to shift before error messages enabled. */ 2137 int yyerrstatus; 2138 2139 /* The stacks and their tools: 2140 'yyss': related to states. 2141 'yyvs': related to semantic values. 2142 2143 Refer to the stacks through separate pointers, to allow yyoverflow 2144 to reallocate them elsewhere. */ 2145 2146 /* The state stack. */ 2147 yytype_int16 yyssa[YYINITDEPTH]; 2148 yytype_int16 *yyss; 2149 yytype_int16 *yyssp; 2150 2151 /* The semantic value stack. */ 2152 YYSTYPE yyvsa[YYINITDEPTH]; 2153 YYSTYPE *yyvs; 2154 YYSTYPE *yyvsp; 2155 2156 YYSIZE_T yystacksize; 2157 2158 int yyn; 2159 int yyresult; 2160 /* Lookahead token as an internal (translated) token number. */ 2161 int yytoken = 0; 2162 /* The variables used to return semantic value and location from the 2163 action routines. */ 2164 YYSTYPE yyval; 2165 2166 #if YYERROR_VERBOSE 2167 /* Buffer for error messages, and its allocated size. */ 2168 char yymsgbuf[128]; 2169 char *yymsg = yymsgbuf; 2170 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 2171 #endif 2172 2173 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 2174 2175 /* The number of symbols on the RHS of the reduced rule. 2176 Keep to zero when no symbol should be popped. */ 2177 int yylen = 0; 2178 2179 yyssp = yyss = yyssa; 2180 yyvsp = yyvs = yyvsa; 2181 yystacksize = YYINITDEPTH; 2182 2183 YYDPRINTF ((stderr, "Starting parse\n")); 2184 2185 yystate = 0; 2186 yyerrstatus = 0; 2187 yynerrs = 0; 2188 yychar = YYEMPTY; /* Cause a token to be read. */ 2189 goto yysetstate; 2190 2191 /*------------------------------------------------------------. 2192 | yynewstate -- Push a new state, which is found in yystate. | 2193 `------------------------------------------------------------*/ 2194 yynewstate: 2195 /* In all cases, when you get here, the value and location stacks 2196 have just been pushed. So pushing a state here evens the stacks. */ 2197 yyssp++; 2198 2199 yysetstate: 2200 *yyssp = yystate; 2201 2202 if (yyss + yystacksize - 1 <= yyssp) 2203 { 2204 /* Get the current used size of the three stacks, in elements. */ 2205 YYSIZE_T yysize = yyssp - yyss + 1; 2206 2207 #ifdef yyoverflow 2208 { 2209 /* Give user a chance to reallocate the stack. Use copies of 2210 these so that the &'s don't force the real ones into 2211 memory. */ 2212 YYSTYPE *yyvs1 = yyvs; 2213 yytype_int16 *yyss1 = yyss; 2214 2215 /* Each stack pointer address is followed by the size of the 2216 data in use in that stack, in bytes. This used to be a 2217 conditional around just the two extra args, but that might 2218 be undefined if yyoverflow is a macro. */ 2219 yyoverflow (YY_("memory exhausted"), 2220 &yyss1, yysize * sizeof (*yyssp), 2221 &yyvs1, yysize * sizeof (*yyvsp), 2222 &yystacksize); 2223 2224 yyss = yyss1; 2225 yyvs = yyvs1; 2226 } 2227 #else /* no yyoverflow */ 2228 # ifndef YYSTACK_RELOCATE 2229 goto yyexhaustedlab; 2230 # else 2231 /* Extend the stack our own way. */ 2232 if (YYMAXDEPTH <= yystacksize) 2233 goto yyexhaustedlab; 2234 yystacksize *= 2; 2235 if (YYMAXDEPTH < yystacksize) 2236 yystacksize = YYMAXDEPTH; 2237 2238 { 2239 yytype_int16 *yyss1 = yyss; 2240 union yyalloc *yyptr = 2241 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 2242 if (! yyptr) 2243 goto yyexhaustedlab; 2244 YYSTACK_RELOCATE (yyss_alloc, yyss); 2245 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 2246 # undef YYSTACK_RELOCATE 2247 if (yyss1 != yyssa) 2248 YYSTACK_FREE (yyss1); 2249 } 2250 # endif 2251 #endif /* no yyoverflow */ 2252 2253 yyssp = yyss + yysize - 1; 2254 yyvsp = yyvs + yysize - 1; 2255 2256 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 2257 (unsigned long int) yystacksize)); 2258 2259 if (yyss + yystacksize - 1 <= yyssp) 2260 YYABORT; 2261 } 2262 2263 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 2264 2265 if (yystate == YYFINAL) 2266 YYACCEPT; 2267 2268 goto yybackup; 2269 2270 /*-----------. 2271 | yybackup. | 2272 `-----------*/ 2273 yybackup: 2274 2275 /* Do appropriate processing given the current state. Read a 2276 lookahead token if we need one and don't already have one. */ 2277 2278 /* First try to decide what to do without reference to lookahead token. */ 2279 yyn = yypact[yystate]; 2280 if (yypact_value_is_default (yyn)) 2281 goto yydefault; 2282 2283 /* Not known => get a lookahead token if don't already have one. */ 2284 2285 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 2286 if (yychar == YYEMPTY) 2287 { 2288 YYDPRINTF ((stderr, "Reading a token: ")); 2289 yychar = yylex (); 2290 } 2291 2292 if (yychar <= YYEOF) 2293 { 2294 yychar = yytoken = YYEOF; 2295 YYDPRINTF ((stderr, "Now at end of input.\n")); 2296 } 2297 else 2298 { 2299 yytoken = YYTRANSLATE (yychar); 2300 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 2301 } 2302 2303 /* If the proper action on seeing token YYTOKEN is to reduce or to 2304 detect an error, take that action. */ 2305 yyn += yytoken; 2306 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 2307 goto yydefault; 2308 yyn = yytable[yyn]; 2309 if (yyn <= 0) 2310 { 2311 if (yytable_value_is_error (yyn)) 2312 goto yyerrlab; 2313 yyn = -yyn; 2314 goto yyreduce; 2315 } 2316 2317 /* Count tokens shifted since error; after three, turn off error 2318 status. */ 2319 if (yyerrstatus) 2320 yyerrstatus--; 2321 2322 /* Shift the lookahead token. */ 2323 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 2324 2325 /* Discard the shifted token. */ 2326 yychar = YYEMPTY; 2327 2328 yystate = yyn; 2329 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 2330 *++yyvsp = yylval; 2331 YY_IGNORE_MAYBE_UNINITIALIZED_END 2332 2333 goto yynewstate; 2334 2335 2336 /*-----------------------------------------------------------. 2337 | yydefault -- do the default action for the current state. | 2338 `-----------------------------------------------------------*/ 2339 yydefault: 2340 yyn = yydefact[yystate]; 2341 if (yyn == 0) 2342 goto yyerrlab; 2343 goto yyreduce; 2344 2345 2346 /*-----------------------------. 2347 | yyreduce -- Do a reduction. | 2348 `-----------------------------*/ 2349 yyreduce: 2350 /* yyn is the number of a rule to reduce with. */ 2351 yylen = yyr2[yyn]; 2352 2353 /* If YYLEN is nonzero, implement the default value of the action: 2354 '$$ = $1'. 2355 2356 Otherwise, the following line sets YYVAL to garbage. 2357 This behavior is undocumented and Bison 2358 users should not rely upon it. Assigning to YYVAL 2359 unconditionally makes the parser a bit smaller, and it avoids a 2360 GCC warning that YYVAL may be used uninitialized. */ 2361 yyval = yyvsp[1-yylen]; 2362 2363 2364 YY_REDUCE_PRINT (yyn); 2365 switch (yyn) 2366 { 2367 case 13: 2368 #line 168 "util/configparser.y" /* yacc.c:1646 */ 2369 { 2370 OUTYY(("\nP(server:)\n")); 2371 } 2372 #line 2373 "util/configparser.c" /* yacc.c:1646 */ 2373 break; 2374 2375 case 177: 2376 #line 247 "util/configparser.y" /* yacc.c:1646 */ 2377 { 2378 struct config_stub* s; 2379 OUTYY(("\nP(stub_zone:)\n")); 2380 s = (struct config_stub*)calloc(1, sizeof(struct config_stub)); 2381 if(s) { 2382 s->next = cfg_parser->cfg->stubs; 2383 cfg_parser->cfg->stubs = s; 2384 } else 2385 yyerror("out of memory"); 2386 } 2387 #line 2388 "util/configparser.c" /* yacc.c:1646 */ 2388 break; 2389 2390 case 186: 2391 #line 264 "util/configparser.y" /* yacc.c:1646 */ 2392 { 2393 struct config_stub* s; 2394 OUTYY(("\nP(forward_zone:)\n")); 2395 s = (struct config_stub*)calloc(1, sizeof(struct config_stub)); 2396 if(s) { 2397 s->next = cfg_parser->cfg->forwards; 2398 cfg_parser->cfg->forwards = s; 2399 } else 2400 yyerror("out of memory"); 2401 } 2402 #line 2403 "util/configparser.c" /* yacc.c:1646 */ 2403 break; 2404 2405 case 194: 2406 #line 281 "util/configparser.y" /* yacc.c:1646 */ 2407 { 2408 struct config_view* s; 2409 OUTYY(("\nP(view:)\n")); 2410 s = (struct config_view*)calloc(1, sizeof(struct config_view)); 2411 if(s) { 2412 s->next = cfg_parser->cfg->views; 2413 if(s->next && !s->next->name) 2414 yyerror("view without name"); 2415 cfg_parser->cfg->views = s; 2416 } else 2417 yyerror("out of memory"); 2418 } 2419 #line 2420 "util/configparser.c" /* yacc.c:1646 */ 2420 break; 2421 2422 case 204: 2423 #line 300 "util/configparser.y" /* yacc.c:1646 */ 2424 { 2425 OUTYY(("P(server_num_threads:%s)\n", (yyvsp[0].str))); 2426 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 2427 yyerror("number expected"); 2428 else cfg_parser->cfg->num_threads = atoi((yyvsp[0].str)); 2429 free((yyvsp[0].str)); 2430 } 2431 #line 2432 "util/configparser.c" /* yacc.c:1646 */ 2432 break; 2433 2434 case 205: 2435 #line 309 "util/configparser.y" /* yacc.c:1646 */ 2436 { 2437 OUTYY(("P(server_verbosity:%s)\n", (yyvsp[0].str))); 2438 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 2439 yyerror("number expected"); 2440 else cfg_parser->cfg->verbosity = atoi((yyvsp[0].str)); 2441 free((yyvsp[0].str)); 2442 } 2443 #line 2444 "util/configparser.c" /* yacc.c:1646 */ 2444 break; 2445 2446 case 206: 2447 #line 318 "util/configparser.y" /* yacc.c:1646 */ 2448 { 2449 OUTYY(("P(server_statistics_interval:%s)\n", (yyvsp[0].str))); 2450 if(strcmp((yyvsp[0].str), "") == 0 || strcmp((yyvsp[0].str), "0") == 0) 2451 cfg_parser->cfg->stat_interval = 0; 2452 else if(atoi((yyvsp[0].str)) == 0) 2453 yyerror("number expected"); 2454 else cfg_parser->cfg->stat_interval = atoi((yyvsp[0].str)); 2455 free((yyvsp[0].str)); 2456 } 2457 #line 2458 "util/configparser.c" /* yacc.c:1646 */ 2458 break; 2459 2460 case 207: 2461 #line 329 "util/configparser.y" /* yacc.c:1646 */ 2462 { 2463 OUTYY(("P(server_statistics_cumulative:%s)\n", (yyvsp[0].str))); 2464 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2465 yyerror("expected yes or no."); 2466 else cfg_parser->cfg->stat_cumulative = (strcmp((yyvsp[0].str), "yes")==0); 2467 free((yyvsp[0].str)); 2468 } 2469 #line 2470 "util/configparser.c" /* yacc.c:1646 */ 2470 break; 2471 2472 case 208: 2473 #line 338 "util/configparser.y" /* yacc.c:1646 */ 2474 { 2475 OUTYY(("P(server_extended_statistics:%s)\n", (yyvsp[0].str))); 2476 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2477 yyerror("expected yes or no."); 2478 else cfg_parser->cfg->stat_extended = (strcmp((yyvsp[0].str), "yes")==0); 2479 free((yyvsp[0].str)); 2480 } 2481 #line 2482 "util/configparser.c" /* yacc.c:1646 */ 2482 break; 2483 2484 case 209: 2485 #line 347 "util/configparser.y" /* yacc.c:1646 */ 2486 { 2487 OUTYY(("P(server_shm_enable:%s)\n", (yyvsp[0].str))); 2488 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2489 yyerror("expected yes or no."); 2490 else cfg_parser->cfg->shm_enable = (strcmp((yyvsp[0].str), "yes")==0); 2491 free((yyvsp[0].str)); 2492 } 2493 #line 2494 "util/configparser.c" /* yacc.c:1646 */ 2494 break; 2495 2496 case 210: 2497 #line 356 "util/configparser.y" /* yacc.c:1646 */ 2498 { 2499 OUTYY(("P(server_shm_key:%s)\n", (yyvsp[0].str))); 2500 if(strcmp((yyvsp[0].str), "") == 0 || strcmp((yyvsp[0].str), "0") == 0) 2501 cfg_parser->cfg->shm_key = 0; 2502 else if(atoi((yyvsp[0].str)) == 0) 2503 yyerror("number expected"); 2504 else cfg_parser->cfg->shm_key = atoi((yyvsp[0].str)); 2505 free((yyvsp[0].str)); 2506 } 2507 #line 2508 "util/configparser.c" /* yacc.c:1646 */ 2508 break; 2509 2510 case 211: 2511 #line 367 "util/configparser.y" /* yacc.c:1646 */ 2512 { 2513 OUTYY(("P(server_port:%s)\n", (yyvsp[0].str))); 2514 if(atoi((yyvsp[0].str)) == 0) 2515 yyerror("port number expected"); 2516 else cfg_parser->cfg->port = atoi((yyvsp[0].str)); 2517 free((yyvsp[0].str)); 2518 } 2519 #line 2520 "util/configparser.c" /* yacc.c:1646 */ 2520 break; 2521 2522 case 212: 2523 #line 376 "util/configparser.y" /* yacc.c:1646 */ 2524 { 2525 #ifdef CLIENT_SUBNET 2526 OUTYY(("P(server_send_client_subnet:%s)\n", (yyvsp[0].str))); 2527 if(!cfg_strlist_insert(&cfg_parser->cfg->client_subnet, (yyvsp[0].str))) 2528 fatal_exit("out of memory adding client-subnet"); 2529 #else 2530 OUTYY(("P(Compiled without edns subnet option, ignoring)\n")); 2531 #endif 2532 } 2533 #line 2534 "util/configparser.c" /* yacc.c:1646 */ 2534 break; 2535 2536 case 213: 2537 #line 387 "util/configparser.y" /* yacc.c:1646 */ 2538 { 2539 #ifdef CLIENT_SUBNET 2540 OUTYY(("P(server_client_subnet_zone:%s)\n", (yyvsp[0].str))); 2541 if(!cfg_strlist_insert(&cfg_parser->cfg->client_subnet_zone, 2542 (yyvsp[0].str))) 2543 fatal_exit("out of memory adding client-subnet-zone"); 2544 #else 2545 OUTYY(("P(Compiled without edns subnet option, ignoring)\n")); 2546 #endif 2547 } 2548 #line 2549 "util/configparser.c" /* yacc.c:1646 */ 2549 break; 2550 2551 case 214: 2552 #line 400 "util/configparser.y" /* yacc.c:1646 */ 2553 { 2554 #ifdef CLIENT_SUBNET 2555 OUTYY(("P(server_client_subnet_always_forward:%s)\n", (yyvsp[0].str))); 2556 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2557 yyerror("expected yes or no."); 2558 else 2559 cfg_parser->cfg->client_subnet_always_forward = 2560 (strcmp((yyvsp[0].str), "yes")==0); 2561 #else 2562 OUTYY(("P(Compiled without edns subnet option, ignoring)\n")); 2563 #endif 2564 free((yyvsp[0].str)); 2565 } 2566 #line 2567 "util/configparser.c" /* yacc.c:1646 */ 2567 break; 2568 2569 case 215: 2570 #line 415 "util/configparser.y" /* yacc.c:1646 */ 2571 { 2572 #ifdef CLIENT_SUBNET 2573 OUTYY(("P(client_subnet_opcode:%s)\n", (yyvsp[0].str))); 2574 OUTYY(("P(Deprecated option, ignoring)\n")); 2575 #else 2576 OUTYY(("P(Compiled without edns subnet option, ignoring)\n")); 2577 #endif 2578 free((yyvsp[0].str)); 2579 } 2580 #line 2581 "util/configparser.c" /* yacc.c:1646 */ 2581 break; 2582 2583 case 216: 2584 #line 426 "util/configparser.y" /* yacc.c:1646 */ 2585 { 2586 #ifdef CLIENT_SUBNET 2587 OUTYY(("P(max_client_subnet_ipv4:%s)\n", (yyvsp[0].str))); 2588 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 2589 yyerror("IPv4 subnet length expected"); 2590 else if (atoi((yyvsp[0].str)) > 32) 2591 cfg_parser->cfg->max_client_subnet_ipv4 = 32; 2592 else if (atoi((yyvsp[0].str)) < 0) 2593 cfg_parser->cfg->max_client_subnet_ipv4 = 0; 2594 else cfg_parser->cfg->max_client_subnet_ipv4 = (uint8_t)atoi((yyvsp[0].str)); 2595 #else 2596 OUTYY(("P(Compiled without edns subnet option, ignoring)\n")); 2597 #endif 2598 free((yyvsp[0].str)); 2599 } 2600 #line 2601 "util/configparser.c" /* yacc.c:1646 */ 2601 break; 2602 2603 case 217: 2604 #line 443 "util/configparser.y" /* yacc.c:1646 */ 2605 { 2606 #ifdef CLIENT_SUBNET 2607 OUTYY(("P(max_client_subnet_ipv6:%s)\n", (yyvsp[0].str))); 2608 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 2609 yyerror("Ipv6 subnet length expected"); 2610 else if (atoi((yyvsp[0].str)) > 128) 2611 cfg_parser->cfg->max_client_subnet_ipv6 = 128; 2612 else if (atoi((yyvsp[0].str)) < 0) 2613 cfg_parser->cfg->max_client_subnet_ipv6 = 0; 2614 else cfg_parser->cfg->max_client_subnet_ipv6 = (uint8_t)atoi((yyvsp[0].str)); 2615 #else 2616 OUTYY(("P(Compiled without edns subnet option, ignoring)\n")); 2617 #endif 2618 free((yyvsp[0].str)); 2619 } 2620 #line 2621 "util/configparser.c" /* yacc.c:1646 */ 2621 break; 2622 2623 case 218: 2624 #line 460 "util/configparser.y" /* yacc.c:1646 */ 2625 { 2626 OUTYY(("P(server_interface:%s)\n", (yyvsp[0].str))); 2627 if(cfg_parser->cfg->num_ifs == 0) 2628 cfg_parser->cfg->ifs = calloc(1, sizeof(char*)); 2629 else cfg_parser->cfg->ifs = realloc(cfg_parser->cfg->ifs, 2630 (cfg_parser->cfg->num_ifs+1)*sizeof(char*)); 2631 if(!cfg_parser->cfg->ifs) 2632 yyerror("out of memory"); 2633 else 2634 cfg_parser->cfg->ifs[cfg_parser->cfg->num_ifs++] = (yyvsp[0].str); 2635 } 2636 #line 2637 "util/configparser.c" /* yacc.c:1646 */ 2637 break; 2638 2639 case 219: 2640 #line 473 "util/configparser.y" /* yacc.c:1646 */ 2641 { 2642 OUTYY(("P(server_outgoing_interface:%s)\n", (yyvsp[0].str))); 2643 if(cfg_parser->cfg->num_out_ifs == 0) 2644 cfg_parser->cfg->out_ifs = calloc(1, sizeof(char*)); 2645 else cfg_parser->cfg->out_ifs = realloc( 2646 cfg_parser->cfg->out_ifs, 2647 (cfg_parser->cfg->num_out_ifs+1)*sizeof(char*)); 2648 if(!cfg_parser->cfg->out_ifs) 2649 yyerror("out of memory"); 2650 else 2651 cfg_parser->cfg->out_ifs[ 2652 cfg_parser->cfg->num_out_ifs++] = (yyvsp[0].str); 2653 } 2654 #line 2655 "util/configparser.c" /* yacc.c:1646 */ 2655 break; 2656 2657 case 220: 2658 #line 488 "util/configparser.y" /* yacc.c:1646 */ 2659 { 2660 OUTYY(("P(server_outgoing_range:%s)\n", (yyvsp[0].str))); 2661 if(atoi((yyvsp[0].str)) == 0) 2662 yyerror("number expected"); 2663 else cfg_parser->cfg->outgoing_num_ports = atoi((yyvsp[0].str)); 2664 free((yyvsp[0].str)); 2665 } 2666 #line 2667 "util/configparser.c" /* yacc.c:1646 */ 2667 break; 2668 2669 case 221: 2670 #line 497 "util/configparser.y" /* yacc.c:1646 */ 2671 { 2672 OUTYY(("P(server_outgoing_port_permit:%s)\n", (yyvsp[0].str))); 2673 if(!cfg_mark_ports((yyvsp[0].str), 1, 2674 cfg_parser->cfg->outgoing_avail_ports, 65536)) 2675 yyerror("port number or range (\"low-high\") expected"); 2676 free((yyvsp[0].str)); 2677 } 2678 #line 2679 "util/configparser.c" /* yacc.c:1646 */ 2679 break; 2680 2681 case 222: 2682 #line 506 "util/configparser.y" /* yacc.c:1646 */ 2683 { 2684 OUTYY(("P(server_outgoing_port_avoid:%s)\n", (yyvsp[0].str))); 2685 if(!cfg_mark_ports((yyvsp[0].str), 0, 2686 cfg_parser->cfg->outgoing_avail_ports, 65536)) 2687 yyerror("port number or range (\"low-high\") expected"); 2688 free((yyvsp[0].str)); 2689 } 2690 #line 2691 "util/configparser.c" /* yacc.c:1646 */ 2691 break; 2692 2693 case 223: 2694 #line 515 "util/configparser.y" /* yacc.c:1646 */ 2695 { 2696 OUTYY(("P(server_outgoing_num_tcp:%s)\n", (yyvsp[0].str))); 2697 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 2698 yyerror("number expected"); 2699 else cfg_parser->cfg->outgoing_num_tcp = atoi((yyvsp[0].str)); 2700 free((yyvsp[0].str)); 2701 } 2702 #line 2703 "util/configparser.c" /* yacc.c:1646 */ 2703 break; 2704 2705 case 224: 2706 #line 524 "util/configparser.y" /* yacc.c:1646 */ 2707 { 2708 OUTYY(("P(server_incoming_num_tcp:%s)\n", (yyvsp[0].str))); 2709 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 2710 yyerror("number expected"); 2711 else cfg_parser->cfg->incoming_num_tcp = atoi((yyvsp[0].str)); 2712 free((yyvsp[0].str)); 2713 } 2714 #line 2715 "util/configparser.c" /* yacc.c:1646 */ 2715 break; 2716 2717 case 225: 2718 #line 533 "util/configparser.y" /* yacc.c:1646 */ 2719 { 2720 OUTYY(("P(server_interface_automatic:%s)\n", (yyvsp[0].str))); 2721 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2722 yyerror("expected yes or no."); 2723 else cfg_parser->cfg->if_automatic = (strcmp((yyvsp[0].str), "yes")==0); 2724 free((yyvsp[0].str)); 2725 } 2726 #line 2727 "util/configparser.c" /* yacc.c:1646 */ 2727 break; 2728 2729 case 226: 2730 #line 542 "util/configparser.y" /* yacc.c:1646 */ 2731 { 2732 OUTYY(("P(server_do_ip4:%s)\n", (yyvsp[0].str))); 2733 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2734 yyerror("expected yes or no."); 2735 else cfg_parser->cfg->do_ip4 = (strcmp((yyvsp[0].str), "yes")==0); 2736 free((yyvsp[0].str)); 2737 } 2738 #line 2739 "util/configparser.c" /* yacc.c:1646 */ 2739 break; 2740 2741 case 227: 2742 #line 551 "util/configparser.y" /* yacc.c:1646 */ 2743 { 2744 OUTYY(("P(server_do_ip6:%s)\n", (yyvsp[0].str))); 2745 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2746 yyerror("expected yes or no."); 2747 else cfg_parser->cfg->do_ip6 = (strcmp((yyvsp[0].str), "yes")==0); 2748 free((yyvsp[0].str)); 2749 } 2750 #line 2751 "util/configparser.c" /* yacc.c:1646 */ 2751 break; 2752 2753 case 228: 2754 #line 560 "util/configparser.y" /* yacc.c:1646 */ 2755 { 2756 OUTYY(("P(server_do_udp:%s)\n", (yyvsp[0].str))); 2757 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2758 yyerror("expected yes or no."); 2759 else cfg_parser->cfg->do_udp = (strcmp((yyvsp[0].str), "yes")==0); 2760 free((yyvsp[0].str)); 2761 } 2762 #line 2763 "util/configparser.c" /* yacc.c:1646 */ 2763 break; 2764 2765 case 229: 2766 #line 569 "util/configparser.y" /* yacc.c:1646 */ 2767 { 2768 OUTYY(("P(server_do_tcp:%s)\n", (yyvsp[0].str))); 2769 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2770 yyerror("expected yes or no."); 2771 else cfg_parser->cfg->do_tcp = (strcmp((yyvsp[0].str), "yes")==0); 2772 free((yyvsp[0].str)); 2773 } 2774 #line 2775 "util/configparser.c" /* yacc.c:1646 */ 2775 break; 2776 2777 case 230: 2778 #line 578 "util/configparser.y" /* yacc.c:1646 */ 2779 { 2780 OUTYY(("P(server_prefer_ip6:%s)\n", (yyvsp[0].str))); 2781 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2782 yyerror("expected yes or no."); 2783 else cfg_parser->cfg->prefer_ip6 = (strcmp((yyvsp[0].str), "yes")==0); 2784 free((yyvsp[0].str)); 2785 } 2786 #line 2787 "util/configparser.c" /* yacc.c:1646 */ 2787 break; 2788 2789 case 231: 2790 #line 587 "util/configparser.y" /* yacc.c:1646 */ 2791 { 2792 OUTYY(("P(server_tcp_mss:%s)\n", (yyvsp[0].str))); 2793 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 2794 yyerror("number expected"); 2795 else cfg_parser->cfg->tcp_mss = atoi((yyvsp[0].str)); 2796 free((yyvsp[0].str)); 2797 } 2798 #line 2799 "util/configparser.c" /* yacc.c:1646 */ 2799 break; 2800 2801 case 232: 2802 #line 596 "util/configparser.y" /* yacc.c:1646 */ 2803 { 2804 OUTYY(("P(server_outgoing_tcp_mss:%s)\n", (yyvsp[0].str))); 2805 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 2806 yyerror("number expected"); 2807 else cfg_parser->cfg->outgoing_tcp_mss = atoi((yyvsp[0].str)); 2808 free((yyvsp[0].str)); 2809 } 2810 #line 2811 "util/configparser.c" /* yacc.c:1646 */ 2811 break; 2812 2813 case 233: 2814 #line 605 "util/configparser.y" /* yacc.c:1646 */ 2815 { 2816 OUTYY(("P(server_tcp_upstream:%s)\n", (yyvsp[0].str))); 2817 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2818 yyerror("expected yes or no."); 2819 else cfg_parser->cfg->tcp_upstream = (strcmp((yyvsp[0].str), "yes")==0); 2820 free((yyvsp[0].str)); 2821 } 2822 #line 2823 "util/configparser.c" /* yacc.c:1646 */ 2823 break; 2824 2825 case 234: 2826 #line 614 "util/configparser.y" /* yacc.c:1646 */ 2827 { 2828 OUTYY(("P(server_udp_upstream_without_downstream:%s)\n", (yyvsp[0].str))); 2829 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2830 yyerror("expected yes or no."); 2831 else cfg_parser->cfg->udp_upstream_without_downstream = (strcmp((yyvsp[0].str), "yes")==0); 2832 free((yyvsp[0].str)); 2833 } 2834 #line 2835 "util/configparser.c" /* yacc.c:1646 */ 2835 break; 2836 2837 case 235: 2838 #line 623 "util/configparser.y" /* yacc.c:1646 */ 2839 { 2840 OUTYY(("P(server_ssl_upstream:%s)\n", (yyvsp[0].str))); 2841 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2842 yyerror("expected yes or no."); 2843 else cfg_parser->cfg->ssl_upstream = (strcmp((yyvsp[0].str), "yes")==0); 2844 free((yyvsp[0].str)); 2845 } 2846 #line 2847 "util/configparser.c" /* yacc.c:1646 */ 2847 break; 2848 2849 case 236: 2850 #line 632 "util/configparser.y" /* yacc.c:1646 */ 2851 { 2852 OUTYY(("P(server_ssl_service_key:%s)\n", (yyvsp[0].str))); 2853 free(cfg_parser->cfg->ssl_service_key); 2854 cfg_parser->cfg->ssl_service_key = (yyvsp[0].str); 2855 } 2856 #line 2857 "util/configparser.c" /* yacc.c:1646 */ 2857 break; 2858 2859 case 237: 2860 #line 639 "util/configparser.y" /* yacc.c:1646 */ 2861 { 2862 OUTYY(("P(server_ssl_service_pem:%s)\n", (yyvsp[0].str))); 2863 free(cfg_parser->cfg->ssl_service_pem); 2864 cfg_parser->cfg->ssl_service_pem = (yyvsp[0].str); 2865 } 2866 #line 2867 "util/configparser.c" /* yacc.c:1646 */ 2867 break; 2868 2869 case 238: 2870 #line 646 "util/configparser.y" /* yacc.c:1646 */ 2871 { 2872 OUTYY(("P(server_ssl_port:%s)\n", (yyvsp[0].str))); 2873 if(atoi((yyvsp[0].str)) == 0) 2874 yyerror("port number expected"); 2875 else cfg_parser->cfg->ssl_port = atoi((yyvsp[0].str)); 2876 free((yyvsp[0].str)); 2877 } 2878 #line 2879 "util/configparser.c" /* yacc.c:1646 */ 2879 break; 2880 2881 case 239: 2882 #line 655 "util/configparser.y" /* yacc.c:1646 */ 2883 { 2884 OUTYY(("P(server_use_systemd:%s)\n", (yyvsp[0].str))); 2885 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2886 yyerror("expected yes or no."); 2887 else cfg_parser->cfg->use_systemd = (strcmp((yyvsp[0].str), "yes")==0); 2888 free((yyvsp[0].str)); 2889 } 2890 #line 2891 "util/configparser.c" /* yacc.c:1646 */ 2891 break; 2892 2893 case 240: 2894 #line 664 "util/configparser.y" /* yacc.c:1646 */ 2895 { 2896 OUTYY(("P(server_do_daemonize:%s)\n", (yyvsp[0].str))); 2897 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2898 yyerror("expected yes or no."); 2899 else cfg_parser->cfg->do_daemonize = (strcmp((yyvsp[0].str), "yes")==0); 2900 free((yyvsp[0].str)); 2901 } 2902 #line 2903 "util/configparser.c" /* yacc.c:1646 */ 2903 break; 2904 2905 case 241: 2906 #line 673 "util/configparser.y" /* yacc.c:1646 */ 2907 { 2908 OUTYY(("P(server_use_syslog:%s)\n", (yyvsp[0].str))); 2909 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2910 yyerror("expected yes or no."); 2911 else cfg_parser->cfg->use_syslog = (strcmp((yyvsp[0].str), "yes")==0); 2912 #if !defined(HAVE_SYSLOG_H) && !defined(UB_ON_WINDOWS) 2913 if(strcmp((yyvsp[0].str), "yes") == 0) 2914 yyerror("no syslog services are available. " 2915 "(reconfigure and compile to add)"); 2916 #endif 2917 free((yyvsp[0].str)); 2918 } 2919 #line 2920 "util/configparser.c" /* yacc.c:1646 */ 2920 break; 2921 2922 case 242: 2923 #line 687 "util/configparser.y" /* yacc.c:1646 */ 2924 { 2925 OUTYY(("P(server_log_time_ascii:%s)\n", (yyvsp[0].str))); 2926 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2927 yyerror("expected yes or no."); 2928 else cfg_parser->cfg->log_time_ascii = (strcmp((yyvsp[0].str), "yes")==0); 2929 free((yyvsp[0].str)); 2930 } 2931 #line 2932 "util/configparser.c" /* yacc.c:1646 */ 2932 break; 2933 2934 case 243: 2935 #line 696 "util/configparser.y" /* yacc.c:1646 */ 2936 { 2937 OUTYY(("P(server_log_queries:%s)\n", (yyvsp[0].str))); 2938 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2939 yyerror("expected yes or no."); 2940 else cfg_parser->cfg->log_queries = (strcmp((yyvsp[0].str), "yes")==0); 2941 free((yyvsp[0].str)); 2942 } 2943 #line 2944 "util/configparser.c" /* yacc.c:1646 */ 2944 break; 2945 2946 case 244: 2947 #line 705 "util/configparser.y" /* yacc.c:1646 */ 2948 { 2949 OUTYY(("P(server_log_replies:%s)\n", (yyvsp[0].str))); 2950 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 2951 yyerror("expected yes or no."); 2952 else cfg_parser->cfg->log_replies = (strcmp((yyvsp[0].str), "yes")==0); 2953 free((yyvsp[0].str)); 2954 } 2955 #line 2956 "util/configparser.c" /* yacc.c:1646 */ 2956 break; 2957 2958 case 245: 2959 #line 714 "util/configparser.y" /* yacc.c:1646 */ 2960 { 2961 OUTYY(("P(server_chroot:%s)\n", (yyvsp[0].str))); 2962 free(cfg_parser->cfg->chrootdir); 2963 cfg_parser->cfg->chrootdir = (yyvsp[0].str); 2964 } 2965 #line 2966 "util/configparser.c" /* yacc.c:1646 */ 2966 break; 2967 2968 case 246: 2969 #line 721 "util/configparser.y" /* yacc.c:1646 */ 2970 { 2971 OUTYY(("P(server_username:%s)\n", (yyvsp[0].str))); 2972 free(cfg_parser->cfg->username); 2973 cfg_parser->cfg->username = (yyvsp[0].str); 2974 } 2975 #line 2976 "util/configparser.c" /* yacc.c:1646 */ 2976 break; 2977 2978 case 247: 2979 #line 728 "util/configparser.y" /* yacc.c:1646 */ 2980 { 2981 OUTYY(("P(server_directory:%s)\n", (yyvsp[0].str))); 2982 free(cfg_parser->cfg->directory); 2983 cfg_parser->cfg->directory = (yyvsp[0].str); 2984 /* change there right away for includes relative to this */ 2985 if((yyvsp[0].str)[0]) { 2986 char* d; 2987 #ifdef UB_ON_WINDOWS 2988 w_config_adjust_directory(cfg_parser->cfg); 2989 #endif 2990 d = cfg_parser->cfg->directory; 2991 /* adjust directory if we have already chroot, 2992 * like, we reread after sighup */ 2993 if(cfg_parser->chroot && cfg_parser->chroot[0] && 2994 strncmp(d, cfg_parser->chroot, strlen( 2995 cfg_parser->chroot)) == 0) 2996 d += strlen(cfg_parser->chroot); 2997 if(d[0]) { 2998 if(chdir(d)) 2999 log_err("cannot chdir to directory: %s (%s)", 3000 d, strerror(errno)); 3001 } 3002 } 3003 } 3004 #line 3005 "util/configparser.c" /* yacc.c:1646 */ 3005 break; 3006 3007 case 248: 3008 #line 754 "util/configparser.y" /* yacc.c:1646 */ 3009 { 3010 OUTYY(("P(server_logfile:%s)\n", (yyvsp[0].str))); 3011 free(cfg_parser->cfg->logfile); 3012 cfg_parser->cfg->logfile = (yyvsp[0].str); 3013 cfg_parser->cfg->use_syslog = 0; 3014 } 3015 #line 3016 "util/configparser.c" /* yacc.c:1646 */ 3016 break; 3017 3018 case 249: 3019 #line 762 "util/configparser.y" /* yacc.c:1646 */ 3020 { 3021 OUTYY(("P(server_pidfile:%s)\n", (yyvsp[0].str))); 3022 free(cfg_parser->cfg->pidfile); 3023 cfg_parser->cfg->pidfile = (yyvsp[0].str); 3024 } 3025 #line 3026 "util/configparser.c" /* yacc.c:1646 */ 3026 break; 3027 3028 case 250: 3029 #line 769 "util/configparser.y" /* yacc.c:1646 */ 3030 { 3031 OUTYY(("P(server_root_hints:%s)\n", (yyvsp[0].str))); 3032 if(!cfg_strlist_insert(&cfg_parser->cfg->root_hints, (yyvsp[0].str))) 3033 yyerror("out of memory"); 3034 } 3035 #line 3036 "util/configparser.c" /* yacc.c:1646 */ 3036 break; 3037 3038 case 251: 3039 #line 776 "util/configparser.y" /* yacc.c:1646 */ 3040 { 3041 OUTYY(("P(server_dlv_anchor_file:%s)\n", (yyvsp[0].str))); 3042 free(cfg_parser->cfg->dlv_anchor_file); 3043 cfg_parser->cfg->dlv_anchor_file = (yyvsp[0].str); 3044 } 3045 #line 3046 "util/configparser.c" /* yacc.c:1646 */ 3046 break; 3047 3048 case 252: 3049 #line 783 "util/configparser.y" /* yacc.c:1646 */ 3050 { 3051 OUTYY(("P(server_dlv_anchor:%s)\n", (yyvsp[0].str))); 3052 if(!cfg_strlist_insert(&cfg_parser->cfg->dlv_anchor_list, (yyvsp[0].str))) 3053 yyerror("out of memory"); 3054 } 3055 #line 3056 "util/configparser.c" /* yacc.c:1646 */ 3056 break; 3057 3058 case 253: 3059 #line 790 "util/configparser.y" /* yacc.c:1646 */ 3060 { 3061 OUTYY(("P(server_auto_trust_anchor_file:%s)\n", (yyvsp[0].str))); 3062 if(!cfg_strlist_insert(&cfg_parser->cfg-> 3063 auto_trust_anchor_file_list, (yyvsp[0].str))) 3064 yyerror("out of memory"); 3065 } 3066 #line 3067 "util/configparser.c" /* yacc.c:1646 */ 3067 break; 3068 3069 case 254: 3070 #line 798 "util/configparser.y" /* yacc.c:1646 */ 3071 { 3072 OUTYY(("P(server_trust_anchor_file:%s)\n", (yyvsp[0].str))); 3073 if(!cfg_strlist_insert(&cfg_parser->cfg-> 3074 trust_anchor_file_list, (yyvsp[0].str))) 3075 yyerror("out of memory"); 3076 } 3077 #line 3078 "util/configparser.c" /* yacc.c:1646 */ 3078 break; 3079 3080 case 255: 3081 #line 806 "util/configparser.y" /* yacc.c:1646 */ 3082 { 3083 OUTYY(("P(server_trusted_keys_file:%s)\n", (yyvsp[0].str))); 3084 if(!cfg_strlist_insert(&cfg_parser->cfg-> 3085 trusted_keys_file_list, (yyvsp[0].str))) 3086 yyerror("out of memory"); 3087 } 3088 #line 3089 "util/configparser.c" /* yacc.c:1646 */ 3089 break; 3090 3091 case 256: 3092 #line 814 "util/configparser.y" /* yacc.c:1646 */ 3093 { 3094 OUTYY(("P(server_trust_anchor:%s)\n", (yyvsp[0].str))); 3095 if(!cfg_strlist_insert(&cfg_parser->cfg->trust_anchor_list, (yyvsp[0].str))) 3096 yyerror("out of memory"); 3097 } 3098 #line 3099 "util/configparser.c" /* yacc.c:1646 */ 3099 break; 3100 3101 case 257: 3102 #line 821 "util/configparser.y" /* yacc.c:1646 */ 3103 { 3104 OUTYY(("P(server_trust_anchor_signaling:%s)\n", (yyvsp[0].str))); 3105 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3106 yyerror("expected yes or no."); 3107 else 3108 cfg_parser->cfg->trust_anchor_signaling = 3109 (strcmp((yyvsp[0].str), "yes")==0); 3110 free((yyvsp[0].str)); 3111 } 3112 #line 3113 "util/configparser.c" /* yacc.c:1646 */ 3113 break; 3114 3115 case 258: 3116 #line 832 "util/configparser.y" /* yacc.c:1646 */ 3117 { 3118 OUTYY(("P(server_domain_insecure:%s)\n", (yyvsp[0].str))); 3119 if(!cfg_strlist_insert(&cfg_parser->cfg->domain_insecure, (yyvsp[0].str))) 3120 yyerror("out of memory"); 3121 } 3122 #line 3123 "util/configparser.c" /* yacc.c:1646 */ 3123 break; 3124 3125 case 259: 3126 #line 839 "util/configparser.y" /* yacc.c:1646 */ 3127 { 3128 OUTYY(("P(server_hide_identity:%s)\n", (yyvsp[0].str))); 3129 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3130 yyerror("expected yes or no."); 3131 else cfg_parser->cfg->hide_identity = (strcmp((yyvsp[0].str), "yes")==0); 3132 free((yyvsp[0].str)); 3133 } 3134 #line 3135 "util/configparser.c" /* yacc.c:1646 */ 3135 break; 3136 3137 case 260: 3138 #line 848 "util/configparser.y" /* yacc.c:1646 */ 3139 { 3140 OUTYY(("P(server_hide_version:%s)\n", (yyvsp[0].str))); 3141 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3142 yyerror("expected yes or no."); 3143 else cfg_parser->cfg->hide_version = (strcmp((yyvsp[0].str), "yes")==0); 3144 free((yyvsp[0].str)); 3145 } 3146 #line 3147 "util/configparser.c" /* yacc.c:1646 */ 3147 break; 3148 3149 case 261: 3150 #line 857 "util/configparser.y" /* yacc.c:1646 */ 3151 { 3152 OUTYY(("P(server_hide_trustanchor:%s)\n", (yyvsp[0].str))); 3153 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3154 yyerror("expected yes or no."); 3155 else cfg_parser->cfg->hide_trustanchor = (strcmp((yyvsp[0].str), "yes")==0); 3156 free((yyvsp[0].str)); 3157 } 3158 #line 3159 "util/configparser.c" /* yacc.c:1646 */ 3159 break; 3160 3161 case 262: 3162 #line 866 "util/configparser.y" /* yacc.c:1646 */ 3163 { 3164 OUTYY(("P(server_identity:%s)\n", (yyvsp[0].str))); 3165 free(cfg_parser->cfg->identity); 3166 cfg_parser->cfg->identity = (yyvsp[0].str); 3167 } 3168 #line 3169 "util/configparser.c" /* yacc.c:1646 */ 3169 break; 3170 3171 case 263: 3172 #line 873 "util/configparser.y" /* yacc.c:1646 */ 3173 { 3174 OUTYY(("P(server_version:%s)\n", (yyvsp[0].str))); 3175 free(cfg_parser->cfg->version); 3176 cfg_parser->cfg->version = (yyvsp[0].str); 3177 } 3178 #line 3179 "util/configparser.c" /* yacc.c:1646 */ 3179 break; 3180 3181 case 264: 3182 #line 880 "util/configparser.y" /* yacc.c:1646 */ 3183 { 3184 OUTYY(("P(server_so_rcvbuf:%s)\n", (yyvsp[0].str))); 3185 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->so_rcvbuf)) 3186 yyerror("buffer size expected"); 3187 free((yyvsp[0].str)); 3188 } 3189 #line 3190 "util/configparser.c" /* yacc.c:1646 */ 3190 break; 3191 3192 case 265: 3193 #line 888 "util/configparser.y" /* yacc.c:1646 */ 3194 { 3195 OUTYY(("P(server_so_sndbuf:%s)\n", (yyvsp[0].str))); 3196 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->so_sndbuf)) 3197 yyerror("buffer size expected"); 3198 free((yyvsp[0].str)); 3199 } 3200 #line 3201 "util/configparser.c" /* yacc.c:1646 */ 3201 break; 3202 3203 case 266: 3204 #line 896 "util/configparser.y" /* yacc.c:1646 */ 3205 { 3206 OUTYY(("P(server_so_reuseport:%s)\n", (yyvsp[0].str))); 3207 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3208 yyerror("expected yes or no."); 3209 else cfg_parser->cfg->so_reuseport = 3210 (strcmp((yyvsp[0].str), "yes")==0); 3211 free((yyvsp[0].str)); 3212 } 3213 #line 3214 "util/configparser.c" /* yacc.c:1646 */ 3214 break; 3215 3216 case 267: 3217 #line 906 "util/configparser.y" /* yacc.c:1646 */ 3218 { 3219 OUTYY(("P(server_ip_transparent:%s)\n", (yyvsp[0].str))); 3220 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3221 yyerror("expected yes or no."); 3222 else cfg_parser->cfg->ip_transparent = 3223 (strcmp((yyvsp[0].str), "yes")==0); 3224 free((yyvsp[0].str)); 3225 } 3226 #line 3227 "util/configparser.c" /* yacc.c:1646 */ 3227 break; 3228 3229 case 268: 3230 #line 916 "util/configparser.y" /* yacc.c:1646 */ 3231 { 3232 OUTYY(("P(server_ip_freebind:%s)\n", (yyvsp[0].str))); 3233 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3234 yyerror("expected yes or no."); 3235 else cfg_parser->cfg->ip_freebind = 3236 (strcmp((yyvsp[0].str), "yes")==0); 3237 free((yyvsp[0].str)); 3238 } 3239 #line 3240 "util/configparser.c" /* yacc.c:1646 */ 3240 break; 3241 3242 case 269: 3243 #line 926 "util/configparser.y" /* yacc.c:1646 */ 3244 { 3245 OUTYY(("P(server_edns_buffer_size:%s)\n", (yyvsp[0].str))); 3246 if(atoi((yyvsp[0].str)) == 0) 3247 yyerror("number expected"); 3248 else if (atoi((yyvsp[0].str)) < 12) 3249 yyerror("edns buffer size too small"); 3250 else if (atoi((yyvsp[0].str)) > 65535) 3251 cfg_parser->cfg->edns_buffer_size = 65535; 3252 else cfg_parser->cfg->edns_buffer_size = atoi((yyvsp[0].str)); 3253 free((yyvsp[0].str)); 3254 } 3255 #line 3256 "util/configparser.c" /* yacc.c:1646 */ 3256 break; 3257 3258 case 270: 3259 #line 939 "util/configparser.y" /* yacc.c:1646 */ 3260 { 3261 OUTYY(("P(server_msg_buffer_size:%s)\n", (yyvsp[0].str))); 3262 if(atoi((yyvsp[0].str)) == 0) 3263 yyerror("number expected"); 3264 else if (atoi((yyvsp[0].str)) < 4096) 3265 yyerror("message buffer size too small (use 4096)"); 3266 else cfg_parser->cfg->msg_buffer_size = atoi((yyvsp[0].str)); 3267 free((yyvsp[0].str)); 3268 } 3269 #line 3270 "util/configparser.c" /* yacc.c:1646 */ 3270 break; 3271 3272 case 271: 3273 #line 950 "util/configparser.y" /* yacc.c:1646 */ 3274 { 3275 OUTYY(("P(server_msg_cache_size:%s)\n", (yyvsp[0].str))); 3276 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->msg_cache_size)) 3277 yyerror("memory size expected"); 3278 free((yyvsp[0].str)); 3279 } 3280 #line 3281 "util/configparser.c" /* yacc.c:1646 */ 3281 break; 3282 3283 case 272: 3284 #line 958 "util/configparser.y" /* yacc.c:1646 */ 3285 { 3286 OUTYY(("P(server_msg_cache_slabs:%s)\n", (yyvsp[0].str))); 3287 if(atoi((yyvsp[0].str)) == 0) 3288 yyerror("number expected"); 3289 else { 3290 cfg_parser->cfg->msg_cache_slabs = atoi((yyvsp[0].str)); 3291 if(!is_pow2(cfg_parser->cfg->msg_cache_slabs)) 3292 yyerror("must be a power of 2"); 3293 } 3294 free((yyvsp[0].str)); 3295 } 3296 #line 3297 "util/configparser.c" /* yacc.c:1646 */ 3297 break; 3298 3299 case 273: 3300 #line 971 "util/configparser.y" /* yacc.c:1646 */ 3301 { 3302 OUTYY(("P(server_num_queries_per_thread:%s)\n", (yyvsp[0].str))); 3303 if(atoi((yyvsp[0].str)) == 0) 3304 yyerror("number expected"); 3305 else cfg_parser->cfg->num_queries_per_thread = atoi((yyvsp[0].str)); 3306 free((yyvsp[0].str)); 3307 } 3308 #line 3309 "util/configparser.c" /* yacc.c:1646 */ 3309 break; 3310 3311 case 274: 3312 #line 980 "util/configparser.y" /* yacc.c:1646 */ 3313 { 3314 OUTYY(("P(server_jostle_timeout:%s)\n", (yyvsp[0].str))); 3315 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3316 yyerror("number expected"); 3317 else cfg_parser->cfg->jostle_time = atoi((yyvsp[0].str)); 3318 free((yyvsp[0].str)); 3319 } 3320 #line 3321 "util/configparser.c" /* yacc.c:1646 */ 3321 break; 3322 3323 case 275: 3324 #line 989 "util/configparser.y" /* yacc.c:1646 */ 3325 { 3326 OUTYY(("P(server_delay_close:%s)\n", (yyvsp[0].str))); 3327 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3328 yyerror("number expected"); 3329 else cfg_parser->cfg->delay_close = atoi((yyvsp[0].str)); 3330 free((yyvsp[0].str)); 3331 } 3332 #line 3333 "util/configparser.c" /* yacc.c:1646 */ 3333 break; 3334 3335 case 276: 3336 #line 998 "util/configparser.y" /* yacc.c:1646 */ 3337 { 3338 OUTYY(("P(server_unblock_lan_zones:%s)\n", (yyvsp[0].str))); 3339 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3340 yyerror("expected yes or no."); 3341 else cfg_parser->cfg->unblock_lan_zones = 3342 (strcmp((yyvsp[0].str), "yes")==0); 3343 free((yyvsp[0].str)); 3344 } 3345 #line 3346 "util/configparser.c" /* yacc.c:1646 */ 3346 break; 3347 3348 case 277: 3349 #line 1008 "util/configparser.y" /* yacc.c:1646 */ 3350 { 3351 OUTYY(("P(server_insecure_lan_zones:%s)\n", (yyvsp[0].str))); 3352 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3353 yyerror("expected yes or no."); 3354 else cfg_parser->cfg->insecure_lan_zones = 3355 (strcmp((yyvsp[0].str), "yes")==0); 3356 free((yyvsp[0].str)); 3357 } 3358 #line 3359 "util/configparser.c" /* yacc.c:1646 */ 3359 break; 3360 3361 case 278: 3362 #line 1018 "util/configparser.y" /* yacc.c:1646 */ 3363 { 3364 OUTYY(("P(server_rrset_cache_size:%s)\n", (yyvsp[0].str))); 3365 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->rrset_cache_size)) 3366 yyerror("memory size expected"); 3367 free((yyvsp[0].str)); 3368 } 3369 #line 3370 "util/configparser.c" /* yacc.c:1646 */ 3370 break; 3371 3372 case 279: 3373 #line 1026 "util/configparser.y" /* yacc.c:1646 */ 3374 { 3375 OUTYY(("P(server_rrset_cache_slabs:%s)\n", (yyvsp[0].str))); 3376 if(atoi((yyvsp[0].str)) == 0) 3377 yyerror("number expected"); 3378 else { 3379 cfg_parser->cfg->rrset_cache_slabs = atoi((yyvsp[0].str)); 3380 if(!is_pow2(cfg_parser->cfg->rrset_cache_slabs)) 3381 yyerror("must be a power of 2"); 3382 } 3383 free((yyvsp[0].str)); 3384 } 3385 #line 3386 "util/configparser.c" /* yacc.c:1646 */ 3386 break; 3387 3388 case 280: 3389 #line 1039 "util/configparser.y" /* yacc.c:1646 */ 3390 { 3391 OUTYY(("P(server_infra_host_ttl:%s)\n", (yyvsp[0].str))); 3392 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3393 yyerror("number expected"); 3394 else cfg_parser->cfg->host_ttl = atoi((yyvsp[0].str)); 3395 free((yyvsp[0].str)); 3396 } 3397 #line 3398 "util/configparser.c" /* yacc.c:1646 */ 3398 break; 3399 3400 case 281: 3401 #line 1048 "util/configparser.y" /* yacc.c:1646 */ 3402 { 3403 OUTYY(("P(server_infra_lame_ttl:%s)\n", (yyvsp[0].str))); 3404 verbose(VERB_DETAIL, "ignored infra-lame-ttl: %s (option " 3405 "removed, use infra-host-ttl)", (yyvsp[0].str)); 3406 free((yyvsp[0].str)); 3407 } 3408 #line 3409 "util/configparser.c" /* yacc.c:1646 */ 3409 break; 3410 3411 case 282: 3412 #line 1056 "util/configparser.y" /* yacc.c:1646 */ 3413 { 3414 OUTYY(("P(server_infra_cache_numhosts:%s)\n", (yyvsp[0].str))); 3415 if(atoi((yyvsp[0].str)) == 0) 3416 yyerror("number expected"); 3417 else cfg_parser->cfg->infra_cache_numhosts = atoi((yyvsp[0].str)); 3418 free((yyvsp[0].str)); 3419 } 3420 #line 3421 "util/configparser.c" /* yacc.c:1646 */ 3421 break; 3422 3423 case 283: 3424 #line 1065 "util/configparser.y" /* yacc.c:1646 */ 3425 { 3426 OUTYY(("P(server_infra_cache_lame_size:%s)\n", (yyvsp[0].str))); 3427 verbose(VERB_DETAIL, "ignored infra-cache-lame-size: %s " 3428 "(option removed, use infra-cache-numhosts)", (yyvsp[0].str)); 3429 free((yyvsp[0].str)); 3430 } 3431 #line 3432 "util/configparser.c" /* yacc.c:1646 */ 3432 break; 3433 3434 case 284: 3435 #line 1073 "util/configparser.y" /* yacc.c:1646 */ 3436 { 3437 OUTYY(("P(server_infra_cache_slabs:%s)\n", (yyvsp[0].str))); 3438 if(atoi((yyvsp[0].str)) == 0) 3439 yyerror("number expected"); 3440 else { 3441 cfg_parser->cfg->infra_cache_slabs = atoi((yyvsp[0].str)); 3442 if(!is_pow2(cfg_parser->cfg->infra_cache_slabs)) 3443 yyerror("must be a power of 2"); 3444 } 3445 free((yyvsp[0].str)); 3446 } 3447 #line 3448 "util/configparser.c" /* yacc.c:1646 */ 3448 break; 3449 3450 case 285: 3451 #line 1086 "util/configparser.y" /* yacc.c:1646 */ 3452 { 3453 OUTYY(("P(server_infra_cache_min_rtt:%s)\n", (yyvsp[0].str))); 3454 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3455 yyerror("number expected"); 3456 else cfg_parser->cfg->infra_cache_min_rtt = atoi((yyvsp[0].str)); 3457 free((yyvsp[0].str)); 3458 } 3459 #line 3460 "util/configparser.c" /* yacc.c:1646 */ 3460 break; 3461 3462 case 286: 3463 #line 1095 "util/configparser.y" /* yacc.c:1646 */ 3464 { 3465 OUTYY(("P(server_target_fetch_policy:%s)\n", (yyvsp[0].str))); 3466 free(cfg_parser->cfg->target_fetch_policy); 3467 cfg_parser->cfg->target_fetch_policy = (yyvsp[0].str); 3468 } 3469 #line 3470 "util/configparser.c" /* yacc.c:1646 */ 3470 break; 3471 3472 case 287: 3473 #line 1102 "util/configparser.y" /* yacc.c:1646 */ 3474 { 3475 OUTYY(("P(server_harden_short_bufsize:%s)\n", (yyvsp[0].str))); 3476 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3477 yyerror("expected yes or no."); 3478 else cfg_parser->cfg->harden_short_bufsize = 3479 (strcmp((yyvsp[0].str), "yes")==0); 3480 free((yyvsp[0].str)); 3481 } 3482 #line 3483 "util/configparser.c" /* yacc.c:1646 */ 3483 break; 3484 3485 case 288: 3486 #line 1112 "util/configparser.y" /* yacc.c:1646 */ 3487 { 3488 OUTYY(("P(server_harden_large_queries:%s)\n", (yyvsp[0].str))); 3489 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3490 yyerror("expected yes or no."); 3491 else cfg_parser->cfg->harden_large_queries = 3492 (strcmp((yyvsp[0].str), "yes")==0); 3493 free((yyvsp[0].str)); 3494 } 3495 #line 3496 "util/configparser.c" /* yacc.c:1646 */ 3496 break; 3497 3498 case 289: 3499 #line 1122 "util/configparser.y" /* yacc.c:1646 */ 3500 { 3501 OUTYY(("P(server_harden_glue:%s)\n", (yyvsp[0].str))); 3502 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3503 yyerror("expected yes or no."); 3504 else cfg_parser->cfg->harden_glue = 3505 (strcmp((yyvsp[0].str), "yes")==0); 3506 free((yyvsp[0].str)); 3507 } 3508 #line 3509 "util/configparser.c" /* yacc.c:1646 */ 3509 break; 3510 3511 case 290: 3512 #line 1132 "util/configparser.y" /* yacc.c:1646 */ 3513 { 3514 OUTYY(("P(server_harden_dnssec_stripped:%s)\n", (yyvsp[0].str))); 3515 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3516 yyerror("expected yes or no."); 3517 else cfg_parser->cfg->harden_dnssec_stripped = 3518 (strcmp((yyvsp[0].str), "yes")==0); 3519 free((yyvsp[0].str)); 3520 } 3521 #line 3522 "util/configparser.c" /* yacc.c:1646 */ 3522 break; 3523 3524 case 291: 3525 #line 1142 "util/configparser.y" /* yacc.c:1646 */ 3526 { 3527 OUTYY(("P(server_harden_below_nxdomain:%s)\n", (yyvsp[0].str))); 3528 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3529 yyerror("expected yes or no."); 3530 else cfg_parser->cfg->harden_below_nxdomain = 3531 (strcmp((yyvsp[0].str), "yes")==0); 3532 free((yyvsp[0].str)); 3533 } 3534 #line 3535 "util/configparser.c" /* yacc.c:1646 */ 3535 break; 3536 3537 case 292: 3538 #line 1152 "util/configparser.y" /* yacc.c:1646 */ 3539 { 3540 OUTYY(("P(server_harden_referral_path:%s)\n", (yyvsp[0].str))); 3541 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3542 yyerror("expected yes or no."); 3543 else cfg_parser->cfg->harden_referral_path = 3544 (strcmp((yyvsp[0].str), "yes")==0); 3545 free((yyvsp[0].str)); 3546 } 3547 #line 3548 "util/configparser.c" /* yacc.c:1646 */ 3548 break; 3549 3550 case 293: 3551 #line 1162 "util/configparser.y" /* yacc.c:1646 */ 3552 { 3553 OUTYY(("P(server_harden_algo_downgrade:%s)\n", (yyvsp[0].str))); 3554 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3555 yyerror("expected yes or no."); 3556 else cfg_parser->cfg->harden_algo_downgrade = 3557 (strcmp((yyvsp[0].str), "yes")==0); 3558 free((yyvsp[0].str)); 3559 } 3560 #line 3561 "util/configparser.c" /* yacc.c:1646 */ 3561 break; 3562 3563 case 294: 3564 #line 1172 "util/configparser.y" /* yacc.c:1646 */ 3565 { 3566 OUTYY(("P(server_use_caps_for_id:%s)\n", (yyvsp[0].str))); 3567 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3568 yyerror("expected yes or no."); 3569 else cfg_parser->cfg->use_caps_bits_for_id = 3570 (strcmp((yyvsp[0].str), "yes")==0); 3571 free((yyvsp[0].str)); 3572 } 3573 #line 3574 "util/configparser.c" /* yacc.c:1646 */ 3574 break; 3575 3576 case 295: 3577 #line 1182 "util/configparser.y" /* yacc.c:1646 */ 3578 { 3579 OUTYY(("P(server_caps_whitelist:%s)\n", (yyvsp[0].str))); 3580 if(!cfg_strlist_insert(&cfg_parser->cfg->caps_whitelist, (yyvsp[0].str))) 3581 yyerror("out of memory"); 3582 } 3583 #line 3584 "util/configparser.c" /* yacc.c:1646 */ 3584 break; 3585 3586 case 296: 3587 #line 1189 "util/configparser.y" /* yacc.c:1646 */ 3588 { 3589 OUTYY(("P(server_private_address:%s)\n", (yyvsp[0].str))); 3590 if(!cfg_strlist_insert(&cfg_parser->cfg->private_address, (yyvsp[0].str))) 3591 yyerror("out of memory"); 3592 } 3593 #line 3594 "util/configparser.c" /* yacc.c:1646 */ 3594 break; 3595 3596 case 297: 3597 #line 1196 "util/configparser.y" /* yacc.c:1646 */ 3598 { 3599 OUTYY(("P(server_private_domain:%s)\n", (yyvsp[0].str))); 3600 if(!cfg_strlist_insert(&cfg_parser->cfg->private_domain, (yyvsp[0].str))) 3601 yyerror("out of memory"); 3602 } 3603 #line 3604 "util/configparser.c" /* yacc.c:1646 */ 3604 break; 3605 3606 case 298: 3607 #line 1203 "util/configparser.y" /* yacc.c:1646 */ 3608 { 3609 OUTYY(("P(server_prefetch:%s)\n", (yyvsp[0].str))); 3610 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3611 yyerror("expected yes or no."); 3612 else cfg_parser->cfg->prefetch = (strcmp((yyvsp[0].str), "yes")==0); 3613 free((yyvsp[0].str)); 3614 } 3615 #line 3616 "util/configparser.c" /* yacc.c:1646 */ 3616 break; 3617 3618 case 299: 3619 #line 1212 "util/configparser.y" /* yacc.c:1646 */ 3620 { 3621 OUTYY(("P(server_prefetch_key:%s)\n", (yyvsp[0].str))); 3622 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3623 yyerror("expected yes or no."); 3624 else cfg_parser->cfg->prefetch_key = (strcmp((yyvsp[0].str), "yes")==0); 3625 free((yyvsp[0].str)); 3626 } 3627 #line 3628 "util/configparser.c" /* yacc.c:1646 */ 3628 break; 3629 3630 case 300: 3631 #line 1221 "util/configparser.y" /* yacc.c:1646 */ 3632 { 3633 OUTYY(("P(server_unwanted_reply_threshold:%s)\n", (yyvsp[0].str))); 3634 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3635 yyerror("number expected"); 3636 else cfg_parser->cfg->unwanted_threshold = atoi((yyvsp[0].str)); 3637 free((yyvsp[0].str)); 3638 } 3639 #line 3640 "util/configparser.c" /* yacc.c:1646 */ 3640 break; 3641 3642 case 301: 3643 #line 1230 "util/configparser.y" /* yacc.c:1646 */ 3644 { 3645 OUTYY(("P(server_do_not_query_address:%s)\n", (yyvsp[0].str))); 3646 if(!cfg_strlist_insert(&cfg_parser->cfg->donotqueryaddrs, (yyvsp[0].str))) 3647 yyerror("out of memory"); 3648 } 3649 #line 3650 "util/configparser.c" /* yacc.c:1646 */ 3650 break; 3651 3652 case 302: 3653 #line 1237 "util/configparser.y" /* yacc.c:1646 */ 3654 { 3655 OUTYY(("P(server_do_not_query_localhost:%s)\n", (yyvsp[0].str))); 3656 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3657 yyerror("expected yes or no."); 3658 else cfg_parser->cfg->donotquery_localhost = 3659 (strcmp((yyvsp[0].str), "yes")==0); 3660 free((yyvsp[0].str)); 3661 } 3662 #line 3663 "util/configparser.c" /* yacc.c:1646 */ 3663 break; 3664 3665 case 303: 3666 #line 1247 "util/configparser.y" /* yacc.c:1646 */ 3667 { 3668 OUTYY(("P(server_access_control:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); 3669 if(strcmp((yyvsp[0].str), "deny")!=0 && strcmp((yyvsp[0].str), "refuse")!=0 && 3670 strcmp((yyvsp[0].str), "deny_non_local")!=0 && 3671 strcmp((yyvsp[0].str), "refuse_non_local")!=0 && 3672 strcmp((yyvsp[0].str), "allow")!=0 && 3673 strcmp((yyvsp[0].str), "allow_snoop")!=0) { 3674 yyerror("expected deny, refuse, deny_non_local, " 3675 "refuse_non_local, allow or allow_snoop " 3676 "in access control action"); 3677 } else { 3678 if(!cfg_str2list_insert(&cfg_parser->cfg->acls, (yyvsp[-1].str), (yyvsp[0].str))) 3679 fatal_exit("out of memory adding acl"); 3680 } 3681 } 3682 #line 3683 "util/configparser.c" /* yacc.c:1646 */ 3683 break; 3684 3685 case 304: 3686 #line 1264 "util/configparser.y" /* yacc.c:1646 */ 3687 { 3688 OUTYY(("P(server_module_conf:%s)\n", (yyvsp[0].str))); 3689 free(cfg_parser->cfg->module_conf); 3690 cfg_parser->cfg->module_conf = (yyvsp[0].str); 3691 } 3692 #line 3693 "util/configparser.c" /* yacc.c:1646 */ 3693 break; 3694 3695 case 305: 3696 #line 1271 "util/configparser.y" /* yacc.c:1646 */ 3697 { 3698 OUTYY(("P(server_val_override_date:%s)\n", (yyvsp[0].str))); 3699 if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) { 3700 cfg_parser->cfg->val_date_override = 0; 3701 } else if(strlen((yyvsp[0].str)) == 14) { 3702 cfg_parser->cfg->val_date_override = 3703 cfg_convert_timeval((yyvsp[0].str)); 3704 if(!cfg_parser->cfg->val_date_override) 3705 yyerror("bad date/time specification"); 3706 } else { 3707 if(atoi((yyvsp[0].str)) == 0) 3708 yyerror("number expected"); 3709 cfg_parser->cfg->val_date_override = atoi((yyvsp[0].str)); 3710 } 3711 free((yyvsp[0].str)); 3712 } 3713 #line 3714 "util/configparser.c" /* yacc.c:1646 */ 3714 break; 3715 3716 case 306: 3717 #line 1289 "util/configparser.y" /* yacc.c:1646 */ 3718 { 3719 OUTYY(("P(server_val_sig_skew_min:%s)\n", (yyvsp[0].str))); 3720 if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) { 3721 cfg_parser->cfg->val_sig_skew_min = 0; 3722 } else { 3723 cfg_parser->cfg->val_sig_skew_min = atoi((yyvsp[0].str)); 3724 if(!cfg_parser->cfg->val_sig_skew_min) 3725 yyerror("number expected"); 3726 } 3727 free((yyvsp[0].str)); 3728 } 3729 #line 3730 "util/configparser.c" /* yacc.c:1646 */ 3730 break; 3731 3732 case 307: 3733 #line 1302 "util/configparser.y" /* yacc.c:1646 */ 3734 { 3735 OUTYY(("P(server_val_sig_skew_max:%s)\n", (yyvsp[0].str))); 3736 if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) { 3737 cfg_parser->cfg->val_sig_skew_max = 0; 3738 } else { 3739 cfg_parser->cfg->val_sig_skew_max = atoi((yyvsp[0].str)); 3740 if(!cfg_parser->cfg->val_sig_skew_max) 3741 yyerror("number expected"); 3742 } 3743 free((yyvsp[0].str)); 3744 } 3745 #line 3746 "util/configparser.c" /* yacc.c:1646 */ 3746 break; 3747 3748 case 308: 3749 #line 1315 "util/configparser.y" /* yacc.c:1646 */ 3750 { 3751 OUTYY(("P(server_cache_max_ttl:%s)\n", (yyvsp[0].str))); 3752 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3753 yyerror("number expected"); 3754 else cfg_parser->cfg->max_ttl = atoi((yyvsp[0].str)); 3755 free((yyvsp[0].str)); 3756 } 3757 #line 3758 "util/configparser.c" /* yacc.c:1646 */ 3758 break; 3759 3760 case 309: 3761 #line 1324 "util/configparser.y" /* yacc.c:1646 */ 3762 { 3763 OUTYY(("P(server_cache_max_negative_ttl:%s)\n", (yyvsp[0].str))); 3764 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3765 yyerror("number expected"); 3766 else cfg_parser->cfg->max_negative_ttl = atoi((yyvsp[0].str)); 3767 free((yyvsp[0].str)); 3768 } 3769 #line 3770 "util/configparser.c" /* yacc.c:1646 */ 3770 break; 3771 3772 case 310: 3773 #line 1333 "util/configparser.y" /* yacc.c:1646 */ 3774 { 3775 OUTYY(("P(server_cache_min_ttl:%s)\n", (yyvsp[0].str))); 3776 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3777 yyerror("number expected"); 3778 else cfg_parser->cfg->min_ttl = atoi((yyvsp[0].str)); 3779 free((yyvsp[0].str)); 3780 } 3781 #line 3782 "util/configparser.c" /* yacc.c:1646 */ 3782 break; 3783 3784 case 311: 3785 #line 1342 "util/configparser.y" /* yacc.c:1646 */ 3786 { 3787 OUTYY(("P(server_bogus_ttl:%s)\n", (yyvsp[0].str))); 3788 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3789 yyerror("number expected"); 3790 else cfg_parser->cfg->bogus_ttl = atoi((yyvsp[0].str)); 3791 free((yyvsp[0].str)); 3792 } 3793 #line 3794 "util/configparser.c" /* yacc.c:1646 */ 3794 break; 3795 3796 case 312: 3797 #line 1351 "util/configparser.y" /* yacc.c:1646 */ 3798 { 3799 OUTYY(("P(server_val_clean_additional:%s)\n", (yyvsp[0].str))); 3800 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3801 yyerror("expected yes or no."); 3802 else cfg_parser->cfg->val_clean_additional = 3803 (strcmp((yyvsp[0].str), "yes")==0); 3804 free((yyvsp[0].str)); 3805 } 3806 #line 3807 "util/configparser.c" /* yacc.c:1646 */ 3807 break; 3808 3809 case 313: 3810 #line 1361 "util/configparser.y" /* yacc.c:1646 */ 3811 { 3812 OUTYY(("P(server_val_permissive_mode:%s)\n", (yyvsp[0].str))); 3813 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3814 yyerror("expected yes or no."); 3815 else cfg_parser->cfg->val_permissive_mode = 3816 (strcmp((yyvsp[0].str), "yes")==0); 3817 free((yyvsp[0].str)); 3818 } 3819 #line 3820 "util/configparser.c" /* yacc.c:1646 */ 3820 break; 3821 3822 case 314: 3823 #line 1371 "util/configparser.y" /* yacc.c:1646 */ 3824 { 3825 OUTYY(("P(server_ignore_cd_flag:%s)\n", (yyvsp[0].str))); 3826 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3827 yyerror("expected yes or no."); 3828 else cfg_parser->cfg->ignore_cd = (strcmp((yyvsp[0].str), "yes")==0); 3829 free((yyvsp[0].str)); 3830 } 3831 #line 3832 "util/configparser.c" /* yacc.c:1646 */ 3832 break; 3833 3834 case 315: 3835 #line 1380 "util/configparser.y" /* yacc.c:1646 */ 3836 { 3837 OUTYY(("P(server_serve_expired:%s)\n", (yyvsp[0].str))); 3838 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3839 yyerror("expected yes or no."); 3840 else cfg_parser->cfg->serve_expired = (strcmp((yyvsp[0].str), "yes")==0); 3841 free((yyvsp[0].str)); 3842 } 3843 #line 3844 "util/configparser.c" /* yacc.c:1646 */ 3844 break; 3845 3846 case 316: 3847 #line 1389 "util/configparser.y" /* yacc.c:1646 */ 3848 { 3849 OUTYY(("P(server_fake_dsa:%s)\n", (yyvsp[0].str))); 3850 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3851 yyerror("expected yes or no."); 3852 #ifdef HAVE_SSL 3853 else fake_dsa = (strcmp((yyvsp[0].str), "yes")==0); 3854 if(fake_dsa) 3855 log_warn("test option fake_dsa is enabled"); 3856 #endif 3857 free((yyvsp[0].str)); 3858 } 3859 #line 3860 "util/configparser.c" /* yacc.c:1646 */ 3860 break; 3861 3862 case 317: 3863 #line 1402 "util/configparser.y" /* yacc.c:1646 */ 3864 { 3865 OUTYY(("P(server_fake_sha1:%s)\n", (yyvsp[0].str))); 3866 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3867 yyerror("expected yes or no."); 3868 #ifdef HAVE_SSL 3869 else fake_sha1 = (strcmp((yyvsp[0].str), "yes")==0); 3870 if(fake_sha1) 3871 log_warn("test option fake_sha1 is enabled"); 3872 #endif 3873 free((yyvsp[0].str)); 3874 } 3875 #line 3876 "util/configparser.c" /* yacc.c:1646 */ 3876 break; 3877 3878 case 318: 3879 #line 1415 "util/configparser.y" /* yacc.c:1646 */ 3880 { 3881 OUTYY(("P(server_val_log_level:%s)\n", (yyvsp[0].str))); 3882 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3883 yyerror("number expected"); 3884 else cfg_parser->cfg->val_log_level = atoi((yyvsp[0].str)); 3885 free((yyvsp[0].str)); 3886 } 3887 #line 3888 "util/configparser.c" /* yacc.c:1646 */ 3888 break; 3889 3890 case 319: 3891 #line 1424 "util/configparser.y" /* yacc.c:1646 */ 3892 { 3893 OUTYY(("P(server_val_nsec3_keysize_iterations:%s)\n", (yyvsp[0].str))); 3894 free(cfg_parser->cfg->val_nsec3_key_iterations); 3895 cfg_parser->cfg->val_nsec3_key_iterations = (yyvsp[0].str); 3896 } 3897 #line 3898 "util/configparser.c" /* yacc.c:1646 */ 3898 break; 3899 3900 case 320: 3901 #line 1431 "util/configparser.y" /* yacc.c:1646 */ 3902 { 3903 OUTYY(("P(server_add_holddown:%s)\n", (yyvsp[0].str))); 3904 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3905 yyerror("number expected"); 3906 else cfg_parser->cfg->add_holddown = atoi((yyvsp[0].str)); 3907 free((yyvsp[0].str)); 3908 } 3909 #line 3910 "util/configparser.c" /* yacc.c:1646 */ 3910 break; 3911 3912 case 321: 3913 #line 1440 "util/configparser.y" /* yacc.c:1646 */ 3914 { 3915 OUTYY(("P(server_del_holddown:%s)\n", (yyvsp[0].str))); 3916 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3917 yyerror("number expected"); 3918 else cfg_parser->cfg->del_holddown = atoi((yyvsp[0].str)); 3919 free((yyvsp[0].str)); 3920 } 3921 #line 3922 "util/configparser.c" /* yacc.c:1646 */ 3922 break; 3923 3924 case 322: 3925 #line 1449 "util/configparser.y" /* yacc.c:1646 */ 3926 { 3927 OUTYY(("P(server_keep_missing:%s)\n", (yyvsp[0].str))); 3928 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 3929 yyerror("number expected"); 3930 else cfg_parser->cfg->keep_missing = atoi((yyvsp[0].str)); 3931 free((yyvsp[0].str)); 3932 } 3933 #line 3934 "util/configparser.c" /* yacc.c:1646 */ 3934 break; 3935 3936 case 323: 3937 #line 1458 "util/configparser.y" /* yacc.c:1646 */ 3938 { 3939 OUTYY(("P(server_permit_small_holddown:%s)\n", (yyvsp[0].str))); 3940 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 3941 yyerror("expected yes or no."); 3942 else cfg_parser->cfg->permit_small_holddown = 3943 (strcmp((yyvsp[0].str), "yes")==0); 3944 free((yyvsp[0].str)); 3945 } 3946 #line 3947 "util/configparser.c" /* yacc.c:1646 */ 3947 break; 3948 3949 case 324: 3950 #line 1467 "util/configparser.y" /* yacc.c:1646 */ 3951 { 3952 OUTYY(("P(server_key_cache_size:%s)\n", (yyvsp[0].str))); 3953 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->key_cache_size)) 3954 yyerror("memory size expected"); 3955 free((yyvsp[0].str)); 3956 } 3957 #line 3958 "util/configparser.c" /* yacc.c:1646 */ 3958 break; 3959 3960 case 325: 3961 #line 1475 "util/configparser.y" /* yacc.c:1646 */ 3962 { 3963 OUTYY(("P(server_key_cache_slabs:%s)\n", (yyvsp[0].str))); 3964 if(atoi((yyvsp[0].str)) == 0) 3965 yyerror("number expected"); 3966 else { 3967 cfg_parser->cfg->key_cache_slabs = atoi((yyvsp[0].str)); 3968 if(!is_pow2(cfg_parser->cfg->key_cache_slabs)) 3969 yyerror("must be a power of 2"); 3970 } 3971 free((yyvsp[0].str)); 3972 } 3973 #line 3974 "util/configparser.c" /* yacc.c:1646 */ 3974 break; 3975 3976 case 326: 3977 #line 1488 "util/configparser.y" /* yacc.c:1646 */ 3978 { 3979 OUTYY(("P(server_neg_cache_size:%s)\n", (yyvsp[0].str))); 3980 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->neg_cache_size)) 3981 yyerror("memory size expected"); 3982 free((yyvsp[0].str)); 3983 } 3984 #line 3985 "util/configparser.c" /* yacc.c:1646 */ 3985 break; 3986 3987 case 327: 3988 #line 1496 "util/configparser.y" /* yacc.c:1646 */ 3989 { 3990 OUTYY(("P(server_local_zone:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); 3991 if(strcmp((yyvsp[0].str), "static")!=0 && strcmp((yyvsp[0].str), "deny")!=0 && 3992 strcmp((yyvsp[0].str), "refuse")!=0 && strcmp((yyvsp[0].str), "redirect")!=0 && 3993 strcmp((yyvsp[0].str), "transparent")!=0 && strcmp((yyvsp[0].str), "nodefault")!=0 3994 && strcmp((yyvsp[0].str), "typetransparent")!=0 3995 && strcmp((yyvsp[0].str), "always_transparent")!=0 3996 && strcmp((yyvsp[0].str), "always_refuse")!=0 3997 && strcmp((yyvsp[0].str), "always_nxdomain")!=0 3998 && strcmp((yyvsp[0].str), "inform")!=0 && strcmp((yyvsp[0].str), "inform_deny")!=0) 3999 yyerror("local-zone type: expected static, deny, " 4000 "refuse, redirect, transparent, " 4001 "typetransparent, inform, inform_deny, " 4002 "always_transparent, always_refuse, " 4003 "always_nxdomain or nodefault"); 4004 else if(strcmp((yyvsp[0].str), "nodefault")==0) { 4005 if(!cfg_strlist_insert(&cfg_parser->cfg-> 4006 local_zones_nodefault, (yyvsp[-1].str))) 4007 fatal_exit("out of memory adding local-zone"); 4008 free((yyvsp[0].str)); 4009 } else { 4010 if(!cfg_str2list_insert(&cfg_parser->cfg->local_zones, 4011 (yyvsp[-1].str), (yyvsp[0].str))) 4012 fatal_exit("out of memory adding local-zone"); 4013 } 4014 } 4015 #line 4016 "util/configparser.c" /* yacc.c:1646 */ 4016 break; 4017 4018 case 328: 4019 #line 1524 "util/configparser.y" /* yacc.c:1646 */ 4020 { 4021 OUTYY(("P(server_local_data:%s)\n", (yyvsp[0].str))); 4022 if(!cfg_strlist_insert(&cfg_parser->cfg->local_data, (yyvsp[0].str))) 4023 fatal_exit("out of memory adding local-data"); 4024 } 4025 #line 4026 "util/configparser.c" /* yacc.c:1646 */ 4026 break; 4027 4028 case 329: 4029 #line 1531 "util/configparser.y" /* yacc.c:1646 */ 4030 { 4031 char* ptr; 4032 OUTYY(("P(server_local_data_ptr:%s)\n", (yyvsp[0].str))); 4033 ptr = cfg_ptr_reverse((yyvsp[0].str)); 4034 free((yyvsp[0].str)); 4035 if(ptr) { 4036 if(!cfg_strlist_insert(&cfg_parser->cfg-> 4037 local_data, ptr)) 4038 fatal_exit("out of memory adding local-data"); 4039 } else { 4040 yyerror("local-data-ptr could not be reversed"); 4041 } 4042 } 4043 #line 4044 "util/configparser.c" /* yacc.c:1646 */ 4044 break; 4045 4046 case 330: 4047 #line 1546 "util/configparser.y" /* yacc.c:1646 */ 4048 { 4049 OUTYY(("P(server_minimal_responses:%s)\n", (yyvsp[0].str))); 4050 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4051 yyerror("expected yes or no."); 4052 else cfg_parser->cfg->minimal_responses = 4053 (strcmp((yyvsp[0].str), "yes")==0); 4054 free((yyvsp[0].str)); 4055 } 4056 #line 4057 "util/configparser.c" /* yacc.c:1646 */ 4057 break; 4058 4059 case 331: 4060 #line 1556 "util/configparser.y" /* yacc.c:1646 */ 4061 { 4062 OUTYY(("P(server_rrset_roundrobin:%s)\n", (yyvsp[0].str))); 4063 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4064 yyerror("expected yes or no."); 4065 else cfg_parser->cfg->rrset_roundrobin = 4066 (strcmp((yyvsp[0].str), "yes")==0); 4067 free((yyvsp[0].str)); 4068 } 4069 #line 4070 "util/configparser.c" /* yacc.c:1646 */ 4070 break; 4071 4072 case 332: 4073 #line 1566 "util/configparser.y" /* yacc.c:1646 */ 4074 { 4075 OUTYY(("P(server_max_udp_size:%s)\n", (yyvsp[0].str))); 4076 cfg_parser->cfg->max_udp_size = atoi((yyvsp[0].str)); 4077 free((yyvsp[0].str)); 4078 } 4079 #line 4080 "util/configparser.c" /* yacc.c:1646 */ 4080 break; 4081 4082 case 333: 4083 #line 1573 "util/configparser.y" /* yacc.c:1646 */ 4084 { 4085 OUTYY(("P(dns64_prefix:%s)\n", (yyvsp[0].str))); 4086 free(cfg_parser->cfg->dns64_prefix); 4087 cfg_parser->cfg->dns64_prefix = (yyvsp[0].str); 4088 } 4089 #line 4090 "util/configparser.c" /* yacc.c:1646 */ 4090 break; 4091 4092 case 334: 4093 #line 1580 "util/configparser.y" /* yacc.c:1646 */ 4094 { 4095 OUTYY(("P(server_dns64_synthall:%s)\n", (yyvsp[0].str))); 4096 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4097 yyerror("expected yes or no."); 4098 else cfg_parser->cfg->dns64_synthall = (strcmp((yyvsp[0].str), "yes")==0); 4099 free((yyvsp[0].str)); 4100 } 4101 #line 4102 "util/configparser.c" /* yacc.c:1646 */ 4102 break; 4103 4104 case 335: 4105 #line 1589 "util/configparser.y" /* yacc.c:1646 */ 4106 { 4107 char* p, *s = (yyvsp[0].str); 4108 OUTYY(("P(server_define_tag:%s)\n", (yyvsp[0].str))); 4109 while((p=strsep(&s, " \t\n")) != NULL) { 4110 if(*p) { 4111 if(!config_add_tag(cfg_parser->cfg, p)) 4112 yyerror("could not define-tag, " 4113 "out of memory"); 4114 } 4115 } 4116 free((yyvsp[0].str)); 4117 } 4118 #line 4119 "util/configparser.c" /* yacc.c:1646 */ 4119 break; 4120 4121 case 336: 4122 #line 1603 "util/configparser.y" /* yacc.c:1646 */ 4123 { 4124 size_t len = 0; 4125 uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, (yyvsp[0].str), 4126 &len); 4127 free((yyvsp[0].str)); 4128 OUTYY(("P(server_local_zone_tag:%s)\n", (yyvsp[-1].str))); 4129 if(!bitlist) 4130 yyerror("could not parse tags, (define-tag them first)"); 4131 if(bitlist) { 4132 if(!cfg_strbytelist_insert( 4133 &cfg_parser->cfg->local_zone_tags, 4134 (yyvsp[-1].str), bitlist, len)) { 4135 yyerror("out of memory"); 4136 free((yyvsp[-1].str)); 4137 } 4138 } 4139 } 4140 #line 4141 "util/configparser.c" /* yacc.c:1646 */ 4141 break; 4142 4143 case 337: 4144 #line 1622 "util/configparser.y" /* yacc.c:1646 */ 4145 { 4146 size_t len = 0; 4147 uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, (yyvsp[0].str), 4148 &len); 4149 free((yyvsp[0].str)); 4150 OUTYY(("P(server_access_control_tag:%s)\n", (yyvsp[-1].str))); 4151 if(!bitlist) 4152 yyerror("could not parse tags, (define-tag them first)"); 4153 if(bitlist) { 4154 if(!cfg_strbytelist_insert( 4155 &cfg_parser->cfg->acl_tags, 4156 (yyvsp[-1].str), bitlist, len)) { 4157 yyerror("out of memory"); 4158 free((yyvsp[-1].str)); 4159 } 4160 } 4161 } 4162 #line 4163 "util/configparser.c" /* yacc.c:1646 */ 4163 break; 4164 4165 case 338: 4166 #line 1641 "util/configparser.y" /* yacc.c:1646 */ 4167 { 4168 OUTYY(("P(server_access_control_tag_action:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str))); 4169 if(!cfg_str3list_insert(&cfg_parser->cfg->acl_tag_actions, 4170 (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str))) { 4171 yyerror("out of memory"); 4172 free((yyvsp[-2].str)); 4173 free((yyvsp[-1].str)); 4174 free((yyvsp[0].str)); 4175 } 4176 } 4177 #line 4178 "util/configparser.c" /* yacc.c:1646 */ 4178 break; 4179 4180 case 339: 4181 #line 1653 "util/configparser.y" /* yacc.c:1646 */ 4182 { 4183 OUTYY(("P(server_access_control_tag_data:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str))); 4184 if(!cfg_str3list_insert(&cfg_parser->cfg->acl_tag_datas, 4185 (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str))) { 4186 yyerror("out of memory"); 4187 free((yyvsp[-2].str)); 4188 free((yyvsp[-1].str)); 4189 free((yyvsp[0].str)); 4190 } 4191 } 4192 #line 4193 "util/configparser.c" /* yacc.c:1646 */ 4193 break; 4194 4195 case 340: 4196 #line 1665 "util/configparser.y" /* yacc.c:1646 */ 4197 { 4198 OUTYY(("P(server_local_zone_override:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str))); 4199 if(!cfg_str3list_insert(&cfg_parser->cfg->local_zone_overrides, 4200 (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str))) { 4201 yyerror("out of memory"); 4202 free((yyvsp[-2].str)); 4203 free((yyvsp[-1].str)); 4204 free((yyvsp[0].str)); 4205 } 4206 } 4207 #line 4208 "util/configparser.c" /* yacc.c:1646 */ 4208 break; 4209 4210 case 341: 4211 #line 1677 "util/configparser.y" /* yacc.c:1646 */ 4212 { 4213 OUTYY(("P(server_access_control_view:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); 4214 if(!cfg_str2list_insert(&cfg_parser->cfg->acl_view, 4215 (yyvsp[-1].str), (yyvsp[0].str))) { 4216 yyerror("out of memory"); 4217 free((yyvsp[-1].str)); 4218 free((yyvsp[0].str)); 4219 } 4220 } 4221 #line 4222 "util/configparser.c" /* yacc.c:1646 */ 4222 break; 4223 4224 case 342: 4225 #line 1688 "util/configparser.y" /* yacc.c:1646 */ 4226 { 4227 size_t len = 0; 4228 uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, (yyvsp[0].str), 4229 &len); 4230 free((yyvsp[0].str)); 4231 OUTYY(("P(response_ip_tag:%s)\n", (yyvsp[-1].str))); 4232 if(!bitlist) 4233 yyerror("could not parse tags, (define-tag them first)"); 4234 if(bitlist) { 4235 if(!cfg_strbytelist_insert( 4236 &cfg_parser->cfg->respip_tags, 4237 (yyvsp[-1].str), bitlist, len)) { 4238 yyerror("out of memory"); 4239 free((yyvsp[-1].str)); 4240 } 4241 } 4242 } 4243 #line 4244 "util/configparser.c" /* yacc.c:1646 */ 4244 break; 4245 4246 case 343: 4247 #line 1707 "util/configparser.y" /* yacc.c:1646 */ 4248 { 4249 OUTYY(("P(server_ip_ratelimit:%s)\n", (yyvsp[0].str))); 4250 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 4251 yyerror("number expected"); 4252 else cfg_parser->cfg->ip_ratelimit = atoi((yyvsp[0].str)); 4253 free((yyvsp[0].str)); 4254 } 4255 #line 4256 "util/configparser.c" /* yacc.c:1646 */ 4256 break; 4257 4258 case 344: 4259 #line 1717 "util/configparser.y" /* yacc.c:1646 */ 4260 { 4261 OUTYY(("P(server_ratelimit:%s)\n", (yyvsp[0].str))); 4262 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 4263 yyerror("number expected"); 4264 else cfg_parser->cfg->ratelimit = atoi((yyvsp[0].str)); 4265 free((yyvsp[0].str)); 4266 } 4267 #line 4268 "util/configparser.c" /* yacc.c:1646 */ 4268 break; 4269 4270 case 345: 4271 #line 1726 "util/configparser.y" /* yacc.c:1646 */ 4272 { 4273 OUTYY(("P(server_ip_ratelimit_size:%s)\n", (yyvsp[0].str))); 4274 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->ip_ratelimit_size)) 4275 yyerror("memory size expected"); 4276 free((yyvsp[0].str)); 4277 } 4278 #line 4279 "util/configparser.c" /* yacc.c:1646 */ 4279 break; 4280 4281 case 346: 4282 #line 1734 "util/configparser.y" /* yacc.c:1646 */ 4283 { 4284 OUTYY(("P(server_ratelimit_size:%s)\n", (yyvsp[0].str))); 4285 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->ratelimit_size)) 4286 yyerror("memory size expected"); 4287 free((yyvsp[0].str)); 4288 } 4289 #line 4290 "util/configparser.c" /* yacc.c:1646 */ 4290 break; 4291 4292 case 347: 4293 #line 1742 "util/configparser.y" /* yacc.c:1646 */ 4294 { 4295 OUTYY(("P(server_ip_ratelimit_slabs:%s)\n", (yyvsp[0].str))); 4296 if(atoi((yyvsp[0].str)) == 0) 4297 yyerror("number expected"); 4298 else { 4299 cfg_parser->cfg->ip_ratelimit_slabs = atoi((yyvsp[0].str)); 4300 if(!is_pow2(cfg_parser->cfg->ip_ratelimit_slabs)) 4301 yyerror("must be a power of 2"); 4302 } 4303 free((yyvsp[0].str)); 4304 } 4305 #line 4306 "util/configparser.c" /* yacc.c:1646 */ 4306 break; 4307 4308 case 348: 4309 #line 1755 "util/configparser.y" /* yacc.c:1646 */ 4310 { 4311 OUTYY(("P(server_ratelimit_slabs:%s)\n", (yyvsp[0].str))); 4312 if(atoi((yyvsp[0].str)) == 0) 4313 yyerror("number expected"); 4314 else { 4315 cfg_parser->cfg->ratelimit_slabs = atoi((yyvsp[0].str)); 4316 if(!is_pow2(cfg_parser->cfg->ratelimit_slabs)) 4317 yyerror("must be a power of 2"); 4318 } 4319 free((yyvsp[0].str)); 4320 } 4321 #line 4322 "util/configparser.c" /* yacc.c:1646 */ 4322 break; 4323 4324 case 349: 4325 #line 1768 "util/configparser.y" /* yacc.c:1646 */ 4326 { 4327 OUTYY(("P(server_ratelimit_for_domain:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); 4328 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) { 4329 yyerror("number expected"); 4330 } else { 4331 if(!cfg_str2list_insert(&cfg_parser->cfg-> 4332 ratelimit_for_domain, (yyvsp[-1].str), (yyvsp[0].str))) 4333 fatal_exit("out of memory adding " 4334 "ratelimit-for-domain"); 4335 } 4336 } 4337 #line 4338 "util/configparser.c" /* yacc.c:1646 */ 4338 break; 4339 4340 case 350: 4341 #line 1781 "util/configparser.y" /* yacc.c:1646 */ 4342 { 4343 OUTYY(("P(server_ratelimit_below_domain:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); 4344 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) { 4345 yyerror("number expected"); 4346 } else { 4347 if(!cfg_str2list_insert(&cfg_parser->cfg-> 4348 ratelimit_below_domain, (yyvsp[-1].str), (yyvsp[0].str))) 4349 fatal_exit("out of memory adding " 4350 "ratelimit-below-domain"); 4351 } 4352 } 4353 #line 4354 "util/configparser.c" /* yacc.c:1646 */ 4354 break; 4355 4356 case 351: 4357 #line 1794 "util/configparser.y" /* yacc.c:1646 */ 4358 { 4359 OUTYY(("P(server_ip_ratelimit_factor:%s)\n", (yyvsp[0].str))); 4360 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 4361 yyerror("number expected"); 4362 else cfg_parser->cfg->ip_ratelimit_factor = atoi((yyvsp[0].str)); 4363 free((yyvsp[0].str)); 4364 } 4365 #line 4366 "util/configparser.c" /* yacc.c:1646 */ 4366 break; 4367 4368 case 352: 4369 #line 1803 "util/configparser.y" /* yacc.c:1646 */ 4370 { 4371 OUTYY(("P(server_ratelimit_factor:%s)\n", (yyvsp[0].str))); 4372 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 4373 yyerror("number expected"); 4374 else cfg_parser->cfg->ratelimit_factor = atoi((yyvsp[0].str)); 4375 free((yyvsp[0].str)); 4376 } 4377 #line 4378 "util/configparser.c" /* yacc.c:1646 */ 4378 break; 4379 4380 case 353: 4381 #line 1812 "util/configparser.y" /* yacc.c:1646 */ 4382 { 4383 OUTYY(("P(server_qname_minimisation:%s)\n", (yyvsp[0].str))); 4384 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4385 yyerror("expected yes or no."); 4386 else cfg_parser->cfg->qname_minimisation = 4387 (strcmp((yyvsp[0].str), "yes")==0); 4388 free((yyvsp[0].str)); 4389 } 4390 #line 4391 "util/configparser.c" /* yacc.c:1646 */ 4391 break; 4392 4393 case 354: 4394 #line 1822 "util/configparser.y" /* yacc.c:1646 */ 4395 { 4396 OUTYY(("P(server_qname_minimisation_strict:%s)\n", (yyvsp[0].str))); 4397 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4398 yyerror("expected yes or no."); 4399 else cfg_parser->cfg->qname_minimisation_strict = 4400 (strcmp((yyvsp[0].str), "yes")==0); 4401 free((yyvsp[0].str)); 4402 } 4403 #line 4404 "util/configparser.c" /* yacc.c:1646 */ 4404 break; 4405 4406 case 355: 4407 #line 1832 "util/configparser.y" /* yacc.c:1646 */ 4408 { 4409 #ifdef USE_IPSECMOD 4410 OUTYY(("P(server_ipsecmod_enabled:%s)\n", (yyvsp[0].str))); 4411 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4412 yyerror("expected yes or no."); 4413 else cfg_parser->cfg->ipsecmod_enabled = (strcmp((yyvsp[0].str), "yes")==0); 4414 free((yyvsp[0].str)); 4415 #else 4416 OUTYY(("P(Compiled without IPsec module, ignoring)\n")); 4417 #endif 4418 } 4419 #line 4420 "util/configparser.c" /* yacc.c:1646 */ 4420 break; 4421 4422 case 356: 4423 #line 1845 "util/configparser.y" /* yacc.c:1646 */ 4424 { 4425 #ifdef USE_IPSECMOD 4426 OUTYY(("P(server_ipsecmod_ignore_bogus:%s)\n", (yyvsp[0].str))); 4427 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4428 yyerror("expected yes or no."); 4429 else cfg_parser->cfg->ipsecmod_ignore_bogus = (strcmp((yyvsp[0].str), "yes")==0); 4430 free((yyvsp[0].str)); 4431 #else 4432 OUTYY(("P(Compiled without IPsec module, ignoring)\n")); 4433 #endif 4434 } 4435 #line 4436 "util/configparser.c" /* yacc.c:1646 */ 4436 break; 4437 4438 case 357: 4439 #line 1858 "util/configparser.y" /* yacc.c:1646 */ 4440 { 4441 #ifdef USE_IPSECMOD 4442 OUTYY(("P(server_ipsecmod_hook:%s)\n", (yyvsp[0].str))); 4443 free(cfg_parser->cfg->ipsecmod_hook); 4444 cfg_parser->cfg->ipsecmod_hook = (yyvsp[0].str); 4445 #else 4446 OUTYY(("P(Compiled without IPsec module, ignoring)\n")); 4447 #endif 4448 } 4449 #line 4450 "util/configparser.c" /* yacc.c:1646 */ 4450 break; 4451 4452 case 358: 4453 #line 1869 "util/configparser.y" /* yacc.c:1646 */ 4454 { 4455 #ifdef USE_IPSECMOD 4456 OUTYY(("P(server_ipsecmod_max_ttl:%s)\n", (yyvsp[0].str))); 4457 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) 4458 yyerror("number expected"); 4459 else cfg_parser->cfg->ipsecmod_max_ttl = atoi((yyvsp[0].str)); 4460 free((yyvsp[0].str)); 4461 #else 4462 OUTYY(("P(Compiled without IPsec module, ignoring)\n")); 4463 #endif 4464 } 4465 #line 4466 "util/configparser.c" /* yacc.c:1646 */ 4466 break; 4467 4468 case 359: 4469 #line 1882 "util/configparser.y" /* yacc.c:1646 */ 4470 { 4471 #ifdef USE_IPSECMOD 4472 OUTYY(("P(server_ipsecmod_whitelist:%s)\n", (yyvsp[0].str))); 4473 if(!cfg_strlist_insert(&cfg_parser->cfg->ipsecmod_whitelist, (yyvsp[0].str))) 4474 yyerror("out of memory"); 4475 #else 4476 OUTYY(("P(Compiled without IPsec module, ignoring)\n")); 4477 #endif 4478 } 4479 #line 4480 "util/configparser.c" /* yacc.c:1646 */ 4480 break; 4481 4482 case 360: 4483 #line 1893 "util/configparser.y" /* yacc.c:1646 */ 4484 { 4485 #ifdef USE_IPSECMOD 4486 OUTYY(("P(server_ipsecmod_strict:%s)\n", (yyvsp[0].str))); 4487 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4488 yyerror("expected yes or no."); 4489 else cfg_parser->cfg->ipsecmod_strict = (strcmp((yyvsp[0].str), "yes")==0); 4490 free((yyvsp[0].str)); 4491 #else 4492 OUTYY(("P(Compiled without IPsec module, ignoring)\n")); 4493 #endif 4494 } 4495 #line 4496 "util/configparser.c" /* yacc.c:1646 */ 4496 break; 4497 4498 case 361: 4499 #line 1906 "util/configparser.y" /* yacc.c:1646 */ 4500 { 4501 OUTYY(("P(name:%s)\n", (yyvsp[0].str))); 4502 if(cfg_parser->cfg->stubs->name) 4503 yyerror("stub name override, there must be one name " 4504 "for one stub-zone"); 4505 free(cfg_parser->cfg->stubs->name); 4506 cfg_parser->cfg->stubs->name = (yyvsp[0].str); 4507 } 4508 #line 4509 "util/configparser.c" /* yacc.c:1646 */ 4509 break; 4510 4511 case 362: 4512 #line 1916 "util/configparser.y" /* yacc.c:1646 */ 4513 { 4514 OUTYY(("P(stub-host:%s)\n", (yyvsp[0].str))); 4515 if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->hosts, (yyvsp[0].str))) 4516 yyerror("out of memory"); 4517 } 4518 #line 4519 "util/configparser.c" /* yacc.c:1646 */ 4519 break; 4520 4521 case 363: 4522 #line 1923 "util/configparser.y" /* yacc.c:1646 */ 4523 { 4524 OUTYY(("P(stub-addr:%s)\n", (yyvsp[0].str))); 4525 if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->addrs, (yyvsp[0].str))) 4526 yyerror("out of memory"); 4527 } 4528 #line 4529 "util/configparser.c" /* yacc.c:1646 */ 4529 break; 4530 4531 case 364: 4532 #line 1930 "util/configparser.y" /* yacc.c:1646 */ 4533 { 4534 OUTYY(("P(stub-first:%s)\n", (yyvsp[0].str))); 4535 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4536 yyerror("expected yes or no."); 4537 else cfg_parser->cfg->stubs->isfirst=(strcmp((yyvsp[0].str), "yes")==0); 4538 free((yyvsp[0].str)); 4539 } 4540 #line 4541 "util/configparser.c" /* yacc.c:1646 */ 4541 break; 4542 4543 case 365: 4544 #line 1939 "util/configparser.y" /* yacc.c:1646 */ 4545 { 4546 OUTYY(("P(stub-ssl-upstream:%s)\n", (yyvsp[0].str))); 4547 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4548 yyerror("expected yes or no."); 4549 else cfg_parser->cfg->stubs->ssl_upstream = 4550 (strcmp((yyvsp[0].str), "yes")==0); 4551 free((yyvsp[0].str)); 4552 } 4553 #line 4554 "util/configparser.c" /* yacc.c:1646 */ 4554 break; 4555 4556 case 366: 4557 #line 1949 "util/configparser.y" /* yacc.c:1646 */ 4558 { 4559 OUTYY(("P(stub-prime:%s)\n", (yyvsp[0].str))); 4560 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4561 yyerror("expected yes or no."); 4562 else cfg_parser->cfg->stubs->isprime = 4563 (strcmp((yyvsp[0].str), "yes")==0); 4564 free((yyvsp[0].str)); 4565 } 4566 #line 4567 "util/configparser.c" /* yacc.c:1646 */ 4567 break; 4568 4569 case 367: 4570 #line 1959 "util/configparser.y" /* yacc.c:1646 */ 4571 { 4572 OUTYY(("P(name:%s)\n", (yyvsp[0].str))); 4573 if(cfg_parser->cfg->forwards->name) 4574 yyerror("forward name override, there must be one " 4575 "name for one forward-zone"); 4576 free(cfg_parser->cfg->forwards->name); 4577 cfg_parser->cfg->forwards->name = (yyvsp[0].str); 4578 } 4579 #line 4580 "util/configparser.c" /* yacc.c:1646 */ 4580 break; 4581 4582 case 368: 4583 #line 1969 "util/configparser.y" /* yacc.c:1646 */ 4584 { 4585 OUTYY(("P(forward-host:%s)\n", (yyvsp[0].str))); 4586 if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->hosts, (yyvsp[0].str))) 4587 yyerror("out of memory"); 4588 } 4589 #line 4590 "util/configparser.c" /* yacc.c:1646 */ 4590 break; 4591 4592 case 369: 4593 #line 1976 "util/configparser.y" /* yacc.c:1646 */ 4594 { 4595 OUTYY(("P(forward-addr:%s)\n", (yyvsp[0].str))); 4596 if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->addrs, (yyvsp[0].str))) 4597 yyerror("out of memory"); 4598 } 4599 #line 4600 "util/configparser.c" /* yacc.c:1646 */ 4600 break; 4601 4602 case 370: 4603 #line 1983 "util/configparser.y" /* yacc.c:1646 */ 4604 { 4605 OUTYY(("P(forward-first:%s)\n", (yyvsp[0].str))); 4606 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4607 yyerror("expected yes or no."); 4608 else cfg_parser->cfg->forwards->isfirst=(strcmp((yyvsp[0].str), "yes")==0); 4609 free((yyvsp[0].str)); 4610 } 4611 #line 4612 "util/configparser.c" /* yacc.c:1646 */ 4612 break; 4613 4614 case 371: 4615 #line 1992 "util/configparser.y" /* yacc.c:1646 */ 4616 { 4617 OUTYY(("P(forward-ssl-upstream:%s)\n", (yyvsp[0].str))); 4618 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4619 yyerror("expected yes or no."); 4620 else cfg_parser->cfg->forwards->ssl_upstream = 4621 (strcmp((yyvsp[0].str), "yes")==0); 4622 free((yyvsp[0].str)); 4623 } 4624 #line 4625 "util/configparser.c" /* yacc.c:1646 */ 4625 break; 4626 4627 case 372: 4628 #line 2002 "util/configparser.y" /* yacc.c:1646 */ 4629 { 4630 OUTYY(("P(name:%s)\n", (yyvsp[0].str))); 4631 if(cfg_parser->cfg->views->name) 4632 yyerror("view name override, there must be one " 4633 "name for one view"); 4634 free(cfg_parser->cfg->views->name); 4635 cfg_parser->cfg->views->name = (yyvsp[0].str); 4636 } 4637 #line 4638 "util/configparser.c" /* yacc.c:1646 */ 4638 break; 4639 4640 case 373: 4641 #line 2012 "util/configparser.y" /* yacc.c:1646 */ 4642 { 4643 OUTYY(("P(view_local_zone:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); 4644 if(strcmp((yyvsp[0].str), "static")!=0 && strcmp((yyvsp[0].str), "deny")!=0 && 4645 strcmp((yyvsp[0].str), "refuse")!=0 && strcmp((yyvsp[0].str), "redirect")!=0 && 4646 strcmp((yyvsp[0].str), "transparent")!=0 && strcmp((yyvsp[0].str), "nodefault")!=0 4647 && strcmp((yyvsp[0].str), "typetransparent")!=0 4648 && strcmp((yyvsp[0].str), "always_transparent")!=0 4649 && strcmp((yyvsp[0].str), "always_refuse")!=0 4650 && strcmp((yyvsp[0].str), "always_nxdomain")!=0 4651 && strcmp((yyvsp[0].str), "inform")!=0 && strcmp((yyvsp[0].str), "inform_deny")!=0) 4652 yyerror("local-zone type: expected static, deny, " 4653 "refuse, redirect, transparent, " 4654 "typetransparent, inform, inform_deny, " 4655 "always_transparent, always_refuse, " 4656 "always_nxdomain or nodefault"); 4657 else if(strcmp((yyvsp[0].str), "nodefault")==0) { 4658 if(!cfg_strlist_insert(&cfg_parser->cfg->views-> 4659 local_zones_nodefault, (yyvsp[-1].str))) 4660 fatal_exit("out of memory adding local-zone"); 4661 free((yyvsp[0].str)); 4662 } else { 4663 if(!cfg_str2list_insert( 4664 &cfg_parser->cfg->views->local_zones, 4665 (yyvsp[-1].str), (yyvsp[0].str))) 4666 fatal_exit("out of memory adding local-zone"); 4667 } 4668 } 4669 #line 4670 "util/configparser.c" /* yacc.c:1646 */ 4670 break; 4671 4672 case 374: 4673 #line 2041 "util/configparser.y" /* yacc.c:1646 */ 4674 { 4675 OUTYY(("P(view_response_ip:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); 4676 validate_respip_action((yyvsp[0].str)); 4677 if(!cfg_str2list_insert( 4678 &cfg_parser->cfg->views->respip_actions, (yyvsp[-1].str), (yyvsp[0].str))) 4679 fatal_exit("out of memory adding per-view " 4680 "response-ip action"); 4681 } 4682 #line 4683 "util/configparser.c" /* yacc.c:1646 */ 4683 break; 4684 4685 case 375: 4686 #line 2051 "util/configparser.y" /* yacc.c:1646 */ 4687 { 4688 OUTYY(("P(view_response_ip_data:%s)\n", (yyvsp[-1].str))); 4689 if(!cfg_str2list_insert( 4690 &cfg_parser->cfg->views->respip_data, (yyvsp[-1].str), (yyvsp[0].str))) 4691 fatal_exit("out of memory adding response-ip-data"); 4692 } 4693 #line 4694 "util/configparser.c" /* yacc.c:1646 */ 4694 break; 4695 4696 case 376: 4697 #line 2059 "util/configparser.y" /* yacc.c:1646 */ 4698 { 4699 OUTYY(("P(view_local_data:%s)\n", (yyvsp[0].str))); 4700 if(!cfg_strlist_insert(&cfg_parser->cfg->views->local_data, (yyvsp[0].str))) { 4701 fatal_exit("out of memory adding local-data"); 4702 free((yyvsp[0].str)); 4703 } 4704 } 4705 #line 4706 "util/configparser.c" /* yacc.c:1646 */ 4706 break; 4707 4708 case 377: 4709 #line 2068 "util/configparser.y" /* yacc.c:1646 */ 4710 { 4711 char* ptr; 4712 OUTYY(("P(view_local_data_ptr:%s)\n", (yyvsp[0].str))); 4713 ptr = cfg_ptr_reverse((yyvsp[0].str)); 4714 free((yyvsp[0].str)); 4715 if(ptr) { 4716 if(!cfg_strlist_insert(&cfg_parser->cfg->views-> 4717 local_data, ptr)) 4718 fatal_exit("out of memory adding local-data"); 4719 } else { 4720 yyerror("local-data-ptr could not be reversed"); 4721 } 4722 } 4723 #line 4724 "util/configparser.c" /* yacc.c:1646 */ 4724 break; 4725 4726 case 378: 4727 #line 2083 "util/configparser.y" /* yacc.c:1646 */ 4728 { 4729 OUTYY(("P(view-first:%s)\n", (yyvsp[0].str))); 4730 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4731 yyerror("expected yes or no."); 4732 else cfg_parser->cfg->views->isfirst=(strcmp((yyvsp[0].str), "yes")==0); 4733 free((yyvsp[0].str)); 4734 } 4735 #line 4736 "util/configparser.c" /* yacc.c:1646 */ 4736 break; 4737 4738 case 379: 4739 #line 2092 "util/configparser.y" /* yacc.c:1646 */ 4740 { 4741 OUTYY(("\nP(remote-control:)\n")); 4742 } 4743 #line 4744 "util/configparser.c" /* yacc.c:1646 */ 4744 break; 4745 4746 case 390: 4747 #line 2103 "util/configparser.y" /* yacc.c:1646 */ 4748 { 4749 OUTYY(("P(control_enable:%s)\n", (yyvsp[0].str))); 4750 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4751 yyerror("expected yes or no."); 4752 else cfg_parser->cfg->remote_control_enable = 4753 (strcmp((yyvsp[0].str), "yes")==0); 4754 free((yyvsp[0].str)); 4755 } 4756 #line 4757 "util/configparser.c" /* yacc.c:1646 */ 4757 break; 4758 4759 case 391: 4760 #line 2113 "util/configparser.y" /* yacc.c:1646 */ 4761 { 4762 OUTYY(("P(control_port:%s)\n", (yyvsp[0].str))); 4763 if(atoi((yyvsp[0].str)) == 0) 4764 yyerror("control port number expected"); 4765 else cfg_parser->cfg->control_port = atoi((yyvsp[0].str)); 4766 free((yyvsp[0].str)); 4767 } 4768 #line 4769 "util/configparser.c" /* yacc.c:1646 */ 4769 break; 4770 4771 case 392: 4772 #line 2122 "util/configparser.y" /* yacc.c:1646 */ 4773 { 4774 OUTYY(("P(control_interface:%s)\n", (yyvsp[0].str))); 4775 if(!cfg_strlist_insert(&cfg_parser->cfg->control_ifs, (yyvsp[0].str))) 4776 yyerror("out of memory"); 4777 } 4778 #line 4779 "util/configparser.c" /* yacc.c:1646 */ 4779 break; 4780 4781 case 393: 4782 #line 2129 "util/configparser.y" /* yacc.c:1646 */ 4783 { 4784 OUTYY(("P(control_use_cert:%s)\n", (yyvsp[0].str))); 4785 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4786 yyerror("expected yes or no."); 4787 else cfg_parser->cfg->remote_control_use_cert = 4788 (strcmp((yyvsp[0].str), "yes")==0); 4789 free((yyvsp[0].str)); 4790 } 4791 #line 4792 "util/configparser.c" /* yacc.c:1646 */ 4792 break; 4793 4794 case 394: 4795 #line 2139 "util/configparser.y" /* yacc.c:1646 */ 4796 { 4797 OUTYY(("P(rc_server_key_file:%s)\n", (yyvsp[0].str))); 4798 free(cfg_parser->cfg->server_key_file); 4799 cfg_parser->cfg->server_key_file = (yyvsp[0].str); 4800 } 4801 #line 4802 "util/configparser.c" /* yacc.c:1646 */ 4802 break; 4803 4804 case 395: 4805 #line 2146 "util/configparser.y" /* yacc.c:1646 */ 4806 { 4807 OUTYY(("P(rc_server_cert_file:%s)\n", (yyvsp[0].str))); 4808 free(cfg_parser->cfg->server_cert_file); 4809 cfg_parser->cfg->server_cert_file = (yyvsp[0].str); 4810 } 4811 #line 4812 "util/configparser.c" /* yacc.c:1646 */ 4812 break; 4813 4814 case 396: 4815 #line 2153 "util/configparser.y" /* yacc.c:1646 */ 4816 { 4817 OUTYY(("P(rc_control_key_file:%s)\n", (yyvsp[0].str))); 4818 free(cfg_parser->cfg->control_key_file); 4819 cfg_parser->cfg->control_key_file = (yyvsp[0].str); 4820 } 4821 #line 4822 "util/configparser.c" /* yacc.c:1646 */ 4822 break; 4823 4824 case 397: 4825 #line 2160 "util/configparser.y" /* yacc.c:1646 */ 4826 { 4827 OUTYY(("P(rc_control_cert_file:%s)\n", (yyvsp[0].str))); 4828 free(cfg_parser->cfg->control_cert_file); 4829 cfg_parser->cfg->control_cert_file = (yyvsp[0].str); 4830 } 4831 #line 4832 "util/configparser.c" /* yacc.c:1646 */ 4832 break; 4833 4834 case 398: 4835 #line 2167 "util/configparser.y" /* yacc.c:1646 */ 4836 { 4837 OUTYY(("\nP(dnstap:)\n")); 4838 } 4839 #line 4840 "util/configparser.c" /* yacc.c:1646 */ 4840 break; 4841 4842 case 413: 4843 #line 2184 "util/configparser.y" /* yacc.c:1646 */ 4844 { 4845 OUTYY(("P(dt_dnstap_enable:%s)\n", (yyvsp[0].str))); 4846 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4847 yyerror("expected yes or no."); 4848 else cfg_parser->cfg->dnstap = (strcmp((yyvsp[0].str), "yes")==0); 4849 } 4850 #line 4851 "util/configparser.c" /* yacc.c:1646 */ 4851 break; 4852 4853 case 414: 4854 #line 2192 "util/configparser.y" /* yacc.c:1646 */ 4855 { 4856 OUTYY(("P(dt_dnstap_socket_path:%s)\n", (yyvsp[0].str))); 4857 free(cfg_parser->cfg->dnstap_socket_path); 4858 cfg_parser->cfg->dnstap_socket_path = (yyvsp[0].str); 4859 } 4860 #line 4861 "util/configparser.c" /* yacc.c:1646 */ 4861 break; 4862 4863 case 415: 4864 #line 2199 "util/configparser.y" /* yacc.c:1646 */ 4865 { 4866 OUTYY(("P(dt_dnstap_send_identity:%s)\n", (yyvsp[0].str))); 4867 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4868 yyerror("expected yes or no."); 4869 else cfg_parser->cfg->dnstap_send_identity = (strcmp((yyvsp[0].str), "yes")==0); 4870 } 4871 #line 4872 "util/configparser.c" /* yacc.c:1646 */ 4872 break; 4873 4874 case 416: 4875 #line 2207 "util/configparser.y" /* yacc.c:1646 */ 4876 { 4877 OUTYY(("P(dt_dnstap_send_version:%s)\n", (yyvsp[0].str))); 4878 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4879 yyerror("expected yes or no."); 4880 else cfg_parser->cfg->dnstap_send_version = (strcmp((yyvsp[0].str), "yes")==0); 4881 } 4882 #line 4883 "util/configparser.c" /* yacc.c:1646 */ 4883 break; 4884 4885 case 417: 4886 #line 2215 "util/configparser.y" /* yacc.c:1646 */ 4887 { 4888 OUTYY(("P(dt_dnstap_identity:%s)\n", (yyvsp[0].str))); 4889 free(cfg_parser->cfg->dnstap_identity); 4890 cfg_parser->cfg->dnstap_identity = (yyvsp[0].str); 4891 } 4892 #line 4893 "util/configparser.c" /* yacc.c:1646 */ 4893 break; 4894 4895 case 418: 4896 #line 2222 "util/configparser.y" /* yacc.c:1646 */ 4897 { 4898 OUTYY(("P(dt_dnstap_version:%s)\n", (yyvsp[0].str))); 4899 free(cfg_parser->cfg->dnstap_version); 4900 cfg_parser->cfg->dnstap_version = (yyvsp[0].str); 4901 } 4902 #line 4903 "util/configparser.c" /* yacc.c:1646 */ 4903 break; 4904 4905 case 419: 4906 #line 2229 "util/configparser.y" /* yacc.c:1646 */ 4907 { 4908 OUTYY(("P(dt_dnstap_log_resolver_query_messages:%s)\n", (yyvsp[0].str))); 4909 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4910 yyerror("expected yes or no."); 4911 else cfg_parser->cfg->dnstap_log_resolver_query_messages = 4912 (strcmp((yyvsp[0].str), "yes")==0); 4913 } 4914 #line 4915 "util/configparser.c" /* yacc.c:1646 */ 4915 break; 4916 4917 case 420: 4918 #line 2238 "util/configparser.y" /* yacc.c:1646 */ 4919 { 4920 OUTYY(("P(dt_dnstap_log_resolver_response_messages:%s)\n", (yyvsp[0].str))); 4921 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4922 yyerror("expected yes or no."); 4923 else cfg_parser->cfg->dnstap_log_resolver_response_messages = 4924 (strcmp((yyvsp[0].str), "yes")==0); 4925 } 4926 #line 4927 "util/configparser.c" /* yacc.c:1646 */ 4927 break; 4928 4929 case 421: 4930 #line 2247 "util/configparser.y" /* yacc.c:1646 */ 4931 { 4932 OUTYY(("P(dt_dnstap_log_client_query_messages:%s)\n", (yyvsp[0].str))); 4933 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4934 yyerror("expected yes or no."); 4935 else cfg_parser->cfg->dnstap_log_client_query_messages = 4936 (strcmp((yyvsp[0].str), "yes")==0); 4937 } 4938 #line 4939 "util/configparser.c" /* yacc.c:1646 */ 4939 break; 4940 4941 case 422: 4942 #line 2256 "util/configparser.y" /* yacc.c:1646 */ 4943 { 4944 OUTYY(("P(dt_dnstap_log_client_response_messages:%s)\n", (yyvsp[0].str))); 4945 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4946 yyerror("expected yes or no."); 4947 else cfg_parser->cfg->dnstap_log_client_response_messages = 4948 (strcmp((yyvsp[0].str), "yes")==0); 4949 } 4950 #line 4951 "util/configparser.c" /* yacc.c:1646 */ 4951 break; 4952 4953 case 423: 4954 #line 2265 "util/configparser.y" /* yacc.c:1646 */ 4955 { 4956 OUTYY(("P(dt_dnstap_log_forwarder_query_messages:%s)\n", (yyvsp[0].str))); 4957 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4958 yyerror("expected yes or no."); 4959 else cfg_parser->cfg->dnstap_log_forwarder_query_messages = 4960 (strcmp((yyvsp[0].str), "yes")==0); 4961 } 4962 #line 4963 "util/configparser.c" /* yacc.c:1646 */ 4963 break; 4964 4965 case 424: 4966 #line 2274 "util/configparser.y" /* yacc.c:1646 */ 4967 { 4968 OUTYY(("P(dt_dnstap_log_forwarder_response_messages:%s)\n", (yyvsp[0].str))); 4969 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 4970 yyerror("expected yes or no."); 4971 else cfg_parser->cfg->dnstap_log_forwarder_response_messages = 4972 (strcmp((yyvsp[0].str), "yes")==0); 4973 } 4974 #line 4975 "util/configparser.c" /* yacc.c:1646 */ 4975 break; 4976 4977 case 425: 4978 #line 2283 "util/configparser.y" /* yacc.c:1646 */ 4979 { 4980 OUTYY(("\nP(python:)\n")); 4981 } 4982 #line 4983 "util/configparser.c" /* yacc.c:1646 */ 4983 break; 4984 4985 case 429: 4986 #line 2292 "util/configparser.y" /* yacc.c:1646 */ 4987 { 4988 OUTYY(("P(python-script:%s)\n", (yyvsp[0].str))); 4989 free(cfg_parser->cfg->python_script); 4990 cfg_parser->cfg->python_script = (yyvsp[0].str); 4991 } 4992 #line 4993 "util/configparser.c" /* yacc.c:1646 */ 4993 break; 4994 4995 case 430: 4996 #line 2298 "util/configparser.y" /* yacc.c:1646 */ 4997 { 4998 OUTYY(("P(disable_dnssec_lame_check:%s)\n", (yyvsp[0].str))); 4999 if (strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 5000 yyerror("expected yes or no."); 5001 else cfg_parser->cfg->disable_dnssec_lame_check = 5002 (strcmp((yyvsp[0].str), "yes")==0); 5003 free((yyvsp[0].str)); 5004 } 5005 #line 5006 "util/configparser.c" /* yacc.c:1646 */ 5006 break; 5007 5008 case 431: 5009 #line 2308 "util/configparser.y" /* yacc.c:1646 */ 5010 { 5011 OUTYY(("P(server_log_identity:%s)\n", (yyvsp[0].str))); 5012 free(cfg_parser->cfg->log_identity); 5013 cfg_parser->cfg->log_identity = (yyvsp[0].str); 5014 } 5015 #line 5016 "util/configparser.c" /* yacc.c:1646 */ 5016 break; 5017 5018 case 432: 5019 #line 2315 "util/configparser.y" /* yacc.c:1646 */ 5020 { 5021 OUTYY(("P(server_response_ip:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); 5022 validate_respip_action((yyvsp[0].str)); 5023 if(!cfg_str2list_insert(&cfg_parser->cfg->respip_actions, 5024 (yyvsp[-1].str), (yyvsp[0].str))) 5025 fatal_exit("out of memory adding response-ip"); 5026 } 5027 #line 5028 "util/configparser.c" /* yacc.c:1646 */ 5028 break; 5029 5030 case 433: 5031 #line 2324 "util/configparser.y" /* yacc.c:1646 */ 5032 { 5033 OUTYY(("P(server_response_ip_data:%s)\n", (yyvsp[-1].str))); 5034 if(!cfg_str2list_insert(&cfg_parser->cfg->respip_data, 5035 (yyvsp[-1].str), (yyvsp[0].str))) 5036 fatal_exit("out of memory adding response-ip-data"); 5037 } 5038 #line 5039 "util/configparser.c" /* yacc.c:1646 */ 5039 break; 5040 5041 case 434: 5042 #line 2332 "util/configparser.y" /* yacc.c:1646 */ 5043 { 5044 OUTYY(("\nP(dnscrypt:)\n")); 5045 OUTYY(("\nP(dnscrypt:)\n")); 5046 } 5047 #line 5048 "util/configparser.c" /* yacc.c:1646 */ 5048 break; 5049 5050 case 446: 5051 #line 2348 "util/configparser.y" /* yacc.c:1646 */ 5052 { 5053 OUTYY(("P(dnsc_dnscrypt_enable:%s)\n", (yyvsp[0].str))); 5054 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) 5055 yyerror("expected yes or no."); 5056 else cfg_parser->cfg->dnscrypt = (strcmp((yyvsp[0].str), "yes")==0); 5057 free((yyvsp[0].str)); 5058 } 5059 #line 5060 "util/configparser.c" /* yacc.c:1646 */ 5060 break; 5061 5062 case 447: 5063 #line 2358 "util/configparser.y" /* yacc.c:1646 */ 5064 { 5065 OUTYY(("P(dnsc_dnscrypt_port:%s)\n", (yyvsp[0].str))); 5066 5067 if(atoi((yyvsp[0].str)) == 0) 5068 yyerror("port number expected"); 5069 else cfg_parser->cfg->dnscrypt_port = atoi((yyvsp[0].str)); 5070 free((yyvsp[0].str)); 5071 } 5072 #line 5073 "util/configparser.c" /* yacc.c:1646 */ 5073 break; 5074 5075 case 448: 5076 #line 2368 "util/configparser.y" /* yacc.c:1646 */ 5077 { 5078 OUTYY(("P(dnsc_dnscrypt_provider:%s)\n", (yyvsp[0].str))); 5079 free(cfg_parser->cfg->dnscrypt_provider); 5080 cfg_parser->cfg->dnscrypt_provider = (yyvsp[0].str); 5081 } 5082 #line 5083 "util/configparser.c" /* yacc.c:1646 */ 5083 break; 5084 5085 case 449: 5086 #line 2375 "util/configparser.y" /* yacc.c:1646 */ 5087 { 5088 OUTYY(("P(dnsc_dnscrypt_provider_cert:%s)\n", (yyvsp[0].str))); 5089 if(!cfg_strlist_insert(&cfg_parser->cfg->dnscrypt_provider_cert, (yyvsp[0].str))) 5090 fatal_exit("out of memory adding dnscrypt-provider-cert"); 5091 } 5092 #line 5093 "util/configparser.c" /* yacc.c:1646 */ 5093 break; 5094 5095 case 450: 5096 #line 2382 "util/configparser.y" /* yacc.c:1646 */ 5097 { 5098 OUTYY(("P(dnsc_dnscrypt_secret_key:%s)\n", (yyvsp[0].str))); 5099 if(!cfg_strlist_insert(&cfg_parser->cfg->dnscrypt_secret_key, (yyvsp[0].str))) 5100 fatal_exit("out of memory adding dnscrypt-secret-key"); 5101 } 5102 #line 5103 "util/configparser.c" /* yacc.c:1646 */ 5103 break; 5104 5105 case 451: 5106 #line 2389 "util/configparser.y" /* yacc.c:1646 */ 5107 { 5108 OUTYY(("P(dnscrypt_shared_secret_cache_size:%s)\n", (yyvsp[0].str))); 5109 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->dnscrypt_shared_secret_cache_size)) 5110 yyerror("memory size expected"); 5111 free((yyvsp[0].str)); 5112 } 5113 #line 5114 "util/configparser.c" /* yacc.c:1646 */ 5114 break; 5115 5116 case 452: 5117 #line 2397 "util/configparser.y" /* yacc.c:1646 */ 5118 { 5119 OUTYY(("P(dnscrypt_shared_secret_cache_slabs:%s)\n", (yyvsp[0].str))); 5120 if(atoi((yyvsp[0].str)) == 0) 5121 yyerror("number expected"); 5122 else { 5123 cfg_parser->cfg->dnscrypt_shared_secret_cache_slabs = atoi((yyvsp[0].str)); 5124 if(!is_pow2(cfg_parser->cfg->dnscrypt_shared_secret_cache_slabs)) 5125 yyerror("must be a power of 2"); 5126 } 5127 free((yyvsp[0].str)); 5128 } 5129 #line 5130 "util/configparser.c" /* yacc.c:1646 */ 5130 break; 5131 5132 case 453: 5133 #line 2410 "util/configparser.y" /* yacc.c:1646 */ 5134 { 5135 OUTYY(("P(dnscrypt_nonce_cache_size:%s)\n", (yyvsp[0].str))); 5136 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->dnscrypt_nonce_cache_size)) 5137 yyerror("memory size expected"); 5138 free((yyvsp[0].str)); 5139 } 5140 #line 5141 "util/configparser.c" /* yacc.c:1646 */ 5141 break; 5142 5143 case 454: 5144 #line 2418 "util/configparser.y" /* yacc.c:1646 */ 5145 { 5146 OUTYY(("P(dnscrypt_nonce_cache_slabs:%s)\n", (yyvsp[0].str))); 5147 if(atoi((yyvsp[0].str)) == 0) 5148 yyerror("number expected"); 5149 else { 5150 cfg_parser->cfg->dnscrypt_nonce_cache_slabs = atoi((yyvsp[0].str)); 5151 if(!is_pow2(cfg_parser->cfg->dnscrypt_nonce_cache_slabs)) 5152 yyerror("must be a power of 2"); 5153 } 5154 free((yyvsp[0].str)); 5155 } 5156 #line 5157 "util/configparser.c" /* yacc.c:1646 */ 5157 break; 5158 5159 case 455: 5160 #line 2431 "util/configparser.y" /* yacc.c:1646 */ 5161 { 5162 OUTYY(("\nP(cachedb:)\n")); 5163 } 5164 #line 5165 "util/configparser.c" /* yacc.c:1646 */ 5165 break; 5166 5167 case 460: 5168 #line 2440 "util/configparser.y" /* yacc.c:1646 */ 5169 { 5170 #ifdef USE_CACHEDB 5171 OUTYY(("P(backend:%s)\n", (yyvsp[0].str))); 5172 if(cfg_parser->cfg->cachedb_backend) 5173 yyerror("cachedb backend override, there must be one " 5174 "backend"); 5175 free(cfg_parser->cfg->cachedb_backend); 5176 cfg_parser->cfg->cachedb_backend = (yyvsp[0].str); 5177 #else 5178 OUTYY(("P(Compiled without cachedb, ignoring)\n")); 5179 #endif 5180 } 5181 #line 5182 "util/configparser.c" /* yacc.c:1646 */ 5182 break; 5183 5184 case 461: 5185 #line 2454 "util/configparser.y" /* yacc.c:1646 */ 5186 { 5187 #ifdef USE_CACHEDB 5188 OUTYY(("P(secret-seed:%s)\n", (yyvsp[0].str))); 5189 if(cfg_parser->cfg->cachedb_secret) 5190 yyerror("cachedb secret-seed override, there must be " 5191 "only one secret"); 5192 free(cfg_parser->cfg->cachedb_secret); 5193 cfg_parser->cfg->cachedb_secret = (yyvsp[0].str); 5194 #else 5195 OUTYY(("P(Compiled without cachedb, ignoring)\n")); 5196 free((yyvsp[0].str)); 5197 #endif 5198 } 5199 #line 5200 "util/configparser.c" /* yacc.c:1646 */ 5200 break; 5201 5202 5203 #line 5204 "util/configparser.c" /* yacc.c:1646 */ 5204 default: break; 5205 } 5206 /* User semantic actions sometimes alter yychar, and that requires 5207 that yytoken be updated with the new translation. We take the 5208 approach of translating immediately before every use of yytoken. 5209 One alternative is translating here after every semantic action, 5210 but that translation would be missed if the semantic action invokes 5211 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 5212 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 5213 incorrect destructor might then be invoked immediately. In the 5214 case of YYERROR or YYBACKUP, subsequent parser actions might lead 5215 to an incorrect destructor call or verbose syntax error message 5216 before the lookahead is translated. */ 5217 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 5218 5219 YYPOPSTACK (yylen); 5220 yylen = 0; 5221 YY_STACK_PRINT (yyss, yyssp); 5222 5223 *++yyvsp = yyval; 5224 5225 /* Now 'shift' the result of the reduction. Determine what state 5226 that goes to, based on the state we popped back to and the rule 5227 number reduced by. */ 5228 5229 yyn = yyr1[yyn]; 5230 5231 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 5232 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 5233 yystate = yytable[yystate]; 5234 else 5235 yystate = yydefgoto[yyn - YYNTOKENS]; 5236 5237 goto yynewstate; 5238 5239 5240 /*--------------------------------------. 5241 | yyerrlab -- here on detecting error. | 5242 `--------------------------------------*/ 5243 yyerrlab: 5244 /* Make sure we have latest lookahead translation. See comments at 5245 user semantic actions for why this is necessary. */ 5246 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 5247 5248 /* If not already recovering from an error, report this error. */ 5249 if (!yyerrstatus) 5250 { 5251 ++yynerrs; 5252 #if ! YYERROR_VERBOSE 5253 yyerror (YY_("syntax error")); 5254 #else 5255 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 5256 yyssp, yytoken) 5257 { 5258 char const *yymsgp = YY_("syntax error"); 5259 int yysyntax_error_status; 5260 yysyntax_error_status = YYSYNTAX_ERROR; 5261 if (yysyntax_error_status == 0) 5262 yymsgp = yymsg; 5263 else if (yysyntax_error_status == 1) 5264 { 5265 if (yymsg != yymsgbuf) 5266 YYSTACK_FREE (yymsg); 5267 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 5268 if (!yymsg) 5269 { 5270 yymsg = yymsgbuf; 5271 yymsg_alloc = sizeof yymsgbuf; 5272 yysyntax_error_status = 2; 5273 } 5274 else 5275 { 5276 yysyntax_error_status = YYSYNTAX_ERROR; 5277 yymsgp = yymsg; 5278 } 5279 } 5280 yyerror (yymsgp); 5281 if (yysyntax_error_status == 2) 5282 goto yyexhaustedlab; 5283 } 5284 # undef YYSYNTAX_ERROR 5285 #endif 5286 } 5287 5288 5289 5290 if (yyerrstatus == 3) 5291 { 5292 /* If just tried and failed to reuse lookahead token after an 5293 error, discard it. */ 5294 5295 if (yychar <= YYEOF) 5296 { 5297 /* Return failure if at end of input. */ 5298 if (yychar == YYEOF) 5299 YYABORT; 5300 } 5301 else 5302 { 5303 yydestruct ("Error: discarding", 5304 yytoken, &yylval); 5305 yychar = YYEMPTY; 5306 } 5307 } 5308 5309 /* Else will try to reuse lookahead token after shifting the error 5310 token. */ 5311 goto yyerrlab1; 5312 5313 5314 /*---------------------------------------------------. 5315 | yyerrorlab -- error raised explicitly by YYERROR. | 5316 `---------------------------------------------------*/ 5317 yyerrorlab: 5318 5319 /* Pacify compilers like GCC when the user code never invokes 5320 YYERROR and the label yyerrorlab therefore never appears in user 5321 code. */ 5322 if (/*CONSTCOND*/ 0) 5323 goto yyerrorlab; 5324 5325 /* Do not reclaim the symbols of the rule whose action triggered 5326 this YYERROR. */ 5327 YYPOPSTACK (yylen); 5328 yylen = 0; 5329 YY_STACK_PRINT (yyss, yyssp); 5330 yystate = *yyssp; 5331 goto yyerrlab1; 5332 5333 5334 /*-------------------------------------------------------------. 5335 | yyerrlab1 -- common code for both syntax error and YYERROR. | 5336 `-------------------------------------------------------------*/ 5337 yyerrlab1: 5338 yyerrstatus = 3; /* Each real token shifted decrements this. */ 5339 5340 for (;;) 5341 { 5342 yyn = yypact[yystate]; 5343 if (!yypact_value_is_default (yyn)) 5344 { 5345 yyn += YYTERROR; 5346 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 5347 { 5348 yyn = yytable[yyn]; 5349 if (0 < yyn) 5350 break; 5351 } 5352 } 5353 5354 /* Pop the current state because it cannot handle the error token. */ 5355 if (yyssp == yyss) 5356 YYABORT; 5357 5358 5359 yydestruct ("Error: popping", 5360 yystos[yystate], yyvsp); 5361 YYPOPSTACK (1); 5362 yystate = *yyssp; 5363 YY_STACK_PRINT (yyss, yyssp); 5364 } 5365 5366 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 5367 *++yyvsp = yylval; 5368 YY_IGNORE_MAYBE_UNINITIALIZED_END 5369 5370 5371 /* Shift the error token. */ 5372 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 5373 5374 yystate = yyn; 5375 goto yynewstate; 5376 5377 5378 /*-------------------------------------. 5379 | yyacceptlab -- YYACCEPT comes here. | 5380 `-------------------------------------*/ 5381 yyacceptlab: 5382 yyresult = 0; 5383 goto yyreturn; 5384 5385 /*-----------------------------------. 5386 | yyabortlab -- YYABORT comes here. | 5387 `-----------------------------------*/ 5388 yyabortlab: 5389 yyresult = 1; 5390 goto yyreturn; 5391 5392 #if !defined yyoverflow || YYERROR_VERBOSE 5393 /*-------------------------------------------------. 5394 | yyexhaustedlab -- memory exhaustion comes here. | 5395 `-------------------------------------------------*/ 5396 yyexhaustedlab: 5397 yyerror (YY_("memory exhausted")); 5398 yyresult = 2; 5399 /* Fall through. */ 5400 #endif 5401 5402 yyreturn: 5403 if (yychar != YYEMPTY) 5404 { 5405 /* Make sure we have latest lookahead translation. See comments at 5406 user semantic actions for why this is necessary. */ 5407 yytoken = YYTRANSLATE (yychar); 5408 yydestruct ("Cleanup: discarding lookahead", 5409 yytoken, &yylval); 5410 } 5411 /* Do not reclaim the symbols of the rule whose action triggered 5412 this YYABORT or YYACCEPT. */ 5413 YYPOPSTACK (yylen); 5414 YY_STACK_PRINT (yyss, yyssp); 5415 while (yyssp != yyss) 5416 { 5417 yydestruct ("Cleanup: popping", 5418 yystos[*yyssp], yyvsp); 5419 YYPOPSTACK (1); 5420 } 5421 #ifndef yyoverflow 5422 if (yyss != yyssa) 5423 YYSTACK_FREE (yyss); 5424 #endif 5425 #if YYERROR_VERBOSE 5426 if (yymsg != yymsgbuf) 5427 YYSTACK_FREE (yymsg); 5428 #endif 5429 return yyresult; 5430 } 5431 #line 2468 "util/configparser.y" /* yacc.c:1906 */ 5432 5433 5434 /* parse helper routines could be here */ 5435 static void 5436 validate_respip_action(const char* action) 5437 { 5438 if(strcmp(action, "deny")!=0 && 5439 strcmp(action, "redirect")!=0 && 5440 strcmp(action, "inform")!=0 && 5441 strcmp(action, "inform_deny")!=0 && 5442 strcmp(action, "always_transparent")!=0 && 5443 strcmp(action, "always_refuse")!=0 && 5444 strcmp(action, "always_nxdomain")!=0) 5445 { 5446 yyerror("response-ip action: expected deny, redirect, " 5447 "inform, inform_deny, always_transparent, " 5448 "always_refuse or always_nxdomain"); 5449 } 5450 } 5451