Codebase list unbound / 031aa83
Imported Upstream version 1.4.17 Robert S. Edmonds 11 years ago
95 changed file(s) with 6729 addition(s) and 2719 deletion(s). Raw diff Collapse all Expand all
6262 LINTFLAGS=+quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -Drlimit=rlimit64 -D__gnuc_va_list=va_list
6363 #-Dglob64=glob -Dglobfree64=globfree
6464 # compat with openssl linux edition.
65 LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned"
65 LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned" -D"ECDSA_SIG=DSA_SIG"
6666 # compat with NetBSD
6767 LINTFLAGS+=@NETBSD_LINTFLAGS@
6868 # compat with OpenBSD
7777 PYTHONMOD_SRC=pythonmod/pythonmod_utils.c
7878 # pythonmod.lo pythonmod_utils.lo if python mod enabled.
7979 PYTHONMOD_OBJ=@PYTHONMOD_OBJ@
80 PYTHONMOD_HEADER=@PYTHONMOD_HEADER@
8081 # libunbound/python/libunbound_wrap.c is dealt with by its own rules.
8182 PYUNBOUND_SRC=
8283 # libunbound_wrap.lo if python libunbound wrapper enabled.
512513 -e 's?$$(srcdir)/util/configlexer.c?util/configlexer.c?g' \
513514 -e 's?$$(srcdir)/util/configparser.c?util/configparser.c?g' \
514515 -e 's?$$(srcdir)/util/configparser.h?util/configparser.h?g' \
516 -e 's?$$(srcdir)/pythonmod/pythonmod.h?$$(PYTHONMOD_HEADER)?g' \
515517 -e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' \
516518 > $(DEPEND_TMP)
517519 cp $(DEPEND_TARGET) $(DEPEND_TMP2)
597599 $(srcdir)/util/net_help.h
598600 iter_fwd.lo iter_fwd.o: $(srcdir)/iterator/iter_fwd.c config.h \
599601 $(srcdir)/iterator/iter_fwd.h \
600 $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h $(srcdir)/util/regional.h \
601 $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \
602 $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h
602 $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \
603 $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h
603604 iter_hints.lo iter_hints.o: $(srcdir)/iterator/iter_hints.c config.h \
604605 $(srcdir)/iterator/iter_hints.h \
605606 $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \
606 $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \
607 $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \
607608 $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h
608609 iter_priv.lo iter_priv.o: $(srcdir)/iterator/iter_priv.c config.h \
609610 $(srcdir)/iterator/iter_priv.h \
640641 $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h \
641642 $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h \
642643 $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/validator/val_anchor.h \
643 $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h
644 $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_utils.h
644645 listen_dnsport.lo listen_dnsport.o: $(srcdir)/services/listen_dnsport.c config.h \
645646 $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h \
646647 $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \
667668 $(srcdir)/util/fptr_wlist.h \
668669 $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \
669670 $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \
670 $(srcdir)/validator/val_utils.h $(srcdir)/pythonmod/pythonmod.h
671 $(srcdir)/validator/val_utils.h $(PYTHONMOD_HEADER)
671672 outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \
672673 $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \
673674 $(srcdir)/util/netevent.h \
717718 $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \
718719 $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/util/storage/dnstree.h \
719720 $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h $(srcdir)/libunbound/unbound.h \
720 $(srcdir)/util/config_file.h $(srcdir)/pythonmod/pythonmod.h
721 $(srcdir)/util/config_file.h $(PYTHONMOD_HEADER)
721722 locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
722723
723724 log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h \
801802 $(srcdir)/validator/val_anchor.h \
802803 $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_sigcrypt.h \
803804 $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/validator/autotrust.h \
804 $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h
805 $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h
805806 validator.lo validator.o: $(srcdir)/validator/validator.c config.h \
806807 $(srcdir)/validator/validator.h \
807808 $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
950951 $(srcdir)/util/rtt.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/localzone.h \
951952 $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h \
952953 $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \
953 $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \
954 $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h $(srcdir)/iterator/iter_delegpt.h \
955 $(srcdir)/services/outside_network.h
954 $(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \
955 $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \
956 $(srcdir)/iterator/iter_delegpt.h $(srcdir)/services/outside_network.h
956957 stats.lo stats.o: $(srcdir)/daemon/stats.c config.h \
957958 $(srcdir)/daemon/stats.h \
958959 $(srcdir)/util/timehist.h $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
984985 $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h \
985986 $(srcdir)/util/rtt.h $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \
986987 $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \
987 $(srcdir)/iterator/iter_fwd.h $(srcdir)/validator/autotrust.h
988 $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/validator/autotrust.h \
989 $(srcdir)/validator/val_anchor.h
988990 testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/testcode/ldns-testpkts.h \
989991 $(srcdir)/testcode/replay.h \
990992 $(srcdir)/util/netevent.h $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h $(srcdir)/daemon/remote.h \
10091011 $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h \
10101012 $(srcdir)/util/rtt.h $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \
10111013 $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \
1012 $(srcdir)/iterator/iter_fwd.h $(srcdir)/validator/autotrust.h
1014 $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/validator/autotrust.h \
1015 $(srcdir)/validator/val_anchor.h
10131016 acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \
10141017 $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \
10151018 $(srcdir)/util/config_file.h \
10791082 $(srcdir)/util/data/msgparse.h \
10801083 $(srcdir)/util/net_help.h \
10811084 $(srcdir)/util/regional.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \
1082 $(srcdir)/iterator/iter_fwd.h $(srcdir)/util/rbtree.h $(srcdir)/validator/validator.h \
1083 $(srcdir)/validator/val_utils.h $(srcdir)/services/localzone.h $(srcdir)/pythonmod/pythonmod.h
1085 $(srcdir)/iterator/iter_fwd.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h \
1086 $(srcdir)/util/storage/dnstree.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h \
1087 $(srcdir)/services/localzone.h $(PYTHONMOD_HEADER)
10841088 worker_cb.lo worker_cb.o: $(srcdir)/smallapp/worker_cb.c config.h $(srcdir)/util/log.h \
10851089 $(srcdir)/services/mesh.h \
10861090 $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h \
11161120 $(srcdir)/util/data/msgreply.h $(srcdir)/services/localzone.h $(srcdir)/services/cache/rrset.h \
11171121 $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h $(srcdir)/util/regional.h \
11181122 $(srcdir)/util/random.h $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h \
1119 $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/tube.h $(srcdir)/iterator/iter_fwd.h
1123 $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/tube.h $(srcdir)/iterator/iter_fwd.h \
1124 $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h
11201125 unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \
11211126
11221127 asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \
00 Unbound README
11 * ./configure && make && make install
2 * on BSDs and Solaris use gmake (GNU make).
32 * You can use libevent if you want. libevent is useful when using
43 many (10000) outgoing ports. By default max 256 ports are opened at
54 the same time and the builtin alternative is equally capable and a
11 # Copyright 2009, Wouter Wijngaards, NLnet Labs.
22 # BSD licensed.
33 #
4 # Version 20
4 # Version 21
5 # 2012-02-09 Fix AHX_MEMCMP_BROKEN with undef in compat/memcmp.h.
56 # 2012-01-20 Fix COMPILER_FLAGS_UNBOUND for gcc 4.6.2 assigned-not-used-warns.
67 # 2011-12-05 Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
78 # Fix ACX_MALLOC for redefined malloc error.
13251326 dnl define memcmp to its replacement, pass unique id for program as arg
13261327 AC_DEFUN([AHX_MEMCMP_BROKEN], [
13271328 #ifdef MEMCMP_IS_BROKEN
1328 # ifdef memcmp
1329 # undef memcmp
1330 # endif
1329 #include "compat/memcmp.h"
13311330 #define memcmp memcmp_$1
13321331 int memcmp(const void *x, const void *y, size_t n);
13331332 #endif
0 /*
1 * memcmp.h: undef memcmp for compat.
2 *
3 * Copyright (c) 2012, NLnet Labs. All rights reserved.
4 *
5 * See LICENSE for the license.
6 */
7 #ifndef COMPAT_MEMCMP_H
8 #define COMPAT_MEMCMP_H
9
10 #ifdef memcmp
11 /* undef here otherwise autoheader messes it up in config.h */
12 # undef memcmp
13 #endif
14
15 #endif /* COMPAT_MEMCMP_H */
5050 /* Define to 1 if you have the `daemon' function. */
5151 #undef HAVE_DAEMON
5252
53 /* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
54 don't. */
55 #undef HAVE_DECL_NID_SECP384R1
56
57 /* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
58 if you don't. */
59 #undef HAVE_DECL_NID_X9_62_PRIME256V1
60
5361 /* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
5462 if you don't. */
5563 #undef HAVE_DECL_SK_SSL_COMP_POP_FREE
298306 /* Define to 1 if you have the `strptime' function. */
299307 #undef HAVE_STRPTIME
300308
309 /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
310 #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
311
301312 /* Define if you have Swig libraries and header files. */
302313 #undef HAVE_SWIG
303314
477488
478489 /* define this to enable debug checks. */
479490 #undef UNBOUND_DEBUG
491
492 /* Define this to enable ECDSA support. */
493 #undef USE_ECDSA
494
495 /* Define this to enable an EVP workaround for older openssl */
496 #undef USE_ECDSA_EVP_WORKAROUND
480497
481498 /* Define this to enable GOST support. */
482499 #undef USE_GOST
810827
811828
812829 #ifdef MEMCMP_IS_BROKEN
813 # ifdef memcmp
814 # undef memcmp
815 # endif
830 #include "compat/memcmp.h"
816831 #define memcmp memcmp_unbound
817832 int memcmp(const void *x, const void *y, size_t n);
818833 #endif
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.68 for unbound 1.4.16.
2 # Generated by GNU Autoconf 2.68 for unbound 1.4.17.
33 #
44 # Report bugs to <unbound-bugs@nlnetlabs.nl>.
55 #
569569 # Identity of this package.
570570 PACKAGE_NAME='unbound'
571571 PACKAGE_TARNAME='unbound'
572 PACKAGE_VERSION='1.4.16'
573 PACKAGE_STRING='unbound 1.4.16'
572 PACKAGE_VERSION='1.4.17'
573 PACKAGE_STRING='unbound 1.4.17'
574574 PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl'
575575 PACKAGE_URL=''
576576
639639 WITH_PYUNBOUND
640640 PYTHONMOD_UNINSTALL
641641 PYTHONMOD_INSTALL
642 PYTHONMOD_HEADER
642643 PYTHONMOD_OBJ
643644 WITH_PYTHONMODULE
644645 swig
790791 with_ssl
791792 enable_sha2
792793 enable_gost
794 enable_ecdsa
793795 with_libevent
794796 with_libexpat
795797 enable_static_exe
13511353 # Omit some internal or obsolete options to make the list less imposing.
13521354 # This message is too long to be a string in the A/UX 3.1 sh.
13531355 cat <<_ACEOF
1354 \`configure' configures unbound 1.4.16 to adapt to many kinds of systems.
1356 \`configure' configures unbound 1.4.17 to adapt to many kinds of systems.
13551357
13561358 Usage: $0 [OPTION]... [VAR=VALUE]...
13571359
14171419
14181420 if test -n "$ac_init_help"; then
14191421 case $ac_init_help in
1420 short | recursive ) echo "Configuration of unbound 1.4.16:";;
1422 short | recursive ) echo "Configuration of unbound 1.4.17:";;
14211423 esac
14221424 cat <<\_ACEOF
14231425
14441446 purposes
14451447 --disable-sha2 Disable SHA256 and SHA512 RRSIG support
14461448 --disable-gost Disable GOST support
1449 --disable-ecdsa Disable ECDSA support
14471450 --enable-static-exe enable to compile executables statically against
14481451 event, ldns libs, for debug purposes
14491452 --enable-lock-checks enable to check lock and unlock calls, for debug
15821585 test -n "$ac_init_help" && exit $ac_status
15831586 if $ac_init_version; then
15841587 cat <<\_ACEOF
1585 unbound configure 1.4.16
1588 unbound configure 1.4.17
15861589 generated by GNU Autoconf 2.68
15871590
15881591 Copyright (C) 2010 Free Software Foundation, Inc.
20472050 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
20482051
20492052 } # ac_fn_c_check_decl
2053
2054 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2055 # ----------------------------------------------------
2056 # Tries to find if the field MEMBER exists in type AGGR, after including
2057 # INCLUDES, setting cache variable VAR accordingly.
2058 ac_fn_c_check_member ()
2059 {
2060 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2062 $as_echo_n "checking for $2.$3... " >&6; }
2063 if eval \${$4+:} false; then :
2064 $as_echo_n "(cached) " >&6
2065 else
2066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067 /* end confdefs.h. */
2068 $5
2069 int
2070 main ()
2071 {
2072 static $2 ac_aggr;
2073 if (ac_aggr.$3)
2074 return 0;
2075 ;
2076 return 0;
2077 }
2078 _ACEOF
2079 if ac_fn_c_try_compile "$LINENO"; then :
2080 eval "$4=yes"
2081 else
2082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2083 /* end confdefs.h. */
2084 $5
2085 int
2086 main ()
2087 {
2088 static $2 ac_aggr;
2089 if (sizeof ac_aggr.$3)
2090 return 0;
2091 ;
2092 return 0;
2093 }
2094 _ACEOF
2095 if ac_fn_c_try_compile "$LINENO"; then :
2096 eval "$4=yes"
2097 else
2098 eval "$4=no"
2099 fi
2100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101 fi
2102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103 fi
2104 eval ac_res=\$$4
2105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2106 $as_echo "$ac_res" >&6; }
2107 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2108
2109 } # ac_fn_c_check_member
20502110 cat >config.log <<_ACEOF
20512111 This file contains any messages produced by compilers while
20522112 running configure, to aid debugging if configure makes a mistake.
20532113
2054 It was created by unbound $as_me 1.4.16, which was
2114 It was created by unbound $as_me 1.4.17, which was
20552115 generated by GNU Autoconf 2.68. Invocation command line was
20562116
20572117 $ $0 $@
24342494 # 1.4.14 had 2:14:0
24352495 # 1.4.15 had 3:0:1 # adds ub_version()
24362496 # 1.4.16 had 3:1:1
2497 # 1.4.17 had 3:2:1
24372498
24382499 # Current -- the number of the binary API that we're implementing
24392500 # Revision -- which iteration of the implementation of the binary
39454006 fi
39464007
39474008
3948 hdr_chroot="`echo $UNBOUND_CHOOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4009 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
39494010
39504011
39514012 cat >>confdefs.h <<_ACEOF
1588115942
1588215943 PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
1588315944
15945 PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
15946
1588415947 PYTHONMOD_INSTALL=pythonmod-install
1588515948
1588615949 PYTHONMOD_UNINSTALL=pythonmod-uninstall
1654916612
1655016613 fi
1655116614 ;;
16615 esac
16616
16617 # Check whether --enable-ecdsa was given.
16618 if test "${enable_ecdsa+set}" = set; then :
16619 enableval=$enable_ecdsa;
16620 fi
16621
16622 use_ecdsa="no"
16623 case "$enable_ecdsa" in
16624 no)
16625 ;;
16626 *)
16627 ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
16628 if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
16629
16630 else
16631 as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
16632 fi
16633
16634 ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
16635 if test "x$ac_cv_func_SHA384_Init" = xyes; then :
16636
16637 else
16638 as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
16639 fi
16640
16641 ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
16642 #include <openssl/evp.h>
16643
16644 "
16645 if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
16646 ac_have_decl=1
16647 else
16648 ac_have_decl=0
16649 fi
16650
16651 cat >>confdefs.h <<_ACEOF
16652 #define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
16653 _ACEOF
16654 if test $ac_have_decl = 1; then :
16655
16656 else
16657 as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
16658 fi
16659 ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
16660 #include <openssl/evp.h>
16661
16662 "
16663 if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
16664 ac_have_decl=1
16665 else
16666 ac_have_decl=0
16667 fi
16668
16669 cat >>confdefs.h <<_ACEOF
16670 #define HAVE_DECL_NID_SECP384R1 $ac_have_decl
16671 _ACEOF
16672 if test $ac_have_decl = 1; then :
16673
16674 else
16675 as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
16676 fi
16677
16678 # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
16679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
16680 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
16681 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
16682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16683 $as_echo "no" >&6; }
16684
16685 cat >>confdefs.h <<_ACEOF
16686 #define USE_ECDSA_EVP_WORKAROUND 1
16687 _ACEOF
16688
16689 else
16690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16691 $as_echo "yes" >&6; }
16692 fi
16693 # we now know we have ECDSA and the required curves.
16694
16695 cat >>confdefs.h <<_ACEOF
16696 #define USE_ECDSA 1
16697 _ACEOF
16698
16699 use_ecdsa="yes"
16700 ;;
1655216701 esac
1655316702
1655416703 # check for libevent
1727217421
1727317422 fi
1727417423
17424 ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
17425 $ac_includes_default
17426 #if HAVE_SYS_PARAM_H
17427 #include <sys/param.h>
17428 #endif
17429
17430 #ifdef HAVE_SYS_SOCKET_H
17431 #include <sys/socket.h>
17432 #endif
17433
17434 #ifdef HAVE_SYS_UIO_H
17435 #include <sys/uio.h>
17436 #endif
17437
17438 #ifdef HAVE_NETINET_IN_H
17439 #include <netinet/in.h>
17440 #endif
17441
17442 #ifdef HAVE_ARPA_INET_H
17443 #include <arpa/inet.h>
17444 #endif
17445
17446 #ifdef HAVE_WINSOCK2_H
17447 #include <winsock2.h>
17448 #endif
17449
17450 #ifdef HAVE_WS2TCPIP_H
17451 #include <ws2tcpip.h>
17452 #endif
17453
17454 "
17455 if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
17456
17457 cat >>confdefs.h <<_ACEOF
17458 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
17459 _ACEOF
17460
17461
17462 fi
17463
1727517464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
1727617465 $as_echo_n "checking for library containing setusercontext... " >&6; }
1727717466 if ${ac_cv_search_setusercontext+:} false; then :
1769917888 else
1770017889 ac_cv_func_ldns_key_EVP_load_gost_id="yes"
1770117890 fi
17891 if test x$use_ecdsa = xyes; then
17892 ac_fn_c_check_decl "$LINENO" "LDNS_ECDSAP384SHA384" "ac_cv_have_decl_LDNS_ECDSAP384SHA384" "
17893 $ac_includes_default
17894 #ifdef HAVE_SYS_SOCKET_H
17895 # include <sys/socket.h>
17896 #endif
17897 #ifdef HAVE_WS2TCPIP_H
17898 # include <ws2tcpip.h>
17899 #endif
17900 #include <ldns/ldns.h>
17901
17902 "
17903 if test "x$ac_cv_have_decl_LDNS_ECDSAP384SHA384" = xyes; then :
17904
17905 fi
17906
17907 else
17908 ac_cv_have_decl_LDNS_ECDSAP384SHA384="yes"
17909 fi
1770217910 for ac_header in ldns/ldns.h
1770317911 do :
1770417912 ac_fn_c_check_header_compile "$LINENO" "ldns/ldns.h" "ac_cv_header_ldns_ldns_h" "$ac_includes_default
1774117949 -a $ac_cv_func_ldns_get_random = yes \
1774217950 -a $ac_cv_header_ldns_ldns_h = yes \
1774317951 -a $ac_cv_func_ldns_b32_ntop_extended_hex = yes \
17744 -a $ac_cv_func_ldns_key_EVP_load_gost_id = yes; then
17952 -a $ac_cv_func_ldns_key_EVP_load_gost_id = yes \
17953 -a $ac_cv_have_decl_LDNS_ECDSAP384SHA384 = yes; then
1774517954 :
1774617955 else
1774717956 as_fn_error $? "ldns library is not recent, update the ldns library, install it into system lib dir or use --with-ldns=path to other location. The --with-ldns can point to the make-dir of ldns. Package libldns or download source http://www.nlnetlabs.nl/projects/ldns" "$LINENO" 5
1834718556 # report actual input values of CONFIG_FILES etc. instead of their
1834818557 # values after options handling.
1834918558 ac_log="
18350 This file was extended by unbound $as_me 1.4.16, which was
18559 This file was extended by unbound $as_me 1.4.17, which was
1835118560 generated by GNU Autoconf 2.68. Invocation command line was
1835218561
1835318562 CONFIG_FILES = $CONFIG_FILES
1841318622 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1841418623 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1841518624 ac_cs_version="\\
18416 unbound config.status 1.4.16
18625 unbound config.status 1.4.17
1841718626 configured by $0, generated by GNU Autoconf 2.68,
1841818627 with options \\"\$ac_cs_config\\"
1841918628
55 sinclude(acx_python.m4)
66 sinclude(ac_pkg_swig.m4)
77
8 AC_INIT(unbound, 1.4.16, unbound-bugs@nlnetlabs.nl, unbound)
8 AC_INIT(unbound, 1.4.17, unbound-bugs@nlnetlabs.nl, unbound)
99
1010 LIBUNBOUND_CURRENT=3
1111 LIBUNBOUND_REVISION=1
4141 # 1.4.14 had 2:14:0
4242 # 1.4.15 had 3:0:1 # adds ub_version()
4343 # 1.4.16 had 3:1:1
44 # 1.4.17 had 3:2:1
4445
4546 # Current -- the number of the binary API that we're implementing
4647 # Revision -- which iteration of the implementation of the binary
138139 fi
139140 )
140141 AC_SUBST(UNBOUND_CHROOT_DIR)
141 ACX_ESCAPE_BACKSLASH($UNBOUND_CHOOT_DIR, hdr_chroot)
142 ACX_ESCAPE_BACKSLASH($UNBOUND_CHROOT_DIR, hdr_chroot)
142143 AC_DEFINE_UNQUOTED(CHROOT_DIR, ["$hdr_chroot"], [Directory to chroot to])
143144
144145 AC_ARG_WITH(share-dir,
471472 AC_SUBST(WITH_PYTHONMODULE)
472473 PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
473474 AC_SUBST(PYTHONMOD_OBJ)
475 PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
476 AC_SUBST(PYTHONMOD_HEADER)
474477 PYTHONMOD_INSTALL=pythonmod-install
475478 AC_SUBST(PYTHONMOD_INSTALL)
476479 PYTHONMOD_UNINSTALL=pythonmod-uninstall
654657 AC_DEFINE([USE_GOST], [1], [Define this to enable GOST support.])
655658 fi
656659 ;;
660 esac
661
662 AC_ARG_ENABLE(ecdsa, AC_HELP_STRING([--disable-ecdsa], [Disable ECDSA support]))
663 use_ecdsa="no"
664 case "$enable_ecdsa" in
665 no)
666 ;;
667 *)
668 AC_CHECK_FUNC(ECDSA_sign, [], [AC_MSG_ERROR([OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa])])
669 AC_CHECK_FUNC(SHA384_Init, [], [AC_MSG_ERROR([OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa])])
670 AC_CHECK_DECLS([NID_X9_62_prime256v1, NID_secp384r1], [], [AC_MSG_ERROR([OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa])], [AC_INCLUDES_DEFAULT
671 #include <openssl/evp.h>
672 ])
673 # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
674 AC_MSG_CHECKING([if openssl supports SHA2 and ECDSA with EVP])
675 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
676 AC_MSG_RESULT([no])
677 AC_DEFINE_UNQUOTED([USE_ECDSA_EVP_WORKAROUND], [1], [Define this to enable an EVP workaround for older openssl])
678 else
679 AC_MSG_RESULT([yes])
680 fi
681 # we now know we have ECDSA and the required curves.
682 AC_DEFINE_UNQUOTED([USE_ECDSA], [1], [Define this to enable ECDSA support.])
683 use_ecdsa="yes"
684 ;;
657685 esac
658686
659687 # check for libevent
823851 ])
824852 fi
825853
854 AC_CHECK_MEMBERS([struct in_pktinfo.ipi_spec_dst],,,[
855 AC_INCLUDES_DEFAULT
856 #if HAVE_SYS_PARAM_H
857 #include <sys/param.h>
858 #endif
859
860 #ifdef HAVE_SYS_SOCKET_H
861 #include <sys/socket.h>
862 #endif
863
864 #ifdef HAVE_SYS_UIO_H
865 #include <sys/uio.h>
866 #endif
867
868 #ifdef HAVE_NETINET_IN_H
869 #include <netinet/in.h>
870 #endif
871
872 #ifdef HAVE_ARPA_INET_H
873 #include <arpa/inet.h>
874 #endif
875
876 #ifdef HAVE_WINSOCK2_H
877 #include <winsock2.h>
878 #endif
879
880 #ifdef HAVE_WS2TCPIP_H
881 #include <ws2tcpip.h>
882 #endif
883 ])
826884 AC_SEARCH_LIBS([setusercontext], [util])
827885 AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex])
828886 AC_CHECK_FUNCS([setresuid],,[AC_CHECK_FUNCS([setreuid])])
940998 else
941999 ac_cv_func_ldns_key_EVP_load_gost_id="yes"
9421000 fi
1001 if test x$use_ecdsa = xyes; then
1002 AC_CHECK_DECL([LDNS_ECDSAP384SHA384], [], [], [
1003 AC_INCLUDES_DEFAULT
1004 #ifdef HAVE_SYS_SOCKET_H
1005 # include <sys/socket.h>
1006 #endif
1007 #ifdef HAVE_WS2TCPIP_H
1008 # include <ws2tcpip.h>
1009 #endif
1010 #include <ldns/ldns.h>
1011 ])
1012 else
1013 ac_cv_have_decl_LDNS_ECDSAP384SHA384="yes"
1014 fi
9431015 AC_CHECK_HEADERS([ldns/ldns.h],,[
9441016 AC_MSG_ERROR([No ldns include file found, install the ldns library development files. Install package ldns-dev or ldns-devel or download source http://www.nlnetlabs.nl/projects/ldns])
9451017 ], [AC_INCLUDES_DEFAULT
9681040 -a $ac_cv_func_ldns_get_random = yes \
9691041 -a $ac_cv_header_ldns_ldns_h = yes \
9701042 -a $ac_cv_func_ldns_b32_ntop_extended_hex = yes \
971 -a $ac_cv_func_ldns_key_EVP_load_gost_id = yes; then
1043 -a $ac_cv_func_ldns_key_EVP_load_gost_id = yes \
1044 -a $ac_cv_have_decl_LDNS_ECDSAP384SHA384 = yes; then
9721045 dnl ldns was found
9731046 :
9741047 else
2626 # first the daemon itself, then the controller for the daemon.
2727 reporter_daemon() {
2828 trap "rm -f \"$pidfile\"" EXIT
29 tail -f $logfile | grep "unbound.*info: validation failure" | \
29 tail -F $logfile | grep --line-buffered "unbound.*info: validation failure" | \
3030 while read x; do
3131 echo "$x" | $notify_cmd
3232 done
764764 if(!go_on)
765765 return 1; /* skip this one, not all references satisfied */
766766
767 if(!dns_cache_store(&worker->env, &qinf, &rep, 0, 0, NULL)) {
767 if(!dns_cache_store(&worker->env, &qinf, &rep, 0, 0, 0, NULL)) {
768768 log_warn("error out of memory");
769769 return 0;
770770 }
801801 {
802802 char buf[257];
803803 struct delegpt_addr* a;
804 int lame, dlame, rlame, rto, edns_vs, to, delay, entry_ttl;
804 int lame, dlame, rlame, rto, edns_vs, to, delay, entry_ttl,
805 tA = 0, tAAAA = 0, tother = 0;
805806 struct rtt_info ri;
806807 uint8_t edns_lame_known;
807808 for(a = dp->target_list; a; a = a->next_target) {
816817 delay=0;
817818 entry_ttl = infra_get_host_rto(worker->env.infra_cache,
818819 &a->addr, a->addrlen, dp->name, dp->namelen,
819 &ri, &delay, *worker->env.now);
820 &ri, &delay, *worker->env.now, &tA, &tAAAA, &tother);
820821 if(entry_ttl == -2 && ri.rto >= USEFUL_SERVER_TOP_TIMEOUT) {
821 if(!ssl_printf(ssl, "expired, rto %d msec.\n", ri.rto))
822 if(!ssl_printf(ssl, "expired, rto %d msec, tA %d "
823 "tAAAA %d tother %d.\n", ri.rto, tA, tAAAA,
824 tother))
822825 return;
823826 continue;
824827 }
839842 continue; /* skip stuff not in infra cache */
840843 }
841844 if(!ssl_printf(ssl, "%s%s%s%srto %d msec, ttl %d, ping %d "
842 "var %d rtt %d",
845 "var %d rtt %d, tA %d, tAAAA %d, tother %d",
843846 lame?"LAME ":"", dlame?"NoDNSSEC ":"",
844847 a->lame?"AddrWasParentSide ":"",
845848 rlame?"NoAuthButRecursive ":"", rto, entry_ttl,
846 ri.srtt, ri.rttvar, rtt_notimeout(&ri)))
849 ri.srtt, ri.rttvar, rtt_notimeout(&ri),
850 tA, tAAAA, tother))
847851 return;
848852 if(delay)
849853 if(!ssl_printf(ssl, ", probedelay %d", delay))
906910 char b[260];
907911 struct query_info qinfo;
908912 struct iter_hints_stub* stub;
909 struct iter_env* ie;
910913 regional_free_all(region);
911914 qinfo.qname = nm;
912915 qinfo.qname_len = nmlen;
913916 qinfo.qtype = LDNS_RR_TYPE_A;
914917 qinfo.qclass = LDNS_RR_CLASS_IN;
915
916 if(modstack_find(&worker->daemon->mods, "iterator") == -1) {
917 return ssl_printf(ssl, "error: no iterator module\n");
918 }
919 ie = (struct iter_env*)worker->env.modinfo[modstack_find(&worker->
920 daemon->mods, "iterator")];
921918
922919 dname_str(nm, b);
923920 if(!ssl_printf(ssl, "The following name servers are used for lookup "
963960 continue;
964961 }
965962 }
966 stub = hints_lookup_stub(ie->hints, nm, qinfo.qclass, dp);
963 stub = hints_lookup_stub(worker->env.hints, nm, qinfo.qclass,
964 dp);
967965 if(stub) {
968966 if(stub->noprime) {
969967 if(!ssl_printf(ssl, "The noprime stub servers "
6767 #include "validator/validator.h"
6868 #include "validator/val_kcache.h"
6969 #include "validator/val_kentry.h"
70 #include "validator/val_anchor.h"
7071 #include "iterator/iterator.h"
7172 #include "iterator/iter_fwd.h"
7273 #include "iterator/iter_hints.h"
358359 }
359360 }
360361 return 1;
362 }
363
364 void daemon_remote_stop_accept(struct daemon_remote* rc)
365 {
366 struct listen_list* p;
367 for(p=rc->accept_list; p; p=p->next) {
368 comm_point_stop_listening(p->com);
369 }
370 }
371
372 void daemon_remote_start_accept(struct daemon_remote* rc)
373 {
374 struct listen_list* p;
375 for(p=rc->accept_list; p; p=p->next) {
376 comm_point_start_listening(p->com, -1, -1);
377 }
361378 }
362379
363380 int remote_accept_callback(struct comm_point* c, void* arg, int err,
11241141 struct infra_key* k = (struct infra_key*)e->key;
11251142 if(sockaddr_cmp(&inf->addr, inf->addrlen, &k->addr, k->addrlen) == 0) {
11261143 struct infra_data* d = (struct infra_data*)e->data;
1144 d->probedelay = 0;
1145 d->timeout_A = 0;
1146 d->timeout_AAAA = 0;
1147 d->timeout_other = 0;
1148 rtt_init(&d->rtt);
11271149 if(d->ttl >= inf->now) {
11281150 d->ttl = inf->expired;
11291151 inf->num_keys++;
13361358
13371359 /** parse args into delegpt */
13381360 static struct delegpt*
1339 parse_delegpt(SSL* ssl, struct regional* region, char* args, uint8_t* root)
1361 parse_delegpt(SSL* ssl, char* args, uint8_t* nm, int allow_names)
13401362 {
13411363 /* parse args and add in */
13421364 char* p = args;
13431365 char* todo;
1344 struct delegpt* dp = delegpt_create(region);
1366 struct delegpt* dp = delegpt_create_mlc(nm);
13451367 struct sockaddr_storage addr;
13461368 socklen_t addrlen;
1347 if(!dp || !delegpt_set_name(dp, region, root)) {
1369 if(!dp) {
13481370 (void)ssl_printf(ssl, "error out of memory\n");
13491371 return NULL;
13501372 }
13571379 }
13581380 /* parse address */
13591381 if(!extstrtoaddr(todo, &addr, &addrlen)) {
1360 (void)ssl_printf(ssl, "error cannot parse"
1361 " IP address '%s'\n", todo);
1362 return NULL;
1363 }
1364 /* add address */
1365 if(!delegpt_add_addr(dp, region, &addr, addrlen, 0, 0)) {
1366 (void)ssl_printf(ssl, "error out of memory\n");
1367 return NULL;
1382 if(allow_names) {
1383 uint8_t* n = NULL;
1384 size_t ln;
1385 int lb;
1386 if(!parse_arg_name(ssl, todo, &n, &ln, &lb)) {
1387 (void)ssl_printf(ssl, "error cannot "
1388 "parse IP address or name "
1389 "'%s'\n", todo);
1390 delegpt_free_mlc(dp);
1391 return NULL;
1392 }
1393 if(!delegpt_add_ns_mlc(dp, n, 0)) {
1394 (void)ssl_printf(ssl, "error out of memory\n");
1395 delegpt_free_mlc(dp);
1396 return NULL;
1397 }
1398 free(n);
1399
1400 } else {
1401 (void)ssl_printf(ssl, "error cannot parse"
1402 " IP address '%s'\n", todo);
1403 delegpt_free_mlc(dp);
1404 return NULL;
1405 }
1406 } else {
1407 /* add address */
1408 if(!delegpt_add_addr_mlc(dp, &addr, addrlen, 0, 0)) {
1409 (void)ssl_printf(ssl, "error out of memory\n");
1410 delegpt_free_mlc(dp);
1411 return NULL;
1412 }
13681413 }
13691414 }
13701415 return dp;
13881433 * the actual mesh is not running, so we can freely edit it. */
13891434 /* delete all the existing queries first */
13901435 mesh_delete_all(worker->env.mesh);
1391 /* reset the fwd structure ; the cfg is unchanged (shared by threads)*/
1392 /* this reset frees up memory */
1393 forwards_apply_cfg(fwd, worker->env.cfg);
13941436 if(strcmp(args, "off") == 0) {
13951437 forwards_delete_zone(fwd, LDNS_RR_CLASS_IN, root);
13961438 } else {
13971439 struct delegpt* dp;
1398 if(!(dp = parse_delegpt(ssl, fwd->region, args, root)))
1440 if(!(dp = parse_delegpt(ssl, args, root, 0)))
13991441 return;
14001442 if(!forwards_add_zone(fwd, LDNS_RR_CLASS_IN, dp)) {
14011443 (void)ssl_printf(ssl, "error out of memory\n");
1444 delegpt_free_mlc(dp);
14021445 return;
14031446 }
14041447 }
1448 send_ok(ssl);
1449 }
1450
1451 static int
1452 parse_fs_args(SSL* ssl, char* args, uint8_t** nm, struct delegpt** dp,
1453 int* insecure, int* prime)
1454 {
1455 char* zonename;
1456 char* rest;
1457 size_t nmlen;
1458 int nmlabs;
1459 /* parse all -x args */
1460 while(args[0] == '+') {
1461 if(!find_arg2(ssl, args, &rest))
1462 return 0;
1463 while(*(++args) != 0) {
1464 if(*args == 'i' && insecure)
1465 *insecure = 1;
1466 else if(*args == 'p' && prime)
1467 *prime = 1;
1468 else {
1469 (void)ssl_printf(ssl, "error: unknown option %s\n", args);
1470 return 0;
1471 }
1472 }
1473 args = rest;
1474 }
1475 /* parse name */
1476 if(dp) {
1477 if(!find_arg2(ssl, args, &rest))
1478 return 0;
1479 zonename = args;
1480 args = rest;
1481 } else zonename = args;
1482 if(!parse_arg_name(ssl, zonename, nm, &nmlen, &nmlabs))
1483 return 0;
1484
1485 /* parse dp */
1486 if(dp) {
1487 if(!(*dp = parse_delegpt(ssl, args, *nm, 1))) {
1488 free(*nm);
1489 return 0;
1490 }
1491 }
1492 return 1;
1493 }
1494
1495 /** do the forward_add command */
1496 static void
1497 do_forward_add(SSL* ssl, struct worker* worker, char* args)
1498 {
1499 struct iter_forwards* fwd = worker->env.fwds;
1500 int insecure = 0;
1501 uint8_t* nm = NULL;
1502 struct delegpt* dp = NULL;
1503 if(!parse_fs_args(ssl, args, &nm, &dp, &insecure, NULL))
1504 return;
1505 if(insecure) {
1506 if(!anchors_add_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
1507 nm)) {
1508 (void)ssl_printf(ssl, "error out of memory\n");
1509 delegpt_free_mlc(dp);
1510 free(nm);
1511 return;
1512 }
1513 }
1514 if(!forwards_add_zone(fwd, LDNS_RR_CLASS_IN, dp)) {
1515 (void)ssl_printf(ssl, "error out of memory\n");
1516 delegpt_free_mlc(dp);
1517 free(nm);
1518 return;
1519 }
1520 free(nm);
1521 send_ok(ssl);
1522 }
1523
1524 /** do the forward_remove command */
1525 static void
1526 do_forward_remove(SSL* ssl, struct worker* worker, char* args)
1527 {
1528 struct iter_forwards* fwd = worker->env.fwds;
1529 int insecure = 0;
1530 uint8_t* nm = NULL;
1531 if(!parse_fs_args(ssl, args, &nm, NULL, &insecure, NULL))
1532 return;
1533 if(insecure)
1534 anchors_delete_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
1535 nm);
1536 forwards_delete_zone(fwd, LDNS_RR_CLASS_IN, nm);
1537 free(nm);
1538 send_ok(ssl);
1539 }
1540
1541 /** do the stub_add command */
1542 static void
1543 do_stub_add(SSL* ssl, struct worker* worker, char* args)
1544 {
1545 struct iter_forwards* fwd = worker->env.fwds;
1546 int insecure = 0, prime = 0;
1547 uint8_t* nm = NULL;
1548 struct delegpt* dp = NULL;
1549 if(!parse_fs_args(ssl, args, &nm, &dp, &insecure, &prime))
1550 return;
1551 if(insecure) {
1552 if(!anchors_add_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
1553 nm)) {
1554 (void)ssl_printf(ssl, "error out of memory\n");
1555 delegpt_free_mlc(dp);
1556 free(nm);
1557 return;
1558 }
1559 }
1560 if(!forwards_add_stub_hole(fwd, LDNS_RR_CLASS_IN, nm)) {
1561 if(insecure) anchors_delete_insecure(worker->env.anchors,
1562 LDNS_RR_CLASS_IN, nm);
1563 (void)ssl_printf(ssl, "error out of memory\n");
1564 delegpt_free_mlc(dp);
1565 free(nm);
1566 return;
1567 }
1568 if(!hints_add_stub(worker->env.hints, LDNS_RR_CLASS_IN, dp, !prime)) {
1569 (void)ssl_printf(ssl, "error out of memory\n");
1570 forwards_delete_stub_hole(fwd, LDNS_RR_CLASS_IN, nm);
1571 if(insecure) anchors_delete_insecure(worker->env.anchors,
1572 LDNS_RR_CLASS_IN, nm);
1573 delegpt_free_mlc(dp);
1574 free(nm);
1575 return;
1576 }
1577 free(nm);
1578 send_ok(ssl);
1579 }
1580
1581 /** do the stub_remove command */
1582 static void
1583 do_stub_remove(SSL* ssl, struct worker* worker, char* args)
1584 {
1585 struct iter_forwards* fwd = worker->env.fwds;
1586 int insecure = 0;
1587 uint8_t* nm = NULL;
1588 if(!parse_fs_args(ssl, args, &nm, NULL, &insecure, NULL))
1589 return;
1590 if(insecure)
1591 anchors_delete_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
1592 nm);
1593 forwards_delete_stub_hole(fwd, LDNS_RR_CLASS_IN, nm);
1594 hints_delete_stub(worker->env.hints, LDNS_RR_CLASS_IN, nm);
1595 free(nm);
14051596 send_ok(ssl);
14061597 }
14071598
15691760 return;
15701761 }
15711762 if(!ssl_printf(a->ssl, "%s %s ttl %d ping %d var %d rtt %d rto %d "
1763 "tA %d tAAAA %d tother %d "
15721764 "ednsknown %d edns %d delay %d lame dnssec %d rec %d A %d "
15731765 "other %d\n", ip_str, name, (int)(d->ttl - a->now),
15741766 d->rtt.srtt, d->rtt.rttvar, rtt_notimeout(&d->rtt), d->rtt.rto,
1767 d->timeout_A, d->timeout_AAAA, d->timeout_other,
15751768 (int)d->edns_lame_known, (int)d->edns_version,
15761769 (int)(a->now<d->probedelay?d->probedelay-a->now:0),
15771770 (int)d->isdnsseclame, (int)d->rec_lame, (int)d->lame_type_A,
16511844 static void
16521845 do_list_stubs(SSL* ssl, struct worker* worker)
16531846 {
1654 /* readonly structure */
1655 int m;
16561847 struct iter_hints_stub* z;
1657 struct iter_env* ie;
1658 m = modstack_find(&worker->env.mesh->mods, "iterator");
1659 if(m == -1) {
1660 (void)ssl_printf(ssl, "error no iterator module\n");
1661 return;
1662 }
1663 ie = (struct iter_env*)worker->env.modinfo[m];
1664 RBTREE_FOR(z, struct iter_hints_stub*, &ie->hints->tree) {
1848 RBTREE_FOR(z, struct iter_hints_stub*, &worker->env.hints->tree) {
16651849 if(!ssl_print_name_dp(ssl,
16661850 z->noprime?"stub noprime":"stub prime", z->node.name,
16671851 z->node.dclass, z->dp))
17781962 return;
17791963 } else if(cmdcmp(p, "list_local_data", 15)) {
17801964 do_list_local_data(ssl, worker);
1965 return;
1966 } else if(cmdcmp(p, "stub_add", 8)) {
1967 /* must always distribute this cmd */
1968 if(rc) distribute_cmd(rc, ssl, cmd);
1969 do_stub_add(ssl, worker, skipwhite(p+8));
1970 return;
1971 } else if(cmdcmp(p, "stub_remove", 11)) {
1972 /* must always distribute this cmd */
1973 if(rc) distribute_cmd(rc, ssl, cmd);
1974 do_stub_remove(ssl, worker, skipwhite(p+11));
1975 return;
1976 } else if(cmdcmp(p, "forward_add", 11)) {
1977 /* must always distribute this cmd */
1978 if(rc) distribute_cmd(rc, ssl, cmd);
1979 do_forward_add(ssl, worker, skipwhite(p+11));
1980 return;
1981 } else if(cmdcmp(p, "forward_remove", 14)) {
1982 /* must always distribute this cmd */
1983 if(rc) distribute_cmd(rc, ssl, cmd);
1984 do_forward_remove(ssl, worker, skipwhite(p+14));
17811985 return;
17821986 } else if(cmdcmp(p, "forward", 7)) {
17831987 /* must always distribute this cmd */
135135 struct listen_port* ports, struct worker* worker);
136136
137137 /**
138 * Stop accept handlers for TCP (until enabled again)
139 * @param rc: state
140 */
141 void daemon_remote_stop_accept(struct daemon_remote* rc);
142
143 /**
144 * Stop accept handlers for TCP (until enabled again)
145 * @param rc: state
146 */
147 void daemon_remote_start_accept(struct daemon_remote* rc);
148
149 /**
138150 * Handle nonthreaded remote cmd execution.
139151 * @param worker: this worker (the remote worker).
140152 */
501501 (void)daemon;
502502 #endif
503503
504 /* Set user context */
505 #ifdef HAVE_GETPWNAM
506 if(cfg->username && cfg->username[0]) {
507 #ifdef HAVE_SETUSERCONTEXT
508 /* setusercontext does initgroups, setuid, setgid, and
509 * also resource limits from login config, but we
510 * still call setresuid, setresgid to be sure to set all uid*/
511 if(setusercontext(NULL, pwd, uid,
512 LOGIN_SETALL & ~LOGIN_SETUSER & ~LOGIN_SETGROUP) != 0)
513 log_warn("unable to setusercontext %s: %s",
514 cfg->username, strerror(errno));
515 #endif /* HAVE_SETUSERCONTEXT */
516 }
517 #endif /* HAVE_GETPWNAM */
518
504519 /* box into the chroot */
505520 #ifdef HAVE_CHROOT
506521 if(cfg->chrootdir && cfg->chrootdir[0]) {
553568 /* drop permissions after chroot, getpwnam, pidfile, syslog done*/
554569 #ifdef HAVE_GETPWNAM
555570 if(cfg->username && cfg->username[0]) {
556 #ifdef HAVE_SETUSERCONTEXT
557 /* setusercontext does initgroups, setuid, setgid, and
558 * also resource limits from login config, but we
559 * still call setresuid, setresgid to be sure to set all uid*/
560 if(setusercontext(NULL, pwd, uid, LOGIN_SETALL) != 0)
561 log_warn("unable to setusercontext %s: %s",
562 cfg->username, strerror(errno));
563 #else /* !HAVE_SETUSERCONTEXT */
564571 # ifdef HAVE_INITGROUPS
565572 if(initgroups(cfg->username, gid) != 0)
566573 log_warn("unable to initgroups %s: %s",
567574 cfg->username, strerror(errno));
568575 # endif /* HAVE_INITGROUPS */
569 #endif /* HAVE_SETUSERCONTEXT */
570576 endpwent();
571577
572578 #ifdef HAVE_SETRESGID
6666 #include "util/fptr_wlist.h"
6767 #include "util/tube.h"
6868 #include "iterator/iter_fwd.h"
69 #include "iterator/iter_hints.h"
6970 #include "validator/autotrust.h"
71 #include "validator/val_anchor.h"
7072
7173 #ifdef HAVE_SYS_TYPES_H
7274 # include <sys/types.h>
147149 #ifdef UNBOUND_ALLOC_STATS
148150 /* debug func in validator module */
149151 size_t total, front, back, mesh, msg, rrset, infra, ac, superac;
150 size_t me, iter, val;
152 size_t me, iter, val, anch;
151153 int i;
152154 if(verbosity < VERB_ALGO)
153155 return;
159161 mesh = mesh_get_mem(worker->env.mesh);
160162 ac = alloc_get_mem(&worker->alloc);
161163 superac = alloc_get_mem(&worker->daemon->superalloc);
164 anch = anchors_get_mem(worker->env.anchors);
162165 iter = 0;
163166 val = 0;
164167 for(i=0; i<worker->env.mesh->mods.num; i++) {
176179 + regional_get_mem(worker->scratchpad)
177180 + sizeof(*worker->env.scratch_buffer)
178181 + ldns_buffer_capacity(worker->env.scratch_buffer)
179 + forwards_get_mem(worker->env.fwds);
182 + forwards_get_mem(worker->env.fwds)
183 + hints_get_mem(worker->env.hints);
180184 if(worker->thread_num == 0)
181185 me += acl_list_get_mem(worker->daemon->acl);
182186 if(cur_serv) {
184188 }
185189 total = front+back+mesh+msg+rrset+infra+iter+val+ac+superac+me;
186190 log_info("Memory conditions: %u front=%u back=%u mesh=%u msg=%u "
187 "rrset=%u infra=%u iter=%u val=%u "
191 "rrset=%u infra=%u iter=%u val=%u anchors=%u "
188192 "alloccache=%u globalalloccache=%u me=%u",
189193 (unsigned)total, (unsigned)front, (unsigned)back,
190194 (unsigned)mesh, (unsigned)msg, (unsigned)rrset,
191 (unsigned)infra, (unsigned)iter, (unsigned)val, (unsigned)ac,
192 (unsigned)superac, (unsigned)me);
195 (unsigned)infra, (unsigned)iter, (unsigned)val, (unsigned)anch,
196 (unsigned)ac, (unsigned)superac, (unsigned)me);
193197 debug_total_mem(total);
194198 #else /* no UNBOUND_ALLOC_STATS */
195199 size_t val = 0;
10521056 worker_delete(worker);
10531057 return 0;
10541058 }
1059 comm_base_set_slow_accept_handlers(worker->base, &worker_stop_accept,
1060 &worker_start_accept, worker);
10551061 if(do_sigs) {
10561062 #ifdef SIGHUP
10571063 ub_thread_sig_unblock(SIGHUP);
11571163 worker_delete(worker);
11581164 return 0;
11591165 }
1166 if(!(worker->env.hints = hints_create()) ||
1167 !hints_apply_cfg(worker->env.hints, cfg)) {
1168 log_err("Could not set root or stub hints");
1169 worker_delete(worker);
1170 return 0;
1171 }
11601172 /* one probe timer per process -- if we have 5011 anchors */
11611173 if(autr_get_num_anchors(worker->env.anchors) > 0
11621174 #ifndef THREADS_DISABLED
12091221 mesh_delete(worker->env.mesh);
12101222 ldns_buffer_free(worker->env.scratch_buffer);
12111223 forwards_delete(worker->env.fwds);
1224 hints_delete(worker->env.hints);
12121225 listen_delete(worker->front);
12131226 outside_network_delete(worker->back);
12141227 comm_signal_delete(worker->comsig);
12781291 worker->back->unwanted_replies = 0;
12791292 }
12801293
1294 void worker_start_accept(void* arg)
1295 {
1296 struct worker* worker = (struct worker*)arg;
1297 listen_start_accept(worker->front);
1298 if(worker->thread_num == 0)
1299 daemon_remote_start_accept(worker->daemon->rc);
1300 }
1301
1302 void worker_stop_accept(void* arg)
1303 {
1304 struct worker* worker = (struct worker*)arg;
1305 listen_stop_accept(worker->front);
1306 if(worker->thread_num == 0)
1307 daemon_remote_stop_accept(worker->daemon->rc);
1308 }
1309
12811310 /* --- fake callbacks for fptr_wlist to work --- */
12821311 struct outbound_entry* libworker_send_query(uint8_t* ATTR_UNUSED(qname),
12831312 size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype),
224224 /** probe timer callback handler */
225225 void worker_probe_timer_cb(void* arg);
226226
227 /** start accept callback handler */
228 void worker_start_accept(void* arg);
229
230 /** stop accept callback handler */
231 void worker_stop_accept(void* arg);
232
227233 #endif /* DAEMON_WORKER_H */
1717 Brett Carr - windows beta testing.
1818 Luca Bruno - patch for windows support in libunbound hosts and resolvconf().
1919 Tom Hendrikx - contributed split-itar.sh a useful script to 5011-track ITAR.
20 Daisuke HIGASHI - patch for rrset-roundrobin and minimal-responses.
0 24 May 2012: Wouter
1 - tag for 1.4.17 release.
2
3 18 May 2012: Wouter
4 - Review comments, removed duplicate memset to zero in delegpt.
5
6 16 May 2012: Wouter
7 - Updated doc/FEATURES with RFCs that are implemented but not listed.
8 - Protect if statements in val_anchor for compile without locks.
9 - tag for 1.4.17rc1.
10
11 15 May 2012: Wouter
12 - fix configure ECDSA support in ldns detection for windows compile.
13 - fix possible uninitialised variable in windows pipe implementation.
14
15 9 May 2012: Wouter
16 - Fix alignment problem in util/random on sparc64/freebsd.
17
18 8 May 2012: Wouter
19 - Fix for accept spinning reported by OpenBSD.
20 - iana portlist updated.
21
22 2 May 2012: Wouter
23 - Fix validation of nodata for DS query in NSEC zones, reported by
24 Ondrej Mikle.
25
26 13 April 2012: Wouter
27 - ECDSA support (RFC 6605) by default. Use --disable-ecdsa for older
28 openssl.
29
30 10 April 2012: Wouter
31 - Applied patch from Daisuke HIGASHI for rrset-roundrobin and
32 minimal-responses features.
33 - iana portlist updated.
34
35 5 April 2012: Wouter
36 - fix bug #443: --with-chroot-dir not honoured by configure.
37 - fix bug #444: setusercontext was called too late (thanks Bjorn
38 Ketelaars).
39
40 27 March 2012: Wouter
41 - fix bug #442: Fix that Makefile depends on pythonmod headers
42 even using --without-pythonmodule.
43
44 22 March 2012: Wouter
45 - contrib/validation-reporter follows rotated log file (patch from
46 Augie Schwer).
47
48 21 March 2012: Wouter
49 - new approach to NS fetches for DS lookup that works with
50 cornercases, and is more robust and considers forwarders.
51
52 19 March 2012: Wouter
53 - iana portlist updated.
54 - fix to locate nameservers for DS lookup with NS fetches.
55
56 16 March 2012: Wouter
57 - Patch for access to full DNS packet data in unbound python module
58 from Ondrej Mikle.
59
60 9 March 2012: Wouter
61 - Applied line-buffer patch from Augie Schwer to validation.reporter.sh.
62
63 2 March 2012: Wouter
64 - flush_infra cleans timeouted servers from the cache too.
65 - removed warning from --enable-ecdsa.
66
67 1 March 2012: Wouter
68 - forward-first option. Tries without forward if a query fails.
69 Also stub-first option that is similar.
70
71 28 February 2012: Wouter
72 - Fix from code review, if EINPROGRESS not defined chain if statement
73 differently.
74
75 27 February 2012: Wouter
76 - Fix bug#434: on windows check registry for config file location
77 for unbound-control.exe, and unbound-checkconf.exe.
78
79 23 February 2012: Wouter
80 - Fix to squelch 'network unreachable' errors from tcp connect in
81 logs, high verbosity will show them.
82
83 16 February 2012: Wouter
84 - iter_hints is now thread-owned in module env, and thus threadsafe.
85 - Fix prefetch and sticky NS, now the prefetch works. It picks
86 nameservers that 'would be valid in the future', and if this makes
87 the NS timeout, it updates that NS by asking delegation from the
88 parent again. If child NS has longer TTL, that TTL does not get
89 refreshed from the lookup to the child nameserver.
90
91 15 February 2012: Wouter
92 - Fix forward-zone memory, uses malloc and frees original root dp.
93 - iter hints (stubs) uses malloc inside for more dynamicity.
94 - unbound-control forward_add, forward_remove, stub_add, stub_remove
95 can modify stubs and forwards for running unbound (on mobile computer)
96 they can also add and remove domain-insecure for the zone.
97
98 14 February 2012: Wouter
99 - Fix sticky NS (ghost domain problem) if prefetch is yes.
100 - iter forwards uses malloc inside for more dynamicity.
101
102 13 February 2012: Wouter
103 - RT#2955. Fix for cygwin compilation.
104 - iana portlist updated.
105
106 10 February 2012: Wouter
107 - Slightly smaller critical region in one case in infra cache.
108 - Fix timeouts to keep track of query type, A, AAAA and other, if
109 another has caused timeout blacklist, different type can still probe.
110 - unit test fix for nomem_cnametopos.rpl race condition.
111
112 9 February 2012: Wouter
113 - Fix AHX_BROKEN_MEMCMP for autoheader mess up of #undef in config.h.
114
115 8 February 2012: Wouter
116 - implement draft-ietf-dnsext-ecdsa-04; which is in IETF LC; This
117 implementation is experimental at this time and not recommended
118 for use on the public internet (the protocol numbers have not
119 been assigned). Needs recent ldns with --enable-ecdsa.
120 - fix memory leak in errorcase for DSA signatures.
121 - iana portlist updated.
122 - workaround for openssl 0.9.8 ecdsa sha2 and evp problem.
123
124 3 February 2012: Wouter
125 - fix for windows, rename() is not posix compliant on windows.
126
0127 2 February 2012: Wouter
1128 - 1.4.16 release tag.
129 - svn trunk is 1.4.17 in development.
130 - iana portlist updated.
2131
3132 1 February 2012: Wouter
4133 - Fix validation failures (like: validation failure xx: no NSEC3
1111 Recursive service.
1212 Caching service.
1313 Forwarding and stub zones.
14 No authoritative service.
14 Very limited authoritative service.
1515 DNSSEC Validation options.
16 EDNS0, NSEC3, Unknown-RR-types.
17
16 EDNS0, NSEC3, IPv6, DNAME, Unknown-RR-types.
17 RSASHA256, GOST, ECDSA, SHA384 DNSSEC algorithms.
1818
1919 Details
2020 -------
2121 Processing support
2222 RFC 1034-1035: as a recursive, caching server. Not authoritative.
2323 including CNAMEs, referrals, wildcards, classes, ...
24 AAAA type, and IP6 dual stack support.
25 type ANY queries are supported, class ANY queries are supported.
2426 RFC 4033-4035: as a validating caching server (unbound daemon).
2527 as a validating stub (libunbound).
2628 RFC 1918.
29 RFC 1995, 1996, 2136: not authoritative, so no AXFR, IXFR, NOTIFY or
30 dynamic update services are appropriate.
2731 RFC 2181: completely, including the trust model, keeping rrsets together.
32 RFC 2308: TTL directive, and the rest of the RFC too.
33 RFC 2671: EDNS0 support, default advertisement 4Kb size.
2834 RFC 2672: DNAME support.
2935 RFC 3597: Unknown RR type support.
30 RFC 2671: EDNS0 support, default advertisement 4Kb size.
36 RFC 4343: case insensitive handling of domain names.
37 RFC 4509: SHA256 DS hash.
38 RFC 4592: wildcards.
39 RFC 4697: No DNS Resolution Misbehavior.
40 RFC 5011: update of trust anchors with timers.
3141 RFC 5155: NSEC3, NSEC3PARAM types
32 AAAA type. and IP6 dual stack support.
33 type ANY queries are supported.
34 RFC 2308: TTL directive, and the rest of the RFC too.
35 RFC 4592: wildcards.
36
37 RFC 1995, 1996, 2136: not authoritative, so no AXFR, IXFR, NOTIFY or
38 dynamic update services are appropriate.
42 RFC 5358: reflectors-are-evil: access control list for recursive
43 service. In fact for all DNS service so cache snooping is halted.
44 RFC 5452: forgery resilience. all recommendations followed.
45 RFC 5702: RSASHA256 signature algorithm.
46 RFC 5933: GOST signature algorithm.
47 RFC 6303: default local zones.
48 It is possible to block zones or return an address for localhost.
49 This is a very limited authoritative service. Defaults as in draft.
50 RFC 6604: xNAME RCODE and status bits.
51 RFC 6605: ECDSA signature algorithm, SHA384 DS hash.
3952
4053 chroot and drop-root-privileges support, default enabled in config file.
4154
4356 CD bit in query can be used to request bogus data.
4457 UDP and TCP service is provided downstream.
4558 UDP and TCP are used to request from upstream servers.
59 SSL wrapped TCP service can be used upstream and provided downstream.
4660 Multiple queries can be made over a TCP stream.
4761
4862 No TSIG support at this time.
4963 No SIG0 support at this time.
5064 No dTLS support at this time.
5165 This is not a DNS statistics package, but some operationally useful
52 values are provided.
53 TXT RRs from the Chaos class (id.server, hostname.bind, ...) supported.
66 values are provided via unbound-control stats.
67 TXT RRs from the Chaos class (id.server, hostname.bind, ...) are supported.
5468
55 draft-forgery-resilience: all recommendations followed.
56 draft-0x20: experimental implementation (incomplete).
57 implements bitwise echo of the query to support downstream 0x20.
58 draft-ietf-dnsop-default-local-zones is fully supported (-04).
59 It is possible to block zones or return an address for localhost.
60 This is a very limited authoritative service. Defaults as in draft.
69 draft-0x20: implemented, use caps-for-id option to enable use.
70 Also implements bitwise echo of the query to support downstream 0x20.
6171 draft-ietf-dnsop-resolver-priming(-00): can prime and can fallback to
6272 a safety belt list.
6373 draft-ietf-dnsop-dnssec-trust-anchor(-01): DS records can be configured
6474 as trust anchors. Also DNSKEYs are allowed, by the way.
65 draft-ietf-dnsop-reflectors-are-evil: access control list for recursive
66 service. In fact for all DNS service so cache snooping is halted.
75 draft-ietf-dnsext-dnssec-bis-updates: supported.
6776
6877 Record type syntax support, extensive, from lib ldns.
6978 For these types only syntax and parsing support is needed.
0 README for Unbound 1.4.16
0 README for Unbound 1.4.17
11 Copyright 2007 NLnet Labs
22 http://unbound.net
33
1515 (optional) can use builtin alternative instead.
1616
1717 * Make and install: ./configure; make; make install
18 * Use GNU make; default on linux, often called 'gmake' on BSD and Solaris.
1918 * --with-ldns=/path/to/ldns
2019 It will dynamically link against it.
2120 * --with-libevent=/path/to/libevent
00 #
11 # Example configuration file.
22 #
3 # See unbound.conf(5) man page, version 1.4.16.
3 # See unbound.conf(5) man page, version 1.4.17.
44 #
55 # this is a comment.
66
307307
308308 # if yes, perform key lookups adjacent to normal lookups.
309309 # prefetch-key: no
310
311 # if yes, Unbound rotates RRSet order in response.
312 # rrset-roundrobin: no
313
314 # if yes, Unbound doesn't insert authority/additional sections
315 # into response messages when those sections are not required.
316 # minimal-responses: no
310317
311318 # module configuration of the server. A string with identifiers
312319 # separated by spaces. "iterator" or "validator iterator"
502509 # 'example.org' go to the given list of nameservers. list zero or more
503510 # nameservers by hostname or by ipaddress. If you set stub-prime to yes,
504511 # the list is treated as priming hints (default is no).
512 # With stub-first yes, it attempts without the stub if it fails.
505513 # stub-zone:
506514 # name: "example.com"
507515 # stub-addr: 192.0.2.68
508516 # stub-prime: no
517 # stub-first: no
509518 # stub-zone:
510519 # name: "example.org"
511520 # stub-host: ns.example.com.
515524 # 'example.org' go to the given list of servers. These servers have to handle
516525 # recursion to other nameservers. List zero or more nameservers by hostname
517526 # or by ipaddress. Use an entry with name "." to forward all queries.
527 # If you enable forward-first, it attempts without the forward if it fails.
518528 # forward-zone:
519529 # name: "example.com"
520530 # forward-addr: 192.0.2.68
521531 # forward-addr: 192.0.2.73@5355 # forward to port 5355.
532 # forward-first: no
522533 # forward-zone:
523534 # name: "example.org"
524535 # forward-host: fwd.example.com
0 .TH "libunbound" "3" "Feb 2, 2012" "NLnet Labs" "unbound 1.4.16"
0 .TH "libunbound" "3" "May 24, 2012" "NLnet Labs" "unbound 1.4.17"
11 .\"
22 .\" libunbound.3 -- unbound library functions manual
33 .\"
4141 .B ub_ctx_zone_remove,
4242 .B ub_ctx_data_add,
4343 .B ub_ctx_data_remove
44 \- Unbound DNS validating resolver 1.4.16 functions.
44 \- Unbound DNS validating resolver 1.4.17 functions.
4545 .SH "SYNOPSIS"
4646 .LP
4747 .B #include <unbound.h>
0 .TH "unbound-anchor" "8" "Feb 2, 2012" "NLnet Labs" "unbound 1.4.16"
0 .TH "unbound-anchor" "8" "May 24, 2012" "NLnet Labs" "unbound 1.4.17"
11 .\"
22 .\" unbound-anchor.8 -- unbound anchor maintenance utility manual
33 .\"
0 .TH "unbound-checkconf" "8" "Feb 2, 2012" "NLnet Labs" "unbound 1.4.16"
0 .TH "unbound-checkconf" "8" "May 24, 2012" "NLnet Labs" "unbound 1.4.17"
11 .\"
22 .\" unbound-checkconf.8 -- unbound configuration checker manual
33 .\"
0 .TH "unbound-control" "8" "Feb 2, 2012" "NLnet Labs" "unbound 1.4.16"
0 .TH "unbound-control" "8" "May 24, 2012" "NLnet Labs" "unbound 1.4.17"
11 .\"
22 .\" unbound-control.8 -- unbound remote control manual
33 .\"
188188 .TP
189189 .B list_local_data
190190 List the local data RRs in use. The resource records are printed.
191 .TP
192 .B forward_add \fR[\fI+i\fR] \fIzone addr ...
193 Add a new forward zone to running unbound. With +i option also adds a
194 \fIdomain\-insecure\fR for the zone (so it can resolve insecurely if you have
195 a DNSSEC root trust anchor configured for other names).
196 The addr can be IP4, IP6 or nameserver names, like \fIforward-zone\fR config
197 in unbound.conf.
198 .TP
199 .B forward_remove \fR[\fI+i\fR] \fIzone
200 Remove a forward zone from running unbound. The +i also removes a
201 \fIdomain\-insecure\fR for the zone.
202 .TP
203 .B stub_add \fR[\fI+ip\fR] \fIzone addr ...
204 Add a new stub zone to running unbound. With +i option also adds a
205 \fIdomain\-insecure\fR for the zone. With +p the stub zone is set to prime,
206 without it it is set to notprime. The addr can be IP4, IP6 or nameserver
207 names, like the \fIstub-zone\fR config in unbound.conf.
208 .TP
209 .B stub_remove \fR[\fI+i\fR] \fIzone
210 Remove a stub zone from running unbound. The +i also removes a
211 \fIdomain\-insecure\fR for the zone.
191212 .TP
192213 .B forward \fR[\fIoff\fR | \fIaddr ...\fR ]
193214 Setup forwarding mode. Configures if the server should ask other upstream
0 .TH "unbound\-host" "1" "Feb 2, 2012" "NLnet Labs" "unbound 1.4.16"
0 .TH "unbound\-host" "1" "May 24, 2012" "NLnet Labs" "unbound 1.4.17"
11 .\"
22 .\" unbound-host.1 -- unbound DNS lookup utility
33 .\"
0 .TH "unbound" "8" "Feb 2, 2012" "NLnet Labs" "unbound 1.4.16"
0 .TH "unbound" "8" "May 24, 2012" "NLnet Labs" "unbound 1.4.17"
11 .\"
22 .\" unbound.8 -- unbound manual
33 .\"
99 .SH "NAME"
1010 .LP
1111 .B unbound
12 \- Unbound DNS validating resolver 1.4.16.
12 \- Unbound DNS validating resolver 1.4.17.
1313 .SH "SYNOPSIS"
1414 .LP
1515 .B unbound
0 .TH "unbound.conf" "5" "Feb 2, 2012" "NLnet Labs" "unbound 1.4.16"
0 .TH "unbound.conf" "5" "May 24, 2012" "NLnet Labs" "unbound 1.4.17"
11 .\"
22 .\" unbound.conf.5 -- unbound.conf manual
33 .\"
568568 If yes, fetch the DNSKEYs earlier in the validation process, when a DS
569569 record is encountered. This lowers the latency of requests. It does use
570570 a little more CPU. Also if the cache is set to 0, it is no use. Default is no.
571 .TP
572 .B rrset-roundrobin: \fI<yes or no>
573 If yes, Unbound rotates RRSet order in response (the random number is taken
574 from the query ID, for speed and thread safety). Default is no.
575 .TP
576 .B minimal-responses: \fI<yes or no>
577 If yes, Unbound doesn't insert authority/additional sections into response
578 messages when those sections are not required. This reduces response
579 size significantly, and may avoid TCP fallback for some responses.
580 This may cause a slight speedup. The default is no, because the DNS
581 protocol RFCs mandate these sections, and the additional content could
582 be of use and save roundtrips for clients.
571583 .TP
572584 .B module\-config: \fI<"module names">
573585 Module configuration, a list of module names separated by spaces, surround
978990 which is similar to root hints, where it starts using the list of nameservers
979991 currently published by the zone. Thus, if the hint list is slightly outdated,
980992 the resolver picks up a correct list online.
993 .TP
994 .B stub\-first: \fI<yes or no>
995 If enabled, a query is attempted without the stub clause if it fails.
996 The default is no.
981997 .SS "Forward Zone Options"
982998 .LP
983999 There may be multiple
10021018 .B forward\-addr: \fI<IP address>
10031019 IP address of server to forward to. Can be IP 4 or IP 6.
10041020 To use a nondefault port for DNS communication append '@' with the port number.
1021 .TP
1022 .B forward\-first: \fI<yes or no>
1023 If enabled, a query is attempted without the forward clause if it fails.
1024 The default is no.
10051025 .SS "Python Module Options"
10061026 .LP
10071027 The
8989 int
9090 delegpt_set_name(struct delegpt* dp, struct regional* region, uint8_t* name)
9191 {
92 log_assert(!dp->dp_type_mlc);
9293 dp->namelabs = dname_count_size_labels(name, &dp->namelen);
9394 dp->name = regional_alloc_init(region, name, dp->namelen);
9495 return dp->name != 0;
101102 struct delegpt_ns* ns;
102103 size_t len;
103104 (void)dname_count_size_labels(name, &len);
105 log_assert(!dp->dp_type_mlc);
104106 /* slow check for duplicates to avoid counting failures when
105107 * adding the same server as a dependency twice */
106108 if(delegpt_find_ns(dp, name, len))
119121 ns->lame = (uint8_t)lame;
120122 ns->done_pside4 = 0;
121123 ns->done_pside6 = 0;
122 return 1;
124 return ns->name != 0;
123125 }
124126
125127 struct delegpt_ns*
156158 socklen_t addrlen, int bogus, int lame)
157159 {
158160 struct delegpt_ns* ns = delegpt_find_ns(dp, name, namelen);
161 log_assert(!dp->dp_type_mlc);
159162 if(!ns) {
160163 /* ignore it */
161164 return 1;
176179 int lame)
177180 {
178181 struct delegpt_addr* a;
182 log_assert(!dp->dp_type_mlc);
179183 /* check for duplicates */
180184 if((a = delegpt_find_addr(dp, addr, addrlen))) {
181185 if(bogus)
376380 struct packed_rrset_data* nsdata = (struct packed_rrset_data*)
377381 ns_rrset->entry.data;
378382 size_t i;
383 log_assert(!dp->dp_type_mlc);
379384 if(nsdata->security == sec_status_bogus)
380385 dp->bogus = 1;
381386 for(i=0; i<nsdata->count; i++) {
398403 size_t i;
399404 struct sockaddr_in sa;
400405 socklen_t len = (socklen_t)sizeof(sa);
406 log_assert(!dp->dp_type_mlc);
401407 memset(&sa, 0, len);
402408 sa.sin_family = AF_INET;
403409 sa.sin_port = (in_port_t)htons(UNBOUND_DNS_PORT);
421427 size_t i;
422428 struct sockaddr_in6 sa;
423429 socklen_t len = (socklen_t)sizeof(sa);
430 log_assert(!dp->dp_type_mlc);
424431 memset(&sa, 0, len);
425432 sa.sin6_family = AF_INET6;
426433 sa.sin6_port = (in_port_t)htons(UNBOUND_DNS_PORT);
491498 ns->resolved = 1;
492499 }
493500 }
501
502 struct delegpt* delegpt_create_mlc(uint8_t* name)
503 {
504 struct delegpt* dp=(struct delegpt*)calloc(1, sizeof(*dp));
505 if(!dp)
506 return NULL;
507 dp->dp_type_mlc = 1;
508 if(name) {
509 dp->namelabs = dname_count_size_labels(name, &dp->namelen);
510 dp->name = memdup(name, dp->namelen);
511 if(!dp->name) {
512 free(dp);
513 return NULL;
514 }
515 }
516 return dp;
517 }
518
519 void delegpt_free_mlc(struct delegpt* dp)
520 {
521 struct delegpt_ns* n, *nn;
522 struct delegpt_addr* a, *na;
523 if(!dp) return;
524 log_assert(dp->dp_type_mlc);
525 n = dp->nslist;
526 while(n) {
527 nn = n->next;
528 free(n->name);
529 free(n);
530 n = nn;
531 }
532 a = dp->target_list;
533 while(a) {
534 na = a->next_target;
535 free(a);
536 a = na;
537 }
538 free(dp->name);
539 free(dp);
540 }
541
542 int delegpt_set_name_mlc(struct delegpt* dp, uint8_t* name)
543 {
544 log_assert(dp->dp_type_mlc);
545 dp->namelabs = dname_count_size_labels(name, &dp->namelen);
546 dp->name = memdup(name, dp->namelen);
547 return (dp->name != NULL);
548 }
549
550 int delegpt_add_ns_mlc(struct delegpt* dp, uint8_t* name, int lame)
551 {
552 struct delegpt_ns* ns;
553 size_t len;
554 (void)dname_count_size_labels(name, &len);
555 log_assert(dp->dp_type_mlc);
556 /* slow check for duplicates to avoid counting failures when
557 * adding the same server as a dependency twice */
558 if(delegpt_find_ns(dp, name, len))
559 return 1;
560 ns = (struct delegpt_ns*)malloc(sizeof(struct delegpt_ns));
561 if(!ns)
562 return 0;
563 ns->namelen = len;
564 ns->name = memdup(name, ns->namelen);
565 if(!ns->name) {
566 free(ns);
567 return 0;
568 }
569 ns->next = dp->nslist;
570 dp->nslist = ns;
571 ns->resolved = 0;
572 ns->got4 = 0;
573 ns->got6 = 0;
574 ns->lame = (uint8_t)lame;
575 ns->done_pside4 = 0;
576 ns->done_pside6 = 0;
577 return 1;
578 }
579
580 int delegpt_add_addr_mlc(struct delegpt* dp, struct sockaddr_storage* addr,
581 socklen_t addrlen, int bogus, int lame)
582 {
583 struct delegpt_addr* a;
584 log_assert(dp->dp_type_mlc);
585 /* check for duplicates */
586 if((a = delegpt_find_addr(dp, addr, addrlen))) {
587 if(bogus)
588 a->bogus = bogus;
589 if(!lame)
590 a->lame = 0;
591 return 1;
592 }
593
594 a = (struct delegpt_addr*)malloc(sizeof(struct delegpt_addr));
595 if(!a)
596 return 0;
597 a->next_target = dp->target_list;
598 dp->target_list = a;
599 a->next_result = 0;
600 a->next_usable = dp->usable_list;
601 dp->usable_list = a;
602 memcpy(&a->addr, addr, addrlen);
603 a->addrlen = addrlen;
604 a->attempts = 0;
605 a->bogus = bogus;
606 a->lame = lame;
607 return 1;
608 }
609
610 int delegpt_add_target_mlc(struct delegpt* dp, uint8_t* name, size_t namelen,
611 struct sockaddr_storage* addr, socklen_t addrlen, int bogus, int lame)
612 {
613 struct delegpt_ns* ns = delegpt_find_ns(dp, name, namelen);
614 log_assert(dp->dp_type_mlc);
615 if(!ns) {
616 /* ignore it */
617 return 1;
618 }
619 if(!lame) {
620 if(addr_is_ip6(addr, addrlen))
621 ns->got6 = 1;
622 else ns->got4 = 1;
623 if(ns->got4 && ns->got6)
624 ns->resolved = 1;
625 }
626 return delegpt_add_addr_mlc(dp, addr, addrlen, bogus, lame);
627 }
628
629 size_t delegpt_get_mem(struct delegpt* dp)
630 {
631 struct delegpt_ns* ns;
632 size_t s;
633 if(!dp) return 0;
634 s = sizeof(*dp) + dp->namelen +
635 delegpt_count_targets(dp)*sizeof(struct delegpt_addr);
636 for(ns=dp->nslist; ns; ns=ns->next)
637 s += sizeof(*ns)+ns->namelen;
638 return s;
639 }
7878 * Also true if the delegationpoint was created from a delegation
7979 * message and thus contains the parent-side-info already. */
8080 uint8_t has_parent_side_NS;
81 /** for assertions on type of delegpt */
82 uint8_t dp_type_mlc;
8183 };
8284
8385 /**
345347 */
346348 void delegpt_no_ipv4(struct delegpt* dp);
347349
350 /**
351 * create malloced delegation point, with the given name
352 * @param name: uncompressed wireformat of degegpt name.
353 * @return NULL on alloc failure
354 */
355 struct delegpt* delegpt_create_mlc(uint8_t* name);
356
357 /**
358 * free malloced delegation point.
359 * @param dp: must have been created with delegpt_create_mlc, free'd.
360 */
361 void delegpt_free_mlc(struct delegpt* dp);
362
363 /**
364 * Set name of delegation point.
365 * @param dp: delegation point. malloced.
366 * @param name: name to use.
367 * @return false on error.
368 */
369 int delegpt_set_name_mlc(struct delegpt* dp, uint8_t* name);
370
371 /**
372 * add a name to malloced delegation point.
373 * @param dp: must have been created with delegpt_create_mlc.
374 * @param name: the name to add.
375 * @param lame: the name is lame, disprefer.
376 * @return false on error.
377 */
378 int delegpt_add_ns_mlc(struct delegpt* dp, uint8_t* name, int lame);
379
380 /**
381 * add an address to a malloced delegation point.
382 * @param dp: must have been created with delegpt_create_mlc.
383 * @param addr: the address.
384 * @param addrlen: the length of addr.
385 * @param bogus: if address is bogus.
386 * @param lame: if address is lame.
387 * @return false on error.
388 */
389 int delegpt_add_addr_mlc(struct delegpt* dp, struct sockaddr_storage* addr,
390 socklen_t addrlen, int bogus, int lame);
391
392 /**
393 * Add target address to the delegation point.
394 * @param dp: must have been created with delegpt_create_mlc.
395 * @param name: name for which target was found (must be in nslist).
396 * This name is marked resolved.
397 * @param namelen: length of name.
398 * @param addr: the address.
399 * @param addrlen: the length of addr.
400 * @param bogus: security status for the address, pass true if bogus.
401 * @param lame: address is lame.
402 * @return false on error.
403 */
404 int delegpt_add_target_mlc(struct delegpt* dp, uint8_t* name, size_t namelen,
405 struct sockaddr_storage* addr, socklen_t addrlen, int bogus, int lame);
406
407 /** get memory in use by dp */
408 size_t delegpt_get_mem(struct delegpt* dp);
409
348410 #endif /* ITERATOR_ITER_DELEGPT_H */
4444 #include <ldns/rr.h>
4545 #include "iterator/iter_fwd.h"
4646 #include "iterator/iter_delegpt.h"
47 #include "util/regional.h"
4847 #include "util/log.h"
4948 #include "util/config_file.h"
5049 #include "util/net_help.h"
7271 sizeof(struct iter_forwards));
7372 if(!fwd)
7473 return NULL;
75 fwd->region = regional_create();
76 if(!fwd->region) {
77 forwards_delete(fwd);
78 return NULL;
79 }
8074 return fwd;
75 }
76
77 static void fwd_zone_free(struct iter_forward_zone* n)
78 {
79 if(!n) return;
80 delegpt_free_mlc(n->dp);
81 free(n->name);
82 free(n);
83 }
84
85 static void delfwdnode(rbnode_t* n, void* ATTR_UNUSED(arg))
86 {
87 struct iter_forward_zone* node = (struct iter_forward_zone*)n;
88 fwd_zone_free(node);
89 }
90
91 static void fwd_del_tree(struct iter_forwards* fwd)
92 {
93 if(fwd->tree)
94 traverse_postorder(fwd->tree, &delfwdnode, NULL);
95 free(fwd->tree);
8196 }
8297
8398 void
85100 {
86101 if(!fwd)
87102 return;
88 regional_destroy(fwd->region);
89 free(fwd->tree);
103 fwd_del_tree(fwd);
90104 free(fwd);
91105 }
92106
95109 forwards_insert_data(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
96110 size_t nmlen, int nmlabs, struct delegpt* dp)
97111 {
98 struct iter_forward_zone* node = regional_alloc(fwd->region,
112 struct iter_forward_zone* node = (struct iter_forward_zone*)malloc(
99113 sizeof(struct iter_forward_zone));
100 if(!node)
101 return 0;
114 if(!node) {
115 delegpt_free_mlc(dp);
116 return 0;
117 }
102118 node->node.key = node;
103119 node->dclass = c;
104 node->name = regional_alloc_init(fwd->region, nm, nmlen);
105 if(!node->name)
106 return 0;
120 node->name = memdup(nm, nmlen);
121 if(!node->name) {
122 delegpt_free_mlc(dp);
123 free(node);
124 return 0;
125 }
107126 node->namelen = nmlen;
108127 node->namelabs = nmlabs;
109128 node->dp = dp;
110129 if(!rbtree_insert(fwd->tree, &node->node)) {
111130 log_err("duplicate forward zone ignored.");
131 delegpt_free_mlc(dp);
132 free(node->name);
133 free(node);
112134 }
113135 return 1;
114136 }
151173 }
152174
153175 /** set zone name */
154 static int
155 read_fwds_name(struct iter_forwards* fwd, struct config_stub* s,
156 struct delegpt* dp)
157 {
176 static struct delegpt*
177 read_fwds_name(struct config_stub* s)
178 {
179 struct delegpt* dp;
158180 ldns_rdf* rdf;
159181 if(!s->name) {
160182 log_err("forward zone without a name (use name \".\" to forward everything)");
161 return 0;
183 return NULL;
162184 }
163185 rdf = ldns_dname_new_frm_str(s->name);
164186 if(!rdf) {
165187 log_err("cannot parse forward zone name %s", s->name);
166 return 0;
167 }
168 if(!delegpt_set_name(dp, fwd->region, ldns_rdf_data(rdf))) {
188 return NULL;
189 }
190 if(!(dp=delegpt_create_mlc(ldns_rdf_data(rdf)))) {
169191 ldns_rdf_deep_free(rdf);
170192 log_err("out of memory");
171 return 0;
193 return NULL;
172194 }
173195 ldns_rdf_deep_free(rdf);
174 return 1;
196 return dp;
175197 }
176198
177199 /** set fwd host names */
178200 static int
179 read_fwds_host(struct iter_forwards* fwd, struct config_stub* s,
180 struct delegpt* dp)
201 read_fwds_host(struct config_stub* s, struct delegpt* dp)
181202 {
182203 struct config_strlist* p;
183204 ldns_rdf* rdf;
189210 s->name, p->str);
190211 return 0;
191212 }
192 if(!delegpt_add_ns(dp, fwd->region, ldns_rdf_data(rdf), 0)) {
213 if(!delegpt_add_ns_mlc(dp, ldns_rdf_data(rdf), 0)) {
193214 ldns_rdf_deep_free(rdf);
194215 log_err("out of memory");
195216 return 0;
201222
202223 /** set fwd server addresses */
203224 static int
204 read_fwds_addr(struct iter_forwards* fwd, struct config_stub* s,
205 struct delegpt* dp)
225 read_fwds_addr(struct config_stub* s, struct delegpt* dp)
206226 {
207227 struct config_strlist* p;
208228 struct sockaddr_storage addr;
214234 s->name, p->str);
215235 return 0;
216236 }
217 if(!delegpt_add_addr(dp, fwd->region, &addr, addrlen, 0, 0)) {
237 if(!delegpt_add_addr_mlc(dp, &addr, addrlen, 0, 0)) {
218238 log_err("out of memory");
219239 return 0;
220240 }
228248 {
229249 struct config_stub* s;
230250 for(s = cfg->forwards; s; s = s->next) {
231 struct delegpt* dp = delegpt_create(fwd->region);
232 if(!dp) {
233 log_err("out of memory");
234 return 0;
235 }
251 struct delegpt* dp;
252 if(!(dp=read_fwds_name(s)) ||
253 !read_fwds_host(s, dp) ||
254 !read_fwds_addr(s, dp))
255 return 0;
236256 /* set flag that parent side NS information is included.
237257 * Asking a (higher up) server on the internet is not useful */
238 dp->has_parent_side_NS = 1;
239 if(!read_fwds_name(fwd, s, dp) ||
240 !read_fwds_host(fwd, s, dp) ||
241 !read_fwds_addr(fwd, s, dp))
242 return 0;
258 /* the flag is turned off for 'forward-first' so that the
259 * last resort will ask for parent-side NS record and thus
260 * fallback to the internet name servers on a failure */
261 dp->has_parent_side_NS = (uint8_t)!s->isfirst;
243262 if(!forwards_insert(fwd, LDNS_RR_CLASS_IN, dp))
244263 return 0;
245264 verbose(VERB_QUERY, "Forward zone server list:");
267286 return 0; /* no forwards above, no holes needed */
268287 }
269288
289 /** insert a stub hole (if necessary) for stub name */
290 static int
291 fwd_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
292 {
293 struct iter_forward_zone key;
294 key.node.key = &key;
295 key.dclass = c;
296 key.name = nm;
297 key.namelabs = dname_count_size_labels(key.name, &key.namelen);
298 if(need_hole_insert(fwd->tree, &key)) {
299 return forwards_insert_data(fwd, key.dclass, key.name,
300 key.namelen, key.namelabs, NULL);
301 }
302 return 1;
303 }
304
270305 /** make NULL entries for stubs */
271306 static int
272307 make_stub_holes(struct iter_forwards* fwd, struct config_file* cfg)
273308 {
274309 struct config_stub* s;
275 struct iter_forward_zone key;
276 key.node.key = &key;
277 key.dclass = LDNS_RR_CLASS_IN;
278310 for(s = cfg->stubs; s; s = s->next) {
279311 ldns_rdf* rdf = ldns_dname_new_frm_str(s->name);
280312 if(!rdf) {
281313 log_err("cannot parse stub name '%s'", s->name);
282314 return 0;
283315 }
284 key.name = ldns_rdf_data(rdf);
285 key.namelabs = dname_count_size_labels(key.name, &key.namelen);
286 if(!need_hole_insert(fwd->tree, &key)) {
287 ldns_rdf_deep_free(rdf);
288 continue;
289 }
290 if(!forwards_insert_data(fwd, key.dclass, key.name,
291 key.namelen, key.namelabs, NULL)) {
316 if(!fwd_add_stub_hole(fwd, LDNS_RR_CLASS_IN,
317 ldns_rdf_data(rdf))) {
292318 ldns_rdf_deep_free(rdf);
293319 log_err("out of memory");
294320 return 0;
301327 int
302328 forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg)
303329 {
304 free(fwd->tree);
305 regional_free_all(fwd->region);
330 fwd_del_tree(fwd);
306331 fwd->tree = rbtree_create(fwd_cmp);
307332 if(!fwd->tree)
308333 return 0;
410435 size_t
411436 forwards_get_mem(struct iter_forwards* fwd)
412437 {
438 struct iter_forward_zone* p;
439 size_t s;
413440 if(!fwd)
414441 return 0;
415 return sizeof(*fwd) + sizeof(*fwd->tree) +
416 regional_get_mem(fwd->region);
417 }
418
419 int
420 forwards_add_zone(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp)
421 {
422 if(!forwards_insert(fwd, c, dp))
423 return 0;
424 fwd_init_parents(fwd);
425 return 1;
426 }
427
428 void
429 forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
442 s = sizeof(*fwd) + sizeof(*fwd->tree);
443 RBTREE_FOR(p, struct iter_forward_zone*, fwd->tree) {
444 s += sizeof(*p) + p->namelen + delegpt_get_mem(p->dp);
445 }
446 return s;
447 }
448
449 static struct iter_forward_zone*
450 fwd_zone_find(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
430451 {
431452 struct iter_forward_zone key;
432453 key.node.key = &key;
433454 key.dclass = c;
434455 key.name = nm;
435456 key.namelabs = dname_count_size_labels(nm, &key.namelen);
436 if(!rbtree_search(fwd->tree, &key))
457 return (struct iter_forward_zone*)rbtree_search(fwd->tree, &key);
458 }
459
460 int
461 forwards_add_zone(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp)
462 {
463 struct iter_forward_zone *z;
464 if((z=fwd_zone_find(fwd, c, dp->name)) != NULL) {
465 (void)rbtree_delete(fwd->tree, &z->node);
466 fwd_zone_free(z);
467 }
468 if(!forwards_insert(fwd, c, dp))
469 return 0;
470 fwd_init_parents(fwd);
471 return 1;
472 }
473
474 void
475 forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
476 {
477 struct iter_forward_zone *z;
478 if(!(z=fwd_zone_find(fwd, c, nm)))
437479 return; /* nothing to do */
438 (void)rbtree_delete(fwd->tree, &key);
480 (void)rbtree_delete(fwd->tree, &z->node);
481 fwd_zone_free(z);
439482 fwd_init_parents(fwd);
440483 }
441484
485 int
486 forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
487 {
488 if(!fwd_add_stub_hole(fwd, c, nm)) {
489 return 0;
490 }
491 fwd_init_parents(fwd);
492 return 1;
493 }
494
495 void
496 forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
497 {
498 struct iter_forward_zone *z;
499 if(!(z=fwd_zone_find(fwd, c, nm)))
500 return; /* nothing to do */
501 if(z->dp != NULL)
502 return; /* not a stub hole */
503 (void)rbtree_delete(fwd->tree, &z->node);
504 fwd_zone_free(z);
505 fwd_init_parents(fwd);
506 }
507
4444 #include "util/rbtree.h"
4545 struct config_file;
4646 struct delegpt;
47 struct regional;
4847
4948 /**
5049 * Iterator forward zones structure
5150 */
5251 struct iter_forwards {
53 /** regional where forward zone server addresses are allocated */
54 struct regional* region;
5552 /**
5653 * Zones are stored in this tree. Sort order is specially chosen.
5754 * first sorted on qclass. Then on dname in nsec-like order, so that
7673 int namelabs;
7774 /** delegation point with forward server information for this zone.
7875 * If NULL then this forward entry is used to indicate that a
79 * stub-zone with the same name exists, and should be used. */
76 * stub-zone with the same name exists, and should be used.
77 * This delegation point is malloced.
78 */
8079 struct delegpt* dp;
8180 /** pointer to parent in tree (or NULL if none) */
8281 struct iter_forward_zone* parent;
151150 * @param fwd: the forward data structure
152151 * @param c: class of zone
153152 * @param dp: delegation point with name and target nameservers for new
154 * forward zone. This delegation point and all its data must be
155 * malloced in the fwd->region. (then it is freed when the fwd is
156 * deleted).
153 * forward zone. malloced.
157154 * @return false on failure (out of memory);
158155 */
159156 int forwards_add_zone(struct iter_forwards* fwd, uint16_t c,
161158
162159 /**
163160 * Remove zone from forward structure. For external use since it
164 * recalcs the tree parents. Does not actually release any memory, the region
165 * is unchanged.
161 * recalcs the tree parents.
166162 * @param fwd: the forward data structure
167163 * @param c: class of zone
168164 * @param nm: name of zone (in uncompressed wireformat).
169165 */
170166 void forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm);
171167
168 /**
169 * Add stub hole (empty entry in forward table, that makes resolution skip
170 * a forward-zone because the stub zone should override the forward zone).
171 * Does not add one if not necessary.
172 * @param fwd: the forward data structure
173 * @param c: class of zone
174 * @param nm: name of zone (in uncompressed wireformat).
175 * @return false on failure (out of memory);
176 */
177 int forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm);
178
179 /**
180 * Remove stub hole, if one exists.
181 * @param fwd: the forward data structure
182 * @param c: class of zone
183 * @param nm: name of zone (in uncompressed wireformat).
184 */
185 void forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
186 uint8_t* nm);
187
172188 #endif /* ITERATOR_ITER_FWD_H */
4343 #include <ldns/rr.h>
4444 #include "iterator/iter_hints.h"
4545 #include "iterator/iter_delegpt.h"
46 #include "util/regional.h"
4746 #include "util/log.h"
4847 #include "util/config_file.h"
4948 #include "util/net_help.h"
5655 sizeof(struct iter_hints));
5756 if(!hints)
5857 return NULL;
59 hints->region = regional_create();
60 if(!hints->region) {
61 hints_delete(hints);
62 return NULL;
63 }
6458 return hints;
59 }
60
61 static void hints_stub_free(struct iter_hints_stub* s)
62 {
63 if(!s) return;
64 delegpt_free_mlc(s->dp);
65 free(s);
66 }
67
68 static void delhintnode(rbnode_t* n, void* ATTR_UNUSED(arg))
69 {
70 struct iter_hints_stub* node = (struct iter_hints_stub*)n;
71 hints_stub_free(node);
72 }
73
74 static void hints_del_tree(struct iter_hints* hints)
75 {
76 traverse_postorder(&hints->tree, &delhintnode, NULL);
6577 }
6678
6779 void
6981 {
7082 if(!hints)
7183 return;
72 regional_destroy(hints->region);
84 hints_del_tree(hints);
7385 free(hints);
7486 }
7587
7688 /** add hint to delegation hints */
7789 static int
78 ah(struct delegpt* dp, struct regional* r, const char* sv, const char* ip)
90 ah(struct delegpt* dp, const char* sv, const char* ip)
7991 {
8092 struct sockaddr_storage addr;
8193 socklen_t addrlen;
8496 log_err("could not parse %s", sv);
8597 return 0;
8698 }
87 if(!delegpt_add_ns(dp, r, ldns_rdf_data(rdf), 0) ||
99 if(!delegpt_add_ns_mlc(dp, ldns_rdf_data(rdf), 0) ||
88100 !extstrtoaddr(ip, &addr, &addrlen) ||
89 !delegpt_add_target(dp, r, ldns_rdf_data(rdf), ldns_rdf_size(rdf),
101 !delegpt_add_target_mlc(dp, ldns_rdf_data(rdf), ldns_rdf_size(rdf),
90102 &addr, addrlen, 0, 0)) {
91103 ldns_rdf_deep_free(rdf);
92104 return 0;
97109
98110 /** obtain compiletime provided root hints */
99111 static struct delegpt*
100 compile_time_root_prime(struct regional* r, int do_ip4, int do_ip6)
112 compile_time_root_prime(int do_ip4, int do_ip6)
101113 {
102114 /* from:
103115 ; This file is made available by InterNIC
108120 ;
109121 ; related version of root zone: 2010061700
110122 */
111 struct delegpt* dp = delegpt_create(r);
123 struct delegpt* dp = delegpt_create_mlc((uint8_t*)"\000");
112124 if(!dp)
113125 return NULL;
114126 dp->has_parent_side_NS = 1;
115 if(!delegpt_set_name(dp, r, (uint8_t*)"\000"))
116 return NULL;
117127 if(do_ip4) {
118 if(!ah(dp, r, "A.ROOT-SERVERS.NET.", "198.41.0.4")) return 0;
119 if(!ah(dp, r, "B.ROOT-SERVERS.NET.", "192.228.79.201")) return 0;
120 if(!ah(dp, r, "C.ROOT-SERVERS.NET.", "192.33.4.12")) return 0;
121 if(!ah(dp, r, "D.ROOT-SERVERS.NET.", "128.8.10.90")) return 0;
122 if(!ah(dp, r, "E.ROOT-SERVERS.NET.", "192.203.230.10")) return 0;
123 if(!ah(dp, r, "F.ROOT-SERVERS.NET.", "192.5.5.241")) return 0;
124 if(!ah(dp, r, "G.ROOT-SERVERS.NET.", "192.112.36.4")) return 0;
125 if(!ah(dp, r, "H.ROOT-SERVERS.NET.", "128.63.2.53")) return 0;
126 if(!ah(dp, r, "I.ROOT-SERVERS.NET.", "192.36.148.17")) return 0;
127 if(!ah(dp, r, "J.ROOT-SERVERS.NET.", "192.58.128.30")) return 0;
128 if(!ah(dp, r, "K.ROOT-SERVERS.NET.", "193.0.14.129")) return 0;
129 if(!ah(dp, r, "L.ROOT-SERVERS.NET.", "199.7.83.42")) return 0;
130 if(!ah(dp, r, "M.ROOT-SERVERS.NET.", "202.12.27.33")) return 0;
128 if(!ah(dp, "A.ROOT-SERVERS.NET.", "198.41.0.4")) return 0;
129 if(!ah(dp, "B.ROOT-SERVERS.NET.", "192.228.79.201")) return 0;
130 if(!ah(dp, "C.ROOT-SERVERS.NET.", "192.33.4.12")) return 0;
131 if(!ah(dp, "D.ROOT-SERVERS.NET.", "128.8.10.90")) return 0;
132 if(!ah(dp, "E.ROOT-SERVERS.NET.", "192.203.230.10")) return 0;
133 if(!ah(dp, "F.ROOT-SERVERS.NET.", "192.5.5.241")) return 0;
134 if(!ah(dp, "G.ROOT-SERVERS.NET.", "192.112.36.4")) return 0;
135 if(!ah(dp, "H.ROOT-SERVERS.NET.", "128.63.2.53")) return 0;
136 if(!ah(dp, "I.ROOT-SERVERS.NET.", "192.36.148.17")) return 0;
137 if(!ah(dp, "J.ROOT-SERVERS.NET.", "192.58.128.30")) return 0;
138 if(!ah(dp, "K.ROOT-SERVERS.NET.", "193.0.14.129")) return 0;
139 if(!ah(dp, "L.ROOT-SERVERS.NET.", "199.7.83.42")) return 0;
140 if(!ah(dp, "M.ROOT-SERVERS.NET.", "202.12.27.33")) return 0;
131141 }
132142 if(do_ip6) {
133 if(!ah(dp, r, "A.ROOT-SERVERS.NET.", "2001:503:ba3e::2:30")) return 0;
134 if(!ah(dp, r, "D.ROOT-SERVERS.NET.", "2001:500:2d::d")) return 0;
135 if(!ah(dp, r, "F.ROOT-SERVERS.NET.", "2001:500:2f::f")) return 0;
136 if(!ah(dp, r, "H.ROOT-SERVERS.NET.", "2001:500:1::803f:235")) return 0;
137 if(!ah(dp, r, "I.ROOT-SERVERS.NET.", "2001:7fe::53")) return 0;
138 if(!ah(dp, r, "J.ROOT-SERVERS.NET.", "2001:503:c27::2:30")) return 0;
139 if(!ah(dp, r, "K.ROOT-SERVERS.NET.", "2001:7fd::1")) return 0;
140 if(!ah(dp, r, "L.ROOT-SERVERS.NET.", "2001:500:3::42")) return 0;
141 if(!ah(dp, r, "M.ROOT-SERVERS.NET.", "2001:dc3::35")) return 0;
143 if(!ah(dp, "A.ROOT-SERVERS.NET.", "2001:503:ba3e::2:30")) return 0;
144 if(!ah(dp, "D.ROOT-SERVERS.NET.", "2001:500:2d::d")) return 0;
145 if(!ah(dp, "F.ROOT-SERVERS.NET.", "2001:500:2f::f")) return 0;
146 if(!ah(dp, "H.ROOT-SERVERS.NET.", "2001:500:1::803f:235")) return 0;
147 if(!ah(dp, "I.ROOT-SERVERS.NET.", "2001:7fe::53")) return 0;
148 if(!ah(dp, "J.ROOT-SERVERS.NET.", "2001:503:c27::2:30")) return 0;
149 if(!ah(dp, "K.ROOT-SERVERS.NET.", "2001:7fd::1")) return 0;
150 if(!ah(dp, "L.ROOT-SERVERS.NET.", "2001:500:3::42")) return 0;
151 if(!ah(dp, "M.ROOT-SERVERS.NET.", "2001:dc3::35")) return 0;
142152 }
143153 return dp;
144154 }
148158 hints_insert(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
149159 int noprime)
150160 {
151 struct iter_hints_stub* node = regional_alloc(hints->region,
161 struct iter_hints_stub* node = (struct iter_hints_stub*)malloc(
152162 sizeof(struct iter_hints_stub));
153 uint8_t* nm;
154 if(!node)
155 return 0;
156 nm = regional_alloc_init(hints->region, dp->name, dp->namelen);
157 if(!nm)
158 return 0;
163 if(!node) {
164 delegpt_free_mlc(dp);
165 return 0;
166 }
159167 node->dp = dp;
160168 node->noprime = (uint8_t)noprime;
161 if(!name_tree_insert(&hints->tree, &node->node, nm, dp->namelen,
169 if(!name_tree_insert(&hints->tree, &node->node, dp->name, dp->namelen,
162170 dp->namelabs, c)) {
163171 log_err("second hints ignored.");
172 delegpt_free_mlc(dp);
173 free(node);
164174 }
165175 return 1;
166176 }
167177
168178 /** set stub name */
169 static int
170 read_stubs_name(struct iter_hints* hints, struct config_stub* s,
171 struct delegpt* dp)
172 {
179 static struct delegpt*
180 read_stubs_name(struct config_stub* s)
181 {
182 struct delegpt* dp;
173183 ldns_rdf* rdf;
174184 if(!s->name) {
175185 log_err("stub zone without a name");
176 return 0;
186 return NULL;
177187 }
178188 rdf = ldns_dname_new_frm_str(s->name);
179189 if(!rdf) {
180190 log_err("cannot parse stub zone name %s", s->name);
181 return 0;
182 }
183 if(!delegpt_set_name(dp, hints->region, ldns_rdf_data(rdf))) {
191 return NULL;
192 }
193 if(!(dp=delegpt_create_mlc(ldns_rdf_data(rdf)))) {
184194 ldns_rdf_deep_free(rdf);
185195 log_err("out of memory");
186 return 0;
196 return NULL;
187197 }
188198 ldns_rdf_deep_free(rdf);
189 return 1;
199 return dp;
190200 }
191201
192202 /** set stub host names */
193203 static int
194 read_stubs_host(struct iter_hints* hints, struct config_stub* s,
195 struct delegpt* dp)
204 read_stubs_host(struct config_stub* s, struct delegpt* dp)
196205 {
197206 struct config_strlist* p;
198207 ldns_rdf* rdf;
204213 s->name, p->str);
205214 return 0;
206215 }
207 if(!delegpt_add_ns(dp, hints->region, ldns_rdf_data(rdf), 0)) {
216 if(!delegpt_add_ns_mlc(dp, ldns_rdf_data(rdf), 0)) {
208217 ldns_rdf_deep_free(rdf);
209218 log_err("out of memory");
210219 return 0;
216225
217226 /** set stub server addresses */
218227 static int
219 read_stubs_addr(struct iter_hints* hints, struct config_stub* s,
220 struct delegpt* dp)
228 read_stubs_addr(struct config_stub* s, struct delegpt* dp)
221229 {
222230 struct config_strlist* p;
223231 struct sockaddr_storage addr;
229237 s->name, p->str);
230238 return 0;
231239 }
232 if(!delegpt_add_addr(dp, hints->region, &addr, addrlen, 0, 0)) {
240 if(!delegpt_add_addr_mlc(dp, &addr, addrlen, 0, 0)) {
233241 log_err("out of memory");
234242 return 0;
235243 }
242250 read_stubs(struct iter_hints* hints, struct config_file* cfg)
243251 {
244252 struct config_stub* s;
253 struct delegpt* dp;
245254 for(s = cfg->stubs; s; s = s->next) {
246 struct delegpt* dp = delegpt_create(hints->region);
247 if(!dp) {
248 log_err("out of memory");
249 return 0;
250 }
251 dp->has_parent_side_NS = 1;
252 if(!read_stubs_name(hints, s, dp) ||
253 !read_stubs_host(hints, s, dp) ||
254 !read_stubs_addr(hints, s, dp))
255 return 0;
255 if(!(dp=read_stubs_name(s)) ||
256 !read_stubs_host(s, dp) ||
257 !read_stubs_addr(s, dp))
258 return 0;
259 /* the flag is turned off for 'stub-first' so that the
260 * last resort will ask for parent-side NS record and thus
261 * fallback to the internet name servers on a failure */
262 dp->has_parent_side_NS = (uint8_t)!s->isfirst;
256263 if(!hints_insert(hints, LDNS_RR_CLASS_IN, dp, !s->isprime))
257264 return 0;
258265 delegpt_log(VERB_QUERY, dp);
278285 fname, strerror(errno));
279286 return 0;
280287 }
281 dp = delegpt_create(hints->region);
288 dp = delegpt_create_mlc(NULL);
282289 if(!dp) {
283290 log_err("out of memory reading root hints");
284291 fclose(f);
299306 goto stop_read;
300307 }
301308 if(ldns_rr_get_type(rr) == LDNS_RR_TYPE_NS) {
302 if(!delegpt_add_ns(dp, hints->region,
309 if(!delegpt_add_ns_mlc(dp,
303310 ldns_rdf_data(ldns_rr_rdf(rr, 0)), 0)) {
304311 log_err("out of memory reading root hints");
305312 goto stop_read;
306313 }
307314 c = ldns_rr_get_class(rr);
308315 if(!dp->name) {
309 if(!delegpt_set_name(dp, hints->region,
316 if(!delegpt_set_name_mlc(dp,
310317 ldns_rdf_data(ldns_rr_owner(rr)))){
311318 log_err("out of memory.");
312319 goto stop_read;
320327 sa.sin_port = (in_port_t)htons(UNBOUND_DNS_PORT);
321328 memmove(&sa.sin_addr,
322329 ldns_rdf_data(ldns_rr_rdf(rr, 0)), INET_SIZE);
323 if(!delegpt_add_target(dp, hints->region,
330 if(!delegpt_add_target_mlc(dp,
324331 ldns_rdf_data(ldns_rr_owner(rr)),
325332 ldns_rdf_size(ldns_rr_owner(rr)),
326333 (struct sockaddr_storage*)&sa, len,
336343 sa.sin6_port = (in_port_t)htons(UNBOUND_DNS_PORT);
337344 memmove(&sa.sin6_addr,
338345 ldns_rdf_data(ldns_rr_rdf(rr, 0)), INET6_SIZE);
339 if(!delegpt_add_target(dp, hints->region,
346 if(!delegpt_add_target_mlc(dp,
340347 ldns_rdf_data(ldns_rr_owner(rr)),
341348 ldns_rdf_size(ldns_rr_owner(rr)),
342349 (struct sockaddr_storage*)&sa, len,
359366 fclose(f);
360367 if(!dp->name) {
361368 log_warn("root hints %s: no NS content", fname);
369 delegpt_free_mlc(dp);
362370 return 1;
363371 }
364372 if(!hints_insert(hints, c, dp, 0)) {
372380 ldns_rdf_deep_free(origin);
373381 if (prev_rr)
374382 ldns_rdf_deep_free(prev_rr);
383 delegpt_free_mlc(dp);
375384 fclose(f);
376385 return 0;
377386 }
399408 int
400409 hints_apply_cfg(struct iter_hints* hints, struct config_file* cfg)
401410 {
402 regional_free_all(hints->region);
411 hints_del_tree(hints);
403412 name_tree_init(&hints->tree);
404413
405414 /* read root hints */
412421
413422 /* use fallback compiletime root hints */
414423 if(!hints_lookup_root(hints, LDNS_RR_CLASS_IN)) {
415 struct delegpt* dp = compile_time_root_prime(hints->region,
416 cfg->do_ip4, cfg->do_ip6);
424 struct delegpt* dp = compile_time_root_prime(cfg->do_ip4,
425 cfg->do_ip6);
417426 verbose(VERB_ALGO, "no config, using builtin root hints.");
418427 if(!dp)
419428 return 0;
482491 size_t
483492 hints_get_mem(struct iter_hints* hints)
484493 {
494 size_t s;
495 struct iter_hints_stub* p;
485496 if(!hints) return 0;
486 return sizeof(*hints) + regional_get_mem(hints->region);
487 }
497 s = sizeof(*hints);
498 RBTREE_FOR(p, struct iter_hints_stub*, &hints->tree) {
499 s += sizeof(*p) + delegpt_get_mem(p->dp);
500 }
501 return s;
502 }
503
504 int
505 hints_add_stub(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
506 int noprime)
507 {
508 struct iter_hints_stub *z;
509 if((z=(struct iter_hints_stub*)name_tree_find(&hints->tree,
510 dp->name, dp->namelen, dp->namelabs, c)) != NULL) {
511 (void)rbtree_delete(&hints->tree, &z->node);
512 hints_stub_free(z);
513 }
514 if(!hints_insert(hints, c, dp, noprime))
515 return 0;
516 name_tree_init_parents(&hints->tree);
517 return 1;
518 }
519
520 void
521 hints_delete_stub(struct iter_hints* hints, uint16_t c, uint8_t* nm)
522 {
523 struct iter_hints_stub *z;
524 size_t len;
525 int labs = dname_count_size_labels(nm, &len);
526 if(!(z=(struct iter_hints_stub*)name_tree_find(&hints->tree,
527 nm, len, labs, c)))
528 return; /* nothing to do */
529 (void)rbtree_delete(&hints->tree, &z->node);
530 hints_stub_free(z);
531 name_tree_init_parents(&hints->tree);
532 }
533
4545 struct iter_env;
4646 struct config_file;
4747 struct delegpt;
48 struct regional;
4948
5049 /**
5150 * Iterator hints structure
5251 */
5352 struct iter_hints {
54 /** regional where hints are allocated */
55 struct regional* region;
5653 /**
5754 * Hints are stored in this tree. Sort order is specially chosen.
5855 * first sorted on qclass. Then on dname in nsec-like order, so that
7067 struct iter_hints_stub {
7168 /** tree sorted by name, class */
7269 struct name_tree_node node;
73 /** delegation point with hint information for this stub. */
70 /** delegation point with hint information for this stub. malloced. */
7471 struct delegpt* dp;
7572 /** does the stub need to forego priming (like on other ports) */
7673 uint8_t noprime;
138135 */
139136 size_t hints_get_mem(struct iter_hints* hints);
140137
138 /**
139 * Add stub to hints structure. For external use since it recalcs
140 * the tree parents.
141 * @param hints: the hints data structure
142 * @param c: class of zone
143 * @param dp: delegation point with name and target nameservers for new
144 * hints stub. malloced.
145 * @param noprime: set noprime option to true or false on new hint stub.
146 * @return false on failure (out of memory);
147 */
148 int hints_add_stub(struct iter_hints* hints, uint16_t c, struct delegpt* dp,
149 int noprime);
150
151 /**
152 * Remove stub from hints structure. For external use since it
153 * recalcs the tree parents.
154 * @param hints: the hints data structure
155 * @param c: class of stub zone
156 * @param nm: name of stub zone (in uncompressed wireformat).
157 */
158 void hints_delete_stub(struct iter_hints* hints, uint16_t c, uint8_t* nm);
159
141160 #endif /* ITERATOR_ITER_HINTS_H */
6161 #include "validator/val_anchor.h"
6262 #include "validator/val_kcache.h"
6363 #include "validator/val_kentry.h"
64 #include "validator/val_utils.h"
6465
6566 /** time when nameserver glue is said to be 'recent' */
6667 #define SUSPICION_RECENT_EXPIRY 86400
112113 verbose(VERB_QUERY, "target fetch policy for level %d is %d",
113114 i, iter_env->target_fetch_policy[i]);
114115
115 if(!iter_env->hints)
116 iter_env->hints = hints_create();
117 if(!iter_env->hints || !hints_apply_cfg(iter_env->hints, cfg)) {
118 log_err("Could not set root or stub hints");
119 return 0;
120 }
121116 if(!iter_env->donotq)
122117 iter_env->donotq = donotq_create();
123118 if(!iter_env->donotq || !donotq_apply_cfg(iter_env->donotq, cfg)) {
424419
425420 int
426421 iter_dns_store(struct module_env* env, struct query_info* msgqinf,
427 struct reply_info* msgrep, int is_referral, uint32_t leeway,
422 struct reply_info* msgrep, int is_referral, uint32_t leeway, int pside,
428423 struct regional* region)
429424 {
430425 return dns_cache_store(env, msgqinf, msgrep, is_referral, leeway,
431 region);
426 pside, region);
432427 }
433428
434429 int
973968 a = a->next_usable;
974969 }
975970 }
971
972 int
973 iter_ds_toolow(struct dns_msg* msg, struct delegpt* dp)
974 {
975 /* if for query example.com, there is example.com SOA or a subdomain
976 * of example.com, then we are too low and need to fetch NS. */
977 size_t i;
978 /* if we have a DNAME or CNAME we are probably wrong */
979 /* if we have a qtype DS in the answer section, its fine */
980 for(i=0; i < msg->rep->an_numrrsets; i++) {
981 struct ub_packed_rrset_key* s = msg->rep->rrsets[i];
982 if(ntohs(s->rk.type) == LDNS_RR_TYPE_DNAME ||
983 ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME) {
984 /* not the right answer, maybe too low, check the
985 * RRSIG signer name (if there is any) for a hint
986 * that it is from the dp zone anyway */
987 uint8_t* sname;
988 size_t slen;
989 val_find_rrset_signer(s, &sname, &slen);
990 if(sname && query_dname_compare(dp->name, sname)==0)
991 return 0; /* it is fine, from the right dp */
992 return 1;
993 }
994 if(ntohs(s->rk.type) == LDNS_RR_TYPE_DS)
995 return 0; /* fine, we have a DS record */
996 }
997 for(i=msg->rep->an_numrrsets;
998 i < msg->rep->an_numrrsets + msg->rep->ns_numrrsets; i++) {
999 struct ub_packed_rrset_key* s = msg->rep->rrsets[i];
1000 if(ntohs(s->rk.type) == LDNS_RR_TYPE_SOA) {
1001 if(dname_subdomain_c(s->rk.dname, msg->qinfo.qname))
1002 return 1; /* point is too low */
1003 if(query_dname_compare(s->rk.dname, dp->name)==0)
1004 return 0; /* right dp */
1005 }
1006 if(ntohs(s->rk.type) == LDNS_RR_TYPE_NSEC ||
1007 ntohs(s->rk.type) == LDNS_RR_TYPE_NSEC3) {
1008 uint8_t* sname;
1009 size_t slen;
1010 val_find_rrset_signer(s, &sname, &slen);
1011 if(sname && query_dname_compare(dp->name, sname)==0)
1012 return 0; /* it is fine, from the right dp */
1013 return 1;
1014 }
1015 }
1016 /* we do not know */
1017 return 1;
1018 }
1019
1020 int iter_dp_cangodown(struct query_info* qinfo, struct delegpt* dp)
1021 {
1022 /* no delegation point, do not see how we can go down,
1023 * robust check, it should really exist */
1024 if(!dp) return 0;
1025
1026 /* see if dp equals the qname, then we cannot go down further */
1027 if(query_dname_compare(qinfo->qname, dp->name) == 0)
1028 return 0;
1029 /* if dp is one label above the name we also cannot go down further */
1030 if(dname_count_labels(qinfo->qname) == dp->namelabs+1)
1031 return 0;
1032 return 1;
1033 }
120120 * @param is_referral: If true, then the given message to be stored is a
121121 * referral. The cache implementation may use this as a hint.
122122 * @param leeway: prefetch TTL leeway to expire old rrsets quicker.
123 * @param pside: true if dp is parentside, thus message is 'fresh' and NS
124 * can be prefetch-updates.
123125 * @param region: to copy modified (cache is better) rrs back to.
124126 * @return 0 on alloc error (out of memory).
125127 */
126128 int iter_dns_store(struct module_env* env, struct query_info* qinf,
127 struct reply_info* rep, int is_referral, uint32_t leeway,
129 struct reply_info* rep, int is_referral, uint32_t leeway, int pside,
128130 struct regional* region);
129131
130132 /**
308310 */
309311 void iter_merge_retry_counts(struct delegpt* dp, struct delegpt* old);
310312
313 /**
314 * See if a DS response (type ANSWER) is too low: a nodata answer with
315 * a SOA record in the authority section at-or-below the qchase.qname.
316 * Also returns true if we are not sure (i.e. empty message, CNAME nosig).
317 * @param msg: the response.
318 * @param dp: the dp name is used to check if the RRSIG gives a clue that
319 * it was originated from the correct nameserver.
320 * @return true if too low.
321 */
322 int iter_ds_toolow(struct dns_msg* msg, struct delegpt* dp);
323
324 /**
325 * See if delegpt can go down a step to the qname or not
326 * @param qinfo: the query name looked up.
327 * @param dp: checked if the name can go lower to the qname
328 * @return true if can go down, false if that would not be possible.
329 * the current response seems to be the one and only, best possible, response.
330 */
331 int iter_dp_cangodown(struct query_info* qinfo, struct delegpt* dp);
332
311333 #endif /* ITERATOR_ITER_UTILS_H */
8888 iter_env = (struct iter_env*)env->modinfo[id];
8989 free(iter_env->target_fetch_policy);
9090 priv_delete(iter_env->priv);
91 hints_delete(iter_env->hints);
9291 donotq_delete(iter_env->donotq);
9392 free(iter_env);
9493 env->modinfo[id] = NULL;
259258 /* do not waste time trying to validate this servfail */
260259 err.security = sec_status_indeterminate;
261260 verbose(VERB_ALGO, "store error response in message cache");
262 if(!iter_dns_store(qstate->env, &qstate->qinfo, &err, 0, 0, NULL)) {
261 if(!iter_dns_store(qstate->env, &qstate->qinfo, &err, 0, 0, 0, NULL)) {
263262 log_err("error_response_cache: could not store error (nomem)");
264263 }
265264 return error_response(qstate, id, rcode);
531530 * Generate and send a root priming request.
532531 * @param qstate: the qtstate that triggered the need to prime.
533532 * @param iq: iterator query state.
534 * @param ie: iterator global state.
535533 * @param id: module id.
536534 * @param qclass: the class to prime.
537535 * @return 0 on failure
538536 */
539537 static int
540 prime_root(struct module_qstate* qstate, struct iter_qstate* iq,
541 struct iter_env* ie, int id, uint16_t qclass)
538 prime_root(struct module_qstate* qstate, struct iter_qstate* iq, int id,
539 uint16_t qclass)
542540 {
543541 struct delegpt* dp;
544542 struct module_qstate* subq;
545543 verbose(VERB_DETAIL, "priming . %s NS",
546544 ldns_lookup_by_id(ldns_rr_classes, (int)qclass)?
547545 ldns_lookup_by_id(ldns_rr_classes, (int)qclass)->name:"??");
548 dp = hints_lookup_root(ie->hints, qclass);
546 dp = hints_lookup_root(qstate->env->hints, qclass);
549547 if(!dp) {
550548 verbose(VERB_ALGO, "Cannot prime due to lack of hints");
551549 return 0;
589587 *
590588 * @param qstate: the qtstate that triggered the need to prime.
591589 * @param iq: iterator query state.
592 * @param ie: iterator global state.
593590 * @param id: module id.
594 * @param q: request name.
591 * @param qname: request name.
592 * @param qclass: request class.
595593 * @return true if a priming subrequest was made, false if not. The will only
596594 * issue a priming request if it detects an unprimed stub.
597595 * Uses value of 2 to signal during stub-prime in root-prime situation
598596 * that a noprime-stub is available and resolution can continue.
599597 */
600598 static int
601 prime_stub(struct module_qstate* qstate, struct iter_qstate* iq,
602 struct iter_env* ie, int id, struct query_info* q)
599 prime_stub(struct module_qstate* qstate, struct iter_qstate* iq, int id,
600 uint8_t* qname, uint16_t qclass)
603601 {
604602 /* Lookup the stub hint. This will return null if the stub doesn't
605603 * need to be re-primed. */
606604 struct iter_hints_stub* stub;
607605 struct delegpt* stub_dp;
608606 struct module_qstate* subq;
609 uint8_t* delname = q->qname;
610 size_t delnamelen = q->qname_len;
611
612 if(q->qtype == LDNS_RR_TYPE_DS && !dname_is_root(q->qname))
613 /* remove first label, but not for root */
614 dname_remove_label(&delname, &delnamelen);
615
616 stub = hints_lookup_stub(ie->hints, delname, q->qclass, iq->dp);
607
608 if(!qname) return 0;
609 stub = hints_lookup_stub(qstate->env->hints, qname, qclass, iq->dp);
617610 /* The stub (if there is one) does not need priming. */
618611 if(!stub)
619612 return 0;
632625 return 1; /* return 1 to make module stop, with error */
633626 }
634627 log_nametypeclass(VERB_DETAIL, "use stub", stub_dp->name,
635 LDNS_RR_TYPE_NS, q->qclass);
628 LDNS_RR_TYPE_NS, qclass);
636629 return r;
637630 }
638631
639632 /* Otherwise, we need to (re)prime the stub. */
640633 log_nametypeclass(VERB_DETAIL, "priming stub", stub_dp->name,
641 LDNS_RR_TYPE_NS, q->qclass);
634 LDNS_RR_TYPE_NS, qclass);
642635
643636 /* Stub priming events start at the QUERYTARGETS state to avoid the
644637 * redundant INIT state processing. */
645638 if(!generate_sub_request(stub_dp->name, stub_dp->namelen,
646 LDNS_RR_TYPE_NS, q->qclass, qstate, id, iq,
639 LDNS_RR_TYPE_NS, qclass, qstate, id, iq,
647640 QUERYTARGETS_STATE, PRIME_RESP_STATE, &subq, 0)) {
648641 verbose(VERB_ALGO, "could not prime stub");
649642 (void)error_response(qstate, id, LDNS_RCODE_SERVFAIL);
849842 struct delegpt* dp;
850843 uint8_t* delname = iq->qchase.qname;
851844 size_t delnamelen = iq->qchase.qname_len;
845 if(iq->refetch_glue) {
846 delname = iq->dp->name;
847 delnamelen = iq->dp->namelen;
848 }
852849 /* strip one label off of DS query to lookup higher for it */
853 if(iq->qchase.qtype == LDNS_RR_TYPE_DS
850 if( (iq->qchase.qtype == LDNS_RR_TYPE_DS || iq->refetch_glue)
854851 && !dname_is_root(iq->qchase.qname))
855852 dname_remove_label(&delname, &delnamelen);
856853 dp = forwards_lookup(qstate->env->fwds, delname, iq->qchase.qclass);
10311028 qstate->prefetch_leeway)))
10321029 delname = NULL; /* go to root priming */
10331030 else dname_remove_label(&delname, &delnamelen);
1034 iq->refetch_glue = 0; /* if CNAME causes restart, no refetch */
10351031 }
10361032 /* delname is the name to lookup a delegation for. If NULL rootprime */
10371033 while(1) {
10411037 if(delname)
10421038 iq->dp = dns_cache_find_delegation(qstate->env, delname,
10431039 delnamelen, iq->qchase.qtype, iq->qchase.qclass,
1044 qstate->region, &iq->deleg_msg, *qstate->env->now);
1040 qstate->region, &iq->deleg_msg,
1041 *qstate->env->now+qstate->prefetch_leeway);
10451042 else iq->dp = NULL;
10461043
10471044 /* If the cache has returned nothing, then we have a
10481045 * root priming situation. */
10491046 if(iq->dp == NULL) {
10501047 /* if there is a stub, then no root prime needed */
1051 int r = prime_stub(qstate, iq, ie, id, &iq->qchase);
1048 int r = prime_stub(qstate, iq, id, delname,
1049 iq->qchase.qclass);
10521050 if(r == 2)
10531051 break; /* got noprime-stub-zone, continue */
10541052 else if(r)
10571055 iq->qchase.qclass)) {
10581056 /* forward zone root, no root prime needed */
10591057 /* fill in some dp - safety belt */
1060 iq->dp = hints_lookup_root(ie->hints,
1058 iq->dp = hints_lookup_root(qstate->env->hints,
10611059 iq->qchase.qclass);
10621060 if(!iq->dp) {
10631061 log_err("internal error: no hints dp");
10741072 }
10751073 /* Note that the result of this will set a new
10761074 * DelegationPoint based on the result of priming. */
1077 if(!prime_root(qstate, iq, ie, id, iq->qchase.qclass))
1075 if(!prime_root(qstate, iq, id, iq->qchase.qclass))
10781076 return error_response(qstate, id,
10791077 LDNS_RCODE_REFUSED);
10801078
11031101 /* use safety belt */
11041102 verbose(VERB_QUERY, "Cache has root NS but "
11051103 "no addresses. Fallback to the safety belt.");
1106 iq->dp = hints_lookup_root(ie->hints,
1104 iq->dp = hints_lookup_root(qstate->env->hints,
11071105 iq->qchase.qclass);
11081106 /* note deleg_msg is from previous lookup,
11091107 * but RD is on, so it is not used */
11501148 *
11511149 * @param qstate: query state.
11521150 * @param iq: iterator query state.
1153 * @param ie: iterator shared global environment.
11541151 * @param id: module id.
11551152 * @return true if the event needs more request processing immediately,
11561153 * false if not.
11571154 */
11581155 static int
11591156 processInitRequest2(struct module_qstate* qstate, struct iter_qstate* iq,
1160 struct iter_env* ie, int id)
1161 {
1157 int id)
1158 {
1159 uint8_t* delname;
1160 size_t delnamelen;
11621161 log_query_info(VERB_QUERY, "resolving (init part 2): ",
11631162 &qstate->qinfo);
11641163
1164 if(iq->refetch_glue) {
1165 if(!iq->dp) {
1166 log_err("internal or malloc fail: no dp for refetch");
1167 return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
1168 }
1169 delname = iq->dp->name;
1170 delnamelen = iq->dp->namelen;
1171 } else {
1172 delname = iq->qchase.qname;
1173 delnamelen = iq->qchase.qname_len;
1174 }
1175 if(iq->qchase.qtype == LDNS_RR_TYPE_DS || iq->refetch_glue) {
1176 if(!dname_is_root(delname))
1177 dname_remove_label(&delname, &delnamelen);
1178 iq->refetch_glue = 0; /* if CNAME causes restart, no refetch */
1179 }
11651180 /* Check to see if we need to prime a stub zone. */
1166 if(prime_stub(qstate, iq, ie, id, &iq->qchase)) {
1181 if(prime_stub(qstate, iq, id, delname, iq->qchase.qclass)) {
11671182 /* A priming sub request was made */
11681183 return 0;
11691184 }
12601275 } else {
12611276 subiq->dp = dns_cache_find_delegation(qstate->env,
12621277 name, namelen, qtype, qclass, subq->region,
1263 &subiq->deleg_msg, *qstate->env->now);
1278 &subiq->deleg_msg,
1279 *qstate->env->now+subq->prefetch_leeway);
12641280 /* if no dp, then it's from root, refetch unneeded */
12651281 if(subiq->dp) {
12661282 subiq->dnssec_expected = iter_indicates_dnssec(
15091525 return error_response_cache(qstate, id, LDNS_RCODE_SERVFAIL);
15101526 }
15111527
1528 /**
1529 * Try to find the NS record set that will resolve a qtype DS query. Due
1530 * to grandparent/grandchild reasons we did not get a proper lookup right
1531 * away. We need to create type NS queries until we get the right parent
1532 * for this lookup. We remove labels from the query to find the right point.
1533 * If we end up at the old dp name, then there is no solution.
1534 *
1535 * @param qstate: query state.
1536 * @param iq: iterator query state.
1537 * @param id: module id.
1538 * @return true if the event requires more immediate processing, false if
1539 * not. This is generally only true when forwarding the request to
1540 * the final state (i.e., on answer).
1541 */
1542 static int
1543 processDSNSFind(struct module_qstate* qstate, struct iter_qstate* iq,
1544 int id)
1545 {
1546 struct module_qstate* subq = NULL;
1547 verbose(VERB_ALGO, "processDSNSFind");
1548
1549 if(!iq->dsns_point) {
1550 /* initialize */
1551 iq->dsns_point = iq->qchase.qname;
1552 iq->dsns_point_len = iq->qchase.qname_len;
1553 }
1554 /* robustcheck for internal error: we are not underneath the dp */
1555 if(!dname_subdomain_c(iq->dsns_point, iq->dp->name)) {
1556 return error_response_cache(qstate, id, LDNS_RCODE_SERVFAIL);
1557 }
1558
1559 /* go up one (more) step, until we hit the dp, if so, end */
1560 dname_remove_label(&iq->dsns_point, &iq->dsns_point_len);
1561 if(query_dname_compare(iq->dsns_point, iq->dp->name) == 0) {
1562 /* there was no inbetween nameserver, use the old delegation
1563 * point again. And this time, because dsns_point is nonNULL
1564 * we are going to accept the (bad) result */
1565 iq->state = QUERYTARGETS_STATE;
1566 return 1;
1567 }
1568 iq->state = DSNS_FIND_STATE;
1569
1570 /* spawn NS lookup (validation not needed, this is for DS lookup) */
1571 log_nametypeclass(VERB_ALGO, "fetch nameservers",
1572 iq->dsns_point, LDNS_RR_TYPE_NS, iq->qchase.qclass);
1573 if(!generate_sub_request(iq->dsns_point, iq->dsns_point_len,
1574 LDNS_RR_TYPE_NS, iq->qchase.qclass, qstate, id, iq,
1575 INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0)) {
1576 return error_response_cache(qstate, id, LDNS_RCODE_SERVFAIL);
1577 }
1578
1579 return 0;
1580 }
1581
15121582 /**
15131583 * This is the request event state where the request will be sent to one of
15141584 * its current query targets. This state also handles issuing target lookup
18301900 (iq->response->rep->an_numrrsets?"ANSWER":
18311901 "nodata ANSWER"));
18321902 }
1903 /* if qtype is DS, check we have the right level of answer,
1904 * like grandchild answer but we need the middle, reject it */
1905 if(iq->qchase.qtype == LDNS_RR_TYPE_DS && !iq->dsns_point
1906 && !(iq->chase_flags&BIT_RD)
1907 && iter_ds_toolow(iq->response, iq->dp)
1908 && iter_dp_cangodown(&iq->qchase, iq->dp))
1909 return processDSNSFind(qstate, iq, id);
18331910 if(!iter_dns_store(qstate->env, &iq->response->qinfo,
18341911 iq->response->rep, 0, qstate->prefetch_leeway,
1912 iq->dp&&iq->dp->has_parent_side_NS,
18351913 qstate->region))
18361914 return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
18371915 /* close down outstanding requests to be discarded */
18711949 /* Store the referral under the current query */
18721950 /* no prefetch-leeway, since its not the answer */
18731951 if(!iter_dns_store(qstate->env, &iq->response->qinfo,
1874 iq->response->rep, 1, 0, NULL))
1952 iq->response->rep, 1, 0, 0, NULL))
18751953 return error_response(qstate, id,
18761954 LDNS_RCODE_SERVFAIL);
18771955 if(iq->store_parent_NS)
19482026 if(verbosity >= VERB_ALGO)
19492027 log_dns_msg("cname msg", &iq->response->qinfo,
19502028 iq->response->rep);
2029 /* if qtype is DS, check we have the right level of answer,
2030 * like grandchild answer but we need the middle, reject it */
2031 if(iq->qchase.qtype == LDNS_RR_TYPE_DS && !iq->dsns_point
2032 && !(iq->chase_flags&BIT_RD)
2033 && iter_ds_toolow(iq->response, iq->dp)
2034 && iter_dp_cangodown(&iq->qchase, iq->dp))
2035 return processDSNSFind(qstate, iq, id);
19512036 /* Process the CNAME response. */
19522037 if(!handle_cname_response(qstate, iq, iq->response,
19532038 &sname, &snamelen))
19572042 * the partial query answer (CNAME only). */
19582043 /* prefetchleeway applied because this updates answer parts */
19592044 if(!iter_dns_store(qstate->env, &iq->response->qinfo,
1960 iq->response->rep, 1, qstate->prefetch_leeway, NULL))
2045 iq->response->rep, 1, qstate->prefetch_leeway,
2046 iq->dp&&iq->dp->has_parent_side_NS, NULL))
19612047 return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
19622048 /* set the current request's qname to the new value. */
19632049 iq->qchase.qname = sname;
19652051 /* Clear the query state, since this is a query restart. */
19662052 iq->deleg_msg = NULL;
19672053 iq->dp = NULL;
2054 iq->dsns_point = NULL;
19682055 /* Note the query restart. */
19692056 iq->query_restart_count++;
19702057 iq->sent_count = 0;
22272314 }
22282315
22292316 /**
2317 * Process response for DS NS Find queries, that attempt to find the delegation
2318 * point where we ask the DS query from.
2319 *
2320 * @param qstate: query state.
2321 * @param id: module id.
2322 * @param forq: super query state.
2323 */
2324 static void
2325 processDSNSResponse(struct module_qstate* qstate, int id,
2326 struct module_qstate* forq)
2327 {
2328 struct iter_qstate* foriq = (struct iter_qstate*)forq->minfo[id];
2329
2330 /* if the finished (iq->response) query has no NS set: continue
2331 * up to look for the right dp; nothing to change, do DPNSstate */
2332 if(qstate->return_rcode != LDNS_RCODE_NOERROR)
2333 return; /* seek further */
2334 /* find the NS RRset (without allowing CNAMEs) */
2335 if(!reply_find_rrset(qstate->return_msg->rep, qstate->qinfo.qname,
2336 qstate->qinfo.qname_len, LDNS_RR_TYPE_NS,
2337 qstate->qinfo.qclass)){
2338 return; /* seek further */
2339 }
2340
2341 /* else, store as DP and continue at querytargets */
2342 foriq->state = QUERYTARGETS_STATE;
2343 foriq->dp = delegpt_from_message(qstate->return_msg, forq->region);
2344 if(!foriq->dp) {
2345 log_err("out of memory in dsns dp alloc");
2346 return; /* dp==NULL in QUERYTARGETS makes SERVFAIL */
2347 }
2348 /* success, go query the querytargets in the new dp (and go down) */
2349 }
2350
2351 /**
22302352 * Process response for qclass=ANY queries for a particular class.
22312353 * Append to result or error-exit.
22322354 *
23352457 processCollectClass(struct module_qstate* qstate, int id)
23362458 {
23372459 struct iter_qstate* iq = (struct iter_qstate*)qstate->minfo[id];
2338 struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
23392460 struct module_qstate* subq;
23402461 /* If qchase.qclass == 0 then send out queries for all classes.
23412462 * Otherwise, do nothing (wait for all answers to arrive and the
23442465 if(iq->qchase.qclass == 0) {
23452466 uint16_t c = 0;
23462467 iq->qchase.qclass = LDNS_RR_CLASS_ANY;
2347 while(iter_get_next_root(ie->hints, qstate->env->fwds, &c)) {
2468 while(iter_get_next_root(qstate->env->hints,
2469 qstate->env->fwds, &c)) {
23482470 /* generate query for this class */
23492471 log_nametypeclass(VERB_ALGO, "spawn collect query",
23502472 qstate->qinfo.qname, qstate->qinfo.qtype, c);
24342556 if(qstate->query_flags&BIT_RD) {
24352557 if(!iter_dns_store(qstate->env, &qstate->qinfo,
24362558 iq->response->rep, 0, qstate->prefetch_leeway,
2559 iq->dp&&iq->dp->has_parent_side_NS,
24372560 qstate->region))
24382561 return error_response(qstate, id,
24392562 LDNS_RCODE_SERVFAIL);
24602583 {
24612584 if(!qstate->is_priming && super->qinfo.qclass == LDNS_RR_CLASS_ANY)
24622585 processClassResponse(qstate, id, super);
2586 else if(super->qinfo.qtype == LDNS_RR_TYPE_DS && ((struct iter_qstate*)
2587 super->minfo[id])->state == DSNS_FIND_STATE)
2588 processDSNSResponse(qstate, id, super);
24632589 else if(qstate->return_rcode != LDNS_RCODE_NOERROR)
24642590 error_supers(qstate, id, super);
24652591 else if(qstate->is_priming)
24922618 cont = processInitRequest(qstate, iq, ie, id);
24932619 break;
24942620 case INIT_REQUEST_2_STATE:
2495 cont = processInitRequest2(qstate, iq, ie, id);
2621 cont = processInitRequest2(qstate, iq, id);
24962622 break;
24972623 case INIT_REQUEST_3_STATE:
24982624 cont = processInitRequest3(qstate, iq, id);
25082634 break;
25092635 case COLLECT_CLASS_STATE:
25102636 cont = processCollectClass(qstate, id);
2637 break;
2638 case DSNS_FIND_STATE:
2639 cont = processDSNSFind(qstate, iq, id);
25112640 break;
25122641 case FINISHED_STATE:
25132642 cont = processFinished(qstate, iq, id);
27042833 if(!ie)
27052834 return 0;
27062835 return sizeof(*ie) + sizeof(int)*((size_t)ie->max_dependency_depth+1)
2707 + hints_get_mem(ie->hints) + donotq_get_mem(ie->donotq)
2708 + priv_get_mem(ie->priv);
2836 + donotq_get_mem(ie->donotq) + priv_get_mem(ie->priv);
27092837 }
27102838
27112839 /**
27402868 return "PRIME RESPONSE STATE";
27412869 case COLLECT_CLASS_STATE :
27422870 return "COLLECT CLASS STATE";
2871 case DSNS_FIND_STATE :
2872 return "DSNS FIND STATE";
27432873 case QUERY_RESP_STATE :
27442874 return "QUERY RESPONSE STATE";
27452875 case FINISHED_STATE :
8585 * Global state for the iterator.
8686 */
8787 struct iter_env {
88 /**
89 * The hints -- these aren't stored in the cache because they don't
90 * expire. The hints are always used to "prime" the cache. Note
91 * that both root hints and stub zone "hints" are stored in this
92 * data structure.
93 */
94 struct iter_hints* hints;
95
9688 /** A flag to indicate whether or not we have an IPv6 route */
9789 int supports_ipv6;
9890
161153 /** Collecting query class information, for qclass=ANY, when
162154 * it spawns off queries for every class, it returns here. */
163155 COLLECT_CLASS_STATE,
156
157 /** Find NS record to resolve DS record from, walking to the right
158 * NS spot until we find it */
159 DSNS_FIND_STATE,
164160
165161 /** Responses that are to be returned upstream end at this state.
166162 * As well as responses to target queries. */
278274 /** the parent-side-glue element (NULL if none, its first match) */
279275 struct ub_packed_rrset_key* pside_glue;
280276
277 /** If nonNULL we are walking upwards from DS query to find NS */
278 uint8_t* dsns_point;
279 /** length of the dname in dsns_point */
280 size_t dsns_point_len;
281
281282 /**
282283 * expected dnssec information for this iteration step.
283284 * If dnssec rrsigs are expected and not given, the server is marked
6565 #include "util/data/msgencode.h"
6666 #include "util/tube.h"
6767 #include "iterator/iter_fwd.h"
68 #include "iterator/iter_hints.h"
6869
6970 /** handle new query command for bg worker */
7071 static void handle_newq(struct libworker* w, uint8_t* buf, uint32_t len);
8283 ldns_buffer_free(w->env->scratch_buffer);
8384 regional_destroy(w->env->scratch);
8485 forwards_delete(w->env->fwds);
86 hints_delete(w->env->hints);
8587 ub_randfree(w->env->rnd);
8688 free(w->env);
8789 }
126128 forwards_delete(w->env->fwds);
127129 w->env->fwds = NULL;
128130 }
131 w->env->hints = hints_create();
132 if(w->env->hints && !hints_apply_cfg(w->env->hints, cfg)) {
133 hints_delete(w->env->hints);
134 w->env->hints = NULL;
135 }
129136 if(cfg->ssl_upstream) {
130137 w->sslctx = connect_sslctx_create(NULL, NULL, NULL);
131138 if(!w->sslctx) {
132 libworker_delete(w);
133 return NULL;
139 /* to make the setup fail after unlock */
140 hints_delete(w->env->hints);
141 w->env->hints = NULL;
134142 }
135143 }
136144 if(!w->is_bg || w->is_bg_thread) {
137145 lock_basic_unlock(&ctx->cfglock);
138146 }
139 if(!w->env->scratch || !w->env->scratch_buffer || !w->env->fwds) {
147 if(!w->env->scratch || !w->env->scratch_buffer || !w->env->fwds ||
148 !w->env->hints) {
140149 libworker_delete(w);
141150 return NULL;
142151 }
861870 log_assert(0);
862871 }
863872
873 void worker_start_accept(void* ATTR_UNUSED(arg))
874 {
875 log_assert(0);
876 }
877
878 void worker_stop_accept(void* ATTR_UNUSED(arg))
879 {
880 log_assert(0);
881 }
882
864883 int order_lock_cmp(const void* ATTR_UNUSED(e1), const void* ATTR_UNUSED(e2))
865884 {
866885 log_assert(0);
0 #!/usr/bin/env python
1 from unbound import ub_ctx, RR_TYPE_A, RR_TYPE_RRSIG, RR_TYPE_NSEC, RR_TYPE_NSEC3
2 import ldns
3
4 def dnssecParse(domain, rrType=RR_TYPE_A):
5 print "Resolving domain", domain
6 s, r = resolver.resolve(domain)
7 print "status: %s, secure: %s, rcode: %s, havedata: %s, answer_len; %s" % (s, r.secure, r.rcode_str, r.havedata, r.answer_len)
8
9 s, pkt = ldns.ldns_wire2pkt(r.packet)
10 if s != 0:
11 raise RuntimeError("Error parsing DNS packet")
12
13 rrsigs = pkt.rr_list_by_type(RR_TYPE_RRSIG, ldns.LDNS_SECTION_ANSWER)
14 print "RRSIGs from answer:", rrsigs
15
16 rrsigs = pkt.rr_list_by_type(RR_TYPE_RRSIG, ldns.LDNS_SECTION_AUTHORITY)
17 print "RRSIGs from authority:", rrsigs
18
19 nsecs = pkt.rr_list_by_type(RR_TYPE_NSEC, ldns.LDNS_SECTION_AUTHORITY)
20 print "NSECs:", nsecs
21
22 nsec3s = pkt.rr_list_by_type(RR_TYPE_NSEC3, ldns.LDNS_SECTION_AUTHORITY)
23 print "NSEC3s:", nsec3s
24
25 print "---"
26
27
28 resolver = ub_ctx()
29 resolver.add_ta(". IN DS 19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5")
30
31 dnssecParse("nic.cz")
32 dnssecParse("nonexistent-domain-blablabla.cz")
33 dnssecParse("nonexistent-domain-blablabla.root.cz")
34
767767
768768 return list;
769769 }
770
771 PyObject* _packet() {
772 return PyString_FromStringAndSize($self->answer_packet, $self->answer_len);
773 }
770774
771775 %pythoncode %{
772776 def __init__(self):
804808 return ub_data(self._ub_result_data(self))
805809
806810 __swig_getmethods__["data"] = _get_data
811 __swig_getmethods__["packet"] = _packet
807812 data = property(_get_data, doc="Returns :class:`ub_data` instance containing various decoding functions or None")
808813
809814 %}
6565 }
6666
6767 return dns_cache_store(qstate->env, qinfo, msgrep, is_referral,
68 qstate->prefetch_leeway, NULL);
68 qstate->prefetch_leeway, 0, NULL);
6969 }
7070
7171 /* Invalidate the message associated with query_info stored in message cache */
5454 * @param env: module environment with caches.
5555 * @param rep: contains list of rrsets to store.
5656 * @param now: current time.
57 * @param leeway: during prefetch how much leeway to update TTLs.
58 * This makes rrsets (other than type NS) timeout sooner so they get
59 * updated with a new full TTL.
60 * Type NS does not get this, because it must not be refreshed from the
61 * child domain, but keep counting down properly.
62 * @param pside: if from parentside discovered NS, so that its NS is okay
63 * in a prefetch situation to be updated (without becoming sticky).
5764 * @param qrep: update rrsets here if cache is better
5865 * @param region: for qrep allocs.
5966 */
6067 static void
6168 store_rrsets(struct module_env* env, struct reply_info* rep, uint32_t now,
62 struct reply_info* qrep, struct regional* region)
69 uint32_t leeway, int pside, struct reply_info* qrep,
70 struct regional* region)
6371 {
6472 size_t i;
6573 /* see if rrset already exists in cache, if not insert it. */
6876 rep->ref[i].id = rep->rrsets[i]->id;
6977 /* update ref if it was in the cache */
7078 switch(rrset_cache_update(env->rrset_cache, &rep->ref[i],
71 env->alloc, now)) {
79 env->alloc, now + ((ntohs(rep->ref[i].key->rk.type)==
80 LDNS_RR_TYPE_NS && !pside)?0:leeway))) {
7281 case 0: /* ref unchanged, item inserted */
7382 break;
7483 case 2: /* ref updated, cache is superior */
95104
96105 void
97106 dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
98 hashvalue_t hash, struct reply_info* rep, uint32_t leeway,
107 hashvalue_t hash, struct reply_info* rep, uint32_t leeway, int pside,
99108 struct reply_info* qrep, struct regional* region)
100109 {
101110 struct msgreply_entry* e;
111120 /* there was a reply_info_sortref(rep) here but it seems to be
112121 * unnecessary, because the cache gets locked per rrset. */
113122 reply_info_set_ttls(rep, *env->now);
114 store_rrsets(env, rep, *env->now+leeway, qrep, region);
123 store_rrsets(env, rep, *env->now, leeway, pside, qrep, region);
115124 if(ttl == 0) {
116125 /* we do not store the message, but we did store the RRs,
117126 * which could be useful for delegation information */
729738
730739 int
731740 dns_cache_store(struct module_env* env, struct query_info* msgqinf,
732 struct reply_info* msgrep, int is_referral, uint32_t leeway,
741 struct reply_info* msgrep, int is_referral, uint32_t leeway, int pside,
733742 struct regional* region)
734743 {
735744 struct reply_info* rep = NULL;
751760 ref.key = rep->rrsets[i];
752761 ref.id = rep->rrsets[i]->id;
753762 /*ignore ret: it was in the cache, ref updated */
763 /* no leeway for typeNS */
754764 (void)rrset_cache_update(env->rrset_cache, &ref,
755 env->alloc, *env->now + leeway);
765 env->alloc, *env->now +
766 ((ntohs(ref.key->rk.type)==LDNS_RR_TYPE_NS
767 && !pside) ? 0:leeway));
756768 }
757769 free(rep);
758770 return 1;
773785 rep->flags |= (BIT_RA | BIT_QR);
774786 rep->flags &= ~(BIT_AA | BIT_CD);
775787 h = query_info_hash(&qinf);
776 dns_cache_store_msg(env, &qinf, h, rep, leeway, msgrep, region);
788 dns_cache_store_msg(env, &qinf, h, rep, leeway, pside, msgrep,
789 region);
777790 /* qname is used inside query_info_entrysetup, and set to
778791 * NULL. If it has not been used, free it. free(0) is safe. */
779792 free(qinf.qname);
7373 * It will store only the RRsets, not the message.
7474 * @param leeway: TTL value, if not 0, other rrsets are considered expired
7575 * that many seconds before actual TTL expiry.
76 * @param pside: if true, information came from a server which was fetched
77 * from the parentside of the zonecut. This means that the type NS
78 * can be updated to full TTL even in prefetch situations.
7679 * @param region: region to allocate better entries from cache into.
7780 * (used when is_referral is false).
7881 * @return 0 on alloc error (out of memory).
7982 */
8083 int dns_cache_store(struct module_env* env, struct query_info* qinf,
81 struct reply_info* rep, int is_referral, uint32_t leeway,
84 struct reply_info* rep, int is_referral, uint32_t leeway, int pside,
8285 struct regional* region);
8386
8487 /**
9497 * Adjusts the reply info TTLs to absolute time.
9598 * @param leeway: TTL value, if not 0, other rrsets are considered expired
9699 * that many seconds before actual TTL expiry.
100 * @param pside: if true, information came from a server which was fetched
101 * from the parentside of the zonecut. This means that the type NS
102 * can be updated to full TTL even in prefetch situations.
97103 * @param qrep: message that can be altered with better rrs from cache.
98104 * @param region: to allocate into for qmsg.
99105 */
100106 void dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
101 hashvalue_t hash, struct reply_info* rep, uint32_t leeway,
107 hashvalue_t hash, struct reply_info* rep, uint32_t leeway, int pside,
102108 struct reply_info* qrep, struct regional* region);
103109
104110 /**
5151 /** Timeout when only a single probe query per IP is allowed. */
5252 #define PROBE_MAXRTO 12000 /* in msec */
5353
54 /** number of timeouts for a type when the domain can be blocked ;
55 * even if another type has completely rtt maxed it, the different type
56 * can do this number of packets (until those all timeout too) */
57 #define TIMEOUT_COUNT_MAX 3
58
5459 size_t
5560 infra_sizefunc(void* k, void* ATTR_UNUSED(d))
5661 {
195200 data->rec_lame = 0;
196201 data->lame_type_A = 0;
197202 data->lame_other = 0;
203 data->timeout_A = 0;
204 data->timeout_AAAA = 0;
205 data->timeout_other = 0;
198206 }
199207
200208 /**
249257 if(e && ((struct infra_data*)e->data)->ttl < timenow) {
250258 /* it expired, try to reuse existing entry */
251259 int old = ((struct infra_data*)e->data)->rtt.rto;
260 uint8_t tA = ((struct infra_data*)e->data)->timeout_A;
261 uint8_t tAAAA = ((struct infra_data*)e->data)->timeout_AAAA;
262 uint8_t tother = ((struct infra_data*)e->data)->timeout_other;
252263 lock_rw_unlock(&e->lock);
253264 e = infra_lookup_nottl(infra, addr, addrlen, nm, nmlen, 1);
254265 if(e) {
258269 data_entry_init(infra, e, timenow);
259270 wr = 1;
260271 /* TOP_TIMEOUT remains on reuse */
261 if(old >= USEFUL_SERVER_TOP_TIMEOUT)
272 if(old >= USEFUL_SERVER_TOP_TIMEOUT) {
262273 ((struct infra_data*)e->data)->rtt.rto
263274 = USEFUL_SERVER_TOP_TIMEOUT;
275 ((struct infra_data*)e->data)->timeout_A = tA;
276 ((struct infra_data*)e->data)->timeout_AAAA = tAAAA;
277 ((struct infra_data*)e->data)->timeout_other = tother;
278 }
264279 }
265280 }
266281 if(!e) {
357372
358373 int
359374 infra_rtt_update(struct infra_cache* infra, struct sockaddr_storage* addr,
360 socklen_t addrlen, uint8_t* nm, size_t nmlen, int roundtrip,
361 int orig_rtt, uint32_t timenow)
375 socklen_t addrlen, uint8_t* nm, size_t nmlen, int qtype,
376 int roundtrip, int orig_rtt, uint32_t timenow)
362377 {
363378 struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen,
364379 nm, nmlen, 1);
376391 data = (struct infra_data*)e->data;
377392 if(roundtrip == -1) {
378393 rtt_lost(&data->rtt, orig_rtt);
394 if(qtype == LDNS_RR_TYPE_A) {
395 if(data->timeout_A < TIMEOUT_COUNT_MAX)
396 data->timeout_A++;
397 } else if(qtype == LDNS_RR_TYPE_AAAA) {
398 if(data->timeout_AAAA < TIMEOUT_COUNT_MAX)
399 data->timeout_AAAA++;
400 } else {
401 if(data->timeout_other < TIMEOUT_COUNT_MAX)
402 data->timeout_other++;
403 }
379404 } else {
380405 rtt_update(&data->rtt, roundtrip);
381406 data->probedelay = 0;
407 if(qtype == LDNS_RR_TYPE_A)
408 data->timeout_A = 0;
409 else if(qtype == LDNS_RR_TYPE_AAAA)
410 data->timeout_AAAA = 0;
411 else data->timeout_other = 0;
382412 }
383413 if(data->rtt.rto > 0)
384414 rto = data->rtt.rto;
391421
392422 int infra_get_host_rto(struct infra_cache* infra,
393423 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* nm,
394 size_t nmlen, struct rtt_info* rtt, int* delay, uint32_t timenow)
424 size_t nmlen, struct rtt_info* rtt, int* delay, uint32_t timenow,
425 int* tA, int* tAAAA, int* tother)
395426 {
396427 struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen,
397428 nm, nmlen, 0);
406437 *delay = (int)(data->probedelay - timenow);
407438 else *delay = 0;
408439 }
440 *tA = (int)data->timeout_A;
441 *tAAAA = (int)data->timeout_AAAA;
442 *tother = (int)data->timeout_other;
409443 lock_rw_unlock(&e->lock);
410444 return ttl;
411445 }
455489 host = (struct infra_data*)e->data;
456490 *rtt = rtt_unclamped(&host->rtt);
457491 if(host->rtt.rto >= PROBE_MAXRTO && timenow < host->probedelay
458 && rtt_notimeout(&host->rtt)*4 <= host->rtt.rto)
492 && rtt_notimeout(&host->rtt)*4 <= host->rtt.rto) {
459493 /* single probe for this domain, and we are not probing */
460 *rtt = USEFUL_SERVER_TOP_TIMEOUT;
494 /* unless the query type allows a probe to happen */
495 if(qtype == LDNS_RR_TYPE_A) {
496 if(host->timeout_A >= TIMEOUT_COUNT_MAX)
497 *rtt = USEFUL_SERVER_TOP_TIMEOUT;
498 else *rtt = USEFUL_SERVER_TOP_TIMEOUT-1000;
499 } else if(qtype == LDNS_RR_TYPE_AAAA) {
500 if(host->timeout_AAAA >= TIMEOUT_COUNT_MAX)
501 *rtt = USEFUL_SERVER_TOP_TIMEOUT;
502 else *rtt = USEFUL_SERVER_TOP_TIMEOUT-1000;
503 } else {
504 if(host->timeout_other >= TIMEOUT_COUNT_MAX)
505 *rtt = USEFUL_SERVER_TOP_TIMEOUT;
506 else *rtt = USEFUL_SERVER_TOP_TIMEOUT-1000;
507 }
508 }
461509 if(timenow > host->ttl) {
462510 /* expired entry */
463511 /* see if this can be a re-probe of an unresponsive server */
464512 /* minus 1000 because that is outside of the RTTBAND, so
465513 * blacklisted servers stay blacklisted if this is chosen */
466514 if(host->rtt.rto >= USEFUL_SERVER_TOP_TIMEOUT) {
515 lock_rw_unlock(&e->lock);
467516 *rtt = USEFUL_SERVER_TOP_TIMEOUT-1000;
468517 *lame = 0;
469518 *dnsseclame = 0;
470519 *reclame = 0;
471 lock_rw_unlock(&e->lock);
472520 return 1;
473521 }
474522 lock_rw_unlock(&e->lock);
9090 uint8_t lame_type_A;
9191 /** the host is lame (not authoritative) for other query types */
9292 uint8_t lame_other;
93
94 /** timeouts counter for type A */
95 uint8_t timeout_A;
96 /** timeouts counter for type AAAA */
97 uint8_t timeout_AAAA;
98 /** timeouts counter for others */
99 uint8_t timeout_other;
93100 };
94101
95102 /**
194201 * @param addrlen: length of addr.
195202 * @param name: zone name
196203 * @param namelen: zone name length
204 * @param qtype: query type.
197205 * @param roundtrip: estimate of roundtrip time in milliseconds or -1 for
198206 * timeout.
199207 * @param orig_rtt: original rtt for the query that timed out (roundtrip==-1).
202210 * @return: 0 on error. new rto otherwise.
203211 */
204212 int infra_rtt_update(struct infra_cache* infra, struct sockaddr_storage* addr,
205 socklen_t addrlen, uint8_t* name, size_t namelen,
213 socklen_t addrlen, uint8_t* name, size_t namelen, int qtype,
206214 int roundtrip, int orig_rtt, uint32_t timenow);
207215
208216 /**
266274 * @param rtt: the rtt_info is copied into here (caller alloced return struct).
267275 * @param delay: probe delay (if any).
268276 * @param timenow: what time it is now.
277 * @param tA: timeout counter on type A.
278 * @param tAAAA: timeout counter on type AAAA.
279 * @param tother: timeout counter on type other.
269280 * @return TTL the infra host element is valid for. If -1: not found in cache.
270281 * TTL -2: found but expired.
271282 */
272283 int infra_get_host_rto(struct infra_cache* infra,
273284 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* name,
274 size_t namelen, struct rtt_info* rtt, int* delay, uint32_t timenow);
285 size_t namelen, struct rtt_info* rtt, int* delay, uint32_t timenow,
286 int* tA, int* tAAAA, int* tother);
275287
276288 /**
277289 * Get memory used by the infra cache.
914914 }
915915 return s;
916916 }
917
918 void listen_stop_accept(struct listen_dnsport* listen)
919 {
920 /* do not stop the ones that have no tcp_free list
921 * (they have already stopped listening) */
922 struct listen_list* p;
923 for(p=listen->cps; p; p=p->next) {
924 if(p->com->type == comm_tcp_accept &&
925 p->com->tcp_free != NULL) {
926 comm_point_stop_listening(p->com);
927 }
928 }
929 }
930
931 void listen_start_accept(struct listen_dnsport* listen)
932 {
933 /* do not start the ones that have no tcp_free list, it is no
934 * use to listen to them because they have no free tcp handlers */
935 struct listen_list* p;
936 for(p=listen->cps; p; p=p->next) {
937 if(p->com->type == comm_tcp_accept &&
938 p->com->tcp_free != NULL) {
939 comm_point_start_listening(p->com, -1, -1);
940 }
941 }
942 }
943
153153 size_t listen_get_mem(struct listen_dnsport* listen);
154154
155155 /**
156 * stop accept handlers for TCP (until enabled again)
157 * @param listen: listening structure.
158 */
159 void listen_stop_accept(struct listen_dnsport* listen);
160
161 /**
162 * start accept handlers for TCP (was stopped before)
163 * @param listen: listening structure.
164 */
165 void listen_start_accept(struct listen_dnsport* listen);
166
167 /**
156168 * Create and bind nonblocking UDP socket
157169 * @param family: for socket call.
158170 * @param socktype: for socket call.
226226 #else
227227 if(1) {
228228 #endif
229 log_err("outgoing tcp: connect: %s", strerror(errno));
229 if(tcp_connect_errno_needs_log(
230 (struct sockaddr*)&w->addr, w->addrlen))
231 log_err("outgoing tcp: connect: %s",
232 strerror(errno));
230233 close(s);
231234 #else /* USE_WINSOCK */
232235 if(WSAGetLastError() != WSAEINPROGRESS &&
11651168 serviced_create(struct outside_network* outnet, ldns_buffer* buff, int dnssec,
11661169 int want_dnssec, int tcp_upstream, int ssl_upstream,
11671170 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone,
1168 size_t zonelen)
1171 size_t zonelen, int qtype)
11691172 {
11701173 struct serviced_query* sq = (struct serviced_query*)malloc(sizeof(*sq));
11711174 #ifdef UNBOUND_DEBUG
11871190 return NULL;
11881191 }
11891192 sq->zonelen = zonelen;
1193 sq->qtype = qtype;
11901194 sq->dnssec = dnssec;
11911195 sq->want_dnssec = want_dnssec;
11921196 sq->tcp_upstream = tcp_upstream;
15651569 * huge due to system-hibernated and we woke up */
15661570 if(roundtime < TCP_AUTH_QUERY_TIMEOUT*1000) {
15671571 if(!infra_rtt_update(sq->outnet->infra, &sq->addr,
1568 sq->addrlen, sq->zone, sq->zonelen, roundtime,
1569 sq->last_rtt, (uint32_t)now.tv_sec))
1572 sq->addrlen, sq->zone, sq->zonelen, sq->qtype,
1573 roundtime, sq->last_rtt, (uint32_t)now.tv_sec))
15701574 log_err("out of memory noting rtt.");
15711575 }
15721576 }
16571661 }
16581662 sq->retry++;
16591663 if(!(rto=infra_rtt_update(outnet->infra, &sq->addr, sq->addrlen,
1660 sq->zone, sq->zonelen, -1, sq->last_rtt,
1664 sq->zone, sq->zonelen, sq->qtype, -1, sq->last_rtt,
16611665 (uint32_t)now.tv_sec)))
16621666 log_err("out of memory in UDP exponential backoff");
16631667 if(sq->retry < OUTBOUND_UDP_RETRY) {
17511755 * above this value gives trouble with server selection */
17521756 if(roundtime < 60000) {
17531757 if(!infra_rtt_update(outnet->infra, &sq->addr, sq->addrlen,
1754 sq->zone, sq->zonelen, roundtime, sq->last_rtt,
1755 (uint32_t)now.tv_sec))
1758 sq->zone, sq->zonelen, sq->qtype, roundtime,
1759 sq->last_rtt, (uint32_t)now.tv_sec))
17561760 log_err("out of memory noting rtt.");
17571761 }
17581762 }
18131817 /* make new serviced query entry */
18141818 sq = serviced_create(outnet, buff, dnssec, want_dnssec,
18151819 tcp_upstream, ssl_upstream, addr, addrlen, zone,
1816 zonelen);
1820 zonelen, (int)qtype);
18171821 if(!sq) {
18181822 free(cb);
18191823 return NULL;
311311 uint8_t* zone;
312312 /** length of zone name */
313313 size_t zonelen;
314 /** qtype */
315 int qtype;
314316 /** current status */
315317 enum serviced_query_status {
316318 /** initial status */
4949 #include "util/regional.h"
5050 #include "iterator/iterator.h"
5151 #include "iterator/iter_fwd.h"
52 #include "iterator/iter_hints.h"
5253 #include "validator/validator.h"
5354 #include "services/localzone.h"
5455 #ifdef HAVE_GETOPT_H
433434 forwards_delete(fwd);
434435 }
435436
437 /** check hints */
438 static void
439 check_hints(struct config_file* cfg)
440 {
441 struct iter_hints* hints = hints_create();
442 if(!hints || !hints_apply_cfg(hints, cfg)) {
443 fatal_exit("Could not set root or stub hints");
444 }
445 hints_delete(hints);
446 }
447
436448 /** check config file */
437449 static void
438450 checkconf(const char* cfgfile, const char* opt)
453465 check_mod(cfg, pythonmod_get_funcblock());
454466 #endif
455467 check_fwd(cfg);
468 check_hints(cfg);
456469 if(opt) print_option(cfg, opt);
457470 else printf("unbound-checkconf: no errors in %s\n", cfgfile);
458471 config_delete(cfg);
469482 int c;
470483 const char* f;
471484 const char* opt = NULL;
485 const char* cfgfile = CONFIGFILE;
472486 log_ident_set("unbound-checkconf");
473487 log_init(NULL, 0, NULL);
474488 checklock_start();
489 #ifdef USE_WINSOCK
490 /* use registry config file in preference to compiletime location */
491 if(!(cfgfile=w_lookup_reg_str("Software\\Unbound", "ConfigFile")))
492 cfgfile = CONFIGFILE;
493 #endif /* USE_WINSOCK */
475494 /* parse the options */
476495 while( (c=getopt(argc, argv, "ho:")) != -1) {
477496 switch(c) {
490509 usage();
491510 if(argc == 1)
492511 f = argv[0];
493 else f = CONFIGFILE;
512 else f = cfgfile;
494513 checkconf(f, opt);
495514 checklock_stop();
496515 return 0;
103103 printf(" list_forwards list forward-zones in use\n");
104104 printf(" list_local_zones list local-zones in use\n");
105105 printf(" list_local_data list local-data RRs in use\n");
106 printf(" forward_add [+i] zone addr.. add forward-zone with servers\n");
107 printf(" forward_remove [+i] zone remove forward zone\n");
108 printf(" stub_add [+ip] zone addr.. add stub-zone with servers\n");
109 printf(" stub_remove [+i] zone remove stub zone\n");
110 printf(" +i also do dnssec insecure point\n");
111 printf(" +p set stub to use priming\n");
106112 printf(" forward [off | addr ...] without arg show forward setup\n");
107113 printf(" or off to turn off root forwarding\n");
108114 printf(" or give list of ip addresses\n");
359365 #ifdef USE_WINSOCK
360366 if((r = WSAStartup(MAKEWORD(2,2), &wsa_data)) != 0)
361367 fatal_exit("WSAStartup failed: %s", wsa_strerror(r));
368 /* use registry config file in preference to compiletime location */
369 if(!(cfgfile=w_lookup_reg_str("Software\\Unbound", "ConfigFile")))
370 cfgfile = CONFIGFILE;
362371 #endif
363372
364373 ERR_load_crypto_strings();
194194 log_assert(0);
195195 }
196196
197 void worker_start_accept(void* ATTR_UNUSED(arg))
198 {
199 log_assert(0);
200 }
201
202 void worker_stop_accept(void* ATTR_UNUSED(arg))
203 {
204 log_assert(0);
205 }
206
197207 /** keep track of lock id in lock-verify application */
198208 struct order_id {
199209 /** the thread id that created it */
6161 #include "util/fptr_wlist.h"
6262 #include <signal.h>
6363 struct worker;
64 struct daemon_remote;
6465
6566 /** Global variable: the scenario. Saved here for when event_init is done. */
6667 static struct replay_scenario* saved_scenario = NULL;
146147 {
147148 if(!pend)
148149 return;
150 free(pend->zone);
149151 ldns_buffer_free(pend->buffer);
150152 ldns_pkt_free(pend->pkt);
151153 free(pend);
553555 if(!dp) fatal_exit("cannot parse %s", now->variable);
554556 rto = infra_rtt_update(runtime->infra, &now->addr,
555557 now->addrlen, ldns_rdf_data(dp), ldns_rdf_size(dp),
556 atoi(now->string), -1, runtime->now_secs);
558 LDNS_RR_TYPE_A, atoi(now->string), -1, runtime->now_secs);
557559 log_addr(0, "INFRA_RTT for", &now->addr, now->addrlen);
558560 log_info("INFRA_RTT(%s roundtrip %d): rto of %d", now->variable,
559561 atoi(now->string), rto);
560562 if(rto == 0) fatal_exit("infra_rtt_update failed");
561563 ldns_rdf_deep_free(dp);
564 }
565
566 /** perform exponential backoff on the timout */
567 static void
568 expon_timeout_backoff(struct replay_runtime* runtime)
569 {
570 struct fake_pending* p = runtime->pending_list;
571 int rtt, vs;
572 uint8_t edns_lame_known;
573 int last_rtt, rto;
574 if(!p) return; /* no pending packet to backoff */
575 if(!infra_host(runtime->infra, &p->addr, p->addrlen, p->zone,
576 p->zonelen, runtime->now_secs, &vs, &edns_lame_known, &rtt))
577 return;
578 last_rtt = rtt;
579 rto = infra_rtt_update(runtime->infra, &p->addr, p->addrlen, p->zone,
580 p->zonelen, p->qtype, -1, last_rtt, runtime->now_secs);
581 log_info("infra_rtt_update returned rto %d", rto);
562582 }
563583
564584 /**
607627 case repevt_timeout:
608628 mom = runtime->now;
609629 advance_moment(runtime);
630 expon_timeout_backoff(runtime);
610631 fake_pending_callback(runtime, mom, NETEVENT_TIMEOUT);
611632 break;
612633 case repevt_back_reply:
928949 pend->timeout = timeout/1000;
929950 pend->transport = transport_udp;
930951 pend->pkt = NULL;
952 pend->zone = NULL;
931953 pend->serviced = 0;
932954 pend->runtime = runtime;
933955 status = ldns_buffer2pkt_wire(&pend->pkt, packet);
9811003 pend->timeout = timeout;
9821004 pend->transport = transport_tcp;
9831005 pend->pkt = NULL;
1006 pend->zone = NULL;
9841007 pend->runtime = runtime;
9851008 pend->serviced = 0;
9861009 status = ldns_buffer2pkt_wire(&pend->pkt, packet);
10161039 uint16_t flags, int dnssec, int ATTR_UNUSED(want_dnssec),
10171040 int ATTR_UNUSED(tcp_upstream), int ATTR_UNUSED(ssl_upstream),
10181041 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone,
1019 size_t ATTR_UNUSED(zonelen), comm_point_callback_t* callback,
1020 void* callback_arg, ldns_buffer* ATTR_UNUSED(buff),
1021 int (*arg_compare)(void*,void*))
1042 size_t zonelen, comm_point_callback_t* callback, void* callback_arg,
1043 ldns_buffer* ATTR_UNUSED(buff), int (*arg_compare)(void*,void*))
10221044 {
10231045 struct replay_runtime* runtime = (struct replay_runtime*)outnet->base;
10241046 struct fake_pending* pend = (struct fake_pending*)calloc(1,
10611083 }
10621084 memcpy(&pend->addr, addr, addrlen);
10631085 pend->addrlen = addrlen;
1086 pend->zone = memdup(zone, zonelen);
1087 pend->zonelen = zonelen;
1088 pend->qtype = (int)qtype;
1089 log_assert(pend->zone);
10641090 pend->callback = callback;
10651091 pend->cb_arg = callback_arg;
10661092 pend->timeout = UDP_AUTH_QUERY_TIMEOUT;
11111137 else runtime->pending_list = p->next;
11121138 ldns_buffer_free(p->buffer);
11131139 ldns_pkt_free(p->pkt);
1140 free(p->zone);
11141141 free(p);
11151142 return;
11161143 }
12541281 }
12551282
12561283 void comm_point_raw_handle_callback(int ATTR_UNUSED(fd),
1284 short ATTR_UNUSED(event), void* ATTR_UNUSED(arg))
1285 {
1286 log_assert(0);
1287 }
1288
1289 void comm_base_handle_slow_accept(int ATTR_UNUSED(fd),
12571290 short ATTR_UNUSED(event), void* ATTR_UNUSED(arg))
12581291 {
12591292 log_assert(0);
13411374 free(timer);
13421375 }
13431376
1377 void comm_base_set_slow_accept_handlers(struct comm_base* ATTR_UNUSED(b),
1378 void (*stop_acc)(void*), void (*start_acc)(void*),
1379 void* ATTR_UNUSED(arg))
1380 {
1381 /* ignore this */
1382 (void)stop_acc;
1383 (void)start_acc;
1384 }
1385
13441386 struct event_base* comm_base_internal(struct comm_base* ATTR_UNUSED(b))
13451387 {
13461388 /* no pipe comm possible in testbound */
13511393 {
13521394 }
13531395
1396 void listen_start_accept(struct listen_dnsport* ATTR_UNUSED(listen))
1397 {
1398 }
1399
1400 void listen_stop_accept(struct listen_dnsport* ATTR_UNUSED(listen))
1401 {
1402 }
1403
1404 void daemon_remote_start_accept(struct daemon_remote* ATTR_UNUSED(rc))
1405 {
1406 }
1407
1408 void daemon_remote_stop_accept(struct daemon_remote* ATTR_UNUSED(rc))
1409 {
1410 }
1411
13541412 /*********** End of Dummy routines ***********/
322322 struct sockaddr_storage addr;
323323 /** len of addr */
324324 socklen_t addrlen;
325 /** zone name, uncompressed wire format (as used when sent) */
326 uint8_t* zone;
327 /** length of zone name */
328 size_t zonelen;
329 /** qtype */
330 int qtype;
325331 /** The callback function to call when answer arrives (or timeout) */
326332 comm_point_callback_t* callback;
327333 /** callback user argument */
6969 printf("-p file playback text file\n");
7070 printf("-2 detect SHA256 support (exit code 0 or 1)\n");
7171 printf("-g detect GOST support (exit code 0 or 1)\n");
72 printf("-e detect ECDSA support (exit code 0 or 1)\n");
7273 printf("-s testbound self-test - unit test of testbound parts.\n");
7374 printf("-o str unbound commandline options separated by spaces.\n");
7475 printf("Version %s\n", PACKAGE_VERSION);
271272 pass_argc = 1;
272273 pass_argv[0] = "unbound";
273274 add_opts("-d", &pass_argc, pass_argv);
274 while( (c=getopt(argc, argv, "2gho:p:s")) != -1) {
275 while( (c=getopt(argc, argv, "2egho:p:s")) != -1) {
275276 switch(c) {
276277 case 's':
277278 free(pass_argv[1]);
284285 exit(0);
285286 #else
286287 printf("SHA256 not supported\n");
288 exit(1);
289 #endif
290 break;
291 case 'e':
292 #if defined(USE_ECDSA)
293 printf("ECDSA supported\n");
294 exit(0);
295 #else
296 printf("ECDSA not supported\n");
287297 exit(1);
288298 #endif
289299 break;
444444 &vs, &edns_lame, &to) );
445445 unit_assert( vs == 0 && to == init && edns_lame == 0 );
446446
447 unit_assert( infra_rtt_update(slab, &one, onelen, zone, zonelen, -1, init, now) );
447 unit_assert( infra_rtt_update(slab, &one, onelen, zone, zonelen, LDNS_RR_TYPE_A, -1, init, now) );
448448 unit_assert( infra_host(slab, &one, onelen, zone, zonelen,
449449 now, &vs, &edns_lame, &to) );
450450 unit_assert( vs == 0 && to == init*2 && edns_lame == 0 );
519519 verifytest_file("testdata/test_sigs.gost", "20090807060504");
520520 else printf("Warning: skipped GOST, openssl does not provide gost.\n");
521521 #endif
522 #ifdef USE_ECDSA
523 verifytest_file("testdata/test_sigs.ecdsa_p256", "20100908100439");
524 verifytest_file("testdata/test_sigs.ecdsa_p384", "20100908100439");
525 dstest_file("testdata/test_ds.sha384");
526 #endif
522527 dstest_file("testdata/test_ds.sha1");
523528 nsectest();
524529 nsec3_hash_test("testdata/test_nsec3_hash.1");
Binary diff not shown
0 ; config options
1 server:
2 target-fetch-policy: "0 0 0 0 0"
3
4 stub-zone:
5 name: "."
6 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
7 CONFIG_END
8
9 SCENARIO_BEGIN Test locate of NS records for parent nameservers of DS
10
11 ; K.ROOT-SERVERS.NET.
12 RANGE_BEGIN 0 100
13 ADDRESS 193.0.14.129
14 ENTRY_BEGIN
15 MATCH opcode qtype qname
16 ADJUST copy_id
17 REPLY QR AA NOERROR
18 SECTION QUESTION
19 . IN NS
20 SECTION ANSWER
21 . IN NS K.ROOT-SERVERS.NET.
22 SECTION ADDITIONAL
23 K.ROOT-SERVERS.NET. IN A 193.0.14.129
24 ENTRY_END
25
26 ; content of root-servers.net
27 ENTRY_BEGIN
28 MATCH opcode qtype qname
29 ADJUST copy_id
30 REPLY QR AA NOERROR
31 SECTION QUESTION
32 root-servers.net. IN NS
33 SECTION ANSWER
34 root-servers.net. IN NS K.ROOT-SERVERS.NET.
35 SECTION ADDITIONAL
36 K.ROOT-SERVERS.NET. IN A 193.0.14.129
37 ENTRY_END
38
39 ENTRY_BEGIN
40 MATCH opcode qtype qname
41 ADJUST copy_id
42 REPLY QR AA NOERROR
43 SECTION QUESTION
44 k.root-servers.net. IN A
45 SECTION ANSWER
46 K.ROOT-SERVERS.NET. IN A 193.0.14.129
47 SECTION AUTHORITY
48 root-servers.net. IN NS K.ROOT-SERVERS.NET.
49 ENTRY_END
50
51 ENTRY_BEGIN
52 MATCH opcode qtype qname
53 ADJUST copy_id
54 REPLY QR AA NOERROR
55 SECTION QUESTION
56 k.root-servers.net. IN AAAA
57 SECTION ANSWER
58 SECTION AUTHORITY
59 root-servers.net. IN SOA K.ROOT-SERVERS.NET. hostmaster. 1 2 3 4 5
60 ENTRY_END
61
62 ENTRY_BEGIN
63 MATCH opcode qtype qname
64 ADJUST copy_id
65 REPLY QR AA NOERROR
66 SECTION QUESTION
67 root-servers.net. IN DS
68 SECTION ANSWER
69 SECTION AUTHORITY
70 root-servers.net. IN SOA K.ROOT-SERVERS.NET. hostmaster. 1 2 3 4 5
71 ENTRY_END
72
73 ENTRY_BEGIN
74 MATCH opcode subdomain
75 ADJUST copy_id copy_query
76 REPLY QR NOERROR
77 SECTION QUESTION
78 net. IN A
79 SECTION AUTHORITY
80 net. IN NS a.gtld-servers.net.
81 SECTION ADDITIONAL
82 a.gtld-servers.net. IN A 192.5.6.30
83 ENTRY_END
84 RANGE_END
85
86 ; a.gtld-servers.net.
87 RANGE_BEGIN 0 100
88 ADDRESS 192.5.6.30
89 ENTRY_BEGIN
90 MATCH opcode qtype qname
91 ADJUST copy_id
92 REPLY QR AA NOERROR
93 SECTION QUESTION
94 net. IN NS
95 SECTION ANSWER
96 net. IN NS a.gtld-servers.net.
97 SECTION ADDITIONAL
98 a.gtld-servers.net. IN A 192.5.6.30
99 ENTRY_END
100
101 ENTRY_BEGIN
102 MATCH opcode qtype qname
103 ADJUST copy_id
104 REPLY QR AA NOERROR
105 SECTION QUESTION
106 root-servers.net. IN DS
107 SECTION AUTHORITY
108 net. IN SOA a.gtld-servers.net. hostmaster. 2 3 4 5 6
109 ENTRY_END
110
111 ENTRY_BEGIN
112 MATCH opcode subdomain
113 ADJUST copy_id copy_query
114 REPLY QR NOERROR
115 SECTION QUESTION
116 root-servers.net. IN A
117 SECTION AUTHORITY
118 root-servers.net. IN NS K.ROOT-SERVERS.NET.
119 SECTION ADDITIONAL
120 K.ROOT-SERVERS.NET. IN A 193.0.14.129
121 ENTRY_END
122 RANGE_END
123
124 STEP 1 QUERY
125 ENTRY_BEGIN
126 REPLY RD
127 SECTION QUESTION
128 root-servers.net. IN DS
129 ENTRY_END
130
131 ; recursion happens here.
132 STEP 10 CHECK_ANSWER
133 ENTRY_BEGIN
134 MATCH all
135 REPLY QR RD RA NOERROR
136 SECTION QUESTION
137 root-servers.net. IN DS
138 SECTION ANSWER
139 SECTION AUTHORITY
140 net. IN SOA a.gtld-servers.net. hostmaster. 2 3 4 5 6
141 SECTION ADDITIONAL
142 ENTRY_END
143
144 SCENARIO_END
0 ; config options
1 server:
2 target-fetch-policy: "0 0 0 0 0"
3
4 stub-zone:
5 name: "."
6 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
7 CONFIG_END
8
9 SCENARIO_BEGIN Test locate of NS records for DS with CNAME
10
11 ; K.ROOT-SERVERS.NET.
12 RANGE_BEGIN 0 100
13 ADDRESS 193.0.14.129
14 ENTRY_BEGIN
15 MATCH opcode qtype qname
16 ADJUST copy_id
17 REPLY QR AA NOERROR
18 SECTION QUESTION
19 . IN NS
20 SECTION ANSWER
21 . IN NS K.ROOT-SERVERS.NET.
22 SECTION ADDITIONAL
23 K.ROOT-SERVERS.NET. IN A 193.0.14.129
24 ENTRY_END
25
26 ; content of root-servers.net
27 ENTRY_BEGIN
28 MATCH opcode qtype qname
29 ADJUST copy_id
30 REPLY QR AA NOERROR
31 SECTION QUESTION
32 root-servers.net. IN NS
33 SECTION ANSWER
34 root-servers.net. IN NS K.ROOT-SERVERS.NET.
35 SECTION ADDITIONAL
36 K.ROOT-SERVERS.NET. IN A 193.0.14.129
37 ENTRY_END
38
39 ENTRY_BEGIN
40 MATCH opcode qtype qname
41 ADJUST copy_id
42 REPLY QR AA NOERROR
43 SECTION QUESTION
44 k.root-servers.net. IN A
45 SECTION ANSWER
46 K.ROOT-SERVERS.NET. IN A 193.0.14.129
47 SECTION AUTHORITY
48 root-servers.net. IN NS K.ROOT-SERVERS.NET.
49 ENTRY_END
50
51 ENTRY_BEGIN
52 MATCH opcode qtype qname
53 ADJUST copy_id
54 REPLY QR AA NOERROR
55 SECTION QUESTION
56 k.root-servers.net. IN AAAA
57 SECTION ANSWER
58 SECTION AUTHORITY
59 root-servers.net. IN SOA K.ROOT-SERVERS.NET. hostmaster. 1 2 3 4 5
60 ENTRY_END
61
62 ENTRY_BEGIN
63 MATCH opcode qtype qname
64 ADJUST copy_id
65 REPLY QR AA NOERROR
66 SECTION QUESTION
67 root-servers.net. IN DS
68 SECTION ANSWER
69 root-servers.net. IN CNAME blabla.com.
70 ENTRY_END
71
72 ENTRY_BEGIN
73 MATCH opcode subdomain
74 ADJUST copy_id copy_query
75 REPLY QR NOERROR
76 SECTION QUESTION
77 net. IN A
78 SECTION AUTHORITY
79 net. IN NS a.gtld-servers.net.
80 SECTION ADDITIONAL
81 a.gtld-servers.net. IN A 192.5.6.30
82 ENTRY_END
83
84 ENTRY_BEGIN
85 MATCH opcode qtype qname
86 ADJUST copy_id
87 REPLY QR AA NXDOMAIN
88 SECTION QUESTION
89 blabla.com. IN DS
90 SECTION ANSWER
91 SECTION AUTHORITY
92 . IN SOA K.ROOT-SERVERS.NET. hostmaster. 1 2 3 4 5
93 ENTRY_END
94 RANGE_END
95
96 ; a.gtld-servers.net.
97 RANGE_BEGIN 0 100
98 ADDRESS 192.5.6.30
99 ENTRY_BEGIN
100 MATCH opcode qtype qname
101 ADJUST copy_id
102 REPLY QR AA NOERROR
103 SECTION QUESTION
104 net. IN NS
105 SECTION ANSWER
106 net. IN NS a.gtld-servers.net.
107 SECTION ADDITIONAL
108 a.gtld-servers.net. IN A 192.5.6.30
109 ENTRY_END
110
111 ENTRY_BEGIN
112 MATCH opcode qtype qname
113 ADJUST copy_id
114 REPLY QR AA NOERROR
115 SECTION QUESTION
116 root-servers.net. IN DS
117 SECTION AUTHORITY
118 net. IN SOA a.gtld-servers.net. hostmaster. 2 3 4 5 6
119 ENTRY_END
120
121 ENTRY_BEGIN
122 MATCH opcode subdomain
123 ADJUST copy_id copy_query
124 REPLY QR NOERROR
125 SECTION QUESTION
126 root-servers.net. IN A
127 SECTION AUTHORITY
128 root-servers.net. IN NS K.ROOT-SERVERS.NET.
129 SECTION ADDITIONAL
130 K.ROOT-SERVERS.NET. IN A 193.0.14.129
131 ENTRY_END
132 RANGE_END
133
134 STEP 1 QUERY
135 ENTRY_BEGIN
136 REPLY RD
137 SECTION QUESTION
138 root-servers.net. IN DS
139 ENTRY_END
140
141 ; recursion happens here.
142 STEP 10 CHECK_ANSWER
143 ENTRY_BEGIN
144 MATCH all
145 REPLY QR RD RA NOERROR
146 SECTION QUESTION
147 root-servers.net. IN DS
148 SECTION ANSWER
149 SECTION AUTHORITY
150 net. IN SOA a.gtld-servers.net. hostmaster. 2 3 4 5 6
151 SECTION ADDITIONAL
152 ENTRY_END
153
154 SCENARIO_END
0 ; config options
1 server:
2 target-fetch-policy: "0 0 0 0 0"
3
4 stub-zone:
5 name: "."
6 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
7 CONFIG_END
8
9 SCENARIO_BEGIN Test locate of NS records for DS without a SOA record
10
11 ; K.ROOT-SERVERS.NET.
12 RANGE_BEGIN 0 100
13 ADDRESS 193.0.14.129
14 ENTRY_BEGIN
15 MATCH opcode qtype qname
16 ADJUST copy_id
17 REPLY QR AA NOERROR
18 SECTION QUESTION
19 . IN NS
20 SECTION ANSWER
21 . IN NS K.ROOT-SERVERS.NET.
22 SECTION ADDITIONAL
23 K.ROOT-SERVERS.NET. IN A 193.0.14.129
24 ENTRY_END
25
26 ; content of root-servers.net
27 ENTRY_BEGIN
28 MATCH opcode qtype qname
29 ADJUST copy_id
30 REPLY QR AA NOERROR
31 SECTION QUESTION
32 root-servers.net. IN NS
33 SECTION ANSWER
34 root-servers.net. IN NS K.ROOT-SERVERS.NET.
35 SECTION ADDITIONAL
36 K.ROOT-SERVERS.NET. IN A 193.0.14.129
37 ENTRY_END
38
39 ENTRY_BEGIN
40 MATCH opcode qtype qname
41 ADJUST copy_id
42 REPLY QR AA NOERROR
43 SECTION QUESTION
44 k.root-servers.net. IN A
45 SECTION ANSWER
46 K.ROOT-SERVERS.NET. IN A 193.0.14.129
47 SECTION AUTHORITY
48 root-servers.net. IN NS K.ROOT-SERVERS.NET.
49 ENTRY_END
50
51 ENTRY_BEGIN
52 MATCH opcode qtype qname
53 ADJUST copy_id
54 REPLY QR AA NOERROR
55 SECTION QUESTION
56 k.root-servers.net. IN AAAA
57 SECTION ANSWER
58 SECTION AUTHORITY
59 root-servers.net. IN SOA K.ROOT-SERVERS.NET. hostmaster. 1 2 3 4 5
60 ENTRY_END
61
62 ENTRY_BEGIN
63 MATCH opcode qtype qname
64 ADJUST copy_id
65 REPLY QR AA NOERROR
66 SECTION QUESTION
67 root-servers.net. IN DS
68 SECTION ANSWER
69 SECTION AUTHORITY
70 ;root-servers.net. IN SOA K.ROOT-SERVERS.NET. hostmaster. 1 2 3 4 5
71 ENTRY_END
72
73 ENTRY_BEGIN
74 MATCH opcode subdomain
75 ADJUST copy_id copy_query
76 REPLY QR NOERROR
77 SECTION QUESTION
78 net. IN A
79 SECTION AUTHORITY
80 net. IN NS a.gtld-servers.net.
81 SECTION ADDITIONAL
82 a.gtld-servers.net. IN A 192.5.6.30
83 ENTRY_END
84 RANGE_END
85
86 ; a.gtld-servers.net.
87 RANGE_BEGIN 0 100
88 ADDRESS 192.5.6.30
89 ENTRY_BEGIN
90 MATCH opcode qtype qname
91 ADJUST copy_id
92 REPLY QR AA NOERROR
93 SECTION QUESTION
94 net. IN NS
95 SECTION ANSWER
96 net. IN NS a.gtld-servers.net.
97 SECTION ADDITIONAL
98 a.gtld-servers.net. IN A 192.5.6.30
99 ENTRY_END
100
101 ENTRY_BEGIN
102 MATCH opcode qtype qname
103 ADJUST copy_id
104 REPLY QR AA NOERROR
105 SECTION QUESTION
106 root-servers.net. IN DS
107 SECTION AUTHORITY
108 net. IN SOA a.gtld-servers.net. hostmaster. 2 3 4 5 6
109 ENTRY_END
110
111 ENTRY_BEGIN
112 MATCH opcode subdomain
113 ADJUST copy_id copy_query
114 REPLY QR NOERROR
115 SECTION QUESTION
116 root-servers.net. IN A
117 SECTION AUTHORITY
118 root-servers.net. IN NS K.ROOT-SERVERS.NET.
119 SECTION ADDITIONAL
120 K.ROOT-SERVERS.NET. IN A 193.0.14.129
121 ENTRY_END
122 RANGE_END
123
124 STEP 1 QUERY
125 ENTRY_BEGIN
126 REPLY RD
127 SECTION QUESTION
128 root-servers.net. IN DS
129 ENTRY_END
130
131 ; recursion happens here.
132 STEP 10 CHECK_ANSWER
133 ENTRY_BEGIN
134 MATCH all
135 REPLY QR RD RA NOERROR
136 SECTION QUESTION
137 root-servers.net. IN DS
138 SECTION ANSWER
139 SECTION AUTHORITY
140 net. IN SOA a.gtld-servers.net. hostmaster. 2 3 4 5 6
141 SECTION ADDITIONAL
142 ENTRY_END
143
144 SCENARIO_END
0 ; config options
1 server:
2 target-fetch-policy: "0 0 0 0 0"
3
4 stub-zone:
5 name: "."
6 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
7
8 forward-zone:
9 name: "example.com"
10 forward-addr: 1.2.3.6 # failing resolver
11 forward-first: yes
12
13 CONFIG_END
14
15 SCENARIO_BEGIN Test forward-first directive
16
17 ; K.ROOT-SERVERS.NET.
18 RANGE_BEGIN 0 100
19 ADDRESS 193.0.14.129
20 ENTRY_BEGIN
21 MATCH opcode qtype qname
22 ADJUST copy_id
23 REPLY QR NOERROR
24 SECTION QUESTION
25 . IN NS
26 SECTION ANSWER
27 . IN NS K.ROOT-SERVERS.NET.
28 SECTION ADDITIONAL
29 K.ROOT-SERVERS.NET. IN A 193.0.14.129
30 ENTRY_END
31
32 ENTRY_BEGIN
33 MATCH opcode subdomain
34 ADJUST copy_id copy_query
35 REPLY QR NOERROR
36 SECTION QUESTION
37 com. IN A
38 SECTION AUTHORITY
39 com. IN NS a.gtld-servers.net.
40 SECTION ADDITIONAL
41 a.gtld-servers.net. IN A 192.5.6.30
42 ENTRY_END
43 RANGE_END
44
45 ; a.gtld-servers.net.
46 RANGE_BEGIN 0 100
47 ADDRESS 192.5.6.30
48 ENTRY_BEGIN
49 MATCH opcode qtype qname
50 ADJUST copy_id
51 REPLY QR NOERROR
52 SECTION QUESTION
53 com. IN NS
54 SECTION ANSWER
55 com. IN NS a.gtld-servers.net.
56 SECTION ADDITIONAL
57 a.gtld-servers.net. IN A 192.5.6.30
58 ENTRY_END
59
60 ENTRY_BEGIN
61 MATCH opcode subdomain
62 ADJUST copy_id copy_query
63 REPLY QR NOERROR
64 SECTION QUESTION
65 example.com. IN A
66 SECTION AUTHORITY
67 example.com. IN NS ns.example.com.
68 SECTION ADDITIONAL
69 ns.example.com. IN A 1.2.3.4
70 ENTRY_END
71 RANGE_END
72
73 ; ns.example.com.
74 RANGE_BEGIN 0 100
75 ADDRESS 1.2.3.4
76 ENTRY_BEGIN
77 MATCH opcode qtype qname
78 ADJUST copy_id
79 REPLY QR NOERROR
80 SECTION QUESTION
81 example.com. IN NS
82 SECTION ANSWER
83 example.com. IN NS ns.example.com.
84 SECTION ADDITIONAL
85 ns.example.com. IN A 1.2.3.4
86 ENTRY_END
87
88 ENTRY_BEGIN
89 MATCH opcode qtype qname
90 ADJUST copy_id
91 REPLY QR NOERROR
92 SECTION QUESTION
93 www.example.com. IN A
94 SECTION ANSWER
95 www.example.com. IN A 10.20.30.40
96 SECTION AUTHORITY
97 example.com. IN NS ns.example.com.
98 SECTION ADDITIONAL
99 ns.example.com. IN A 1.2.3.4
100 ENTRY_END
101 RANGE_END
102
103 ; local resolver (that fails a lot)
104 RANGE_BEGIN 0 100
105 ADDRESS 1.2.3.6
106
107 ENTRY_BEGIN
108 MATCH opcode qtype qname
109 ADJUST copy_id
110 REPLY QR RA SERVFAIL
111 SECTION QUESTION
112 example.com. IN NS
113 SECTION ANSWER
114 ;example.com. IN NS ns.example.com.
115 SECTION ADDITIONAL
116 ;ns.example.com. IN A 1.2.3.4
117 ENTRY_END
118
119 ENTRY_BEGIN
120 MATCH opcode qtype qname
121 ADJUST copy_id
122 REPLY QR RA SERVFAIL
123 SECTION QUESTION
124 www.example.com. IN A
125 SECTION ANSWER
126 ;www.example.com. IN A 10.20.30.50
127 SECTION AUTHORITY
128 ;example.com. IN NS ns.example.com.
129 SECTION ADDITIONAL
130 ;ns.example.com. IN A 1.2.3.4
131 ENTRY_END
132 RANGE_END
133
134 STEP 1 QUERY
135 ENTRY_BEGIN
136 REPLY RD
137 SECTION QUESTION
138 www.example.com. IN A
139 ENTRY_END
140
141 ; recursion happens here.
142 STEP 10 CHECK_ANSWER
143 ENTRY_BEGIN
144 MATCH all
145 REPLY QR RD RA NOERROR
146 SECTION QUESTION
147 www.example.com. IN A
148 SECTION ANSWER
149 www.example.com. IN A 10.20.30.40
150 SECTION AUTHORITY
151 example.com. IN NS ns.example.com.
152 SECTION ADDITIONAL
153 ns.example.com. IN A 1.2.3.4
154 ENTRY_END
155
156 SCENARIO_END
216216 SECTION ANSWER
217217 www.example.com. 3600 IN A 10.20.30.40
218218 SECTION AUTHORITY
219 ; NS rrset picked up from parent-NS (the child-NS timed out at now+prefetch)
219220 example.com. 3600 IN NS ns.example.com.
220221 SECTION ADDITIONAL
221222 ns.example.com. 3600 IN A 1.2.3.4
0 ; config options
1 server:
2 target-fetch-policy: "0 0 0 0 0"
3 prefetch: "yes"
4
5 stub-zone:
6 name: "."
7 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
8 CONFIG_END
9
10 SCENARIO_BEGIN Test resolver prefetch and a moved domain 2.
11 ; for slightly different query pattern.
12
13 ; K.ROOT-SERVERS.NET.
14 RANGE_BEGIN 0 500
15 ADDRESS 193.0.14.129
16 ENTRY_BEGIN
17 MATCH opcode qtype qname
18 ADJUST copy_id
19 REPLY QR NOERROR
20 SECTION QUESTION
21 . IN NS
22 SECTION ANSWER
23 . IN NS K.ROOT-SERVERS.NET.
24 SECTION ADDITIONAL
25 K.ROOT-SERVERS.NET. IN A 193.0.14.129
26 ENTRY_END
27
28 ENTRY_BEGIN
29 MATCH opcode subdomain
30 ADJUST copy_id copy_query
31 REPLY QR NOERROR
32 SECTION QUESTION
33 com. IN A
34 SECTION AUTHORITY
35 com. IN NS a.gtld-servers.net.
36 SECTION ADDITIONAL
37 a.gtld-servers.net. IN A 192.5.6.30
38 ENTRY_END
39 RANGE_END
40
41 ; a.gtld-servers.net. (before sale of domain)
42 RANGE_BEGIN 0 30
43 ADDRESS 192.5.6.30
44 ENTRY_BEGIN
45 MATCH opcode qtype qname
46 ADJUST copy_id
47 REPLY QR NOERROR
48 SECTION QUESTION
49 com. IN NS
50 SECTION ANSWER
51 com. IN NS a.gtld-servers.net.
52 SECTION ADDITIONAL
53 a.gtld-servers.net. IN A 192.5.6.30
54 ENTRY_END
55
56 ENTRY_BEGIN
57 MATCH opcode subdomain
58 ADJUST copy_id copy_query
59 REPLY QR NOERROR
60 SECTION QUESTION
61 example.com. IN A
62 SECTION AUTHORITY
63 example.com. 86400 IN NS old-ns.example.com.
64 SECTION ADDITIONAL
65 old-ns.example.com. 86400 IN A 192.168.0.1
66 ENTRY_END
67 RANGE_END
68
69 ; a.gtld-servers.net. (after sale of domain)
70 RANGE_BEGIN 40 500
71 ADDRESS 192.5.6.30
72 ENTRY_BEGIN
73 MATCH opcode qtype qname
74 ADJUST copy_id
75 REPLY QR NOERROR
76 SECTION QUESTION
77 com. IN NS
78 SECTION ANSWER
79 com. IN NS a.gtld-servers.net.
80 SECTION ADDITIONAL
81 a.gtld-servers.net. IN A 192.5.6.30
82 ENTRY_END
83
84 ENTRY_BEGIN
85 MATCH opcode subdomain
86 ADJUST copy_id copy_query
87 REPLY QR NOERROR
88 SECTION QUESTION
89 example.com. IN A
90 SECTION AUTHORITY
91 example.com. 86400 IN NS new-ns.example.com.
92 SECTION ADDITIONAL
93 new-ns.example.com. 86400 IN A 172.16.0.1
94 ENTRY_END
95 RANGE_END
96
97 ; ns.example.com. first owner
98 RANGE_BEGIN 0 500
99 ADDRESS 192.168.0.1
100 ENTRY_BEGIN
101 MATCH opcode qtype qname
102 ADJUST copy_id
103 REPLY QR AA NOERROR
104 SECTION QUESTION
105 example.com. IN NS
106 SECTION ANSWER
107 example.com. 300 IN NS old-ns.example.com.
108 SECTION ADDITIONAL
109 old-ns.example.com. 300 IN A 192.168.0.1
110 ENTRY_END
111
112 ENTRY_BEGIN
113 MATCH opcode qtype qname
114 ADJUST copy_id
115 REPLY QR AA NOERROR
116 SECTION QUESTION
117 www.example.com. IN A
118 SECTION ANSWER
119 www.example.com. 300 IN A 10.1.1.1
120 SECTION AUTHORITY
121 example.com. 300 IN NS old-ns.example.com.
122 SECTION ADDITIONAL
123 old-ns.example.com. 300 IN A 192.168.0.1
124 ENTRY_END
125 RANGE_END
126
127 ; ns.example.com. new owner
128 RANGE_BEGIN 0 500
129 ADDRESS 172.16.0.1
130 ENTRY_BEGIN
131 MATCH opcode qtype qname
132 ADJUST copy_id
133 REPLY QR AA NOERROR
134 SECTION QUESTION
135 example.com. IN NS
136 SECTION ANSWER
137 example.com. 86400 IN NS new-ns.example.com.
138 SECTION ADDITIONAL
139 new-ns.example.com. 86400 IN A 172.16.0.1
140 ENTRY_END
141
142 ENTRY_BEGIN
143 MATCH opcode qtype qname
144 ADJUST copy_id
145 REPLY QR AA NOERROR
146 SECTION QUESTION
147 old-ns.example.com. IN A
148 SECTION ANSWER
149 old-ns.example.com. 86400 IN A 172.16.0.1
150 SECTION AUTHORITY
151 example.com. 86400 IN NS new-ns.example.com.
152 SECTION ADDITIONAL
153 new-ns.example.com. 86400 IN A 172.16.0.1
154 ENTRY_END
155
156 ENTRY_BEGIN
157 MATCH opcode qtype qname
158 ADJUST copy_id
159 REPLY QR AA NOERROR
160 SECTION QUESTION
161 www.example.com. IN A
162 SECTION ANSWER
163 www.example.com. 86400 IN A 10.2.2.2
164 SECTION AUTHORITY
165 example.com. 86400 IN NS new-ns.example.com.
166 SECTION ADDITIONAL
167 new-ns.example.com. 86400 IN A 172.16.0.1
168 ENTRY_END
169 RANGE_END
170
171 STEP 1 QUERY
172 ENTRY_BEGIN
173 REPLY RD
174 SECTION QUESTION
175 www.example.com. IN A
176 ENTRY_END
177 ; recursion happens here.
178 STEP 10 CHECK_ANSWER
179 ENTRY_BEGIN
180 MATCH all ttl
181 REPLY QR RD RA NOERROR
182 SECTION QUESTION
183 www.example.com. IN A
184 SECTION ANSWER
185 www.example.com. 300 IN A 10.1.1.1
186 SECTION AUTHORITY
187 example.com. 300 IN NS old-ns.example.com.
188 SECTION ADDITIONAL
189 old-ns.example.com. 300 IN A 192.168.0.1
190 ENTRY_END
191
192 ; after 40 secs still the cached answer
193 STEP 20 TIME_PASSES ELAPSE 40
194
195 STEP 30 QUERY
196 ENTRY_BEGIN
197 REPLY RD
198 SECTION QUESTION
199 www.example.com. IN A
200 ENTRY_END
201 ; recursion happens here.
202 STEP 40 CHECK_ANSWER
203 ENTRY_BEGIN
204 MATCH all ttl
205 REPLY QR RD RA NOERROR
206 SECTION QUESTION
207 www.example.com. IN A
208 SECTION ANSWER
209 www.example.com. 260 IN A 10.1.1.1
210 SECTION AUTHORITY
211 example.com. 260 IN NS old-ns.example.com.
212 SECTION ADDITIONAL
213 old-ns.example.com. 260 IN A 192.168.0.1
214 ENTRY_END
215
216 ; after 230 we are 30 seconds before expiry, prefetch happens.
217 STEP 50 TIME_PASSES ELAPSE 230
218
219 STEP 60 QUERY
220 ENTRY_BEGIN
221 REPLY RD
222 SECTION QUESTION
223 www.example.com. IN A
224 ENTRY_END
225 ; recursion happens here.
226 STEP 70 CHECK_ANSWER
227 ENTRY_BEGIN
228 MATCH all ttl
229 REPLY QR RD RA NOERROR
230 SECTION QUESTION
231 www.example.com. IN A
232 SECTION ANSWER
233 www.example.com. 30 IN A 10.1.1.1
234 SECTION AUTHORITY
235 example.com. 30 IN NS old-ns.example.com.
236 SECTION ADDITIONAL
237 old-ns.example.com. 30 IN A 192.168.0.1
238 ENTRY_END
239
240 STEP 80 TRAFFIC
241 ; let traffic flow for prefetch to happen
242
243 ; we updated from the old-ns.
244 STEP 90 QUERY
245 ENTRY_BEGIN
246 REPLY RD
247 SECTION QUESTION
248 www.example.com. IN A
249 ENTRY_END
250 ; recursion happens here.
251 STEP 100 CHECK_ANSWER
252 ENTRY_BEGIN
253 MATCH all ttl
254 REPLY QR RD RA NOERROR
255 SECTION QUESTION
256 www.example.com. IN A
257 SECTION ANSWER
258 www.example.com. 86400 IN A 10.2.2.2
259 SECTION AUTHORITY
260 example.com. 86400 IN NS new-ns.example.com.
261 SECTION ADDITIONAL
262 new-ns.example.com. 86400 IN A 172.16.0.1
263 ENTRY_END
264
265 ; the NS record times out after 31 seconds.
266 STEP 160 TIME_PASSES ELAPSE 31
267
268 ; fetch it
269 STEP 170 QUERY
270 ENTRY_BEGIN
271 REPLY RD
272 SECTION QUESTION
273 www.example.com. IN A
274 ENTRY_END
275 ; recursion happens here.
276 STEP 180 CHECK_ANSWER
277 ENTRY_BEGIN
278 MATCH all ttl
279 REPLY QR RD RA NOERROR
280 SECTION QUESTION
281 www.example.com. IN A
282 SECTION ANSWER
283 www.example.com. 86369 IN A 10.2.2.2
284 SECTION AUTHORITY
285 example.com. 86369 IN NS new-ns.example.com.
286 SECTION ADDITIONAL
287 new-ns.example.com. 86369 IN A 172.16.0.1
288 ENTRY_END
289
290 ; a reply from cache
291 STEP 190 QUERY
292 ENTRY_BEGIN
293 REPLY RD
294 SECTION QUESTION
295 www.example.com. IN A
296 ENTRY_END
297 ; recursion happens here.
298 STEP 200 CHECK_ANSWER
299 ENTRY_BEGIN
300 MATCH all ttl
301 REPLY QR RD RA NOERROR
302 SECTION QUESTION
303 www.example.com. IN A
304 SECTION ANSWER
305 www.example.com. 86369 IN A 10.2.2.2
306 SECTION AUTHORITY
307 example.com. 86369 IN NS new-ns.example.com.
308 SECTION ADDITIONAL
309 new-ns.example.com. 86369 IN A 172.16.0.1
310 ENTRY_END
311
312 SCENARIO_END
0 ; config options
1 server:
2 target-fetch-policy: "0 0 0 0 0"
3 prefetch: "yes"
4
5 stub-zone:
6 name: "."
7 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
8 CONFIG_END
9
10 SCENARIO_BEGIN Test resolver prefetch from child nameserver
11 ; child NS record has longer TTL than A record and is thus valid for prefetch.
12
13 ; K.ROOT-SERVERS.NET.
14 RANGE_BEGIN 0 100
15 ADDRESS 193.0.14.129
16 ENTRY_BEGIN
17 MATCH opcode qtype qname
18 ADJUST copy_id
19 REPLY QR NOERROR
20 SECTION QUESTION
21 . IN NS
22 SECTION ANSWER
23 . IN NS K.ROOT-SERVERS.NET.
24 SECTION ADDITIONAL
25 K.ROOT-SERVERS.NET. IN A 193.0.14.129
26 ENTRY_END
27
28 ENTRY_BEGIN
29 MATCH opcode qtype qname
30 ADJUST copy_id
31 REPLY QR NOERROR
32 SECTION QUESTION
33 www.example.com. IN A
34 SECTION AUTHORITY
35 com. IN NS a.gtld-servers.net.
36 SECTION ADDITIONAL
37 a.gtld-servers.net. IN A 192.5.6.30
38 ENTRY_END
39 RANGE_END
40
41 ; a.gtld-servers.net.
42 RANGE_BEGIN 0 100
43 ADDRESS 192.5.6.30
44 ENTRY_BEGIN
45 MATCH opcode qtype qname
46 ADJUST copy_id
47 REPLY QR NOERROR
48 SECTION QUESTION
49 com. IN NS
50 SECTION ANSWER
51 com. IN NS a.gtld-servers.net.
52 SECTION ADDITIONAL
53 a.gtld-servers.net. IN A 192.5.6.30
54 ENTRY_END
55
56 ENTRY_BEGIN
57 MATCH opcode qtype qname
58 ADJUST copy_id
59 REPLY QR NOERROR
60 SECTION QUESTION
61 www.example.com. IN A
62 SECTION AUTHORITY
63 example.com. IN NS ns.example.com.
64 SECTION ADDITIONAL
65 ns.example.com. IN A 1.2.3.4
66 ENTRY_END
67 RANGE_END
68
69 ; ns.example.com.
70 RANGE_BEGIN 0 40
71 ADDRESS 1.2.3.4
72 ENTRY_BEGIN
73 MATCH opcode qtype qname
74 ADJUST copy_id
75 REPLY QR NOERROR
76 SECTION QUESTION
77 example.com. IN NS
78 SECTION ANSWER
79 example.com. IN NS ns.example.com.
80 SECTION ADDITIONAL
81 ns.example.com. IN A 1.2.3.4
82 ENTRY_END
83
84 ENTRY_BEGIN
85 MATCH opcode qtype qname
86 ADJUST copy_id
87 REPLY QR NOERROR
88 SECTION QUESTION
89 www.example.com. IN A
90 SECTION ANSWER
91 www.example.com. 1800 IN A 10.20.30.40
92 SECTION AUTHORITY
93 example.com. 3600 IN NS ns.example.com.
94 SECTION ADDITIONAL
95 ns.example.com. 3600 IN A 1.2.3.4
96 ENTRY_END
97 RANGE_END
98
99 ; ns.example.com.
100 RANGE_BEGIN 50 100
101 ADDRESS 1.2.3.4
102 ENTRY_BEGIN
103 MATCH opcode qtype qname
104 ADJUST copy_id
105 REPLY QR NOERROR
106 SECTION QUESTION
107 example.com. IN NS
108 SECTION ANSWER
109 example.com. IN NS ns.example.com.
110 SECTION ADDITIONAL
111 ns.example.com. IN A 1.2.3.4
112 ENTRY_END
113
114 ENTRY_BEGIN
115 MATCH opcode qtype qname
116 ADJUST copy_id
117 REPLY QR NOERROR
118 SECTION QUESTION
119 www.example.com. IN A
120 SECTION ANSWER
121 www.example.com. 1800 IN A 10.20.30.40
122 SECTION AUTHORITY
123 example.com. 3600 IN NS ns.example.com.
124 SECTION ADDITIONAL
125 ns.example.com. 3600 IN A 1.2.3.4
126 ENTRY_END
127 RANGE_END
128
129 STEP 1 QUERY
130 ENTRY_BEGIN
131 REPLY RD
132 SECTION QUESTION
133 www.example.com. IN A
134 ENTRY_END
135
136 ; recursion happens here.
137 STEP 10 CHECK_ANSWER
138 ENTRY_BEGIN
139 MATCH all ttl
140 REPLY QR RD RA NOERROR
141 SECTION QUESTION
142 www.example.com. IN A
143 SECTION ANSWER
144 www.example.com. 1800 IN A 10.20.30.40
145 SECTION AUTHORITY
146 example.com. 3600 IN NS ns.example.com.
147 SECTION ADDITIONAL
148 ns.example.com. 3600 IN A 1.2.3.4
149 ENTRY_END
150
151 ; after 900 secs still the cached answer
152 STEP 20 TIME_PASSES ELAPSE 900
153
154 STEP 30 QUERY
155 ENTRY_BEGIN
156 REPLY RD
157 SECTION QUESTION
158 www.example.com. IN A
159 ENTRY_END
160 ; recursion happens here.
161 STEP 40 CHECK_ANSWER
162 ENTRY_BEGIN
163 MATCH all ttl
164 REPLY QR RD RA NOERROR
165 SECTION QUESTION
166 www.example.com. IN A
167 SECTION ANSWER
168 www.example.com. 900 IN A 10.20.30.40
169 SECTION AUTHORITY
170 example.com. 2700 IN NS ns.example.com.
171 SECTION ADDITIONAL
172 ns.example.com. 2700 IN A 1.2.3.4
173 ENTRY_END
174
175 ; after 720 we are 180 seconds before the expiry
176 ; (the authority changes behind the scenes to detect new lookup)
177 STEP 50 TIME_PASSES ELAPSE 720
178
179 STEP 60 QUERY
180 ENTRY_BEGIN
181 REPLY RD
182 SECTION QUESTION
183 www.example.com. IN A
184 ENTRY_END
185 ; recursion happens here.
186 STEP 70 CHECK_ANSWER
187 ENTRY_BEGIN
188 MATCH all ttl
189 REPLY QR RD RA NOERROR
190 SECTION QUESTION
191 www.example.com. IN A
192 SECTION ANSWER
193 www.example.com. 180 IN A 10.20.30.40
194 SECTION AUTHORITY
195 example.com. 1980 IN NS ns.example.com.
196 SECTION ADDITIONAL
197 ns.example.com. 1980 IN A 1.2.3.4
198 ENTRY_END
199 STEP 80 TRAFFIC
200 ; let traffic flow for prefetch to happen
201
202 ; above a cache reply with 10% of the original TTL
203 ; but the actual cache is changed, try to get that
204 STEP 120 QUERY
205 ENTRY_BEGIN
206 REPLY RD
207 SECTION QUESTION
208 www.example.com. IN A
209 ENTRY_END
210 ; recursion happens here.
211 STEP 130 CHECK_ANSWER
212 ENTRY_BEGIN
213 MATCH all ttl
214 REPLY QR RD RA NOERROR
215 SECTION QUESTION
216 www.example.com. IN A
217 SECTION ANSWER
218 www.example.com. 1800 IN A 10.20.30.40
219 SECTION AUTHORITY
220 ; The NS rrset (from the child-side NS) is not updated but keeps counting down
221 example.com. 1980 IN NS ns.example.com.
222 SECTION ADDITIONAL
223 ns.example.com. 1980 IN A 1.2.3.4
224 ENTRY_END
225
226 SCENARIO_END
1010 SCENARIO_BEGIN Test resolver prefetch of NS record for moved domain
1111
1212 ; K.ROOT-SERVERS.NET.
13 RANGE_BEGIN 0 100
13 RANGE_BEGIN 0 200
1414 ADDRESS 193.0.14.129
1515 ENTRY_BEGIN
1616 MATCH opcode qtype qname
2525 ENTRY_END
2626
2727 ENTRY_BEGIN
28 MATCH opcode qtype qname
29 ADJUST copy_id
30 REPLY QR NOERROR
31 SECTION QUESTION
32 www.example.com. IN A
28 MATCH opcode subdomain
29 ADJUST copy_id copy_query
30 REPLY QR NOERROR
31 SECTION QUESTION
32 example.com. IN A
3333 SECTION AUTHORITY
3434 com. IN NS a.gtld-servers.net.
3535 SECTION ADDITIONAL
264264 STEP 80 TRAFFIC
265265 ; let traffic flow for prefetch to happen
266266
267 ; after 360 + 2000 we are after the change to new owner.
267 ; check result of that prefetch
268 STEP 90 QUERY
269 ENTRY_BEGIN
270 REPLY RD
271 SECTION QUESTION
272 example.com. IN NS
273 ENTRY_END
274 ; recursion happens here.
275
276 ; because the prefetch+current makes old-NS expired, new delegation is picked up
277 STEP 91 CHECK_ANSWER
278 ENTRY_BEGIN
279 MATCH all ttl
280 REPLY QR RD RA NOERROR
281 SECTION QUESTION
282 example.com. IN NS
283 SECTION ANSWER
284 example.com. 3600 IN NS ns.example.com.
285 SECTION AUTHORITY
286 SECTION ADDITIONAL
287 ns.example.com. 3600 IN A 8.8.8.8
288 ENTRY_END
289
268290 STEP 100 TIME_PASSES ELAPSE 2360
269291
270 ; the NS record should have timed out.
271292 STEP 120 QUERY
272293 ENTRY_BEGIN
273294 REPLY RD
286307 SECTION AUTHORITY
287308 example.com. 1240 IN NS ns.example.com.
288309 SECTION ADDITIONAL
289 ns.example.com. 820 IN A 8.8.8.8
310 ns.example.com. 1240 IN A 8.8.8.8
290311 ENTRY_END
291312
292313 SCENARIO_END
0 ; config options
1 server:
2 target-fetch-policy: "0 0 0 0 0"
3
4 stub-zone:
5 name: "."
6 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
7
8 stub-zone:
9 name: "example.com"
10 stub-addr: 1.2.3.6 # failing server
11 stub-first: yes
12
13 CONFIG_END
14
15 SCENARIO_BEGIN Test stub-first directive
16
17 ; K.ROOT-SERVERS.NET.
18 RANGE_BEGIN 0 100
19 ADDRESS 193.0.14.129
20 ENTRY_BEGIN
21 MATCH opcode qtype qname
22 ADJUST copy_id
23 REPLY QR NOERROR
24 SECTION QUESTION
25 . IN NS
26 SECTION ANSWER
27 . IN NS K.ROOT-SERVERS.NET.
28 SECTION ADDITIONAL
29 K.ROOT-SERVERS.NET. IN A 193.0.14.129
30 ENTRY_END
31
32 ENTRY_BEGIN
33 MATCH opcode subdomain
34 ADJUST copy_id copy_query
35 REPLY QR NOERROR
36 SECTION QUESTION
37 com. IN A
38 SECTION AUTHORITY
39 com. IN NS a.gtld-servers.net.
40 SECTION ADDITIONAL
41 a.gtld-servers.net. IN A 192.5.6.30
42 ENTRY_END
43 RANGE_END
44
45 ; a.gtld-servers.net.
46 RANGE_BEGIN 0 100
47 ADDRESS 192.5.6.30
48 ENTRY_BEGIN
49 MATCH opcode qtype qname
50 ADJUST copy_id
51 REPLY QR NOERROR
52 SECTION QUESTION
53 com. IN NS
54 SECTION ANSWER
55 com. IN NS a.gtld-servers.net.
56 SECTION ADDITIONAL
57 a.gtld-servers.net. IN A 192.5.6.30
58 ENTRY_END
59
60 ENTRY_BEGIN
61 MATCH opcode subdomain
62 ADJUST copy_id copy_query
63 REPLY QR NOERROR
64 SECTION QUESTION
65 example.com. IN A
66 SECTION AUTHORITY
67 example.com. IN NS ns.example.com.
68 SECTION ADDITIONAL
69 ns.example.com. IN A 1.2.3.4
70 ENTRY_END
71 RANGE_END
72
73 ; ns.example.com.
74 RANGE_BEGIN 0 100
75 ADDRESS 1.2.3.4
76 ENTRY_BEGIN
77 MATCH opcode qtype qname
78 ADJUST copy_id
79 REPLY QR NOERROR
80 SECTION QUESTION
81 example.com. IN NS
82 SECTION ANSWER
83 example.com. IN NS ns.example.com.
84 SECTION ADDITIONAL
85 ns.example.com. IN A 1.2.3.4
86 ENTRY_END
87
88 ENTRY_BEGIN
89 MATCH opcode qtype qname
90 ADJUST copy_id
91 REPLY QR NOERROR
92 SECTION QUESTION
93 www.example.com. IN A
94 SECTION ANSWER
95 www.example.com. IN A 10.20.30.40
96 SECTION AUTHORITY
97 example.com. IN NS ns.example.com.
98 SECTION ADDITIONAL
99 ns.example.com. IN A 1.2.3.4
100 ENTRY_END
101 RANGE_END
102
103 ; local authority (that fails a lot)
104 RANGE_BEGIN 0 100
105 ADDRESS 1.2.3.6
106
107 ENTRY_BEGIN
108 MATCH opcode qtype qname
109 ADJUST copy_id
110 REPLY QR AA SERVFAIL
111 SECTION QUESTION
112 example.com. IN NS
113 SECTION ANSWER
114 ;example.com. IN NS ns.example.com.
115 SECTION ADDITIONAL
116 ;ns.example.com. IN A 1.2.3.4
117 ENTRY_END
118
119 ENTRY_BEGIN
120 MATCH opcode qtype qname
121 ADJUST copy_id
122 REPLY QR AA SERVFAIL
123 SECTION QUESTION
124 www.example.com. IN A
125 SECTION ANSWER
126 ;www.example.com. IN A 10.20.30.50
127 SECTION AUTHORITY
128 ;example.com. IN NS ns.example.com.
129 SECTION ADDITIONAL
130 ;ns.example.com. IN A 1.2.3.4
131 ENTRY_END
132 RANGE_END
133
134 STEP 1 QUERY
135 ENTRY_BEGIN
136 REPLY RD
137 SECTION QUESTION
138 www.example.com. IN A
139 ENTRY_END
140
141 ; recursion happens here.
142 STEP 10 CHECK_ANSWER
143 ENTRY_BEGIN
144 MATCH all
145 REPLY QR RD RA NOERROR
146 SECTION QUESTION
147 www.example.com. IN A
148 SECTION ANSWER
149 www.example.com. IN A 10.20.30.40
150 SECTION AUTHORITY
151 example.com. IN NS ns.example.com.
152 SECTION ADDITIONAL
153 ns.example.com. IN A 1.2.3.4
154 ENTRY_END
155
156 SCENARIO_END
0 ; config options
1 server:
2 target-fetch-policy: "0 0 0 0 0"
3
4 stub-zone:
5 name: "."
6 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
7 CONFIG_END
8
9 SCENARIO_BEGIN Test iterator with timeouts on reclame AAAA dropping server
10
11 ; K.ROOT-SERVERS.NET.
12 RANGE_BEGIN 0 100
13 ADDRESS 193.0.14.129
14 ENTRY_BEGIN
15 MATCH opcode qtype qname
16 ADJUST copy_id
17 REPLY QR NOERROR
18 SECTION QUESTION
19 . IN NS
20 SECTION ANSWER
21 . IN NS K.ROOT-SERVERS.NET.
22 SECTION ADDITIONAL
23 K.ROOT-SERVERS.NET. IN A 193.0.14.129
24 ENTRY_END
25
26 ENTRY_BEGIN
27 MATCH opcode subdomain
28 ADJUST copy_id copy_query
29 REPLY QR NOERROR
30 SECTION QUESTION
31 com. IN A
32 SECTION AUTHORITY
33 com. IN NS a.gtld-servers.net.
34 SECTION ADDITIONAL
35 a.gtld-servers.net. IN A 192.5.6.30
36 ENTRY_END
37
38 ENTRY_BEGIN
39 MATCH opcode qtype qname
40 ADJUST copy_id
41 REPLY QR AA NOERROR
42 SECTION QUESTION
43 ns.example.net. IN A
44 SECTION ANSWER
45 ns.example.net. IN A 1.2.3.4
46 ENTRY_END
47
48 ENTRY_BEGIN
49 MATCH opcode qtype qname
50 ADJUST copy_id
51 REPLY QR AA NOERROR
52 SECTION QUESTION
53 ns.example.net. IN AAAA
54 SECTION ANSWER
55 SECTION AUTHORITY
56 . IN SOA a. b. 1 2 3 4 5
57 ENTRY_END
58
59 ENTRY_BEGIN
60 MATCH opcode qtype qname
61 ADJUST copy_id
62 REPLY QR NOERROR
63 SECTION QUESTION
64 a.gtld-servers.net. IN AAAA
65 SECTION ANSWER
66 SECTION AUTHORITY
67 . IN SOA a. b. 1 2 3 4 5
68 ENTRY_END
69
70 RANGE_END
71
72 ; a.gtld-servers.net.
73 RANGE_BEGIN 0 100
74 ADDRESS 192.5.6.30
75 ENTRY_BEGIN
76 MATCH opcode qtype qname
77 ADJUST copy_id
78 REPLY QR NOERROR
79 SECTION QUESTION
80 com. IN NS
81 SECTION ANSWER
82 com. IN NS a.gtld-servers.net.
83 SECTION ADDITIONAL
84 a.gtld-servers.net. IN A 192.5.6.30
85 ENTRY_END
86
87 ENTRY_BEGIN
88 MATCH opcode subdomain
89 ADJUST copy_id copy_query
90 REPLY QR NOERROR
91 SECTION QUESTION
92 example.com. IN A
93 SECTION AUTHORITY
94 example.com. 280 IN NS ns.example.net.
95 SECTION ADDITIONAL
96 ns.example.net. IN A 1.2.3.4
97 ENTRY_END
98 RANGE_END
99
100 ; ns.example.com.
101 ; This server is REC_LAME
102 RANGE_BEGIN 0 100
103 ADDRESS 1.2.3.4
104 ENTRY_BEGIN
105 MATCH opcode qtype qname
106 ADJUST copy_id
107 REPLY QR RA NOERROR
108 SECTION QUESTION
109 example.com. IN NS
110 SECTION ANSWER
111 example.com. 280 IN NS ns.example.net.
112 ENTRY_END
113
114 ENTRY_BEGIN
115 MATCH opcode qtype qname
116 ADJUST copy_id
117 REPLY QR RA NOERROR
118 SECTION QUESTION
119 www.example.com. IN A
120 SECTION ANSWER
121 www.example.com. 10 IN A 10.20.30.40
122 SECTION AUTHORITY
123 example.com. 280 IN NS ns.example.net.
124 ENTRY_END
125 RANGE_END
126
127 STEP 1 QUERY
128 ENTRY_BEGIN
129 REPLY RD
130 SECTION QUESTION
131 www.example.com. IN A
132 ENTRY_END
133
134 ; recursion happens here.
135 STEP 10 CHECK_ANSWER
136 ENTRY_BEGIN
137 MATCH all
138 REPLY QR RD RA NOERROR
139 SECTION QUESTION
140 www.example.com. IN A
141 SECTION ANSWER
142 www.example.com. IN A 10.20.30.40
143 SECTION AUTHORITY
144 example.com. IN NS ns.example.net.
145 ENTRY_END
146
147 ; query for (dropped) AAAA record.
148 STEP 20 QUERY
149 ENTRY_BEGIN
150 REPLY RD
151 SECTION QUESTION
152 www.example.com. IN AAAA
153 ENTRY_END
154
155 ; the AAAA query times out.
156 STEP 21 TIMEOUT
157 STEP 22 TIMEOUT
158 STEP 23 TIMEOUT
159 STEP 24 TIMEOUT
160 STEP 25 TIMEOUT
161
162 ; we get servfail, but the AAA arrives again (after the servfail times
163 ; out of the cache)
164 STEP 30 CHECK_ANSWER
165 ENTRY_BEGIN
166 MATCH all
167 REPLY QR RD RA SERVFAIL
168 SECTION QUESTION
169 www.example.com. IN AAAA
170 ENTRY_END
171 STEP 31 TIME_PASSES ELAPSE 6
172 STEP 40 QUERY
173 ENTRY_BEGIN
174 REPLY RD
175 SECTION QUESTION
176 www.example.com. IN AAAA
177 ENTRY_END
178
179 ; timeouts for AAAA keep happening.
180 STEP 41 TIMEOUT
181 STEP 42 CHECK_ANSWER
182 ENTRY_BEGIN
183 MATCH all
184 REPLY QR RD RA SERVFAIL
185 SECTION QUESTION
186 www.example.com. IN AAAA
187 ENTRY_END
188 STEP 43 TIME_PASSES ELAPSE 12
189
190 STEP 50 QUERY
191 ENTRY_BEGIN
192 REPLY RD
193 SECTION QUESTION
194 www.example.com. IN AAAA
195 ENTRY_END
196 ; fallback queries
197 STEP 51 TRAFFIC
198 ; and it fails, no parentside entries and so on.
199 STEP 52 CHECK_ANSWER
200 ENTRY_BEGIN
201 MATCH all
202 REPLY QR RD RA SERVFAIL
203 SECTION QUESTION
204 www.example.com. IN AAAA
205 ENTRY_END
206 STEP 53 TIME_PASSES ELAPSE 12
207
208 STEP 60 QUERY
209 ENTRY_BEGIN
210 REPLY RD
211 SECTION QUESTION
212 www.example.com. IN AAAA
213 ENTRY_END
214 STEP 61 TIMEOUT
215 STEP 62 TRAFFIC
216 STEP 63 CHECK_ANSWER
217 ENTRY_BEGIN
218 MATCH all
219 REPLY QR RD RA SERVFAIL
220 SECTION QUESTION
221 www.example.com. IN AAAA
222 ENTRY_END
223
224 STEP 70 QUERY
225 ENTRY_BEGIN
226 REPLY RD
227 SECTION QUESTION
228 www.example.com. IN A
229 ENTRY_END
230 STEP 72 TRAFFIC
231 STEP 73 CHECK_ANSWER
232 ENTRY_BEGIN
233 MATCH all
234 REPLY QR RD RA NOERROR
235 SECTION QUESTION
236 www.example.com. IN A
237 SECTION ANSWER
238 www.example.com. IN A 10.20.30.40
239 SECTION AUTHORITY
240 example.com. IN NS ns.example.net.
241 ENTRY_END
242
243 SCENARIO_END
274274 www.example.com. IN A
275275 ENTRY_END
276276
277 STEP 5 TRAFFIC
278
277279 ; recursion happens here.
278280 STEP 10 CHECK_ANSWER
279281 ENTRY_BEGIN
0 ;
1 ; DS match test file.
2 ; test matching of DS hash against DNSKEYs.
3 ;
4 ; enter ENTRYs with a DS and a DNSKEY.
5 ; These are matched against another.
6 ; If the query name starts with 'yes' then it must match.
7 ; If the query name starts with 'no' then it must not match.
8
9 ; These are SHA256 and SHA384 tests from the draft-ietf-dnsext-ecdsa-04
10
11 ENTRY_BEGIN
12 SECTION QUESTION
13 yes. IN A
14 SECTION ANSWER
15 example.net. 3600 IN DS 55648 13 2 ( b4c8c1fe2e7477127b27115656ad6256f424625bf5c1 e2770ce6d6e37df61d17 )
16 example.net. 3600 IN DNSKEY 257 3 13 ( GojIhhXUN/u4v54ZQqGSnyhWJwaubCvTmeexv7bR6edb krSqQpF64cYbcB7wNcP+e+MAnLr+Wi9xMWyQLc8NAA== )
17 ENTRY_END
18
19 ENTRY_BEGIN
20 SECTION QUESTION
21 yes. IN A
22 SECTION ANSWER
23 example.net. 3600 IN DS 10771 14 4 ( 72d7b62976ce06438e9c0bf319013cf801f09ecc84b8 d7e9495f27e305c6a9b0563a9b5f4d288405c3008a94 6df983d6 )
24 example.net. 3600 IN DNSKEY 257 3 14 ( xKYaNhWdGOfJ+nPrL8/arkwf2EY3MDJ+SErKivBVSum1 w/egsXvSADtNJhyem5RCOpgQ6K8X1DRSEkrbYQ+OB+v8 /uX45NBwY8rp65F6Glur8I/mlVNgF6W/qTI37m40 )
25 ENTRY_END
26
27 ; same entry as above, but corrupted by a change in the DS, MUST fail
28 ENTRY_BEGIN
29 SECTION QUESTION
30 no. IN A
31 SECTION ANSWER
32 example.net. 3600 IN DS 55648 13 2 ( b4c8c1fe2e7477126b27115656ad6256f424625bf5c1 e2770ce6d6e37df61d17 )
33 example.net. 3600 IN DNSKEY 257 3 13 ( GojIhhXUN/u4v54ZQqGSnyhWJwaubCvTmeexv7bR6edb krSqQpF64cYbcB7wNcP+e+MAnLr+Wi9xMWyQLc8NAA== )
34 ENTRY_END
35
36 ; same entry as above, but corrupted by a change in the DS, MUST fail
37 ENTRY_BEGIN
38 SECTION QUESTION
39 no. IN A
40 SECTION ANSWER
41 example.net. 3600 IN DS 10771 14 4 ( 72d7b62976ce06438e9c0cf319013cf801f09ecc84b8 d7e9495f27e305c6a9b0563a9b5f4d288405c3008a94 6df983d6 )
42 example.net. 3600 IN DNSKEY 257 3 14 ( xKYaNhWdGOfJ+nPrL8/arkwf2EY3MDJ+SErKivBVSum1 w/egsXvSADtNJhyem5RCOpgQ6K8X1DRSEkrbYQ+OB+v8 /uX45NBwY8rp65F6Glur8I/mlVNgF6W/qTI37m40 )
43 ENTRY_END
44
0 ; Signature test file
1
2 ; first entry is a DNSKEY answer, with the DNSKEY rrset used for verification.
3 ; later entries are verified with it.
4
5 ; Test ECDSA P256 signatures from draft-ietf-dnsext-ecdsa-04
6
7 ENTRY_BEGIN
8 SECTION QUESTION
9 example.net. IN DNSKEY
10 SECTION ANSWER
11 example.net. 3600 IN DNSKEY 257 3 13 ( GojIhhXUN/u4v54ZQqGSnyhWJwaubCvTmeexv7bR6edb krSqQpF64cYbcB7wNcP+e+MAnLr+Wi9xMWyQLc8NAA== )
12 ENTRY_END
13
14 ; entry to test
15 ENTRY_BEGIN
16 SECTION QUESTION
17 www.example.net. IN A
18 SECTION ANSWER
19 www.example.net. 3600 IN A 192.0.2.1
20 www.example.net. 3600 IN RRSIG A 13 3 3600 ( 20100909100439 20100812100439 55648 example.net. qx6wLYqmh+l9oCKTN6qIc+bw6ya+KJ8oMz0YP107epXA yGmt+3SNruPFKG7tZoLBLlUzGGus7ZwmwWep666VCw== )
21 ENTRY_END
22
0 ; Signature test file
1
2 ; first entry is a DNSKEY answer, with the DNSKEY rrset used for verification.
3 ; later entries are verified with it.
4
5 ; Test ECDSA P384 signatures from draft-ietf-dnsext-ecdsa-04
6
7 ENTRY_BEGIN
8 SECTION QUESTION
9 example.net. IN DNSKEY
10 SECTION ANSWER
11 example.net. 3600 IN DNSKEY 257 3 14 ( xKYaNhWdGOfJ+nPrL8/arkwf2EY3MDJ+SErKivBVSum1 w/egsXvSADtNJhyem5RCOpgQ6K8X1DRSEkrbYQ+OB+v8 /uX45NBwY8rp65F6Glur8I/mlVNgF6W/qTI37m40 )
12 ENTRY_END
13
14 ; entry to test
15 ENTRY_BEGIN
16 SECTION QUESTION
17 www.example.net. IN A
18 SECTION ANSWER
19 www.example.net. 3600 IN A 192.0.2.1
20 www.example.net. 3600 IN RRSIG A 14 3 3600 ( 20100909102025 20100812102025 10771 example.net. /L5hDKIvGDyI1fcARX3z65qrmPsVz73QD1Mr5CEqOiLP 95hxQouuroGCeZOvzFaxsT8Glr74hbavRKayJNuydCuz WTSSPdz7wnqXL5bdcJzusdnI0RSMROxxwGipWcJm )
21 ENTRY_END
22
194194 cfg->remote_control_enable = 0;
195195 cfg->control_ifs = NULL;
196196 cfg->control_port = UNBOUND_CONTROL_PORT;
197 cfg->minimal_responses = 0;
198 cfg->rrset_roundrobin = 0;
197199 if(!(cfg->server_key_file = strdup(RUN_DIR"/unbound_server.key")))
198200 goto error_exit;
199201 if(!(cfg->server_cert_file = strdup(RUN_DIR"/unbound_server.pem")))
398400 else S_MEMSIZE("key-cache-size:", key_cache_size)
399401 else S_POW2("key-cache-slabs:", key_cache_slabs)
400402 else S_MEMSIZE("neg-cache-size:", neg_cache_size)
403 else S_YNO("minimal-responses:", minimal_responses)
404 else S_YNO("rrset-roundrobin:", rrset_roundrobin)
401405 else S_STRLIST("local-data:", local_data)
402406 else S_YNO("control-enable:", remote_control_enable)
403407 else S_STRLIST("control-interface:", control_ifs)
422426 /* unknown or unsupported (from the set_option interface):
423427 * interface, outgoing-interface, access-control,
424428 * stub-zone, name, stub-addr, stub-host, stub-prime
429 * forward-first, stub-first,
425430 * forward-zone, name, forward-addr, forward-host */
426431 return 0;
427432 }
649654 else O_LST(opt, "control-interface", control_ifs)
650655 else O_LST(opt, "domain-insecure", domain_insecure)
651656 else O_UNS(opt, "val-override-date", val_date_override)
657 else O_YNO(opt, "minimal-responses", minimal_responses)
658 else O_YNO(opt, "rrset-roundrobin", rrset_roundrobin)
652659 /* not here:
653660 * outgoing-permit, outgoing-avoid - have list of ports
654661 * local-zone - zones and nodefault variables
10771084 MAX_TTL = (uint32_t)config->max_ttl;
10781085 MIN_TTL = (uint32_t)config->min_ttl;
10791086 EDNS_ADVERTISED_SIZE = (uint16_t)config->edns_buffer_size;
1087 MINIMAL_RESPONSES = config->minimal_responses;
1088 RRSET_ROUNDROBIN = config->rrset_roundrobin;
10801089 log_set_time_asc(config->log_time_ascii);
10811090 }
10821091
13321341 return result;
13331342 }
13341343
1344 #ifdef UB_ON_WINDOWS
1345 char*
1346 w_lookup_reg_str(const char* key, const char* name)
1347 {
1348 HKEY hk = NULL;
1349 DWORD type = 0;
1350 BYTE buf[1024];
1351 DWORD len = (DWORD)sizeof(buf);
1352 LONG ret;
1353 char* result = NULL;
1354 ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, key, 0, KEY_READ, &hk);
1355 if(ret == ERROR_FILE_NOT_FOUND)
1356 return NULL; /* key does not exist */
1357 else if(ret != ERROR_SUCCESS) {
1358 log_err("RegOpenKeyEx failed");
1359 return NULL;
1360 }
1361 ret = RegQueryValueEx(hk, (LPCTSTR)name, 0, &type, buf, &len);
1362 if(RegCloseKey(hk))
1363 log_err("RegCloseKey");
1364 if(ret == ERROR_FILE_NOT_FOUND)
1365 return NULL; /* name does not exist */
1366 else if(ret != ERROR_SUCCESS) {
1367 log_err("RegQueryValueEx failed");
1368 return NULL;
1369 }
1370 if(type == REG_SZ || type == REG_MULTI_SZ || type == REG_EXPAND_SZ) {
1371 buf[sizeof(buf)-1] = 0;
1372 buf[sizeof(buf)-2] = 0; /* for multi_sz */
1373 result = strdup((char*)buf);
1374 if(!result) log_err("out of memory");
1375 }
1376 return result;
1377 }
1378 #endif /* UB_ON_WINDOWS */
1379
13351380 void errinf(struct module_qstate* qstate, const char* str)
13361381 {
13371382 struct config_strlist* p;
289289
290290 /** daemonize, i.e. fork into the background. */
291291 int do_daemonize;
292
293 /* minimal response when positive answer */
294 int minimal_responses;
295
296 /* RRSet roundrobin */
297 int rrset_roundrobin;
292298 };
293299
294300 /**
305311 struct config_strlist* addrs;
306312 /** if stub-prime is set */
307313 int isprime;
314 /** if forward-first is set (failover to without if fails) */
315 int isfirst;
308316 };
309317
310318 /**
628636 /** parsing helpers: print error with file and line numbers */
629637 void ub_c_error_msg(const char* fmt, ...) ATTR_FORMAT(printf, 1, 2);
630638
639 #ifdef UB_ON_WINDOWS
640 /**
641 * Obtain registry string (if it exists).
642 * @param key: key string
643 * @param name: name of value to fetch.
644 * @return malloced string with the result or NULL if it did not
645 * exist on an error (logged with log_err) was encountered.
646 */
647 char* w_lookup_reg_str(const char* key, const char* name);
648 #endif /* UB_ON_WINDOWS */
649
631650 #endif /* UTIL_CONFIG_FILE_H */
361361 *yy_cp = '\0'; \
362362 (yy_c_buf_p) = yy_cp;
363363
364 #define YY_NUM_RULES 138
365 #define YY_END_OF_BUFFER 139
364 #define YY_NUM_RULES 142
365 #define YY_END_OF_BUFFER 143
366366 /* This struct is not used in this scanner,
367367 but its presence is necessary. */
368368 struct yy_trans_info
370370 flex_int32_t yy_verify;
371371 flex_int32_t yy_nxt;
372372 };
373 static yyconst flex_int16_t yy_accept[1303] =
373 static yyconst flex_int16_t yy_accept[1343] =
374374 { 0,
375 1, 1, 120, 120, 124, 124, 128, 128, 132, 132,
376 1, 1, 139, 136, 1, 118, 118, 137, 2, 136,
377 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
378 136, 136, 136, 136, 136, 136, 136, 136, 137, 120,
379 121, 121, 122, 137, 124, 125, 125, 126, 137, 131,
380 128, 129, 129, 130, 137, 132, 133, 133, 134, 137,
381 135, 119, 2, 123, 135, 137, 136, 0, 1, 2,
382 2, 2, 2, 136, 136, 136, 136, 136, 136, 136,
383 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
384 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
385
386 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
387 136, 136, 136, 136, 136, 136, 136, 136, 120, 0,
388 124, 0, 131, 0, 128, 132, 0, 135, 0, 2,
389 2, 135, 136, 136, 136, 136, 136, 136, 136, 136,
390 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
391 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
392 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
393 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
394 136, 136, 136, 136, 135, 136, 136, 136, 136, 136,
395 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
396
397 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
398 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
399 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
400 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
401 136, 136, 136, 136, 136, 136, 135, 136, 136, 136,
402 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
403 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
404 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
405 136, 136, 136, 62, 136, 136, 136, 136, 136, 6,
406 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
407
408 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
409 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
410 135, 136, 136, 136, 136, 136, 136, 136, 136, 136,
411 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
412 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
413 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
414 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
415 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
416 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
417 136, 136, 136, 136, 136, 136, 136, 136, 135, 136,
418
419 136, 136, 136, 27, 136, 136, 136, 136, 136, 12,
420 13, 136, 15, 14, 136, 136, 136, 136, 136, 136,
421 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
422 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
423 136, 136, 136, 136, 136, 136, 136, 136, 116, 136,
424 136, 136, 136, 3, 136, 136, 136, 136, 136, 136,
425 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
426 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
427 136, 135, 136, 136, 136, 136, 136, 136, 136, 136,
428 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
429
430 136, 136, 136, 136, 136, 136, 136, 127, 136, 136,
431 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
432 30, 136, 136, 136, 136, 136, 136, 136, 31, 136,
433 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
434 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
435 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
436 136, 136, 136, 75, 127, 136, 136, 136, 136, 136,
437 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
438 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
439 136, 136, 136, 136, 74, 136, 136, 136, 136, 136,
440
441 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
442 136, 136, 136, 136, 136, 136, 60, 136, 136, 136,
443 136, 136, 136, 136, 136, 136, 136, 20, 136, 136,
444 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
445 136, 136, 28, 136, 136, 136, 136, 136, 136, 136,
446 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
447 136, 136, 29, 136, 136, 136, 136, 136, 136, 136,
448 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
449 136, 136, 136, 136, 136, 136, 22, 136, 136, 136,
450 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
451
452 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
453 136, 136, 136, 25, 26, 136, 136, 136, 63, 64,
454 136, 61, 136, 136, 136, 136, 136, 136, 136, 136,
455 136, 136, 136, 136, 136, 136, 5, 136, 136, 136,
456 136, 136, 136, 136, 136, 136, 136, 136, 136, 77,
457 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
458 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
459 136, 136, 136, 136, 136, 136, 102, 101, 136, 136,
460 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
461 136, 136, 136, 136, 136, 32, 136, 136, 136, 136,
462
463 136, 136, 65, 136, 136, 136, 136, 136, 136, 98,
464 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
465 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
466 136, 136, 136, 136, 136, 136, 136, 136, 136, 51,
467 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
468 136, 136, 136, 136, 136, 136, 100, 136, 136, 136,
469 136, 136, 136, 136, 4, 136, 136, 136, 136, 136,
470 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
471 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
472 136, 136, 136, 136, 136, 95, 136, 136, 136, 136,
473
474 136, 136, 136, 110, 96, 136, 21, 136, 136, 136,
475 136, 67, 68, 66, 136, 136, 136, 136, 136, 136,
476 73, 136, 136, 136, 136, 136, 136, 136, 136, 136,
477 97, 136, 136, 136, 136, 136, 136, 136, 136, 136,
478 136, 136, 136, 136, 136, 59, 136, 136, 136, 136,
479 136, 136, 136, 136, 136, 17, 136, 136, 136, 16,
480 136, 82, 136, 136, 136, 136, 136, 136, 136, 136,
481 136, 136, 136, 136, 39, 40, 136, 136, 136, 136,
482 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
483 136, 72, 136, 136, 136, 136, 136, 136, 136, 136,
484
485 136, 136, 136, 136, 136, 76, 136, 136, 136, 136,
486 136, 136, 136, 136, 136, 136, 136, 115, 136, 136,
487 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
488 136, 136, 86, 136, 90, 136, 136, 136, 136, 71,
489 136, 136, 108, 136, 136, 136, 136, 136, 136, 136,
490 136, 136, 136, 136, 136, 136, 89, 136, 136, 136,
491 136, 41, 42, 136, 47, 91, 136, 103, 99, 136,
492 35, 136, 93, 136, 136, 136, 136, 136, 7, 136,
493 58, 107, 136, 136, 136, 136, 136, 136, 136, 136,
494 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
495
496 136, 136, 136, 136, 136, 78, 136, 136, 117, 136,
497 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
498 136, 92, 34, 36, 136, 136, 136, 136, 136, 57,
499 136, 136, 136, 111, 18, 19, 136, 136, 136, 136,
500 136, 136, 55, 136, 136, 136, 136, 136, 136, 136,
501 136, 136, 113, 136, 136, 33, 136, 136, 136, 136,
502 136, 136, 11, 136, 136, 136, 136, 136, 136, 10,
503 136, 136, 37, 136, 112, 136, 136, 136, 136, 136,
504 136, 136, 136, 136, 136, 85, 84, 136, 114, 109,
505 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
506
507 43, 136, 136, 136, 136, 136, 38, 136, 136, 136,
508 79, 81, 136, 136, 136, 83, 136, 136, 136, 136,
509 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
510 23, 136, 136, 136, 136, 136, 136, 136, 136, 136,
511 136, 136, 136, 106, 136, 136, 136, 136, 136, 136,
512 136, 24, 136, 9, 136, 136, 104, 48, 136, 136,
513 136, 88, 136, 69, 136, 136, 136, 50, 54, 49,
514 136, 44, 136, 8, 136, 136, 87, 136, 136, 136,
515 53, 136, 45, 136, 105, 136, 136, 80, 70, 52,
516 46, 136, 136, 136, 136, 56, 136, 136, 136, 136,
517
518 94, 0
375 1, 1, 124, 124, 128, 128, 132, 132, 136, 136,
376 1, 1, 143, 140, 1, 122, 122, 141, 2, 140,
377 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
378 140, 140, 140, 140, 140, 140, 140, 140, 141, 124,
379 125, 125, 126, 141, 128, 129, 129, 130, 141, 135,
380 132, 133, 133, 134, 141, 136, 137, 137, 138, 141,
381 139, 123, 2, 127, 139, 141, 140, 0, 1, 2,
382 2, 2, 2, 140, 140, 140, 140, 140, 140, 140,
383 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
384 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
385
386 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
387 140, 140, 140, 140, 140, 140, 140, 140, 140, 124,
388 0, 128, 0, 135, 0, 132, 136, 0, 139, 0,
389 2, 2, 139, 140, 140, 140, 140, 140, 140, 140,
390 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
391 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
392 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
393 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
394 140, 140, 140, 140, 140, 140, 139, 140, 140, 140,
395 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
396
397 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
398 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
399 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
400 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
401 140, 140, 140, 140, 140, 140, 140, 140, 140, 139,
402 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
403 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
404 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
405 140, 140, 140, 140, 140, 140, 140, 62, 140, 140,
406 140, 140, 140, 6, 140, 140, 140, 140, 140, 140,
407
408 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
409 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
410 140, 140, 140, 140, 139, 140, 140, 140, 140, 140,
411 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
412 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
413 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
414 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
415 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
416 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
417 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
418
419 140, 140, 140, 140, 139, 140, 140, 140, 140, 27,
420 140, 140, 140, 140, 140, 12, 13, 140, 15, 14,
421 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
422 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
423 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
424 140, 140, 140, 140, 140, 118, 140, 140, 140, 140,
425 140, 3, 140, 140, 140, 140, 140, 140, 140, 140,
426 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
427 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
428 139, 140, 140, 140, 140, 140, 140, 140, 140, 140,
429
430 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
431 140, 140, 140, 140, 140, 140, 131, 140, 140, 140,
432 140, 140, 140, 140, 140, 140, 140, 140, 140, 30,
433 140, 140, 140, 140, 140, 140, 140, 140, 31, 140,
434 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
435 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
436 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
437 140, 140, 140, 140, 140, 77, 131, 140, 140, 140,
438 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
439 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
440
441 140, 140, 140, 140, 140, 140, 140, 76, 140, 140,
442 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
443 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
444 60, 140, 140, 140, 140, 140, 140, 140, 140, 140,
445 140, 140, 20, 140, 140, 140, 140, 140, 140, 140,
446 140, 140, 140, 140, 140, 140, 140, 140, 28, 140,
447 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
448 140, 140, 140, 140, 140, 140, 140, 140, 29, 140,
449 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
450 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
451
452 140, 140, 140, 22, 140, 140, 140, 140, 140, 140,
453 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
454 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
455 140, 140, 25, 26, 140, 140, 140, 63, 140, 64,
456 140, 61, 140, 140, 140, 140, 140, 140, 140, 140,
457 140, 140, 140, 140, 140, 140, 5, 140, 140, 140,
458 140, 140, 140, 140, 140, 140, 140, 140, 140, 79,
459 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
460 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
461 140, 140, 140, 140, 140, 140, 140, 104, 103, 140,
462
463 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
464 140, 140, 140, 140, 140, 140, 140, 32, 140, 140,
465 140, 140, 140, 140, 140, 66, 65, 140, 140, 140,
466 140, 140, 140, 100, 140, 140, 140, 140, 140, 140,
467 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
468 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
469 140, 140, 140, 140, 51, 140, 140, 140, 140, 140,
470 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
471 140, 102, 140, 140, 140, 140, 140, 140, 140, 140,
472 4, 140, 140, 140, 140, 140, 140, 140, 140, 140,
473
474 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
475 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
476 140, 140, 97, 140, 140, 140, 140, 140, 140, 140,
477 112, 98, 140, 21, 140, 140, 140, 140, 68, 140,
478 69, 67, 140, 140, 140, 140, 140, 140, 75, 140,
479 140, 140, 140, 140, 140, 140, 140, 140, 99, 140,
480 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
481 140, 140, 140, 140, 59, 140, 140, 140, 140, 140,
482 140, 140, 140, 140, 140, 17, 140, 140, 140, 16,
483 140, 84, 140, 140, 140, 140, 140, 140, 140, 140,
484
485 140, 140, 140, 140, 39, 40, 140, 140, 140, 140,
486 140, 140, 140, 140, 140, 140, 70, 140, 140, 140,
487 140, 140, 74, 140, 140, 140, 140, 140, 140, 140,
488 140, 140, 140, 140, 140, 140, 140, 78, 140, 140,
489 140, 140, 140, 140, 140, 140, 140, 140, 140, 117,
490 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
491 140, 140, 140, 140, 140, 88, 140, 92, 140, 140,
492 140, 140, 73, 140, 140, 110, 140, 140, 140, 140,
493 140, 140, 140, 140, 140, 140, 140, 140, 140, 91,
494 140, 140, 140, 140, 41, 42, 140, 47, 93, 140,
495
496 105, 101, 140, 140, 35, 140, 95, 140, 140, 140,
497 140, 140, 7, 140, 58, 109, 140, 140, 140, 140,
498 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
499 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
500 80, 140, 140, 119, 140, 140, 140, 140, 140, 140,
501 140, 140, 140, 140, 140, 140, 94, 140, 34, 36,
502 140, 140, 140, 140, 140, 57, 140, 140, 140, 140,
503 113, 18, 19, 140, 140, 140, 140, 140, 140, 55,
504 140, 140, 140, 140, 140, 140, 140, 140, 140, 115,
505 140, 140, 33, 140, 140, 140, 140, 140, 140, 11,
506
507 140, 140, 140, 140, 140, 140, 140, 10, 140, 140,
508 37, 140, 121, 114, 140, 140, 140, 140, 140, 140,
509 140, 140, 140, 140, 87, 86, 140, 116, 111, 140,
510 140, 140, 140, 140, 140, 140, 140, 140, 140, 43,
511 140, 120, 140, 140, 140, 140, 38, 140, 140, 140,
512 81, 83, 140, 140, 140, 85, 140, 140, 140, 140,
513 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
514 23, 140, 140, 140, 140, 140, 140, 140, 140, 140,
515 140, 140, 140, 108, 140, 140, 140, 140, 140, 140,
516 140, 24, 140, 9, 140, 140, 106, 48, 140, 140,
517
518 140, 90, 140, 71, 140, 140, 140, 50, 54, 49,
519 140, 44, 140, 8, 140, 140, 89, 140, 140, 140,
520 53, 140, 45, 140, 107, 140, 140, 82, 72, 52,
521 46, 140, 140, 140, 140, 56, 140, 140, 140, 140,
522 96, 0
519523 } ;
520524
521525 static yyconst flex_int32_t yy_ec[256] =
561565 1, 1, 1, 1, 1
562566 } ;
563567
564 static yyconst flex_int16_t yy_base[1317] =
568 static yyconst flex_int16_t yy_base[1357] =
565569 { 0,
566570 0, 0, 63, 66, 69, 71, 77, 83, 88, 91,
567 129, 135, 489, 442, 95, 3745, 3745, 3745, 107, 110,
571 129, 135, 483, 443, 95, 3880, 3880, 3880, 107, 110,
568572 142, 140, 108, 50, 159, 147, 121, 148, 158, 174,
569 191, 176, 190, 216, 225, 235, 214, 246, 116, 438,
570 3745, 3745, 3745, 94, 437, 3745, 3745, 3745, 96, 430,
571 435, 3745, 3745, 3745, 214, 333, 3745, 3745, 3745, 102,
572 299, 3745, 289, 3745, 184, 293, 249, 297, 111, 0,
573 301, 0, 0, 219, 223, 163, 272, 250, 284, 288,
574 285, 282, 309, 292, 287, 290, 302, 314, 232, 296,
575 336, 294, 319, 345, 328, 331, 330, 346, 337, 334,
576
577 358, 349, 369, 364, 355, 187, 371, 370, 137, 375,
578 385, 381, 376, 383, 393, 395, 397, 403, 239, 154,
579 229, 199, 186, 442, 176, 115, 277, 90, 449, 457,
580 0, 426, 413, 411, 431, 443, 439, 435, 432, 456,
581 464, 488, 462, 448, 466, 445, 472, 469, 473, 489,
582 495, 493, 500, 459, 496, 517, 520, 522, 519, 529,
583 525, 537, 545, 535, 544, 531, 547, 532, 552, 546,
584 543, 570, 562, 564, 549, 565, 566, 579, 569, 580,
585 593, 604, 602, 606, 589, 596, 597, 607, 609, 603,
586 619, 630, 624, 616, 639, 631, 633, 650, 651, 652,
587
588 623, 642, 658, 657, 643, 667, 645, 670, 668, 672,
589 674, 684, 675, 690, 686, 689, 694, 695, 702, 710,
590 712, 718, 713, 717, 724, 722, 740, 731, 723, 751,
591 732, 755, 745, 742, 765, 762, 761, 758, 753, 773,
592 750, 791, 782, 836, 780, 788, 778, 785, 787, 807,
593 820, 813, 815, 817, 826, 829, 840, 837, 841, 842,
594 860, 857, 872, 877, 862, 869, 884, 882, 885, 888,
595 886, 898, 894, 897, 901, 904, 920, 909, 917, 911,
596 929, 916, 938, 3745, 941, 919, 927, 936, 943, 3745,
597 931, 932, 946, 944, 966, 979, 959, 958, 984, 968,
598
599 976, 973, 971, 1004, 972, 975, 1017, 994, 996, 1000,
600 1008, 1011, 1016, 1018, 1010, 1024, 1035, 1039, 1015, 1043,
601 1050, 1063, 1052, 1047, 1055, 776, 1057, 1059, 1061, 1075,
602 1067, 1072, 1083, 1091, 1089, 1093, 1101, 1079, 1099, 1105,
603 1112, 1107, 1108, 1094, 1116, 1110, 1103, 1121, 1118, 1126,
604 1138, 1122, 1146, 1149, 1142, 1152, 1162, 1153, 1158, 1160,
605 1165, 1148, 1164, 1189, 1168, 1191, 1204, 1187, 1192, 1199,
606 1207, 1206, 1209, 1195, 1197, 1193, 1190, 1221, 1217, 1223,
607 1228, 1231, 1226, 1229, 1242, 1244, 1235, 1247, 1248, 1253,
608 1258, 1257, 1262, 1272, 1265, 1274, 1270, 1268, 1291, 1295,
609
610 1299, 1284, 1306, 3745, 1290, 1308, 1301, 1294, 1309, 3745,
611 3745, 1310, 3745, 3745, 1304, 1314, 1334, 1318, 1364, 1343,
612 1332, 1328, 1354, 1316, 1345, 1359, 1347, 1372, 1375, 1365,
613 1369, 1386, 1389, 1391, 1393, 1392, 1401, 1404, 1402, 1414,
614 1415, 1409, 1420, 1419, 1430, 1424, 1418, 1421, 3745, 1434,
615 1429, 1438, 1452, 3745, 1441, 1448, 1451, 1450, 1453, 1449,
616 1456, 1465, 1477, 1467, 1468, 1482, 1479, 1492, 1487, 1478,
617 1495, 1498, 1489, 1511, 1519, 1514, 1505, 1508, 1530, 1513,
618 1527, 1528, 1516, 1532, 1526, 1525, 1537, 1576, 1538, 1541,
619 1546, 1548, 1550, 1553, 1564, 1578, 1594, 1577, 1569, 1572,
620
621 1589, 1596, 1599, 1586, 1605, 1615, 1614, 3745, 1629, 1627,
622 1612, 1622, 1628, 1634, 1617, 1632, 1626, 1638, 1639, 1642,
623 3745, 1653, 1645, 1662, 1666, 1665, 1675, 1682, 3745, 1685,
624 1683, 1688, 1681, 1670, 1697, 1694, 1701, 1680, 1698, 1705,
625 1707, 1702, 1719, 1712, 1715, 1723, 1732, 1733, 1726, 1742,
626 1729, 1692, 1752, 1739, 1741, 1751, 1747, 1746, 396, 1757,
627 1767, 1763, 1762, 3745, 76, 1766, 1768, 1771, 1759, 1781,
628 1794, 1778, 1786, 1796, 1789, 1797, 1806, 1793, 1808, 1810,
629 1803, 1820, 1813, 1830, 1814, 1821, 1831, 1826, 1833, 1828,
630 1844, 1847, 1848, 1842, 3745, 1869, 1852, 1856, 1860, 1871,
631
632 1886, 1872, 1875, 1892, 1889, 1895, 1896, 1893, 1883, 1887,
633 1908, 1910, 1904, 1911, 1925, 1918, 3745, 1922, 1931, 1930,
634 1933, 1932, 1936, 1937, 1940, 1950, 1954, 3745, 1959, 1964,
635 1953, 1976, 1979, 1978, 1984, 1967, 1980, 1982, 1988, 1977,
636 1991, 1994, 3745, 1992, 2002, 2003, 2004, 2007, 2006, 2012,
637 2013, 2017, 2009, 2030, 2018, 2021, 2024, 2026, 2029, 2033,
638 2028, 2039, 3745, 2067, 2044, 2054, 2056, 2057, 2059, 2073,
639 2055, 2064, 2065, 2068, 2085, 2086, 2091, 2092, 2089, 2088,
640 2102, 2100, 2104, 2115, 2126, 2123, 3745, 2127, 2114, 2119,
641 2143, 2133, 2125, 2130, 2134, 2151, 2137, 2139, 2150, 2153,
642
643 2148, 2147, 2164, 2180, 2177, 2159, 2160, 2175, 2174, 2188,
644 2187, 2178, 2197, 3745, 3745, 2205, 2202, 2201, 3745, 3745,
645 2212, 3745, 2213, 2217, 2207, 2206, 2215, 2208, 2226, 2221,
646 2235, 2224, 2227, 2248, 2237, 2250, 3745, 2239, 2245, 2260,
647 2247, 2249, 2251, 2268, 2275, 2264, 2265, 2276, 2283, 3745,
648 2288, 2274, 2278, 2304, 2305, 2291, 2294, 2308, 2296, 2317,
649 2311, 2320, 2310, 2307, 2323, 2315, 2312, 2332, 2334, 2333,
650 2337, 2341, 2348, 2351, 2364, 2350, 3745, 3745, 2365, 2368,
651 2360, 2355, 2385, 2372, 2352, 2383, 2382, 2391, 2387, 2392,
652 2361, 2389, 2410, 2399, 2409, 3745, 2421, 2424, 2416, 2429,
653
654 2417, 2432, 3745, 2420, 2426, 2434, 2431, 2444, 2445, 3745,
655 2447, 2442, 2459, 2465, 2471, 2466, 2455, 2468, 2480, 2474,
656 2469, 2472, 2489, 2492, 2482, 2506, 2513, 2514, 2508, 2518,
657 2493, 2501, 2502, 2503, 2524, 2525, 2526, 2510, 2529, 3745,
658 2538, 2528, 2540, 2533, 2542, 2553, 2547, 2549, 2537, 2550,
659 2551, 2545, 2562, 2556, 2574, 2559, 3745, 2578, 2584, 2583,
660 2573, 2593, 2577, 2580, 3745, 2607, 2617, 2588, 2609, 2622,
661 2619, 2618, 2605, 2613, 2610, 2632, 2633, 2637, 2631, 2620,
662 2636, 2661, 2662, 2670, 2665, 2655, 2675, 2660, 2669, 2664,
663 2654, 2678, 2663, 2682, 2671, 3745, 2681, 2686, 2693, 2689,
664
665 2696, 2698, 2705, 3745, 3745, 2703, 3745, 2706, 2699, 2710,
666 2712, 3745, 3745, 3745, 2713, 2728, 2726, 2734, 2736, 2729,
667 3745, 2740, 2730, 2748, 2731, 2739, 2756, 2757, 2744, 2753,
668 3745, 2755, 2762, 2754, 2776, 2788, 2766, 2789, 2795, 2793,
669 2796, 2784, 2786, 2808, 2800, 3745, 2790, 2804, 2807, 2814,
670 2828, 2821, 2827, 2833, 2841, 3745, 2829, 2823, 2831, 3745,
671 2845, 3745, 2853, 2836, 2835, 2849, 2866, 2852, 2858, 2878,
672 2876, 2870, 2884, 2879, 3745, 3745, 2880, 2890, 2891, 2886,
673 2894, 2896, 2897, 2910, 2869, 2901, 2905, 2911, 2913, 2919,
674 2914, 3745, 2933, 2940, 2923, 2932, 2947, 2944, 2949, 2938,
675
676 2952, 2953, 2950, 2954, 2955, 3745, 2959, 2966, 2965, 2968,
677 2967, 2977, 2970, 2986, 2988, 2971, 2989, 3745, 2999, 2979,
678 3000, 2991, 3004, 2994, 2995, 3012, 3015, 3010, 3014, 3029,
679 3028, 3030, 3745, 3024, 3745, 3031, 3042, 3049, 3053, 3745,
680 3048, 3047, 3745, 3061, 3067, 3066, 3069, 3065, 3077, 3074,
681 3058, 3080, 3082, 3092, 3086, 3081, 3745, 3094, 3093, 3095,
682 3113, 3745, 3745, 3111, 3745, 3745, 3116, 3745, 3745, 3117,
683 3745, 3118, 3745, 3127, 3125, 3119, 3106, 3129, 3745, 3131,
684 3745, 3745, 3136, 3130, 3142, 3148, 3149, 3150, 3139, 3146,
685 3153, 3155, 3158, 3152, 3160, 3162, 3157, 3161, 3173, 3166,
686
687 3182, 3177, 3197, 3198, 3201, 3745, 3187, 3206, 3745, 3211,
688 3209, 3200, 3194, 3208, 3204, 3221, 3216, 3210, 3229, 3222,
689 3230, 3745, 3745, 3745, 3231, 3243, 3252, 3239, 3237, 3745,
690 3259, 3242, 3260, 3745, 3745, 3745, 3262, 3253, 3256, 3267,
691 3269, 3268, 3745, 3270, 3279, 3286, 3278, 3298, 3300, 3308,
692 3307, 3309, 3745, 3305, 3302, 3745, 3312, 3303, 3313, 3317,
693 3318, 3324, 3745, 3304, 3328, 3321, 3329, 3344, 3349, 3745,
694 3348, 3345, 3745, 3359, 3745, 3341, 3362, 3364, 3366, 3369,
695 3355, 3356, 3368, 3377, 3374, 3745, 3745, 3381, 3745, 3745,
696 3379, 3372, 3383, 3391, 3393, 3406, 3395, 3386, 3394, 3396,
697
698 3745, 3414, 3408, 3424, 3423, 3419, 3745, 3422, 3420, 3435,
699 3745, 3745, 3429, 3436, 3439, 3745, 3440, 3443, 3438, 3453,
700 3469, 3462, 3458, 3454, 3470, 3472, 3456, 3467, 3476, 3483,
701 3745, 3490, 3487, 3484, 3491, 3492, 3489, 3500, 3501, 3493,
702 3510, 3502, 3504, 3745, 3511, 3519, 3526, 3530, 3532, 3531,
703 3540, 3745, 3541, 3745, 3543, 3539, 3745, 3745, 3537, 3547,
704 3549, 3745, 3550, 3745, 3553, 3556, 3557, 3745, 3745, 3745,
705 3560, 3745, 3558, 3745, 3565, 3563, 3745, 3568, 3575, 3579,
706 3745, 3591, 3745, 3593, 3745, 3582, 3595, 3745, 3745, 3745,
707 3745, 3597, 3583, 3598, 3590, 3745, 3589, 3600, 3588, 3608,
708
709 3745, 3745, 3653, 3660, 3667, 3674, 3681, 82, 3688, 3695,
710 3702, 3709, 3716, 3723, 3730, 3737
573 191, 176, 190, 216, 225, 235, 214, 246, 116, 436,
574 3880, 3880, 3880, 94, 402, 3880, 3880, 3880, 96, 335,
575 329, 3880, 3880, 3880, 214, 282, 3880, 3880, 3880, 102,
576 250, 3880, 289, 3880, 184, 293, 239, 297, 111, 0,
577 301, 0, 0, 219, 223, 248, 273, 280, 285, 290,
578 286, 283, 310, 294, 291, 297, 309, 316, 232, 319,
579 338, 303, 334, 345, 326, 347, 349, 342, 350, 360,
580
581 343, 376, 370, 384, 371, 368, 187, 375, 374, 137,
582 387, 403, 378, 390, 401, 386, 405, 400, 407, 229,
583 154, 186, 199, 163, 448, 176, 115, 277, 90, 452,
584 463, 0, 432, 441, 318, 433, 442, 439, 437, 465,
585 462, 469, 493, 471, 455, 473, 453, 479, 490, 477,
586 494, 496, 498, 510, 492, 517, 530, 526, 549, 522,
587 525, 532, 542, 534, 536, 541, 544, 545, 556, 529,
588 558, 552, 560, 559, 568, 578, 574, 561, 582, 591,
589 603, 583, 599, 610, 607, 612, 608, 594, 611, 616,
590 617, 618, 624, 640, 629, 635, 649, 637, 639, 658,
591
592 664, 643, 669, 657, 672, 677, 676, 663, 660, 665,
593 680, 688, 679, 690, 698, 705, 699, 701, 703, 706,
594 710, 738, 674, 720, 734, 716, 733, 736, 739, 752,
595 747, 737, 756, 750, 767, 773, 761, 766, 777, 763,
596 790, 771, 781, 791, 804, 797, 849, 800, 812, 789,
597 814, 820, 809, 830, 826, 828, 839, 847, 831, 866,
598 884, 857, 853, 859, 873, 883, 893, 881, 889, 896,
599 892, 902, 909, 906, 910, 911, 916, 912, 926, 935,
600 920, 937, 938, 948, 951, 934, 957, 3880, 959, 942,
601 962, 965, 954, 3880, 952, 968, 953, 986, 990, 975,
602
603 978, 981, 1000, 992, 1001, 993, 995, 1041, 1012, 994,
604 1033, 1023, 1025, 1019, 1034, 1036, 1046, 1039, 1029, 1050,
605 1059, 1070, 1061, 1068, 1078, 1028, 1075, 1071, 1077, 1092,
606 1081, 1084, 1085, 1098, 1102, 1103, 1113, 1122, 1121, 1124,
607 1126, 1110, 1127, 1129, 1130, 1134, 1136, 1119, 1140, 1142,
608 1148, 1168, 1151, 1154, 1146, 1161, 1166, 1167, 1173, 1178,
609 1175, 1181, 1179, 1193, 1198, 1199, 1191, 1197, 1210, 1213,
610 1212, 1233, 1194, 1218, 1229, 1234, 1239, 1244, 1230, 1231,
611 1236, 1242, 1260, 1243, 1238, 1254, 1263, 1271, 1258, 1282,
612 1280, 1281, 1276, 1269, 1287, 1290, 1289, 1295, 1296, 1307,
613
614 1308, 1311, 1316, 1279, 1327, 1328, 1329, 1309, 1339, 3880,
615 1341, 1338, 1343, 1336, 1335, 3880, 3880, 1347, 3880, 3880,
616 1363, 1367, 1374, 1353, 1404, 1371, 1365, 1357, 1390, 1385,
617 1380, 1401, 1398, 1414, 1394, 1399, 1417, 1410, 1426, 1424,
618 1429, 1425, 1432, 1438, 1445, 1449, 1450, 1452, 1443, 1457,
619 1464, 1467, 1465, 1468, 1459, 3880, 1466, 1476, 1479, 1482,
620 1499, 3880, 1487, 1491, 1484, 1493, 1496, 1492, 1509, 1503,
621 1506, 1518, 1520, 1526, 1524, 1535, 1472, 1537, 1519, 1543,
622 1545, 1536, 1559, 1562, 1553, 1548, 1554, 1573, 1558, 1574,
623 1579, 1575, 1584, 1572, 1568, 1582, 1621, 1594, 1583, 1589,
624
625 1593, 1601, 1600, 1606, 1617, 1639, 1631, 1615, 1634, 1642,
626 1649, 1644, 1641, 1656, 1650, 1658, 3880, 1664, 1677, 1659,
627 1671, 1682, 1679, 1674, 1685, 1676, 1681, 1691, 1698, 3880,
628 1692, 1701, 1694, 1708, 1719, 1720, 1730, 1734, 3880, 1736,
629 1737, 1739, 1718, 1728, 1746, 1723, 1747, 1754, 1756, 1761,
630 1753, 1763, 1760, 1774, 1764, 1765, 1773, 1783, 1780, 1790,
631 1779, 1799, 1787, 1743, 1807, 1800, 1808, 1794, 1804, 1816,
632 337, 1812, 1810, 1814, 1811, 3880, 76, 1834, 1817, 1827,
633 1853, 1854, 1846, 1838, 1842, 1857, 1843, 1849, 1866, 1850,
634 1863, 1877, 1867, 1883, 1873, 1893, 1878, 1881, 1891, 1889,
635
636 1884, 1900, 1880, 1911, 1907, 1909, 1923, 3880, 1875, 1912,
637 1927, 1920, 1936, 1946, 1918, 1928, 1916, 1950, 1947, 1955,
638 1956, 1961, 1958, 1953, 1965, 1969, 1970, 1977, 1991, 1979,
639 3880, 1985, 1986, 1976, 1996, 1992, 1987, 2006, 1997, 2004,
640 2025, 2026, 3880, 2027, 2034, 2016, 2040, 2021, 2044, 2045,
641 2046, 2031, 2054, 2047, 2058, 2042, 2043, 2057, 3880, 2069,
642 2079, 2075, 2083, 2084, 2070, 2077, 2092, 2074, 2072, 2087,
643 2078, 2097, 2082, 2102, 2106, 2107, 2110, 2085, 3880, 2140,
644 2112, 2123, 2137, 2125, 2127, 2144, 2131, 2153, 2104, 2136,
645 2154, 2152, 2155, 2156, 2159, 2176, 2175, 2160, 2170, 2187,
646
647 2198, 2199, 2195, 3880, 2200, 2193, 2182, 2210, 2208, 2194,
648 2197, 2211, 2209, 2202, 2212, 2214, 2225, 2226, 2232, 2227,
649 2234, 2250, 2242, 2252, 2253, 2254, 2235, 2264, 2260, 2280,
650 2268, 2271, 3880, 3880, 2281, 2269, 2272, 3880, 2285, 3880,
651 2289, 3880, 2291, 2299, 2287, 2276, 2304, 2290, 2306, 2303,
652 2318, 2298, 2311, 2330, 2316, 2332, 3880, 2321, 2326, 2341,
653 2324, 2336, 2338, 2350, 2349, 2314, 2353, 2360, 2364, 3880,
654 2367, 2357, 2375, 2328, 2385, 2371, 2369, 2383, 2387, 2381,
655 2390, 2393, 2401, 2400, 2405, 2409, 2397, 2414, 2394, 2427,
656 2415, 2417, 2419, 2424, 2436, 2438, 2432, 3880, 3880, 2449,
657
658 2452, 2441, 2451, 2442, 2471, 2463, 2462, 2473, 2465, 2468,
659 2475, 2477, 2469, 2479, 2500, 2487, 2495, 3880, 2490, 2498,
660 2509, 2505, 2519, 2510, 2526, 3880, 3880, 2525, 2518, 2521,
661 2515, 2528, 2536, 3880, 2537, 2543, 2546, 2560, 2562, 2532,
662 2549, 2564, 2569, 2561, 2568, 2570, 2581, 2571, 2585, 2584,
663 2586, 2593, 2591, 2601, 2589, 2594, 2595, 2599, 2604, 2605,
664 2623, 2624, 2609, 2626, 3880, 2637, 2616, 2639, 2613, 2644,
665 2646, 2641, 2643, 2640, 2649, 2652, 2627, 2658, 2651, 2679,
666 2661, 3880, 2674, 2671, 2684, 2685, 2666, 2689, 2676, 2693,
667 3880, 2695, 2699, 2703, 2698, 2697, 2710, 2719, 2711, 2718,
668
669 2716, 2724, 2734, 2732, 2736, 2744, 2727, 2742, 2738, 2749,
670 2757, 2768, 2758, 2776, 2761, 2774, 2765, 2755, 2785, 2764,
671 2791, 2781, 3880, 2787, 2789, 2794, 2792, 2797, 2800, 2801,
672 3880, 3880, 2784, 3880, 2814, 2804, 2821, 2823, 3880, 2809,
673 3880, 3880, 2820, 2839, 2827, 2837, 2841, 2840, 3880, 2845,
674 2831, 2854, 2835, 2848, 2857, 2861, 2859, 2865, 3880, 2871,
675 2875, 2862, 2881, 2879, 2891, 2868, 2892, 2903, 2904, 2906,
676 2895, 2896, 2914, 2910, 3880, 2907, 2921, 2925, 2917, 2937,
677 2943, 2930, 2938, 2942, 2953, 3880, 2941, 2940, 2955, 3880,
678 2957, 3880, 2969, 2934, 2970, 2928, 2974, 2951, 2972, 2984,
679
680 2987, 2976, 2993, 2986, 3880, 3880, 2995, 3000, 3006, 2996,
681 3012, 3001, 3009, 3020, 3003, 3018, 3880, 3014, 3021, 3022,
682 3030, 3032, 3880, 3046, 3047, 3041, 3045, 3059, 3055, 3061,
683 3049, 3063, 3066, 3052, 3075, 3078, 3064, 3880, 3079, 3092,
684 3076, 3094, 3081, 3090, 3097, 3112, 3104, 3088, 3109, 3880,
685 3114, 3103, 3115, 3111, 3106, 3127, 3110, 3131, 3125, 3143,
686 3134, 3141, 3142, 2999, 3153, 3880, 3140, 3880, 3154, 3164,
687 3168, 3173, 3880, 3170, 3167, 3880, 3169, 3161, 3183, 3194,
688 3186, 3202, 3199, 3187, 3201, 3188, 3206, 3190, 3197, 3880,
689 3220, 3213, 3214, 3217, 3880, 3880, 3226, 3880, 3880, 3223,
690
691 3880, 3880, 3232, 3239, 3880, 3242, 3880, 3224, 3247, 3240,
692 3230, 3238, 3880, 3255, 3880, 3880, 3253, 3259, 3246, 3257,
693 3268, 3271, 3272, 3264, 3263, 3265, 3266, 3282, 3280, 3296,
694 3288, 3275, 3286, 3298, 3290, 3302, 3292, 3307, 3313, 3320,
695 3880, 3304, 3325, 3880, 3330, 3323, 3321, 3317, 3324, 3338,
696 3337, 3346, 3359, 3343, 3341, 3347, 3880, 3352, 3880, 3880,
697 3355, 3363, 3361, 3357, 3362, 3880, 3376, 3373, 3377, 3378,
698 3880, 3880, 3880, 3390, 3374, 3386, 3401, 3403, 3389, 3880,
699 3394, 3405, 3407, 3399, 3411, 3415, 3424, 3425, 3427, 3880,
700 3426, 3417, 3880, 3437, 3430, 3436, 3438, 3448, 3441, 3880,
701
702 3442, 3452, 3446, 3451, 3455, 3454, 3475, 3880, 3457, 3470,
703 3880, 3459, 3880, 3880, 3465, 3489, 3488, 3494, 3495, 3478,
704 3486, 3503, 3501, 3502, 3880, 3880, 3498, 3880, 3880, 3492,
705 3512, 3505, 3507, 3510, 3509, 3522, 3517, 3531, 3525, 3880,
706 3547, 3880, 3528, 3548, 3552, 3551, 3880, 3553, 3549, 3532,
707 3880, 3880, 3558, 3564, 3559, 3880, 3566, 3572, 3575, 3582,
708 3596, 3591, 3585, 3584, 3598, 3599, 3587, 3588, 3605, 3611,
709 3880, 3610, 3602, 3614, 3617, 3619, 3620, 3623, 3625, 3642,
710 3641, 3648, 3632, 3880, 3640, 3650, 3656, 3657, 3658, 3659,
711 3660, 3880, 3669, 3880, 3661, 3666, 3880, 3880, 3665, 3674,
712
713 3684, 3880, 3685, 3880, 3675, 3676, 3700, 3880, 3880, 3880,
714 3679, 3880, 3701, 3880, 3694, 3692, 3880, 3681, 3709, 3710,
715 3880, 3713, 3880, 3714, 3880, 3703, 3717, 3880, 3880, 3880,
716 3880, 3716, 3719, 3723, 3724, 3880, 3734, 3711, 3729, 3735,
717 3880, 3880, 3788, 3795, 3802, 3809, 3816, 82, 3823, 3830,
718 3837, 3844, 3851, 3858, 3865, 3872
711719 } ;
712720
713 static yyconst flex_int16_t yy_def[1317] =
721 static yyconst flex_int16_t yy_def[1357] =
714722 { 0,
715 1302, 1, 1303, 1303, 1304, 1304, 1305, 1305, 1306, 1306,
716 1307, 1307, 1302, 1308, 1302, 1302, 1302, 1302, 1309, 1308,
717 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
718 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1310,
719 1302, 1302, 1302, 1310, 1311, 1302, 1302, 1302, 1311, 1312,
720 1302, 1302, 1302, 1302, 1312, 1313, 1302, 1302, 1302, 1313,
721 1314, 1302, 1315, 1302, 1314, 1314, 1308, 1308, 1302, 1316,
722 1309, 1316, 1309, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
723 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
724 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
725
726 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
727 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1310, 1310,
728 1311, 1311, 1312, 1312, 1302, 1313, 1313, 1314, 1314, 1315,
729 1315, 1314, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
730 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
731 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
732 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
733 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
734 1308, 1308, 1308, 1308, 1314, 1308, 1308, 1308, 1308, 1308,
735 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
736
737 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
738 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
739 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
740 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
741 1308, 1308, 1308, 1308, 1308, 1308, 1314, 1308, 1308, 1308,
742 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
743 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
744 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
745 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1302,
746 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
747
748 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
749 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
750 1314, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
751 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
752 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
753 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
754 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
755 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
756 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
757 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1314, 1308,
758
759 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1302,
760 1302, 1308, 1302, 1302, 1308, 1308, 1308, 1308, 1308, 1308,
761 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
762 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
763 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1302, 1308,
764 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1308,
765 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
766 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
767 1308, 1314, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
768 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
769
770 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308,
771 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
772 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1302, 1308,
773 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
774 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
775 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
776 1308, 1308, 1308, 1302, 1314, 1308, 1308, 1308, 1308, 1308,
777 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
778 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
779 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1308, 1308,
780
781 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
782 1308, 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308,
783 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308,
784 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
785 1308, 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
786 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
787 1308, 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
788 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
789 1308, 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308,
790 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
791
792 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
793 1308, 1308, 1308, 1302, 1302, 1308, 1308, 1308, 1302, 1302,
794 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
795 1308, 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308,
796 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1302,
797 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
798 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
799 1308, 1308, 1308, 1308, 1308, 1308, 1302, 1302, 1308, 1308,
800 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
801 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1308,
802
803 1308, 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1302,
804 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
805 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
806 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1302,
807 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
808 1308, 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308,
809 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1308, 1308,
810 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
811 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
812 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1308,
813
814 1308, 1308, 1308, 1302, 1302, 1308, 1302, 1308, 1308, 1308,
815 1308, 1302, 1302, 1302, 1308, 1308, 1308, 1308, 1308, 1308,
816 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
817 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
818 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1308,
819 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1302,
820 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
821 1308, 1308, 1308, 1308, 1302, 1302, 1308, 1308, 1308, 1308,
822 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
823 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
824
825 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1308,
826 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308,
827 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
828 1308, 1308, 1302, 1308, 1302, 1308, 1308, 1308, 1308, 1302,
829 1308, 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
830 1308, 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308,
831 1308, 1302, 1302, 1308, 1302, 1302, 1308, 1302, 1302, 1308,
832 1302, 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1302, 1308,
833 1302, 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
834 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
835
836 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1302, 1308,
837 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
838 1308, 1302, 1302, 1302, 1308, 1308, 1308, 1308, 1308, 1302,
839 1308, 1308, 1308, 1302, 1302, 1302, 1308, 1308, 1308, 1308,
840 1308, 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
841 1308, 1308, 1302, 1308, 1308, 1302, 1308, 1308, 1308, 1308,
842 1308, 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1302,
843 1308, 1308, 1302, 1308, 1302, 1308, 1308, 1308, 1308, 1308,
844 1308, 1308, 1308, 1308, 1308, 1302, 1302, 1308, 1302, 1302,
845 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
846
847 1302, 1308, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308,
848 1302, 1302, 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1308,
849 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
850 1302, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
851 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1308, 1308, 1308,
852 1308, 1302, 1308, 1302, 1308, 1308, 1302, 1302, 1308, 1308,
853 1308, 1302, 1308, 1302, 1308, 1308, 1308, 1302, 1302, 1302,
854 1308, 1302, 1308, 1302, 1308, 1308, 1302, 1308, 1308, 1308,
855 1302, 1308, 1302, 1308, 1302, 1308, 1308, 1302, 1302, 1302,
856 1302, 1308, 1308, 1308, 1308, 1302, 1308, 1308, 1308, 1308,
857
858 1302, 0, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302,
859 1302, 1302, 1302, 1302, 1302, 1302
723 1342, 1, 1343, 1343, 1344, 1344, 1345, 1345, 1346, 1346,
724 1347, 1347, 1342, 1348, 1342, 1342, 1342, 1342, 1349, 1348,
725 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
726 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1350,
727 1342, 1342, 1342, 1350, 1351, 1342, 1342, 1342, 1351, 1352,
728 1342, 1342, 1342, 1342, 1352, 1353, 1342, 1342, 1342, 1353,
729 1354, 1342, 1355, 1342, 1354, 1354, 1348, 1348, 1342, 1356,
730 1349, 1356, 1349, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
731 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
732 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
733
734 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
735 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1350,
736 1350, 1351, 1351, 1352, 1352, 1342, 1353, 1353, 1354, 1354,
737 1355, 1355, 1354, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
738 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
739 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
740 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
741 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
742 1348, 1348, 1348, 1348, 1348, 1348, 1354, 1348, 1348, 1348,
743 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
744
745 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
746 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
747 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
748 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
749 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1354,
750 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
751 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
752 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
753 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348,
754 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348,
755
756 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
757 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
758 1348, 1348, 1348, 1348, 1354, 1348, 1348, 1348, 1348, 1348,
759 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
760 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
761 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
762 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
763 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
764 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
765 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
766
767 1348, 1348, 1348, 1348, 1354, 1348, 1348, 1348, 1348, 1342,
768 1348, 1348, 1348, 1348, 1348, 1342, 1342, 1348, 1342, 1342,
769 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
770 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
771 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
772 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348,
773 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
774 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
775 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
776 1354, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
777
778 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
779 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348,
780 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
781 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348,
782 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
783 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
784 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
785 1348, 1348, 1348, 1348, 1348, 1342, 1354, 1348, 1348, 1348,
786 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
787 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
788
789 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348,
790 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
791 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
792 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
793 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
794 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348,
795 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
796 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348,
797 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
798 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
799
800 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348,
801 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
802 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
803 1348, 1348, 1342, 1342, 1348, 1348, 1348, 1342, 1348, 1342,
804 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
805 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348,
806 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
807 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
808 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
809 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1342, 1348,
810
811 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
812 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348,
813 1348, 1348, 1348, 1348, 1348, 1342, 1342, 1348, 1348, 1348,
814 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348,
815 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
816 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
817 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348,
818 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
819 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
820 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
821
822 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
823 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
824 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
825 1342, 1342, 1348, 1342, 1348, 1348, 1348, 1348, 1342, 1348,
826 1342, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348,
827 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348,
828 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
829 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348,
830 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1342,
831 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
832
833 1348, 1348, 1348, 1348, 1342, 1342, 1348, 1348, 1348, 1348,
834 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348,
835 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
836 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348,
837 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
838 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
839 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1342, 1348, 1348,
840 1348, 1348, 1342, 1348, 1348, 1342, 1348, 1348, 1348, 1348,
841 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
842 1348, 1348, 1348, 1348, 1342, 1342, 1348, 1342, 1342, 1348,
843
844 1342, 1342, 1348, 1348, 1342, 1348, 1342, 1348, 1348, 1348,
845 1348, 1348, 1342, 1348, 1342, 1342, 1348, 1348, 1348, 1348,
846 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
847 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
848 1342, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348,
849 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1342, 1342,
850 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348,
851 1342, 1342, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
852 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
853 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
854
855 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348,
856 1342, 1348, 1342, 1342, 1348, 1348, 1348, 1348, 1348, 1348,
857 1348, 1348, 1348, 1348, 1342, 1342, 1348, 1342, 1342, 1348,
858 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
859 1348, 1342, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348,
860 1342, 1342, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348,
861 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
862 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
863 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348,
864 1348, 1342, 1348, 1342, 1348, 1348, 1342, 1342, 1348, 1348,
865
866 1348, 1342, 1348, 1342, 1348, 1348, 1348, 1342, 1342, 1342,
867 1348, 1342, 1348, 1342, 1348, 1348, 1342, 1348, 1348, 1348,
868 1342, 1348, 1342, 1348, 1342, 1348, 1348, 1342, 1342, 1342,
869 1342, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348,
870 1342, 0, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
871 1342, 1342, 1342, 1342, 1342, 1342
860872 } ;
861873
862 static yyconst flex_int16_t yy_nxt[3811] =
874 static yyconst flex_int16_t yy_nxt[3946] =
863875 { 0,
864876 14, 15, 16, 17, 18, 19, 18, 14, 14, 14,
865877 14, 18, 20, 14, 21, 22, 23, 24, 14, 25,
870882 38, 14, 14, 14, 14, 41, 42, 43, 41, 42,
871883 43, 46, 47, 46, 47, 48, 86, 48, 51, 52,
872884 53, 54, 67, 18, 51, 52, 53, 54, 68, 18,
873 57, 58, 59, 57, 58, 59, 69, 119, 119, 121,
874
875 70, 44, 121, 86, 44, 126, 126, 49, 72, 49,
876 72, 72, 69, 72, 129, 55, 70, 67, 72, 67,
877 67, 55, 67, 84, 74, 75, 60, 67, 129, 60,
885 57, 58, 59, 57, 58, 59, 69, 120, 120, 122,
886
887 70, 44, 122, 86, 44, 127, 127, 49, 72, 49,
888 72, 72, 69, 72, 130, 55, 70, 67, 72, 67,
889 67, 55, 67, 84, 74, 75, 60, 67, 130, 60,
878890 15, 16, 17, 62, 63, 64, 15, 16, 17, 62,
879 63, 64, 76, 85, 174, 73, 68, 92, 68, 65,
880 84, 74, 75, 127, 77, 65, 80, 119, 119, 68,
891 63, 64, 76, 85, 176, 73, 68, 92, 68, 65,
892 84, 74, 75, 128, 77, 65, 80, 120, 120, 68,
881893 81, 78, 89, 82, 93, 90, 83, 66, 79, 76,
882 85, 87, 91, 66, 92, 68, 65, 125, 68, 88,
894 85, 87, 91, 66, 92, 68, 65, 126, 68, 88,
883895 68, 77, 65, 80, 94, 68, 68, 81, 78, 89,
884 82, 93, 90, 83, 135, 79, 68, 68, 87, 91,
885
886 95, 68, 121, 97, 96, 121, 88, 98, 100, 132,
887 101, 94, 68, 171, 68, 123, 102, 123, 123, 103,
888 123, 135, 129, 99, 124, 68, 104, 95, 68, 68,
889 97, 96, 105, 133, 98, 100, 132, 101, 134, 115,
890 171, 108, 106, 102, 116, 107, 103, 112, 149, 113,
891 99, 109, 68, 104, 68, 110, 111, 68, 117, 105,
892 133, 68, 118, 68, 114, 134, 115, 122, 108, 106,
893 68, 116, 107, 68, 112, 149, 113, 120, 109, 137,
894 126, 126, 110, 111, 68, 117, 136, 68, 68, 118,
895 72, 114, 72, 72, 128, 72, 128, 128, 67, 128,
896
897 67, 67, 72, 67, 72, 72, 137, 72, 67, 138,
898 68, 139, 72, 136, 140, 141, 142, 144, 145, 146,
899 68, 150, 68, 68, 154, 68, 68, 131, 68, 148,
900 68, 147, 68, 143, 68, 155, 138, 129, 139, 73,
901 68, 140, 141, 159, 144, 145, 146, 68, 150, 160,
902 151, 154, 68, 152, 161, 156, 148, 68, 147, 157,
903 143, 163, 155, 158, 162, 164, 68, 153, 68, 68,
904 159, 127, 68, 165, 68, 68, 160, 151, 166, 170,
905 152, 161, 156, 68, 68, 167, 157, 68, 163, 168,
906 158, 162, 164, 68, 153, 169, 68, 176, 175, 173,
907
908 165, 172, 68, 179, 647, 166, 170, 68, 68, 68,
909 178, 182, 167, 68, 68, 180, 168, 177, 187, 68,
910 183, 68, 169, 68, 176, 175, 173, 181, 172, 186,
911 179, 68, 184, 68, 68, 68, 125, 178, 182, 192,
912 185, 68, 180, 123, 177, 123, 123, 183, 123, 68,
913 128, 68, 128, 128, 181, 128, 186, 188, 72, 184,
914 72, 72, 189, 72, 129, 190, 191, 185, 124, 68,
915 68, 194, 193, 68, 200, 122, 120, 68, 201, 203,
916 68, 68, 202, 68, 188, 205, 68, 204, 1302, 189,
917 212, 1302, 190, 191, 68, 131, 1302, 68, 206, 193,
918
919 68, 200, 68, 195, 68, 201, 203, 68, 196, 202,
920 68, 68, 205, 197, 204, 207, 211, 212, 208, 198,
921 199, 209, 210, 213, 214, 206, 68, 68, 1302, 216,
922 195, 68, 215, 68, 68, 196, 219, 1302, 68, 217,
923 197, 220, 207, 211, 221, 208, 198, 199, 209, 210,
924 213, 218, 222, 223, 1302, 68, 235, 68, 68, 215,
925 68, 224, 225, 68, 226, 227, 217, 68, 220, 68,
926 68, 228, 229, 68, 230, 68, 239, 1302, 218, 237,
927 223, 68, 68, 68, 68, 68, 231, 68, 224, 225,
928 68, 226, 227, 233, 234, 232, 236, 238, 228, 229,
929
930 68, 230, 68, 68, 68, 241, 237, 68, 68, 244,
931 240, 242, 247, 231, 250, 1302, 249, 68, 68, 245,
932 233, 234, 232, 236, 238, 251, 248, 129, 256, 252,
933 263, 68, 241, 243, 68, 68, 246, 240, 255, 247,
934 68, 68, 68, 249, 68, 68, 245, 68, 253, 254,
935 267, 257, 251, 248, 68, 256, 252, 68, 258, 259,
936 243, 68, 68, 246, 260, 255, 261, 264, 68, 68,
937 265, 68, 262, 266, 269, 253, 254, 68, 257, 1302,
938 68, 68, 275, 68, 272, 258, 259, 1302, 68, 68,
939 68, 260, 271, 261, 264, 68, 68, 265, 268, 262,
940
941 266, 269, 270, 273, 276, 68, 68, 274, 68, 277,
942 68, 272, 68, 68, 280, 282, 283, 278, 281, 271,
943 279, 284, 68, 1302, 68, 268, 285, 68, 68, 270,
944 273, 276, 68, 68, 274, 290, 277, 289, 291, 288,
945 68, 280, 282, 283, 278, 281, 286, 279, 68, 287,
946 68, 68, 292, 285, 294, 68, 68, 293, 295, 298,
947 68, 68, 68, 296, 289, 291, 288, 299, 304, 68,
948 68, 297, 1302, 286, 305, 308, 287, 1302, 68, 292,
949 68, 294, 303, 68, 293, 306, 298, 404, 68, 68,
950 296, 68, 300, 68, 299, 301, 68, 302, 297, 68,
951
952 68, 305, 308, 68, 307, 309, 319, 311, 320, 303,
953 321, 68, 306, 323, 68, 322, 129, 1302, 68, 300,
954 68, 310, 301, 68, 302, 68, 68, 325, 1302, 68,
955 1302, 307, 309, 319, 311, 320, 1302, 321, 324, 1302,
956 323, 327, 322, 328, 326, 68, 332, 333, 310, 312,
957 313, 68, 1302, 68, 330, 68, 331, 329, 68, 314,
958 1302, 315, 316, 317, 68, 324, 318, 68, 327, 335,
959 328, 326, 334, 1302, 68, 68, 312, 313, 68, 68,
960 68, 330, 337, 331, 329, 338, 314, 336, 315, 316,
961 317, 340, 339, 318, 341, 68, 335, 1302, 68, 334,
962
963 68, 345, 344, 346, 342, 348, 347, 68, 1302, 337,
964 68, 349, 338, 350, 336, 68, 352, 343, 340, 339,
965 68, 341, 68, 68, 68, 351, 68, 353, 345, 344,
966 346, 342, 68, 347, 356, 68, 68, 355, 349, 68,
967 350, 354, 68, 352, 343, 357, 362, 68, 358, 68,
968 359, 361, 351, 360, 68, 68, 363, 68, 68, 1302,
969 368, 356, 365, 366, 355, 68, 364, 68, 354, 68,
970 68, 367, 357, 362, 68, 358, 68, 359, 361, 68,
971 360, 68, 68, 363, 68, 369, 370, 368, 371, 365,
972 366, 372, 375, 364, 374, 1302, 68, 68, 367, 373,
973
974 376, 377, 383, 382, 68, 1302, 68, 1302, 387, 68,
975 68, 68, 369, 68, 68, 371, 378, 68, 372, 375,
976 389, 374, 68, 379, 384, 386, 373, 376, 377, 383,
977 382, 380, 68, 385, 68, 387, 388, 390, 68, 391,
978 393, 381, 68, 378, 392, 397, 68, 389, 68, 68,
979 379, 395, 386, 68, 68, 68, 68, 394, 380, 396,
980 385, 1302, 68, 388, 390, 399, 391, 393, 381, 398,
981 400, 392, 397, 68, 1302, 401, 402, 68, 395, 403,
982 405, 68, 406, 410, 394, 68, 396, 407, 129, 408,
983 68, 409, 399, 68, 411, 68, 398, 68, 412, 68,
984
985 413, 68, 401, 402, 414, 68, 403, 405, 415, 406,
986 68, 416, 1302, 68, 407, 417, 408, 68, 409, 419,
987 418, 68, 420, 423, 421, 422, 424, 68, 425, 68,
988 429, 68, 68, 430, 1302, 426, 432, 68, 416, 68,
989 427, 68, 417, 68, 428, 68, 68, 418, 68, 420,
990 68, 421, 422, 424, 68, 425, 68, 429, 431, 68,
991 68, 433, 426, 432, 68, 435, 436, 427, 437, 438,
992 439, 428, 440, 1302, 441, 1302, 68, 443, 1302, 1302,
993 68, 442, 446, 434, 68, 431, 68, 68, 433, 444,
994 68, 68, 435, 436, 450, 437, 68, 439, 68, 440,
995
996 68, 441, 68, 68, 443, 445, 68, 447, 442, 446,
997 434, 448, 451, 452, 453, 449, 444, 1302, 454, 455,
998 1302, 460, 456, 459, 457, 68, 458, 68, 68, 68,
999 68, 68, 445, 68, 447, 68, 461, 68, 465, 451,
1000 452, 467, 68, 462, 68, 68, 455, 68, 460, 456,
1001 459, 457, 463, 458, 464, 68, 466, 468, 1302, 68,
1002 469, 68, 470, 461, 68, 1302, 68, 68, 467, 68,
1003 462, 473, 472, 68, 474, 475, 1302, 471, 476, 463,
1004 68, 464, 68, 466, 468, 68, 68, 469, 477, 470,
1005 480, 68, 479, 481, 478, 68, 68, 488, 473, 472,
1006
1007 68, 474, 475, 68, 471, 476, 68, 482, 68, 483,
1008 68, 1302, 68, 491, 484, 477, 485, 480, 486, 479,
1009 481, 478, 68, 489, 494, 497, 487, 508, 68, 129,
1010 490, 495, 68, 68, 482, 492, 483, 68, 493, 68,
1011 491, 484, 68, 485, 68, 486, 68, 68, 68, 496,
1012 489, 494, 68, 487, 68, 1302, 68, 490, 495, 504,
1013 1302, 505, 492, 509, 506, 493, 68, 1302, 507, 1302,
1014 68, 510, 68, 511, 1302, 1302, 496, 498, 1302, 499,
1015 1302, 68, 500, 68, 512, 68, 504, 501, 505, 513,
1016 509, 506, 68, 502, 503, 507, 514, 68, 510, 515,
1017
1018 511, 517, 68, 68, 498, 516, 499, 68, 520, 500,
1019 68, 512, 521, 68, 501, 1302, 513, 518, 522, 523,
1020 502, 503, 519, 514, 68, 531, 515, 68, 517, 68,
1021 68, 68, 516, 524, 525, 520, 527, 528, 526, 68,
1022 68, 529, 68, 530, 518, 522, 523, 68, 533, 519,
1023 535, 532, 68, 68, 534, 1302, 68, 68, 68, 68,
1024 524, 525, 68, 527, 528, 526, 536, 68, 68, 543,
1025 530, 544, 68, 538, 537, 533, 68, 535, 532, 68,
1026 539, 534, 540, 541, 542, 548, 68, 68, 68, 68,
1027 68, 68, 547, 536, 68, 545, 543, 546, 544, 551,
1028
1029 538, 537, 552, 68, 550, 68, 68, 539, 553, 540,
1030 541, 542, 548, 549, 555, 68, 68, 68, 554, 547,
1031 68, 556, 545, 557, 546, 68, 558, 68, 559, 552,
1032 68, 550, 561, 68, 560, 553, 68, 562, 564, 565,
1033 549, 555, 566, 68, 563, 554, 68, 567, 556, 68,
1034 557, 68, 68, 576, 68, 559, 568, 68, 1302, 561,
1035 569, 560, 570, 68, 68, 68, 129, 1302, 68, 566,
1036 68, 563, 578, 579, 567, 68, 68, 577, 581, 68,
1037 576, 582, 580, 568, 68, 583, 68, 569, 68, 570,
1038 571, 68, 572, 587, 588, 589, 573, 1302, 574, 578,
1039
1040 579, 590, 68, 575, 577, 581, 584, 68, 582, 580,
1041 68, 593, 591, 585, 68, 68, 68, 571, 592, 572,
1042 587, 588, 589, 573, 68, 574, 595, 68, 590, 596,
1043 575, 586, 68, 584, 68, 594, 597, 68, 593, 591,
1044 585, 598, 599, 68, 601, 592, 600, 603, 604, 608,
1045 68, 1302, 68, 68, 602, 68, 596, 605, 586, 607,
1046 68, 610, 594, 606, 68, 68, 68, 68, 598, 599,
1047 68, 601, 68, 600, 603, 604, 68, 68, 611, 609,
1048 68, 602, 612, 68, 605, 613, 607, 614, 610, 615,
1049 606, 68, 616, 1302, 1302, 618, 617, 626, 619, 640,
1050
1051 68, 622, 620, 68, 68, 611, 609, 621, 68, 612,
1052 624, 623, 613, 68, 614, 627, 628, 625, 68, 68,
1053 68, 68, 618, 68, 626, 619, 68, 629, 622, 620,
1054 68, 630, 68, 631, 621, 68, 68, 624, 623, 68,
1055 68, 632, 627, 68, 625, 68, 633, 634, 635, 636,
1056 68, 639, 643, 68, 629, 637, 638, 68, 630, 641,
1057 631, 68, 1302, 1302, 68, 642, 655, 68, 632, 646,
1058 68, 68, 645, 633, 634, 635, 636, 68, 639, 68,
1059 68, 644, 637, 638, 68, 68, 648, 649, 656, 68,
1060 68, 652, 642, 650, 653, 68, 646, 68, 651, 645,
1061
1062 68, 68, 654, 658, 68, 68, 68, 1302, 644, 68,
1063 657, 659, 660, 648, 649, 661, 68, 663, 652, 68,
1064 650, 653, 664, 662, 68, 651, 666, 68, 665, 654,
1065 658, 68, 68, 667, 68, 68, 668, 657, 659, 660,
1066 671, 68, 661, 669, 68, 670, 68, 672, 68, 664,
1067 662, 68, 68, 666, 673, 665, 674, 676, 68, 68,
1068 667, 677, 680, 668, 68, 675, 68, 671, 68, 68,
1069 669, 68, 670, 678, 672, 683, 681, 682, 1302, 679,
1070 68, 673, 68, 674, 676, 68, 68, 685, 677, 680,
1071 68, 684, 675, 686, 68, 689, 688, 687, 68, 690,
1072
1073 678, 691, 683, 1302, 682, 694, 679, 68, 695, 68,
1074 68, 692, 693, 68, 685, 697, 696, 698, 684, 1302,
1075 699, 68, 689, 688, 68, 68, 700, 68, 691, 1302,
1076 68, 68, 694, 68, 68, 695, 1302, 706, 692, 693,
1077 705, 1302, 68, 696, 1302, 701, 68, 699, 68, 68,
1078 702, 1302, 703, 700, 704, 711, 68, 707, 709, 708,
1079 68, 714, 710, 68, 706, 715, 712, 705, 68, 68,
1080 68, 68, 701, 716, 68, 68, 713, 702, 68, 703,
1081 717, 704, 711, 718, 707, 709, 708, 719, 68, 710,
1082 720, 68, 68, 712, 721, 722, 724, 68, 723, 730,
1083
1084 716, 725, 68, 713, 726, 68, 727, 717, 728, 731,
1085 718, 733, 729, 1302, 68, 68, 68, 68, 68, 732,
1086 68, 721, 68, 724, 737, 723, 68, 734, 725, 68,
1087 68, 726, 68, 727, 736, 728, 735, 740, 744, 729,
1088 68, 68, 68, 739, 68, 68, 732, 68, 738, 741,
1089 68, 68, 742, 743, 734, 68, 68, 747, 1302, 68,
1090 745, 736, 68, 735, 68, 744, 68, 68, 68, 746,
1091 739, 68, 753, 748, 749, 738, 741, 68, 750, 742,
1092 743, 751, 68, 752, 747, 757, 754, 745, 756, 758,
1093 755, 759, 68, 68, 68, 68, 746, 68, 760, 753,
1094
1095 748, 761, 68, 68, 762, 68, 68, 763, 751, 765,
1096 752, 68, 757, 754, 766, 756, 758, 755, 759, 767,
1097 769, 764, 770, 68, 68, 760, 68, 68, 761, 68,
1098 68, 762, 768, 771, 763, 772, 765, 1302, 68, 774,
1099 68, 766, 68, 773, 778, 1302, 767, 769, 764, 775,
1100 776, 781, 68, 68, 777, 779, 1302, 68, 782, 768,
1101 780, 68, 772, 68, 68, 68, 774, 783, 68, 784,
1102 773, 68, 68, 787, 792, 68, 775, 68, 781, 788,
1103 785, 68, 779, 786, 793, 68, 68, 780, 68, 68,
1104 789, 68, 790, 791, 783, 794, 784, 68, 68, 796,
1105
1106 787, 792, 68, 797, 799, 795, 788, 785, 802, 798,
1107 786, 793, 68, 68, 801, 68, 68, 789, 68, 790,
1108 791, 800, 794, 803, 1302, 68, 68, 804, 1302, 805,
1109 797, 808, 795, 806, 809, 68, 798, 810, 1302, 68,
1110 68, 801, 807, 68, 68, 68, 68, 812, 800, 814,
1111 68, 68, 811, 68, 804, 68, 805, 813, 808, 68,
1112 806, 809, 68, 815, 68, 68, 817, 816, 818, 807,
1113 819, 826, 820, 68, 812, 68, 814, 68, 821, 811,
1114 822, 824, 823, 68, 813, 68, 68, 68, 68, 68,
1115 815, 825, 832, 817, 816, 818, 827, 819, 68, 820,
1116
1117 829, 828, 68, 68, 830, 821, 68, 822, 824, 823,
1118 831, 833, 68, 68, 68, 1302, 68, 834, 825, 832,
1119 835, 68, 840, 827, 837, 836, 68, 829, 828, 68,
1120 838, 830, 68, 839, 68, 846, 841, 831, 843, 842,
1121 845, 848, 68, 68, 834, 68, 68, 835, 68, 68,
1122 68, 837, 836, 68, 844, 68, 847, 838, 68, 864,
1123 839, 68, 846, 841, 849, 843, 842, 845, 850, 853,
1124 68, 68, 68, 851, 852, 68, 857, 856, 1302, 68,
1125 859, 844, 858, 847, 854, 860, 68, 855, 68, 68,
1126 68, 849, 863, 68, 865, 850, 853, 870, 68, 68,
1127
1128 851, 852, 68, 68, 856, 861, 68, 859, 862, 858,
1129 68, 854, 860, 866, 855, 867, 868, 869, 871, 863,
1130 68, 68, 872, 68, 870, 68, 873, 68, 875, 68,
1131 68, 876, 861, 877, 1302, 862, 878, 68, 874, 882,
1132 866, 879, 867, 868, 869, 871, 880, 68, 68, 872,
1133 883, 1302, 881, 873, 68, 68, 1302, 889, 68, 68,
1134 877, 885, 68, 884, 68, 874, 882, 68, 879, 68,
1135 68, 886, 68, 880, 887, 890, 1302, 883, 888, 881,
1136 68, 891, 68, 68, 889, 68, 893, 892, 885, 894,
1137 884, 896, 898, 68, 895, 899, 900, 68, 886, 897,
1138
1139 908, 887, 890, 68, 68, 888, 68, 68, 891, 68,
1140 68, 902, 68, 893, 892, 901, 894, 915, 68, 898,
1141 68, 895, 899, 903, 904, 905, 897, 68, 906, 907,
1142 68, 68, 910, 909, 911, 912, 913, 914, 902, 68,
1143 68, 68, 901, 916, 68, 917, 68, 919, 68, 1302,
1144 903, 68, 68, 921, 923, 906, 68, 918, 1302, 910,
1145 909, 911, 68, 68, 68, 922, 68, 68, 927, 920,
1146 916, 68, 924, 931, 925, 68, 68, 930, 68, 926,
1147 68, 928, 929, 68, 918, 68, 933, 68, 68, 68,
1148 934, 68, 922, 932, 68, 927, 920, 68, 935, 924,
1149
1150 68, 925, 936, 937, 930, 939, 926, 941, 928, 929,
1151 938, 68, 68, 933, 940, 68, 68, 934, 68, 944,
1152 932, 68, 68, 942, 943, 935, 68, 945, 1302, 936,
1153 937, 68, 939, 946, 941, 947, 949, 938, 948, 950,
1154 951, 940, 956, 68, 1302, 68, 944, 68, 68, 952,
1155 942, 68, 957, 953, 945, 68, 68, 68, 68, 954,
1156 68, 958, 947, 949, 955, 948, 950, 951, 959, 68,
1157 68, 68, 963, 960, 68, 68, 952, 961, 964, 957,
1158 953, 962, 965, 966, 967, 970, 954, 968, 958, 972,
1159 969, 955, 68, 68, 973, 974, 971, 975, 68, 68,
1160
1161 68, 68, 68, 68, 976, 964, 977, 68, 68, 68,
1162 966, 967, 978, 68, 968, 979, 68, 969, 982, 68,
1163 68, 973, 974, 971, 68, 980, 981, 68, 984, 983,
1164 985, 68, 986, 977, 68, 988, 68, 68, 987, 978,
1165 992, 68, 979, 68, 68, 982, 990, 1302, 68, 991,
1166 68, 68, 980, 981, 989, 984, 983, 985, 993, 986,
1167 995, 994, 997, 996, 68, 987, 68, 68, 68, 68,
1168 1000, 1002, 68, 990, 68, 1003, 991, 68, 68, 998,
1169 999, 989, 68, 1004, 1001, 993, 68, 995, 994, 997,
1170 996, 68, 68, 68, 68, 68, 1005, 1000, 1002, 1006,
1171
1172 68, 1302, 1003, 1007, 68, 1008, 998, 999, 1009, 1010,
1173 1004, 1001, 1011, 1012, 68, 1014, 1015, 1013, 1018, 1302,
1174 1016, 1302, 68, 1005, 68, 1302, 68, 68, 68, 1017,
1175 1007, 68, 1008, 68, 68, 1009, 1010, 1019, 68, 1011,
1176 1012, 1022, 68, 1015, 1013, 68, 68, 1016, 1020, 1024,
1177 1023, 1021, 68, 1026, 1027, 1032, 1017, 1025, 1028, 68,
1178 1033, 68, 1029, 1035, 1019, 68, 68, 68, 1022, 68,
1179 1030, 68, 1031, 68, 68, 1020, 1024, 1023, 1021, 68,
1180 1026, 1027, 1032, 68, 1025, 1028, 1034, 68, 1036, 1029,
1181 68, 68, 1038, 1037, 1039, 1040, 68, 1030, 1041, 1031,
1182
1183 1042, 1043, 1302, 1044, 68, 1302, 1050, 68, 68, 1045,
1184 1046, 1047, 1302, 1034, 68, 1036, 68, 68, 68, 1038,
1185 1037, 1039, 68, 1048, 68, 1041, 1049, 1042, 68, 68,
1186 1044, 1051, 68, 1050, 68, 68, 1045, 1046, 1047, 68,
1187 1052, 1053, 1055, 68, 1057, 1054, 1056, 1059, 68, 68,
1188 1048, 68, 68, 1049, 1058, 1062, 1060, 68, 1051, 1061,
1189 1063, 68, 1064, 1065, 1066, 1068, 1069, 1052, 1053, 1055,
1190 68, 68, 1054, 1056, 1059, 1070, 68, 1071, 68, 1073,
1191 1067, 1058, 68, 1060, 1076, 68, 1061, 68, 68, 1064,
1192 68, 68, 68, 68, 1075, 1072, 1074, 68, 1077, 1079,
1193
1194 1081, 1080, 1070, 68, 68, 68, 68, 1067, 68, 68,
1195 1082, 1076, 1084, 1078, 1085, 68, 1083, 68, 1302, 1088,
1196 1086, 1075, 1072, 1074, 68, 1077, 68, 68, 1080, 68,
1197 1087, 1090, 68, 68, 1092, 1094, 1091, 68, 68, 1084,
1198 1078, 1085, 68, 1083, 1089, 1095, 1088, 1086, 68, 1093,
1199 68, 1097, 68, 68, 1098, 1096, 1099, 1087, 1090, 1302,
1200 1302, 1092, 68, 1091, 1302, 1100, 68, 68, 68, 68,
1201 1103, 1089, 1095, 1101, 1102, 1104, 1093, 1106, 1097, 1108,
1202 68, 1098, 1096, 1105, 1107, 68, 68, 68, 1109, 1111,
1203 1110, 68, 1100, 1115, 1302, 1112, 68, 1103, 1116, 68,
1204
1205 1101, 1102, 1104, 68, 68, 68, 1108, 68, 1114, 1118,
1206 1105, 1107, 68, 1113, 1119, 68, 1111, 1110, 68, 68,
1207 68, 1117, 1112, 1121, 68, 1116, 1120, 1122, 1123, 1124,
1208 68, 68, 68, 68, 1125, 1114, 1118, 1126, 1302, 1128,
1209 1113, 1119, 1130, 1132, 68, 1129, 1127, 1302, 1117, 68,
1210 1121, 68, 1131, 1120, 68, 68, 68, 68, 1133, 1134,
1211 1135, 1136, 1137, 68, 1126, 68, 1128, 68, 68, 68,
1212 1132, 1143, 1129, 1127, 68, 1138, 1139, 68, 1140, 1131,
1213 68, 1141, 1144, 1142, 68, 1133, 68, 68, 68, 1137,
1214 68, 68, 1146, 68, 1145, 68, 68, 1147, 68, 68,
1215
1216 68, 1148, 1138, 1139, 68, 1140, 1150, 1149, 1141, 1144,
1217 1142, 68, 1153, 1151, 1152, 68, 1154, 1164, 1155, 1146,
1218 68, 1145, 1156, 1159, 1147, 68, 1158, 1163, 1148, 1157,
1219 1302, 1161, 68, 1150, 1149, 68, 68, 1160, 68, 68,
1220 1151, 1152, 68, 1154, 68, 1155, 68, 68, 68, 68,
1221 1159, 1162, 1166, 1158, 68, 1165, 1157, 1169, 1161, 68,
1222 68, 1167, 1168, 1170, 1160, 1171, 1172, 68, 68, 68,
1223 1173, 1175, 1174, 1302, 1176, 68, 1178, 68, 1162, 1166,
1224 68, 68, 1165, 1179, 1169, 1180, 1177, 1181, 1167, 1168,
1225 68, 68, 1171, 1172, 68, 1183, 1182, 68, 68, 1174,
1226
1227 68, 1176, 1184, 1178, 1185, 68, 68, 68, 68, 1186,
1228 1179, 1187, 1180, 1177, 1181, 1188, 68, 68, 1189, 1302,
1229 1190, 1191, 1183, 1182, 68, 1192, 1193, 1194, 1302, 1184,
1230 1197, 1185, 1201, 1195, 1199, 1302, 68, 1196, 68, 1302,
1231 68, 68, 68, 68, 1198, 68, 68, 68, 1191, 1202,
1232 68, 68, 1192, 1193, 1194, 68, 68, 1197, 1200, 68,
1233 1195, 1199, 68, 1203, 1196, 1204, 68, 68, 1205, 1206,
1234 1207, 1198, 1208, 1302, 1209, 1215, 1202, 1211, 1210, 68,
1235 1212, 1214, 68, 68, 1213, 1200, 68, 68, 1216, 1217,
1236 1203, 1220, 1204, 68, 68, 1205, 1206, 68, 1218, 1208,
1237
1238 68, 1209, 68, 1222, 68, 1210, 68, 68, 1214, 1219,
1239 68, 1213, 68, 1221, 1227, 68, 1217, 68, 1220, 68,
1240 1223, 68, 1224, 1226, 68, 1218, 1225, 1228, 1229, 68,
1241 1222, 68, 68, 68, 68, 1231, 1219, 1230, 1232, 1233,
1242 1221, 1227, 1234, 1235, 68, 1237, 68, 1223, 1238, 1224,
1243 1226, 1302, 68, 1225, 1228, 1229, 1240, 68, 68, 1239,
1244 68, 68, 68, 1241, 1230, 1232, 1233, 68, 1242, 1234,
1245 1235, 1236, 1237, 68, 68, 1238, 68, 68, 68, 1243,
1246 1244, 68, 1245, 1240, 1247, 1246, 1239, 1252, 1249, 1248,
1247 1241, 68, 68, 1250, 68, 1242, 68, 1251, 1236, 1253,
1248
1249 68, 1254, 1257, 1258, 1262, 68, 1243, 68, 68, 1245,
1250 68, 1247, 1246, 1264, 68, 1249, 1248, 1256, 1255, 1259,
1251 1250, 68, 68, 1260, 1251, 68, 1253, 68, 68, 68,
1252 68, 68, 1261, 1263, 1265, 1267, 1266, 1268, 68, 68,
1253 68, 1269, 68, 1270, 1256, 1255, 1259, 1271, 68, 68,
1254 1260, 1272, 1302, 1273, 1274, 1275, 1276, 68, 1277, 1261,
1255 1263, 1265, 1267, 1266, 68, 1278, 1279, 1281, 68, 68,
1256 68, 1283, 1282, 1284, 1271, 68, 1285, 68, 68, 68,
1257 1273, 68, 1275, 1276, 1280, 68, 1288, 68, 68, 1286,
1258 1289, 68, 1278, 1279, 68, 68, 68, 1287, 68, 1282,
1259
1260 1284, 68, 1290, 68, 1291, 1292, 68, 1293, 1302, 1296,
1261 1297, 1280, 1294, 68, 1295, 1298, 1286, 68, 1300, 1301,
1262 68, 68, 1302, 1302, 1287, 1299, 68, 68, 68, 68,
1263 1302, 68, 1292, 68, 1293, 68, 68, 1297, 68, 1294,
1264 1302, 1295, 1298, 1302, 1302, 1300, 68, 1302, 1302, 1302,
1265 1302, 1302, 1299, 40, 40, 40, 40, 40, 40, 40,
1266 45, 45, 45, 45, 45, 45, 45, 50, 50, 50,
1267 50, 50, 50, 50, 56, 56, 56, 56, 56, 56,
1268 56, 61, 61, 61, 61, 61, 61, 61, 71, 71,
1269 1302, 71, 71, 71, 71, 119, 119, 1302, 1302, 1302,
1270
1271 119, 119, 121, 121, 1302, 1302, 121, 1302, 121, 123,
1272 1302, 1302, 1302, 1302, 1302, 123, 126, 126, 1302, 1302,
1273 1302, 126, 126, 128, 1302, 1302, 1302, 1302, 1302, 128,
1274 130, 130, 1302, 130, 130, 130, 130, 72, 72, 1302,
1275 72, 72, 72, 72, 13, 1302, 1302, 1302, 1302, 1302,
1276 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302,
1277 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302,
1278 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302,
1279 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302,
1280 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302,
1281
1282 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302
896 82, 93, 90, 83, 95, 79, 68, 68, 87, 91,
897
898 96, 125, 122, 98, 97, 122, 88, 99, 101, 133,
899 102, 94, 68, 173, 68, 124, 103, 124, 124, 104,
900 124, 95, 130, 100, 123, 68, 105, 96, 68, 68,
901 98, 97, 106, 134, 99, 101, 133, 102, 135, 116,
902 173, 109, 107, 103, 117, 108, 104, 113, 150, 114,
903 100, 110, 68, 105, 68, 111, 112, 68, 118, 106,
904 134, 68, 119, 68, 115, 135, 116, 121, 109, 107,
905 68, 117, 108, 68, 113, 150, 114, 68, 110, 136,
906 127, 127, 111, 112, 68, 118, 68, 137, 130, 119,
907 72, 115, 72, 72, 129, 72, 129, 129, 67, 129,
908
909 67, 67, 72, 67, 72, 72, 136, 72, 67, 138,
910 139, 68, 72, 140, 137, 141, 142, 143, 68, 145,
911 128, 68, 146, 68, 68, 189, 147, 132, 68, 68,
912 126, 149, 68, 155, 144, 68, 138, 139, 148, 73,
913 140, 68, 141, 142, 151, 663, 145, 68, 68, 146,
914 156, 160, 152, 147, 68, 153, 68, 68, 149, 158,
915 155, 144, 161, 159, 68, 148, 163, 162, 164, 154,
916 157, 151, 68, 125, 166, 68, 68, 156, 160, 152,
917 68, 68, 153, 68, 165, 68, 158, 68, 68, 161,
918 159, 167, 172, 163, 162, 164, 154, 157, 68, 168,
919
920 169, 166, 171, 175, 170, 174, 68, 180, 68, 68,
921 177, 165, 68, 68, 68, 178, 68, 181, 167, 172,
922 183, 184, 68, 185, 68, 68, 168, 169, 68, 171,
923 175, 170, 174, 182, 180, 179, 186, 177, 68, 68,
924 123, 68, 178, 68, 181, 68, 187, 183, 184, 124,
925 185, 124, 124, 129, 124, 129, 129, 188, 129, 190,
926 182, 191, 179, 186, 72, 192, 72, 72, 193, 72,
927 130, 68, 194, 187, 121, 68, 196, 68, 195, 68,
928 68, 68, 1342, 202, 188, 203, 190, 205, 191, 204,
929 1342, 68, 192, 68, 206, 193, 1342, 1342, 1342, 1342,
930
931 68, 132, 208, 68, 1342, 195, 207, 68, 197, 68,
932 202, 68, 203, 198, 205, 68, 204, 68, 199, 210,
933 209, 206, 211, 214, 200, 201, 213, 212, 68, 208,
934 68, 68, 68, 207, 68, 197, 68, 216, 217, 222,
935 198, 224, 220, 225, 215, 199, 210, 209, 68, 211,
936 214, 200, 201, 213, 212, 68, 218, 221, 223, 226,
937 68, 227, 230, 68, 68, 217, 219, 68, 68, 220,
938 68, 215, 68, 229, 68, 234, 228, 231, 232, 68,
939 68, 238, 68, 68, 221, 223, 226, 68, 227, 230,
940 68, 233, 239, 219, 68, 240, 68, 68, 68, 68,
941
942 229, 235, 234, 228, 231, 232, 68, 236, 237, 241,
943 242, 244, 68, 243, 247, 1342, 68, 245, 233, 239,
944 68, 68, 240, 253, 251, 248, 1342, 1342, 235, 68,
945 252, 250, 68, 254, 236, 237, 241, 68, 244, 246,
946 243, 68, 249, 258, 255, 68, 130, 259, 68, 68,
947 68, 251, 248, 256, 68, 68, 68, 252, 250, 257,
948 254, 260, 68, 265, 261, 262, 246, 68, 1342, 249,
949 258, 255, 263, 68, 259, 68, 266, 68, 68, 264,
950 256, 68, 267, 270, 268, 288, 257, 68, 260, 272,
951 265, 261, 262, 269, 271, 68, 68, 273, 68, 263,
952
953 275, 68, 68, 68, 274, 278, 264, 68, 276, 267,
954 68, 268, 68, 277, 68, 68, 272, 68, 68, 279,
955 269, 271, 280, 283, 273, 1342, 68, 275, 68, 281,
956 284, 274, 282, 285, 289, 276, 68, 68, 1342, 68,
957 277, 68, 292, 68, 68, 1342, 279, 294, 68, 280,
958 283, 286, 287, 293, 68, 295, 281, 284, 68, 282,
959 285, 289, 290, 299, 296, 291, 1342, 1342, 298, 292,
960 308, 68, 68, 297, 68, 68, 68, 68, 286, 287,
961 293, 300, 295, 301, 1342, 68, 303, 302, 68, 290,
962 68, 296, 291, 304, 68, 298, 305, 307, 306, 68,
963
964 297, 68, 1342, 310, 68, 68, 309, 1342, 300, 68,
965 301, 68, 311, 303, 302, 68, 312, 1342, 313, 68,
966 304, 325, 315, 305, 307, 306, 323, 130, 68, 68,
967 310, 1342, 324, 309, 314, 68, 1342, 329, 68, 311,
968 328, 1342, 68, 312, 326, 313, 327, 68, 325, 315,
969 68, 1342, 68, 323, 331, 1342, 334, 330, 68, 324,
970 1342, 314, 316, 317, 68, 332, 68, 328, 68, 68,
971 1342, 326, 318, 327, 319, 320, 321, 68, 333, 322,
972 339, 331, 335, 334, 330, 68, 340, 68, 338, 316,
973 317, 68, 332, 336, 337, 68, 342, 68, 341, 318,
974
975 1342, 319, 320, 321, 68, 333, 322, 339, 343, 335,
976 344, 68, 348, 340, 345, 338, 346, 352, 349, 68,
977 1342, 68, 68, 342, 350, 341, 351, 68, 353, 347,
978 68, 68, 354, 1342, 68, 343, 355, 344, 356, 348,
979 68, 345, 357, 346, 68, 349, 1342, 68, 68, 68,
980 68, 350, 358, 351, 68, 353, 347, 359, 68, 354,
981 361, 360, 1342, 355, 68, 356, 363, 362, 1342, 364,
982 1342, 365, 68, 68, 366, 68, 68, 369, 372, 358,
983 68, 367, 375, 370, 359, 368, 68, 361, 360, 68,
984 68, 68, 68, 363, 362, 68, 364, 68, 365, 371,
985
986 68, 366, 373, 68, 369, 372, 68, 376, 367, 374,
987 370, 1342, 368, 68, 377, 378, 68, 380, 379, 68,
988 381, 389, 1342, 1342, 68, 382, 371, 1342, 68, 373,
989 68, 68, 68, 68, 376, 406, 374, 393, 68, 68,
990 390, 377, 378, 388, 380, 379, 395, 381, 389, 391,
991 68, 1342, 382, 383, 392, 394, 1342, 68, 384, 399,
992 385, 68, 396, 68, 393, 398, 68, 68, 386, 397,
993 388, 68, 68, 395, 68, 401, 391, 68, 387, 68,
994 383, 392, 394, 400, 68, 384, 399, 385, 68, 396,
995 402, 403, 398, 405, 404, 386, 397, 68, 407, 68,
996
997 408, 409, 401, 410, 411, 387, 68, 412, 68, 68,
998 400, 413, 414, 68, 416, 68, 130, 402, 403, 68,
999 405, 404, 68, 68, 417, 407, 415, 408, 409, 418,
1000 68, 411, 419, 421, 412, 420, 68, 425, 413, 414,
1001 68, 68, 422, 423, 424, 1342, 1342, 429, 68, 426,
1002 428, 68, 427, 415, 1342, 1342, 1342, 68, 430, 68,
1003 68, 436, 68, 435, 68, 68, 437, 68, 68, 422,
1004 423, 424, 68, 431, 68, 438, 426, 428, 68, 427,
1005 68, 439, 432, 441, 68, 430, 68, 433, 445, 68,
1006 435, 434, 68, 437, 443, 1342, 446, 442, 444, 68,
1007
1008 431, 457, 438, 440, 68, 68, 68, 447, 439, 432,
1009 441, 68, 448, 68, 433, 449, 68, 68, 434, 68,
1010 450, 443, 451, 446, 442, 444, 452, 453, 454, 68,
1011 440, 68, 68, 1342, 447, 68, 68, 68, 458, 448,
1012 455, 461, 449, 459, 456, 462, 1342, 450, 68, 451,
1013 68, 68, 463, 452, 453, 454, 68, 464, 460, 465,
1014 466, 1342, 1342, 470, 471, 458, 467, 68, 68, 68,
1015 459, 68, 68, 468, 68, 469, 68, 68, 474, 463,
1016 68, 68, 68, 472, 464, 460, 465, 466, 475, 473,
1017 470, 471, 68, 467, 476, 477, 68, 478, 68, 480,
1018
1019 468, 68, 469, 479, 490, 483, 1342, 68, 482, 68,
1020 472, 481, 485, 484, 68, 475, 473, 68, 68, 68,
1021 68, 476, 477, 486, 478, 68, 480, 68, 68, 488,
1022 479, 490, 483, 68, 68, 482, 489, 487, 481, 485,
1023 484, 494, 492, 491, 493, 68, 68, 68, 497, 68,
1024 486, 495, 1342, 498, 68, 500, 488, 1342, 1342, 496,
1025 506, 501, 1342, 489, 487, 130, 68, 68, 494, 492,
1026 491, 493, 499, 68, 68, 502, 68, 68, 495, 68,
1027 498, 68, 500, 503, 504, 68, 496, 513, 501, 505,
1028 1342, 68, 1342, 515, 514, 68, 517, 1342, 518, 499,
1029
1030 1342, 68, 502, 68, 516, 68, 1342, 1342, 522, 68,
1031 503, 504, 68, 519, 513, 1342, 505, 507, 68, 508,
1032 515, 514, 509, 68, 520, 518, 521, 510, 68, 525,
1033 523, 516, 68, 511, 512, 522, 68, 68, 526, 68,
1034 519, 529, 68, 530, 507, 531, 508, 524, 68, 509,
1035 527, 520, 68, 521, 510, 68, 525, 523, 528, 532,
1036 511, 512, 68, 68, 68, 526, 533, 68, 529, 534,
1037 68, 535, 536, 537, 524, 541, 68, 527, 539, 563,
1038 543, 68, 538, 68, 540, 528, 532, 68, 68, 542,
1039 68, 545, 1342, 533, 1342, 68, 534, 68, 535, 536,
1040
1041 537, 544, 68, 68, 68, 68, 68, 543, 546, 538,
1042 68, 540, 554, 547, 68, 551, 542, 68, 545, 549,
1043 68, 548, 68, 550, 555, 68, 552, 553, 544, 68,
1044 68, 68, 556, 1342, 68, 546, 557, 68, 558, 554,
1045 547, 68, 551, 560, 68, 559, 549, 68, 548, 565,
1046 550, 555, 564, 552, 553, 561, 68, 68, 68, 556,
1047 562, 567, 68, 557, 68, 558, 566, 571, 568, 570,
1048 560, 569, 559, 68, 68, 68, 565, 572, 573, 564,
1049 574, 68, 561, 68, 1342, 576, 68, 562, 567, 575,
1050 577, 68, 68, 566, 571, 568, 68, 68, 569, 579,
1051
1052 68, 578, 580, 581, 572, 573, 68, 582, 1342, 588,
1053 68, 68, 68, 68, 1342, 590, 575, 130, 591, 589,
1054 68, 68, 68, 594, 595, 593, 579, 68, 578, 580,
1055 581, 68, 68, 592, 582, 583, 588, 584, 68, 68,
1056 601, 585, 590, 586, 68, 591, 589, 600, 587, 1342,
1057 594, 596, 593, 68, 603, 68, 597, 602, 598, 68,
1058 592, 608, 583, 605, 584, 604, 606, 601, 585, 68,
1059 586, 610, 68, 609, 600, 587, 599, 68, 596, 68,
1060 68, 603, 68, 597, 602, 598, 607, 68, 68, 612,
1061 605, 611, 604, 606, 68, 613, 68, 68, 614, 615,
1062
1063 609, 617, 68, 599, 616, 621, 619, 618, 1342, 68,
1064 624, 620, 68, 607, 68, 68, 612, 68, 611, 68,
1065 68, 622, 613, 68, 625, 614, 615, 623, 617, 68,
1066 68, 616, 68, 619, 618, 626, 68, 624, 620, 68,
1067 627, 629, 628, 630, 635, 1342, 68, 631, 622, 632,
1068 656, 625, 633, 634, 623, 638, 68, 68, 68, 636,
1069 637, 68, 626, 639, 643, 1342, 68, 627, 68, 628,
1070 640, 635, 68, 641, 68, 68, 632, 68, 642, 633,
1071 634, 68, 638, 644, 68, 68, 636, 637, 646, 645,
1072 639, 68, 68, 647, 68, 648, 651, 640, 68, 68,
1073
1074 641, 68, 68, 68, 649, 642, 652, 650, 653, 655,
1075 644, 68, 68, 654, 657, 646, 645, 68, 68, 659,
1076 647, 68, 648, 651, 660, 68, 658, 1342, 68, 661,
1077 665, 649, 68, 652, 650, 653, 655, 68, 68, 662,
1078 654, 664, 68, 669, 666, 68, 68, 667, 68, 68,
1079 68, 660, 68, 658, 68, 68, 661, 665, 670, 668,
1080 671, 672, 673, 674, 1342, 68, 662, 675, 664, 677,
1081 669, 666, 68, 676, 667, 678, 68, 679, 1342, 680,
1082 68, 68, 698, 681, 68, 670, 668, 68, 68, 673,
1083 674, 68, 68, 682, 675, 68, 677, 683, 687, 684,
1084
1085 676, 68, 678, 685, 68, 68, 680, 688, 686, 693,
1086 681, 68, 690, 68, 691, 68, 68, 689, 68, 68,
1087 682, 68, 68, 707, 683, 687, 684, 68, 694, 68,
1088 685, 68, 692, 695, 688, 686, 693, 699, 68, 690,
1089 696, 691, 705, 697, 689, 68, 700, 68, 706, 68,
1090 68, 701, 702, 703, 68, 694, 68, 704, 68, 692,
1091 695, 68, 708, 709, 699, 68, 68, 696, 711, 705,
1092 697, 710, 715, 700, 68, 706, 716, 712, 701, 702,
1093 1342, 1342, 714, 713, 68, 68, 717, 1342, 68, 708,
1094 709, 68, 718, 68, 68, 711, 68, 1342, 710, 68,
1095
1096 724, 723, 1342, 68, 712, 726, 729, 68, 68, 714,
1097 713, 719, 725, 717, 68, 68, 720, 68, 721, 718,
1098 722, 727, 728, 68, 68, 68, 731, 724, 723, 68,
1099 68, 730, 726, 729, 68, 68, 733, 734, 719, 725,
1100 732, 735, 68, 720, 68, 721, 737, 722, 727, 728,
1101 736, 738, 739, 731, 68, 740, 1342, 742, 730, 68,
1102 748, 741, 743, 68, 68, 68, 745, 732, 735, 68,
1103 744, 747, 68, 737, 746, 749, 750, 736, 68, 739,
1104 68, 68, 68, 68, 68, 68, 751, 748, 741, 743,
1105 753, 752, 68, 745, 760, 68, 68, 744, 747, 756,
1106
1107 755, 746, 749, 757, 754, 758, 759, 68, 68, 761,
1108 68, 763, 68, 68, 764, 68, 68, 68, 752, 768,
1109 68, 68, 68, 68, 1342, 68, 756, 755, 762, 779,
1110 68, 754, 758, 759, 1342, 68, 761, 765, 763, 767,
1111 68, 764, 68, 766, 68, 68, 768, 769, 68, 771,
1112 68, 770, 772, 773, 774, 762, 779, 1342, 775, 776,
1113 777, 68, 780, 68, 765, 68, 767, 1342, 782, 68,
1114 766, 1342, 784, 783, 68, 68, 771, 788, 68, 772,
1115 773, 774, 68, 778, 781, 775, 776, 777, 785, 780,
1116 68, 68, 68, 68, 68, 782, 786, 68, 68, 784,
1117
1118 783, 787, 789, 790, 788, 791, 792, 793, 68, 804,
1119 778, 781, 796, 68, 68, 785, 794, 797, 795, 799,
1120 68, 798, 1342, 786, 800, 68, 803, 801, 787, 789,
1121 790, 68, 68, 68, 793, 68, 68, 68, 68, 796,
1122 68, 802, 805, 794, 806, 795, 68, 68, 68, 68,
1123 68, 800, 68, 803, 801, 807, 808, 809, 813, 810,
1124 811, 1342, 812, 68, 68, 68, 817, 814, 802, 805,
1125 68, 806, 68, 68, 816, 818, 819, 815, 822, 825,
1126 68, 824, 807, 808, 809, 813, 810, 811, 68, 812,
1127 68, 68, 68, 817, 814, 820, 826, 823, 68, 821,
1128
1129 827, 816, 68, 819, 815, 828, 68, 68, 824, 68,
1130 68, 829, 831, 830, 68, 1342, 833, 834, 68, 68,
1131 832, 850, 820, 68, 823, 68, 821, 68, 68, 68,
1132 836, 837, 828, 838, 835, 857, 68, 68, 829, 831,
1133 830, 68, 68, 833, 68, 839, 840, 832, 841, 68,
1134 842, 843, 68, 844, 68, 845, 68, 836, 837, 68,
1135 838, 835, 68, 848, 68, 849, 68, 846, 68, 847,
1136 68, 1342, 839, 840, 68, 841, 68, 842, 843, 68,
1137 844, 853, 845, 854, 851, 852, 1342, 68, 68, 856,
1138 848, 68, 849, 855, 846, 68, 847, 858, 68, 860,
1139
1140 859, 1342, 68, 862, 865, 68, 864, 68, 853, 68,
1141 854, 851, 852, 68, 861, 863, 856, 866, 872, 68,
1142 855, 68, 870, 68, 858, 68, 860, 859, 68, 867,
1143 862, 68, 68, 864, 873, 68, 868, 871, 68, 68,
1144 869, 861, 863, 68, 866, 872, 874, 68, 875, 870,
1145 877, 876, 68, 68, 878, 68, 867, 68, 879, 881,
1146 882, 880, 68, 868, 871, 68, 883, 869, 884, 890,
1147 68, 885, 886, 874, 68, 875, 68, 877, 876, 68,
1148 68, 878, 1342, 889, 891, 879, 881, 68, 880, 68,
1149 68, 887, 893, 883, 888, 884, 892, 901, 885, 886,
1150
1151 68, 68, 895, 68, 894, 896, 68, 68, 897, 68,
1152 889, 68, 898, 68, 899, 68, 903, 68, 887, 893,
1153 1342, 888, 904, 892, 900, 68, 905, 902, 68, 895,
1154 1342, 894, 896, 68, 906, 897, 68, 1342, 68, 898,
1155 907, 899, 910, 68, 909, 912, 908, 68, 68, 904,
1156 911, 900, 920, 68, 902, 913, 68, 68, 916, 68,
1157 1342, 906, 917, 68, 68, 914, 68, 907, 915, 910,
1158 68, 909, 912, 908, 68, 68, 918, 911, 919, 920,
1159 923, 68, 913, 921, 68, 916, 924, 68, 927, 917,
1160 922, 925, 914, 926, 928, 915, 935, 931, 68, 68,
1161
1162 68, 930, 68, 918, 932, 919, 68, 68, 68, 68,
1163 921, 933, 934, 924, 929, 939, 943, 922, 925, 68,
1164 926, 928, 68, 68, 68, 937, 936, 68, 930, 68,
1165 938, 68, 68, 68, 941, 942, 940, 68, 933, 68,
1166 944, 929, 68, 68, 945, 946, 947, 68, 951, 948,
1167 1342, 68, 937, 936, 68, 949, 1342, 938, 950, 958,
1168 1342, 68, 68, 940, 68, 68, 952, 944, 953, 959,
1169 1342, 955, 946, 954, 1342, 68, 948, 68, 68, 68,
1170 956, 68, 68, 957, 68, 950, 958, 68, 960, 68,
1171 68, 961, 962, 952, 963, 953, 68, 964, 955, 68,
1172
1173 954, 968, 965, 967, 68, 966, 972, 956, 975, 68,
1174 957, 971, 68, 969, 68, 960, 974, 68, 961, 962,
1175 970, 963, 68, 68, 964, 1342, 976, 68, 968, 965,
1176 967, 68, 966, 68, 973, 68, 68, 68, 971, 977,
1177 969, 68, 978, 974, 979, 989, 980, 970, 68, 68,
1178 981, 982, 983, 976, 68, 986, 68, 68, 984, 987,
1179 990, 973, 68, 985, 991, 68, 977, 988, 992, 978,
1180 68, 979, 68, 980, 68, 993, 68, 981, 982, 983,
1181 68, 994, 68, 995, 996, 984, 987, 68, 998, 997,
1182 985, 999, 1000, 68, 988, 68, 68, 1001, 1002, 68,
1183
1184 1005, 1004, 68, 68, 1003, 1006, 68, 1011, 994, 1007,
1185 1342, 996, 68, 1008, 68, 998, 997, 1009, 999, 68,
1186 1017, 1010, 68, 68, 1001, 68, 1012, 68, 1004, 68,
1187 68, 1003, 68, 1014, 1011, 68, 1007, 1013, 68, 68,
1188 1008, 1015, 68, 1016, 1009, 1018, 1019, 68, 1010, 1021,
1189 1342, 1023, 68, 1012, 1022, 1020, 1342, 1342, 68, 68,
1190 1014, 68, 1025, 1024, 1013, 68, 1026, 1027, 1015, 68,
1191 1016, 1028, 1018, 68, 1342, 68, 1021, 68, 68, 68,
1192 1029, 1022, 1020, 68, 1030, 1031, 68, 1033, 1034, 1025,
1193 1024, 1035, 68, 1026, 1027, 68, 1032, 68, 1028, 68,
1194
1195 68, 1036, 1038, 68, 1037, 1039, 68, 1029, 1040, 68,
1196 1342, 1030, 1031, 68, 1033, 1034, 1041, 68, 1035, 68,
1197 1042, 1046, 1043, 1032, 1044, 1342, 1047, 1045, 1036, 68,
1198 68, 1037, 1039, 68, 68, 1040, 1050, 1048, 1342, 1066,
1199 1051, 68, 68, 1041, 68, 68, 1049, 1042, 68, 1043,
1200 1055, 1044, 68, 1047, 1045, 68, 1054, 1052, 1057, 68,
1201 1053, 1056, 1068, 68, 1048, 1059, 68, 1051, 68, 1058,
1202 1064, 1060, 68, 1049, 1062, 68, 68, 1055, 68, 68,
1203 68, 68, 1061, 1054, 1052, 1057, 1063, 1053, 1056, 68,
1204 1065, 68, 1059, 68, 1067, 68, 1058, 1064, 1060, 1070,
1205
1206 1072, 1062, 1069, 1071, 1073, 1074, 1129, 68, 68, 1061,
1207 68, 1076, 68, 1063, 68, 1075, 1080, 1065, 1077, 1078,
1208 1342, 1067, 68, 1342, 68, 68, 1070, 1072, 1079, 1069,
1209 1071, 68, 1074, 68, 68, 1081, 1082, 68, 68, 68,
1210 1083, 68, 1075, 1080, 68, 1077, 1078, 68, 1084, 1085,
1211 68, 1086, 68, 1088, 1087, 1079, 68, 1090, 68, 68,
1212 68, 1091, 1081, 1082, 1089, 1092, 1095, 1083, 68, 1093,
1213 68, 1094, 1096, 1097, 1098, 1084, 1085, 1099, 1086, 68,
1214 1088, 1087, 1100, 68, 68, 68, 1101, 68, 1091, 1102,
1215 68, 1089, 1092, 68, 1103, 1104, 1093, 68, 1094, 68,
1216
1217 1097, 68, 68, 1105, 68, 1107, 1106, 1109, 1342, 1100,
1218 1108, 1110, 1342, 68, 68, 1113, 68, 68, 1114, 68,
1219 1115, 1103, 1104, 1342, 1111, 1116, 68, 1118, 68, 1120,
1220 68, 1119, 68, 1106, 1109, 68, 1342, 1108, 1110, 1112,
1221 1117, 68, 68, 1121, 68, 1114, 1122, 68, 68, 68,
1222 68, 1111, 68, 68, 1118, 1123, 1120, 1124, 1119, 1125,
1223 1126, 1127, 1128, 68, 1342, 68, 1112, 1117, 1130, 68,
1224 1121, 1131, 68, 1122, 1132, 1134, 1133, 1140, 68, 68,
1225 68, 68, 1123, 1139, 1124, 1135, 1125, 1126, 1127, 1128,
1226 1138, 68, 68, 1136, 1141, 1130, 1137, 1150, 1131, 68,
1227
1228 1143, 1132, 68, 1133, 1140, 68, 68, 68, 68, 1142,
1229 1139, 68, 1135, 1144, 1151, 1145, 1147, 1138, 1146, 1148,
1230 1136, 68, 1149, 1137, 68, 68, 68, 1143, 68, 1153,
1231 1155, 1161, 68, 1154, 1157, 68, 1142, 68, 1156, 68,
1232 68, 1151, 1145, 1147, 68, 1146, 1148, 1152, 1158, 1149,
1233 1159, 68, 68, 1160, 1165, 68, 1153, 1155, 68, 1162,
1234 1154, 68, 68, 1164, 68, 1156, 1166, 1163, 68, 1167,
1235 68, 1169, 1168, 1170, 1152, 1158, 68, 68, 68, 1171,
1236 68, 1165, 1172, 1173, 68, 68, 1162, 1174, 1176, 1177,
1237 1164, 68, 1175, 68, 1163, 68, 1167, 68, 1169, 1168,
1238
1239 1170, 68, 68, 68, 68, 1178, 68, 1180, 1181, 68,
1240 68, 1179, 1182, 68, 1174, 1176, 1177, 1183, 68, 1175,
1241 68, 1187, 1184, 1188, 68, 1185, 68, 1186, 68, 1189,
1242 68, 1190, 1178, 1191, 68, 1181, 68, 1192, 1179, 1182,
1243 68, 1193, 68, 1194, 1183, 68, 1196, 1195, 1187, 1184,
1244 1188, 68, 1185, 1197, 1186, 68, 1189, 1200, 68, 68,
1245 1191, 68, 68, 68, 1192, 1198, 1201, 1199, 68, 1202,
1246 1194, 1203, 1208, 1196, 1195, 68, 68, 1207, 1204, 68,
1247 1197, 68, 1205, 1209, 68, 68, 1206, 1211, 1213, 1214,
1248 68, 1210, 1198, 68, 1199, 68, 1202, 68, 1203, 68,
1249
1250 68, 68, 1215, 1212, 1207, 1204, 1217, 1216, 1220, 1205,
1251 1209, 68, 68, 1206, 68, 68, 68, 1218, 1210, 1219,
1252 1221, 1222, 1225, 1223, 68, 1224, 1226, 68, 68, 1215,
1253 1212, 1227, 68, 1217, 1216, 1220, 1228, 68, 1229, 68,
1254 1231, 68, 1230, 68, 1218, 68, 1219, 1221, 1222, 68,
1255 1223, 1232, 1224, 68, 1233, 68, 1234, 1240, 1235, 1342,
1256 1236, 1237, 68, 68, 68, 68, 1242, 1231, 68, 1230,
1257 1247, 1241, 1238, 1243, 68, 68, 68, 1245, 1232, 68,
1258 68, 1233, 1239, 1234, 68, 1235, 68, 1236, 1237, 68,
1259 68, 1244, 68, 68, 1246, 68, 1248, 68, 1241, 1238,
1260
1261 1243, 1249, 1250, 68, 1245, 1251, 1252, 1253, 68, 1239,
1262 1255, 1254, 1256, 68, 1342, 1258, 68, 1257, 1244, 1262,
1263 1342, 1246, 1259, 1248, 68, 1264, 68, 68, 1249, 1250,
1264 68, 1260, 68, 68, 1253, 1261, 68, 1263, 1254, 68,
1265 68, 68, 1258, 68, 1257, 68, 1262, 68, 68, 1259,
1266 68, 1267, 1264, 1265, 1266, 68, 1268, 1270, 1260, 1271,
1267 68, 1269, 1261, 68, 1263, 1342, 68, 1272, 1276, 68,
1268 68, 1273, 1275, 1274, 1277, 1342, 1278, 1342, 1267, 1279,
1269 1265, 1266, 1280, 1268, 1270, 68, 68, 68, 1269, 68,
1270 68, 68, 1281, 1342, 1272, 1276, 68, 68, 1273, 1275,
1271
1272 1274, 1277, 68, 1278, 68, 1282, 1279, 1284, 1283, 1280,
1273 68, 1285, 1286, 68, 1287, 1289, 1292, 1288, 1291, 1281,
1274 68, 1294, 68, 68, 1290, 68, 68, 1293, 1297, 68,
1275 1298, 1342, 1282, 1295, 68, 1283, 68, 68, 1285, 1286,
1276 68, 1287, 1289, 68, 1288, 1291, 1300, 1296, 68, 68,
1277 1299, 1290, 68, 1302, 1293, 68, 1301, 68, 68, 1304,
1278 1295, 68, 1305, 68, 1303, 1306, 1307, 1308, 1309, 1310,
1279 68, 1312, 1314, 1300, 1296, 1311, 1342, 1299, 68, 68,
1280 68, 1313, 1315, 1301, 1316, 1317, 68, 1321, 68, 1305,
1281 1323, 1303, 1306, 1307, 68, 68, 68, 68, 68, 68,
1282
1283 1318, 1319, 1311, 68, 68, 1325, 1320, 68, 1313, 1315,
1284 1327, 1316, 68, 68, 68, 1322, 1324, 68, 1326, 68,
1285 1328, 1329, 68, 68, 1330, 1331, 1332, 1318, 1319, 1333,
1286 68, 1334, 68, 1320, 1336, 1342, 1339, 1327, 68, 68,
1287 1342, 68, 1322, 1324, 1337, 1326, 1341, 68, 68, 68,
1288 1335, 68, 68, 1332, 68, 68, 1333, 68, 1334, 1340,
1289 1338, 68, 68, 1339, 1342, 1342, 1342, 68, 1342, 1342,
1290 1342, 1337, 68, 68, 1342, 1342, 1342, 1335, 1342, 1342,
1291 1342, 1342, 1342, 1342, 1342, 1342, 1340, 1338, 40, 40,
1292 40, 40, 40, 40, 40, 45, 45, 45, 45, 45,
1293
1294 45, 45, 50, 50, 50, 50, 50, 50, 50, 56,
1295 56, 56, 56, 56, 56, 56, 61, 61, 61, 61,
1296 61, 61, 61, 71, 71, 1342, 71, 71, 71, 71,
1297 120, 120, 1342, 1342, 1342, 120, 120, 122, 122, 1342,
1298 1342, 122, 1342, 122, 124, 1342, 1342, 1342, 1342, 1342,
1299 124, 127, 127, 1342, 1342, 1342, 127, 127, 129, 1342,
1300 1342, 1342, 1342, 1342, 129, 131, 131, 1342, 131, 131,
1301 131, 131, 72, 72, 1342, 72, 72, 72, 72, 13,
1302 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
1303 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
1304
1305 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
1306 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
1307 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
1308 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
1309 1342, 1342, 1342, 1342, 1342
12831310 } ;
12841311
1285 static yyconst flex_int16_t yy_chk[3811] =
1312 static yyconst flex_int16_t yy_chk[3946] =
12861313 { 0,
12871314 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
12881315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
12921319 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
12931320 1, 1, 1, 1, 1, 3, 3, 3, 4, 4,
12941321 4, 5, 5, 6, 6, 5, 24, 6, 7, 7,
1295 7, 7, 1308, 7, 8, 8, 8, 8, 24, 8,
1322 7, 7, 1348, 7, 8, 8, 8, 8, 24, 8,
12961323 9, 9, 9, 10, 10, 10, 15, 44, 44, 49,
12971324
12981325 15, 3, 49, 24, 4, 60, 60, 5, 19, 6,
1299 19, 19, 69, 19, 565, 7, 69, 39, 19, 39,
1300 39, 8, 39, 23, 20, 20, 9, 39, 128, 10,
1326 19, 19, 69, 19, 577, 7, 69, 39, 19, 39,
1327 39, 8, 39, 23, 20, 20, 9, 39, 129, 10,
13011328 11, 11, 11, 11, 11, 11, 12, 12, 12, 12,
1302 12, 12, 20, 23, 109, 19, 23, 27, 20, 11,
1303 23, 20, 20, 126, 21, 12, 22, 120, 120, 27,
1329 12, 12, 20, 23, 110, 19, 23, 27, 20, 11,
1330 23, 20, 20, 127, 21, 12, 22, 121, 121, 27,
13041331 22, 21, 26, 22, 28, 26, 22, 11, 21, 20,
1305 23, 25, 26, 12, 27, 109, 11, 125, 22, 25,
1332 23, 25, 26, 12, 27, 110, 11, 126, 22, 25,
13061333 21, 21, 12, 22, 29, 26, 28, 22, 21, 26,
1307 22, 28, 26, 22, 76, 21, 29, 25, 25, 26,
1308
1309 30, 76, 122, 31, 30, 122, 25, 31, 32, 65,
1310 33, 29, 30, 106, 32, 55, 33, 55, 55, 33,
1311 55, 76, 65, 31, 123, 106, 33, 30, 33, 31,
1334 22, 28, 26, 22, 30, 21, 29, 25, 25, 26,
1335
1336 30, 124, 123, 31, 30, 123, 25, 31, 32, 65,
1337 33, 29, 30, 107, 32, 55, 33, 55, 55, 33,
1338 55, 30, 65, 31, 122, 107, 33, 30, 33, 31,
13121339 31, 30, 34, 74, 31, 32, 65, 33, 75, 37,
1313 106, 35, 34, 33, 37, 34, 33, 36, 89, 36,
1340 107, 35, 34, 33, 37, 34, 33, 36, 89, 36,
13141341 31, 35, 37, 33, 34, 35, 35, 74, 38, 34,
1315 74, 75, 38, 35, 36, 75, 37, 121, 35, 34,
1316 89, 37, 34, 36, 36, 89, 36, 119, 35, 78,
1317 127, 127, 35, 35, 38, 38, 77, 67, 78, 38,
1342 74, 75, 38, 35, 36, 75, 37, 120, 35, 34,
1343 89, 37, 34, 36, 36, 89, 36, 67, 35, 76,
1344 128, 128, 35, 35, 38, 38, 76, 77, 61, 38,
13181345 63, 36, 63, 63, 66, 63, 66, 66, 68, 66,
13191346
1320 68, 68, 71, 68, 71, 71, 78, 71, 68, 79,
1321 77, 80, 71, 77, 81, 82, 83, 84, 85, 86,
1322 82, 90, 79, 81, 92, 85, 80, 63, 86, 88,
1323 84, 87, 92, 83, 90, 93, 79, 61, 80, 71,
1324 87, 81, 82, 95, 84, 85, 86, 83, 90, 96,
1325 91, 92, 88, 91, 97, 93, 88, 93, 87, 94,
1326 83, 99, 93, 94, 98, 100, 95, 91, 97, 96,
1327 95, 56, 100, 101, 91, 99, 96, 91, 102, 105,
1328 91, 97, 93, 94, 98, 103, 94, 102, 99, 103,
1329 94, 98, 100, 105, 91, 104, 101, 111, 110, 108,
1330
1331 101, 107, 104, 113, 559, 102, 105, 103, 108, 107,
1332 112, 116, 103, 110, 113, 114, 103, 111, 134, 112,
1333 117, 114, 104, 111, 111, 110, 108, 115, 107, 133,
1334 113, 115, 118, 116, 559, 117, 51, 112, 116, 139,
1335 132, 118, 114, 124, 111, 124, 124, 117, 124, 134,
1336 129, 133, 129, 129, 115, 129, 133, 135, 130, 118,
1337 130, 130, 136, 130, 132, 137, 138, 132, 50, 135,
1338 139, 141, 140, 138, 143, 45, 40, 137, 144, 146,
1339 14, 136, 145, 146, 135, 148, 144, 147, 13, 136,
1340 154, 0, 137, 138, 140, 130, 0, 154, 149, 140,
1341
1342 143, 143, 141, 142, 145, 144, 146, 148, 142, 145,
1343 147, 149, 148, 142, 147, 150, 153, 154, 151, 142,
1344 142, 151, 152, 155, 156, 149, 142, 150, 0, 158,
1345 142, 152, 157, 151, 155, 142, 160, 0, 153, 158,
1346 142, 161, 150, 153, 162, 151, 142, 142, 151, 152,
1347 155, 159, 163, 164, 0, 156, 175, 159, 157, 157,
1348 158, 165, 166, 161, 167, 168, 158, 160, 161, 166,
1349 168, 169, 170, 164, 171, 162, 179, 0, 159, 177,
1350 164, 171, 165, 163, 170, 167, 172, 175, 165, 166,
1351 169, 167, 168, 174, 174, 173, 176, 178, 169, 170,
1352
1353 173, 171, 174, 176, 177, 181, 177, 179, 172, 183,
1354 180, 182, 185, 172, 188, 0, 187, 178, 180, 184,
1355 174, 174, 173, 176, 178, 189, 186, 185, 194, 190,
1356 201, 181, 181, 182, 186, 187, 184, 180, 193, 185,
1357 183, 190, 182, 187, 184, 188, 184, 189, 191, 192,
1358 205, 195, 189, 186, 194, 194, 190, 191, 196, 197,
1359 182, 201, 193, 184, 198, 193, 199, 202, 192, 196,
1360 203, 197, 200, 204, 207, 191, 192, 195, 195, 0,
1361 202, 205, 213, 207, 210, 196, 197, 0, 198, 199,
1362 200, 198, 209, 199, 202, 204, 203, 203, 206, 200,
1363
1364 204, 207, 208, 211, 214, 206, 209, 212, 208, 215,
1365 210, 210, 211, 213, 217, 219, 219, 216, 218, 209,
1366 216, 220, 212, 0, 215, 206, 221, 216, 214, 208,
1367 211, 214, 217, 218, 212, 225, 215, 224, 226, 223,
1368 219, 217, 219, 219, 216, 218, 222, 216, 220, 222,
1369 221, 223, 227, 221, 229, 224, 222, 228, 230, 233,
1370 226, 229, 225, 231, 224, 226, 223, 234, 237, 228,
1371 231, 232, 0, 222, 238, 241, 222, 0, 227, 227,
1372 234, 229, 236, 233, 228, 239, 233, 326, 241, 230,
1373 231, 239, 235, 232, 234, 235, 238, 235, 232, 237,
1374
1375 236, 238, 241, 235, 240, 242, 245, 243, 246, 236,
1376 247, 240, 239, 249, 326, 248, 247, 0, 245, 235,
1377 243, 242, 235, 248, 235, 249, 246, 251, 0, 242,
1378 0, 240, 242, 245, 243, 246, 0, 247, 250, 0,
1379 249, 253, 248, 254, 252, 250, 258, 258, 242, 244,
1380 244, 252, 0, 253, 256, 254, 257, 255, 251, 244,
1381 0, 244, 244, 244, 255, 250, 244, 256, 253, 260,
1382 254, 252, 259, 0, 244, 258, 244, 244, 257, 259,
1383 260, 256, 262, 257, 255, 263, 244, 261, 244, 244,
1384 244, 265, 264, 244, 266, 262, 260, 0, 261, 259,
1385
1386 265, 269, 268, 270, 267, 272, 271, 266, 0, 262,
1387 263, 273, 263, 274, 261, 264, 276, 267, 265, 264,
1388 268, 266, 267, 269, 271, 275, 270, 277, 269, 268,
1389 270, 267, 273, 271, 280, 274, 272, 279, 273, 275,
1390 274, 278, 276, 276, 267, 281, 287, 278, 282, 280,
1391 283, 286, 275, 285, 282, 279, 288, 286, 277, 0,
1392 294, 280, 291, 292, 279, 287, 289, 281, 278, 291,
1393 292, 293, 281, 287, 288, 282, 283, 283, 286, 285,
1394 285, 289, 294, 288, 293, 295, 296, 294, 297, 291,
1395 292, 298, 301, 289, 300, 0, 298, 297, 293, 299,
1396
1397 302, 303, 306, 305, 295, 0, 300, 0, 309, 303,
1398 305, 302, 295, 306, 301, 297, 304, 296, 298, 301,
1399 311, 300, 299, 304, 307, 308, 299, 302, 303, 306,
1400 305, 304, 308, 307, 309, 309, 310, 312, 310, 313,
1401 315, 304, 304, 304, 314, 319, 311, 311, 315, 312,
1402 304, 317, 308, 319, 313, 307, 314, 316, 304, 318,
1403 307, 0, 316, 310, 312, 321, 313, 315, 304, 320,
1404 322, 314, 319, 317, 0, 323, 324, 318, 317, 325,
1405 327, 320, 328, 332, 316, 324, 318, 329, 321, 330,
1406 323, 331, 321, 325, 333, 327, 320, 328, 334, 329,
1407
1408 335, 322, 323, 324, 336, 331, 325, 327, 337, 328,
1409 332, 338, 0, 330, 329, 339, 330, 338, 331, 341,
1410 340, 333, 342, 345, 343, 344, 346, 335, 347, 334,
1411 349, 336, 344, 350, 0, 348, 352, 339, 338, 337,
1412 348, 347, 339, 340, 348, 342, 343, 340, 346, 342,
1413 341, 343, 344, 346, 345, 347, 349, 349, 351, 348,
1414 352, 353, 348, 352, 350, 354, 355, 348, 356, 357,
1415 358, 348, 359, 0, 360, 0, 351, 362, 0, 0,
1416 355, 361, 365, 353, 353, 351, 362, 354, 353, 363,
1417 356, 358, 354, 355, 368, 356, 359, 358, 360, 359,
1418
1419 357, 360, 363, 361, 362, 364, 365, 366, 361, 365,
1420 353, 367, 369, 370, 371, 367, 363, 0, 371, 372,
1421 0, 377, 373, 376, 374, 368, 375, 364, 377, 366,
1422 369, 376, 364, 374, 366, 375, 378, 370, 382, 369,
1423 370, 384, 367, 379, 372, 371, 372, 373, 377, 373,
1424 376, 374, 380, 375, 381, 379, 383, 385, 0, 378,
1425 386, 380, 387, 378, 383, 0, 381, 384, 384, 382,
1426 379, 390, 389, 387, 391, 392, 0, 388, 393, 380,
1427 385, 381, 386, 383, 385, 388, 389, 386, 394, 387,
1428 397, 390, 396, 398, 395, 392, 391, 405, 390, 389,
1429
1430 393, 391, 392, 395, 388, 393, 398, 399, 397, 400,
1431 394, 0, 396, 408, 401, 394, 402, 397, 403, 396,
1432 398, 395, 402, 406, 415, 418, 403, 424, 405, 399,
1433 407, 416, 408, 400, 399, 409, 400, 401, 412, 407,
1434 408, 401, 415, 402, 403, 403, 406, 409, 412, 417,
1435 406, 415, 416, 403, 424, 0, 418, 407, 416, 420,
1436 0, 421, 409, 425, 422, 412, 422, 0, 423, 0,
1437 421, 426, 417, 427, 0, 0, 417, 419, 0, 419,
1438 0, 420, 419, 425, 428, 427, 420, 419, 421, 429,
1439 425, 422, 423, 419, 419, 423, 430, 426, 426, 431,
1440
1441 427, 433, 419, 430, 419, 432, 419, 431, 436, 419,
1442 428, 428, 437, 429, 419, 0, 429, 434, 438, 439,
1443 419, 419, 435, 430, 432, 447, 431, 433, 433, 434,
1444 436, 435, 432, 440, 441, 436, 443, 444, 442, 437,
1445 439, 445, 438, 446, 434, 438, 439, 442, 450, 435,
1446 452, 448, 440, 441, 451, 0, 447, 444, 443, 448,
1447 440, 441, 446, 443, 444, 442, 453, 451, 445, 460,
1448 446, 461, 450, 455, 453, 450, 452, 452, 448, 455,
1449 456, 451, 457, 458, 459, 465, 456, 460, 458, 457,
1450 453, 459, 464, 453, 461, 462, 460, 463, 461, 468,
1451
1452 455, 453, 469, 462, 467, 464, 465, 456, 470, 457,
1453 458, 459, 465, 466, 472, 463, 470, 467, 471, 464,
1454 466, 473, 462, 474, 463, 469, 475, 473, 476, 469,
1455 468, 467, 478, 471, 477, 470, 472, 479, 481, 482,
1456 466, 472, 483, 477, 480, 471, 478, 484, 473, 474,
1457 474, 480, 476, 489, 483, 476, 485, 475, 0, 478,
1458 486, 477, 487, 486, 485, 481, 482, 0, 479, 483,
1459 484, 480, 491, 492, 484, 487, 489, 490, 494, 490,
1460 489, 495, 493, 485, 491, 496, 492, 486, 493, 487,
1461 488, 494, 488, 498, 499, 500, 488, 0, 488, 491,
1462
1463 492, 501, 495, 488, 490, 494, 497, 499, 495, 493,
1464 500, 504, 502, 497, 488, 498, 496, 488, 503, 488,
1465 498, 499, 500, 488, 504, 488, 506, 501, 501, 507,
1466 488, 497, 497, 497, 502, 505, 509, 503, 504, 502,
1467 497, 510, 511, 505, 513, 503, 512, 515, 516, 520,
1468 511, 0, 507, 506, 514, 515, 507, 517, 497, 519,
1469 512, 523, 505, 518, 517, 510, 513, 509, 510, 511,
1470 516, 513, 514, 512, 515, 516, 518, 519, 524, 522,
1471 520, 514, 525, 523, 517, 526, 519, 527, 523, 528,
1472 518, 522, 530, 0, 0, 531, 530, 538, 531, 552,
1473
1474 524, 534, 532, 526, 525, 524, 522, 533, 534, 525,
1475 536, 535, 526, 527, 527, 539, 540, 537, 538, 533,
1476 528, 531, 531, 530, 538, 531, 532, 541, 534, 532,
1477 552, 542, 536, 543, 533, 535, 539, 536, 535, 537,
1478 542, 544, 539, 540, 537, 541, 545, 546, 547, 548,
1479 544, 551, 555, 545, 541, 549, 550, 543, 542, 553,
1480 543, 546, 0, 0, 549, 554, 569, 551, 544, 558,
1481 547, 548, 557, 545, 546, 547, 548, 554, 551, 555,
1482 550, 556, 549, 550, 558, 557, 560, 561, 570, 556,
1483 553, 566, 554, 562, 567, 560, 558, 569, 563, 557,
1484
1485 563, 562, 568, 572, 566, 561, 567, 0, 556, 568,
1486 571, 573, 574, 560, 561, 575, 572, 577, 566, 570,
1487 562, 567, 578, 576, 573, 563, 580, 575, 579, 568,
1488 572, 578, 571, 581, 574, 576, 582, 571, 573, 574,
1489 585, 581, 575, 583, 577, 584, 579, 586, 580, 578,
1490 576, 583, 585, 580, 587, 579, 588, 590, 582, 586,
1491 581, 591, 594, 582, 588, 589, 590, 585, 584, 587,
1492 583, 589, 584, 592, 586, 598, 596, 597, 0, 593,
1493 594, 587, 591, 588, 590, 592, 593, 600, 591, 594,
1494 597, 599, 589, 601, 598, 603, 602, 601, 599, 604,
1495
1496 592, 605, 598, 0, 597, 608, 593, 596, 609, 600,
1497 602, 606, 607, 603, 600, 611, 610, 612, 599, 0,
1498 613, 609, 603, 602, 601, 610, 614, 605, 605, 0,
1499 604, 608, 608, 606, 607, 609, 0, 618, 606, 607,
1500 616, 0, 613, 610, 0, 615, 611, 613, 612, 614,
1501 615, 0, 615, 614, 615, 623, 616, 619, 621, 620,
1502 618, 626, 622, 615, 618, 627, 624, 616, 620, 619,
1503 622, 621, 615, 629, 623, 624, 625, 615, 625, 615,
1504 630, 615, 623, 631, 619, 621, 620, 632, 626, 622,
1505 633, 631, 627, 624, 634, 635, 637, 629, 636, 644,
1506
1507 629, 638, 630, 625, 639, 636, 640, 630, 641, 645,
1508 631, 647, 642, 0, 632, 640, 634, 633, 637, 646,
1509 638, 634, 635, 637, 651, 636, 639, 648, 638, 641,
1510 644, 639, 642, 640, 650, 641, 649, 654, 658, 642,
1511 645, 646, 647, 653, 649, 648, 646, 653, 652, 655,
1512 650, 651, 656, 657, 648, 652, 655, 661, 0, 656,
1513 659, 650, 657, 649, 658, 658, 661, 659, 654, 660,
1514 653, 660, 667, 662, 664, 652, 655, 662, 664, 656,
1515 657, 665, 665, 666, 661, 671, 668, 659, 670, 672,
1516 669, 673, 666, 671, 667, 668, 660, 669, 674, 667,
1517
1518 662, 675, 672, 673, 676, 664, 674, 677, 665, 679,
1519 666, 670, 671, 668, 680, 670, 672, 669, 673, 681,
1520 683, 678, 684, 675, 676, 674, 680, 679, 675, 677,
1521 678, 676, 682, 685, 677, 686, 679, 0, 682, 689,
1522 681, 680, 683, 688, 692, 0, 681, 683, 678, 690,
1523 691, 695, 689, 684, 691, 693, 0, 690, 696, 682,
1524 694, 686, 686, 693, 685, 688, 689, 697, 694, 698,
1525 688, 692, 695, 701, 706, 697, 690, 698, 695, 702,
1526 699, 691, 693, 700, 707, 702, 701, 694, 699, 696,
1527 703, 700, 704, 705, 697, 708, 698, 706, 707, 710,
1528
1529 701, 706, 703, 711, 713, 709, 702, 699, 718, 712,
1530 700, 707, 709, 708, 717, 705, 712, 703, 704, 704,
1531 705, 716, 708, 721, 0, 711, 710, 723, 0, 724,
1532 711, 727, 709, 725, 728, 713, 712, 729, 0, 718,
1533 717, 717, 726, 716, 726, 725, 728, 731, 716, 733,
1534 721, 723, 730, 727, 723, 724, 724, 732, 727, 730,
1535 725, 728, 732, 734, 729, 733, 736, 735, 738, 726,
1536 739, 746, 740, 731, 731, 735, 733, 738, 741, 730,
1537 742, 744, 743, 739, 732, 741, 734, 742, 736, 743,
1538 734, 745, 753, 736, 735, 738, 747, 739, 740, 740,
1539
1540 749, 748, 746, 747, 751, 741, 744, 742, 744, 743,
1541 752, 754, 752, 745, 748, 0, 753, 755, 745, 753,
1542 756, 749, 761, 747, 758, 757, 751, 749, 748, 756,
1543 759, 751, 757, 760, 759, 767, 762, 752, 764, 763,
1544 766, 769, 754, 755, 755, 764, 758, 756, 763, 761,
1545 767, 758, 757, 766, 765, 760, 768, 759, 762, 785,
1546 760, 765, 767, 762, 770, 764, 763, 766, 771, 774,
1547 768, 770, 769, 772, 773, 771, 779, 776, 0, 772,
1548 781, 765, 780, 768, 775, 782, 773, 775, 776, 774,
1549 785, 770, 784, 782, 786, 771, 774, 791, 781, 791,
1550
1551 772, 773, 775, 779, 776, 783, 780, 781, 783, 780,
1552 784, 775, 782, 787, 775, 788, 789, 790, 792, 784,
1553 787, 786, 793, 783, 791, 789, 794, 792, 797, 788,
1554 790, 798, 783, 799, 0, 783, 800, 794, 795, 804,
1555 787, 801, 788, 789, 790, 792, 802, 795, 793, 793,
1556 805, 0, 802, 794, 799, 801, 0, 812, 804, 797,
1557 799, 807, 798, 806, 805, 795, 804, 800, 801, 807,
1558 802, 808, 806, 802, 809, 813, 0, 805, 811, 802,
1559 812, 814, 808, 809, 812, 811, 816, 815, 807, 817,
1560 806, 819, 821, 817, 818, 822, 823, 813, 808, 820,
1561
1562 831, 809, 813, 814, 816, 811, 818, 821, 814, 815,
1563 822, 825, 820, 816, 815, 824, 817, 838, 819, 821,
1564 825, 818, 822, 826, 827, 828, 820, 823, 829, 830,
1565 824, 831, 833, 832, 834, 835, 836, 837, 825, 832,
1566 833, 834, 824, 839, 826, 841, 829, 843, 838, 0,
1567 826, 827, 828, 845, 847, 829, 830, 842, 0, 833,
1568 832, 834, 835, 836, 837, 846, 842, 839, 849, 844,
1569 839, 844, 848, 853, 848, 849, 841, 852, 843, 848,
1570 845, 850, 851, 852, 842, 847, 855, 848, 850, 851,
1571 856, 846, 846, 854, 854, 849, 844, 856, 858, 848,
1572
1573 853, 848, 859, 860, 852, 862, 848, 864, 850, 851,
1574 861, 861, 855, 855, 863, 863, 858, 856, 864, 868,
1575 854, 860, 859, 866, 867, 858, 868, 869, 0, 859,
1576 860, 862, 862, 870, 864, 871, 873, 861, 872, 874,
1577 875, 863, 879, 873, 0, 866, 868, 869, 875, 876,
1578 866, 874, 880, 877, 869, 867, 872, 871, 880, 878,
1579 870, 881, 871, 873, 878, 872, 874, 875, 882, 879,
1580 876, 877, 885, 883, 881, 878, 876, 884, 886, 880,
1581 877, 884, 887, 888, 889, 892, 878, 890, 881, 894,
1582 891, 878, 891, 886, 895, 897, 893, 898, 888, 882,
1583
1584 883, 893, 890, 885, 899, 886, 900, 889, 884, 895,
1585 888, 889, 901, 887, 890, 902, 892, 891, 908, 897,
1586 894, 895, 897, 893, 898, 903, 906, 900, 909, 908,
1587 910, 899, 911, 900, 901, 916, 902, 909, 915, 901,
1588 920, 906, 902, 903, 908, 908, 918, 0, 910, 919,
1589 911, 915, 903, 906, 917, 909, 908, 910, 922, 911,
1590 924, 923, 926, 925, 917, 915, 916, 920, 923, 925,
1591 929, 932, 918, 918, 919, 933, 919, 926, 922, 927,
1592 928, 917, 929, 934, 930, 922, 924, 924, 923, 926,
1593 925, 930, 934, 932, 927, 928, 935, 929, 932, 936,
1594
1595 933, 0, 933, 937, 937, 938, 927, 928, 939, 940,
1596 934, 930, 941, 942, 935, 944, 945, 943, 949, 0,
1597 947, 0, 942, 935, 943, 0, 936, 938, 947, 948,
1598 937, 940, 938, 939, 941, 939, 940, 950, 945, 941,
1599 942, 952, 948, 945, 943, 949, 944, 947, 951, 954,
1600 953, 951, 950, 957, 958, 965, 948, 955, 959, 952,
1601 966, 958, 961, 968, 950, 953, 951, 957, 952, 959,
1602 963, 954, 964, 965, 964, 951, 954, 953, 951, 955,
1603 957, 958, 965, 961, 955, 959, 967, 966, 969, 961,
1604 968, 963, 971, 970, 972, 973, 969, 963, 974, 964,
1605
1606 977, 978, 0, 979, 967, 0, 985, 985, 972, 980,
1607 981, 982, 0, 967, 971, 969, 970, 974, 977, 971,
1608 970, 972, 973, 983, 980, 974, 984, 977, 978, 979,
1609 979, 986, 981, 985, 982, 983, 980, 981, 982, 986,
1610 987, 988, 990, 987, 993, 989, 991, 995, 984, 988,
1611 983, 989, 991, 984, 994, 998, 996, 990, 986, 997,
1612 999, 995, 1000, 1001, 1002, 1004, 1005, 987, 988, 990,
1613 996, 993, 989, 991, 995, 1007, 1000, 1008, 994, 1010,
1614 1003, 994, 998, 996, 1013, 997, 997, 999, 1003, 1000,
1615 1001, 1002, 1004, 1005, 1012, 1009, 1011, 1007, 1014, 1015,
1616
1617 1017, 1016, 1007, 1009, 1008, 1011, 1010, 1003, 1013, 1016,
1618 1019, 1013, 1021, 1014, 1022, 1012, 1020, 1020, 0, 1025,
1619 1023, 1012, 1009, 1011, 1014, 1014, 1015, 1017, 1016, 1022,
1620 1024, 1027, 1024, 1025, 1029, 1031, 1028, 1019, 1021, 1021,
1621 1014, 1022, 1023, 1020, 1026, 1032, 1025, 1023, 1028, 1030,
1622 1026, 1036, 1029, 1027, 1037, 1034, 1038, 1024, 1027, 0,
1623 0, 1029, 1034, 1028, 0, 1039, 1031, 1030, 1032, 1036,
1624 1042, 1026, 1032, 1039, 1041, 1044, 1030, 1046, 1036, 1048,
1625 1037, 1037, 1034, 1045, 1047, 1042, 1041, 1038, 1049, 1051,
1626 1050, 1039, 1039, 1055, 0, 1052, 1051, 1042, 1056, 1044,
1627
1628 1039, 1041, 1044, 1048, 1046, 1045, 1048, 1047, 1054, 1059,
1629 1045, 1047, 1050, 1053, 1060, 1049, 1051, 1050, 1052, 1056,
1630 1053, 1058, 1052, 1064, 1055, 1056, 1061, 1067, 1070, 1072,
1631 1054, 1059, 1058, 1060, 1074, 1054, 1059, 1075, 0, 1077,
1632 1053, 1060, 1080, 1084, 1077, 1078, 1076, 0, 1058, 1064,
1633 1064, 1061, 1083, 1061, 1067, 1070, 1072, 1076, 1085, 1086,
1634 1087, 1088, 1089, 1075, 1075, 1074, 1077, 1078, 1084, 1080,
1635 1084, 1095, 1078, 1076, 1083, 1090, 1091, 1089, 1092, 1083,
1636 1085, 1093, 1096, 1094, 1090, 1085, 1086, 1087, 1088, 1089,
1637 1094, 1091, 1098, 1092, 1097, 1097, 1093, 1099, 1095, 1098,
1638
1639 1096, 1100, 1090, 1091, 1100, 1092, 1102, 1101, 1093, 1096,
1640 1094, 1099, 1105, 1103, 1104, 1102, 1107, 1118, 1108, 1098,
1641 1101, 1097, 1110, 1113, 1099, 1107, 1112, 1117, 1100, 1111,
1642 0, 1115, 1113, 1102, 1101, 1103, 1104, 1114, 1112, 1105,
1643 1103, 1104, 1115, 1107, 1108, 1108, 1114, 1111, 1118, 1110,
1644 1113, 1116, 1120, 1112, 1117, 1119, 1111, 1126, 1115, 1116,
1645 1120, 1121, 1125, 1127, 1114, 1128, 1129, 1119, 1121, 1125,
1646 1131, 1133, 1132, 0, 1137, 1129, 1139, 1128, 1116, 1120,
1647 1132, 1126, 1119, 1140, 1126, 1141, 1138, 1142, 1121, 1125,
1648 1127, 1138, 1128, 1129, 1139, 1145, 1144, 1131, 1133, 1132,
1649
1650 1137, 1137, 1146, 1139, 1147, 1140, 1142, 1141, 1144, 1148,
1651 1140, 1149, 1141, 1138, 1142, 1150, 1147, 1145, 1151, 0,
1652 1152, 1154, 1145, 1144, 1146, 1155, 1157, 1158, 0, 1146,
1653 1161, 1147, 1166, 1159, 1164, 0, 1148, 1160, 1149, 0,
1654 1155, 1158, 1164, 1154, 1162, 1151, 1150, 1152, 1154, 1167,
1655 1157, 1159, 1155, 1157, 1158, 1160, 1161, 1161, 1165, 1166,
1656 1159, 1164, 1162, 1168, 1160, 1169, 1165, 1167, 1171, 1172,
1657 1174, 1162, 1176, 0, 1177, 1183, 1167, 1179, 1178, 1176,
1658 1180, 1182, 1168, 1172, 1181, 1165, 1171, 1169, 1184, 1185,
1659 1168, 1192, 1169, 1181, 1182, 1171, 1172, 1174, 1188, 1176,
1660
1661 1177, 1177, 1178, 1194, 1179, 1178, 1183, 1180, 1182, 1191,
1662 1192, 1181, 1185, 1193, 1199, 1184, 1185, 1191, 1192, 1188,
1663 1195, 1193, 1196, 1198, 1198, 1188, 1197, 1200, 1202, 1194,
1664 1194, 1195, 1199, 1197, 1200, 1204, 1191, 1203, 1205, 1206,
1665 1193, 1199, 1208, 1209, 1196, 1213, 1203, 1195, 1214, 1196,
1666 1198, 0, 1202, 1197, 1200, 1202, 1217, 1206, 1209, 1215,
1667 1208, 1205, 1204, 1218, 1203, 1205, 1206, 1213, 1219, 1208,
1668 1209, 1210, 1213, 1210, 1214, 1214, 1219, 1215, 1217, 1220,
1669 1221, 1218, 1222, 1217, 1224, 1223, 1215, 1229, 1226, 1225,
1670 1218, 1220, 1224, 1227, 1227, 1219, 1223, 1228, 1210, 1230,
1671
1672 1222, 1232, 1235, 1236, 1240, 1228, 1220, 1221, 1225, 1222,
1673 1226, 1224, 1223, 1242, 1229, 1226, 1225, 1234, 1233, 1237,
1674 1227, 1230, 1234, 1238, 1228, 1233, 1230, 1237, 1232, 1235,
1675 1236, 1240, 1239, 1241, 1243, 1246, 1245, 1247, 1238, 1239,
1676 1242, 1248, 1243, 1249, 1234, 1233, 1237, 1250, 1241, 1245,
1677 1238, 1251, 0, 1253, 1255, 1256, 1259, 1246, 1260, 1239,
1678 1241, 1243, 1246, 1245, 1247, 1261, 1263, 1266, 1248, 1250,
1679 1249, 1271, 1267, 1273, 1250, 1259, 1275, 1256, 1251, 1253,
1680 1253, 1255, 1256, 1259, 1265, 1260, 1279, 1261, 1263, 1276,
1681 1280, 1265, 1261, 1263, 1266, 1267, 1273, 1278, 1271, 1267,
1682
1683 1273, 1276, 1282, 1275, 1284, 1286, 1278, 1287, 0, 1294,
1684 1295, 1265, 1292, 1279, 1293, 1297, 1276, 1280, 1299, 1300,
1685 1286, 1293, 0, 0, 1278, 1298, 1299, 1297, 1295, 1282,
1686 0, 1284, 1286, 1287, 1287, 1292, 1294, 1295, 1298, 1292,
1687 0, 1293, 1297, 0, 0, 1299, 1300, 0, 0, 0,
1688 0, 0, 1298, 1303, 1303, 1303, 1303, 1303, 1303, 1303,
1689 1304, 1304, 1304, 1304, 1304, 1304, 1304, 1305, 1305, 1305,
1690 1305, 1305, 1305, 1305, 1306, 1306, 1306, 1306, 1306, 1306,
1691 1306, 1307, 1307, 1307, 1307, 1307, 1307, 1307, 1309, 1309,
1692 0, 1309, 1309, 1309, 1309, 1310, 1310, 0, 0, 0,
1693
1694 1310, 1310, 1311, 1311, 0, 0, 1311, 0, 1311, 1312,
1695 0, 0, 0, 0, 0, 1312, 1313, 1313, 0, 0,
1696 0, 1313, 1313, 1314, 0, 0, 0, 0, 0, 1314,
1697 1315, 1315, 0, 1315, 1315, 1315, 1315, 1316, 1316, 0,
1698 1316, 1316, 1316, 1316, 1302, 1302, 1302, 1302, 1302, 1302,
1699 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302,
1700 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302,
1701 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302,
1702 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302,
1703 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302,
1704
1705 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302
1347 68, 68, 71, 68, 71, 71, 76, 71, 68, 78,
1348 79, 77, 71, 80, 77, 81, 82, 83, 78, 84,
1349 56, 82, 85, 79, 81, 135, 86, 63, 80, 85,
1350 51, 88, 84, 92, 83, 86, 78, 79, 87, 71,
1351 80, 92, 81, 82, 90, 571, 84, 87, 83, 85,
1352 93, 95, 91, 86, 88, 91, 135, 90, 88, 94,
1353 92, 83, 96, 94, 95, 87, 98, 97, 99, 91,
1354 93, 90, 93, 50, 101, 571, 91, 93, 95, 91,
1355 98, 101, 91, 94, 100, 96, 94, 97, 99, 96,
1356 94, 102, 106, 98, 97, 99, 91, 93, 100, 103,
1357
1358 104, 101, 105, 109, 104, 108, 106, 113, 103, 105,
1359 111, 100, 109, 108, 102, 112, 113, 114, 102, 106,
1360 116, 117, 104, 118, 116, 111, 103, 104, 114, 105,
1361 109, 104, 108, 115, 113, 112, 119, 111, 118, 115,
1362 45, 112, 112, 117, 114, 119, 133, 116, 117, 125,
1363 118, 125, 125, 130, 125, 130, 130, 134, 130, 136,
1364 115, 137, 112, 119, 131, 138, 131, 131, 139, 131,
1365 133, 136, 140, 133, 40, 139, 142, 138, 141, 134,
1366 137, 14, 13, 144, 134, 145, 136, 147, 137, 146,
1367 0, 147, 138, 145, 148, 139, 0, 0, 0, 0,
1368
1369 141, 131, 150, 140, 0, 141, 149, 142, 143, 144,
1370 144, 146, 145, 143, 147, 150, 146, 148, 143, 152,
1371 151, 148, 152, 155, 143, 143, 154, 153, 149, 150,
1372 155, 143, 151, 149, 152, 143, 153, 157, 158, 162,
1373 143, 164, 160, 165, 156, 143, 152, 151, 154, 152,
1374 155, 143, 143, 154, 153, 156, 159, 161, 163, 166,
1375 160, 167, 170, 161, 158, 158, 159, 170, 157, 160,
1376 162, 156, 164, 169, 165, 174, 168, 171, 172, 166,
1377 163, 177, 167, 168, 161, 163, 166, 159, 167, 170,
1378 172, 173, 178, 159, 169, 179, 171, 174, 173, 178,
1379
1380 169, 175, 174, 168, 171, 172, 175, 176, 176, 180,
1381 181, 183, 177, 182, 185, 0, 176, 184, 173, 178,
1382 179, 182, 179, 190, 188, 186, 0, 0, 175, 180,
1383 189, 187, 188, 191, 176, 176, 180, 183, 183, 184,
1384 182, 181, 186, 195, 192, 185, 187, 196, 184, 189,
1385 186, 188, 186, 193, 190, 191, 192, 189, 187, 194,
1386 191, 197, 193, 202, 198, 199, 184, 195, 0, 186,
1387 195, 192, 200, 196, 196, 198, 203, 199, 194, 201,
1388 193, 202, 204, 207, 205, 223, 194, 197, 197, 209,
1389 202, 198, 199, 206, 208, 204, 200, 210, 209, 200,
1390
1391 212, 208, 201, 210, 211, 215, 201, 203, 213, 204,
1392 205, 205, 223, 214, 207, 206, 209, 213, 211, 216,
1393 206, 208, 217, 219, 210, 0, 212, 212, 214, 218,
1394 220, 211, 218, 221, 224, 213, 215, 217, 0, 218,
1395 214, 219, 226, 216, 220, 0, 216, 228, 221, 217,
1396 219, 222, 222, 227, 226, 229, 218, 220, 224, 218,
1397 221, 224, 225, 233, 230, 225, 0, 0, 232, 226,
1398 240, 227, 225, 231, 228, 232, 222, 229, 222, 222,
1399 227, 234, 229, 235, 0, 231, 237, 236, 234, 225,
1400 230, 230, 225, 238, 233, 232, 238, 239, 238, 237,
1401
1402 231, 240, 0, 242, 238, 235, 241, 0, 234, 242,
1403 235, 236, 243, 237, 236, 239, 244, 0, 245, 243,
1404 238, 250, 246, 238, 239, 238, 248, 250, 241, 244,
1405 242, 0, 249, 241, 245, 246, 0, 254, 248, 243,
1406 253, 0, 245, 244, 251, 245, 252, 253, 250, 246,
1407 249, 0, 251, 248, 256, 0, 259, 255, 252, 249,
1408 0, 245, 247, 247, 255, 257, 256, 253, 254, 259,
1409 0, 251, 247, 252, 247, 247, 247, 257, 258, 247,
1410 263, 256, 260, 259, 255, 258, 264, 247, 262, 247,
1411 247, 263, 257, 261, 261, 262, 266, 264, 265, 247,
1412
1413 0, 247, 247, 247, 260, 258, 247, 263, 267, 260,
1414 268, 265, 271, 264, 269, 262, 270, 275, 272, 268,
1415 0, 266, 261, 266, 273, 265, 274, 269, 276, 270,
1416 271, 267, 277, 0, 270, 267, 278, 268, 279, 271,
1417 272, 269, 280, 270, 274, 272, 0, 273, 275, 276,
1418 278, 273, 281, 274, 277, 276, 270, 282, 281, 277,
1419 284, 283, 0, 278, 279, 279, 286, 285, 0, 287,
1420 0, 289, 286, 280, 290, 282, 283, 293, 297, 281,
1421 290, 291, 300, 295, 282, 292, 284, 284, 283, 285,
1422 295, 297, 293, 286, 285, 287, 287, 289, 289, 296,
1423
1424 291, 290, 298, 292, 293, 297, 296, 301, 291, 299,
1425 295, 0, 292, 300, 302, 303, 301, 305, 304, 302,
1426 306, 310, 0, 0, 298, 307, 296, 0, 299, 298,
1427 304, 306, 310, 307, 301, 326, 299, 313, 303, 305,
1428 311, 302, 303, 309, 305, 304, 315, 306, 310, 311,
1429 309, 0, 307, 308, 312, 314, 0, 314, 308, 319,
1430 308, 312, 316, 313, 313, 318, 326, 319, 308, 317,
1431 309, 311, 315, 315, 316, 321, 311, 318, 308, 308,
1432 308, 312, 314, 320, 317, 308, 319, 308, 320, 316,
1433 322, 323, 318, 325, 324, 308, 317, 321, 327, 323,
1434
1435 328, 329, 321, 330, 331, 308, 324, 332, 322, 328,
1436 320, 333, 334, 327, 336, 329, 325, 322, 323, 331,
1437 325, 324, 332, 333, 337, 327, 335, 328, 329, 338,
1438 330, 331, 339, 341, 332, 340, 334, 345, 333, 334,
1439 335, 336, 342, 343, 344, 0, 0, 349, 342, 346,
1440 348, 337, 347, 335, 0, 0, 0, 348, 350, 339,
1441 338, 354, 340, 353, 341, 343, 355, 344, 345, 342,
1442 343, 344, 346, 351, 347, 356, 346, 348, 349, 347,
1443 350, 357, 352, 358, 355, 350, 351, 352, 362, 353,
1444 353, 352, 354, 355, 360, 0, 363, 359, 361, 356,
1445
1446 351, 373, 356, 357, 357, 358, 352, 364, 357, 352,
1447 358, 359, 365, 361, 352, 366, 360, 363, 352, 362,
1448 367, 360, 368, 363, 359, 361, 369, 370, 371, 367,
1449 357, 364, 373, 0, 364, 368, 365, 366, 374, 365,
1450 372, 376, 366, 375, 372, 376, 0, 367, 369, 368,
1451 371, 370, 377, 369, 370, 371, 374, 378, 375, 379,
1452 380, 0, 0, 384, 385, 374, 381, 375, 379, 380,
1453 375, 372, 376, 382, 381, 383, 385, 377, 388, 377,
1454 382, 384, 378, 386, 378, 375, 379, 380, 389, 387,
1455 384, 385, 386, 381, 390, 391, 389, 392, 383, 394,
1456
1457 382, 387, 383, 393, 404, 397, 0, 394, 396, 388,
1458 386, 395, 399, 398, 393, 389, 387, 404, 391, 392,
1459 390, 390, 391, 400, 392, 395, 394, 397, 396, 402,
1460 393, 404, 397, 398, 399, 396, 403, 401, 395, 399,
1461 398, 408, 406, 405, 407, 400, 401, 408, 411, 402,
1462 400, 409, 0, 412, 403, 414, 402, 0, 0, 409,
1463 424, 415, 0, 403, 401, 405, 406, 407, 408, 406,
1464 405, 407, 413, 415, 414, 418, 412, 409, 409, 411,
1465 412, 413, 414, 421, 422, 418, 409, 426, 415, 423,
1466 0, 424, 0, 428, 427, 428, 430, 0, 431, 413,
1467
1468 0, 421, 418, 427, 429, 422, 0, 0, 435, 426,
1469 421, 422, 423, 432, 426, 0, 423, 425, 431, 425,
1470 428, 427, 425, 430, 433, 431, 434, 425, 429, 438,
1471 436, 429, 435, 425, 425, 435, 433, 436, 439, 432,
1472 432, 442, 425, 443, 425, 444, 425, 437, 438, 425,
1473 440, 433, 434, 434, 425, 437, 438, 436, 441, 445,
1474 425, 425, 440, 442, 439, 439, 446, 441, 442, 447,
1475 443, 448, 449, 450, 437, 454, 444, 440, 452, 477,
1476 457, 449, 451, 445, 453, 441, 445, 446, 447, 455,
1477 448, 459, 0, 446, 0, 450, 447, 455, 448, 449,
1478
1479 450, 458, 451, 453, 457, 452, 454, 457, 460, 451,
1480 477, 453, 468, 461, 458, 465, 455, 459, 459, 463,
1481 460, 461, 465, 464, 469, 463, 466, 467, 458, 464,
1482 468, 466, 470, 0, 467, 460, 471, 461, 472, 468,
1483 461, 470, 465, 474, 471, 473, 463, 469, 461, 479,
1484 464, 469, 478, 466, 467, 475, 472, 479, 473, 470,
1485 476, 481, 475, 471, 474, 472, 480, 485, 482, 484,
1486 474, 483, 473, 476, 482, 478, 479, 486, 487, 478,
1487 488, 480, 475, 481, 0, 490, 486, 476, 481, 489,
1488 491, 485, 487, 480, 485, 482, 489, 483, 483, 493,
1489
1490 484, 492, 494, 495, 486, 487, 495, 496, 0, 498,
1491 494, 488, 490, 492, 0, 500, 489, 491, 501, 499,
1492 496, 499, 493, 504, 505, 503, 493, 500, 492, 494,
1493 495, 501, 498, 502, 496, 497, 498, 497, 503, 502,
1494 508, 497, 500, 497, 504, 501, 499, 507, 497, 0,
1495 504, 506, 503, 508, 510, 505, 506, 509, 506, 497,
1496 502, 515, 497, 512, 497, 511, 513, 508, 497, 507,
1497 497, 518, 509, 516, 507, 497, 506, 506, 506, 513,
1498 510, 510, 512, 506, 509, 506, 514, 511, 515, 520,
1499 512, 519, 511, 513, 514, 521, 516, 520, 522, 523,
1500
1501 516, 525, 518, 506, 524, 529, 527, 526, 0, 521,
1502 533, 528, 524, 514, 526, 519, 520, 523, 519, 527,
1503 522, 531, 521, 525, 534, 522, 523, 532, 525, 528,
1504 531, 524, 533, 527, 526, 535, 529, 533, 528, 532,
1505 536, 538, 537, 540, 543, 0, 534, 540, 531, 541,
1506 564, 534, 541, 542, 532, 546, 543, 535, 536, 544,
1507 545, 546, 535, 547, 551, 0, 544, 536, 537, 537,
1508 548, 543, 538, 549, 540, 541, 541, 542, 550, 541,
1509 542, 564, 546, 552, 545, 547, 544, 545, 554, 553,
1510 547, 551, 548, 555, 549, 556, 559, 548, 553, 550,
1511
1512 549, 552, 555, 556, 557, 550, 560, 558, 561, 563,
1513 552, 557, 554, 562, 565, 554, 553, 561, 559, 567,
1514 555, 558, 556, 559, 568, 563, 566, 0, 560, 569,
1515 573, 557, 568, 560, 558, 561, 563, 562, 566, 570,
1516 562, 572, 569, 579, 574, 565, 567, 575, 573, 575,
1517 572, 568, 574, 566, 570, 579, 569, 573, 580, 578,
1518 581, 582, 583, 584, 0, 580, 570, 585, 572, 587,
1519 579, 574, 578, 586, 575, 588, 584, 589, 0, 590,
1520 585, 587, 609, 591, 583, 580, 578, 588, 590, 583,
1521 584, 581, 582, 592, 585, 586, 587, 593, 597, 594,
1522
1523 586, 591, 588, 595, 589, 593, 590, 598, 596, 603,
1524 591, 595, 600, 609, 601, 592, 597, 599, 603, 598,
1525 592, 594, 601, 617, 593, 597, 594, 600, 604, 599,
1526 595, 596, 602, 605, 598, 596, 603, 610, 602, 600,
1527 606, 601, 615, 607, 599, 605, 611, 606, 616, 604,
1528 610, 612, 613, 614, 617, 604, 615, 614, 612, 602,
1529 605, 607, 618, 619, 610, 611, 616, 606, 621, 615,
1530 607, 620, 625, 611, 613, 616, 626, 622, 612, 613,
1531 0, 0, 624, 623, 614, 619, 627, 0, 618, 618,
1532 619, 624, 628, 620, 621, 621, 623, 0, 620, 622,
1533
1534 632, 630, 0, 625, 622, 634, 637, 626, 627, 624,
1535 623, 629, 633, 627, 634, 628, 629, 630, 629, 628,
1536 629, 635, 636, 632, 633, 637, 639, 632, 630, 629,
1537 636, 638, 634, 637, 635, 639, 641, 642, 629, 633,
1538 640, 644, 640, 629, 638, 629, 646, 629, 635, 636,
1539 645, 647, 648, 639, 646, 649, 0, 651, 638, 648,
1540 657, 650, 652, 641, 642, 644, 654, 640, 644, 652,
1541 653, 656, 645, 646, 655, 658, 660, 645, 647, 648,
1542 656, 657, 649, 650, 651, 654, 661, 657, 650, 652,
1543 663, 662, 653, 654, 670, 658, 655, 653, 656, 666,
1544
1545 665, 655, 658, 667, 664, 668, 669, 660, 665, 671,
1546 669, 673, 668, 662, 674, 666, 671, 661, 662, 678,
1547 673, 663, 664, 678, 0, 670, 666, 665, 672, 689,
1548 667, 664, 668, 669, 0, 672, 671, 675, 673, 677,
1549 674, 674, 689, 676, 675, 676, 678, 680, 677, 681,
1550 681, 680, 682, 683, 684, 672, 689, 0, 685, 686,
1551 687, 682, 690, 684, 675, 685, 677, 0, 692, 687,
1552 676, 0, 694, 693, 690, 683, 681, 698, 680, 682,
1553 683, 684, 686, 688, 691, 685, 686, 687, 695, 690,
1554 692, 688, 691, 693, 694, 692, 696, 695, 698, 694,
1555
1556 693, 697, 699, 700, 698, 701, 702, 703, 699, 714,
1557 688, 691, 707, 697, 696, 695, 705, 708, 706, 709,
1558 707, 708, 0, 696, 710, 700, 713, 711, 697, 699,
1559 700, 706, 710, 703, 703, 711, 701, 702, 705, 707,
1560 714, 712, 715, 705, 716, 706, 709, 713, 708, 712,
1561 715, 710, 716, 713, 711, 717, 718, 719, 723, 720,
1562 721, 0, 722, 717, 718, 720, 727, 724, 712, 715,
1563 719, 716, 721, 727, 726, 728, 729, 725, 732, 737,
1564 723, 736, 717, 718, 719, 723, 720, 721, 722, 722,
1565 724, 725, 726, 727, 724, 730, 739, 735, 729, 731,
1566
1567 741, 726, 728, 729, 725, 743, 731, 736, 736, 732,
1568 737, 744, 746, 745, 746, 0, 748, 749, 730, 735,
1569 747, 766, 730, 739, 735, 745, 731, 741, 748, 743,
1570 751, 752, 743, 753, 750, 774, 752, 744, 744, 746,
1571 745, 750, 747, 748, 749, 754, 755, 747, 756, 753,
1572 758, 759, 766, 760, 755, 761, 751, 751, 752, 758,
1573 753, 750, 761, 764, 759, 765, 774, 762, 754, 763,
1574 756, 0, 754, 755, 762, 756, 763, 758, 759, 760,
1575 760, 769, 761, 771, 767, 768, 0, 765, 764, 773,
1576 764, 767, 765, 772, 762, 772, 763, 775, 768, 777,
1577
1578 776, 0, 769, 779, 782, 771, 781, 777, 769, 776,
1579 771, 767, 768, 773, 778, 780, 773, 783, 789, 780,
1580 772, 778, 787, 775, 775, 779, 777, 776, 781, 784,
1581 779, 782, 789, 781, 790, 787, 785, 788, 784, 783,
1582 786, 778, 780, 785, 783, 789, 791, 786, 792, 787,
1583 794, 793, 788, 791, 795, 792, 784, 793, 796, 797,
1584 800, 796, 794, 785, 788, 790, 801, 786, 802, 807,
1585 797, 803, 804, 791, 795, 792, 796, 794, 793, 802,
1586 804, 795, 0, 806, 808, 796, 797, 800, 796, 803,
1587 801, 805, 810, 801, 805, 802, 809, 819, 803, 804,
1588
1589 807, 806, 812, 809, 811, 813, 810, 813, 814, 805,
1590 806, 808, 815, 811, 816, 812, 821, 814, 805, 810,
1591 0, 805, 822, 809, 817, 816, 823, 820, 819, 812,
1592 0, 811, 813, 817, 824, 814, 820, 0, 815, 815,
1593 825, 816, 829, 822, 828, 831, 825, 821, 824, 822,
1594 830, 817, 840, 831, 820, 832, 829, 823, 836, 830,
1595 0, 824, 837, 828, 825, 833, 832, 825, 835, 829,
1596 840, 828, 831, 825, 833, 835, 838, 830, 839, 840,
1597 843, 836, 832, 841, 837, 836, 844, 841, 847, 837,
1598 842, 845, 833, 846, 848, 835, 855, 851, 838, 844,
1599
1600 839, 850, 842, 838, 852, 839, 845, 843, 846, 848,
1601 841, 853, 854, 844, 849, 859, 863, 842, 845, 847,
1602 846, 848, 850, 849, 851, 857, 856, 855, 850, 853,
1603 858, 852, 856, 857, 861, 862, 860, 858, 853, 854,
1604 864, 849, 859, 860, 866, 867, 868, 863, 872, 869,
1605 0, 869, 857, 856, 867, 870, 0, 858, 871, 877,
1606 0, 861, 862, 860, 864, 877, 873, 864, 873, 878,
1607 0, 874, 867, 873, 0, 866, 869, 868, 874, 872,
1608 875, 873, 870, 876, 871, 871, 877, 875, 879, 879,
1609 876, 880, 881, 873, 883, 873, 878, 884, 874, 881,
1610
1611 873, 888, 885, 887, 887, 886, 893, 875, 896, 884,
1612 876, 892, 883, 889, 889, 879, 895, 880, 880, 881,
1613 890, 883, 885, 886, 884, 0, 897, 888, 888, 885,
1614 887, 890, 886, 892, 894, 896, 895, 893, 892, 898,
1615 889, 894, 899, 895, 900, 909, 901, 890, 897, 899,
1616 902, 903, 904, 897, 901, 906, 900, 898, 905, 907,
1617 910, 894, 902, 905, 911, 907, 898, 908, 911, 899,
1618 904, 900, 903, 901, 905, 912, 909, 902, 903, 904,
1619 908, 913, 906, 914, 915, 905, 907, 910, 917, 916,
1620 905, 918, 919, 918, 908, 911, 913, 920, 921, 915,
1621
1622 925, 924, 920, 917, 922, 926, 912, 933, 913, 927,
1623 0, 915, 916, 928, 914, 917, 916, 929, 918, 922,
1624 940, 930, 933, 919, 920, 924, 935, 925, 924, 921,
1625 927, 922, 926, 936, 933, 928, 927, 935, 929, 930,
1626 928, 937, 936, 938, 929, 943, 944, 940, 930, 946,
1627 0, 948, 935, 935, 947, 945, 0, 0, 943, 937,
1628 936, 938, 951, 950, 935, 945, 952, 953, 937, 951,
1629 938, 954, 943, 953, 0, 946, 946, 944, 948, 947,
1630 955, 947, 945, 950, 956, 957, 954, 960, 961, 951,
1631 950, 962, 952, 952, 953, 955, 958, 957, 954, 956,
1632
1633 962, 963, 965, 958, 964, 966, 966, 955, 967, 960,
1634 0, 956, 957, 961, 960, 961, 968, 964, 962, 963,
1635 969, 973, 970, 958, 971, 0, 974, 972, 963, 965,
1636 967, 964, 966, 971, 972, 967, 978, 976, 0, 996,
1637 979, 968, 969, 968, 970, 976, 977, 969, 974, 970,
1638 982, 971, 973, 974, 972, 979, 981, 980, 984, 977,
1639 980, 983, 998, 978, 976, 987, 996, 979, 982, 985,
1640 994, 988, 994, 977, 991, 980, 983, 982, 988, 987,
1641 984, 981, 989, 981, 980, 984, 993, 980, 983, 998,
1642 995, 985, 987, 989, 997, 991, 985, 994, 988, 1000,
1643
1644 1002, 991, 999, 1001, 1003, 1004, 1064, 993, 995, 989,
1645 999, 1008, 997, 993, 1002, 1007, 1012, 995, 1009, 1010,
1646 0, 997, 1000, 0, 1004, 1001, 1000, 1002, 1011, 999,
1647 1001, 1003, 1004, 1007, 1010, 1013, 1014, 1064, 1008, 1012,
1648 1015, 1015, 1007, 1012, 1009, 1009, 1010, 1013, 1016, 1018,
1649 1011, 1019, 1018, 1021, 1020, 1011, 1016, 1024, 1014, 1019,
1650 1020, 1025, 1013, 1014, 1022, 1026, 1029, 1015, 1021, 1027,
1651 1022, 1028, 1030, 1031, 1032, 1016, 1018, 1033, 1019, 1026,
1652 1021, 1020, 1034, 1027, 1024, 1025, 1035, 1031, 1025, 1036,
1653 1034, 1022, 1026, 1029, 1037, 1039, 1027, 1028, 1028, 1030,
1654
1655 1031, 1032, 1037, 1040, 1033, 1042, 1041, 1044, 0, 1034,
1656 1043, 1045, 0, 1035, 1041, 1047, 1036, 1039, 1048, 1043,
1657 1049, 1037, 1039, 0, 1046, 1051, 1048, 1053, 1044, 1055,
1658 1040, 1054, 1042, 1041, 1044, 1045, 0, 1043, 1045, 1046,
1659 1052, 1052, 1047, 1056, 1055, 1048, 1057, 1049, 1057, 1054,
1660 1046, 1046, 1051, 1053, 1053, 1058, 1055, 1059, 1054, 1060,
1661 1061, 1062, 1063, 1059, 0, 1056, 1046, 1052, 1065, 1058,
1662 1056, 1067, 1061, 1057, 1069, 1071, 1070, 1078, 1067, 1062,
1663 1063, 1060, 1058, 1077, 1059, 1072, 1060, 1061, 1062, 1063,
1664 1075, 1065, 1069, 1072, 1079, 1065, 1074, 1088, 1067, 1078,
1665
1666 1081, 1069, 1070, 1070, 1078, 1075, 1071, 1077, 1074, 1080,
1667 1077, 1072, 1072, 1082, 1089, 1083, 1085, 1075, 1084, 1086,
1668 1072, 1079, 1087, 1074, 1081, 1084, 1086, 1081, 1088, 1092,
1669 1094, 1108, 1080, 1093, 1100, 1089, 1080, 1083, 1097, 1085,
1670 1082, 1089, 1083, 1085, 1087, 1084, 1086, 1091, 1103, 1087,
1671 1104, 1092, 1093, 1106, 1112, 1094, 1092, 1094, 1091, 1109,
1672 1093, 1100, 1108, 1111, 1097, 1097, 1114, 1110, 1111, 1117,
1673 1103, 1119, 1118, 1120, 1091, 1103, 1112, 1104, 1110, 1121,
1674 1106, 1112, 1122, 1123, 1119, 1109, 1109, 1124, 1126, 1127,
1675 1111, 1117, 1125, 1114, 1110, 1120, 1117, 1118, 1119, 1118,
1676
1677 1120, 1125, 1124, 1126, 1127, 1128, 1121, 1130, 1131, 1122,
1678 1123, 1129, 1132, 1132, 1124, 1126, 1127, 1133, 1129, 1125,
1679 1128, 1137, 1134, 1138, 1133, 1135, 1131, 1136, 1135, 1139,
1680 1137, 1140, 1128, 1142, 1130, 1131, 1134, 1143, 1129, 1132,
1681 1136, 1145, 1142, 1146, 1133, 1138, 1148, 1147, 1137, 1134,
1682 1138, 1139, 1135, 1149, 1136, 1148, 1139, 1152, 1140, 1147,
1683 1142, 1146, 1149, 1143, 1143, 1150, 1153, 1151, 1145, 1154,
1684 1146, 1155, 1163, 1148, 1147, 1151, 1150, 1162, 1156, 1155,
1685 1149, 1154, 1158, 1164, 1152, 1156, 1161, 1167, 1169, 1170,
1686 1158, 1165, 1150, 1161, 1151, 1164, 1154, 1153, 1155, 1163,
1687
1688 1165, 1162, 1174, 1168, 1162, 1156, 1176, 1175, 1179, 1158,
1689 1164, 1168, 1175, 1161, 1167, 1169, 1170, 1177, 1165, 1178,
1690 1181, 1182, 1185, 1183, 1176, 1184, 1186, 1179, 1174, 1174,
1691 1168, 1187, 1181, 1176, 1175, 1179, 1188, 1184, 1189, 1177,
1692 1192, 1178, 1191, 1182, 1177, 1183, 1178, 1181, 1182, 1185,
1693 1183, 1194, 1184, 1186, 1195, 1192, 1196, 1203, 1197, 0,
1694 1198, 1199, 1187, 1188, 1191, 1189, 1205, 1192, 1195, 1191,
1695 1212, 1204, 1201, 1206, 1196, 1194, 1197, 1209, 1194, 1199,
1696 1201, 1195, 1202, 1196, 1203, 1197, 1198, 1198, 1199, 1204,
1697 1202, 1207, 1206, 1205, 1210, 1209, 1215, 1212, 1204, 1201,
1698
1699 1206, 1216, 1217, 1215, 1209, 1218, 1219, 1220, 1210, 1202,
1700 1222, 1221, 1223, 1207, 0, 1227, 1220, 1224, 1207, 1233,
1701 0, 1210, 1230, 1215, 1221, 1235, 1217, 1216, 1216, 1217,
1702 1230, 1231, 1218, 1219, 1220, 1232, 1227, 1234, 1221, 1223,
1703 1224, 1222, 1227, 1232, 1224, 1233, 1233, 1235, 1234, 1230,
1704 1231, 1238, 1235, 1236, 1237, 1237, 1239, 1243, 1231, 1244,
1705 1236, 1241, 1232, 1239, 1234, 0, 1243, 1245, 1250, 1238,
1706 1250, 1246, 1249, 1248, 1253, 0, 1254, 0, 1238, 1255,
1707 1236, 1237, 1257, 1239, 1243, 1241, 1244, 1249, 1241, 1246,
1708 1245, 1248, 1258, 0, 1245, 1250, 1253, 1255, 1246, 1249,
1709
1710 1248, 1253, 1254, 1254, 1257, 1259, 1255, 1261, 1260, 1257,
1711 1258, 1262, 1263, 1259, 1264, 1266, 1269, 1265, 1268, 1258,
1712 1260, 1272, 1264, 1263, 1267, 1267, 1268, 1270, 1275, 1262,
1713 1276, 0, 1259, 1273, 1261, 1260, 1265, 1266, 1262, 1263,
1714 1273, 1264, 1266, 1269, 1265, 1268, 1278, 1274, 1272, 1270,
1715 1277, 1267, 1274, 1280, 1270, 1275, 1279, 1276, 1277, 1282,
1716 1273, 1278, 1283, 1279, 1281, 1285, 1286, 1287, 1288, 1289,
1717 1283, 1291, 1295, 1278, 1274, 1290, 0, 1277, 1285, 1281,
1718 1280, 1293, 1296, 1279, 1299, 1300, 1282, 1306, 1286, 1283,
1719 1311, 1281, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1295,
1720
1721 1301, 1303, 1290, 1299, 1296, 1315, 1305, 1293, 1293, 1296,
1722 1318, 1299, 1300, 1305, 1306, 1307, 1313, 1311, 1316, 1318,
1723 1319, 1320, 1301, 1303, 1322, 1324, 1326, 1301, 1303, 1327,
1724 1316, 1332, 1315, 1305, 1334, 0, 1338, 1318, 1307, 1313,
1725 0, 1326, 1307, 1313, 1335, 1316, 1340, 1319, 1320, 1338,
1726 1333, 1322, 1324, 1326, 1332, 1327, 1327, 1333, 1332, 1339,
1727 1337, 1334, 1335, 1338, 0, 0, 0, 1339, 0, 0,
1728 0, 1335, 1337, 1340, 0, 0, 0, 1333, 0, 0,
1729 0, 0, 0, 0, 0, 0, 1339, 1337, 1343, 1343,
1730 1343, 1343, 1343, 1343, 1343, 1344, 1344, 1344, 1344, 1344,
1731
1732 1344, 1344, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1346,
1733 1346, 1346, 1346, 1346, 1346, 1346, 1347, 1347, 1347, 1347,
1734 1347, 1347, 1347, 1349, 1349, 0, 1349, 1349, 1349, 1349,
1735 1350, 1350, 0, 0, 0, 1350, 1350, 1351, 1351, 0,
1736 0, 1351, 0, 1351, 1352, 0, 0, 0, 0, 0,
1737 1352, 1353, 1353, 0, 0, 0, 1353, 1353, 1354, 0,
1738 0, 0, 0, 0, 1354, 1355, 1355, 0, 1355, 1355,
1739 1355, 1355, 1356, 1356, 0, 1356, 1356, 1356, 1356, 1342,
1740 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
1741 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
1742
1743 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
1744 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
1745 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
1746 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
1747 1342, 1342, 1342, 1342, 1342
17061748 } ;
17071749
17081750 static yy_state_type yy_last_accepting_state;
18261868 #define YY_NO_INPUT 1
18271869 #endif
18281870
1829 #line 1829 "<stdout>"
1871 #line 1871 "<stdout>"
18301872
18311873 #define INITIAL 0
18321874 #define quotedstring 1
20132055
20142056 #line 120 "util/configlexer.lex"
20152057
2016 #line 2016 "<stdout>"
2058 #line 2058 "<stdout>"
20172059
20182060 if ( !(yy_init) )
20192061 {
20722114 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
20732115 {
20742116 yy_current_state = (int) yy_def[yy_current_state];
2075 if ( yy_current_state >= 1303 )
2117 if ( yy_current_state >= 1343 )
20762118 yy_c = yy_meta[(unsigned int) yy_c];
20772119 }
20782120 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
20792121 ++yy_cp;
20802122 }
2081 while ( yy_base[yy_current_state] != 3745 );
2123 while ( yy_base[yy_current_state] != 3880 );
20822124
20832125 yy_find_action:
20842126 yy_act = yy_accept[yy_current_state];
24332475 case 66:
24342476 YY_RULE_SETUP
24352477 #line 189 "util/configlexer.lex"
2478 { YDVAR(1, VAR_STUB_FIRST) }
2479 YY_BREAK
2480 case 67:
2481 YY_RULE_SETUP
2482 #line 190 "util/configlexer.lex"
24362483 { YDVAR(0, VAR_FORWARD_ZONE) }
24372484 YY_BREAK
2438 case 67:
2439 YY_RULE_SETUP
2440 #line 190 "util/configlexer.lex"
2485 case 68:
2486 YY_RULE_SETUP
2487 #line 191 "util/configlexer.lex"
24412488 { YDVAR(1, VAR_FORWARD_ADDR) }
24422489 YY_BREAK
2443 case 68:
2444 YY_RULE_SETUP
2445 #line 191 "util/configlexer.lex"
2490 case 69:
2491 YY_RULE_SETUP
2492 #line 192 "util/configlexer.lex"
24462493 { YDVAR(1, VAR_FORWARD_HOST) }
24472494 YY_BREAK
2448 case 69:
2449 YY_RULE_SETUP
2450 #line 192 "util/configlexer.lex"
2495 case 70:
2496 YY_RULE_SETUP
2497 #line 193 "util/configlexer.lex"
2498 { YDVAR(1, VAR_FORWARD_FIRST) }
2499 YY_BREAK
2500 case 71:
2501 YY_RULE_SETUP
2502 #line 194 "util/configlexer.lex"
24512503 { YDVAR(1, VAR_DO_NOT_QUERY_ADDRESS) }
24522504 YY_BREAK
2453 case 70:
2454 YY_RULE_SETUP
2455 #line 193 "util/configlexer.lex"
2505 case 72:
2506 YY_RULE_SETUP
2507 #line 195 "util/configlexer.lex"
24562508 { YDVAR(1, VAR_DO_NOT_QUERY_LOCALHOST) }
24572509 YY_BREAK
2458 case 71:
2459 YY_RULE_SETUP
2460 #line 194 "util/configlexer.lex"
2510 case 73:
2511 YY_RULE_SETUP
2512 #line 196 "util/configlexer.lex"
24612513 { YDVAR(2, VAR_ACCESS_CONTROL) }
24622514 YY_BREAK
2463 case 72:
2464 YY_RULE_SETUP
2465 #line 195 "util/configlexer.lex"
2515 case 74:
2516 YY_RULE_SETUP
2517 #line 197 "util/configlexer.lex"
24662518 { YDVAR(1, VAR_HIDE_IDENTITY) }
24672519 YY_BREAK
2468 case 73:
2469 YY_RULE_SETUP
2470 #line 196 "util/configlexer.lex"
2520 case 75:
2521 YY_RULE_SETUP
2522 #line 198 "util/configlexer.lex"
24712523 { YDVAR(1, VAR_HIDE_VERSION) }
24722524 YY_BREAK
2473 case 74:
2474 YY_RULE_SETUP
2475 #line 197 "util/configlexer.lex"
2525 case 76:
2526 YY_RULE_SETUP
2527 #line 199 "util/configlexer.lex"
24762528 { YDVAR(1, VAR_IDENTITY) }
24772529 YY_BREAK
2478 case 75:
2479 YY_RULE_SETUP
2480 #line 198 "util/configlexer.lex"
2530 case 77:
2531 YY_RULE_SETUP
2532 #line 200 "util/configlexer.lex"
24812533 { YDVAR(1, VAR_VERSION) }
24822534 YY_BREAK
2483 case 76:
2484 YY_RULE_SETUP
2485 #line 199 "util/configlexer.lex"
2535 case 78:
2536 YY_RULE_SETUP
2537 #line 201 "util/configlexer.lex"
24862538 { YDVAR(1, VAR_MODULE_CONF) }
24872539 YY_BREAK
2488 case 77:
2489 YY_RULE_SETUP
2490 #line 200 "util/configlexer.lex"
2540 case 79:
2541 YY_RULE_SETUP
2542 #line 202 "util/configlexer.lex"
24912543 { YDVAR(1, VAR_DLV_ANCHOR) }
24922544 YY_BREAK
2493 case 78:
2494 YY_RULE_SETUP
2495 #line 201 "util/configlexer.lex"
2545 case 80:
2546 YY_RULE_SETUP
2547 #line 203 "util/configlexer.lex"
24962548 { YDVAR(1, VAR_DLV_ANCHOR_FILE) }
24972549 YY_BREAK
2498 case 79:
2499 YY_RULE_SETUP
2500 #line 202 "util/configlexer.lex"
2550 case 81:
2551 YY_RULE_SETUP
2552 #line 204 "util/configlexer.lex"
25012553 { YDVAR(1, VAR_TRUST_ANCHOR_FILE) }
25022554 YY_BREAK
2503 case 80:
2504 YY_RULE_SETUP
2505 #line 203 "util/configlexer.lex"
2555 case 82:
2556 YY_RULE_SETUP
2557 #line 205 "util/configlexer.lex"
25062558 { YDVAR(1, VAR_AUTO_TRUST_ANCHOR_FILE) }
25072559 YY_BREAK
2508 case 81:
2509 YY_RULE_SETUP
2510 #line 204 "util/configlexer.lex"
2560 case 83:
2561 YY_RULE_SETUP
2562 #line 206 "util/configlexer.lex"
25112563 { YDVAR(1, VAR_TRUSTED_KEYS_FILE) }
25122564 YY_BREAK
2513 case 82:
2514 YY_RULE_SETUP
2515 #line 205 "util/configlexer.lex"
2565 case 84:
2566 YY_RULE_SETUP
2567 #line 207 "util/configlexer.lex"
25162568 { YDVAR(1, VAR_TRUST_ANCHOR) }
25172569 YY_BREAK
2518 case 83:
2519 YY_RULE_SETUP
2520 #line 206 "util/configlexer.lex"
2570 case 85:
2571 YY_RULE_SETUP
2572 #line 208 "util/configlexer.lex"
25212573 { YDVAR(1, VAR_VAL_OVERRIDE_DATE) }
25222574 YY_BREAK
2523 case 84:
2524 YY_RULE_SETUP
2525 #line 207 "util/configlexer.lex"
2575 case 86:
2576 YY_RULE_SETUP
2577 #line 209 "util/configlexer.lex"
25262578 { YDVAR(1, VAR_VAL_SIG_SKEW_MIN) }
25272579 YY_BREAK
2528 case 85:
2529 YY_RULE_SETUP
2530 #line 208 "util/configlexer.lex"
2580 case 87:
2581 YY_RULE_SETUP
2582 #line 210 "util/configlexer.lex"
25312583 { YDVAR(1, VAR_VAL_SIG_SKEW_MAX) }
25322584 YY_BREAK
2533 case 86:
2534 YY_RULE_SETUP
2535 #line 209 "util/configlexer.lex"
2585 case 88:
2586 YY_RULE_SETUP
2587 #line 211 "util/configlexer.lex"
25362588 { YDVAR(1, VAR_BOGUS_TTL) }
25372589 YY_BREAK
2538 case 87:
2539 YY_RULE_SETUP
2540 #line 210 "util/configlexer.lex"
2590 case 89:
2591 YY_RULE_SETUP
2592 #line 212 "util/configlexer.lex"
25412593 { YDVAR(1, VAR_VAL_CLEAN_ADDITIONAL) }
25422594 YY_BREAK
2543 case 88:
2544 YY_RULE_SETUP
2545 #line 211 "util/configlexer.lex"
2595 case 90:
2596 YY_RULE_SETUP
2597 #line 213 "util/configlexer.lex"
25462598 { YDVAR(1, VAR_VAL_PERMISSIVE_MODE) }
25472599 YY_BREAK
2548 case 89:
2549 YY_RULE_SETUP
2550 #line 212 "util/configlexer.lex"
2600 case 91:
2601 YY_RULE_SETUP
2602 #line 214 "util/configlexer.lex"
25512603 { YDVAR(1, VAR_IGNORE_CD_FLAG) }
25522604 YY_BREAK
2553 case 90:
2554 YY_RULE_SETUP
2555 #line 213 "util/configlexer.lex"
2605 case 92:
2606 YY_RULE_SETUP
2607 #line 215 "util/configlexer.lex"
25562608 { YDVAR(1, VAR_VAL_LOG_LEVEL) }
25572609 YY_BREAK
2558 case 91:
2559 YY_RULE_SETUP
2560 #line 214 "util/configlexer.lex"
2610 case 93:
2611 YY_RULE_SETUP
2612 #line 216 "util/configlexer.lex"
25612613 { YDVAR(1, VAR_KEY_CACHE_SIZE) }
25622614 YY_BREAK
2563 case 92:
2564 YY_RULE_SETUP
2565 #line 215 "util/configlexer.lex"
2615 case 94:
2616 YY_RULE_SETUP
2617 #line 217 "util/configlexer.lex"
25662618 { YDVAR(1, VAR_KEY_CACHE_SLABS) }
25672619 YY_BREAK
2568 case 93:
2569 YY_RULE_SETUP
2570 #line 216 "util/configlexer.lex"
2620 case 95:
2621 YY_RULE_SETUP
2622 #line 218 "util/configlexer.lex"
25712623 { YDVAR(1, VAR_NEG_CACHE_SIZE) }
25722624 YY_BREAK
2573 case 94:
2574 YY_RULE_SETUP
2575 #line 217 "util/configlexer.lex"
2625 case 96:
2626 YY_RULE_SETUP
2627 #line 219 "util/configlexer.lex"
25762628 {
25772629 YDVAR(1, VAR_VAL_NSEC3_KEYSIZE_ITERATIONS) }
25782630 YY_BREAK
2579 case 95:
2580 YY_RULE_SETUP
2581 #line 219 "util/configlexer.lex"
2631 case 97:
2632 YY_RULE_SETUP
2633 #line 221 "util/configlexer.lex"
25822634 { YDVAR(1, VAR_ADD_HOLDDOWN) }
25832635 YY_BREAK
2584 case 96:
2585 YY_RULE_SETUP
2586 #line 220 "util/configlexer.lex"
2636 case 98:
2637 YY_RULE_SETUP
2638 #line 222 "util/configlexer.lex"
25872639 { YDVAR(1, VAR_DEL_HOLDDOWN) }
25882640 YY_BREAK
2589 case 97:
2590 YY_RULE_SETUP
2591 #line 221 "util/configlexer.lex"
2641 case 99:
2642 YY_RULE_SETUP
2643 #line 223 "util/configlexer.lex"
25922644 { YDVAR(1, VAR_KEEP_MISSING) }
25932645 YY_BREAK
2594 case 98:
2595 YY_RULE_SETUP
2596 #line 222 "util/configlexer.lex"
2646 case 100:
2647 YY_RULE_SETUP
2648 #line 224 "util/configlexer.lex"
25972649 { YDVAR(1, VAR_USE_SYSLOG) }
25982650 YY_BREAK
2599 case 99:
2600 YY_RULE_SETUP
2601 #line 223 "util/configlexer.lex"
2651 case 101:
2652 YY_RULE_SETUP
2653 #line 225 "util/configlexer.lex"
26022654 { YDVAR(1, VAR_LOG_TIME_ASCII) }
26032655 YY_BREAK
2604 case 100:
2605 YY_RULE_SETUP
2606 #line 224 "util/configlexer.lex"
2656 case 102:
2657 YY_RULE_SETUP
2658 #line 226 "util/configlexer.lex"
26072659 { YDVAR(1, VAR_LOG_QUERIES) }
26082660 YY_BREAK
2609 case 101:
2610 YY_RULE_SETUP
2611 #line 225 "util/configlexer.lex"
2661 case 103:
2662 YY_RULE_SETUP
2663 #line 227 "util/configlexer.lex"
26122664 { YDVAR(2, VAR_LOCAL_ZONE) }
26132665 YY_BREAK
2614 case 102:
2615 YY_RULE_SETUP
2616 #line 226 "util/configlexer.lex"
2666 case 104:
2667 YY_RULE_SETUP
2668 #line 228 "util/configlexer.lex"
26172669 { YDVAR(1, VAR_LOCAL_DATA) }
26182670 YY_BREAK
2619 case 103:
2620 YY_RULE_SETUP
2621 #line 227 "util/configlexer.lex"
2671 case 105:
2672 YY_RULE_SETUP
2673 #line 229 "util/configlexer.lex"
26222674 { YDVAR(1, VAR_LOCAL_DATA_PTR) }
26232675 YY_BREAK
2624 case 104:
2625 YY_RULE_SETUP
2626 #line 228 "util/configlexer.lex"
2676 case 106:
2677 YY_RULE_SETUP
2678 #line 230 "util/configlexer.lex"
26272679 { YDVAR(1, VAR_STATISTICS_INTERVAL) }
26282680 YY_BREAK
2629 case 105:
2630 YY_RULE_SETUP
2631 #line 229 "util/configlexer.lex"
2681 case 107:
2682 YY_RULE_SETUP
2683 #line 231 "util/configlexer.lex"
26322684 { YDVAR(1, VAR_STATISTICS_CUMULATIVE) }
26332685 YY_BREAK
2634 case 106:
2635 YY_RULE_SETUP
2636 #line 230 "util/configlexer.lex"
2686 case 108:
2687 YY_RULE_SETUP
2688 #line 232 "util/configlexer.lex"
26372689 { YDVAR(1, VAR_EXTENDED_STATISTICS) }
26382690 YY_BREAK
2639 case 107:
2640 YY_RULE_SETUP
2641 #line 231 "util/configlexer.lex"
2691 case 109:
2692 YY_RULE_SETUP
2693 #line 233 "util/configlexer.lex"
26422694 { YDVAR(0, VAR_REMOTE_CONTROL) }
26432695 YY_BREAK
2644 case 108:
2645 YY_RULE_SETUP
2646 #line 232 "util/configlexer.lex"
2696 case 110:
2697 YY_RULE_SETUP
2698 #line 234 "util/configlexer.lex"
26472699 { YDVAR(1, VAR_CONTROL_ENABLE) }
26482700 YY_BREAK
2649 case 109:
2650 YY_RULE_SETUP
2651 #line 233 "util/configlexer.lex"
2701 case 111:
2702 YY_RULE_SETUP
2703 #line 235 "util/configlexer.lex"
26522704 { YDVAR(1, VAR_CONTROL_INTERFACE) }
26532705 YY_BREAK
2654 case 110:
2655 YY_RULE_SETUP
2656 #line 234 "util/configlexer.lex"
2706 case 112:
2707 YY_RULE_SETUP
2708 #line 236 "util/configlexer.lex"
26572709 { YDVAR(1, VAR_CONTROL_PORT) }
26582710 YY_BREAK
2659 case 111:
2660 YY_RULE_SETUP
2661 #line 235 "util/configlexer.lex"
2711 case 113:
2712 YY_RULE_SETUP
2713 #line 237 "util/configlexer.lex"
26622714 { YDVAR(1, VAR_SERVER_KEY_FILE) }
26632715 YY_BREAK
2664 case 112:
2665 YY_RULE_SETUP
2666 #line 236 "util/configlexer.lex"
2716 case 114:
2717 YY_RULE_SETUP
2718 #line 238 "util/configlexer.lex"
26672719 { YDVAR(1, VAR_SERVER_CERT_FILE) }
26682720 YY_BREAK
2669 case 113:
2670 YY_RULE_SETUP
2671 #line 237 "util/configlexer.lex"
2721 case 115:
2722 YY_RULE_SETUP
2723 #line 239 "util/configlexer.lex"
26722724 { YDVAR(1, VAR_CONTROL_KEY_FILE) }
26732725 YY_BREAK
2674 case 114:
2675 YY_RULE_SETUP
2676 #line 238 "util/configlexer.lex"
2726 case 116:
2727 YY_RULE_SETUP
2728 #line 240 "util/configlexer.lex"
26772729 { YDVAR(1, VAR_CONTROL_CERT_FILE) }
26782730 YY_BREAK
2679 case 115:
2680 YY_RULE_SETUP
2681 #line 239 "util/configlexer.lex"
2731 case 117:
2732 YY_RULE_SETUP
2733 #line 241 "util/configlexer.lex"
26822734 { YDVAR(1, VAR_PYTHON_SCRIPT) }
26832735 YY_BREAK
2684 case 116:
2685 YY_RULE_SETUP
2686 #line 240 "util/configlexer.lex"
2736 case 118:
2737 YY_RULE_SETUP
2738 #line 242 "util/configlexer.lex"
26872739 { YDVAR(0, VAR_PYTHON) }
26882740 YY_BREAK
2689 case 117:
2690 YY_RULE_SETUP
2691 #line 241 "util/configlexer.lex"
2741 case 119:
2742 YY_RULE_SETUP
2743 #line 243 "util/configlexer.lex"
26922744 { YDVAR(1, VAR_DOMAIN_INSECURE) }
26932745 YY_BREAK
2694 case 118:
2695 /* rule 118 can match eol */
2696 YY_RULE_SETUP
2697 #line 242 "util/configlexer.lex"
2746 case 120:
2747 YY_RULE_SETUP
2748 #line 244 "util/configlexer.lex"
2749 { YDVAR(1, VAR_MINIMAL_RESPONSES) }
2750 YY_BREAK
2751 case 121:
2752 YY_RULE_SETUP
2753 #line 245 "util/configlexer.lex"
2754 { YDVAR(1, VAR_RRSET_ROUNDROBIN) }
2755 YY_BREAK
2756 case 122:
2757 /* rule 122 can match eol */
2758 YY_RULE_SETUP
2759 #line 246 "util/configlexer.lex"
26982760 { LEXOUT(("NL\n")); cfg_parser->line++; }
26992761 YY_BREAK
27002762 /* Quoted strings. Strip leading and ending quotes */
2701 case 119:
2702 YY_RULE_SETUP
2703 #line 245 "util/configlexer.lex"
2763 case 123:
2764 YY_RULE_SETUP
2765 #line 249 "util/configlexer.lex"
27042766 { BEGIN(quotedstring); LEXOUT(("QS ")); }
27052767 YY_BREAK
27062768 case YY_STATE_EOF(quotedstring):
2707 #line 246 "util/configlexer.lex"
2769 #line 250 "util/configlexer.lex"
27082770 {
27092771 yyerror("EOF inside quoted string");
27102772 if(--num_args == 0) { BEGIN(INITIAL); }
27112773 else { BEGIN(val); }
27122774 }
27132775 YY_BREAK
2714 case 120:
2715 YY_RULE_SETUP
2716 #line 251 "util/configlexer.lex"
2776 case 124:
2777 YY_RULE_SETUP
2778 #line 255 "util/configlexer.lex"
27172779 { LEXOUT(("STR(%s) ", yytext)); yymore(); }
27182780 YY_BREAK
2719 case 121:
2720 /* rule 121 can match eol */
2721 YY_RULE_SETUP
2722 #line 252 "util/configlexer.lex"
2781 case 125:
2782 /* rule 125 can match eol */
2783 YY_RULE_SETUP
2784 #line 256 "util/configlexer.lex"
27232785 { yyerror("newline inside quoted string, no end \"");
27242786 cfg_parser->line++; BEGIN(INITIAL); }
27252787 YY_BREAK
2726 case 122:
2727 YY_RULE_SETUP
2728 #line 254 "util/configlexer.lex"
2788 case 126:
2789 YY_RULE_SETUP
2790 #line 258 "util/configlexer.lex"
27292791 {
27302792 LEXOUT(("QE "));
27312793 if(--num_args == 0) { BEGIN(INITIAL); }
27382800 }
27392801 YY_BREAK
27402802 /* Single Quoted strings. Strip leading and ending quotes */
2741 case 123:
2742 YY_RULE_SETUP
2743 #line 266 "util/configlexer.lex"
2803 case 127:
2804 YY_RULE_SETUP
2805 #line 270 "util/configlexer.lex"
27442806 { BEGIN(singlequotedstr); LEXOUT(("SQS ")); }
27452807 YY_BREAK
27462808 case YY_STATE_EOF(singlequotedstr):
2747 #line 267 "util/configlexer.lex"
2809 #line 271 "util/configlexer.lex"
27482810 {
27492811 yyerror("EOF inside quoted string");
27502812 if(--num_args == 0) { BEGIN(INITIAL); }
27512813 else { BEGIN(val); }
27522814 }
27532815 YY_BREAK
2754 case 124:
2755 YY_RULE_SETUP
2756 #line 272 "util/configlexer.lex"
2816 case 128:
2817 YY_RULE_SETUP
2818 #line 276 "util/configlexer.lex"
27572819 { LEXOUT(("STR(%s) ", yytext)); yymore(); }
27582820 YY_BREAK
2759 case 125:
2760 /* rule 125 can match eol */
2761 YY_RULE_SETUP
2762 #line 273 "util/configlexer.lex"
2821 case 129:
2822 /* rule 129 can match eol */
2823 YY_RULE_SETUP
2824 #line 277 "util/configlexer.lex"
27632825 { yyerror("newline inside quoted string, no end '");
27642826 cfg_parser->line++; BEGIN(INITIAL); }
27652827 YY_BREAK
2766 case 126:
2767 YY_RULE_SETUP
2768 #line 275 "util/configlexer.lex"
2828 case 130:
2829 YY_RULE_SETUP
2830 #line 279 "util/configlexer.lex"
27692831 {
27702832 LEXOUT(("SQE "));
27712833 if(--num_args == 0) { BEGIN(INITIAL); }
27782840 }
27792841 YY_BREAK
27802842 /* include: directive */
2781 case 127:
2782 YY_RULE_SETUP
2783 #line 287 "util/configlexer.lex"
2843 case 131:
2844 YY_RULE_SETUP
2845 #line 291 "util/configlexer.lex"
27842846 {
27852847 LEXOUT(("v(%s) ", yytext)); inc_prev = YYSTATE; BEGIN(include); }
27862848 YY_BREAK
27872849 case YY_STATE_EOF(include):
2788 #line 289 "util/configlexer.lex"
2850 #line 293 "util/configlexer.lex"
27892851 {
27902852 yyerror("EOF inside include directive");
27912853 BEGIN(inc_prev);
27922854 }
27932855 YY_BREAK
2794 case 128:
2795 YY_RULE_SETUP
2796 #line 293 "util/configlexer.lex"
2856 case 132:
2857 YY_RULE_SETUP
2858 #line 297 "util/configlexer.lex"
27972859 { LEXOUT(("ISP ")); /* ignore */ }
27982860 YY_BREAK
2799 case 129:
2800 /* rule 129 can match eol */
2801 YY_RULE_SETUP
2802 #line 294 "util/configlexer.lex"
2861 case 133:
2862 /* rule 133 can match eol */
2863 YY_RULE_SETUP
2864 #line 298 "util/configlexer.lex"
28032865 { LEXOUT(("NL\n")); cfg_parser->line++;}
28042866 YY_BREAK
2805 case 130:
2806 YY_RULE_SETUP
2807 #line 295 "util/configlexer.lex"
2867 case 134:
2868 YY_RULE_SETUP
2869 #line 299 "util/configlexer.lex"
28082870 { LEXOUT(("IQS ")); BEGIN(include_quoted); }
28092871 YY_BREAK
2810 case 131:
2811 YY_RULE_SETUP
2812 #line 296 "util/configlexer.lex"
2872 case 135:
2873 YY_RULE_SETUP
2874 #line 300 "util/configlexer.lex"
28132875 {
28142876 LEXOUT(("Iunquotedstr(%s) ", yytext));
28152877 config_start_include(yytext);
28172879 }
28182880 YY_BREAK
28192881 case YY_STATE_EOF(include_quoted):
2820 #line 301 "util/configlexer.lex"
2882 #line 305 "util/configlexer.lex"
28212883 {
28222884 yyerror("EOF inside quoted string");
28232885 BEGIN(inc_prev);
28242886 }
28252887 YY_BREAK
2826 case 132:
2827 YY_RULE_SETUP
2828 #line 305 "util/configlexer.lex"
2888 case 136:
2889 YY_RULE_SETUP
2890 #line 309 "util/configlexer.lex"
28292891 { LEXOUT(("ISTR(%s) ", yytext)); yymore(); }
28302892 YY_BREAK
2831 case 133:
2832 /* rule 133 can match eol */
2833 YY_RULE_SETUP
2834 #line 306 "util/configlexer.lex"
2893 case 137:
2894 /* rule 137 can match eol */
2895 YY_RULE_SETUP
2896 #line 310 "util/configlexer.lex"
28352897 { yyerror("newline before \" in include name");
28362898 cfg_parser->line++; BEGIN(inc_prev); }
28372899 YY_BREAK
2838 case 134:
2839 YY_RULE_SETUP
2840 #line 308 "util/configlexer.lex"
2900 case 138:
2901 YY_RULE_SETUP
2902 #line 312 "util/configlexer.lex"
28412903 {
28422904 LEXOUT(("IQE "));
28432905 yytext[yyleng - 1] = '\0';
28472909 YY_BREAK
28482910 case YY_STATE_EOF(INITIAL):
28492911 case YY_STATE_EOF(val):
2850 #line 314 "util/configlexer.lex"
2912 #line 318 "util/configlexer.lex"
28512913 {
28522914 yy_set_bol(1); /* Set beginning of line, so "^" rules match. */
28532915 if (config_include_stack_ptr == 0) {
28582920 }
28592921 }
28602922 YY_BREAK
2861 case 135:
2862 YY_RULE_SETUP
2863 #line 324 "util/configlexer.lex"
2923 case 139:
2924 YY_RULE_SETUP
2925 #line 328 "util/configlexer.lex"
28642926 { LEXOUT(("unquotedstr(%s) ", yytext));
28652927 if(--num_args == 0) { BEGIN(INITIAL); }
28662928 yylval.str = strdup(yytext); return STRING_ARG; }
28672929 YY_BREAK
2868 case 136:
2869 YY_RULE_SETUP
2870 #line 328 "util/configlexer.lex"
2930 case 140:
2931 YY_RULE_SETUP
2932 #line 332 "util/configlexer.lex"
28712933 {
28722934 ub_c_error_msg("unknown keyword '%s'", yytext);
28732935 }
28742936 YY_BREAK
2875 case 137:
2876 YY_RULE_SETUP
2877 #line 332 "util/configlexer.lex"
2937 case 141:
2938 YY_RULE_SETUP
2939 #line 336 "util/configlexer.lex"
28782940 {
28792941 ub_c_error_msg("stray '%s'", yytext);
28802942 }
28812943 YY_BREAK
2882 case 138:
2883 YY_RULE_SETUP
2884 #line 336 "util/configlexer.lex"
2944 case 142:
2945 YY_RULE_SETUP
2946 #line 340 "util/configlexer.lex"
28852947 ECHO;
28862948 YY_BREAK
2887 #line 2887 "<stdout>"
2949 #line 2949 "<stdout>"
28882950
28892951 case YY_END_OF_BUFFER:
28902952 {
31743236 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
31753237 {
31763238 yy_current_state = (int) yy_def[yy_current_state];
3177 if ( yy_current_state >= 1303 )
3239 if ( yy_current_state >= 1343 )
31783240 yy_c = yy_meta[(unsigned int) yy_c];
31793241 }
31803242 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
32023264 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
32033265 {
32043266 yy_current_state = (int) yy_def[yy_current_state];
3205 if ( yy_current_state >= 1303 )
3267 if ( yy_current_state >= 1343 )
32063268 yy_c = yy_meta[(unsigned int) yy_c];
32073269 }
32083270 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3209 yy_is_jam = (yy_current_state == 1302);
3271 yy_is_jam = (yy_current_state == 1342);
32103272
32113273 return yy_is_jam ? 0 : yy_current_state;
32123274 }
38433905
38443906 #define YYTABLES_NAME "yytables"
38453907
3846 #line 336 "util/configlexer.lex"
3847
3848
3849
3908 #line 340 "util/configlexer.lex"
3909
3910
3911
185185 stub-addr{COLON} { YDVAR(1, VAR_STUB_ADDR) }
186186 stub-host{COLON} { YDVAR(1, VAR_STUB_HOST) }
187187 stub-prime{COLON} { YDVAR(1, VAR_STUB_PRIME) }
188 stub-first{COLON} { YDVAR(1, VAR_STUB_FIRST) }
188189 forward-zone{COLON} { YDVAR(0, VAR_FORWARD_ZONE) }
189190 forward-addr{COLON} { YDVAR(1, VAR_FORWARD_ADDR) }
190191 forward-host{COLON} { YDVAR(1, VAR_FORWARD_HOST) }
192 forward-first{COLON} { YDVAR(1, VAR_FORWARD_FIRST) }
191193 do-not-query-address{COLON} { YDVAR(1, VAR_DO_NOT_QUERY_ADDRESS) }
192194 do-not-query-localhost{COLON} { YDVAR(1, VAR_DO_NOT_QUERY_LOCALHOST) }
193195 access-control{COLON} { YDVAR(2, VAR_ACCESS_CONTROL) }
238240 python-script{COLON} { YDVAR(1, VAR_PYTHON_SCRIPT) }
239241 python{COLON} { YDVAR(0, VAR_PYTHON) }
240242 domain-insecure{COLON} { YDVAR(1, VAR_DOMAIN_INSECURE) }
243 minimal-responses{COLON} { YDVAR(1, VAR_MINIMAL_RESPONSES) }
244 rrset-roundrobin{COLON} { YDVAR(1, VAR_RRSET_ROUNDROBIN) }
241245 <INITIAL,val>{NEWLINE} { LEXOUT(("NL\n")); cfg_parser->line++; }
242246
243247 /* Quoted strings. Strip leading and ending quotes */
243243 VAR_SSL_UPSTREAM = 377,
244244 VAR_SSL_SERVICE_KEY = 378,
245245 VAR_SSL_SERVICE_PEM = 379,
246 VAR_SSL_PORT = 380
246 VAR_SSL_PORT = 380,
247 VAR_FORWARD_FIRST = 381,
248 VAR_STUB_FIRST = 382,
249 VAR_MINIMAL_RESPONSES = 383,
250 VAR_RRSET_ROUNDROBIN = 384
247251 };
248252 #endif
249253 /* Tokens. */
370374 #define VAR_SSL_SERVICE_KEY 378
371375 #define VAR_SSL_SERVICE_PEM 379
372376 #define VAR_SSL_PORT 380
377 #define VAR_FORWARD_FIRST 381
378 #define VAR_STUB_FIRST 382
379 #define VAR_MINIMAL_RESPONSES 383
380 #define VAR_RRSET_ROUNDROBIN 384
373381
374382
375383
386394
387395
388396 /* Line 293 of yacc.c */
389 #line 391 "util/configparser.c"
397 #line 399 "util/configparser.c"
390398 } YYSTYPE;
391399 # define YYSTYPE_IS_TRIVIAL 1
392400 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
398406
399407
400408 /* Line 343 of yacc.c */
401 #line 403 "util/configparser.c"
409 #line 411 "util/configparser.c"
402410
403411 #ifdef short
404412 # undef short
617625 /* YYFINAL -- State number of the termination state. */
618626 #define YYFINAL 2
619627 /* YYLAST -- Last index in YYTABLE. */
620 #define YYLAST 229
628 #define YYLAST 237
621629
622630 /* YYNTOKENS -- Number of terminals. */
623 #define YYNTOKENS 126
631 #define YYNTOKENS 130
624632 /* YYNNTS -- Number of nonterminals. */
625 #define YYNNTS 129
633 #define YYNNTS 133
626634 /* YYNRULES -- Number of rules. */
627 #define YYNRULES 245
635 #define YYNRULES 253
628636 /* YYNRULES -- Number of states. */
629 #define YYNSTATES 359
637 #define YYNSTATES 371
630638
631639 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
632640 #define YYUNDEFTOK 2
633 #define YYMAXUTOK 380
641 #define YYMAXUTOK 384
634642
635643 #define YYTRANSLATE(YYX) \
636644 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
676684 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
677685 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
678686 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
679 125
687 125, 126, 127, 128, 129
680688 };
681689
682690 #if YYDEBUG
695703 164, 166, 168, 170, 172, 174, 176, 178, 180, 182,
696704 184, 186, 188, 190, 192, 194, 196, 198, 200, 202,
697705 204, 206, 208, 210, 212, 214, 216, 218, 220, 222,
698 225, 226, 228, 230, 232, 234, 236, 239, 240, 242,
699 244, 246, 249, 252, 255, 258, 261, 264, 267, 270,
700 273, 276, 279, 282, 285, 288, 291, 294, 297, 300,
701 303, 306, 309, 312, 315, 318, 321, 324, 327, 330,
702 333, 336, 339, 342, 345, 348, 351, 354, 357, 360,
703 363, 366, 369, 372, 375, 378, 381, 384, 387, 390,
704 393, 396, 399, 402, 405, 408, 411, 414, 417, 420,
705 423, 426, 429, 432, 435, 438, 441, 444, 447, 450,
706 453, 456, 459, 462, 465, 468, 472, 475, 478, 481,
707 484, 487, 490, 493, 496, 499, 502, 505, 508, 511,
708 514, 517, 520, 523, 526, 530, 533, 536, 539, 542,
709 545, 548, 551, 554, 557, 559, 562, 563, 565, 567,
710 569, 571, 573, 575, 577, 580, 583, 586, 589, 592,
711 595, 598, 600, 603, 604, 606
706 224, 226, 229, 230, 232, 234, 236, 238, 240, 242,
707 245, 246, 248, 250, 252, 254, 257, 260, 263, 266,
708 269, 272, 275, 278, 281, 284, 287, 290, 293, 296,
709 299, 302, 305, 308, 311, 314, 317, 320, 323, 326,
710 329, 332, 335, 338, 341, 344, 347, 350, 353, 356,
711 359, 362, 365, 368, 371, 374, 377, 380, 383, 386,
712 389, 392, 395, 398, 401, 404, 407, 410, 413, 416,
713 419, 422, 425, 428, 431, 434, 437, 440, 443, 446,
714 449, 452, 455, 458, 461, 464, 467, 470, 473, 476,
715 480, 483, 486, 489, 492, 495, 498, 501, 504, 507,
716 510, 513, 516, 519, 522, 525, 528, 531, 534, 538,
717 541, 544, 547, 550, 553, 556, 559, 562, 565, 568,
718 571, 574, 577, 579, 582, 583, 585, 587, 589, 591,
719 593, 595, 597, 600, 603, 606, 609, 612, 615, 618,
720 620, 623, 624, 626
712721 };
713722
714723 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
715724 static const yytype_int16 yyrhs[] =
716725 {
717 127, 0, -1, -1, 127, 128, -1, 129, 130, -1,
718 132, 133, -1, 135, 136, -1, 251, 252, -1, 241,
719 242, -1, 11, -1, 130, 131, -1, -1, 138, -1,
720 139, -1, 143, -1, 146, -1, 152, -1, 153, -1,
721 154, -1, 155, -1, 144, -1, 165, -1, 166, -1,
722 167, -1, 168, -1, 169, -1, 186, -1, 187, -1,
723 188, -1, 190, -1, 191, -1, 149, -1, 192, -1,
724 193, -1, 196, -1, 194, -1, 195, -1, 197, -1,
725 198, -1, 199, -1, 210, -1, 178, -1, 179, -1,
726 180, -1, 181, -1, 200, -1, 213, -1, 174, -1,
727 176, -1, 214, -1, 219, -1, 220, -1, 221, -1,
728 150, -1, 185, -1, 228, -1, 229, -1, 175, -1,
729 224, -1, 162, -1, 145, -1, 170, -1, 211, -1,
730 217, -1, 201, -1, 212, -1, 231, -1, 232, -1,
731 151, -1, 140, -1, 161, -1, 204, -1, 141, -1,
732 147, -1, 148, -1, 171, -1, 172, -1, 230, -1,
733 203, -1, 205, -1, 206, -1, 142, -1, 233, -1,
734 189, -1, 209, -1, 163, -1, 177, -1, 215, -1,
735 216, -1, 218, -1, 223, -1, 173, -1, 225, -1,
736 226, -1, 227, -1, 182, -1, 184, -1, 207, -1,
737 208, -1, 183, -1, 202, -1, 222, -1, 164, -1,
738 156, -1, 157, -1, 158, -1, 159, -1, 160, -1,
739 38, -1, 133, 134, -1, -1, 234, -1, 235, -1,
740 236, -1, 237, -1, 44, -1, 136, 137, -1, -1,
741 238, -1, 239, -1, 240, -1, 13, 10, -1, 12,
742 10, -1, 76, 10, -1, 79, 10, -1, 96, 10,
743 -1, 14, 10, -1, 16, 10, -1, 67, 10, -1,
744 15, 10, -1, 80, 10, -1, 81, 10, -1, 31,
745 10, -1, 60, 10, -1, 75, 10, -1, 17, 10,
746 -1, 18, 10, -1, 19, 10, -1, 20, 10, -1,
747 121, 10, -1, 122, 10, -1, 123, 10, -1, 124,
748 10, -1, 125, 10, -1, 77, 10, -1, 66, 10,
749 -1, 101, 10, -1, 120, 10, -1, 21, 10, -1,
750 22, 10, -1, 23, 10, -1, 24, 10, -1, 25,
751 10, -1, 68, 10, -1, 82, 10, -1, 83, 10,
752 -1, 109, 10, -1, 54, 10, -1, 64, 10, -1,
753 55, 10, -1, 102, 10, -1, 48, 10, -1, 49,
754 10, -1, 50, 10, -1, 51, 10, -1, 113, 10,
755 -1, 117, 10, -1, 114, 10, -1, 61, 10, -1,
756 26, 10, -1, 27, 10, -1, 28, 10, -1, 98,
757 10, -1, 29, 10, -1, 30, 10, -1, 32, 10,
758 -1, 33, 10, -1, 35, 10, -1, 36, 10, -1,
759 34, 10, -1, 41, 10, -1, 42, 10, -1, 43,
760 10, -1, 52, 10, -1, 71, 10, -1, 118, 10,
761 -1, 85, 10, -1, 78, 10, -1, 86, 10, -1,
762 87, 10, -1, 115, 10, -1, 116, 10, -1, 100,
763 10, -1, 47, 10, -1, 69, 10, -1, 72, 10,
764 10, -1, 53, 10, -1, 56, 10, -1, 105, 10,
765 -1, 106, 10, -1, 70, 10, -1, 107, 10, -1,
766 57, 10, -1, 58, 10, -1, 59, 10, -1, 119,
767 10, -1, 108, 10, -1, 65, 10, -1, 111, 10,
768 -1, 112, 10, -1, 110, 10, -1, 62, 10, -1,
769 63, 10, -1, 84, 10, -1, 73, 10, 10, -1,
770 74, 10, -1, 97, 10, -1, 37, 10, -1, 39,
771 10, -1, 40, 10, -1, 99, 10, -1, 37, 10,
772 -1, 45, 10, -1, 46, 10, -1, 88, -1, 242,
773 243, -1, -1, 244, -1, 246, -1, 245, -1, 247,
774 -1, 248, -1, 249, -1, 250, -1, 89, 10, -1,
726 131, 0, -1, -1, 131, 132, -1, 133, 134, -1,
727 136, 137, -1, 139, 140, -1, 259, 260, -1, 249,
728 250, -1, 11, -1, 134, 135, -1, -1, 142, -1,
729 143, -1, 147, -1, 150, -1, 156, -1, 157, -1,
730 158, -1, 159, -1, 148, -1, 169, -1, 170, -1,
731 171, -1, 172, -1, 173, -1, 190, -1, 191, -1,
732 192, -1, 194, -1, 195, -1, 153, -1, 196, -1,
733 197, -1, 200, -1, 198, -1, 199, -1, 201, -1,
734 202, -1, 203, -1, 214, -1, 182, -1, 183, -1,
735 184, -1, 185, -1, 204, -1, 217, -1, 178, -1,
736 180, -1, 218, -1, 223, -1, 224, -1, 225, -1,
737 154, -1, 189, -1, 232, -1, 233, -1, 179, -1,
738 228, -1, 166, -1, 149, -1, 174, -1, 215, -1,
739 221, -1, 205, -1, 216, -1, 235, -1, 236, -1,
740 155, -1, 144, -1, 165, -1, 208, -1, 145, -1,
741 151, -1, 152, -1, 175, -1, 176, -1, 234, -1,
742 207, -1, 209, -1, 210, -1, 146, -1, 237, -1,
743 193, -1, 213, -1, 167, -1, 181, -1, 219, -1,
744 220, -1, 222, -1, 227, -1, 177, -1, 229, -1,
745 230, -1, 231, -1, 186, -1, 188, -1, 211, -1,
746 212, -1, 187, -1, 206, -1, 226, -1, 168, -1,
747 160, -1, 161, -1, 162, -1, 163, -1, 164, -1,
748 238, -1, 239, -1, 38, -1, 137, 138, -1, -1,
749 240, -1, 241, -1, 242, -1, 244, -1, 243, -1,
750 44, -1, 140, 141, -1, -1, 245, -1, 246, -1,
751 247, -1, 248, -1, 13, 10, -1, 12, 10, -1,
752 76, 10, -1, 79, 10, -1, 96, 10, -1, 14,
753 10, -1, 16, 10, -1, 67, 10, -1, 15, 10,
754 -1, 80, 10, -1, 81, 10, -1, 31, 10, -1,
755 60, 10, -1, 75, 10, -1, 17, 10, -1, 18,
756 10, -1, 19, 10, -1, 20, 10, -1, 121, 10,
757 -1, 122, 10, -1, 123, 10, -1, 124, 10, -1,
758 125, 10, -1, 77, 10, -1, 66, 10, -1, 101,
759 10, -1, 120, 10, -1, 21, 10, -1, 22, 10,
760 -1, 23, 10, -1, 24, 10, -1, 25, 10, -1,
761 68, 10, -1, 82, 10, -1, 83, 10, -1, 109,
762 10, -1, 54, 10, -1, 64, 10, -1, 55, 10,
763 -1, 102, 10, -1, 48, 10, -1, 49, 10, -1,
764 50, 10, -1, 51, 10, -1, 113, 10, -1, 117,
765 10, -1, 114, 10, -1, 61, 10, -1, 26, 10,
766 -1, 27, 10, -1, 28, 10, -1, 98, 10, -1,
767 29, 10, -1, 30, 10, -1, 32, 10, -1, 33,
768 10, -1, 35, 10, -1, 36, 10, -1, 34, 10,
769 -1, 41, 10, -1, 42, 10, -1, 43, 10, -1,
770 52, 10, -1, 71, 10, -1, 118, 10, -1, 85,
771 10, -1, 78, 10, -1, 86, 10, -1, 87, 10,
772 -1, 115, 10, -1, 116, 10, -1, 100, 10, -1,
773 47, 10, -1, 69, 10, -1, 72, 10, 10, -1,
774 53, 10, -1, 56, 10, -1, 105, 10, -1, 106,
775 10, -1, 70, 10, -1, 107, 10, -1, 57, 10,
776 -1, 58, 10, -1, 59, 10, -1, 119, 10, -1,
777 108, 10, -1, 65, 10, -1, 111, 10, -1, 112,
778 10, -1, 110, 10, -1, 62, 10, -1, 63, 10,
779 -1, 84, 10, -1, 73, 10, 10, -1, 74, 10,
780 -1, 97, 10, -1, 128, 10, -1, 129, 10, -1,
781 37, 10, -1, 39, 10, -1, 40, 10, -1, 127,
782 10, -1, 99, 10, -1, 37, 10, -1, 45, 10,
783 -1, 46, 10, -1, 126, 10, -1, 88, -1, 250,
784 251, -1, -1, 252, -1, 254, -1, 253, -1, 255,
785 -1, 256, -1, 257, -1, 258, -1, 89, 10, -1,
775786 91, 10, -1, 90, 10, -1, 92, 10, -1, 93,
776787 10, -1, 94, 10, -1, 95, 10, -1, 103, -1,
777 252, 253, -1, -1, 254, -1, 104, 10, -1
788 260, 261, -1, -1, 262, -1, 104, 10, -1
778789 };
779790
780791 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
781792 static const yytype_uint16 yyrline[] =
782793 {
783 0, 109, 109, 109, 110, 110, 111, 111, 112, 116,
784 121, 122, 123, 123, 123, 124, 124, 125, 125, 125,
785 126, 126, 126, 127, 127, 127, 128, 128, 129, 129,
786 130, 130, 131, 131, 132, 132, 133, 133, 134, 134,
787 135, 135, 136, 136, 136, 137, 137, 137, 138, 138,
788 138, 139, 139, 140, 140, 141, 141, 142, 142, 143,
789 143, 143, 144, 144, 145, 145, 146, 146, 146, 147,
790 147, 148, 148, 149, 149, 150, 150, 150, 151, 151,
791 152, 152, 153, 153, 154, 154, 155, 155, 156, 156,
792 156, 157, 157, 158, 158, 158, 159, 159, 159, 160,
793 160, 160, 161, 161, 161, 162, 162, 162, 164, 176,
794 177, 178, 178, 178, 178, 180, 192, 193, 194, 194,
795 194, 196, 205, 214, 225, 234, 243, 252, 265, 280,
796 289, 298, 307, 316, 325, 334, 343, 352, 361, 370,
797 379, 388, 395, 402, 411, 420, 434, 443, 452, 459,
798 466, 473, 481, 488, 495, 502, 509, 517, 525, 533,
799 540, 547, 556, 565, 572, 579, 587, 595, 608, 619,
800 627, 640, 649, 658, 666, 679, 688, 696, 705, 713,
801 726, 733, 743, 753, 763, 773, 783, 793, 803, 810,
802 817, 826, 835, 844, 851, 861, 875, 882, 900, 913,
803 926, 935, 944, 953, 963, 973, 982, 991, 998, 1007,
804 1016, 1025, 1033, 1046, 1054, 1076, 1083, 1098, 1108, 1115,
805 1122, 1132, 1142, 1149, 1156, 1161, 1162, 1163, 1163, 1163,
806 1164, 1164, 1164, 1165, 1167, 1177, 1186, 1193, 1200, 1207,
807 1214, 1221, 1226, 1227, 1228, 1230
794 0, 110, 110, 110, 111, 111, 112, 112, 113, 117,
795 122, 123, 124, 124, 124, 125, 125, 126, 126, 126,
796 127, 127, 127, 128, 128, 128, 129, 129, 130, 130,
797 131, 131, 132, 132, 133, 133, 134, 134, 135, 135,
798 136, 136, 137, 137, 137, 138, 138, 138, 139, 139,
799 139, 140, 140, 141, 141, 142, 142, 143, 143, 144,
800 144, 144, 145, 145, 146, 146, 147, 147, 147, 148,
801 148, 149, 149, 150, 150, 151, 151, 151, 152, 152,
802 153, 153, 154, 154, 155, 155, 156, 156, 157, 157,
803 157, 158, 158, 159, 159, 159, 160, 160, 160, 161,
804 161, 161, 162, 162, 162, 163, 163, 163, 164, 164,
805 166, 178, 179, 180, 180, 180, 180, 180, 182, 194,
806 195, 196, 196, 196, 196, 198, 207, 216, 227, 236,
807 245, 254, 267, 282, 291, 300, 309, 318, 327, 336,
808 345, 354, 363, 372, 381, 390, 397, 404, 413, 422,
809 436, 445, 454, 461, 468, 475, 483, 490, 497, 504,
810 511, 519, 527, 535, 542, 549, 558, 567, 574, 581,
811 589, 597, 610, 621, 629, 642, 651, 660, 668, 681,
812 690, 698, 707, 715, 728, 735, 745, 755, 765, 775,
813 785, 795, 805, 812, 819, 828, 837, 846, 853, 863,
814 877, 884, 902, 915, 928, 937, 946, 955, 965, 975,
815 984, 993, 1000, 1009, 1018, 1027, 1035, 1048, 1056, 1078,
816 1085, 1100, 1110, 1120, 1130, 1137, 1144, 1153, 1163, 1173,
817 1180, 1187, 1196, 1201, 1202, 1203, 1203, 1203, 1204, 1204,
818 1204, 1205, 1207, 1217, 1226, 1233, 1240, 1247, 1254, 1261,
819 1266, 1267, 1268, 1270
808820 };
809821 #endif
810822
852864 "VAR_EDNS_BUFFER_SIZE", "VAR_PREFETCH", "VAR_PREFETCH_KEY",
853865 "VAR_SO_SNDBUF", "VAR_HARDEN_BELOW_NXDOMAIN", "VAR_IGNORE_CD_FLAG",
854866 "VAR_LOG_QUERIES", "VAR_TCP_UPSTREAM", "VAR_SSL_UPSTREAM",
855 "VAR_SSL_SERVICE_KEY", "VAR_SSL_SERVICE_PEM", "VAR_SSL_PORT", "$accept",
856 "toplevelvars", "toplevelvar", "serverstart", "contents_server",
857 "content_server", "stubstart", "contents_stub", "content_stub",
858 "forwardstart", "contents_forward", "content_forward",
859 "server_num_threads", "server_verbosity", "server_statistics_interval",
860 "server_statistics_cumulative", "server_extended_statistics",
861 "server_port", "server_interface", "server_outgoing_interface",
862 "server_outgoing_range", "server_outgoing_port_permit",
863 "server_outgoing_port_avoid", "server_outgoing_num_tcp",
864 "server_incoming_num_tcp", "server_interface_automatic", "server_do_ip4",
865 "server_do_ip6", "server_do_udp", "server_do_tcp", "server_tcp_upstream",
867 "VAR_SSL_SERVICE_KEY", "VAR_SSL_SERVICE_PEM", "VAR_SSL_PORT",
868 "VAR_FORWARD_FIRST", "VAR_STUB_FIRST", "VAR_MINIMAL_RESPONSES",
869 "VAR_RRSET_ROUNDROBIN", "$accept", "toplevelvars", "toplevelvar",
870 "serverstart", "contents_server", "content_server", "stubstart",
871 "contents_stub", "content_stub", "forwardstart", "contents_forward",
872 "content_forward", "server_num_threads", "server_verbosity",
873 "server_statistics_interval", "server_statistics_cumulative",
874 "server_extended_statistics", "server_port", "server_interface",
875 "server_outgoing_interface", "server_outgoing_range",
876 "server_outgoing_port_permit", "server_outgoing_port_avoid",
877 "server_outgoing_num_tcp", "server_incoming_num_tcp",
878 "server_interface_automatic", "server_do_ip4", "server_do_ip6",
879 "server_do_udp", "server_do_tcp", "server_tcp_upstream",
866880 "server_ssl_upstream", "server_ssl_service_key",
867881 "server_ssl_service_pem", "server_ssl_port", "server_do_daemonize",
868882 "server_use_syslog", "server_log_time_ascii", "server_log_queries",
895909 "server_val_nsec3_keysize_iterations", "server_add_holddown",
896910 "server_del_holddown", "server_keep_missing", "server_key_cache_size",
897911 "server_key_cache_slabs", "server_neg_cache_size", "server_local_zone",
898 "server_local_data", "server_local_data_ptr", "stub_name", "stub_host",
899 "stub_addr", "stub_prime", "forward_name", "forward_host",
900 "forward_addr", "rcstart", "contents_rc", "content_rc",
912 "server_local_data", "server_local_data_ptr", "server_minimal_responses",
913 "server_rrset_roundrobin", "stub_name", "stub_host", "stub_addr",
914 "stub_first", "stub_prime", "forward_name", "forward_host",
915 "forward_addr", "forward_first", "rcstart", "contents_rc", "content_rc",
901916 "rc_control_enable", "rc_control_port", "rc_control_interface",
902917 "rc_server_key_file", "rc_server_cert_file", "rc_control_key_file",
903918 "rc_control_cert_file", "pythonstart", "contents_py", "content_py",
922937 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
923938 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
924939 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
925 375, 376, 377, 378, 379, 380
940 375, 376, 377, 378, 379, 380, 381, 382, 383, 384
926941 };
927942 # endif
928943
929944 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
930 static const yytype_uint8 yyr1[] =
945 static const yytype_uint16 yyr1[] =
931946 {
932 0, 126, 127, 127, 128, 128, 128, 128, 128, 129,
933 130, 130, 131, 131, 131, 131, 131, 131, 131, 131,
934 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
935 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
936 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
937 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
938 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
939 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
940 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
941 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
942 131, 131, 131, 131, 131, 131, 131, 131, 132, 133,
943 133, 134, 134, 134, 134, 135, 136, 136, 137, 137,
944 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
947 0, 130, 131, 131, 132, 132, 132, 132, 132, 133,
948 134, 134, 135, 135, 135, 135, 135, 135, 135, 135,
949 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
950 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
951 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
952 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
953 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
954 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
955 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
956 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
957 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
958 136, 137, 137, 138, 138, 138, 138, 138, 139, 140,
959 140, 141, 141, 141, 141, 142, 143, 144, 145, 146,
945960 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
946961 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
947962 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
951966 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
952967 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
953968 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
954 237, 238, 239, 240, 241, 242, 242, 243, 243, 243,
955 243, 243, 243, 243, 244, 245, 246, 247, 248, 249,
956 250, 251, 252, 252, 253, 254
969 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
970 247, 248, 249, 250, 250, 251, 251, 251, 251, 251,
971 251, 251, 252, 253, 254, 255, 256, 257, 258, 259,
972 260, 260, 261, 262
957973 };
958974
959975 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
969985 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
970986 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
971987 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
972 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
973 0, 1, 1, 1, 1, 1, 2, 0, 1, 1,
974 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
988 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
989 1, 2, 0, 1, 1, 1, 1, 1, 1, 2,
990 0, 1, 1, 1, 1, 2, 2, 2, 2, 2,
975991 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
976992 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
977993 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
978994 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
979995 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
980996 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
981 2, 2, 2, 2, 2, 3, 2, 2, 2, 2,
997 2, 2, 2, 2, 2, 2, 2, 2, 2, 3,
982998 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
983 2, 2, 2, 2, 3, 2, 2, 2, 2, 2,
984 2, 2, 2, 2, 1, 2, 0, 1, 1, 1,
985 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
986 2, 1, 2, 0, 1, 2
999 2, 2, 2, 2, 2, 2, 2, 2, 3, 2,
1000 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1001 2, 2, 1, 2, 0, 1, 1, 1, 1, 1,
1002 1, 1, 2, 2, 2, 2, 2, 2, 2, 1,
1003 2, 0, 1, 2
9871004 };
9881005
9891006 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
9911008 means the default is an error. */
9921009 static const yytype_uint8 yydefact[] =
9931010 {
994 2, 0, 1, 9, 108, 115, 224, 241, 3, 11,
995 110, 117, 226, 243, 4, 5, 6, 8, 7, 0,
1011 2, 0, 1, 9, 110, 118, 232, 249, 3, 11,
1012 112, 120, 234, 251, 4, 5, 6, 8, 7, 0,
9961013 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
9971014 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
9981015 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
10021019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
10031020 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
10041021 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1005 0, 0, 0, 0, 0, 10, 12, 13, 69, 72,
1006 81, 14, 20, 60, 15, 73, 74, 31, 53, 68,
1007 16, 17, 18, 19, 103, 104, 105, 106, 107, 70,
1008 59, 85, 102, 21, 22, 23, 24, 25, 61, 75,
1009 76, 91, 47, 57, 48, 86, 41, 42, 43, 44,
1010 95, 99, 96, 54, 26, 27, 28, 83, 29, 30,
1011 32, 33, 35, 36, 34, 37, 38, 39, 45, 64,
1012 100, 78, 71, 79, 80, 97, 98, 84, 40, 62,
1013 65, 46, 49, 87, 88, 63, 89, 50, 51, 52,
1014 101, 90, 58, 92, 93, 94, 55, 56, 77, 66,
1015 67, 82, 0, 0, 0, 0, 109, 111, 112, 113,
1016 114, 0, 0, 0, 116, 118, 119, 120, 0, 0,
1017 0, 0, 0, 0, 0, 225, 227, 229, 228, 230,
1018 231, 232, 233, 0, 242, 244, 122, 121, 126, 129,
1019 127, 135, 136, 137, 138, 148, 149, 150, 151, 152,
1020 169, 170, 171, 173, 174, 132, 175, 176, 179, 177,
1021 178, 180, 181, 182, 193, 161, 162, 163, 164, 183,
1022 196, 157, 159, 197, 202, 203, 204, 133, 168, 211,
1023 212, 158, 207, 145, 128, 153, 194, 200, 184, 0,
1024 0, 215, 134, 123, 144, 187, 124, 130, 131, 154,
1025 155, 213, 186, 188, 189, 125, 216, 172, 192, 146,
1026 160, 198, 199, 201, 206, 156, 210, 208, 209, 165,
1027 167, 190, 191, 166, 185, 205, 147, 139, 140, 141,
1028 142, 143, 217, 218, 219, 220, 221, 222, 223, 234,
1029 236, 235, 237, 238, 239, 240, 245, 195, 214
1022 0, 0, 0, 0, 0, 0, 0, 10, 12, 13,
1023 69, 72, 81, 14, 20, 60, 15, 73, 74, 31,
1024 53, 68, 16, 17, 18, 19, 103, 104, 105, 106,
1025 107, 70, 59, 85, 102, 21, 22, 23, 24, 25,
1026 61, 75, 76, 91, 47, 57, 48, 86, 41, 42,
1027 43, 44, 95, 99, 96, 54, 26, 27, 28, 83,
1028 29, 30, 32, 33, 35, 36, 34, 37, 38, 39,
1029 45, 64, 100, 78, 71, 79, 80, 97, 98, 84,
1030 40, 62, 65, 46, 49, 87, 88, 63, 89, 50,
1031 51, 52, 101, 90, 58, 92, 93, 94, 55, 56,
1032 77, 66, 67, 82, 108, 109, 0, 0, 0, 0,
1033 0, 111, 113, 114, 115, 117, 116, 0, 0, 0,
1034 0, 119, 121, 122, 123, 124, 0, 0, 0, 0,
1035 0, 0, 0, 233, 235, 237, 236, 238, 239, 240,
1036 241, 0, 250, 252, 126, 125, 130, 133, 131, 139,
1037 140, 141, 142, 152, 153, 154, 155, 156, 173, 174,
1038 175, 177, 178, 136, 179, 180, 183, 181, 182, 184,
1039 185, 186, 197, 165, 166, 167, 168, 187, 200, 161,
1040 163, 201, 206, 207, 208, 137, 172, 215, 216, 162,
1041 211, 149, 132, 157, 198, 204, 188, 0, 0, 219,
1042 138, 127, 148, 191, 128, 134, 135, 158, 159, 217,
1043 190, 192, 193, 129, 220, 176, 196, 150, 164, 202,
1044 203, 205, 210, 160, 214, 212, 213, 169, 171, 194,
1045 195, 170, 189, 209, 151, 143, 144, 145, 146, 147,
1046 221, 222, 223, 224, 225, 227, 226, 228, 229, 230,
1047 231, 242, 244, 243, 245, 246, 247, 248, 253, 199,
1048 218
10301049 };
10311050
10321051 /* YYDEFGOTO[NTERM-NUM]. */
10331052 static const yytype_int16 yydefgoto[] =
10341053 {
1035 -1, 1, 8, 9, 14, 115, 10, 15, 216, 11,
1036 16, 224, 116, 117, 118, 119, 120, 121, 122, 123,
1037 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
1038 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1039 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
1040 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
1041 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
1042 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
1043 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
1044 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
1045 204, 205, 206, 207, 208, 209, 210, 211, 217, 218,
1046 219, 220, 225, 226, 227, 12, 17, 235, 236, 237,
1047 238, 239, 240, 241, 242, 13, 18, 244, 245
1054 -1, 1, 8, 9, 14, 117, 10, 15, 221, 11,
1055 16, 231, 118, 119, 120, 121, 122, 123, 124, 125,
1056 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
1057 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
1058 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
1059 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
1060 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
1061 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
1062 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
1063 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
1064 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
1065 222, 223, 224, 225, 226, 232, 233, 234, 235, 12,
1066 17, 243, 244, 245, 246, 247, 248, 249, 250, 13,
1067 18, 252, 253
10481068 };
10491069
10501070 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
10541074 {
10551075 -80, 76, -80, -80, -80, -80, -80, -80, -80, -80,
10561076 -80, -80, -80, -80, -12, 40, 46, 32, -79, 16,
1057 17, 18, 22, 23, 24, 68, 71, 72, 105, 106,
1058 107, 108, 109, 118, 119, 120, 121, 122, 123, 124,
1059 125, 126, 127, 128, 130, 131, 132, 133, 134, 135,
1060 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
1061 146, 147, 148, 149, 150, 151, 152, 153, 155, 156,
1062 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
1063 167, 168, 170, 171, 172, 173, 174, 175, 176, 177,
1064 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
1065 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
1066 198, 199, 200, 201, 202, -80, -80, -80, -80, -80,
1077 17, 18, 22, 23, 24, 68, 71, 72, 105, 108,
1078 109, 118, 119, 120, 121, 122, 123, 124, 125, 126,
1079 127, 128, 130, 131, 132, 133, 134, 135, 136, 137,
1080 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1081 148, 149, 150, 151, 152, 153, 155, 156, 158, 159,
1082 160, 161, 163, 164, 165, 166, 167, 168, 170, 171,
1083 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
1084 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
1085 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
1086 202, 203, 204, 205, 206, 207, 208, -80, -80, -80,
10671087 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
10681088 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
10691089 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
10731093 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
10741094 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
10751095 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
1076 -80, -80, 203, 204, 205, 206, -80, -80, -80, -80,
1077 -80, 207, 208, 209, -80, -80, -80, -80, 210, 211,
1078 212, 213, 214, 215, 216, -80, -80, -80, -80, -80,
1079 -80, -80, -80, 217, -80, -80, -80, -80, -80, -80,
1096 -80, -80, -80, -80, -80, -80, 209, 210, 211, 212,
1097 213, -80, -80, -80, -80, -80, -80, 214, 215, 216,
1098 217, -80, -80, -80, -80, -80, 218, 219, 220, 221,
1099 222, 223, 224, -80, -80, -80, -80, -80, -80, -80,
1100 -80, 225, -80, -80, -80, -80, -80, -80, -80, -80,
10801101 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
10811102 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
10821103 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
10831104 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
1084 -80, -80, -80, -80, -80, -80, -80, -80, -80, 218,
1085 219, -80, -80, -80, -80, -80, -80, -80, -80, -80,
1105 -80, -80, -80, -80, -80, -80, -80, 226, 227, -80,
10861106 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
10871107 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
10881108 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
10891109 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
1090 -80, -80, -80, -80, -80, -80, -80, -80, -80
1110 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
1111 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
1112 -80
10911113 };
10921114
10931115 /* YYPGOTO[NTERM-NUM]. */
11051127 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
11061128 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
11071129 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
1108 -80, -80, -80, -80, -80, -80, -80, -80, -80
1130 -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
1131 -80, -80, -80
11091132 };
11101133
11111134 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
11161139 {
11171140 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
11181141 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1119 39, 40, 41, 42, 43, 243, 246, 247, 248, 44,
1120 45, 46, 249, 250, 251, 47, 48, 49, 50, 51,
1142 39, 40, 41, 42, 43, 251, 254, 255, 256, 44,
1143 45, 46, 257, 258, 259, 47, 48, 49, 50, 51,
11211144 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
11221145 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
11231146 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1124 82, 83, 84, 85, 86, 87, 2, 212, 252, 213,
1125 214, 253, 254, 221, 88, 89, 90, 3, 91, 92,
1126 93, 222, 223, 94, 95, 96, 97, 98, 99, 100,
1147 82, 83, 84, 85, 86, 87, 2, 216, 260, 217,
1148 218, 261, 262, 227, 88, 89, 90, 3, 91, 92,
1149 93, 228, 229, 94, 95, 96, 97, 98, 99, 100,
11271150 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1128 111, 112, 113, 114, 4, 255, 256, 257, 258, 259,
1129 5, 228, 229, 230, 231, 232, 233, 234, 260, 261,
1130 262, 263, 264, 265, 266, 267, 268, 269, 270, 215,
1131 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
1132 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
1133 291, 292, 293, 294, 6, 295, 296, 297, 298, 299,
1134 300, 301, 302, 303, 304, 305, 306, 307, 308, 7,
1135 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
1136 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
1137 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
1138 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
1139 349, 350, 351, 352, 353, 354, 355, 356, 357, 358
1151 111, 112, 113, 114, 4, 263, 115, 116, 264, 265,
1152 5, 236, 237, 238, 239, 240, 241, 242, 266, 267,
1153 268, 269, 270, 271, 272, 273, 274, 275, 276, 219,
1154 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
1155 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
1156 297, 298, 299, 300, 6, 301, 302, 220, 303, 304,
1157 305, 306, 230, 307, 308, 309, 310, 311, 312, 7,
1158 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
1159 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
1160 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
1161 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
1162 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
1163 363, 364, 365, 366, 367, 368, 369, 370
11401164 };
11411165
11421166 #define yypact_value_is_default(yystate) \
11581182 40, 10, 10, 37, 96, 97, 98, 11, 100, 101,
11591183 102, 45, 46, 105, 106, 107, 108, 109, 110, 111,
11601184 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
1161 122, 123, 124, 125, 38, 10, 10, 10, 10, 10,
1185 122, 123, 124, 125, 38, 10, 128, 129, 10, 10,
11621186 44, 89, 90, 91, 92, 93, 94, 95, 10, 10,
11631187 10, 10, 10, 10, 10, 10, 10, 10, 10, 99,
11641188 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
11651189 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1166 10, 10, 10, 10, 88, 10, 10, 10, 10, 10,
1167 10, 10, 10, 10, 10, 10, 10, 10, 10, 103,
1190 10, 10, 10, 10, 88, 10, 10, 127, 10, 10,
1191 10, 10, 126, 10, 10, 10, 10, 10, 10, 103,
11681192 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
11691193 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
11701194 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
11711195 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1172 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
1196 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1197 10, 10, 10, 10, 10, 10, 10, 10
11731198 };
11741199
11751200 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
11761201 symbol of state STATE-NUM. */
1177 static const yytype_uint8 yystos[] =
1202 static const yytype_uint16 yystos[] =
11781203 {
1179 0, 127, 0, 11, 38, 44, 88, 103, 128, 129,
1180 132, 135, 241, 251, 130, 133, 136, 242, 252, 12,
1204 0, 131, 0, 11, 38, 44, 88, 103, 132, 133,
1205 136, 139, 249, 259, 134, 137, 140, 250, 260, 12,
11811206 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
11821207 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
11831208 33, 34, 35, 36, 41, 42, 43, 47, 48, 49,
11871212 80, 81, 82, 83, 84, 85, 86, 87, 96, 97,
11881213 98, 100, 101, 102, 105, 106, 107, 108, 109, 110,
11891214 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1190 121, 122, 123, 124, 125, 131, 138, 139, 140, 141,
1191 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
1192 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1193 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
1194 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
1195 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
1196 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
1197 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
1198 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
1199 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
1200 232, 233, 37, 39, 40, 99, 134, 234, 235, 236,
1201 237, 37, 45, 46, 137, 238, 239, 240, 89, 90,
1202 91, 92, 93, 94, 95, 243, 244, 245, 246, 247,
1203 248, 249, 250, 104, 253, 254, 10, 10, 10, 10,
1215 121, 122, 123, 124, 125, 128, 129, 135, 142, 143,
1216 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
1217 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
1218 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
1219 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
1220 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
1221 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
1222 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
1223 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1224 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
1225 234, 235, 236, 237, 238, 239, 37, 39, 40, 99,
1226 127, 138, 240, 241, 242, 243, 244, 37, 45, 46,
1227 126, 141, 245, 246, 247, 248, 89, 90, 91, 92,
1228 93, 94, 95, 251, 252, 253, 254, 255, 256, 257,
1229 258, 104, 261, 262, 10, 10, 10, 10, 10, 10,
12041230 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
12051231 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
12061232 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
12111237 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
12121238 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
12131239 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1214 10, 10, 10, 10, 10, 10, 10, 10, 10
1240 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1241 10
12151242 };
12161243
12171244 #define yyerrok (yyerrstatus = 0)
20482075 case 9:
20492076
20502077 /* Line 1806 of yacc.c */
2051 #line 117 "util/configparser.y"
2078 #line 118 "util/configparser.y"
20522079 {
20532080 OUTYY(("\nP(server:)\n"));
20542081 }
20552082 break;
20562083
2057 case 108:
2058
2059 /* Line 1806 of yacc.c */
2060 #line 165 "util/configparser.y"
2084 case 110:
2085
2086 /* Line 1806 of yacc.c */
2087 #line 167 "util/configparser.y"
20612088 {
20622089 struct config_stub* s;
20632090 OUTYY(("\nP(stub_zone:)\n"));
20702097 }
20712098 break;
20722099
2073 case 115:
2074
2075 /* Line 1806 of yacc.c */
2076 #line 181 "util/configparser.y"
2100 case 118:
2101
2102 /* Line 1806 of yacc.c */
2103 #line 183 "util/configparser.y"
20772104 {
20782105 struct config_stub* s;
20792106 OUTYY(("\nP(forward_zone:)\n"));
20862113 }
20872114 break;
20882115
2089 case 121:
2090
2091 /* Line 1806 of yacc.c */
2092 #line 197 "util/configparser.y"
2116 case 125:
2117
2118 /* Line 1806 of yacc.c */
2119 #line 199 "util/configparser.y"
20932120 {
20942121 OUTYY(("P(server_num_threads:%s)\n", (yyvsp[(2) - (2)].str)));
20952122 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
20992126 }
21002127 break;
21012128
2102 case 122:
2103
2104 /* Line 1806 of yacc.c */
2105 #line 206 "util/configparser.y"
2129 case 126:
2130
2131 /* Line 1806 of yacc.c */
2132 #line 208 "util/configparser.y"
21062133 {
21072134 OUTYY(("P(server_verbosity:%s)\n", (yyvsp[(2) - (2)].str)));
21082135 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
21122139 }
21132140 break;
21142141
2115 case 123:
2116
2117 /* Line 1806 of yacc.c */
2118 #line 215 "util/configparser.y"
2142 case 127:
2143
2144 /* Line 1806 of yacc.c */
2145 #line 217 "util/configparser.y"
21192146 {
21202147 OUTYY(("P(server_statistics_interval:%s)\n", (yyvsp[(2) - (2)].str)));
21212148 if(strcmp((yyvsp[(2) - (2)].str), "") == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0)
21272154 }
21282155 break;
21292156
2130 case 124:
2131
2132 /* Line 1806 of yacc.c */
2133 #line 226 "util/configparser.y"
2157 case 128:
2158
2159 /* Line 1806 of yacc.c */
2160 #line 228 "util/configparser.y"
21342161 {
21352162 OUTYY(("P(server_statistics_cumulative:%s)\n", (yyvsp[(2) - (2)].str)));
21362163 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
21402167 }
21412168 break;
21422169
2143 case 125:
2144
2145 /* Line 1806 of yacc.c */
2146 #line 235 "util/configparser.y"
2170 case 129:
2171
2172 /* Line 1806 of yacc.c */
2173 #line 237 "util/configparser.y"
21472174 {
21482175 OUTYY(("P(server_extended_statistics:%s)\n", (yyvsp[(2) - (2)].str)));
21492176 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
21532180 }
21542181 break;
21552182
2156 case 126:
2157
2158 /* Line 1806 of yacc.c */
2159 #line 244 "util/configparser.y"
2183 case 130:
2184
2185 /* Line 1806 of yacc.c */
2186 #line 246 "util/configparser.y"
21602187 {
21612188 OUTYY(("P(server_port:%s)\n", (yyvsp[(2) - (2)].str)));
21622189 if(atoi((yyvsp[(2) - (2)].str)) == 0)
21662193 }
21672194 break;
21682195
2169 case 127:
2170
2171 /* Line 1806 of yacc.c */
2172 #line 253 "util/configparser.y"
2196 case 131:
2197
2198 /* Line 1806 of yacc.c */
2199 #line 255 "util/configparser.y"
21732200 {
21742201 OUTYY(("P(server_interface:%s)\n", (yyvsp[(2) - (2)].str)));
21752202 if(cfg_parser->cfg->num_ifs == 0)
21832210 }
21842211 break;
21852212
2186 case 128:
2187
2188 /* Line 1806 of yacc.c */
2189 #line 266 "util/configparser.y"
2213 case 132:
2214
2215 /* Line 1806 of yacc.c */
2216 #line 268 "util/configparser.y"
21902217 {
21912218 OUTYY(("P(server_outgoing_interface:%s)\n", (yyvsp[(2) - (2)].str)));
21922219 if(cfg_parser->cfg->num_out_ifs == 0)
22022229 }
22032230 break;
22042231
2205 case 129:
2206
2207 /* Line 1806 of yacc.c */
2208 #line 281 "util/configparser.y"
2232 case 133:
2233
2234 /* Line 1806 of yacc.c */
2235 #line 283 "util/configparser.y"
22092236 {
22102237 OUTYY(("P(server_outgoing_range:%s)\n", (yyvsp[(2) - (2)].str)));
22112238 if(atoi((yyvsp[(2) - (2)].str)) == 0)
22152242 }
22162243 break;
22172244
2218 case 130:
2219
2220 /* Line 1806 of yacc.c */
2221 #line 290 "util/configparser.y"
2245 case 134:
2246
2247 /* Line 1806 of yacc.c */
2248 #line 292 "util/configparser.y"
22222249 {
22232250 OUTYY(("P(server_outgoing_port_permit:%s)\n", (yyvsp[(2) - (2)].str)));
22242251 if(!cfg_mark_ports((yyvsp[(2) - (2)].str), 1,
22282255 }
22292256 break;
22302257
2231 case 131:
2232
2233 /* Line 1806 of yacc.c */
2234 #line 299 "util/configparser.y"
2258 case 135:
2259
2260 /* Line 1806 of yacc.c */
2261 #line 301 "util/configparser.y"
22352262 {
22362263 OUTYY(("P(server_outgoing_port_avoid:%s)\n", (yyvsp[(2) - (2)].str)));
22372264 if(!cfg_mark_ports((yyvsp[(2) - (2)].str), 0,
22412268 }
22422269 break;
22432270
2244 case 132:
2245
2246 /* Line 1806 of yacc.c */
2247 #line 308 "util/configparser.y"
2271 case 136:
2272
2273 /* Line 1806 of yacc.c */
2274 #line 310 "util/configparser.y"
22482275 {
22492276 OUTYY(("P(server_outgoing_num_tcp:%s)\n", (yyvsp[(2) - (2)].str)));
22502277 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
22542281 }
22552282 break;
22562283
2257 case 133:
2258
2259 /* Line 1806 of yacc.c */
2260 #line 317 "util/configparser.y"
2284 case 137:
2285
2286 /* Line 1806 of yacc.c */
2287 #line 319 "util/configparser.y"
22612288 {
22622289 OUTYY(("P(server_incoming_num_tcp:%s)\n", (yyvsp[(2) - (2)].str)));
22632290 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
22672294 }
22682295 break;
22692296
2270 case 134:
2271
2272 /* Line 1806 of yacc.c */
2273 #line 326 "util/configparser.y"
2297 case 138:
2298
2299 /* Line 1806 of yacc.c */
2300 #line 328 "util/configparser.y"
22742301 {
22752302 OUTYY(("P(server_interface_automatic:%s)\n", (yyvsp[(2) - (2)].str)));
22762303 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
22802307 }
22812308 break;
22822309
2283 case 135:
2284
2285 /* Line 1806 of yacc.c */
2286 #line 335 "util/configparser.y"
2310 case 139:
2311
2312 /* Line 1806 of yacc.c */
2313 #line 337 "util/configparser.y"
22872314 {
22882315 OUTYY(("P(server_do_ip4:%s)\n", (yyvsp[(2) - (2)].str)));
22892316 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
22932320 }
22942321 break;
22952322
2296 case 136:
2297
2298 /* Line 1806 of yacc.c */
2299 #line 344 "util/configparser.y"
2323 case 140:
2324
2325 /* Line 1806 of yacc.c */
2326 #line 346 "util/configparser.y"
23002327 {
23012328 OUTYY(("P(server_do_ip6:%s)\n", (yyvsp[(2) - (2)].str)));
23022329 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
23062333 }
23072334 break;
23082335
2309 case 137:
2310
2311 /* Line 1806 of yacc.c */
2312 #line 353 "util/configparser.y"
2336 case 141:
2337
2338 /* Line 1806 of yacc.c */
2339 #line 355 "util/configparser.y"
23132340 {
23142341 OUTYY(("P(server_do_udp:%s)\n", (yyvsp[(2) - (2)].str)));
23152342 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
23192346 }
23202347 break;
23212348
2322 case 138:
2323
2324 /* Line 1806 of yacc.c */
2325 #line 362 "util/configparser.y"
2349 case 142:
2350
2351 /* Line 1806 of yacc.c */
2352 #line 364 "util/configparser.y"
23262353 {
23272354 OUTYY(("P(server_do_tcp:%s)\n", (yyvsp[(2) - (2)].str)));
23282355 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
23322359 }
23332360 break;
23342361
2335 case 139:
2336
2337 /* Line 1806 of yacc.c */
2338 #line 371 "util/configparser.y"
2362 case 143:
2363
2364 /* Line 1806 of yacc.c */
2365 #line 373 "util/configparser.y"
23392366 {
23402367 OUTYY(("P(server_tcp_upstream:%s)\n", (yyvsp[(2) - (2)].str)));
23412368 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
23452372 }
23462373 break;
23472374
2348 case 140:
2349
2350 /* Line 1806 of yacc.c */
2351 #line 380 "util/configparser.y"
2375 case 144:
2376
2377 /* Line 1806 of yacc.c */
2378 #line 382 "util/configparser.y"
23522379 {
23532380 OUTYY(("P(server_ssl_upstream:%s)\n", (yyvsp[(2) - (2)].str)));
23542381 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
23582385 }
23592386 break;
23602387
2361 case 141:
2362
2363 /* Line 1806 of yacc.c */
2364 #line 389 "util/configparser.y"
2388 case 145:
2389
2390 /* Line 1806 of yacc.c */
2391 #line 391 "util/configparser.y"
23652392 {
23662393 OUTYY(("P(server_ssl_service_key:%s)\n", (yyvsp[(2) - (2)].str)));
23672394 free(cfg_parser->cfg->ssl_service_key);
23692396 }
23702397 break;
23712398
2372 case 142:
2373
2374 /* Line 1806 of yacc.c */
2375 #line 396 "util/configparser.y"
2399 case 146:
2400
2401 /* Line 1806 of yacc.c */
2402 #line 398 "util/configparser.y"
23762403 {
23772404 OUTYY(("P(server_ssl_service_pem:%s)\n", (yyvsp[(2) - (2)].str)));
23782405 free(cfg_parser->cfg->ssl_service_pem);
23802407 }
23812408 break;
23822409
2383 case 143:
2384
2385 /* Line 1806 of yacc.c */
2386 #line 403 "util/configparser.y"
2410 case 147:
2411
2412 /* Line 1806 of yacc.c */
2413 #line 405 "util/configparser.y"
23872414 {
23882415 OUTYY(("P(server_ssl_port:%s)\n", (yyvsp[(2) - (2)].str)));
23892416 if(atoi((yyvsp[(2) - (2)].str)) == 0)
23932420 }
23942421 break;
23952422
2396 case 144:
2397
2398 /* Line 1806 of yacc.c */
2399 #line 412 "util/configparser.y"
2423 case 148:
2424
2425 /* Line 1806 of yacc.c */
2426 #line 414 "util/configparser.y"
24002427 {
24012428 OUTYY(("P(server_do_daemonize:%s)\n", (yyvsp[(2) - (2)].str)));
24022429 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
24062433 }
24072434 break;
24082435
2409 case 145:
2410
2411 /* Line 1806 of yacc.c */
2412 #line 421 "util/configparser.y"
2436 case 149:
2437
2438 /* Line 1806 of yacc.c */
2439 #line 423 "util/configparser.y"
24132440 {
24142441 OUTYY(("P(server_use_syslog:%s)\n", (yyvsp[(2) - (2)].str)));
24152442 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
24242451 }
24252452 break;
24262453
2427 case 146:
2428
2429 /* Line 1806 of yacc.c */
2430 #line 435 "util/configparser.y"
2454 case 150:
2455
2456 /* Line 1806 of yacc.c */
2457 #line 437 "util/configparser.y"
24312458 {
24322459 OUTYY(("P(server_log_time_ascii:%s)\n", (yyvsp[(2) - (2)].str)));
24332460 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
24372464 }
24382465 break;
24392466
2440 case 147:
2441
2442 /* Line 1806 of yacc.c */
2443 #line 444 "util/configparser.y"
2467 case 151:
2468
2469 /* Line 1806 of yacc.c */
2470 #line 446 "util/configparser.y"
24442471 {
24452472 OUTYY(("P(server_log_queries:%s)\n", (yyvsp[(2) - (2)].str)));
24462473 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
24502477 }
24512478 break;
24522479
2453 case 148:
2454
2455 /* Line 1806 of yacc.c */
2456 #line 453 "util/configparser.y"
2480 case 152:
2481
2482 /* Line 1806 of yacc.c */
2483 #line 455 "util/configparser.y"
24572484 {
24582485 OUTYY(("P(server_chroot:%s)\n", (yyvsp[(2) - (2)].str)));
24592486 free(cfg_parser->cfg->chrootdir);
24612488 }
24622489 break;
24632490
2464 case 149:
2465
2466 /* Line 1806 of yacc.c */
2467 #line 460 "util/configparser.y"
2491 case 153:
2492
2493 /* Line 1806 of yacc.c */
2494 #line 462 "util/configparser.y"
24682495 {
24692496 OUTYY(("P(server_username:%s)\n", (yyvsp[(2) - (2)].str)));
24702497 free(cfg_parser->cfg->username);
24722499 }
24732500 break;
24742501
2475 case 150:
2476
2477 /* Line 1806 of yacc.c */
2478 #line 467 "util/configparser.y"
2502 case 154:
2503
2504 /* Line 1806 of yacc.c */
2505 #line 469 "util/configparser.y"
24792506 {
24802507 OUTYY(("P(server_directory:%s)\n", (yyvsp[(2) - (2)].str)));
24812508 free(cfg_parser->cfg->directory);
24832510 }
24842511 break;
24852512
2486 case 151:
2487
2488 /* Line 1806 of yacc.c */
2489 #line 474 "util/configparser.y"
2513 case 155:
2514
2515 /* Line 1806 of yacc.c */
2516 #line 476 "util/configparser.y"
24902517 {
24912518 OUTYY(("P(server_logfile:%s)\n", (yyvsp[(2) - (2)].str)));
24922519 free(cfg_parser->cfg->logfile);
24952522 }
24962523 break;
24972524
2498 case 152:
2499
2500 /* Line 1806 of yacc.c */
2501 #line 482 "util/configparser.y"
2525 case 156:
2526
2527 /* Line 1806 of yacc.c */
2528 #line 484 "util/configparser.y"
25022529 {
25032530 OUTYY(("P(server_pidfile:%s)\n", (yyvsp[(2) - (2)].str)));
25042531 free(cfg_parser->cfg->pidfile);
25062533 }
25072534 break;
25082535
2509 case 153:
2510
2511 /* Line 1806 of yacc.c */
2512 #line 489 "util/configparser.y"
2536 case 157:
2537
2538 /* Line 1806 of yacc.c */
2539 #line 491 "util/configparser.y"
25132540 {
25142541 OUTYY(("P(server_root_hints:%s)\n", (yyvsp[(2) - (2)].str)));
25152542 if(!cfg_strlist_insert(&cfg_parser->cfg->root_hints, (yyvsp[(2) - (2)].str)))
25172544 }
25182545 break;
25192546
2520 case 154:
2521
2522 /* Line 1806 of yacc.c */
2523 #line 496 "util/configparser.y"
2547 case 158:
2548
2549 /* Line 1806 of yacc.c */
2550 #line 498 "util/configparser.y"
25242551 {
25252552 OUTYY(("P(server_dlv_anchor_file:%s)\n", (yyvsp[(2) - (2)].str)));
25262553 free(cfg_parser->cfg->dlv_anchor_file);
25282555 }
25292556 break;
25302557
2531 case 155:
2532
2533 /* Line 1806 of yacc.c */
2534 #line 503 "util/configparser.y"
2558 case 159:
2559
2560 /* Line 1806 of yacc.c */
2561 #line 505 "util/configparser.y"
25352562 {
25362563 OUTYY(("P(server_dlv_anchor:%s)\n", (yyvsp[(2) - (2)].str)));
25372564 if(!cfg_strlist_insert(&cfg_parser->cfg->dlv_anchor_list, (yyvsp[(2) - (2)].str)))
25392566 }
25402567 break;
25412568
2542 case 156:
2543
2544 /* Line 1806 of yacc.c */
2545 #line 510 "util/configparser.y"
2569 case 160:
2570
2571 /* Line 1806 of yacc.c */
2572 #line 512 "util/configparser.y"
25462573 {
25472574 OUTYY(("P(server_auto_trust_anchor_file:%s)\n", (yyvsp[(2) - (2)].str)));
25482575 if(!cfg_strlist_insert(&cfg_parser->cfg->
25512578 }
25522579 break;
25532580
2554 case 157:
2555
2556 /* Line 1806 of yacc.c */
2557 #line 518 "util/configparser.y"
2581 case 161:
2582
2583 /* Line 1806 of yacc.c */
2584 #line 520 "util/configparser.y"
25582585 {
25592586 OUTYY(("P(server_trust_anchor_file:%s)\n", (yyvsp[(2) - (2)].str)));
25602587 if(!cfg_strlist_insert(&cfg_parser->cfg->
25632590 }
25642591 break;
25652592
2566 case 158:
2567
2568 /* Line 1806 of yacc.c */
2569 #line 526 "util/configparser.y"
2593 case 162:
2594
2595 /* Line 1806 of yacc.c */
2596 #line 528 "util/configparser.y"
25702597 {
25712598 OUTYY(("P(server_trusted_keys_file:%s)\n", (yyvsp[(2) - (2)].str)));
25722599 if(!cfg_strlist_insert(&cfg_parser->cfg->
25752602 }
25762603 break;
25772604
2578 case 159:
2579
2580 /* Line 1806 of yacc.c */
2581 #line 534 "util/configparser.y"
2605 case 163:
2606
2607 /* Line 1806 of yacc.c */
2608 #line 536 "util/configparser.y"
25822609 {
25832610 OUTYY(("P(server_trust_anchor:%s)\n", (yyvsp[(2) - (2)].str)));
25842611 if(!cfg_strlist_insert(&cfg_parser->cfg->trust_anchor_list, (yyvsp[(2) - (2)].str)))
25862613 }
25872614 break;
25882615
2589 case 160:
2590
2591 /* Line 1806 of yacc.c */
2592 #line 541 "util/configparser.y"
2616 case 164:
2617
2618 /* Line 1806 of yacc.c */
2619 #line 543 "util/configparser.y"
25932620 {
25942621 OUTYY(("P(server_domain_insecure:%s)\n", (yyvsp[(2) - (2)].str)));
25952622 if(!cfg_strlist_insert(&cfg_parser->cfg->domain_insecure, (yyvsp[(2) - (2)].str)))
25972624 }
25982625 break;
25992626
2600 case 161:
2601
2602 /* Line 1806 of yacc.c */
2603 #line 548 "util/configparser.y"
2627 case 165:
2628
2629 /* Line 1806 of yacc.c */
2630 #line 550 "util/configparser.y"
26042631 {
26052632 OUTYY(("P(server_hide_identity:%s)\n", (yyvsp[(2) - (2)].str)));
26062633 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
26102637 }
26112638 break;
26122639
2613 case 162:
2614
2615 /* Line 1806 of yacc.c */
2616 #line 557 "util/configparser.y"
2640 case 166:
2641
2642 /* Line 1806 of yacc.c */
2643 #line 559 "util/configparser.y"
26172644 {
26182645 OUTYY(("P(server_hide_version:%s)\n", (yyvsp[(2) - (2)].str)));
26192646 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
26232650 }
26242651 break;
26252652
2626 case 163:
2627
2628 /* Line 1806 of yacc.c */
2629 #line 566 "util/configparser.y"
2653 case 167:
2654
2655 /* Line 1806 of yacc.c */
2656 #line 568 "util/configparser.y"
26302657 {
26312658 OUTYY(("P(server_identity:%s)\n", (yyvsp[(2) - (2)].str)));
26322659 free(cfg_parser->cfg->identity);
26342661 }
26352662 break;
26362663
2637 case 164:
2638
2639 /* Line 1806 of yacc.c */
2640 #line 573 "util/configparser.y"
2664 case 168:
2665
2666 /* Line 1806 of yacc.c */
2667 #line 575 "util/configparser.y"
26412668 {
26422669 OUTYY(("P(server_version:%s)\n", (yyvsp[(2) - (2)].str)));
26432670 free(cfg_parser->cfg->version);
26452672 }
26462673 break;
26472674
2648 case 165:
2649
2650 /* Line 1806 of yacc.c */
2651 #line 580 "util/configparser.y"
2675 case 169:
2676
2677 /* Line 1806 of yacc.c */
2678 #line 582 "util/configparser.y"
26522679 {
26532680 OUTYY(("P(server_so_rcvbuf:%s)\n", (yyvsp[(2) - (2)].str)));
26542681 if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->so_rcvbuf))
26572684 }
26582685 break;
26592686
2660 case 166:
2661
2662 /* Line 1806 of yacc.c */
2663 #line 588 "util/configparser.y"
2687 case 170:
2688
2689 /* Line 1806 of yacc.c */
2690 #line 590 "util/configparser.y"
26642691 {
26652692 OUTYY(("P(server_so_sndbuf:%s)\n", (yyvsp[(2) - (2)].str)));
26662693 if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->so_sndbuf))
26692696 }
26702697 break;
26712698
2672 case 167:
2673
2674 /* Line 1806 of yacc.c */
2675 #line 596 "util/configparser.y"
2699 case 171:
2700
2701 /* Line 1806 of yacc.c */
2702 #line 598 "util/configparser.y"
26762703 {
26772704 OUTYY(("P(server_edns_buffer_size:%s)\n", (yyvsp[(2) - (2)].str)));
26782705 if(atoi((yyvsp[(2) - (2)].str)) == 0)
26862713 }
26872714 break;
26882715
2689 case 168:
2690
2691 /* Line 1806 of yacc.c */
2692 #line 609 "util/configparser.y"
2716 case 172:
2717
2718 /* Line 1806 of yacc.c */
2719 #line 611 "util/configparser.y"
26932720 {
26942721 OUTYY(("P(server_msg_buffer_size:%s)\n", (yyvsp[(2) - (2)].str)));
26952722 if(atoi((yyvsp[(2) - (2)].str)) == 0)
27012728 }
27022729 break;
27032730
2704 case 169:
2705
2706 /* Line 1806 of yacc.c */
2707 #line 620 "util/configparser.y"
2731 case 173:
2732
2733 /* Line 1806 of yacc.c */
2734 #line 622 "util/configparser.y"
27082735 {
27092736 OUTYY(("P(server_msg_cache_size:%s)\n", (yyvsp[(2) - (2)].str)));
27102737 if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->msg_cache_size))
27132740 }
27142741 break;
27152742
2716 case 170:
2717
2718 /* Line 1806 of yacc.c */
2719 #line 628 "util/configparser.y"
2743 case 174:
2744
2745 /* Line 1806 of yacc.c */
2746 #line 630 "util/configparser.y"
27202747 {
27212748 OUTYY(("P(server_msg_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str)));
27222749 if(atoi((yyvsp[(2) - (2)].str)) == 0)
27302757 }
27312758 break;
27322759
2733 case 171:
2734
2735 /* Line 1806 of yacc.c */
2736 #line 641 "util/configparser.y"
2760 case 175:
2761
2762 /* Line 1806 of yacc.c */
2763 #line 643 "util/configparser.y"
27372764 {
27382765 OUTYY(("P(server_num_queries_per_thread:%s)\n", (yyvsp[(2) - (2)].str)));
27392766 if(atoi((yyvsp[(2) - (2)].str)) == 0)
27432770 }
27442771 break;
27452772
2746 case 172:
2747
2748 /* Line 1806 of yacc.c */
2749 #line 650 "util/configparser.y"
2773 case 176:
2774
2775 /* Line 1806 of yacc.c */
2776 #line 652 "util/configparser.y"
27502777 {
27512778 OUTYY(("P(server_jostle_timeout:%s)\n", (yyvsp[(2) - (2)].str)));
27522779 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
27562783 }
27572784 break;
27582785
2759 case 173:
2760
2761 /* Line 1806 of yacc.c */
2762 #line 659 "util/configparser.y"
2786 case 177:
2787
2788 /* Line 1806 of yacc.c */
2789 #line 661 "util/configparser.y"
27632790 {
27642791 OUTYY(("P(server_rrset_cache_size:%s)\n", (yyvsp[(2) - (2)].str)));
27652792 if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->rrset_cache_size))
27682795 }
27692796 break;
27702797
2771 case 174:
2772
2773 /* Line 1806 of yacc.c */
2774 #line 667 "util/configparser.y"
2798 case 178:
2799
2800 /* Line 1806 of yacc.c */
2801 #line 669 "util/configparser.y"
27752802 {
27762803 OUTYY(("P(server_rrset_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str)));
27772804 if(atoi((yyvsp[(2) - (2)].str)) == 0)
27852812 }
27862813 break;
27872814
2788 case 175:
2789
2790 /* Line 1806 of yacc.c */
2791 #line 680 "util/configparser.y"
2815 case 179:
2816
2817 /* Line 1806 of yacc.c */
2818 #line 682 "util/configparser.y"
27922819 {
27932820 OUTYY(("P(server_infra_host_ttl:%s)\n", (yyvsp[(2) - (2)].str)));
27942821 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
27982825 }
27992826 break;
28002827
2801 case 176:
2802
2803 /* Line 1806 of yacc.c */
2804 #line 689 "util/configparser.y"
2828 case 180:
2829
2830 /* Line 1806 of yacc.c */
2831 #line 691 "util/configparser.y"
28052832 {
28062833 OUTYY(("P(server_infra_lame_ttl:%s)\n", (yyvsp[(2) - (2)].str)));
28072834 verbose(VERB_DETAIL, "ignored infra-lame-ttl: %s (option "
28102837 }
28112838 break;
28122839
2813 case 177:
2814
2815 /* Line 1806 of yacc.c */
2816 #line 697 "util/configparser.y"
2840 case 181:
2841
2842 /* Line 1806 of yacc.c */
2843 #line 699 "util/configparser.y"
28172844 {
28182845 OUTYY(("P(server_infra_cache_numhosts:%s)\n", (yyvsp[(2) - (2)].str)));
28192846 if(atoi((yyvsp[(2) - (2)].str)) == 0)
28232850 }
28242851 break;
28252852
2826 case 178:
2827
2828 /* Line 1806 of yacc.c */
2829 #line 706 "util/configparser.y"
2853 case 182:
2854
2855 /* Line 1806 of yacc.c */
2856 #line 708 "util/configparser.y"
28302857 {
28312858 OUTYY(("P(server_infra_cache_lame_size:%s)\n", (yyvsp[(2) - (2)].str)));
28322859 verbose(VERB_DETAIL, "ignored infra-cache-lame-size: %s "
28352862 }
28362863 break;
28372864
2838 case 179:
2839
2840 /* Line 1806 of yacc.c */
2841 #line 714 "util/configparser.y"
2865 case 183:
2866
2867 /* Line 1806 of yacc.c */
2868 #line 716 "util/configparser.y"
28422869 {
28432870 OUTYY(("P(server_infra_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str)));
28442871 if(atoi((yyvsp[(2) - (2)].str)) == 0)
28522879 }
28532880 break;
28542881
2855 case 180:
2856
2857 /* Line 1806 of yacc.c */
2858 #line 727 "util/configparser.y"
2882 case 184:
2883
2884 /* Line 1806 of yacc.c */
2885 #line 729 "util/configparser.y"
28592886 {
28602887 OUTYY(("P(server_target_fetch_policy:%s)\n", (yyvsp[(2) - (2)].str)));
28612888 free(cfg_parser->cfg->target_fetch_policy);
28632890 }
28642891 break;
28652892
2866 case 181:
2867
2868 /* Line 1806 of yacc.c */
2869 #line 734 "util/configparser.y"
2893 case 185:
2894
2895 /* Line 1806 of yacc.c */
2896 #line 736 "util/configparser.y"
28702897 {
28712898 OUTYY(("P(server_harden_short_bufsize:%s)\n", (yyvsp[(2) - (2)].str)));
28722899 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
28772904 }
28782905 break;
28792906
2880 case 182:
2881
2882 /* Line 1806 of yacc.c */
2883 #line 744 "util/configparser.y"
2907 case 186:
2908
2909 /* Line 1806 of yacc.c */
2910 #line 746 "util/configparser.y"
28842911 {
28852912 OUTYY(("P(server_harden_large_queries:%s)\n", (yyvsp[(2) - (2)].str)));
28862913 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
28912918 }
28922919 break;
28932920
2894 case 183:
2895
2896 /* Line 1806 of yacc.c */
2897 #line 754 "util/configparser.y"
2921 case 187:
2922
2923 /* Line 1806 of yacc.c */
2924 #line 756 "util/configparser.y"
28982925 {
28992926 OUTYY(("P(server_harden_glue:%s)\n", (yyvsp[(2) - (2)].str)));
29002927 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
29052932 }
29062933 break;
29072934
2908 case 184:
2909
2910 /* Line 1806 of yacc.c */
2911 #line 764 "util/configparser.y"
2935 case 188:
2936
2937 /* Line 1806 of yacc.c */
2938 #line 766 "util/configparser.y"
29122939 {
29132940 OUTYY(("P(server_harden_dnssec_stripped:%s)\n", (yyvsp[(2) - (2)].str)));
29142941 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
29192946 }
29202947 break;
29212948
2922 case 185:
2923
2924 /* Line 1806 of yacc.c */
2925 #line 774 "util/configparser.y"
2949 case 189:
2950
2951 /* Line 1806 of yacc.c */
2952 #line 776 "util/configparser.y"
29262953 {
29272954 OUTYY(("P(server_harden_below_nxdomain:%s)\n", (yyvsp[(2) - (2)].str)));
29282955 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
29332960 }
29342961 break;
29352962
2936 case 186:
2937
2938 /* Line 1806 of yacc.c */
2939 #line 784 "util/configparser.y"
2963 case 190:
2964
2965 /* Line 1806 of yacc.c */
2966 #line 786 "util/configparser.y"
29402967 {
29412968 OUTYY(("P(server_harden_referral_path:%s)\n", (yyvsp[(2) - (2)].str)));
29422969 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
29472974 }
29482975 break;
29492976
2950 case 187:
2951
2952 /* Line 1806 of yacc.c */
2953 #line 794 "util/configparser.y"
2977 case 191:
2978
2979 /* Line 1806 of yacc.c */
2980 #line 796 "util/configparser.y"
29542981 {
29552982 OUTYY(("P(server_use_caps_for_id:%s)\n", (yyvsp[(2) - (2)].str)));
29562983 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
29612988 }
29622989 break;
29632990
2964 case 188:
2965
2966 /* Line 1806 of yacc.c */
2967 #line 804 "util/configparser.y"
2991 case 192:
2992
2993 /* Line 1806 of yacc.c */
2994 #line 806 "util/configparser.y"
29682995 {
29692996 OUTYY(("P(server_private_address:%s)\n", (yyvsp[(2) - (2)].str)));
29702997 if(!cfg_strlist_insert(&cfg_parser->cfg->private_address, (yyvsp[(2) - (2)].str)))
29722999 }
29733000 break;
29743001
2975 case 189:
2976
2977 /* Line 1806 of yacc.c */
2978 #line 811 "util/configparser.y"
3002 case 193:
3003
3004 /* Line 1806 of yacc.c */
3005 #line 813 "util/configparser.y"
29793006 {
29803007 OUTYY(("P(server_private_domain:%s)\n", (yyvsp[(2) - (2)].str)));
29813008 if(!cfg_strlist_insert(&cfg_parser->cfg->private_domain, (yyvsp[(2) - (2)].str)))
29833010 }
29843011 break;
29853012
2986 case 190:
2987
2988 /* Line 1806 of yacc.c */
2989 #line 818 "util/configparser.y"
3013 case 194:
3014
3015 /* Line 1806 of yacc.c */
3016 #line 820 "util/configparser.y"
29903017 {
29913018 OUTYY(("P(server_prefetch:%s)\n", (yyvsp[(2) - (2)].str)));
29923019 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
29963023 }
29973024 break;
29983025
2999 case 191:
3000
3001 /* Line 1806 of yacc.c */
3002 #line 827 "util/configparser.y"
3026 case 195:
3027
3028 /* Line 1806 of yacc.c */
3029 #line 829 "util/configparser.y"
30033030 {
30043031 OUTYY(("P(server_prefetch_key:%s)\n", (yyvsp[(2) - (2)].str)));
30053032 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
30093036 }
30103037 break;
30113038
3012 case 192:
3013
3014 /* Line 1806 of yacc.c */
3015 #line 836 "util/configparser.y"
3039 case 196:
3040
3041 /* Line 1806 of yacc.c */
3042 #line 838 "util/configparser.y"
30163043 {
30173044 OUTYY(("P(server_unwanted_reply_threshold:%s)\n", (yyvsp[(2) - (2)].str)));
30183045 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
30223049 }
30233050 break;
30243051
3025 case 193:
3026
3027 /* Line 1806 of yacc.c */
3028 #line 845 "util/configparser.y"
3052 case 197:
3053
3054 /* Line 1806 of yacc.c */
3055 #line 847 "util/configparser.y"
30293056 {
30303057 OUTYY(("P(server_do_not_query_address:%s)\n", (yyvsp[(2) - (2)].str)));
30313058 if(!cfg_strlist_insert(&cfg_parser->cfg->donotqueryaddrs, (yyvsp[(2) - (2)].str)))
30333060 }
30343061 break;
30353062
3036 case 194:
3037
3038 /* Line 1806 of yacc.c */
3039 #line 852 "util/configparser.y"
3063 case 198:
3064
3065 /* Line 1806 of yacc.c */
3066 #line 854 "util/configparser.y"
30403067 {
30413068 OUTYY(("P(server_do_not_query_localhost:%s)\n", (yyvsp[(2) - (2)].str)));
30423069 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
30473074 }
30483075 break;
30493076
3050 case 195:
3051
3052 /* Line 1806 of yacc.c */
3053 #line 862 "util/configparser.y"
3077 case 199:
3078
3079 /* Line 1806 of yacc.c */
3080 #line 864 "util/configparser.y"
30543081 {
30553082 OUTYY(("P(server_access_control:%s %s)\n", (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)));
30563083 if(strcmp((yyvsp[(3) - (3)].str), "deny")!=0 && strcmp((yyvsp[(3) - (3)].str), "refuse")!=0 &&
30653092 }
30663093 break;
30673094
3068 case 196:
3069
3070 /* Line 1806 of yacc.c */
3071 #line 876 "util/configparser.y"
3095 case 200:
3096
3097 /* Line 1806 of yacc.c */
3098 #line 878 "util/configparser.y"
30723099 {
30733100 OUTYY(("P(server_module_conf:%s)\n", (yyvsp[(2) - (2)].str)));
30743101 free(cfg_parser->cfg->module_conf);
30763103 }
30773104 break;
30783105
3079 case 197:
3080
3081 /* Line 1806 of yacc.c */
3082 #line 883 "util/configparser.y"
3106 case 201:
3107
3108 /* Line 1806 of yacc.c */
3109 #line 885 "util/configparser.y"
30833110 {
30843111 OUTYY(("P(server_val_override_date:%s)\n", (yyvsp[(2) - (2)].str)));
30853112 if(strlen((yyvsp[(2) - (2)].str)) == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) {
30983125 }
30993126 break;
31003127
3101 case 198:
3102
3103 /* Line 1806 of yacc.c */
3104 #line 901 "util/configparser.y"
3128 case 202:
3129
3130 /* Line 1806 of yacc.c */
3131 #line 903 "util/configparser.y"
31053132 {
31063133 OUTYY(("P(server_val_sig_skew_min:%s)\n", (yyvsp[(2) - (2)].str)));
31073134 if(strlen((yyvsp[(2) - (2)].str)) == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) {
31153142 }
31163143 break;
31173144
3118 case 199:
3119
3120 /* Line 1806 of yacc.c */
3121 #line 914 "util/configparser.y"
3145 case 203:
3146
3147 /* Line 1806 of yacc.c */
3148 #line 916 "util/configparser.y"
31223149 {
31233150 OUTYY(("P(server_val_sig_skew_max:%s)\n", (yyvsp[(2) - (2)].str)));
31243151 if(strlen((yyvsp[(2) - (2)].str)) == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) {
31323159 }
31333160 break;
31343161
3135 case 200:
3136
3137 /* Line 1806 of yacc.c */
3138 #line 927 "util/configparser.y"
3162 case 204:
3163
3164 /* Line 1806 of yacc.c */
3165 #line 929 "util/configparser.y"
31393166 {
31403167 OUTYY(("P(server_cache_max_ttl:%s)\n", (yyvsp[(2) - (2)].str)));
31413168 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
31453172 }
31463173 break;
31473174
3148 case 201:
3149
3150 /* Line 1806 of yacc.c */
3151 #line 936 "util/configparser.y"
3175 case 205:
3176
3177 /* Line 1806 of yacc.c */
3178 #line 938 "util/configparser.y"
31523179 {
31533180 OUTYY(("P(server_cache_min_ttl:%s)\n", (yyvsp[(2) - (2)].str)));
31543181 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
31583185 }
31593186 break;
31603187
3161 case 202:
3162
3163 /* Line 1806 of yacc.c */
3164 #line 945 "util/configparser.y"
3188 case 206:
3189
3190 /* Line 1806 of yacc.c */
3191 #line 947 "util/configparser.y"
31653192 {
31663193 OUTYY(("P(server_bogus_ttl:%s)\n", (yyvsp[(2) - (2)].str)));
31673194 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
31713198 }
31723199 break;
31733200
3174 case 203:
3175
3176 /* Line 1806 of yacc.c */
3177 #line 954 "util/configparser.y"
3201 case 207:
3202
3203 /* Line 1806 of yacc.c */
3204 #line 956 "util/configparser.y"
31783205 {
31793206 OUTYY(("P(server_val_clean_additional:%s)\n", (yyvsp[(2) - (2)].str)));
31803207 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
31853212 }
31863213 break;
31873214
3188 case 204:
3189
3190 /* Line 1806 of yacc.c */
3191 #line 964 "util/configparser.y"
3215 case 208:
3216
3217 /* Line 1806 of yacc.c */
3218 #line 966 "util/configparser.y"
31923219 {
31933220 OUTYY(("P(server_val_permissive_mode:%s)\n", (yyvsp[(2) - (2)].str)));
31943221 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
31993226 }
32003227 break;
32013228
3202 case 205:
3203
3204 /* Line 1806 of yacc.c */
3205 #line 974 "util/configparser.y"
3229 case 209:
3230
3231 /* Line 1806 of yacc.c */
3232 #line 976 "util/configparser.y"
32063233 {
32073234 OUTYY(("P(server_ignore_cd_flag:%s)\n", (yyvsp[(2) - (2)].str)));
32083235 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
32123239 }
32133240 break;
32143241
3215 case 206:
3216
3217 /* Line 1806 of yacc.c */
3218 #line 983 "util/configparser.y"
3242 case 210:
3243
3244 /* Line 1806 of yacc.c */
3245 #line 985 "util/configparser.y"
32193246 {
32203247 OUTYY(("P(server_val_log_level:%s)\n", (yyvsp[(2) - (2)].str)));
32213248 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
32253252 }
32263253 break;
32273254
3228 case 207:
3229
3230 /* Line 1806 of yacc.c */
3231 #line 992 "util/configparser.y"
3255 case 211:
3256
3257 /* Line 1806 of yacc.c */
3258 #line 994 "util/configparser.y"
32323259 {
32333260 OUTYY(("P(server_val_nsec3_keysize_iterations:%s)\n", (yyvsp[(2) - (2)].str)));
32343261 free(cfg_parser->cfg->val_nsec3_key_iterations);
32363263 }
32373264 break;
32383265
3239 case 208:
3240
3241 /* Line 1806 of yacc.c */
3242 #line 999 "util/configparser.y"
3266 case 212:
3267
3268 /* Line 1806 of yacc.c */
3269 #line 1001 "util/configparser.y"
32433270 {
32443271 OUTYY(("P(server_add_holddown:%s)\n", (yyvsp[(2) - (2)].str)));
32453272 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
32493276 }
32503277 break;
32513278
3252 case 209:
3253
3254 /* Line 1806 of yacc.c */
3255 #line 1008 "util/configparser.y"
3279 case 213:
3280
3281 /* Line 1806 of yacc.c */
3282 #line 1010 "util/configparser.y"
32563283 {
32573284 OUTYY(("P(server_del_holddown:%s)\n", (yyvsp[(2) - (2)].str)));
32583285 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
32623289 }
32633290 break;
32643291
3265 case 210:
3266
3267 /* Line 1806 of yacc.c */
3268 #line 1017 "util/configparser.y"
3292 case 214:
3293
3294 /* Line 1806 of yacc.c */
3295 #line 1019 "util/configparser.y"
32693296 {
32703297 OUTYY(("P(server_keep_missing:%s)\n", (yyvsp[(2) - (2)].str)));
32713298 if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
32753302 }
32763303 break;
32773304
3278 case 211:
3279
3280 /* Line 1806 of yacc.c */
3281 #line 1026 "util/configparser.y"
3305 case 215:
3306
3307 /* Line 1806 of yacc.c */
3308 #line 1028 "util/configparser.y"
32823309 {
32833310 OUTYY(("P(server_key_cache_size:%s)\n", (yyvsp[(2) - (2)].str)));
32843311 if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->key_cache_size))
32873314 }
32883315 break;
32893316
3290 case 212:
3291
3292 /* Line 1806 of yacc.c */
3293 #line 1034 "util/configparser.y"
3317 case 216:
3318
3319 /* Line 1806 of yacc.c */
3320 #line 1036 "util/configparser.y"
32943321 {
32953322 OUTYY(("P(server_key_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str)));
32963323 if(atoi((yyvsp[(2) - (2)].str)) == 0)
33043331 }
33053332 break;
33063333
3307 case 213:
3308
3309 /* Line 1806 of yacc.c */
3310 #line 1047 "util/configparser.y"
3334 case 217:
3335
3336 /* Line 1806 of yacc.c */
3337 #line 1049 "util/configparser.y"
33113338 {
33123339 OUTYY(("P(server_neg_cache_size:%s)\n", (yyvsp[(2) - (2)].str)));
33133340 if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->neg_cache_size))
33163343 }
33173344 break;
33183345
3319 case 214:
3320
3321 /* Line 1806 of yacc.c */
3322 #line 1055 "util/configparser.y"
3346 case 218:
3347
3348 /* Line 1806 of yacc.c */
3349 #line 1057 "util/configparser.y"
33233350 {
33243351 OUTYY(("P(server_local_zone:%s %s)\n", (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)));
33253352 if(strcmp((yyvsp[(3) - (3)].str), "static")!=0 && strcmp((yyvsp[(3) - (3)].str), "deny")!=0 &&
33423369 }
33433370 break;
33443371
3345 case 215:
3346
3347 /* Line 1806 of yacc.c */
3348 #line 1077 "util/configparser.y"
3372 case 219:
3373
3374 /* Line 1806 of yacc.c */
3375 #line 1079 "util/configparser.y"
33493376 {
33503377 OUTYY(("P(server_local_data:%s)\n", (yyvsp[(2) - (2)].str)));
33513378 if(!cfg_strlist_insert(&cfg_parser->cfg->local_data, (yyvsp[(2) - (2)].str)))
33533380 }
33543381 break;
33553382
3356 case 216:
3357
3358 /* Line 1806 of yacc.c */
3359 #line 1084 "util/configparser.y"
3383 case 220:
3384
3385 /* Line 1806 of yacc.c */
3386 #line 1086 "util/configparser.y"
33603387 {
33613388 char* ptr;
33623389 OUTYY(("P(server_local_data_ptr:%s)\n", (yyvsp[(2) - (2)].str)));
33723399 }
33733400 break;
33743401
3375 case 217:
3376
3377 /* Line 1806 of yacc.c */
3378 #line 1099 "util/configparser.y"
3402 case 221:
3403
3404 /* Line 1806 of yacc.c */
3405 #line 1101 "util/configparser.y"
3406 {
3407 OUTYY(("P(server_minimal_responses:%s)\n", (yyvsp[(2) - (2)].str)));
3408 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
3409 yyerror("expected yes or no.");
3410 else cfg_parser->cfg->minimal_responses =
3411 (strcmp((yyvsp[(2) - (2)].str), "yes")==0);
3412 free((yyvsp[(2) - (2)].str));
3413 }
3414 break;
3415
3416 case 222:
3417
3418 /* Line 1806 of yacc.c */
3419 #line 1111 "util/configparser.y"
3420 {
3421 OUTYY(("P(server_rrset_roundrobin:%s)\n", (yyvsp[(2) - (2)].str)));
3422 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
3423 yyerror("expected yes or no.");
3424 else cfg_parser->cfg->rrset_roundrobin =
3425 (strcmp((yyvsp[(2) - (2)].str), "yes")==0);
3426 free((yyvsp[(2) - (2)].str));
3427 }
3428 break;
3429
3430 case 223:
3431
3432 /* Line 1806 of yacc.c */
3433 #line 1121 "util/configparser.y"
33793434 {
33803435 OUTYY(("P(name:%s)\n", (yyvsp[(2) - (2)].str)));
33813436 if(cfg_parser->cfg->stubs->name)
33863441 }
33873442 break;
33883443
3389 case 218:
3390
3391 /* Line 1806 of yacc.c */
3392 #line 1109 "util/configparser.y"
3444 case 224:
3445
3446 /* Line 1806 of yacc.c */
3447 #line 1131 "util/configparser.y"
33933448 {
33943449 OUTYY(("P(stub-host:%s)\n", (yyvsp[(2) - (2)].str)));
33953450 if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->hosts, (yyvsp[(2) - (2)].str)))
33973452 }
33983453 break;
33993454
3400 case 219:
3401
3402 /* Line 1806 of yacc.c */
3403 #line 1116 "util/configparser.y"
3455 case 225:
3456
3457 /* Line 1806 of yacc.c */
3458 #line 1138 "util/configparser.y"
34043459 {
34053460 OUTYY(("P(stub-addr:%s)\n", (yyvsp[(2) - (2)].str)));
34063461 if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->addrs, (yyvsp[(2) - (2)].str)))
34083463 }
34093464 break;
34103465
3411 case 220:
3412
3413 /* Line 1806 of yacc.c */
3414 #line 1123 "util/configparser.y"
3466 case 226:
3467
3468 /* Line 1806 of yacc.c */
3469 #line 1145 "util/configparser.y"
3470 {
3471 OUTYY(("P(stub-first:%s)\n", (yyvsp[(2) - (2)].str)));
3472 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
3473 yyerror("expected yes or no.");
3474 else cfg_parser->cfg->stubs->isfirst=(strcmp((yyvsp[(2) - (2)].str), "yes")==0);
3475 free((yyvsp[(2) - (2)].str));
3476 }
3477 break;
3478
3479 case 227:
3480
3481 /* Line 1806 of yacc.c */
3482 #line 1154 "util/configparser.y"
34153483 {
34163484 OUTYY(("P(stub-prime:%s)\n", (yyvsp[(2) - (2)].str)));
34173485 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
34223490 }
34233491 break;
34243492
3425 case 221:
3426
3427 /* Line 1806 of yacc.c */
3428 #line 1133 "util/configparser.y"
3493 case 228:
3494
3495 /* Line 1806 of yacc.c */
3496 #line 1164 "util/configparser.y"
34293497 {
34303498 OUTYY(("P(name:%s)\n", (yyvsp[(2) - (2)].str)));
34313499 if(cfg_parser->cfg->forwards->name)
34363504 }
34373505 break;
34383506
3439 case 222:
3440
3441 /* Line 1806 of yacc.c */
3442 #line 1143 "util/configparser.y"
3507 case 229:
3508
3509 /* Line 1806 of yacc.c */
3510 #line 1174 "util/configparser.y"
34433511 {
34443512 OUTYY(("P(forward-host:%s)\n", (yyvsp[(2) - (2)].str)));
34453513 if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->hosts, (yyvsp[(2) - (2)].str)))
34473515 }
34483516 break;
34493517
3450 case 223:
3451
3452 /* Line 1806 of yacc.c */
3453 #line 1150 "util/configparser.y"
3518 case 230:
3519
3520 /* Line 1806 of yacc.c */
3521 #line 1181 "util/configparser.y"
34543522 {
34553523 OUTYY(("P(forward-addr:%s)\n", (yyvsp[(2) - (2)].str)));
34563524 if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->addrs, (yyvsp[(2) - (2)].str)))
34583526 }
34593527 break;
34603528
3461 case 224:
3462
3463 /* Line 1806 of yacc.c */
3464 #line 1157 "util/configparser.y"
3529 case 231:
3530
3531 /* Line 1806 of yacc.c */
3532 #line 1188 "util/configparser.y"
3533 {
3534 OUTYY(("P(forward-first:%s)\n", (yyvsp[(2) - (2)].str)));
3535 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
3536 yyerror("expected yes or no.");
3537 else cfg_parser->cfg->forwards->isfirst=(strcmp((yyvsp[(2) - (2)].str), "yes")==0);
3538 free((yyvsp[(2) - (2)].str));
3539 }
3540 break;
3541
3542 case 232:
3543
3544 /* Line 1806 of yacc.c */
3545 #line 1197 "util/configparser.y"
34653546 {
34663547 OUTYY(("\nP(remote-control:)\n"));
34673548 }
34683549 break;
34693550
3470 case 234:
3471
3472 /* Line 1806 of yacc.c */
3473 #line 1168 "util/configparser.y"
3551 case 242:
3552
3553 /* Line 1806 of yacc.c */
3554 #line 1208 "util/configparser.y"
34743555 {
34753556 OUTYY(("P(control_enable:%s)\n", (yyvsp[(2) - (2)].str)));
34763557 if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
34813562 }
34823563 break;
34833564
3484 case 235:
3485
3486 /* Line 1806 of yacc.c */
3487 #line 1178 "util/configparser.y"
3565 case 243:
3566
3567 /* Line 1806 of yacc.c */
3568 #line 1218 "util/configparser.y"
34883569 {
34893570 OUTYY(("P(control_port:%s)\n", (yyvsp[(2) - (2)].str)));
34903571 if(atoi((yyvsp[(2) - (2)].str)) == 0)
34943575 }
34953576 break;
34963577
3497 case 236:
3498
3499 /* Line 1806 of yacc.c */
3500 #line 1187 "util/configparser.y"
3578 case 244:
3579
3580 /* Line 1806 of yacc.c */
3581 #line 1227 "util/configparser.y"
35013582 {
35023583 OUTYY(("P(control_interface:%s)\n", (yyvsp[(2) - (2)].str)));
35033584 if(!cfg_strlist_insert(&cfg_parser->cfg->control_ifs, (yyvsp[(2) - (2)].str)))
35053586 }
35063587 break;
35073588
3508 case 237:
3509
3510 /* Line 1806 of yacc.c */
3511 #line 1194 "util/configparser.y"
3589 case 245:
3590
3591 /* Line 1806 of yacc.c */
3592 #line 1234 "util/configparser.y"
35123593 {
35133594 OUTYY(("P(rc_server_key_file:%s)\n", (yyvsp[(2) - (2)].str)));
35143595 free(cfg_parser->cfg->server_key_file);
35163597 }
35173598 break;
35183599
3519 case 238:
3520
3521 /* Line 1806 of yacc.c */
3522 #line 1201 "util/configparser.y"
3600 case 246:
3601
3602 /* Line 1806 of yacc.c */
3603 #line 1241 "util/configparser.y"
35233604 {
35243605 OUTYY(("P(rc_server_cert_file:%s)\n", (yyvsp[(2) - (2)].str)));
35253606 free(cfg_parser->cfg->server_cert_file);
35273608 }
35283609 break;
35293610
3530 case 239:
3531
3532 /* Line 1806 of yacc.c */
3533 #line 1208 "util/configparser.y"
3611 case 247:
3612
3613 /* Line 1806 of yacc.c */
3614 #line 1248 "util/configparser.y"
35343615 {
35353616 OUTYY(("P(rc_control_key_file:%s)\n", (yyvsp[(2) - (2)].str)));
35363617 free(cfg_parser->cfg->control_key_file);
35383619 }
35393620 break;
35403621
3541 case 240:
3542
3543 /* Line 1806 of yacc.c */
3544 #line 1215 "util/configparser.y"
3622 case 248:
3623
3624 /* Line 1806 of yacc.c */
3625 #line 1255 "util/configparser.y"
35453626 {
35463627 OUTYY(("P(rc_control_cert_file:%s)\n", (yyvsp[(2) - (2)].str)));
35473628 free(cfg_parser->cfg->control_cert_file);
35493630 }
35503631 break;
35513632
3552 case 241:
3553
3554 /* Line 1806 of yacc.c */
3555 #line 1222 "util/configparser.y"
3633 case 249:
3634
3635 /* Line 1806 of yacc.c */
3636 #line 1262 "util/configparser.y"
35563637 {
35573638 OUTYY(("\nP(python:)\n"));
35583639 }
35593640 break;
35603641
3561 case 245:
3562
3563 /* Line 1806 of yacc.c */
3564 #line 1231 "util/configparser.y"
3642 case 253:
3643
3644 /* Line 1806 of yacc.c */
3645 #line 1271 "util/configparser.y"
35653646 {
35663647 OUTYY(("P(python-script:%s)\n", (yyvsp[(2) - (2)].str)));
35673648 free(cfg_parser->cfg->python_script);
35723653
35733654
35743655 /* Line 1806 of yacc.c */
3575 #line 3577 "util/configparser.c"
3656 #line 3658 "util/configparser.c"
35763657 default: break;
35773658 }
35783659 /* User semantic actions sometimes alter yychar, and that requires
38033884
38043885
38053886 /* Line 2067 of yacc.c */
3806 #line 1236 "util/configparser.y"
3887 #line 1276 "util/configparser.y"
38073888
38083889
38093890 /* parse helper routines could be here */
158158 VAR_SSL_UPSTREAM = 377,
159159 VAR_SSL_SERVICE_KEY = 378,
160160 VAR_SSL_SERVICE_PEM = 379,
161 VAR_SSL_PORT = 380
161 VAR_SSL_PORT = 380,
162 VAR_FORWARD_FIRST = 381,
163 VAR_STUB_FIRST = 382,
164 VAR_MINIMAL_RESPONSES = 383,
165 VAR_RRSET_ROUNDROBIN = 384
162166 };
163167 #endif
164168 /* Tokens. */
285289 #define VAR_SSL_SERVICE_KEY 378
286290 #define VAR_SSL_SERVICE_PEM 379
287291 #define VAR_SSL_PORT 380
292 #define VAR_FORWARD_FIRST 381
293 #define VAR_STUB_FIRST 382
294 #define VAR_MINIMAL_RESPONSES 383
295 #define VAR_RRSET_ROUNDROBIN 384
288296
289297
290298
301309
302310
303311 /* Line 2068 of yacc.c */
304 #line 306 "util/configparser.h"
312 #line 314 "util/configparser.h"
305313 } YYSTYPE;
306314 # define YYSTYPE_IS_TRIVIAL 1
307315 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
102102 %token VAR_DEL_HOLDDOWN VAR_SO_RCVBUF VAR_EDNS_BUFFER_SIZE VAR_PREFETCH
103103 %token VAR_PREFETCH_KEY VAR_SO_SNDBUF VAR_HARDEN_BELOW_NXDOMAIN
104104 %token VAR_IGNORE_CD_FLAG VAR_LOG_QUERIES VAR_TCP_UPSTREAM VAR_SSL_UPSTREAM
105 %token VAR_SSL_SERVICE_KEY VAR_SSL_SERVICE_PEM VAR_SSL_PORT
105 %token VAR_SSL_SERVICE_KEY VAR_SSL_SERVICE_PEM VAR_SSL_PORT VAR_FORWARD_FIRST
106 %token VAR_STUB_FIRST VAR_MINIMAL_RESPONSES VAR_RRSET_ROUNDROBIN
106107
107108 %%
108109 toplevelvars: /* empty */ | toplevelvars toplevelvar ;
158159 server_edns_buffer_size | server_prefetch | server_prefetch_key |
159160 server_so_sndbuf | server_harden_below_nxdomain | server_ignore_cd_flag |
160161 server_log_queries | server_tcp_upstream | server_ssl_upstream |
161 server_ssl_service_key | server_ssl_service_pem | server_ssl_port
162 server_ssl_service_key | server_ssl_service_pem | server_ssl_port |
163 server_minimal_responses | server_rrset_roundrobin
162164 ;
163165 stubstart: VAR_STUB_ZONE
164166 {
174176 ;
175177 contents_stub: contents_stub content_stub
176178 | ;
177 content_stub: stub_name | stub_host | stub_addr | stub_prime
179 content_stub: stub_name | stub_host | stub_addr | stub_prime | stub_first
178180 ;
179181 forwardstart: VAR_FORWARD_ZONE
180182 {
190192 ;
191193 contents_forward: contents_forward content_forward
192194 | ;
193 content_forward: forward_name | forward_host | forward_addr
195 content_forward: forward_name | forward_host | forward_addr | forward_first
194196 ;
195197 server_num_threads: VAR_NUM_THREADS STRING_ARG
196198 {
10941096 }
10951097 }
10961098 ;
1099 server_minimal_responses: VAR_MINIMAL_RESPONSES STRING_ARG
1100 {
1101 OUTYY(("P(server_minimal_responses:%s)\n", $2));
1102 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1103 yyerror("expected yes or no.");
1104 else cfg_parser->cfg->minimal_responses =
1105 (strcmp($2, "yes")==0);
1106 free($2);
1107 }
1108 ;
1109 server_rrset_roundrobin: VAR_RRSET_ROUNDROBIN STRING_ARG
1110 {
1111 OUTYY(("P(server_rrset_roundrobin:%s)\n", $2));
1112 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1113 yyerror("expected yes or no.");
1114 else cfg_parser->cfg->rrset_roundrobin =
1115 (strcmp($2, "yes")==0);
1116 free($2);
1117 }
1118 ;
10971119 stub_name: VAR_NAME STRING_ARG
10981120 {
10991121 OUTYY(("P(name:%s)\n", $2));
11181140 yyerror("out of memory");
11191141 }
11201142 ;
1143 stub_first: VAR_STUB_FIRST STRING_ARG
1144 {
1145 OUTYY(("P(stub-first:%s)\n", $2));
1146 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1147 yyerror("expected yes or no.");
1148 else cfg_parser->cfg->stubs->isfirst=(strcmp($2, "yes")==0);
1149 free($2);
1150 }
1151 ;
11211152 stub_prime: VAR_STUB_PRIME STRING_ARG
11221153 {
11231154 OUTYY(("P(stub-prime:%s)\n", $2));
11521183 yyerror("out of memory");
11531184 }
11541185 ;
1186 forward_first: VAR_FORWARD_FIRST STRING_ARG
1187 {
1188 OUTYY(("P(forward-first:%s)\n", $2));
1189 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1190 yyerror("expected yes or no.");
1191 else cfg_parser->cfg->forwards->isfirst=(strcmp($2, "yes")==0);
1192 free($2);
1193 }
1194 ;
11551195 rcstart: VAR_REMOTE_CONTROL
11561196 {
11571197 OUTYY(("\nP(remote-control:)\n"));
442442 packed_rrset_encode(struct ub_packed_rrset_key* key, ldns_buffer* pkt,
443443 uint16_t* num_rrs, uint32_t timenow, struct regional* region,
444444 int do_data, int do_sig, struct compress_tree_node** tree,
445 ldns_pkt_section s, uint16_t qtype, int dnssec)
446 {
447 size_t i, owner_pos;
445 ldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset)
446 {
447 size_t i, j, owner_pos;
448448 int r, owner_labs;
449449 uint16_t owner_ptr = 0;
450450 struct packed_rrset_data* data = (struct packed_rrset_data*)
460460 if(do_data) {
461461 const ldns_rr_descriptor* c = type_rdata_compressable(key);
462462 for(i=0; i<data->count; i++) {
463 /* rrset roundrobin */
464 j = (i + rr_offset) % data->count;
463465 if((r=compress_owner(key, pkt, region, tree,
464466 owner_pos, &owner_ptr, owner_labs))
465467 != RETVAL_OK)
466468 return r;
467469 ldns_buffer_write(pkt, &key->rk.type, 2);
468470 ldns_buffer_write(pkt, &key->rk.rrset_class, 2);
469 if(data->rr_ttl[i] < timenow)
471 if(data->rr_ttl[j] < timenow)
470472 ldns_buffer_write_u32(pkt, 0);
471473 else ldns_buffer_write_u32(pkt,
472 data->rr_ttl[i]-timenow);
474 data->rr_ttl[j]-timenow);
473475 if(c) {
474 if((r=compress_rdata(pkt, data->rr_data[i],
475 data->rr_len[i], region, tree, c))
476 if((r=compress_rdata(pkt, data->rr_data[j],
477 data->rr_len[j], region, tree, c))
476478 != RETVAL_OK)
477479 return r;
478480 } else {
479 if(ldns_buffer_remaining(pkt) < data->rr_len[i])
481 if(ldns_buffer_remaining(pkt) < data->rr_len[j])
480482 return RETVAL_TRUNC;
481 ldns_buffer_write(pkt, data->rr_data[i],
482 data->rr_len[i]);
483 ldns_buffer_write(pkt, data->rr_data[j],
484 data->rr_len[j]);
483485 }
484486 }
485487 }
527529 insert_section(struct reply_info* rep, size_t num_rrsets, uint16_t* num_rrs,
528530 ldns_buffer* pkt, size_t rrsets_before, uint32_t timenow,
529531 struct regional* region, struct compress_tree_node** tree,
530 ldns_pkt_section s, uint16_t qtype, int dnssec)
532 ldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset)
531533 {
532534 int r;
533535 size_t i, setstart;
539541 setstart = ldns_buffer_position(pkt);
540542 if((r=packed_rrset_encode(rep->rrsets[rrsets_before+i],
541543 pkt, num_rrs, timenow, region, 1, 1, tree,
542 s, qtype, dnssec))
544 s, qtype, dnssec, rr_offset))
543545 != RETVAL_OK) {
544546 /* Bad, but if due to size must set TC bit */
545547 /* trim off the rrset neatly. */
552554 setstart = ldns_buffer_position(pkt);
553555 if((r=packed_rrset_encode(rep->rrsets[rrsets_before+i],
554556 pkt, num_rrs, timenow, region, 1, 0, tree,
555 s, qtype, dnssec))
557 s, qtype, dnssec, rr_offset))
556558 != RETVAL_OK) {
557559 ldns_buffer_set_position(pkt, setstart);
558560 return r;
563565 setstart = ldns_buffer_position(pkt);
564566 if((r=packed_rrset_encode(rep->rrsets[rrsets_before+i],
565567 pkt, num_rrs, timenow, region, 0, 1, tree,
566 s, qtype, dnssec))
568 s, qtype, dnssec, rr_offset))
567569 != RETVAL_OK) {
568570 ldns_buffer_set_position(pkt, setstart);
569571 return r;
594596 return RETVAL_OK;
595597 }
596598
599 static int
600 positive_answer(struct reply_info* rep, uint16_t qtype) {
601 size_t i;
602 if (FLAGS_GET_RCODE(rep->flags) != LDNS_RCODE_NOERROR)
603 return 0;
604
605 for(i=0;i<rep->an_numrrsets; i++) {
606 if(ntohs(rep->rrsets[i]->rk.type) == qtype) {
607 /* in case it is a wildcard with DNSSEC, there will
608 * be NSEC/NSEC3 records in the authority section
609 * that we cannot remove */
610 for(i=rep->an_numrrsets; i<rep->an_numrrsets+
611 rep->ns_numrrsets; i++) {
612 if(ntohs(rep->rrsets[i]->rk.type) ==
613 LDNS_RR_TYPE_NSEC ||
614 ntohs(rep->rrsets[i]->rk.type) ==
615 LDNS_RR_TYPE_NSEC3)
616 return 0;
617 }
618 return 1;
619 }
620 }
621 return 0;
622 }
623
597624 int
598625 reply_info_encode(struct query_info* qinfo, struct reply_info* rep,
599626 uint16_t id, uint16_t flags, ldns_buffer* buffer, uint32_t timenow,
602629 uint16_t ancount=0, nscount=0, arcount=0;
603630 struct compress_tree_node* tree = 0;
604631 int r;
632 size_t rr_offset;
605633
606634 ldns_buffer_clear(buffer);
607635 if(udpsize < ldns_buffer_limit(buffer))
629657 return 0;
630658 }
631659 }
660 /* roundrobin offset. using query id for random number */
661 rr_offset = RRSET_ROUNDROBIN?id:0;
632662
633663 /* insert answer section */
634664 if((r=insert_section(rep, rep->an_numrrsets, &ancount, buffer,
635665 0, timenow, region, &tree, LDNS_SECTION_ANSWER, qinfo->qtype,
636 dnssec)) != RETVAL_OK) {
666 dnssec, rr_offset)) != RETVAL_OK) {
637667 if(r == RETVAL_TRUNC) {
638668 /* create truncated message */
639669 ldns_buffer_write_u16_at(buffer, 6, ancount);
645675 }
646676 ldns_buffer_write_u16_at(buffer, 6, ancount);
647677
648 /* insert auth section */
649 if((r=insert_section(rep, rep->ns_numrrsets, &nscount, buffer,
650 rep->an_numrrsets, timenow, region, &tree,
651 LDNS_SECTION_AUTHORITY, qinfo->qtype, dnssec)) != RETVAL_OK) {
652 if(r == RETVAL_TRUNC) {
653 /* create truncated message */
654 ldns_buffer_write_u16_at(buffer, 8, nscount);
655 LDNS_TC_SET(ldns_buffer_begin(buffer));
656 ldns_buffer_flip(buffer);
657 return 1;
658 }
659 return 0;
660 }
661 ldns_buffer_write_u16_at(buffer, 8, nscount);
662
663 /* insert add section */
664 if((r=insert_section(rep, rep->ar_numrrsets, &arcount, buffer,
665 rep->an_numrrsets + rep->ns_numrrsets, timenow, region,
666 &tree, LDNS_SECTION_ADDITIONAL, qinfo->qtype,
667 dnssec)) != RETVAL_OK) {
668 if(r == RETVAL_TRUNC) {
669 /* no need to set TC bit, this is the additional */
670 ldns_buffer_write_u16_at(buffer, 10, arcount);
671 ldns_buffer_flip(buffer);
672 return 1;
673 }
674 return 0;
675 }
676 ldns_buffer_write_u16_at(buffer, 10, arcount);
678 /* if response is positive answer, auth/add sections are not required */
679 if( ! (MINIMAL_RESPONSES && positive_answer(rep, qinfo->qtype)) ) {
680 /* insert auth section */
681 if((r=insert_section(rep, rep->ns_numrrsets, &nscount, buffer,
682 rep->an_numrrsets, timenow, region, &tree,
683 LDNS_SECTION_AUTHORITY, qinfo->qtype,
684 dnssec, rr_offset)) != RETVAL_OK) {
685 if(r == RETVAL_TRUNC) {
686 /* create truncated message */
687 ldns_buffer_write_u16_at(buffer, 8, nscount);
688 LDNS_TC_SET(ldns_buffer_begin(buffer));
689 ldns_buffer_flip(buffer);
690 return 1;
691 }
692 return 0;
693 }
694 ldns_buffer_write_u16_at(buffer, 8, nscount);
695
696 /* insert add section */
697 if((r=insert_section(rep, rep->ar_numrrsets, &arcount, buffer,
698 rep->an_numrrsets + rep->ns_numrrsets, timenow, region,
699 &tree, LDNS_SECTION_ADDITIONAL, qinfo->qtype,
700 dnssec, rr_offset)) != RETVAL_OK) {
701 if(r == RETVAL_TRUNC) {
702 /* no need to set TC bit, this is the additional */
703 ldns_buffer_write_u16_at(buffer, 10, arcount);
704 ldns_buffer_flip(buffer);
705 return 1;
706 }
707 return 0;
708 }
709 ldns_buffer_write_u16_at(buffer, 10, arcount);
710 } else {
711 ldns_buffer_write_u16_at(buffer, 8, nscount);
712 ldns_buffer_write_u16_at(buffer, 10, arcount);
713 }
677714 ldns_buffer_flip(buffer);
678715 return 1;
679716 }
118118 return 0;
119119 }
120120
121 int fptr_whitelist_start_accept(void (*fptr)(void*))
122 {
123 if(fptr == &worker_start_accept) return 1;
124 return 0;
125 }
126
127 int fptr_whitelist_stop_accept(void (*fptr)(void*))
128 {
129 if(fptr == &worker_stop_accept) return 1;
130 return 0;
131 }
132
121133 int
122134 fptr_whitelist_event(void (*fptr)(int, short, void *))
123135 {
130142 else if(fptr == &comm_point_local_handle_callback) return 1;
131143 else if(fptr == &comm_point_raw_handle_callback) return 1;
132144 else if(fptr == &tube_handle_signal) return 1;
145 else if(fptr == &comm_base_handle_slow_accept) return 1;
133146 #ifdef UB_ON_WINDOWS
134147 else if(fptr == &worker_win_stop_cb) return 1;
135148 #endif
106106 int fptr_whitelist_comm_signal(void (*fptr)(int, void*));
107107
108108 /**
109 * Check function pointer whitelist for start_accept callback values.
110 *
111 * @param fptr: function pointer to check.
112 * @return false if not in whitelist.
113 */
114 int fptr_whitelist_start_accept(void (*fptr)(void*));
115
116 /**
117 * Check function pointer whitelist for stop_accept callback values.
118 *
119 * @param fptr: function pointer to check.
120 * @return false if not in whitelist.
121 */
122 int fptr_whitelist_stop_accept(void (*fptr)(void*));
123
124 /**
109125 * Check function pointer whitelist for event structure callback values.
110126 * This is not called by libevent itself, but checked by netevent.
111127 *
691691 1022,
692692 1025,
693693 1026,
694 1028,
694695 1029,
695696 1030,
696697 1031,
13021303 1641,
13031304 1642,
13041305 1643,
1306 1644,
13051307 1645,
13061308 1646,
13071309 1647,
20452047 2405,
20462048 2406,
20472049 2407,
2048 2408,
20492050 2409,
20502051 2410,
20512052 2411,
22002201 2561,
22012202 2562,
22022203 2563,
2204 2564,
22032205 2565,
22042206 2566,
22052207 2567,
30633065 3451,
30643066 3452,
30653067 3453,
3068 3454,
30663069 3455,
30673070 3456,
30683071 3457,
39573960 4750,
39583961 4751,
39593962 4752,
3963 4753,
39603964 4784,
39613965 4785,
39623966 4800,
44134417 6444,
44144418 6445,
44154419 6446,
4420 6455,
44164421 6456,
44174422 6471,
44184423 6480,
45314536 7024,
45324537 7025,
45334538 7030,
4539 7040,
45344540 7070,
45354541 7071,
45364542 7080,
46474653 7810,
46484654 7845,
46494655 7846,
4656 7872,
46504657 7880,
46514658 7887,
46524659 7900,
47654772 8612,
47664773 8613,
47674774 8614,
4775 8675,
47684776 8686,
47694777 8699,
47704778 8732,
49344942 9951,
49354943 9952,
49364944 9953,
4945 9955,
49374946 9956,
49384947 9966,
49394948 9987,
50255034 12006,
50265035 12007,
50275036 12008,
5037 12009,
50285038 12012,
50295039 12013,
50305040 12109,
52385248 27782,
52395249 27999,
52405250 28000,
5251 28119,
52415252 28240,
52425253 29167,
52435254 30001,
52715282 32896,
52725283 33123,
52735284 33331,
5285 33334,
52745286 33434,
52755287 33656,
52765288 34249,
53035315 43188,
53045316 43189,
53055317 43190,
5318 43439,
53065319 43440,
53075320 43441,
53085321 44321,
5959 struct val_anchors;
6060 struct val_neg_cache;
6161 struct iter_forwards;
62 struct iter_hints;
6263
6364 /** Maximum number of modules in operation */
6465 #define MAX_MODULE 5
203204 /** Mapping of forwarding zones to targets.
204205 * iterator forwarder information. per-thread, created by worker */
205206 struct iter_forwards* fwds;
207 /**
208 * iterator forwarder information. per-thread, created by worker.
209 * The hints -- these aren't stored in the cache because they don't
210 * expire. The hints are always used to "prime" the cache. Note
211 * that both root hints and stub zone "hints" are stored in this
212 * data structure.
213 */
214 struct iter_hints* hints;
206215 /** module specific data. indexed by module id. */
207216 void* modinfo[MAX_MODULE];
208217 };
5252 /** default value for EDNS ADVERTISED size */
5353 uint16_t EDNS_ADVERTISED_SIZE = 4096;
5454
55 /** minimal responses when positive answer: default is no */
56 int MINIMAL_RESPONSES = 0;
57
58 /** rrset order roundrobin: default is no */
59 int RRSET_ROUNDROBIN = 0;
60
5561 /* returns true is string addr is an ip6 specced address */
5662 int
5763 str_is_ip6(const char* str)
9292 /** DNSKEY secure entry point, KSK flag */
9393 #define DNSKEY_BIT_SEP 0x0001
9494
95 /** minimal responses when positive answer */
96 extern int MINIMAL_RESPONSES;
97
98 /** rrset order roundrobin */
99 extern int RRSET_ROUNDROBIN;
100
95101 /**
96102 * See if string is ip4 or ip6.
97103 * @param str: IP specification.
114114 uint32_t secs;
115115 /** timeval with current time */
116116 struct timeval now;
117 /** the event used for slow_accept timeouts */
118 struct event slow_accept;
119 /** true if slow_accept is enabled */
120 int slow_accept_enabled;
117121 };
118122
119123 /**
224228 {
225229 if(!b)
226230 return;
231 if(b->eb->slow_accept_enabled) {
232 if(event_del(&b->eb->slow_accept) != 0) {
233 log_err("could not event_del slow_accept");
234 }
235 }
227236 #ifdef USE_MINI_EVENT
228237 event_base_free(b->eb->base);
229238 #elif defined(HAVE_EVENT_BASE_FREE) && defined(HAVE_EVENT_BASE_ONCE)
260269 if(event_base_loopexit(b->eb->base, NULL) != 0) {
261270 log_err("Could not loopexit");
262271 }
272 }
273
274 void comm_base_set_slow_accept_handlers(struct comm_base* b,
275 void (*stop_acc)(void*), void (*start_acc)(void*), void* arg)
276 {
277 b->stop_accept = stop_acc;
278 b->start_accept = start_acc;
279 b->cb_arg = arg;
263280 }
264281
265282 struct event_base* comm_base_internal(struct comm_base* b)
307324 return 1;
308325 }
309326
327 int tcp_connect_errno_needs_log(struct sockaddr* addr, socklen_t addrlen)
328 {
329 return udp_send_errno_needs_log(addr, addrlen);
330 }
331
310332 /* send a UDP reply */
311333 int
312334 comm_point_send_udp_msg(struct comm_point *c, ldns_buffer* packet,
366388 strncpy(buf1, "(inet_ntop error)", sizeof(buf1));
367389 }
368390 buf1[sizeof(buf1)-1]=0;
391 #ifdef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
369392 if(inet_ntop(AF_INET, &r->pktinfo.v4info.ipi_spec_dst,
370393 buf2, (socklen_t)sizeof(buf2)) == 0) {
371394 strncpy(buf2, "(inet_ntop error)", sizeof(buf2));
372395 }
373396 buf2[sizeof(buf2)-1]=0;
397 #else
398 buf2[0]=0;
399 #endif
374400 log_info("%s: %d %s %s", str, r->pktinfo.v4info.ipi_ifindex,
375401 buf1, buf2);
376402 #elif defined(IP_RECVDSTADDR)
645671 comm_point_start_listening(c, fd, TCP_QUERY_TIMEOUT);
646672 }
647673
674 void comm_base_handle_slow_accept(int ATTR_UNUSED(fd),
675 short ATTR_UNUSED(event), void* arg)
676 {
677 struct comm_base* b = (struct comm_base*)arg;
678 /* timeout for the slow accept, re-enable accepts again */
679 if(b->start_accept) {
680 verbose(VERB_ALGO, "wait is over, slow accept disabled");
681 fptr_ok(fptr_whitelist_start_accept(b->start_accept));
682 (*b->start_accept)(b->cb_arg);
683 b->eb->slow_accept_enabled = 0;
684 }
685 }
686
648687 int comm_point_perform_accept(struct comm_point* c,
649688 struct sockaddr_storage* addr, socklen_t* addrlen)
650689 {
666705 #endif /* EPROTO */
667706 )
668707 return -1;
708 #if defined(ENFILE) && defined(EMFILE)
709 if(errno == ENFILE || errno == EMFILE) {
710 /* out of file descriptors, likely outside of our
711 * control. stop accept() calls for some time */
712 if(c->ev->base->stop_accept) {
713 struct comm_base* b = c->ev->base;
714 struct timeval tv;
715 verbose(VERB_ALGO, "out of file descriptors: "
716 "slow accept");
717 b->eb->slow_accept_enabled = 1;
718 fptr_ok(fptr_whitelist_stop_accept(
719 b->stop_accept));
720 (*b->stop_accept)(b->cb_arg);
721 /* set timeout, no mallocs */
722 tv.tv_sec = NETEVENT_SLOW_ACCEPT_TIME/1000;
723 tv.tv_usec = NETEVENT_SLOW_ACCEPT_TIME%1000;
724 event_set(&b->eb->slow_accept, -1, EV_TIMEOUT,
725 comm_base_handle_slow_accept, b);
726 if(event_base_set(b->eb->base,
727 &b->eb->slow_accept) != 0) {
728 /* we do not want to log here, because
729 * that would spam the logfiles.
730 * error: "event_base_set failed." */
731 }
732 if(event_add(&b->eb->slow_accept, &tv) != 0) {
733 /* we do not want to log here,
734 * error: "event_add failed." */
735 }
736 }
737 return -1;
738 }
739 #endif
669740 log_err("accept failed: %s", strerror(errno));
670741 #else /* USE_WINSOCK */
671742 if(WSAGetLastError() == WSAEINPROGRESS ||
11851256 #if defined(EINPROGRESS) && defined(EWOULDBLOCK)
11861257 if(error == EINPROGRESS || error == EWOULDBLOCK)
11871258 return 1; /* try again later */
1188 #endif
1189 else if(error != 0 && verbosity < 2)
1259 else
1260 #endif
1261 if(error != 0 && verbosity < 2)
11901262 return 0; /* silence lots of chatter in the logs */
11911263 else if(error != 0) {
11921264 log_err("tcp connect: %s", strerror(error));
8282 /** to pass fallback from capsforID to callback function; 0x20 failed */
8383 #define NETEVENT_CAPSFAIL -3
8484
85 /** timeout to slow accept calls when not possible, in msec. */
86 #define NETEVENT_SLOW_ACCEPT_TIME 2000
87
8588 /**
8689 * A communication point dispatcher. Thread specific.
8790 */
8891 struct comm_base {
8992 /** behind the scenes structure. with say libevent info. alloced */
9093 struct internal_base* eb;
94 /** callback to stop listening on accept sockets,
95 * performed when accept() will not function properly */
96 void (*stop_accept)(void*);
97 /** callback to start listening on accept sockets, performed
98 * after stop_accept() then a timeout has passed. */
99 void (*start_accept)(void*);
100 /** user argument for stop_accept and start_accept functions */
101 void* cb_arg;
91102 };
92103
93104 /**
311322 void comm_base_exit(struct comm_base* b);
312323
313324 /**
325 * Set the slow_accept mode handlers. You can not provide these if you do
326 * not perform accept() calls.
327 * @param b: comm base
328 * @param stop_accept: function that stops listening to accept fds.
329 * @param start_accept: function that resumes listening to accept fds.
330 * @param arg: callback arg to pass to the functions.
331 */
332 void comm_base_set_slow_accept_handlers(struct comm_base* b,
333 void (*stop_accept)(void*), void (*start_accept)(void*), void* arg);
334
335 /**
314336 * Access internal data structure (for util/tube.c on windows)
315337 * @param b: comm base
316338 * @return event_base. Could be libevent, or internal event handler.
635657 */
636658 void comm_point_raw_handle_callback(int fd, short event, void* arg);
637659
660 /**
661 * This routine is published for checks and tests, and is only used internally.
662 * libevent callback for timeout on slow accept.
663 * @param fd: file descriptor.
664 * @param event: event bits from libevent:
665 * EV_READ, EV_WRITE, EV_SIGNAL, EV_TIMEOUT.
666 * @param arg: the comm_point structure.
667 */
668 void comm_base_handle_slow_accept(int fd, short event, void* arg);
669
638670 #ifdef USE_WINSOCK
639671 /**
640672 * Callback for openssl BIO to on windows detect WSAEWOULDBLOCK and notify
645677 void comm_point_tcp_win_bio_cb(struct comm_point* c, void* ssl);
646678 #endif
647679
680 /** see if errno for tcp connect has to be logged or not. This uses errno */
681 int tcp_connect_errno_needs_log(struct sockaddr* addr, socklen_t addrlen);
682
648683 #endif /* NET_EVENT_H */
7474 int rc4_ready;
7575 };
7676
77 /** Size of key to use */
78 #define SEED_SIZE 20
77 /** Size of key to use (must be multiple of 8) */
78 #define SEED_SIZE 24
7979
8080 /**
8181 * Max random value. Similar to RAND_MAX, but more portable
115115 static void
116116 ub_arc4random_stir(struct ub_randstate* s, struct ub_randstate* from)
117117 {
118 unsigned char rand_buf[SEED_SIZE];
118 /* not as unsigned char, but longerint so that it is
119 aligned properly on alignment sensitive platforms */
120 uint64_t rand_buf[SEED_SIZE/sizeof(uint64_t)];
119121 int i;
120122
121123 memset(&s->rc4, 0, sizeof(s->rc4));
122124 memset(rand_buf, 0xc, sizeof(rand_buf));
123125 if (from) {
126 uint8_t* rbuf = (uint8_t*)rand_buf;
124127 for(i=0; i<SEED_SIZE; i++)
125 rand_buf[i] = (unsigned char)ub_random(from);
128 rbuf[i] = (uint8_t)ub_random(from);
126129 } else {
127130 if(!RAND_status())
128131 ub_systemseed((unsigned)getpid()^(unsigned)time(NULL));
129 if (RAND_bytes(rand_buf, (int)sizeof(rand_buf)) <= 0) {
132 if (RAND_bytes((unsigned char*)rand_buf,
133 (int)sizeof(rand_buf)) <= 0) {
130134 /* very unlikely that this happens, since we seeded
131135 * above, if it does; complain and keep going */
132136 log_err("Couldn't obtain random bytes (error %ld)",
135139 return;
136140 }
137141 }
138 RC4_set_key(&s->rc4, SEED_SIZE, rand_buf);
142 RC4_set_key(&s->rc4, SEED_SIZE, (unsigned char*)rand_buf);
139143
140144 /*
141145 * Discard early keystream, as per recommendations in:
142146 * http://www.wisdom.weizmann.ac.il/~itsik/RC4/Papers/Rc4_ksa.ps
143147 */
144148 for(i = 0; i <= 256; i += sizeof(rand_buf))
145 RC4(&s->rc4, sizeof(rand_buf), rand_buf, rand_buf);
149 RC4(&s->rc4, sizeof(rand_buf), (unsigned char*)rand_buf,
150 (unsigned char*)rand_buf);
146151
147152 memset(rand_buf, 0, sizeof(rand_buf));
148153
711711 {
712712 struct tube* tube = (struct tube*)arg;
713713 uint8_t* buf;
714 uint32_t len;
714 uint32_t len = 0;
715715 verbose(VERB_ALGO, "tube handle_signal");
716716 while(tube_poll(tube)) {
717717 if(tube_read_msg(tube, &buf, &len, 1)) {
995995 /* success; overwrite actual file */
996996 fclose(out);
997997 verbose(VERB_ALGO, "autotrust: replaced %s", fname);
998 #ifdef UB_ON_WINDOWS
999 (void)unlink(fname); /* windows does not replace file with rename() */
1000 #endif
9981001 if(rename(tempf, fname) < 0) {
9991002 log_err("rename(%s to %s): %s", tempf, fname, strerror(errno));
10001003 }
4848 #include "util/data/dname.h"
4949 #include "util/log.h"
5050 #include "util/net_help.h"
51 #include "util/regional.h"
5251 #include "util/config_file.h"
5352 #ifdef HAVE_GLOB_H
5453 #include <glob.h>
7675 struct val_anchors* a = (struct val_anchors*)calloc(1, sizeof(*a));
7776 if(!a)
7877 return NULL;
79 a->region = regional_create();
80 if(!a->region) {
81 free(a);
82 return NULL;
83 }
8478 a->tree = rbtree_create(anchor_cmp);
8579 if(!a->tree) {
8680 anchors_delete(a);
9791 return a;
9892 }
9993
94 /** delete assembled rrset */
95 static void
96 assembled_rrset_delete(struct ub_packed_rrset_key* pkey)
97 {
98 if(!pkey) return;
99 if(pkey->entry.data) {
100 struct packed_rrset_data* pd = (struct packed_rrset_data*)
101 pkey->entry.data;
102 free(pd->rr_data);
103 free(pd->rr_ttl);
104 free(pd->rr_len);
105 free(pd);
106 }
107 free(pkey->rk.dname);
108 free(pkey);
109 }
110
100111 /** destroy locks in tree and delete autotrust anchors */
101112 static void
102113 anchors_delfunc(rbnode_t* elem, void* ATTR_UNUSED(arg))
103114 {
104115 struct trust_anchor* ta = (struct trust_anchor*)elem;
116 if(!ta) return;
105117 if(ta->autr) {
106118 autr_point_delete(ta);
107119 } else {
120 struct ta_key* p, *np;
108121 lock_basic_destroy(&ta->lock);
122 free(ta->name);
123 p = ta->keylist;
124 while(p) {
125 np = p->next;
126 free(p->data);
127 free(p);
128 p = np;
129 }
130 assembled_rrset_delete(ta->ds_rrset);
131 assembled_rrset_delete(ta->dnskey_rrset);
132 free(ta);
109133 }
110134 }
111135
117141 lock_unprotect(&anchors->lock, anchors->autr);
118142 lock_unprotect(&anchors->lock, anchors);
119143 lock_basic_destroy(&anchors->lock);
120 traverse_postorder(anchors->tree, anchors_delfunc, NULL);
144 if(anchors->tree)
145 traverse_postorder(anchors->tree, anchors_delfunc, NULL);
121146 free(anchors->tree);
122 regional_destroy(anchors->region);
123147 autr_global_delete(anchors->autr);
124148 free(anchors);
125149 }
192216 /** create new trust anchor object */
193217 static struct trust_anchor*
194218 anchor_new_ta(struct val_anchors* anchors, uint8_t* name, int namelabs,
195 size_t namelen, uint16_t dclass)
219 size_t namelen, uint16_t dclass, int lockit)
196220 {
197221 #ifdef UNBOUND_DEBUG
198222 rbnode_t* r;
199223 #endif
200 struct trust_anchor* ta = (struct trust_anchor*)regional_alloc(
201 anchors->region, sizeof(struct trust_anchor));
224 struct trust_anchor* ta = (struct trust_anchor*)malloc(
225 sizeof(struct trust_anchor));
202226 if(!ta)
203227 return NULL;
204228 memset(ta, 0, sizeof(*ta));
205229 ta->node.key = ta;
206 ta->name = regional_alloc_init(anchors->region, name, namelen);
207 if(!ta->name)
208 return NULL;
230 ta->name = memdup(name, namelen);
231 if(!ta->name) {
232 free(ta);
233 return NULL;
234 }
209235 ta->namelabs = namelabs;
210236 ta->namelen = namelen;
211237 ta->dclass = dclass;
212238 lock_basic_init(&ta->lock);
213 lock_basic_lock(&anchors->lock);
239 if(lockit) {
240 lock_basic_lock(&anchors->lock);
241 }
214242 #ifdef UNBOUND_DEBUG
215243 r =
216244 #endif
217245 rbtree_insert(anchors->tree, &ta->node);
218 lock_basic_unlock(&anchors->lock);
246 if(lockit) {
247 lock_basic_unlock(&anchors->lock);
248 }
219249 log_assert(r != NULL);
220250 return ta;
221251 }
236266
237267 /** create new trustanchor key */
238268 static struct ta_key*
239 anchor_new_ta_key(struct val_anchors* anchors, uint8_t* rdata, size_t rdata_len,
240 uint16_t type)
241 {
242 struct ta_key* k = (struct ta_key*)regional_alloc(anchors->region,
243 sizeof(*k));
269 anchor_new_ta_key(uint8_t* rdata, size_t rdata_len, uint16_t type)
270 {
271 struct ta_key* k = (struct ta_key*)malloc(sizeof(*k));
244272 if(!k)
245273 return NULL;
246274 memset(k, 0, sizeof(*k));
247 k->data = regional_alloc_init(anchors->region, rdata, rdata_len);
248 if(!k->data)
249 return NULL;
275 k->data = memdup(rdata, rdata_len);
276 if(!k->data) {
277 free(k);
278 return NULL;
279 }
250280 k->len = rdata_len;
251281 k->type = type;
252282 return k;
281311 /* lookup or create trustanchor */
282312 ta = anchor_find(anchors, name, namelabs, namelen, dclass);
283313 if(!ta) {
284 ta = anchor_new_ta(anchors, name, namelabs, namelen, dclass);
314 ta = anchor_new_ta(anchors, name, namelabs, namelen, dclass, 1);
285315 if(!ta)
286316 return NULL;
287317 lock_basic_lock(&ta->lock);
295325 lock_basic_unlock(&ta->lock);
296326 return ta;
297327 }
298 k = anchor_new_ta_key(anchors, rdata, rdata_len, type);
328 k = anchor_new_ta_key(rdata, rdata_len, type);
299329 if(!k) {
300330 lock_basic_unlock(&ta->lock);
301331 return NULL;
825855
826856 /**
827857 * Assemble an rrset structure for the type
828 * @param region: allocated in this region.
829858 * @param ta: trust anchor.
830859 * @param num: number of items to fetch from list.
831860 * @param type: fetch only items of this type.
832861 * @return rrset or NULL on error.
833862 */
834863 static struct ub_packed_rrset_key*
835 assemble_it(struct regional* region, struct trust_anchor* ta, size_t num,
836 uint16_t type)
864 assemble_it(struct trust_anchor* ta, size_t num, uint16_t type)
837865 {
838866 struct ub_packed_rrset_key* pkey = (struct ub_packed_rrset_key*)
839 regional_alloc(region, sizeof(*pkey));
867 malloc(sizeof(*pkey));
840868 struct packed_rrset_data* pd;
841869 struct ta_key* tk;
842870 size_t i;
843871 if(!pkey)
844872 return NULL;
845873 memset(pkey, 0, sizeof(*pkey));
846 pkey->rk.dname = regional_alloc_init(region, ta->name, ta->namelen);
847 if(!pkey->rk.dname)
848 return NULL;
849
874 pkey->rk.dname = memdup(ta->name, ta->namelen);
875 if(!pkey->rk.dname) {
876 free(pkey);
877 return NULL;
878 }
879
850880 pkey->rk.dname_len = ta->namelen;
851881 pkey->rk.type = htons(type);
852882 pkey->rk.rrset_class = htons(ta->dclass);
853883 /* The rrset is build in an uncompressed way. This means it
854884 * cannot be copied in the normal way. */
855 pd = (struct packed_rrset_data*)regional_alloc(region, sizeof(*pd));
856 if(!pd)
857 return NULL;
885 pd = (struct packed_rrset_data*)malloc(sizeof(*pd));
886 if(!pd) {
887 free(pkey->rk.dname);
888 free(pkey);
889 return NULL;
890 }
858891 memset(pd, 0, sizeof(*pd));
859892 pd->count = num;
860893 pd->trust = rrset_trust_ultimate;
861 pd->rr_len = (size_t*)regional_alloc(region, num*sizeof(size_t));
862 if(!pd->rr_len)
863 return NULL;
864 pd->rr_ttl = (uint32_t*)regional_alloc(region, num*sizeof(uint32_t));
865 if(!pd->rr_ttl)
866 return NULL;
867 pd->rr_data = (uint8_t**)regional_alloc(region, num*sizeof(uint8_t*));
868 if(!pd->rr_data)
869 return NULL;
894 pd->rr_len = (size_t*)malloc(num*sizeof(size_t));
895 if(!pd->rr_len) {
896 free(pd);
897 free(pkey->rk.dname);
898 free(pkey);
899 return NULL;
900 }
901 pd->rr_ttl = (uint32_t*)malloc(num*sizeof(uint32_t));
902 if(!pd->rr_ttl) {
903 free(pd->rr_len);
904 free(pd);
905 free(pkey->rk.dname);
906 free(pkey);
907 return NULL;
908 }
909 pd->rr_data = (uint8_t**)malloc(num*sizeof(uint8_t*));
910 if(!pd->rr_data) {
911 free(pd->rr_ttl);
912 free(pd->rr_len);
913 free(pd);
914 free(pkey->rk.dname);
915 free(pkey);
916 return NULL;
917 }
870918 /* fill in rrs */
871919 i=0;
872920 for(tk = ta->keylist; tk; tk = tk->next) {
873921 if(tk->type != type)
874922 continue;
875923 pd->rr_len[i] = tk->len;
876 /* reuse data ptr to allocation in region */
924 /* reuse data ptr to allocation in talist */
877925 pd->rr_data[i] = tk->data;
878926 pd->rr_ttl[i] = 0;
879927 i++;
884932
885933 /**
886934 * Assemble structures for the trust DS and DNSKEY rrsets.
887 * @param anchors: trust anchor storage.
888935 * @param ta: trust anchor
889936 * @return: false on error.
890937 */
891938 static int
892 anchors_assemble(struct val_anchors* anchors, struct trust_anchor* ta)
939 anchors_assemble(struct trust_anchor* ta)
893940 {
894941 if(ta->numDS > 0) {
895 ta->ds_rrset = assemble_it(anchors->region, ta,
896 ta->numDS, LDNS_RR_TYPE_DS);
942 ta->ds_rrset = assemble_it(ta, ta->numDS, LDNS_RR_TYPE_DS);
897943 if(!ta->ds_rrset)
898944 return 0;
899945 }
900946 if(ta->numDNSKEY > 0) {
901 ta->dnskey_rrset = assemble_it(anchors->region, ta,
902 ta->numDNSKEY, LDNS_RR_TYPE_DNSKEY);
947 ta->dnskey_rrset = assemble_it(ta, ta->numDNSKEY,
948 LDNS_RR_TYPE_DNSKEY);
903949 if(!ta->dnskey_rrset)
904950 return 0;
905951 }
9601006 ta = next; /* skip */
9611007 continue;
9621008 }
963 if(!anchors_assemble(anchors, ta)) {
1009 if(!anchors_assemble(ta)) {
9641010 log_err("out of memory");
9651011 lock_basic_unlock(&ta->lock);
9661012 lock_basic_unlock(&anchors->lock);
9861032 " upgrade unbound and openssl)", b);
9871033 (void)rbtree_delete(anchors->tree, &ta->node);
9881034 lock_basic_unlock(&ta->lock);
989 lock_basic_destroy(&ta->lock);
1035 anchors_delfunc(&ta->node, NULL);
9901036 ta = next;
9911037 continue;
9921038 }
11451191 size_t
11461192 anchors_get_mem(struct val_anchors* anchors)
11471193 {
1148 return sizeof(*anchors) + regional_get_mem(anchors->region);
1149 }
1194 struct trust_anchor *ta;
1195 size_t s = sizeof(*anchors);
1196 RBTREE_FOR(ta, struct trust_anchor*, anchors->tree) {
1197 s += sizeof(*ta) + ta->namelen;
1198 /* keys and so on */
1199 }
1200 return s;
1201 }
1202
1203 int
1204 anchors_add_insecure(struct val_anchors* anchors, uint16_t c, uint8_t* nm)
1205 {
1206 struct trust_anchor key;
1207 key.node.key = &key;
1208 key.name = nm;
1209 key.namelabs = dname_count_size_labels(nm, &key.namelen);
1210 key.dclass = c;
1211 lock_basic_lock(&anchors->lock);
1212 if(rbtree_search(anchors->tree, &key)) {
1213 lock_basic_unlock(&anchors->lock);
1214 /* nothing to do, already an anchor or insecure point */
1215 return 1;
1216 }
1217 if(!anchor_new_ta(anchors, nm, key.namelabs, key.namelen, c, 0)) {
1218 log_err("out of memory");
1219 lock_basic_unlock(&anchors->lock);
1220 return 0;
1221 }
1222 /* no other contents in new ta, because it is insecure point */
1223 anchors_init_parents_locked(anchors);
1224 lock_basic_unlock(&anchors->lock);
1225 return 1;
1226 }
1227
1228 void
1229 anchors_delete_insecure(struct val_anchors* anchors, uint16_t c,
1230 uint8_t* nm)
1231 {
1232 struct trust_anchor key;
1233 struct trust_anchor* ta;
1234 key.node.key = &key;
1235 key.name = nm;
1236 key.namelabs = dname_count_size_labels(nm, &key.namelen);
1237 key.dclass = c;
1238 lock_basic_lock(&anchors->lock);
1239 if(!(ta=(struct trust_anchor*)rbtree_search(anchors->tree, &key))) {
1240 lock_basic_unlock(&anchors->lock);
1241 /* nothing there */
1242 return;
1243 }
1244 /* lock it to drive away other threads that use it */
1245 lock_basic_lock(&ta->lock);
1246 /* see if its really an insecure point */
1247 if(ta->keylist || ta->autr || ta->numDS || ta->numDNSKEY) {
1248 lock_basic_unlock(&ta->lock);
1249 /* its not an insecure point, do not remove it */
1250 return;
1251 }
1252
1253 /* remove from tree */
1254 (void)rbtree_delete(anchors->tree, &ta->node);
1255 anchors_init_parents_locked(anchors);
1256 lock_basic_unlock(&anchors->lock);
1257
1258 /* actual free of data */
1259 lock_basic_unlock(&ta->lock);
1260 anchors_delfunc(&ta->node, NULL);
1261 }
1262
4242 #define VALIDATOR_VAL_ANCHOR_H
4343 #include "util/rbtree.h"
4444 #include "util/locks.h"
45 struct regional;
4645 struct trust_anchor;
4746 struct config_file;
4847 struct ub_packed_rrset_key;
5958 struct val_anchors {
6059 /** lock on trees */
6160 lock_basic_t lock;
62 /**
63 * region where trust anchors are allocated.
64 * Autotrust anchors are malloced so they can be updated.
65 */
66 struct regional* region;
6761 /**
6862 * Anchors are store in this tree. Sort order is chosen, so that
6963 * dnames are in nsec-like order. A lookup on class, name will return
110104 struct trust_anchor* parent;
111105 /**
112106 * List of DS or DNSKEY rrs that form the trust anchor.
113 * It is allocated in the region.
114107 */
115108 struct ta_key* keylist;
116109 /** Autotrust anchor point data, or NULL */
202195 /** compare two trust anchors */
203196 int anchor_cmp(const void* k1, const void* k2);
204197
198 /**
199 * Add insecure point trust anchor. For external use (locks and init_parents)
200 * @param anchors: anchor storage.
201 * @param c: class.
202 * @param nm: name of insecure trust point.
203 * @return false on alloc failure.
204 */
205 int anchors_add_insecure(struct val_anchors* anchors, uint16_t c, uint8_t* nm);
206
207 /**
208 * Delete insecure point trust anchor. Does not remove if no such point.
209 * For external use (locks and init_parents)
210 * @param anchors: anchor storage.
211 * @param c: class.
212 * @param nm: name of insecure trust point.
213 */
214 void anchors_delete_insecure(struct val_anchors* anchors, uint16_t c,
215 uint8_t* nm);
216
205217 #endif /* VALIDATOR_VAL_ANCHOR_H */
367367 !nsec_has_type(nsec, LDNS_RR_TYPE_SOA)) {
368368 return 0;
369369 } else if(qinfo->qtype == LDNS_RR_TYPE_DS &&
370 nsec_has_type(nsec, LDNS_RR_TYPE_SOA &&
371 !dname_is_root(qinfo->qname))) {
370 nsec_has_type(nsec, LDNS_RR_TYPE_SOA) &&
371 !dname_is_root(qinfo->qname)) {
372372 return 0;
373373 }
374374
279279 return 32;
280280 else return 0;
281281 #endif
282 #ifdef USE_ECDSA
283 case LDNS_SHA384:
284 return SHA384_DIGEST_LENGTH;
285 #endif
282286 default: break;
283287 }
284288 return 0;
347351 ldns_buffer_limit(b), (unsigned char*)digest))
348352 return 1;
349353 #endif
354 #ifdef USE_ECDSA
355 case LDNS_SHA384:
356 (void)SHA384((unsigned char*)ldns_buffer_begin(b),
357 ldns_buffer_limit(b), (unsigned char*)digest);
358 return 1;
359 #endif
350360 default:
351361 verbose(VERB_QUERY, "unknown DS digest algorithm %d",
352362 (int) ds_get_digest_algo(ds_rrset, ds_idx));
416426 #endif
417427 #if defined(HAVE_EVP_SHA512) && defined(USE_SHA2)
418428 case LDNS_RSASHA512:
429 #endif
430 #ifdef USE_ECDSA
431 case LDNS_ECDSAP256SHA256:
432 case LDNS_ECDSAP384SHA384:
419433 #endif
420434 return 1;
421435 #ifdef USE_GOST
13201334 * Setup DSA key digest in DER encoding ...
13211335 * @param sig: input is signature output alloced ptr (unless failure).
13221336 * caller must free alloced ptr if this routine returns true.
1323 * @param len: intput is initial siglen, output is output len.
1337 * @param len: input is initial siglen, output is output len.
13241338 * @return false on failure.
13251339 */
13261340 static int
13491363 *sig = NULL;
13501364 newlen = i2d_DSA_SIG(dsasig, sig);
13511365 if(newlen < 0) {
1366 DSA_SIG_free(dsasig);
13521367 free(*sig);
13531368 return 0;
13541369 }
13561371 DSA_SIG_free(dsasig);
13571372 return 1;
13581373 }
1374
1375 #ifdef USE_ECDSA
1376 /**
1377 * Setup the ECDSA signature in its encoding that the library wants.
1378 * Converts from plain numbers to ASN formatted.
1379 * @param sig: input is signature, output alloced ptr (unless failure).
1380 * caller must free alloced ptr if this routine returns true.
1381 * @param len: input is initial siglen, output is output len.
1382 * @return false on failure.
1383 */
1384 static int
1385 setup_ecdsa_sig(unsigned char** sig, unsigned int* len)
1386 {
1387 ECDSA_SIG* ecdsa_sig;
1388 int newlen;
1389 int bnsize = (int)((*len)/2);
1390 /* if too short or not even length, fails */
1391 if(*len < 16 || bnsize*2 != (int)*len)
1392 return 0;
1393 /* use the raw data to parse two evenly long BIGNUMs, "r | s". */
1394 ecdsa_sig = ECDSA_SIG_new();
1395 if(!ecdsa_sig) return 0;
1396 ecdsa_sig->r = BN_bin2bn(*sig, bnsize, ecdsa_sig->r);
1397 ecdsa_sig->s = BN_bin2bn(*sig+bnsize, bnsize, ecdsa_sig->s);
1398 if(!ecdsa_sig->r || !ecdsa_sig->s) {
1399 ECDSA_SIG_free(ecdsa_sig);
1400 return 0;
1401 }
1402
1403 /* spool it into ASN format */
1404 *sig = NULL;
1405 newlen = i2d_ECDSA_SIG(ecdsa_sig, sig);
1406 if(newlen <= 0) {
1407 ECDSA_SIG_free(ecdsa_sig);
1408 free(*sig);
1409 return 0;
1410 }
1411 *len = (unsigned int)newlen;
1412 ECDSA_SIG_free(ecdsa_sig);
1413 return 1;
1414 }
1415 #endif /* USE_ECDSA */
13591416
13601417 /**
13611418 * Setup key and digest for verification. Adjust sig if necessary.
14711528 }
14721529 break;
14731530 #endif
1531 #ifdef USE_ECDSA
1532 case LDNS_ECDSAP256SHA256:
1533 *evp_key = ldns_ecdsa2pkey_raw(key, keylen,
1534 LDNS_ECDSAP256SHA256);
1535 if(!*evp_key) {
1536 verbose(VERB_QUERY, "verify: "
1537 "ldns_ecdsa2pkey_raw failed");
1538 return 0;
1539 }
1540 #ifdef USE_ECDSA_EVP_WORKAROUND
1541 /* openssl before 1.0.0 fixes RSA with the SHA256
1542 * hash in EVP. We create one for ecdsa_sha256 */
1543 {
1544 static int md_ecdsa_256_done = 0;
1545 static EVP_MD md;
1546 if(!md_ecdsa_256_done) {
1547 EVP_MD m = *EVP_sha256();
1548 md_ecdsa_256_done = 1;
1549 m.required_pkey_type[0] = (*evp_key)->type;
1550 m.verify = (void*)ECDSA_verify;
1551 md = m;
1552 }
1553 *digest_type = &md;
1554 }
1555 #else
1556 *digest_type = EVP_sha256();
1557 #endif
1558 break;
1559 case LDNS_ECDSAP384SHA384:
1560 *evp_key = ldns_ecdsa2pkey_raw(key, keylen,
1561 LDNS_ECDSAP384SHA384);
1562 if(!*evp_key) {
1563 verbose(VERB_QUERY, "verify: "
1564 "ldns_ecdsa2pkey_raw failed");
1565 return 0;
1566 }
1567 #ifdef USE_ECDSA_EVP_WORKAROUND
1568 /* openssl before 1.0.0 fixes RSA with the SHA384
1569 * hash in EVP. We create one for ecdsa_sha384 */
1570 {
1571 static int md_ecdsa_384_done = 0;
1572 static EVP_MD md;
1573 if(!md_ecdsa_384_done) {
1574 EVP_MD m = *EVP_sha384();
1575 md_ecdsa_384_done = 1;
1576 m.required_pkey_type[0] = (*evp_key)->type;
1577 m.verify = (void*)ECDSA_verify;
1578 md = m;
1579 }
1580 *digest_type = &md;
1581 }
1582 #else
1583 *digest_type = EVP_sha384();
1584 #endif
1585 break;
1586 #endif /* USE_ECDSA */
14741587 default:
14751588 verbose(VERB_QUERY, "verify: unknown algorithm %d",
14761589 algo);
15181631 return sec_status_bogus;
15191632 }
15201633 dofree = 1;
1521 }
1634 }
1635 #ifdef USE_ECDSA
1636 else if(algo == LDNS_ECDSAP256SHA256 || algo == LDNS_ECDSAP384SHA384) {
1637 /* EVP uses ASN prefix on sig, which is not in the wire data */
1638 if(!setup_ecdsa_sig(&sigblock, &sigblock_len)) {
1639 verbose(VERB_QUERY, "verify: failed to setup ECDSA sig");
1640 *reason = "use of signature for ECDSA crypto failed";
1641 EVP_PKEY_free(evp_key);
1642 return sec_status_bogus;
1643 }
1644 dofree = 1;
1645 }
1646 #endif /* USE_ECDSA */
15221647
15231648 /* do the signature cryptography work */
15241649 EVP_MD_CTX_init(&ctx);
15351660 if(dofree) free(sigblock);
15361661 return sec_status_unchecked;
15371662 }
1538
1663
15391664 res = EVP_VerifyFinal(&ctx, sigblock, sigblock_len, evp_key);
15401665 if(EVP_MD_CTX_cleanup(&ctx) == 0) {
15411666 verbose(VERB_QUERY, "verify: EVP_MD_CTX_cleanup failed");
19761976
19771977 /* store results in cache */
19781978 if(qstate->query_flags&BIT_RD) {
1979 /* if secure, this will override cache anyway, no need
1980 * to check if from parentNS */
19791981 if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
1980 vq->orig_msg->rep, 0, qstate->prefetch_leeway, NULL)) {
1982 vq->orig_msg->rep, 0, qstate->prefetch_leeway, 0, NULL)) {
19811983 log_err("out of memory caching validator results");
19821984 }
19831985 } else {
19841986 /* for a referral, store the verified RRsets */
19851987 /* and this does not get prefetched, so no leeway */
19861988 if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
1987 vq->orig_msg->rep, 1, 0, NULL)) {
1989 vq->orig_msg->rep, 1, 0, 0, NULL)) {
19881990 log_err("out of memory caching validator results");
19891991 }
19901992 }
29222924 return 0;
29232925 return sizeof(*ve) + key_cache_get_mem(ve->kcache) +
29242926 val_neg_get_mem(ve->neg_cache) +
2925 anchors_get_mem(env->anchors) +
29262927 sizeof(size_t)*2*ve->nsec3_keyiter_count;
29272928 }
29282929