Lines Matching +full:- +full:- +full:yes
2 * configparser.y -- yacc grammar for unbound configuration files
4 * Copyright (c) 2001-2006, NLnet Labs. All rights reserved.
231 OUTYY(("\nP(force-toplevel)\n"));
232 cfg_parser->started_toplevel = 0;
239 cfg_parser->started_toplevel = 1;
364 if(cfg_parser->cfg->stubs &&
365 !cfg_parser->cfg->stubs->name)
366 yyerror("stub-zone without name");
373 cfg_parser->started_toplevel = 1;
376 s->next = cfg_parser->cfg->stubs;
377 cfg_parser->cfg->stubs = s;
391 if(cfg_parser->cfg->forwards &&
392 !cfg_parser->cfg->forwards->name)
393 yyerror("forward-zone without name");
400 cfg_parser->started_toplevel = 1;
403 s->next = cfg_parser->cfg->forwards;
404 cfg_parser->cfg->forwards = s;
418 if(cfg_parser->cfg->views &&
419 !cfg_parser->cfg->views->name)
427 cfg_parser->started_toplevel = 1;
430 s->next = cfg_parser->cfg->views;
431 cfg_parser->cfg->views = s;
446 cfg_parser->started_toplevel = 1;
449 s->next = cfg_parser->cfg->auths;
450 cfg_parser->cfg->auths = s;
452 s->for_downstream = 1;
453 s->for_upstream = 1;
454 s->fallback_enabled = 0;
455 s->zonemd_check = 0;
456 s->zonemd_reject_absence = 0;
457 s->isrpz = 0;
475 bitlist = config_parse_taglist(cfg_parser->cfg, $2,
479 yyerror("could not parse tags, (define-tag them first)");
482 cfg_parser->cfg->auths->rpz_taglist = bitlist;
483 cfg_parser->cfg->auths->rpz_taglistlen = len;
495 yyerror("rpz-action-override action: expected nxdomain, "
498 cfg_parser->cfg->auths->rpz_action_override = NULL;
501 cfg_parser->cfg->auths->rpz_action_override = $2;
509 free(cfg_parser->cfg->auths->rpz_cname);
510 cfg_parser->cfg->auths->rpz_cname = $2;
517 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
518 yyerror("expected yes or no.");
519 else cfg_parser->cfg->auths->rpz_log = (strcmp($2, "yes")==0);
527 free(cfg_parser->cfg->auths->rpz_log_name);
528 cfg_parser->cfg->auths->rpz_log_name = $2;
534 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
535 yyerror("expected yes or no.");
536 else cfg_parser->cfg->auths->rpz_signal_nxdomain_ra = (strcmp($2, "yes")==0);
545 cfg_parser->started_toplevel = 1;
548 s->next = cfg_parser->cfg->auths;
549 cfg_parser->cfg->auths = s;
551 s->for_downstream = 0;
552 s->for_upstream = 0;
553 s->fallback_enabled = 0;
554 s->isrpz = 1;
571 else cfg_parser->cfg->num_threads = atoi($2);
580 else cfg_parser->cfg->verbosity = atoi($2);
588 cfg_parser->cfg->stat_interval = 0;
591 else cfg_parser->cfg->stat_interval = atoi($2);
598 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
599 yyerror("expected yes or no.");
600 else cfg_parser->cfg->stat_cumulative = (strcmp($2, "yes")==0);
607 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
608 yyerror("expected yes or no.");
609 else cfg_parser->cfg->stat_extended = (strcmp($2, "yes")==0);
616 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
617 yyerror("expected yes or no.");
618 else cfg_parser->cfg->stat_inhibit_zero = (strcmp($2, "yes")==0);
625 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
626 yyerror("expected yes or no.");
627 else cfg_parser->cfg->shm_enable = (strcmp($2, "yes")==0);
635 cfg_parser->cfg->shm_key = 0;
638 else cfg_parser->cfg->shm_key = atoi($2);
647 else cfg_parser->cfg->port = atoi($2);
655 if(!cfg_strlist_insert(&cfg_parser->cfg->client_subnet, $2))
656 fatal_exit("out of memory adding client-subnet");
667 if(!cfg_strlist_insert(&cfg_parser->cfg->client_subnet_zone,
669 fatal_exit("out of memory adding client-subnet-zone");
681 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
682 yyerror("expected yes or no.");
684 cfg_parser->cfg->client_subnet_always_forward =
685 (strcmp($2, "yes")==0);
710 cfg_parser->cfg->max_client_subnet_ipv4 = 32;
712 cfg_parser->cfg->max_client_subnet_ipv4 = 0;
713 else cfg_parser->cfg->max_client_subnet_ipv4 = (uint8_t)atoi($2);
727 cfg_parser->cfg->max_client_subnet_ipv6 = 128;
729 cfg_parser->cfg->max_client_subnet_ipv6 = 0;
730 else cfg_parser->cfg->max_client_subnet_ipv6 = (uint8_t)atoi($2);
744 cfg_parser->cfg->min_client_subnet_ipv4 = 32;
746 cfg_parser->cfg->min_client_subnet_ipv4 = 0;
747 else cfg_parser->cfg->min_client_subnet_ipv4 = (uint8_t)atoi($2);
761 cfg_parser->cfg->min_client_subnet_ipv6 = 128;
763 cfg_parser->cfg->min_client_subnet_ipv6 = 0;
764 else cfg_parser->cfg->min_client_subnet_ipv6 = (uint8_t)atoi($2);
778 cfg_parser->cfg->max_ecs_tree_size_ipv4 = 0;
779 else cfg_parser->cfg->max_ecs_tree_size_ipv4 = (uint32_t)atoi($2);
793 cfg_parser->cfg->max_ecs_tree_size_ipv6 = 0;
794 else cfg_parser->cfg->max_ecs_tree_size_ipv6 = (uint32_t)atoi($2);
804 if(cfg_parser->cfg->num_ifs == 0)
805 cfg_parser->cfg->ifs = calloc(1, sizeof(char*));
806 else cfg_parser->cfg->ifs = realloc(cfg_parser->cfg->ifs,
807 (cfg_parser->cfg->num_ifs+1)*sizeof(char*));
808 if(!cfg_parser->cfg->ifs)
811 cfg_parser->cfg->ifs[cfg_parser->cfg->num_ifs++] = $2;
817 if(cfg_parser->cfg->num_out_ifs == 0)
818 cfg_parser->cfg->out_ifs = calloc(1, sizeof(char*));
819 else cfg_parser->cfg->out_ifs = realloc(
820 cfg_parser->cfg->out_ifs,
821 (cfg_parser->cfg->num_out_ifs+1)*sizeof(char*));
822 if(!cfg_parser->cfg->out_ifs)
825 cfg_parser->cfg->out_ifs[
826 cfg_parser->cfg->num_out_ifs++] = $2;
834 else cfg_parser->cfg->outgoing_num_ports = atoi($2);
842 cfg_parser->cfg->outgoing_avail_ports, 65536))
843 yyerror("port number or range (\"low-high\") expected");
851 cfg_parser->cfg->outgoing_avail_ports, 65536))
852 yyerror("port number or range (\"low-high\") expected");
861 else cfg_parser->cfg->outgoing_num_tcp = atoi($2);
870 else cfg_parser->cfg->incoming_num_tcp = atoi($2);
877 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
878 yyerror("expected yes or no.");
879 else cfg_parser->cfg->if_automatic = (strcmp($2, "yes")==0);
886 free(cfg_parser->cfg->if_automatic_ports);
887 cfg_parser->cfg->if_automatic_ports = $2;
893 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
894 yyerror("expected yes or no.");
895 else cfg_parser->cfg->do_ip4 = (strcmp($2, "yes")==0);
902 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
903 yyerror("expected yes or no.");
904 else cfg_parser->cfg->do_ip6 = (strcmp($2, "yes")==0);
911 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
912 yyerror("expected yes or no.");
913 else cfg_parser->cfg->do_nat64 = (strcmp($2, "yes")==0);
920 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
921 yyerror("expected yes or no.");
922 else cfg_parser->cfg->do_udp = (strcmp($2, "yes")==0);
929 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
930 yyerror("expected yes or no.");
931 else cfg_parser->cfg->do_tcp = (strcmp($2, "yes")==0);
938 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
939 yyerror("expected yes or no.");
940 else cfg_parser->cfg->prefer_ip4 = (strcmp($2, "yes")==0);
947 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
948 yyerror("expected yes or no.");
949 else cfg_parser->cfg->prefer_ip6 = (strcmp($2, "yes")==0);
958 else cfg_parser->cfg->tcp_mss = atoi($2);
967 else cfg_parser->cfg->outgoing_tcp_mss = atoi($2);
977 cfg_parser->cfg->tcp_idle_timeout = 120000;
979 cfg_parser->cfg->tcp_idle_timeout = 1;
980 else cfg_parser->cfg->tcp_idle_timeout = atoi($2);
990 cfg_parser->cfg->max_reuse_tcp_queries = 0;
991 else cfg_parser->cfg->max_reuse_tcp_queries = atoi($2);
1001 cfg_parser->cfg->tcp_reuse_timeout = 0;
1002 else cfg_parser->cfg->tcp_reuse_timeout = atoi($2);
1012 cfg_parser->cfg->tcp_auth_query_timeout = 0;
1013 else cfg_parser->cfg->tcp_auth_query_timeout = atoi($2);
1020 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1021 yyerror("expected yes or no.");
1022 else cfg_parser->cfg->do_tcp_keepalive = (strcmp($2, "yes")==0);
1032 cfg_parser->cfg->tcp_keepalive_timeout = 6553500;
1034 cfg_parser->cfg->tcp_keepalive_timeout = 0;
1035 else cfg_parser->cfg->tcp_keepalive_timeout = atoi($2);
1045 cfg_parser->cfg->sock_queue_timeout = 6553500;
1047 cfg_parser->cfg->sock_queue_timeout = 0;
1048 else cfg_parser->cfg->sock_queue_timeout = atoi($2);
1055 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1056 yyerror("expected yes or no.");
1057 else cfg_parser->cfg->tcp_upstream = (strcmp($2, "yes")==0);
1064 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1065 yyerror("expected yes or no.");
1066 else cfg_parser->cfg->udp_upstream_without_downstream = (strcmp($2, "yes")==0);
1073 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1074 yyerror("expected yes or no.");
1075 else cfg_parser->cfg->ssl_upstream = (strcmp($2, "yes")==0);
1082 free(cfg_parser->cfg->ssl_service_key);
1083 cfg_parser->cfg->ssl_service_key = $2;
1089 free(cfg_parser->cfg->ssl_service_pem);
1090 cfg_parser->cfg->ssl_service_pem = $2;
1098 else cfg_parser->cfg->ssl_port = atoi($2);
1105 free(cfg_parser->cfg->tls_cert_bundle);
1106 cfg_parser->cfg->tls_cert_bundle = $2;
1112 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1113 yyerror("expected yes or no.");
1114 else cfg_parser->cfg->tls_win_cert = (strcmp($2, "yes")==0);
1121 if(!cfg_strlist_insert(&cfg_parser->cfg->tls_additional_port,
1129 free(cfg_parser->cfg->tls_ciphers);
1130 cfg_parser->cfg->tls_ciphers = $2;
1136 free(cfg_parser->cfg->tls_ciphersuites);
1137 cfg_parser->cfg->tls_ciphersuites = $2;
1143 if(!cfg_strlist_append(&cfg_parser->cfg->tls_session_ticket_keys,
1151 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1152 yyerror("expected yes or no.");
1153 else cfg_parser->cfg->tls_use_sni = (strcmp($2, "yes")==0);
1162 else cfg_parser->cfg->https_port = atoi($2);
1168 free(cfg_parser->cfg->http_endpoint);
1170 cfg_parser->cfg->http_endpoint = malloc(strlen($2)+2);
1171 if(!cfg_parser->cfg->http_endpoint)
1173 cfg_parser->cfg->http_endpoint[0] = '/';
1174 memmove(cfg_parser->cfg->http_endpoint+1, $2,
1178 cfg_parser->cfg->http_endpoint = $2;
1186 else cfg_parser->cfg->http_max_streams = atoi($2);
1193 &cfg_parser->cfg->http_query_buffer_size))
1201 &cfg_parser->cfg->http_response_buffer_size))
1208 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1209 yyerror("expected yes or no.");
1210 else cfg_parser->cfg->http_nodelay = (strcmp($2, "yes")==0);
1216 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1217 yyerror("expected yes or no.");
1218 else cfg_parser->cfg->http_notls_downstream = (strcmp($2, "yes")==0);
1227 "over QUIC.", cfg_parser->filename, cfg_parser->line);
1231 else cfg_parser->cfg->quic_port = atoi($2);
1237 if(!cfg_parse_memsize($2, &cfg_parser->cfg->quic_size))
1244 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1245 yyerror("expected yes or no.");
1246 else cfg_parser->cfg->use_systemd = (strcmp($2, "yes")==0);
1253 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1254 yyerror("expected yes or no.");
1255 else cfg_parser->cfg->do_daemonize = (strcmp($2, "yes")==0);
1262 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1263 yyerror("expected yes or no.");
1264 else cfg_parser->cfg->use_syslog = (strcmp($2, "yes")==0);
1266 if(strcmp($2, "yes") == 0)
1276 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1277 yyerror("expected yes or no.");
1278 else cfg_parser->cfg->log_time_ascii = (strcmp($2, "yes")==0);
1285 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1286 yyerror("expected yes or no.");
1287 else cfg_parser->cfg->log_time_iso = (strcmp($2, "yes")==0);
1294 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1295 yyerror("expected yes or no.");
1296 else cfg_parser->cfg->log_queries = (strcmp($2, "yes")==0);
1303 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1304 yyerror("expected yes or no.");
1305 else cfg_parser->cfg->log_replies = (strcmp($2, "yes")==0);
1312 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1313 yyerror("expected yes or no.");
1314 else cfg_parser->cfg->log_tag_queryreply = (strcmp($2, "yes")==0);
1321 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1322 yyerror("expected yes or no.");
1323 else cfg_parser->cfg->log_servfail = (strcmp($2, "yes")==0);
1330 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1331 yyerror("expected yes or no.");
1332 else cfg_parser->cfg->log_destaddr = (strcmp($2, "yes")==0);
1339 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1340 yyerror("expected yes or no.");
1341 else cfg_parser->cfg->log_local_actions = (strcmp($2, "yes")==0);
1348 free(cfg_parser->cfg->chrootdir);
1349 cfg_parser->cfg->chrootdir = $2;
1355 free(cfg_parser->cfg->username);
1356 cfg_parser->cfg->username = $2;
1362 free(cfg_parser->cfg->directory);
1363 cfg_parser->cfg->directory = $2;
1368 w_config_adjust_directory(cfg_parser->cfg);
1370 d = cfg_parser->cfg->directory;
1373 if(cfg_parser->chroot && cfg_parser->chroot[0] &&
1374 strncmp(d, cfg_parser->chroot, strlen(
1375 cfg_parser->chroot)) == 0)
1376 d += strlen(cfg_parser->chroot);
1388 free(cfg_parser->cfg->logfile);
1389 cfg_parser->cfg->logfile = $2;
1390 cfg_parser->cfg->use_syslog = 0;
1396 free(cfg_parser->cfg->pidfile);
1397 cfg_parser->cfg->pidfile = $2;
1403 if(!cfg_strlist_insert(&cfg_parser->cfg->root_hints, $2))
1410 log_warn("option dlv-anchor-file ignored: DLV is decommissioned");
1417 log_warn("option dlv-anchor ignored: DLV is decommissioned");
1424 if(!cfg_strlist_insert(&cfg_parser->cfg->
1432 if(!cfg_strlist_insert(&cfg_parser->cfg->
1440 if(!cfg_strlist_insert(&cfg_parser->cfg->
1448 if(!cfg_strlist_insert(&cfg_parser->cfg->trust_anchor_list, $2))
1455 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1456 yyerror("expected yes or no.");
1458 cfg_parser->cfg->trust_anchor_signaling =
1459 (strcmp($2, "yes")==0);
1466 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1467 yyerror("expected yes or no.");
1469 cfg_parser->cfg->root_key_sentinel =
1470 (strcmp($2, "yes")==0);
1477 if(!cfg_strlist_insert(&cfg_parser->cfg->domain_insecure, $2))
1484 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1485 yyerror("expected yes or no.");
1486 else cfg_parser->cfg->hide_identity = (strcmp($2, "yes")==0);
1493 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1494 yyerror("expected yes or no.");
1495 else cfg_parser->cfg->hide_version = (strcmp($2, "yes")==0);
1502 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1503 yyerror("expected yes or no.");
1504 else cfg_parser->cfg->hide_trustanchor = (strcmp($2, "yes")==0);
1511 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1512 yyerror("expected yes or no.");
1513 else cfg_parser->cfg->hide_http_user_agent = (strcmp($2, "yes")==0);
1520 free(cfg_parser->cfg->identity);
1521 cfg_parser->cfg->identity = $2;
1527 free(cfg_parser->cfg->version);
1528 cfg_parser->cfg->version = $2;
1534 free(cfg_parser->cfg->http_user_agent);
1535 cfg_parser->cfg->http_user_agent = $2;
1541 free(cfg_parser->cfg->nsid_cfg_str);
1542 cfg_parser->cfg->nsid_cfg_str = $2;
1543 free(cfg_parser->cfg->nsid);
1544 cfg_parser->cfg->nsid = NULL;
1545 cfg_parser->cfg->nsid_len = 0;
1548 else if (!(cfg_parser->cfg->nsid = cfg_parse_nsid(
1549 $2, &cfg_parser->cfg->nsid_len)))
1557 if(!cfg_parse_memsize($2, &cfg_parser->cfg->so_rcvbuf))
1565 if(!cfg_parse_memsize($2, &cfg_parser->cfg->so_sndbuf))
1573 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1574 yyerror("expected yes or no.");
1575 else cfg_parser->cfg->so_reuseport =
1576 (strcmp($2, "yes")==0);
1583 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1584 yyerror("expected yes or no.");
1585 else cfg_parser->cfg->ip_transparent =
1586 (strcmp($2, "yes")==0);
1593 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1594 yyerror("expected yes or no.");
1595 else cfg_parser->cfg->ip_freebind =
1596 (strcmp($2, "yes")==0);
1610 cfg_parser->cfg->ip_dscp = atoi($2);
1617 if(!cfg_parse_memsize($2, &cfg_parser->cfg->stream_wait_size))
1630 cfg_parser->cfg->edns_buffer_size = 65535;
1631 else cfg_parser->cfg->edns_buffer_size = atoi($2);
1642 else cfg_parser->cfg->msg_buffer_size = atoi($2);
1649 if(!cfg_parse_memsize($2, &cfg_parser->cfg->msg_cache_size))
1660 cfg_parser->cfg->msg_cache_slabs = atoi($2);
1661 if(!is_pow2(cfg_parser->cfg->msg_cache_slabs))
1672 else cfg_parser->cfg->num_queries_per_thread = atoi($2);
1681 else cfg_parser->cfg->jostle_time = atoi($2);
1690 else cfg_parser->cfg->delay_close = atoi($2);
1697 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1698 yyerror("expected yes or no.");
1699 else cfg_parser->cfg->udp_connect = (strcmp($2, "yes")==0);
1706 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1707 yyerror("expected yes or no.");
1708 else cfg_parser->cfg->unblock_lan_zones =
1709 (strcmp($2, "yes")==0);
1716 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1717 yyerror("expected yes or no.");
1718 else cfg_parser->cfg->insecure_lan_zones =
1719 (strcmp($2, "yes")==0);
1726 if(!cfg_parse_memsize($2, &cfg_parser->cfg->rrset_cache_size))
1737 cfg_parser->cfg->rrset_cache_slabs = atoi($2);
1738 if(!is_pow2(cfg_parser->cfg->rrset_cache_slabs))
1749 else cfg_parser->cfg->host_ttl = atoi($2);
1756 verbose(VERB_DETAIL, "ignored infra-lame-ttl: %s (option "
1757 "removed, use infra-host-ttl)", $2);
1766 else cfg_parser->cfg->infra_cache_numhosts = atoi($2);
1773 verbose(VERB_DETAIL, "ignored infra-cache-lame-size: %s "
1774 "(option removed, use infra-cache-numhosts)", $2);
1784 cfg_parser->cfg->infra_cache_slabs = atoi($2);
1785 if(!is_pow2(cfg_parser->cfg->infra_cache_slabs))
1796 else cfg_parser->cfg->infra_cache_min_rtt = atoi($2);
1805 else cfg_parser->cfg->infra_cache_max_rtt = atoi($2);
1812 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1813 yyerror("expected yes or no.");
1814 else cfg_parser->cfg->infra_keep_probing =
1815 (strcmp($2, "yes")==0);
1822 free(cfg_parser->cfg->target_fetch_policy);
1823 cfg_parser->cfg->target_fetch_policy = $2;
1829 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1830 yyerror("expected yes or no.");
1831 else cfg_parser->cfg->harden_short_bufsize =
1832 (strcmp($2, "yes")==0);
1839 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1840 yyerror("expected yes or no.");
1841 else cfg_parser->cfg->harden_large_queries =
1842 (strcmp($2, "yes")==0);
1849 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1850 yyerror("expected yes or no.");
1851 else cfg_parser->cfg->harden_glue =
1852 (strcmp($2, "yes")==0);
1859 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1860 yyerror("expected yes or no.");
1861 else cfg_parser->cfg->harden_unverified_glue =
1862 (strcmp($2, "yes")==0);
1869 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1870 yyerror("expected yes or no.");
1871 else cfg_parser->cfg->harden_dnssec_stripped =
1872 (strcmp($2, "yes")==0);
1879 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1880 yyerror("expected yes or no.");
1881 else cfg_parser->cfg->harden_below_nxdomain =
1882 (strcmp($2, "yes")==0);
1889 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1890 yyerror("expected yes or no.");
1891 else cfg_parser->cfg->harden_referral_path =
1892 (strcmp($2, "yes")==0);
1899 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1900 yyerror("expected yes or no.");
1901 else cfg_parser->cfg->harden_algo_downgrade =
1902 (strcmp($2, "yes")==0);
1909 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1910 yyerror("expected yes or no.");
1911 else cfg_parser->cfg->harden_unknown_additional =
1912 (strcmp($2, "yes")==0);
1919 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1920 yyerror("expected yes or no.");
1921 else cfg_parser->cfg->use_caps_bits_for_id =
1922 (strcmp($2, "yes")==0);
1929 if(!cfg_strlist_insert(&cfg_parser->cfg->caps_whitelist, $2))
1936 if(!cfg_strlist_insert(&cfg_parser->cfg->private_address, $2))
1943 if(!cfg_strlist_insert(&cfg_parser->cfg->private_domain, $2))
1950 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1951 yyerror("expected yes or no.");
1952 else cfg_parser->cfg->prefetch = (strcmp($2, "yes")==0);
1959 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1960 yyerror("expected yes or no.");
1961 else cfg_parser->cfg->prefetch_key = (strcmp($2, "yes")==0);
1968 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1969 yyerror("expected yes or no.");
1970 else cfg_parser->cfg->deny_any = (strcmp($2, "yes")==0);
1979 else cfg_parser->cfg->unwanted_threshold = atoi($2);
1986 if(!cfg_strlist_insert(&cfg_parser->cfg->donotqueryaddrs, $2))
1993 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1994 yyerror("expected yes or no.");
1995 else cfg_parser->cfg->donotquery_localhost =
1996 (strcmp($2, "yes")==0);
2004 if(!cfg_str2list_insert(&cfg_parser->cfg->acls, $2, $3))
2013 &cfg_parser->cfg->interface_actions, $2, $3))
2020 free(cfg_parser->cfg->module_conf);
2021 cfg_parser->cfg->module_conf = $2;
2028 cfg_parser->cfg->val_date_override = 0;
2030 cfg_parser->cfg->val_date_override =
2032 if(!cfg_parser->cfg->val_date_override)
2037 cfg_parser->cfg->val_date_override = atoi($2);
2046 cfg_parser->cfg->val_sig_skew_min = 0;
2048 cfg_parser->cfg->val_sig_skew_min = atoi($2);
2049 if(!cfg_parser->cfg->val_sig_skew_min)
2059 cfg_parser->cfg->val_sig_skew_max = 0;
2061 cfg_parser->cfg->val_sig_skew_max = atoi($2);
2062 if(!cfg_parser->cfg->val_sig_skew_max)
2072 cfg_parser->cfg->val_max_restart = 0;
2074 cfg_parser->cfg->val_max_restart = atoi($2);
2075 if(!cfg_parser->cfg->val_max_restart)
2086 else cfg_parser->cfg->max_ttl = atoi($2);
2095 else cfg_parser->cfg->max_negative_ttl = atoi($2);
2104 else cfg_parser->cfg->min_negative_ttl = atoi($2);
2113 else cfg_parser->cfg->min_ttl = atoi($2);
2122 else cfg_parser->cfg->bogus_ttl = atoi($2);
2129 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2130 yyerror("expected yes or no.");
2131 else cfg_parser->cfg->val_clean_additional =
2132 (strcmp($2, "yes")==0);
2139 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2140 yyerror("expected yes or no.");
2141 else cfg_parser->cfg->val_permissive_mode =
2142 (strcmp($2, "yes")==0);
2149 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2150 yyerror("expected yes or no.");
2152 cfg_parser->cfg->aggressive_nsec =
2153 (strcmp($2, "yes")==0);
2160 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2161 yyerror("expected yes or no.");
2162 else cfg_parser->cfg->ignore_cd = (strcmp($2, "yes")==0);
2169 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2170 yyerror("expected yes or no.");
2171 else cfg_parser->cfg->disable_edns_do = (strcmp($2, "yes")==0);
2178 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2179 yyerror("expected yes or no.");
2180 else cfg_parser->cfg->serve_expired = (strcmp($2, "yes")==0);
2189 else cfg_parser->cfg->serve_expired_ttl = atoi($2);
2196 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2197 yyerror("expected yes or no.");
2198 else cfg_parser->cfg->serve_expired_ttl_reset = (strcmp($2, "yes")==0);
2207 else cfg_parser->cfg->serve_expired_reply_ttl = atoi($2);
2216 else cfg_parser->cfg->serve_expired_client_timeout = atoi($2);
2223 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2224 yyerror("expected yes or no.");
2225 else cfg_parser->cfg->ede_serve_expired = (strcmp($2, "yes")==0);
2232 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2233 yyerror("expected yes or no.");
2234 else cfg_parser->cfg->serve_original_ttl = (strcmp($2, "yes")==0);
2241 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2242 yyerror("expected yes or no.");
2244 else fake_dsa = (strcmp($2, "yes")==0);
2254 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2255 yyerror("expected yes or no.");
2257 else fake_sha1 = (strcmp($2, "yes")==0);
2269 else cfg_parser->cfg->val_log_level = atoi($2);
2276 free(cfg_parser->cfg->val_nsec3_key_iterations);
2277 cfg_parser->cfg->val_nsec3_key_iterations = $2;
2283 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2284 yyerror("expected yes or no.");
2285 else cfg_parser->cfg->zonemd_permissive_mode = (strcmp($2, "yes")==0);
2294 else cfg_parser->cfg->add_holddown = atoi($2);
2303 else cfg_parser->cfg->del_holddown = atoi($2);
2312 else cfg_parser->cfg->keep_missing = atoi($2);
2319 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2320 yyerror("expected yes or no.");
2321 else cfg_parser->cfg->permit_small_holddown =
2322 (strcmp($2, "yes")==0);
2329 if(!cfg_parse_memsize($2, &cfg_parser->cfg->key_cache_size))
2340 cfg_parser->cfg->key_cache_slabs = atoi($2);
2341 if(!is_pow2(cfg_parser->cfg->key_cache_slabs))
2350 if(!cfg_parse_memsize($2, &cfg_parser->cfg->neg_cache_size))
2373 yyerror("local-zone type: expected static, deny, "
2383 if(!cfg_strlist_insert(&cfg_parser->cfg->
2385 fatal_exit("out of memory adding local-zone");
2392 if($2[len-1] != '.') {
2394 fatal_exit("out of memory adding local-zone");
2399 if(!cfg_strlist_insert(&cfg_parser->cfg->
2401 fatal_exit("out of memory adding local-zone");
2405 if(!cfg_str2list_insert(&cfg_parser->cfg->local_zones,
2407 fatal_exit("out of memory adding local-zone");
2414 if(!cfg_strlist_insert(&cfg_parser->cfg->local_data, $2))
2415 fatal_exit("out of memory adding local-data");
2425 if(!cfg_strlist_insert(&cfg_parser->cfg->
2427 fatal_exit("out of memory adding local-data");
2429 yyerror("local-data-ptr could not be reversed");
2436 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2437 yyerror("expected yes or no.");
2438 else cfg_parser->cfg->minimal_responses =
2439 (strcmp($2, "yes")==0);
2446 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2447 yyerror("expected yes or no.");
2448 else cfg_parser->cfg->rrset_roundrobin =
2449 (strcmp($2, "yes")==0);
2456 cfg_parser->cfg->unknown_server_time_limit = atoi($2);
2463 cfg_parser->cfg->discard_timeout = atoi($2);
2470 cfg_parser->cfg->wait_limit = atoi($2);
2477 cfg_parser->cfg->wait_limit_cookie = atoi($2);
2489 if(!cfg_str2list_insert(&cfg_parser->cfg->
2492 "wait-limit-netblock");
2504 if(!cfg_str2list_insert(&cfg_parser->cfg->
2507 "wait-limit-cookie-netblock");
2514 cfg_parser->cfg->max_udp_size = atoi($2);
2521 free(cfg_parser->cfg->dns64_prefix);
2522 cfg_parser->cfg->dns64_prefix = $2;
2528 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2529 yyerror("expected yes or no.");
2530 else cfg_parser->cfg->dns64_synthall = (strcmp($2, "yes")==0);
2537 if(!cfg_strlist_insert(&cfg_parser->cfg->dns64_ignore_aaaa,
2539 fatal_exit("out of memory adding dns64-ignore-aaaa");
2545 free(cfg_parser->cfg->nat64_prefix);
2546 cfg_parser->cfg->nat64_prefix = $2;
2555 if(!config_add_tag(cfg_parser->cfg, p))
2556 yyerror("could not define-tag, "
2566 uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, $3,
2571 yyerror("could not parse tags, (define-tag them first)");
2576 &cfg_parser->cfg->local_zone_tags,
2587 uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, $3,
2592 yyerror("could not parse tags, (define-tag them first)");
2597 &cfg_parser->cfg->acl_tags,
2608 if(!cfg_str3list_insert(&cfg_parser->cfg->acl_tag_actions,
2620 if(!cfg_str3list_insert(&cfg_parser->cfg->acl_tag_datas,
2632 if(!cfg_str3list_insert(&cfg_parser->cfg->local_zone_overrides,
2644 if(!cfg_str2list_insert(&cfg_parser->cfg->acl_view,
2653 uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, $3,
2658 yyerror("could not parse tags, (define-tag them first)");
2663 &cfg_parser->cfg->interface_tags,
2674 if(!cfg_str3list_insert(&cfg_parser->cfg->interface_tag_actions,
2686 if(!cfg_str3list_insert(&cfg_parser->cfg->interface_tag_datas,
2698 if(!cfg_str2list_insert(&cfg_parser->cfg->interface_view,
2707 uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, $3,
2712 yyerror("could not parse tags, (define-tag them first)");
2717 &cfg_parser->cfg->respip_tags,
2730 else cfg_parser->cfg->ip_ratelimit = atoi($2);
2739 else cfg_parser->cfg->ip_ratelimit_cookie = atoi($2);
2748 else cfg_parser->cfg->ratelimit = atoi($2);
2755 if(!cfg_parse_memsize($2, &cfg_parser->cfg->ip_ratelimit_size))
2763 if(!cfg_parse_memsize($2, &cfg_parser->cfg->ratelimit_size))
2774 cfg_parser->cfg->ip_ratelimit_slabs = atoi($2);
2775 if(!is_pow2(cfg_parser->cfg->ip_ratelimit_slabs))
2787 cfg_parser->cfg->ratelimit_slabs = atoi($2);
2788 if(!is_pow2(cfg_parser->cfg->ratelimit_slabs))
2802 if(!cfg_str2list_insert(&cfg_parser->cfg->
2805 "ratelimit-for-domain");
2817 if(!cfg_str2list_insert(&cfg_parser->cfg->
2820 "ratelimit-below-domain");
2829 else cfg_parser->cfg->ip_ratelimit_factor = atoi($2);
2838 else cfg_parser->cfg->ratelimit_factor = atoi($2);
2845 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2846 yyerror("expected yes or no.");
2847 else cfg_parser->cfg->ip_ratelimit_backoff =
2848 (strcmp($2, "yes")==0);
2855 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2856 yyerror("expected yes or no.");
2857 else cfg_parser->cfg->ratelimit_backoff =
2858 (strcmp($2, "yes")==0);
2867 else cfg_parser->cfg->outbound_msg_retry = atoi($2);
2876 else cfg_parser->cfg->max_sent_count = atoi($2);
2885 else cfg_parser->cfg->max_query_restarts = atoi($2);
2891 OUTYY(("P(low-rtt option is deprecated, use fast-server-num instead)\n"));
2900 else cfg_parser->cfg->fast_server_num = atoi($2);
2909 else cfg_parser->cfg->fast_server_permil = atoi($2);
2916 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2917 yyerror("expected yes or no.");
2918 else cfg_parser->cfg->qname_minimisation =
2919 (strcmp($2, "yes")==0);
2926 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2927 yyerror("expected yes or no.");
2928 else cfg_parser->cfg->qname_minimisation_strict =
2929 (strcmp($2, "yes")==0);
2936 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2937 yyerror("expected yes or no.");
2938 else cfg_parser->cfg->pad_responses =
2939 (strcmp($2, "yes")==0);
2948 else cfg_parser->cfg->pad_responses_block_size = atoi($2);
2955 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2956 yyerror("expected yes or no.");
2957 else cfg_parser->cfg->pad_queries =
2958 (strcmp($2, "yes")==0);
2967 else cfg_parser->cfg->pad_queries_block_size = atoi($2);
2975 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2976 yyerror("expected yes or no.");
2977 else cfg_parser->cfg->ipsecmod_enabled = (strcmp($2, "yes")==0);
2988 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
2989 yyerror("expected yes or no.");
2990 else cfg_parser->cfg->ipsecmod_ignore_bogus = (strcmp($2, "yes")==0);
3001 free(cfg_parser->cfg->ipsecmod_hook);
3002 cfg_parser->cfg->ipsecmod_hook = $2;
3015 else cfg_parser->cfg->ipsecmod_max_ttl = atoi($2);
3027 if(!cfg_strlist_insert(&cfg_parser->cfg->ipsecmod_whitelist, $2))
3039 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3040 yyerror("expected yes or no.");
3041 else cfg_parser->cfg->ipsecmod_strict = (strcmp($2, "yes")==0);
3053 &cfg_parser->cfg->edns_client_strings, $2, $3))
3055 "edns-client-string");
3065 else cfg_parser->cfg->edns_client_string_opcode = atoi($2);
3072 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3073 yyerror("expected yes or no.");
3074 else cfg_parser->cfg->ede = (strcmp($2, "yes")==0);
3081 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3082 yyerror("expected yes or no.");
3083 else cfg_parser->cfg->dns_error_reporting = (strcmp($2, "yes")==0);
3090 if(!cfg_strlist_insert(&cfg_parser->cfg->proxy_protocol_port, $2))
3097 if(cfg_parser->cfg->stubs->name)
3099 "for one stub-zone");
3100 free(cfg_parser->cfg->stubs->name);
3101 cfg_parser->cfg->stubs->name = $2;
3106 OUTYY(("P(stub-host:%s)\n", $2));
3107 if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->hosts, $2))
3113 OUTYY(("P(stub-addr:%s)\n", $2));
3114 if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->addrs, $2))
3120 OUTYY(("P(stub-first:%s)\n", $2));
3121 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3122 yyerror("expected yes or no.");
3123 else cfg_parser->cfg->stubs->isfirst=(strcmp($2, "yes")==0);
3129 OUTYY(("P(stub-no-cache:%s)\n", $2));
3130 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3131 yyerror("expected yes or no.");
3132 else cfg_parser->cfg->stubs->no_cache=(strcmp($2, "yes")==0);
3138 OUTYY(("P(stub-ssl-upstream:%s)\n", $2));
3139 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3140 yyerror("expected yes or no.");
3141 else cfg_parser->cfg->stubs->ssl_upstream =
3142 (strcmp($2, "yes")==0);
3148 OUTYY(("P(stub-tcp-upstream:%s)\n", $2));
3149 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3150 yyerror("expected yes or no.");
3151 else cfg_parser->cfg->stubs->tcp_upstream =
3152 (strcmp($2, "yes")==0);
3158 OUTYY(("P(stub-prime:%s)\n", $2));
3159 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3160 yyerror("expected yes or no.");
3161 else cfg_parser->cfg->stubs->isprime =
3162 (strcmp($2, "yes")==0);
3169 if(cfg_parser->cfg->forwards->name)
3171 "name for one forward-zone");
3172 free(cfg_parser->cfg->forwards->name);
3173 cfg_parser->cfg->forwards->name = $2;
3178 OUTYY(("P(forward-host:%s)\n", $2));
3179 if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->hosts, $2))
3185 OUTYY(("P(forward-addr:%s)\n", $2));
3186 if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->addrs, $2))
3192 OUTYY(("P(forward-first:%s)\n", $2));
3193 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3194 yyerror("expected yes or no.");
3195 else cfg_parser->cfg->forwards->isfirst=(strcmp($2, "yes")==0);
3201 OUTYY(("P(forward-no-cache:%s)\n", $2));
3202 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3203 yyerror("expected yes or no.");
3204 else cfg_parser->cfg->forwards->no_cache=(strcmp($2, "yes")==0);
3210 OUTYY(("P(forward-ssl-upstream:%s)\n", $2));
3211 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3212 yyerror("expected yes or no.");
3213 else cfg_parser->cfg->forwards->ssl_upstream =
3214 (strcmp($2, "yes")==0);
3220 OUTYY(("P(forward-tcp-upstream:%s)\n", $2));
3221 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3222 yyerror("expected yes or no.");
3223 else cfg_parser->cfg->forwards->tcp_upstream =
3224 (strcmp($2, "yes")==0);
3231 if(cfg_parser->cfg->auths->name)
3233 "for one auth-zone");
3234 free(cfg_parser->cfg->auths->name);
3235 cfg_parser->cfg->auths->name = $2;
3241 free(cfg_parser->cfg->auths->zonefile);
3242 cfg_parser->cfg->auths->zonefile = $2;
3248 if(!cfg_strlist_insert(&cfg_parser->cfg->auths->masters, $2))
3255 if(!cfg_strlist_insert(&cfg_parser->cfg->auths->urls, $2))
3261 OUTYY(("P(allow-notify:%s)\n", $2));
3262 if(!cfg_strlist_insert(&cfg_parser->cfg->auths->allow_notify,
3269 OUTYY(("P(zonemd-check:%s)\n", $2));
3270 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3271 yyerror("expected yes or no.");
3272 else cfg_parser->cfg->auths->zonemd_check =
3273 (strcmp($2, "yes")==0);
3279 OUTYY(("P(zonemd-reject-absence:%s)\n", $2));
3280 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3281 yyerror("expected yes or no.");
3282 else cfg_parser->cfg->auths->zonemd_reject_absence =
3283 (strcmp($2, "yes")==0);
3289 OUTYY(("P(for-downstream:%s)\n", $2));
3290 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3291 yyerror("expected yes or no.");
3292 else cfg_parser->cfg->auths->for_downstream =
3293 (strcmp($2, "yes")==0);
3299 OUTYY(("P(for-upstream:%s)\n", $2));
3300 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3301 yyerror("expected yes or no.");
3302 else cfg_parser->cfg->auths->for_upstream =
3303 (strcmp($2, "yes")==0);
3309 OUTYY(("P(fallback-enabled:%s)\n", $2));
3310 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3311 yyerror("expected yes or no.");
3312 else cfg_parser->cfg->auths->fallback_enabled =
3313 (strcmp($2, "yes")==0);
3320 if(cfg_parser->cfg->views->name)
3323 free(cfg_parser->cfg->views->name);
3324 cfg_parser->cfg->views->name = $2;
3344 yyerror("local-zone type: expected static, deny, "
3354 if(!cfg_strlist_insert(&cfg_parser->cfg->views->
3356 fatal_exit("out of memory adding local-zone");
3363 if($2[len-1] != '.') {
3365 fatal_exit("out of memory adding local-zone");
3370 if(!cfg_strlist_insert(&cfg_parser->cfg->views->
3372 fatal_exit("out of memory adding local-zone");
3377 &cfg_parser->cfg->views->local_zones,
3379 fatal_exit("out of memory adding local-zone");
3388 &cfg_parser->cfg->views->respip_actions, $2, $3))
3389 fatal_exit("out of memory adding per-view "
3390 "response-ip action");
3397 &cfg_parser->cfg->views->respip_data, $2, $3))
3398 fatal_exit("out of memory adding response-ip-data");
3404 if(!cfg_strlist_insert(&cfg_parser->cfg->views->local_data, $2)) {
3405 fatal_exit("out of memory adding local-data");
3416 if(!cfg_strlist_insert(&cfg_parser->cfg->views->
3418 fatal_exit("out of memory adding local-data");
3420 yyerror("local-data-ptr could not be reversed");
3426 OUTYY(("P(view-first:%s)\n", $2));
3427 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3428 yyerror("expected yes or no.");
3429 else cfg_parser->cfg->views->isfirst=(strcmp($2, "yes")==0);
3435 OUTYY(("\nP(remote-control:)\n"));
3436 cfg_parser->started_toplevel = 1;
3448 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3449 yyerror("expected yes or no.");
3450 else cfg_parser->cfg->remote_control_enable =
3451 (strcmp($2, "yes")==0);
3460 else cfg_parser->cfg->control_port = atoi($2);
3467 if(!cfg_strlist_append(&cfg_parser->cfg->control_ifs, $2))
3474 cfg_parser->cfg->control_use_cert = (strcmp($2, "yes")==0);
3481 free(cfg_parser->cfg->server_key_file);
3482 cfg_parser->cfg->server_key_file = $2;
3488 free(cfg_parser->cfg->server_cert_file);
3489 cfg_parser->cfg->server_cert_file = $2;
3495 free(cfg_parser->cfg->control_key_file);
3496 cfg_parser->cfg->control_key_file = $2;
3502 free(cfg_parser->cfg->control_cert_file);
3503 cfg_parser->cfg->control_cert_file = $2;
3509 cfg_parser->started_toplevel = 1;
3531 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3532 yyerror("expected yes or no.");
3533 else cfg_parser->cfg->dnstap = (strcmp($2, "yes")==0);
3540 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3541 yyerror("expected yes or no.");
3542 else cfg_parser->cfg->dnstap_bidirectional =
3543 (strcmp($2, "yes")==0);
3550 free(cfg_parser->cfg->dnstap_socket_path);
3551 cfg_parser->cfg->dnstap_socket_path = $2;
3557 free(cfg_parser->cfg->dnstap_ip);
3558 cfg_parser->cfg->dnstap_ip = $2;
3564 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3565 yyerror("expected yes or no.");
3566 else cfg_parser->cfg->dnstap_tls = (strcmp($2, "yes")==0);
3573 free(cfg_parser->cfg->dnstap_tls_server_name);
3574 cfg_parser->cfg->dnstap_tls_server_name = $2;
3580 free(cfg_parser->cfg->dnstap_tls_cert_bundle);
3581 cfg_parser->cfg->dnstap_tls_cert_bundle = $2;
3587 free(cfg_parser->cfg->dnstap_tls_client_key_file);
3588 cfg_parser->cfg->dnstap_tls_client_key_file = $2;
3594 free(cfg_parser->cfg->dnstap_tls_client_cert_file);
3595 cfg_parser->cfg->dnstap_tls_client_cert_file = $2;
3601 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3602 yyerror("expected yes or no.");
3603 else cfg_parser->cfg->dnstap_send_identity = (strcmp($2, "yes")==0);
3610 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3611 yyerror("expected yes or no.");
3612 else cfg_parser->cfg->dnstap_send_version = (strcmp($2, "yes")==0);
3619 free(cfg_parser->cfg->dnstap_identity);
3620 cfg_parser->cfg->dnstap_identity = $2;
3626 free(cfg_parser->cfg->dnstap_version);
3627 cfg_parser->cfg->dnstap_version = $2;
3633 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3634 yyerror("expected yes or no.");
3635 else cfg_parser->cfg->dnstap_log_resolver_query_messages =
3636 (strcmp($2, "yes")==0);
3643 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3644 yyerror("expected yes or no.");
3645 else cfg_parser->cfg->dnstap_log_resolver_response_messages =
3646 (strcmp($2, "yes")==0);
3653 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3654 yyerror("expected yes or no.");
3655 else cfg_parser->cfg->dnstap_log_client_query_messages =
3656 (strcmp($2, "yes")==0);
3663 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3664 yyerror("expected yes or no.");
3665 else cfg_parser->cfg->dnstap_log_client_response_messages =
3666 (strcmp($2, "yes")==0);
3673 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3674 yyerror("expected yes or no.");
3675 else cfg_parser->cfg->dnstap_log_forwarder_query_messages =
3676 (strcmp($2, "yes")==0);
3683 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3684 yyerror("expected yes or no.");
3685 else cfg_parser->cfg->dnstap_log_forwarder_response_messages =
3686 (strcmp($2, "yes")==0);
3697 else cfg_parser->cfg->dnstap_sample_rate = atoi($2);
3704 cfg_parser->started_toplevel = 1;
3713 OUTYY(("P(python-script:%s)\n", $2));
3714 if(!cfg_strlist_append_ex(&cfg_parser->cfg->python_script, $2))
3721 cfg_parser->started_toplevel = 1;
3730 OUTYY(("P(dynlib-file:%s)\n", $2));
3731 if(!cfg_strlist_append_ex(&cfg_parser->cfg->dynlib_file, $2))
3738 if (strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3739 yyerror("expected yes or no.");
3740 else cfg_parser->cfg->disable_dnssec_lame_check =
3741 (strcmp($2, "yes")==0);
3748 free(cfg_parser->cfg->log_identity);
3749 cfg_parser->cfg->log_identity = $2;
3756 if(!cfg_str2list_insert(&cfg_parser->cfg->respip_actions,
3758 fatal_exit("out of memory adding response-ip");
3764 if(!cfg_str2list_insert(&cfg_parser->cfg->respip_data,
3766 fatal_exit("out of memory adding response-ip-data");
3772 cfg_parser->started_toplevel = 1;
3789 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3790 yyerror("expected yes or no.");
3791 else cfg_parser->cfg->dnscrypt = (strcmp($2, "yes")==0);
3800 else cfg_parser->cfg->dnscrypt_port = atoi($2);
3807 free(cfg_parser->cfg->dnscrypt_provider);
3808 cfg_parser->cfg->dnscrypt_provider = $2;
3814 if(cfg_strlist_find(cfg_parser->cfg->dnscrypt_provider_cert, $2))
3815 log_warn("dnscrypt-provider-cert %s is a duplicate", $2);
3816 if(!cfg_strlist_insert(&cfg_parser->cfg->dnscrypt_provider_cert, $2))
3817 fatal_exit("out of memory adding dnscrypt-provider-cert");
3823 if(!cfg_strlist_insert(&cfg_parser->cfg->dnscrypt_provider_cert_rotated, $2))
3824 fatal_exit("out of memory adding dnscrypt-provider-cert-rotated");
3830 if(cfg_strlist_find(cfg_parser->cfg->dnscrypt_secret_key, $2))
3831 log_warn("dnscrypt-secret-key: %s is a duplicate", $2);
3832 if(!cfg_strlist_insert(&cfg_parser->cfg->dnscrypt_secret_key, $2))
3833 fatal_exit("out of memory adding dnscrypt-secret-key");
3839 if(!cfg_parse_memsize($2, &cfg_parser->cfg->dnscrypt_shared_secret_cache_size))
3850 cfg_parser->cfg->dnscrypt_shared_secret_cache_slabs = atoi($2);
3851 if(!is_pow2(cfg_parser->cfg->dnscrypt_shared_secret_cache_slabs))
3860 if(!cfg_parse_memsize($2, &cfg_parser->cfg->dnscrypt_nonce_cache_size))
3871 cfg_parser->cfg->dnscrypt_nonce_cache_slabs = atoi($2);
3872 if(!is_pow2(cfg_parser->cfg->dnscrypt_nonce_cache_slabs))
3881 cfg_parser->started_toplevel = 1;
3902 free(cfg_parser->cfg->cachedb_backend);
3903 cfg_parser->cfg->cachedb_backend = $2;
3913 OUTYY(("P(secret-seed:%s)\n", $2));
3914 free(cfg_parser->cfg->cachedb_secret);
3915 cfg_parser->cfg->cachedb_secret = $2;
3926 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3927 yyerror("expected yes or no.");
3928 else cfg_parser->cfg->cachedb_no_store = (strcmp($2, "yes")==0);
3939 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
3940 yyerror("expected yes or no.");
3941 else cfg_parser->cfg->cachedb_check_when_serve_expired = (strcmp($2, "yes")==0);
3952 free(cfg_parser->cfg->redis_server_host);
3953 cfg_parser->cfg->redis_server_host = $2;
3964 free(cfg_parser->cfg->redis_replica_server_host);
3965 cfg_parser->cfg->redis_replica_server_host = $2;
3980 else cfg_parser->cfg->redis_server_port = port;
3995 else cfg_parser->cfg->redis_replica_server_port = port;
4006 free(cfg_parser->cfg->redis_server_path);
4007 cfg_parser->cfg->redis_server_path = $2;
4018 free(cfg_parser->cfg->redis_replica_server_path);
4019 cfg_parser->cfg->redis_replica_server_path = $2;
4030 free(cfg_parser->cfg->redis_server_password);
4031 cfg_parser->cfg->redis_server_password = $2;
4042 free(cfg_parser->cfg->redis_replica_server_password);
4043 cfg_parser->cfg->redis_replica_server_password = $2;
4056 else cfg_parser->cfg->redis_timeout = atoi($2);
4069 else cfg_parser->cfg->redis_replica_timeout = atoi($2);
4082 else cfg_parser->cfg->redis_command_timeout = atoi($2);
4095 else cfg_parser->cfg->redis_replica_command_timeout = atoi($2);
4108 else cfg_parser->cfg->redis_connect_timeout = atoi($2);
4121 else cfg_parser->cfg->redis_replica_connect_timeout = atoi($2);
4132 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
4133 yyerror("expected yes or no.");
4134 else cfg_parser->cfg->redis_expire_records = (strcmp($2, "yes")==0);
4149 else cfg_parser->cfg->redis_logical_db = db;
4164 else cfg_parser->cfg->redis_replica_logical_db = db;
4177 if(!cfg_str2list_insert(&cfg_parser->cfg->tcp_connection_limits, $2, $3))
4185 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
4186 yyerror("expected yes or no.");
4187 else cfg_parser->cfg->do_answer_cookie = (strcmp($2, "yes")==0);
4201 cfg_parser->cfg->cookie_secret_len = secret_len;
4202 memcpy(cfg_parser->cfg->cookie_secret, secret, sizeof(secret));
4210 free(cfg_parser->cfg->cookie_secret_file);
4211 cfg_parser->cfg->cookie_secret_file = $2;
4219 else cfg_parser->cfg->iter_scrub_ns = atoi($2);
4228 else cfg_parser->cfg->iter_scrub_cname = atoi($2);
4237 else cfg_parser->cfg->max_global_quota = atoi($2);
4244 cfg_parser->started_toplevel = 1;
4254 OUTYY(("P(name-v4:%s)\n", $2));
4255 if(cfg_parser->cfg->ipset_name_v4)
4258 free(cfg_parser->cfg->ipset_name_v4);
4259 cfg_parser->cfg->ipset_name_v4 = $2;
4269 OUTYY(("P(name-v6:%s)\n", $2));
4270 if(cfg_parser->cfg->ipset_name_v6)
4273 free(cfg_parser->cfg->ipset_name_v6);
4274 cfg_parser->cfg->ipset_name_v6 = $2;
4295 yyerror("response-ip action: expected deny, redirect, "