Codebase list unbound / ac04d0b
Merge tag 'upstream/1.6.0' Upstream version 1.6.0 Robert Edmonds 7 years ago
128 changed file(s) with 10389 addition(s) and 4960 deletion(s). Raw diff Collapse all Expand all
0 testdata/*.[0-9] linguist-documentation
100100 iterator/iter_delegpt.c iterator/iter_donotq.c iterator/iter_fwd.c \
101101 iterator/iter_hints.c iterator/iter_priv.c iterator/iter_resptype.c \
102102 iterator/iter_scrub.c iterator/iter_utils.c services/listen_dnsport.c \
103 services/localzone.c services/mesh.c services/modstack.c \
103 services/localzone.c services/mesh.c services/modstack.c services/view.c \
104104 services/outbound_list.c services/outside_network.c util/alloc.c \
105105 util/config_file.c util/configlexer.c util/configparser.c \
106106 util/fptr_wlist.c util/locks.c util/log.c util/mini_event.c util/module.c \
116116 COMMON_OBJ_WITHOUT_NETCALL=dns.lo infra.lo rrset.lo dname.lo msgencode.lo \
117117 as112.lo msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \
118118 iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \
119 iter_scrub.lo iter_utils.lo localzone.lo mesh.lo modstack.lo \
119 iter_scrub.lo iter_utils.lo localzone.lo mesh.lo modstack.lo view.lo \
120120 outbound_list.lo alloc.lo config_file.lo configlexer.lo configparser.lo \
121121 fptr_wlist.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \
122122 random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo \
624624 $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
625625 $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \
626626 $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \
627 $(srcdir)/sldns/sbuffer.h
627 $(srcdir)/sldns/sbuffer.h $(srcdir)/services/localzone.h $(srcdir)/util/rbtree.h \
628 $(srcdir)/util/storage/dnstree.h $(srcdir)/util/module.h $(srcdir)/services/view.h
628629 msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h $(srcdir)/util/data/msgparse.h \
629630 $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h \
630631 $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \
634635 $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \
635636 $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h \
636637 $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \
637 $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h
638 $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h \
639 $(srcdir)/util/module.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \
640 $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h
638641 packed_rrset.lo packed_rrset.o: $(srcdir)/util/data/packed_rrset.c config.h \
639642 $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
640643 $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h \
704707 $(srcdir)/util/net_help.h $(srcdir)/sldns/sbuffer.h
705708 localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h $(srcdir)/services/localzone.h \
706709 $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h \
707 $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/regional.h \
708 $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h \
709 $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/net_help.h \
710 $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \
711 $(srcdir)/util/as112.h
710 $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \
711 $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \
712 $(srcdir)/sldns/rrdef.h $(srcdir)/services/view.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/sbuffer.h \
713 $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \
714 $(srcdir)/util/data/msgencode.h $(srcdir)/util/net_help.h $(srcdir)/util/netevent.h $(srcdir)/util/as112.h
712715 mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \
713716 $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \
714717 $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \
715718 $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h \
716719 $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/dns.h $(srcdir)/util/net_help.h \
717720 $(srcdir)/util/regional.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/timehist.h $(srcdir)/util/fptr_wlist.h \
718 $(srcdir)/util/tube.h $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h
721 $(srcdir)/util/tube.h $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h \
722 $(srcdir)/sldns/wire2str.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \
723 $(srcdir)/services/view.h $(srcdir)/util/data/dname.h
719724 modstack.lo modstack.o: $(srcdir)/services/modstack.c config.h $(srcdir)/services/modstack.h \
720725 $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
721726 $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \
722727 $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \
723728 $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h \
724729 $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \
725 $(srcdir)/validator/val_utils.h $(PYTHONMOD_HEADER) $(srcdir)/cachedb/cachedb.h
730 $(srcdir)/validator/val_utils.h $(PYTHONMOD_HEADER)
731 view.lo view.o: $(srcdir)/services/view.c config.h $(srcdir)/services/view.h $(srcdir)/util/rbtree.h \
732 $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \
733 $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \
734 $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \
735 $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h
726736 outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \
727737 $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \
728738 $(srcdir)/util/netevent.h
759769 $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \
760770 $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \
761771 $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \
762 $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/infra.h \
763 $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h \
764 $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \
765 $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \
766 $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \
767 $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h \
768 $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound.h \
769 $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h \
770 $(PYTHONMOD_HEADER) $(srcdir)/cachedb/cachedb.h
772 $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h \
773 $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h \
774 $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h $(srcdir)/iterator/iterator.h \
775 $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/validator/validator.h \
776 $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_nsec3.h \
777 $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_neg.h \
778 $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h \
779 $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \
780 $(srcdir)/util/config_file.h $(PYTHONMOD_HEADER)
771781 locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h
772782 log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h
773783 mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \
777787 $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h
778788 module.lo module.o: $(srcdir)/util/module.c config.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \
779789 $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \
780 $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h
790 $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h
781791 netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/netevent.h $(srcdir)/util/ub_event.h \
782792 $(srcdir)/util/log.h $(srcdir)/util/net_help.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h \
783793 $(srcdir)/util/locks.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \
901911 $(srcdir)/util/storage/slabhash.h $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h \
902912 $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \
903913 $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h
904 cachedb.lo cachedb.o: $(srcdir)/cachedb/cachedb.c config.h $(srcdir)/cachedb/cachedb.h $(srcdir)/util/module.h \
905 $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \
906 $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \
907 $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h \
908 $(srcdir)/util/data/msgencode.h $(srcdir)/services/cache/dns.h $(srcdir)/validator/val_neg.h \
909 $(srcdir)/util/rbtree.h $(srcdir)/validator/val_secalgo.h $(srcdir)/iterator/iter_utils.h \
910 $(srcdir)/iterator/iter_resptype.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h \
911 $(srcdir)/sldns/sbuffer.h
914 cachedb.lo cachedb.o: $(srcdir)/cachedb/cachedb.c config.h
912915 checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
913916 $(srcdir)/testcode/checklocks.h
914917 unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \
955958 unitldns.lo unitldns.o: $(srcdir)/testcode/unitldns.c config.h $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h \
956959 $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h
957960 acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \
958 $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \
959 $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h $(srcdir)/util/locks.h \
960 $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h
961 $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h $(srcdir)/util/locks.h \
962 $(srcdir)/util/log.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \
963 $(srcdir)/services/localzone.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \
964 $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \
965 $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h
961966 cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h $(srcdir)/daemon/cachedump.h \
962967 $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \
963968 $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
977982 $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \
978983 $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \
979984 $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \
980 $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h \
981 $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h \
982 $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h \
983 $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h
985 $(srcdir)/services/view.h $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h \
986 $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \
987 $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h $(srcdir)/util/random.h \
988 $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h
984989 remote.lo remote.o: $(srcdir)/daemon/remote.c config.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h \
985990 $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h \
986991 $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \
991996 $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \
992997 $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \
993998 $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \
994 $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h \
995 $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \
996 $(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \
997 $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/iterator/iter_delegpt.h \
998 $(srcdir)/services/outside_network.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/parseutil.h \
999 $(srcdir)/sldns/wire2str.h
999 $(srcdir)/services/view.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h \
1000 $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kcache.h \
1001 $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h \
1002 $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \
1003 $(srcdir)/iterator/iter_delegpt.h $(srcdir)/services/outside_network.h $(srcdir)/sldns/str2wire.h \
1004 $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h
10001005 stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \
10011006 $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \
10021007 $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
10241029 $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \
10251030 $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \
10261031 $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h \
1027 $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h $(srcdir)/util/regional.h \
1028 $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \
1032 $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h $(srcdir)/util/config_file.h \
1033 $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \
10291034 $(srcdir)/services/outside_network.h $(srcdir)/services/outbound_list.h \
10301035 $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \
10311036 $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \
10531058 $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \
10541059 $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \
10551060 $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h \
1056 $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h $(srcdir)/util/regional.h \
1057 $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \
1061 $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h $(srcdir)/util/config_file.h \
1062 $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \
10581063 $(srcdir)/services/outside_network.h $(srcdir)/services/outbound_list.h \
10591064 $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \
10601065 $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \
10631068 $(srcdir)/validator/val_anchor.h $(srcdir)/libunbound/context.h $(srcdir)/libunbound/unbound.h \
10641069 $(srcdir)/libunbound/libworker.h
10651070 acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \
1066 $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \
1067 $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h $(srcdir)/util/locks.h \
1068 $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h
1071 $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h $(srcdir)/util/locks.h \
1072 $(srcdir)/util/log.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \
1073 $(srcdir)/services/localzone.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \
1074 $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \
1075 $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h
10691076 daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h \
10701077 $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \
10711078 $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \
10731080 $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \
10741081 $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \
10751082 $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \
1076 $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h \
1077 $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h \
1078 $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h \
1079 $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h
1083 $(srcdir)/services/view.h $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h \
1084 $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \
1085 $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h $(srcdir)/util/random.h \
1086 $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h
10801087 stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \
10811088 $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \
10821089 $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
11241131 $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \
11251132 $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \
11261133 $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/services/localzone.h \
1127 $(srcdir)/sldns/sbuffer.h $(PYTHONMOD_HEADER)
1134 $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h $(PYTHONMOD_HEADER)
11281135 worker_cb.lo worker_cb.o: $(srcdir)/smallapp/worker_cb.c config.h $(srcdir)/libunbound/context.h \
11291136 $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \
11301137 $(srcdir)/libunbound/unbound.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \
11361143 $(srcdir)/libunbound/unbound.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \
11371144 $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \
11381145 $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h \
1139 $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \
1140 $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/sldns/sbuffer.h
1146 $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(srcdir)/services/cache/rrset.h \
1147 $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \
1148 $(srcdir)/sldns/sbuffer.h
11411149 libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbound/unbound.h \
11421150 $(srcdir)/libunbound/unbound-event.h config.h $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h \
11431151 $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \
11451153 $(srcdir)/util/config_file.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \
11461154 $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h \
11471155 $(srcdir)/util/random.h $(srcdir)/util/net_help.h $(srcdir)/util/tube.h $(srcdir)/util/ub_event.h \
1148 $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/infra.h \
1149 $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \
1150 $(srcdir)/sldns/sbuffer.h
1156 $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h \
1157 $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h \
1158 $(srcdir)/util/storage/slabhash.h $(srcdir)/sldns/sbuffer.h
11511159 libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/libunbound/libworker.h \
11521160 $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
11531161 $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \
11551163 $(srcdir)/libunbound/unbound-event.h $(srcdir)/services/outside_network.h $(srcdir)/util/netevent.h \
11561164 $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h \
11571165 $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \
1158 $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/cache/rrset.h \
1159 $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h \
1160 $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/util/config_file.h \
1161 $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \
1162 $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \
1163 $(srcdir)/sldns/str2wire.h
1166 $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h \
1167 $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h \
1168 $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h \
1169 $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h \
1170 $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h \
1171 $(srcdir)/iterator/iter_hints.h $(srcdir)/sldns/str2wire.h
11641172 unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \
11651173 $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h
11661174 asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \
546546 return;
547547 }
548548
549 if(qstate->blacklist) {
550 /* cache is blacklisted */
549 if(qstate->blacklist || qstate->no_cache_lookup) {
550 /* cache is blacklisted or we are instructed from edns to not look */
551551 /* pass request to next module */
552552 qstate->ext_state[id] = module_wait_module;
553553 return;
555555
556556 /* lookup inside unbound's internal cache */
557557 if(cachedb_intcache_lookup(qstate)) {
558 if(verbosity >= VERB_ALGO)
559 log_dns_msg("cachedb internal cache lookup",
560 &qstate->return_msg->qinfo,
561 qstate->return_msg->rep);
558 if(verbosity >= VERB_ALGO) {
559 if(qstate->return_msg->rep)
560 log_dns_msg("cachedb internal cache lookup",
561 &qstate->return_msg->qinfo,
562 qstate->return_msg->rep);
563 else log_info("cachedb internal cache lookup: rcode %s",
564 sldns_lookup_by_id(sldns_rcodes, qstate->return_rcode)?
565 sldns_lookup_by_id(sldns_rcodes, qstate->return_rcode)->name:"??");
566 }
562567 /* we are done with the query */
563568 qstate->ext_state[id] = module_finished;
564569 return;
594599 cachedb_handle_response(struct module_qstate* qstate,
595600 struct cachedb_qstate* ATTR_UNUSED(iq), struct cachedb_env* ie, int id)
596601 {
597 /* check if we are enabled, and skip if not */
598 if(!ie->enabled) {
602 /* check if we are not enabled or instructed to not cache, and skip */
603 if(!ie->enabled || qstate->no_cache_store) {
599604 /* we are done with the query */
600605 qstate->ext_state[id] = module_finished;
601606 return;
648653 (void)error_response(qstate, id, LDNS_RCODE_SERVFAIL);
649654 return;
650655 }
656 if(!iq && (event == module_event_moddone)) {
657 /* during priming, module done but we never started */
658 qstate->ext_state[id] = module_finished;
659 return;
660 }
651661
652662 log_err("bad event for cachedb");
653663 (void)error_response(qstate, id, LDNS_RCODE_SERVFAIL);
106106 /* Define to 1 if you have the <dlfcn.h> header file. */
107107 #undef HAVE_DLFCN_H
108108
109 /* Define to 1 if you have the `DSA_SIG_set0' function. */
110 #undef HAVE_DSA_SIG_SET0
111
109112 /* Define to 1 if you have the <endian.h> header file. */
110113 #undef HAVE_ENDIAN_H
111114
142145 /* Define to 1 if you have the `EVP_cleanup' function. */
143146 #undef HAVE_EVP_CLEANUP
144147
148 /* Define to 1 if you have the `EVP_dss1' function. */
149 #undef HAVE_EVP_DSS1
150
145151 /* Define to 1 if you have the `EVP_MD_CTX_new' function. */
146152 #undef HAVE_EVP_MD_CTX_NEW
147153
343349 /* Define to 1 if you have the `recvmsg' function. */
344350 #undef HAVE_RECVMSG
345351
346 /* define if you have the sbrk() call */
347 #undef HAVE_SBRK
348
349352 /* Define to 1 if you have the `sendmsg' function. */
350353 #undef HAVE_SENDMSG
351354
393396
394397 /* Define if you have the SSL libraries installed. */
395398 #undef HAVE_SSL
399
400 /* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
401 #undef HAVE_SSL_CTX_SET_SECURITY_LEVEL
396402
397403 /* Define to 1 if you have the <stdarg.h> header file. */
398404 #undef HAVE_STDARG_H
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for unbound 1.5.10.
2 # Generated by GNU Autoconf 2.69 for unbound 1.6.0.
33 #
44 # Report bugs to <unbound-bugs@nlnetlabs.nl>.
55 #
589589 # Identity of this package.
590590 PACKAGE_NAME='unbound'
591591 PACKAGE_TARNAME='unbound'
592 PACKAGE_VERSION='1.5.10'
593 PACKAGE_STRING='unbound 1.5.10'
592 PACKAGE_VERSION='1.6.0'
593 PACKAGE_STRING='unbound 1.6.0'
594594 PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl'
595595 PACKAGE_URL=''
596596
658658 WINDRES
659659 CHECKLOCK_OBJ
660660 staticexe
661 PC_LIBEVENT_DEPENDENCY
661662 UNBOUND_EVENT_UNINSTALL
662663 UNBOUND_EVENT_INSTALL
663664 SSLLIB
677678 swig
678679 SWIG_LIB
679680 SWIG
681 PC_PY_DEPENDENCY
680682 PY_MAJOR_VERSION
681683 PYTHON_SITE_PKG
682684 PYTHON_LDFLAGS
14001402 # Omit some internal or obsolete options to make the list less imposing.
14011403 # This message is too long to be a string in the A/UX 3.1 sh.
14021404 cat <<_ACEOF
1403 \`configure' configures unbound 1.5.10 to adapt to many kinds of systems.
1405 \`configure' configures unbound 1.6.0 to adapt to many kinds of systems.
14041406
14051407 Usage: $0 [OPTION]... [VAR=VALUE]...
14061408
14651467
14661468 if test -n "$ac_init_help"; then
14671469 case $ac_init_help in
1468 short | recursive ) echo "Configuration of unbound 1.5.10:";;
1470 short | recursive ) echo "Configuration of unbound 1.6.0:";;
14691471 esac
14701472 cat <<\_ACEOF
14711473
16551657 test -n "$ac_init_help" && exit $ac_status
16561658 if $ac_init_version; then
16571659 cat <<\_ACEOF
1658 unbound configure 1.5.10
1660 unbound configure 1.6.0
16591661 generated by GNU Autoconf 2.69
16601662
16611663 Copyright (C) 2012 Free Software Foundation, Inc.
23642366 This file contains any messages produced by compilers while
23652367 running configure, to aid debugging if configure makes a mistake.
23662368
2367 It was created by unbound $as_me 1.5.10, which was
2369 It was created by unbound $as_me 1.6.0, which was
23682370 generated by GNU Autoconf 2.69. Invocation command line was
23692371
23702372 $ $0 $@
27142716
27152717 UNBOUND_VERSION_MAJOR=1
27162718
2717 UNBOUND_VERSION_MINOR=5
2718
2719 UNBOUND_VERSION_MICRO=10
2719 UNBOUND_VERSION_MINOR=6
2720
2721 UNBOUND_VERSION_MICRO=0
27202722
27212723
27222724 LIBUNBOUND_CURRENT=6
2723 LIBUNBOUND_REVISION=2
2725 LIBUNBOUND_REVISION=3
27242726 LIBUNBOUND_AGE=4
27252727 # 1.0.0 had 0:12:0
27262728 # 1.0.1 had 0:13:0
27702772 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
27712773 # 1.5.9 had 6:1:4
27722774 # 1.5.10 had 6:2:4
2775 # 1.6.0 had 6:3:4
27732776
27742777 # Current -- the number of the binary API that we're implementing
27752778 # Revision -- which iteration of the implementation of the binary
1682216825 LIBS="$PYTHON_LDFLAGS $LIBS"
1682316826 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
1682416827 ub_have_python=yes
16828 PC_PY_DEPENDENCY="python"
16829
1682516830
1682616831 # Check for SWIG
1682716832 ub_have_swig=no
1753417539
1753517540 done
1753617541
17537 for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup
17542 for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1
1753817543 do :
1753917544 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
1754017545 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
1755017555 # these check_funcs need -lssl
1755117556 BAKLIBS="$LIBS"
1755217557 LIBS="-lssl $LIBS"
17553 for ac_func in OPENSSL_init_ssl
17558 for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level
1755417559 do :
17555 ac_fn_c_check_func "$LINENO" "OPENSSL_init_ssl" "ac_cv_func_OPENSSL_init_ssl"
17556 if test "x$ac_cv_func_OPENSSL_init_ssl" = xyes; then :
17560 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17561 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17562 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
1755717563 cat >>confdefs.h <<_ACEOF
17558 #define HAVE_OPENSSL_INIT_SSL 1
17564 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
1755917565 _ACEOF
1756017566
1756117567 fi
1792417930 fi
1792517931
1792617932 use_dsa="no"
17927 case "$enable_ecdsa" in
17933 case "$enable_dsa" in
1792817934 no)
1792917935 ;;
1793017936 *)
1793117937 # detect if DSA is supported, and turn it off if not.
17932 ac_fn_c_check_func "$LINENO" "EVP_dss1" "ac_cv_func_EVP_dss1"
17933 if test "x$ac_cv_func_EVP_dss1" = xyes; then :
17938 ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
17939 if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
1793417940
1793517941
1793617942 cat >>confdefs.h <<_ACEOF
1837718383 fi
1837818384 done
1837918385 # only in libev. (tested on 4.00)
18386 PC_LIBEVENT_DEPENDENCY="libevent"
18387
1838018388 if test -n "$BAK_LDFLAGS_SET"; then
1838118389 LDFLAGS="$BAK_LDFLAGS"
1838218390 fi
1895718965 fi
1895818966 done
1895918967
18960
18961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sbrk" >&5
18962 $as_echo_n "checking for sbrk... " >&6; }
18963 # catch the warning of deprecated sbrk
18964 old_cflags="$CFLAGS"
18965 CFLAGS="$CFLAGS -Werror"
18966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18967 /* end confdefs.h. */
18968 $ac_includes_default
18969
18970 int main(void) { void* cur = sbrk(0); printf("%u\n", (unsigned)(size_t)((char*)cur - (char*)sbrk(0))); return 0; }
18971
18972 _ACEOF
18973 if ac_fn_c_try_compile "$LINENO"; then :
18974
18975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18976 $as_echo "yes" >&6; }
18977
18978 $as_echo "#define HAVE_SBRK 1" >>confdefs.h
18979
18980
18981 else
18982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18983 $as_echo "no" >&6; }
18984 fi
18985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18986 CFLAGS="$old_cflags"
1898718968
1898818969 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
1898918970 if echo $build_os | grep darwin8 > /dev/null; then
1993819919
1993919920
1994019921
19941 version=1.5.10
19922 version=1.6.0
1994219923
1994319924 date=`date +'%b %e, %Y'`
1994419925
2045320434 # report actual input values of CONFIG_FILES etc. instead of their
2045420435 # values after options handling.
2045520436 ac_log="
20456 This file was extended by unbound $as_me 1.5.10, which was
20437 This file was extended by unbound $as_me 1.6.0, which was
2045720438 generated by GNU Autoconf 2.69. Invocation command line was
2045820439
2045920440 CONFIG_FILES = $CONFIG_FILES
2051920500 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2052020501 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
2052120502 ac_cs_version="\\
20522 unbound config.status 1.5.10
20503 unbound config.status 1.6.0
2052320504 configured by $0, generated by GNU Autoconf 2.69,
2052420505 with options \\"\$ac_cs_config\\"
2052520506
88
99 # must be numbers. ac_defun because of later processing
1010 m4_define([VERSION_MAJOR],[1])
11 m4_define([VERSION_MINOR],[5])
12 m4_define([VERSION_MICRO],[10])
11 m4_define([VERSION_MINOR],[6])
12 m4_define([VERSION_MICRO],[0])
1313 AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound)
1414 AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR])
1515 AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR])
1616 AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO])
1717
1818 LIBUNBOUND_CURRENT=6
19 LIBUNBOUND_REVISION=2
19 LIBUNBOUND_REVISION=3
2020 LIBUNBOUND_AGE=4
2121 # 1.0.0 had 0:12:0
2222 # 1.0.1 had 0:13:0
6666 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
6767 # 1.5.9 had 6:1:4
6868 # 1.5.10 had 6:2:4
69 # 1.6.0 had 6:3:4
6970
7071 # Current -- the number of the binary API that we're implementing
7172 # Revision -- which iteration of the implementation of the binary
542543 LIBS="$PYTHON_LDFLAGS $LIBS"
543544 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
544545 ub_have_python=yes
546 PC_PY_DEPENDENCY="python"
547 AC_SUBST(PC_PY_DEPENDENCY)
545548
546549 # Check for SWIG
547550 ub_have_swig=no
672675 AC_MSG_RESULT([no])
673676 fi
674677 AC_CHECK_HEADERS([openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h],,, [AC_INCLUDES_DEFAULT])
675 AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup])
678 AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1])
676679
677680 # these check_funcs need -lssl
678681 BAKLIBS="$LIBS"
679682 LIBS="-lssl $LIBS"
680 AC_CHECK_FUNCS([OPENSSL_init_ssl])
683 AC_CHECK_FUNCS([OPENSSL_init_ssl SSL_CTX_set_security_level])
681684 LIBS="$BAKLIBS"
682685
683686 AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free,SSL_CTX_set_ecdh_auto], [], [], [
863866
864867 AC_ARG_ENABLE(dsa, AC_HELP_STRING([--disable-dsa], [Disable DSA support]))
865868 use_dsa="no"
866 case "$enable_ecdsa" in
869 case "$enable_dsa" in
867870 no)
868871 ;;
869872 *)
870873 # detect if DSA is supported, and turn it off if not.
871 AC_CHECK_FUNC(EVP_dss1, [
874 AC_CHECK_FUNC(DSA_SIG_new, [
872875 AC_DEFINE_UNQUOTED([USE_DSA], [1], [Define this to enable DSA support.])
873876 ], [if test "x$enable_dsa" = "xyes"; then AC_MSG_ERROR([OpenSSL does not support DSA and you used --enable-dsa.])
874877 fi ])
9991002 AC_CHECK_FUNCS([event_base_get_method]) # only in libevent 1.4.3 and later
10001003 AC_CHECK_FUNCS([ev_loop]) # only in libev. (tested on 3.51)
10011004 AC_CHECK_FUNCS([ev_default_loop]) # only in libev. (tested on 4.00)
1005 PC_LIBEVENT_DEPENDENCY="libevent"
1006 AC_SUBST(PC_LIBEVENT_DEPENDENCY)
10021007 if test -n "$BAK_LDFLAGS_SET"; then
10031008 LDFLAGS="$BAK_LDFLAGS"
10041009 fi
11401145 AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync])
11411146 AC_CHECK_FUNCS([setresuid],,[AC_CHECK_FUNCS([setreuid])])
11421147 AC_CHECK_FUNCS([setresgid],,[AC_CHECK_FUNCS([setregid])])
1143
1144 AC_MSG_CHECKING([for sbrk])
1145 # catch the warning of deprecated sbrk
1146 old_cflags="$CFLAGS"
1147 CFLAGS="$CFLAGS -Werror"
1148 AC_COMPILE_IFELSE([AC_LANG_SOURCE(AC_INCLUDES_DEFAULT
1149 [[
1150 int main(void) { void* cur = sbrk(0); printf("%u\n", (unsigned)(size_t)((char*)cur - (char*)sbrk(0))); return 0; }
1151 ]])], [
1152 AC_MSG_RESULT(yes)
1153 AC_DEFINE(HAVE_SBRK, 1, [define if you have the sbrk() call])
1154 ], [AC_MSG_RESULT(no)])
1155 CFLAGS="$old_cflags"
11561148
11571149 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
11581150 if echo $build_os | grep darwin8 > /dev/null; then
66 Description: Library with validating, recursive, and caching DNS resolver
77 URL: http://www.unbound.net
88 Version: @PACKAGE_VERSION@
9 Requires:
10 Libs: -L${libdir} -lunbound @SSLLIB@ @LIBS@
11 Libs.private: @LDFLAGS@
9 Requires: libcrypto libssl @PC_LIBEVENT_DEPENDENCY@ @PC_PY_DEPENDENCY@
10 Libs: -L${libdir} -lunbound
11 Libs.private: @SSLLIB@ @LIBS@
1212 Cflags: -I${includedir}
149149 fi
150150 done
151151 # try to get it
152 echo $$ >$lock
152 if echo $$ >$lock ; then : ; else break; fi
153153 done
154154 # do not refetch if the file exists and only LEE seconds old
155155 if test -f $state; then
265265 echo "graph_args --base 1024 -l 0"
266266 echo "graph_vlabel memory used in bytes"
267267 echo "graph_category DNS"
268 p_config "mem.total.sbrk" "Total memory" "GAUGE"
269268 p_config "mem.cache.rrset" "RRset cache memory" "GAUGE"
270269 p_config "mem.cache.message" "Message cache memory" "GAUGE"
271270 p_config "mem.mod.iterator" "Iterator module memory" "GAUGE"
457456 done
458457 ;;
459458 memory)
460 mn=`echo mem.total.sbrk | sed $ABBREV | tr . _`
461 get_value 'mem.total.sbrk'
462 if test $value -eq 0; then
463 chk=`echo $ctrl | sed -e 's/-control$/-checkconf/'`
464 pidf=`$chk -o pidfile $conf 2>&1`
465 pid=`cat $pidf 2>&1`
466 value=`ps -p "$pid" -o rss= 2>&1`
467 if test "`expr $value + 1 - 1 2>&1`" -eq "$value" 2>&1; then
468 value=`expr $value \* 1024`
469 else
470 value=0
471 fi
472 fi
473 echo "$mn.value" $value
474459 for x in mem.cache.rrset mem.cache.message mem.mod.iterator \
475460 mem.mod.validator msg.cache.count rrset.cache.count \
476461 infra.cache.count key.cache.count; do
169169 return 1;
170170 }
171171
172 /** apply acl_view string */
173 static int
174 acl_list_view_cfg(struct acl_list* acl, const char* str, const char* str2,
175 struct views* vs)
176 {
177 struct acl_addr* node;
178 if(!(node=acl_find_or_create(acl, str)))
179 return 0;
180 node->view = views_find_view(vs, str2, 0 /* get read lock*/);
181 if(!node->view) {
182 log_err("no view with name: %s", str2);
183 return 0;
184 }
185 lock_rw_unlock(&node->view->lock);
186 return 1;
187 }
188
172189 /** apply acl_tag_action string */
173190 static int
174191 acl_list_tag_action_cfg(struct acl_list* acl, struct config_file* cfg,
209226
210227 /** check wire data parse */
211228 static int
212 check_data(const char* data)
229 check_data(const char* data, const struct config_strlist* head)
213230 {
214231 char buf[65536];
215232 uint8_t rr[LDNS_RR_BUF_SIZE];
216233 size_t len = sizeof(rr);
217234 int res;
218 snprintf(buf, sizeof(buf), "%s %s", "example.com.", data);
235 /* '.' is sufficient for validation, and it makes the call to
236 * sldns_wirerr_get_type() simpler below. */
237 snprintf(buf, sizeof(buf), "%s %s", ".", data);
219238 res = sldns_str2wire_rr_buf(buf, rr, &len, NULL, 3600, NULL, 0,
220239 NULL, 0);
240
241 /* Reject it if we would end up having CNAME and other data (including
242 * another CNAME) for the same tag. */
243 if(res == 0 && head) {
244 const char* err_data = NULL;
245
246 if(sldns_wirerr_get_type(rr, len, 1) == LDNS_RR_TYPE_CNAME) {
247 /* adding CNAME while other data already exists. */
248 err_data = data;
249 } else {
250 snprintf(buf, sizeof(buf), "%s %s", ".", head->str);
251 len = sizeof(rr);
252 res = sldns_str2wire_rr_buf(buf, rr, &len, NULL, 3600,
253 NULL, 0, NULL, 0);
254 if(res != 0) {
255 /* This should be impossible here as head->str
256 * has been validated, but we check it just in
257 * case. */
258 return 0;
259 }
260 if(sldns_wirerr_get_type(rr, len, 1) ==
261 LDNS_RR_TYPE_CNAME) /* already have CNAME */
262 err_data = head->str;
263 }
264 if(err_data) {
265 log_err("redirect tag data '%s' must not coexist with "
266 "other data.", err_data);
267 return 0;
268 }
269 }
221270 if(res == 0)
222271 return 1;
223272 log_err("rr data [char %d] parse error %s",
257306 }
258307
259308 /* check data? */
260 if(!check_data(data)) {
309 if(!check_data(data, node->tag_datas[tagid])) {
261310 log_err("cannot parse access-control-tag data: %s %s '%s'",
262311 str, tag, data);
263312 return 0;
299348 log_assert(p->str && p->str2);
300349 if(!acl_list_tags_cfg(acl, p->str, p->str2, p->str2len)) {
301350 config_del_strbytelist(p);
351 return 0;
352 }
353 /* free the items as we go to free up memory */
354 np = p->next;
355 free(p->str);
356 free(p->str2);
357 free(p);
358 p = np;
359 }
360 return 1;
361 }
362
363 /** read acl view config */
364 static int
365 read_acl_view(struct acl_list* acl, struct config_file* cfg, struct views* v)
366 {
367 struct config_str2list* np, *p = cfg->acl_view;
368 cfg->acl_view = NULL;
369 while(p) {
370 log_assert(p->str && p->str2);
371 if(!acl_list_view_cfg(acl, p->str, p->str2, v)) {
302372 return 0;
303373 }
304374 /* free the items as we go to free up memory */
361431 }
362432
363433 int
364 acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg)
434 acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg,
435 struct views* v)
365436 {
366437 regional_free_all(acl->region);
367438 addr_tree_init(&acl->tree);
368439 if(!read_acl_list(acl, cfg))
369440 return 0;
441 if(!read_acl_view(acl, cfg, v))
442 return 0;
370443 if(!read_acl_tags(acl, cfg))
371444 return 0;
372445 if(!read_acl_tag_actions(acl, cfg))
4242 #ifndef DAEMON_ACL_LIST_H
4343 #define DAEMON_ACL_LIST_H
4444 #include "util/storage/dnstree.h"
45 #include "services/view.h"
4546 struct config_file;
4647 struct regional;
4748
99100 struct config_strlist** tag_datas;
100101 /** size of the tag_datas array */
101102 size_t tag_datas_size;
103 /* view element, NULL if none */
104 struct view* view;
102105 };
103106
104107 /**
117120 * Process access control config.
118121 * @param acl: where to store.
119122 * @param cfg: config options.
123 * @param v: views structure
120124 * @return 0 on error.
121125 */
122 int acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg);
126 int acl_list_apply_cfg(struct acl_list* acl, struct config_file* cfg,
127 struct views* v);
123128
124129 /**
125130 * Lookup access control status for acl structure.
562562 qinfo->qclass = sldns_wirerr_get_class(rr, rr_len, dname_len);
563563 qinfo->qname_len = dname_len;
564564 qinfo->qname = (uint8_t*)regional_alloc_init(region, rr, dname_len);
565 qinfo->local_alias = NULL;
565566 if(!qinfo->qname) {
566567 log_warn("error out of memory");
567568 return NULL;
825826 qinfo.qname_len = nmlen;
826827 qinfo.qtype = LDNS_RR_TYPE_A;
827828 qinfo.qclass = LDNS_RR_CLASS_IN;
829 qinfo.local_alias = NULL;
828830
829831 dname_str(nm, b);
830832 if(!ssl_printf(ssl, "The following name servers are used for lookup "
7878 #include "services/cache/rrset.h"
7979 #include "services/cache/infra.h"
8080 #include "services/localzone.h"
81 #include "services/view.h"
8182 #include "services/modstack.h"
8283 #include "util/module.h"
8384 #include "util/random.h"
247248 free(daemon);
248249 return NULL;
249250 }
251 /* init edns_known_options */
252 if(!edns_known_options_init(daemon->env)) {
253 free(daemon->env);
254 free(daemon);
255 return NULL;
256 }
250257 alloc_init(&daemon->superalloc, NULL, 0);
251258 daemon->acl = acl_list_create();
252259 if(!daemon->acl) {
260 edns_known_options_delete(daemon->env);
253261 free(daemon->env);
254262 free(daemon);
255263 return NULL;
346354 daemon->env)) {
347355 fatal_exit("failed to setup modules");
348356 }
357 log_edns_known_options(VERB_ALGO, daemon->env);
349358 }
350359
351360 /**
541550 daemon_fork(struct daemon* daemon)
542551 {
543552 log_assert(daemon);
544 if(!acl_list_apply_cfg(daemon->acl, daemon->cfg))
553 if(!(daemon->views = views_create()))
554 fatal_exit("Could not create views: out of memory");
555 /* create individual views and their localzone/data trees */
556 if(!views_apply_cfg(daemon->views, daemon->cfg))
557 fatal_exit("Could not set up views");
558
559 if(!acl_list_apply_cfg(daemon->acl, daemon->cfg, daemon->views))
545560 fatal_exit("Could not setup access control list");
561 /* create global local_zones */
546562 if(!(daemon->local_zones = local_zones_create()))
547563 fatal_exit("Could not create local zones: out of memory");
548564 if(!local_zones_apply_cfg(daemon->local_zones, daemon->cfg))
604620 slabhash_clear(daemon->env->msg_cache);
605621 local_zones_delete(daemon->local_zones);
606622 daemon->local_zones = NULL;
623 views_delete(daemon->views);
624 daemon->views = NULL;
607625 /* key cache is cleared by module desetup during next daemon_fork() */
608626 daemon_remote_clear(daemon->rc);
609627 for(i=0; i<daemon->num; i++)
633651 slabhash_delete(daemon->env->msg_cache);
634652 rrset_cache_delete(daemon->env->rrset_cache);
635653 infra_delete(daemon->env->infra_cache);
654 edns_known_options_delete(daemon->env);
655 inplace_cb_lists_delete(daemon->env);
636656 }
637657 ub_randfree(daemon->rand);
638658 alloc_clear(&daemon->superalloc);
5252 struct rrset_cache;
5353 struct acl_list;
5454 struct local_zones;
55 struct views;
5556 struct ub_randstate;
5657 struct daemon_remote;
5758
110111 struct timeval time_last_stat;
111112 /** time when daemon started */
112113 struct timeval time_boot;
114 /** views structure containing view tree */
115 struct views* views;
113116 #ifdef USE_DNSTAP
114117 /** the dnstap environment master value, copied and changed by threads*/
115118 struct dt_env* dtenv;
145145 * the command : "openssl dhparam -C 2048"
146146 * (some openssl versions reject DH that is 'too small', eg. 512).
147147 */
148 #if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
148149 #ifndef S_SPLINT_S
149150 static DH *get_dh2048(void)
150151 {
202203 return NULL;
203204 }
204205 #endif /* SPLINT */
206 #endif /* OPENSSL_VERSION_NUMBER < 0x10100000 */
205207
206208 struct daemon_remote*
207209 daemon_remote_create(struct config_file* cfg)
242244
243245 if (cfg->remote_control_use_cert == 0) {
244246 /* No certificates are requested */
245 if(!SSL_CTX_set_cipher_list(rc->ctx, "aNULL")) {
247 #ifdef HAVE_SSL_CTX_SET_SECURITY_LEVEL
248 SSL_CTX_set_security_level(rc->ctx, 0);
249 #endif
250 if(!SSL_CTX_set_cipher_list(rc->ctx, "aNULL, eNULL")) {
246251 log_crypto_err("Failed to set aNULL cipher list");
247252 daemon_remote_delete(rc);
248253 return NULL;
249254 }
250255
256 /* in openssl 1.1, the securitylevel 0 allows eNULL, that
257 * does not need the DH */
258 #if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(HAVE_LIBRESSL)
251259 /* Since we have no certificates and hence no source of
252260 * DH params, let's generate and set them
253261 */
256264 daemon_remote_delete(rc);
257265 return NULL;
258266 }
267 #endif
259268 return rc;
260269 }
261270 rc->use_cert = 1;
759768 (unsigned long)s->svr.num_queries_missed_cache)) return 0;
760769 if(!ssl_printf(ssl, "%s.num.prefetch"SQ"%lu\n", nm,
761770 (unsigned long)s->svr.num_queries_prefetch)) return 0;
771 if(!ssl_printf(ssl, "%s.num.zero_ttl"SQ"%lu\n", nm,
772 (unsigned long)s->svr.zero_ttl_responses)) return 0;
762773 if(!ssl_printf(ssl, "%s.num.recursivereplies"SQ"%lu\n", nm,
763774 (unsigned long)s->mesh_replies_sent)) return 0;
764775 if(!ssl_printf(ssl, "%s.requestlist.avg"SQ"%g\n", nm,
817828 {
818829 int m;
819830 size_t msg, rrset, val, iter;
820 #ifdef HAVE_SBRK
821 extern void* unbound_start_brk;
822 void* cur = sbrk(0);
823 if(!print_longnum(ssl, "mem.total.sbrk"SQ,
824 (size_t)((char*)cur - (char*)unbound_start_brk))) return 0;
825 #endif /* HAVE_SBRK */
826831 msg = slabhash_get_mem(daemon->env->msg_cache);
827832 rrset = slabhash_get_mem(&daemon->env->rrset_cache->table);
828833 val=0;
11221127 }
11231128
11241129 /** Add a new zone */
1125 static void
1126 do_zone_add(SSL* ssl, struct worker* worker, char* arg)
1130 static int
1131 perform_zone_add(SSL* ssl, struct local_zones* zones, char* arg)
11271132 {
11281133 uint8_t* nm;
11291134 int nmlabs;
11321137 enum localzone_type t;
11331138 struct local_zone* z;
11341139 if(!find_arg2(ssl, arg, &arg2))
1135 return;
1140 return 0;
11361141 if(!parse_arg_name(ssl, arg, &nm, &nmlen, &nmlabs))
1137 return;
1142 return 0;
11381143 if(!local_zone_str2type(arg2, &t)) {
11391144 ssl_printf(ssl, "error not a zone type. %s\n", arg2);
11401145 free(nm);
1141 return;
1142 }
1143 lock_rw_wrlock(&worker->daemon->local_zones->lock);
1144 if((z=local_zones_find(worker->daemon->local_zones, nm, nmlen,
1146 return 0;
1147 }
1148 lock_rw_wrlock(&zones->lock);
1149 if((z=local_zones_find(zones, nm, nmlen,
11451150 nmlabs, LDNS_RR_CLASS_IN))) {
11461151 /* already present in tree */
11471152 lock_rw_wrlock(&z->lock);
11481153 z->type = t; /* update type anyway */
11491154 lock_rw_unlock(&z->lock);
11501155 free(nm);
1151 lock_rw_unlock(&worker->daemon->local_zones->lock);
1152 send_ok(ssl);
1153 return;
1154 }
1155 if(!local_zones_add_zone(worker->daemon->local_zones, nm, nmlen,
1156 lock_rw_unlock(&zones->lock);
1157 return 1;
1158 }
1159 if(!local_zones_add_zone(zones, nm, nmlen,
11561160 nmlabs, LDNS_RR_CLASS_IN, t)) {
1157 lock_rw_unlock(&worker->daemon->local_zones->lock);
1161 lock_rw_unlock(&zones->lock);
11581162 ssl_printf(ssl, "error out of memory\n");
1159 return;
1160 }
1161 lock_rw_unlock(&worker->daemon->local_zones->lock);
1163 return 0;
1164 }
1165 lock_rw_unlock(&zones->lock);
1166 return 1;
1167 }
1168
1169 /** Do the local_zone command */
1170 static void
1171 do_zone_add(SSL* ssl, struct local_zones* zones, char* arg)
1172 {
1173 if(!perform_zone_add(ssl, zones, arg))
1174 return;
11621175 send_ok(ssl);
11631176 }
11641177
1178 /** Do the local_zones command */
1179 static void
1180 do_zones_add(SSL* ssl, struct local_zones* zones)
1181 {
1182 char buf[2048];
1183 int num = 0;
1184 while(ssl_read_line(ssl, buf, sizeof(buf))) {
1185 if(buf[0] == 0x04 && buf[1] == 0)
1186 break; /* end of transmission */
1187 if(!perform_zone_add(ssl, zones, buf)) {
1188 if(!ssl_printf(ssl, "error for input line: %s\n", buf))
1189 return;
1190 }
1191 else
1192 num++;
1193 }
1194 (void)ssl_printf(ssl, "added %d zones\n", num);
1195 }
1196
11651197 /** Remove a zone */
1166 static void
1167 do_zone_remove(SSL* ssl, struct worker* worker, char* arg)
1198 static int
1199 perform_zone_remove(SSL* ssl, struct local_zones* zones, char* arg)
11681200 {
11691201 uint8_t* nm;
11701202 int nmlabs;
11711203 size_t nmlen;
11721204 struct local_zone* z;
11731205 if(!parse_arg_name(ssl, arg, &nm, &nmlen, &nmlabs))
1174 return;
1175 lock_rw_wrlock(&worker->daemon->local_zones->lock);
1176 if((z=local_zones_find(worker->daemon->local_zones, nm, nmlen,
1206 return 0;
1207 lock_rw_wrlock(&zones->lock);
1208 if((z=local_zones_find(zones, nm, nmlen,
11771209 nmlabs, LDNS_RR_CLASS_IN))) {
11781210 /* present in tree */
1179 local_zones_del_zone(worker->daemon->local_zones, z);
1180 }
1181 lock_rw_unlock(&worker->daemon->local_zones->lock);
1211 local_zones_del_zone(zones, z);
1212 }
1213 lock_rw_unlock(&zones->lock);
11821214 free(nm);
1215 return 1;
1216 }
1217
1218 /** Do the local_zone_remove command */
1219 static void
1220 do_zone_remove(SSL* ssl, struct local_zones* zones, char* arg)
1221 {
1222 if(!perform_zone_remove(ssl, zones, arg))
1223 return;
11831224 send_ok(ssl);
11841225 }
11851226
1227 /** Do the local_zones_remove command */
1228 static void
1229 do_zones_remove(SSL* ssl, struct local_zones* zones)
1230 {
1231 char buf[2048];
1232 int num = 0;
1233 while(ssl_read_line(ssl, buf, sizeof(buf))) {
1234 if(buf[0] == 0x04 && buf[1] == 0)
1235 break; /* end of transmission */
1236 if(!perform_zone_remove(ssl, zones, buf)) {
1237 if(!ssl_printf(ssl, "error for input line: %s\n", buf))
1238 return;
1239 }
1240 else
1241 num++;
1242 }
1243 (void)ssl_printf(ssl, "removed %d zones\n", num);
1244 }
1245
11861246 /** Add new RR data */
1187 static void
1188 do_data_add(SSL* ssl, struct worker* worker, char* arg)
1189 {
1190 if(!local_zones_add_RR(worker->daemon->local_zones, arg)) {
1247 static int
1248 perform_data_add(SSL* ssl, struct local_zones* zones, char* arg)
1249 {
1250 if(!local_zones_add_RR(zones, arg)) {
11911251 ssl_printf(ssl,"error in syntax or out of memory, %s\n", arg);
1192 return;
1193 }
1252 return 0;
1253 }
1254 return 1;
1255 }
1256
1257 /** Do the local_data command */
1258 static void
1259 do_data_add(SSL* ssl, struct local_zones* zones, char* arg)
1260 {
1261 if(!perform_data_add(ssl, zones, arg))
1262 return;
11941263 send_ok(ssl);
11951264 }
11961265
1266 /** Do the local_datas command */
1267 static void
1268 do_datas_add(SSL* ssl, struct local_zones* zones)
1269 {
1270 char buf[2048];
1271 int num = 0;
1272 while(ssl_read_line(ssl, buf, sizeof(buf))) {
1273 if(buf[0] == 0x04 && buf[1] == 0)
1274 break; /* end of transmission */
1275 if(!perform_data_add(ssl, zones, buf)) {
1276 if(!ssl_printf(ssl, "error for input line: %s\n", buf))
1277 return;
1278 }
1279 else
1280 num++;
1281 }
1282 (void)ssl_printf(ssl, "added %d datas\n", num);
1283 }
1284
11971285 /** Remove RR data */
1198 static void
1199 do_data_remove(SSL* ssl, struct worker* worker, char* arg)
1286 static int
1287 perform_data_remove(SSL* ssl, struct local_zones* zones, char* arg)
12001288 {
12011289 uint8_t* nm;
12021290 int nmlabs;
12031291 size_t nmlen;
12041292 if(!parse_arg_name(ssl, arg, &nm, &nmlen, &nmlabs))
1205 return;
1206 local_zones_del_data(worker->daemon->local_zones, nm,
1293 return 0;
1294 local_zones_del_data(zones, nm,
12071295 nmlen, nmlabs, LDNS_RR_CLASS_IN);
12081296 free(nm);
1297 return 1;
1298 }
1299
1300 /** Do the local_data_remove command */
1301 static void
1302 do_data_remove(SSL* ssl, struct local_zones* zones, char* arg)
1303 {
1304 if(!perform_data_remove(ssl, zones, arg))
1305 return;
12091306 send_ok(ssl);
1307 }
1308
1309 /** Do the local_datas_remove command */
1310 static void
1311 do_datas_remove(SSL* ssl, struct local_zones* zones)
1312 {
1313 char buf[2048];
1314 int num = 0;
1315 while(ssl_read_line(ssl, buf, sizeof(buf))) {
1316 if(buf[0] == 0x04 && buf[1] == 0)
1317 break; /* end of transmission */
1318 if(!perform_data_remove(ssl, zones, buf)) {
1319 if(!ssl_printf(ssl, "error for input line: %s\n", buf))
1320 return;
1321 }
1322 else
1323 num++;
1324 }
1325 (void)ssl_printf(ssl, "removed %d datas\n", num);
1326 }
1327
1328 /** Add a new zone to view */
1329 static void
1330 do_view_zone_add(SSL* ssl, struct worker* worker, char* arg)
1331 {
1332 char* arg2;
1333 struct view* v;
1334 if(!find_arg2(ssl, arg, &arg2))
1335 return;
1336 v = views_find_view(worker->daemon->views,
1337 arg, 1 /* get write lock*/);
1338 if(!v) {
1339 ssl_printf(ssl,"no view with name: %s\n", arg);
1340 return;
1341 }
1342 do_zone_add(ssl, v->local_zones, arg2);
1343 lock_rw_unlock(&v->lock);
1344 }
1345
1346 /** Remove a zone from view */
1347 static void
1348 do_view_zone_remove(SSL* ssl, struct worker* worker, char* arg)
1349 {
1350 char* arg2;
1351 struct view* v;
1352 if(!find_arg2(ssl, arg, &arg2))
1353 return;
1354 v = views_find_view(worker->daemon->views,
1355 arg, 1 /* get write lock*/);
1356 if(!v) {
1357 ssl_printf(ssl,"no view with name: %s\n", arg);
1358 return;
1359 }
1360 do_zone_remove(ssl, v->local_zones, arg2);
1361 lock_rw_unlock(&v->lock);
1362 }
1363
1364 /** Add new RR data to view */
1365 static void
1366 do_view_data_add(SSL* ssl, struct worker* worker, char* arg)
1367 {
1368 char* arg2;
1369 struct view* v;
1370 if(!find_arg2(ssl, arg, &arg2))
1371 return;
1372 v = views_find_view(worker->daemon->views,
1373 arg, 1 /* get write lock*/);
1374 if(!v) {
1375 ssl_printf(ssl,"no view with name: %s\n", arg);
1376 return;
1377 }
1378 do_data_add(ssl, v->local_zones, arg2);
1379 lock_rw_unlock(&v->lock);
1380 }
1381
1382 /** Remove RR data from view */
1383 static void
1384 do_view_data_remove(SSL* ssl, struct worker* worker, char* arg)
1385 {
1386 char* arg2;
1387 struct view* v;
1388 if(!find_arg2(ssl, arg, &arg2))
1389 return;
1390 v = views_find_view(worker->daemon->views,
1391 arg, 1 /* get write lock*/);
1392 if(!v) {
1393 ssl_printf(ssl,"no view with name: %s\n", arg);
1394 return;
1395 }
1396 do_data_remove(ssl, v->local_zones, arg2);
1397 lock_rw_unlock(&v->lock);
12101398 }
12111399
12121400 /** cache lookup of nameservers */
12371425 k.qname_len = nmlen;
12381426 k.qtype = t;
12391427 k.qclass = c;
1428 k.local_alias = NULL;
12401429 h = query_info_hash(&k, 0);
12411430 slabhash_remove(worker->env.msg_cache, h, &k);
12421431 if(t == LDNS_RR_TYPE_AAAA) {
21822371 (void)ssl_printf(ssl, "error setting option\n");
21832372 return;
21842373 }
2374 /* effectuate some arguments */
2375 if(strcmp(arg, "val-override-date:") == 0) {
2376 int m = modstack_find(&worker->env.mesh->mods, "validator");
2377 struct val_env* val_env = NULL;
2378 if(m != -1) val_env = (struct val_env*)worker->env.modinfo[m];
2379 if(val_env)
2380 val_env->date_override = worker->env.cfg->val_date_override;
2381 }
21852382 send_ok(ssl);
21862383 }
21872384
22622459
22632460 /** do the list_local_zones command */
22642461 static void
2265 do_list_local_zones(SSL* ssl, struct worker* worker)
2266 {
2267 struct local_zones* zones = worker->daemon->local_zones;
2462 do_list_local_zones(SSL* ssl, struct local_zones* zones)
2463 {
22682464 struct local_zone* z;
22692465 char buf[257];
22702466 lock_rw_rdlock(&zones->lock);
22852481
22862482 /** do the list_local_data command */
22872483 static void
2288 do_list_local_data(SSL* ssl, struct worker* worker)
2289 {
2290 struct local_zones* zones = worker->daemon->local_zones;
2484 do_list_local_data(SSL* ssl, struct worker* worker, struct local_zones* zones)
2485 {
22912486 struct local_zone* z;
22922487 struct local_data* d;
22932488 struct local_rrset* p;
23232518 lock_rw_unlock(&zones->lock);
23242519 }
23252520
2521 /** do the view_list_local_zones command */
2522 static void
2523 do_view_list_local_zones(SSL* ssl, struct worker* worker, char* arg)
2524 {
2525 struct view* v = views_find_view(worker->daemon->views,
2526 arg, 0 /* get read lock*/);
2527 if(!v) {
2528 ssl_printf(ssl,"no view with name: %s\n", arg);
2529 return;
2530 }
2531 do_list_local_zones(ssl, v->local_zones);
2532 lock_rw_unlock(&v->lock);
2533 }
2534
2535 /** do the view_list_local_data command */
2536 static void
2537 do_view_list_local_data(SSL* ssl, struct worker* worker, char* arg)
2538 {
2539 struct view* v = views_find_view(worker->daemon->views,
2540 arg, 0 /* get read lock*/);
2541 if(!v) {
2542 ssl_printf(ssl,"no view with name: %s\n", arg);
2543 return;
2544 }
2545 do_list_local_data(ssl, worker, v->local_zones);
2546 lock_rw_unlock(&v->lock);
2547 }
2548
23262549 /** struct for user arg ratelimit list */
23272550 struct ratelimit_list_arg {
23282551 /** the infra cache */
24352658 do_insecure_list(ssl, worker);
24362659 return;
24372660 } else if(cmdcmp(p, "list_local_zones", 16)) {
2438 do_list_local_zones(ssl, worker);
2661 do_list_local_zones(ssl, worker->daemon->local_zones);
24392662 return;
24402663 } else if(cmdcmp(p, "list_local_data", 15)) {
2441 do_list_local_data(ssl, worker);
2664 do_list_local_data(ssl, worker, worker->daemon->local_zones);
2665 return;
2666 } else if(cmdcmp(p, "view_list_local_zones", 21)) {
2667 do_view_list_local_zones(ssl, worker, skipwhite(p+21));
2668 return;
2669 } else if(cmdcmp(p, "view_list_local_data", 20)) {
2670 do_view_list_local_data(ssl, worker, skipwhite(p+20));
24422671 return;
24432672 } else if(cmdcmp(p, "ratelimit_list", 14)) {
24442673 do_ratelimit_list(ssl, worker, p+14);
25042733 if(cmdcmp(p, "verbosity", 9)) {
25052734 do_verbosity(ssl, skipwhite(p+9));
25062735 } else if(cmdcmp(p, "local_zone_remove", 17)) {
2507 do_zone_remove(ssl, worker, skipwhite(p+17));
2736 do_zone_remove(ssl, worker->daemon->local_zones, skipwhite(p+17));
2737 } else if(cmdcmp(p, "local_zones_remove", 18)) {
2738 do_zones_remove(ssl, worker->daemon->local_zones);
25082739 } else if(cmdcmp(p, "local_zone", 10)) {
2509 do_zone_add(ssl, worker, skipwhite(p+10));
2740 do_zone_add(ssl, worker->daemon->local_zones, skipwhite(p+10));
2741 } else if(cmdcmp(p, "local_zones", 11)) {
2742 do_zones_add(ssl, worker->daemon->local_zones);
25102743 } else if(cmdcmp(p, "local_data_remove", 17)) {
2511 do_data_remove(ssl, worker, skipwhite(p+17));
2744 do_data_remove(ssl, worker->daemon->local_zones, skipwhite(p+17));
2745 } else if(cmdcmp(p, "local_datas_remove", 18)) {
2746 do_datas_remove(ssl, worker->daemon->local_zones);
25122747 } else if(cmdcmp(p, "local_data", 10)) {
2513 do_data_add(ssl, worker, skipwhite(p+10));
2748 do_data_add(ssl, worker->daemon->local_zones, skipwhite(p+10));
2749 } else if(cmdcmp(p, "local_datas", 11)) {
2750 do_datas_add(ssl, worker->daemon->local_zones);
2751 } else if(cmdcmp(p, "view_local_zone_remove", 22)) {
2752 do_view_zone_remove(ssl, worker, skipwhite(p+22));
2753 } else if(cmdcmp(p, "view_local_zone", 15)) {
2754 do_view_zone_add(ssl, worker, skipwhite(p+15));
2755 } else if(cmdcmp(p, "view_local_data_remove", 22)) {
2756 do_view_data_remove(ssl, worker, skipwhite(p+22));
2757 } else if(cmdcmp(p, "view_local_data", 15)) {
2758 do_view_data_add(ssl, worker, skipwhite(p+15));
25142759 } else if(cmdcmp(p, "flush_zone", 10)) {
25152760 do_flush_zone(ssl, worker, skipwhite(p+10));
25162761 } else if(cmdcmp(p, "flush_type", 10)) {
250250 total->svr.qEDNS += a->svr.qEDNS;
251251 total->svr.qEDNS_DO += a->svr.qEDNS_DO;
252252 total->svr.ans_rcode_nodata += a->svr.ans_rcode_nodata;
253 total->svr.zero_ttl_responses += a->svr.zero_ttl_responses;
253254 total->svr.ans_secure += a->svr.ans_secure;
254255 total->svr.ans_bogus += a->svr.ans_bogus;
255256 total->svr.rrset_bogus += a->svr.rrset_bogus;
130130 size_t unwanted_queries;
131131 /** usage of tcp accept list */
132132 size_t tcp_accept_usage;
133
133 /** answers served from expired cache */
134 size_t zero_ttl_responses;
134135 /** histogram data exported to array
135136 * if the array is the same size, no data is lost, and
136137 * if all histograms are same size (is so by default) then
8686 # include "nss.h"
8787 #endif
8888
89 #ifdef HAVE_SBRK
90 /** global debug value to keep track of heap memory allocation */
91 void* unbound_start_brk = 0;
92 #endif
93
9489 /** print usage. */
9590 static void usage(void)
9691 {
243238 #endif /* S_SPLINT_S */
244239 }
245240
241 /** set default logfile identity based on value from argv[0] at startup **/
242 static void
243 log_ident_set_fromdefault(struct config_file* cfg,
244 const char *log_default_identity)
245 {
246 if(cfg->log_identity == NULL || cfg->log_identity[0] == 0)
247 log_ident_set(log_default_identity);
248 else
249 log_ident_set(cfg->log_identity);
250 }
251
246252 /** set verbosity, check rlimits, cache settings */
247253 static void
248254 apply_settings(struct daemon* daemon, struct config_file* cfg,
249 int cmdline_verbose, int debug_mode)
255 int cmdline_verbose, int debug_mode, const char* log_default_identity)
250256 {
251257 /* apply if they have changed */
252258 verbosity = cmdline_verbose + cfg->verbosity;
253259 if (debug_mode > 1) {
254260 cfg->use_syslog = 0;
261 free(cfg->logfile);
255262 cfg->logfile = NULL;
256263 }
257264 daemon_apply_cfg(daemon, cfg);
258265 checkrlimits(cfg);
266 log_ident_set_fromdefault(cfg, log_default_identity);
259267 }
260268
261269 #ifdef HAVE_KILL
585593 * @param cmdline_verbose: verbosity resulting from commandline -v.
586594 * These increase verbosity as specified in the config file.
587595 * @param debug_mode: if set, do not daemonize.
596 * @param log_default_identity: Default identity to report in logs
588597 */
589598 static void
590 run_daemon(const char* cfgfile, int cmdline_verbose, int debug_mode)
599 run_daemon(const char* cfgfile, int cmdline_verbose, int debug_mode, const char* log_default_identity)
591600 {
592601 struct config_file* cfg = NULL;
593602 struct daemon* daemon = NULL;
609618 cfgfile);
610619 log_warn("Continuing with default config settings");
611620 }
612 apply_settings(daemon, cfg, cmdline_verbose, debug_mode);
621 apply_settings(daemon, cfg, cmdline_verbose, debug_mode, log_default_identity);
613622 if(!done_setup)
614623 config_lookup_uid(cfg);
615624
617626 if(!daemon_open_shared_ports(daemon))
618627 fatal_exit("could not open ports");
619628 if(!done_setup) {
620 perform_setup(daemon, cfg, debug_mode, &cfgfile);
629 perform_setup(daemon, cfg, debug_mode, &cfgfile);
621630 done_setup = 1;
622631 } else {
623632 /* reopen log after HUP to facilitate log rotation */
664673 int c;
665674 const char* cfgfile = CONFIGFILE;
666675 const char* winopt = NULL;
676 const char* log_ident_default;
667677 int cmdline_verbose = 0;
668678 int debug_mode = 0;
669679 #ifdef UB_ON_WINDOWS
670680 int cmdline_cfg = 0;
671681 #endif
672682
673 #ifdef HAVE_SBRK
674 /* take debug snapshot of heap */
675 unbound_start_brk = sbrk(0);
676 #endif
677
678683 log_init(NULL, 0, NULL);
679 log_ident_set(strrchr(argv[0],'/')?strrchr(argv[0],'/')+1:argv[0]);
684 log_ident_default = strrchr(argv[0],'/')?strrchr(argv[0],'/')+1:argv[0];
685 log_ident_set(log_ident_default);
680686 /* parse the options */
681687 while( (c=getopt(argc, argv, "c:dhvw:")) != -1) {
682688 switch(c) {
720726 return 1;
721727 }
722728
723 run_daemon(cfgfile, cmdline_verbose, debug_mode);
729 run_daemon(cfgfile, cmdline_verbose, debug_mode, log_ident_default);
724730 log_init(NULL, 0, NULL); /* close logfile */
725731 return 0;
726732 }
100100 */
101101 #define PREFETCH_EXPIRY_ADD 60
102102
103 #ifdef UNBOUND_ALLOC_STATS
104 /** measure memory leakage */
105 static void
106 debug_memleak(size_t accounted, size_t heap,
107 size_t total_alloc, size_t total_free)
108 {
109 static int init = 0;
110 static size_t base_heap, base_accounted, base_alloc, base_free;
111 size_t base_af, cur_af, grow_af, grow_acc;
112 if(!init) {
113 init = 1;
114 base_heap = heap;
115 base_accounted = accounted;
116 base_alloc = total_alloc;
117 base_free = total_free;
118 }
119 base_af = base_alloc - base_free;
120 cur_af = total_alloc - total_free;
121 grow_af = cur_af - base_af;
122 grow_acc = accounted - base_accounted;
123 log_info("Leakage: %d leaked. growth: %u use, %u acc, %u heap",
124 (int)(grow_af - grow_acc), (unsigned)grow_af,
125 (unsigned)grow_acc, (unsigned)(heap - base_heap));
126 }
127
128 /** give debug heap size indication */
129 static void
130 debug_total_mem(size_t calctotal)
131 {
132 #ifdef HAVE_SBRK
133 extern void* unbound_start_brk;
134 extern size_t unbound_mem_alloc, unbound_mem_freed;
135 void* cur = sbrk(0);
136 int total = cur-unbound_start_brk;
137 log_info("Total heap memory estimate: %u total-alloc: %u "
138 "total-free: %u", (unsigned)total,
139 (unsigned)unbound_mem_alloc, (unsigned)unbound_mem_freed);
140 debug_memleak(calctotal, (size_t)total,
141 unbound_mem_alloc, unbound_mem_freed);
142 #else
143 (void)calctotal;
144 #endif /* HAVE_SBRK */
145 }
146 #endif /* UNBOUND_ALLOC_STATS */
147
148103 /** Report on memory usage by this thread and global */
149104 static void
150105 worker_mem_report(struct worker* ATTR_UNUSED(worker),
151106 struct serviced_query* ATTR_UNUSED(cur_serv))
152107 {
153108 #ifdef UNBOUND_ALLOC_STATS
109 /* measure memory leakage */
110 extern size_t unbound_mem_alloc, unbound_mem_freed;
154111 /* debug func in validator module */
155112 size_t total, front, back, mesh, msg, rrset, infra, ac, superac;
156113 size_t me, iter, val, anch;
198155 (unsigned)mesh, (unsigned)msg, (unsigned)rrset,
199156 (unsigned)infra, (unsigned)iter, (unsigned)val, (unsigned)anch,
200157 (unsigned)ac, (unsigned)superac, (unsigned)me);
201 debug_total_mem(total);
158 log_info("Total heap memory estimate: %u total-alloc: %u "
159 "total-free: %u", (unsigned)total,
160 (unsigned)unbound_mem_alloc, (unsigned)unbound_mem_freed);
202161 #else /* no UNBOUND_ALLOC_STATS */
203162 size_t val = 0;
204163 int i;
484443 if(!dp) { /* no delegation, need to reprime */
485444 return 0;
486445 }
446 /* In case we have a local alias, copy it into the delegation message.
447 * Shallow copy should be fine, as we'll be done with msg in this
448 * function. */
449 msg->qinfo.local_alias = qinfo->local_alias;
487450 if(must_validate) {
488451 switch(check_delegation_secure(msg->rep)) {
489452 case sec_status_unchecked:
496459 edns->udp_size = EDNS_ADVERTISED_SIZE;
497460 edns->ext_rcode = 0;
498461 edns->bits &= EDNS_DO;
499 if(!edns_opt_inplace_reply(edns, worker->scratchpad))
500 return 0;
462 if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL,
463 msg->rep, LDNS_RCODE_SERVFAIL, edns, worker->scratchpad))
464 return 0;
501465 error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
502466 &msg->qinfo, id, flags, edns);
503467 if(worker->stats.extended) {
525489 edns->udp_size = EDNS_ADVERTISED_SIZE;
526490 edns->ext_rcode = 0;
527491 edns->bits &= EDNS_DO;
528 if(!edns_opt_inplace_reply(edns, worker->scratchpad))
529 return 0;
492 if(!inplace_cb_reply_cache_call(&worker->env, qinfo, NULL, msg->rep,
493 (int)(flags&LDNS_RCODE_MASK), edns, worker->scratchpad))
494 return 0;
530495 msg->rep->flags |= BIT_QR|BIT_RA;
531496 if(!reply_info_answer_encode(&msg->qinfo, msg->rep, id, flags,
532497 repinfo->c->buffer, 0, 1, worker->scratchpad,
533498 udpsize, edns, (int)(edns->bits & EDNS_DO), secure)) {
499 if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, NULL,
500 LDNS_RCODE_SERVFAIL, edns, worker->scratchpad))
501 edns->opt_list = NULL;
534502 error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
535503 &msg->qinfo, id, flags, edns);
536504 }
552520 int secure;
553521 int must_validate = (!(flags&BIT_CD) || worker->env.cfg->ignore_cd)
554522 && worker->env.need_to_validate;
555 /* see if it is possible */
556 if(rep->ttl < timenow) {
557 /* the rrsets may have been updated in the meantime.
558 * we will refetch the message format from the
559 * authoritative server
560 */
561 return 0;
562 }
563 if(!rrset_array_lock(rep->ref, rep->rrset_count, timenow))
564 return 0;
565 /* locked and ids and ttls are OK. */
523 if(worker->env.cfg->serve_expired) {
524 /* always lock rrsets, rep->ttl is ignored */
525 if(!rrset_array_lock(rep->ref, rep->rrset_count, 0))
526 return 0;
527 /* below, rrsets with ttl before timenow become TTL 0 in
528 * the response */
529 /* This response was served with zero TTL */
530 if (timenow >= rep->ttl) {
531 worker->stats.zero_ttl_responses++;
532 }
533 } else {
534 /* see if it is possible */
535 if(rep->ttl < timenow) {
536 /* the rrsets may have been updated in the meantime.
537 * we will refetch the message format from the
538 * authoritative server
539 */
540 return 0;
541 }
542 if(!rrset_array_lock(rep->ref, rep->rrset_count, timenow))
543 return 0;
544 /* locked and ids and ttls are OK. */
545 }
566546 /* check CNAME chain (if any) */
567547 if(rep->an_numrrsets > 0 && (rep->rrsets[0]->rk.type ==
568548 htons(LDNS_RR_TYPE_CNAME) || rep->rrsets[0]->rk.type ==
583563 edns->udp_size = EDNS_ADVERTISED_SIZE;
584564 edns->ext_rcode = 0;
585565 edns->bits &= EDNS_DO;
586 if(!edns_opt_inplace_reply(edns, worker->scratchpad))
587 return 0;
566 if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, rep,
567 LDNS_RCODE_SERVFAIL, edns, worker->scratchpad))
568 return 0;
588569 error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
589570 qinfo, id, flags, edns);
590571 rrset_array_unlock_touch(worker->env.rrset_cache,
615596 edns->udp_size = EDNS_ADVERTISED_SIZE;
616597 edns->ext_rcode = 0;
617598 edns->bits &= EDNS_DO;
618 if(!edns_opt_inplace_reply(edns, worker->scratchpad))
619 return 0;
599 if(!inplace_cb_reply_cache_call(&worker->env, qinfo, NULL, rep,
600 (int)(flags&LDNS_RCODE_MASK), edns, worker->scratchpad))
601 return 0;
620602 if(!reply_info_answer_encode(qinfo, rep, id, flags,
621603 repinfo->c->buffer, timenow, 1, worker->scratchpad,
622604 udpsize, edns, (int)(edns->bits & EDNS_DO), secure)) {
605 if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, NULL,
606 LDNS_RCODE_SERVFAIL, edns, worker->scratchpad))
607 edns->opt_list = NULL;
623608 error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
624609 qinfo, id, flags, edns);
625610 }
691676 edns->edns_version = EDNS_ADVERTISED_VERSION;
692677 edns->udp_size = EDNS_ADVERTISED_SIZE;
693678 edns->bits &= EDNS_DO;
694 if(!edns_opt_inplace_reply(edns, worker->scratchpad))
695 edns->opt_list = NULL;
679 if(!inplace_cb_reply_local_call(&worker->env, NULL, NULL, NULL,
680 LDNS_RCODE_NOERROR, edns, worker->scratchpad))
681 edns->opt_list = NULL;
696682 attach_edns_record(pkt, edns);
697683 }
698684
943929 regional_free_all(worker->scratchpad);
944930 goto send_reply;
945931 }
946 if(local_zones_answer(worker->daemon->local_zones, &qinfo, &edns,
947 c->buffer, worker->scratchpad, repinfo,
948 acladdr->taglist, acladdr->taglen, acladdr->tag_actions,
932 if(local_zones_answer(worker->daemon->local_zones, &worker->env, &qinfo,
933 &edns, c->buffer, worker->scratchpad, repinfo, acladdr->taglist,
934 acladdr->taglen, acladdr->tag_actions,
949935 acladdr->tag_actions_size, acladdr->tag_datas,
950936 acladdr->tag_datas_size, worker->daemon->cfg->tagname,
951 worker->daemon->cfg->num_tags)) {
937 worker->daemon->cfg->num_tags, acladdr->view)) {
952938 regional_free_all(worker->scratchpad);
953939 if(sldns_buffer_limit(c->buffer) == 0) {
954940 comm_point_drop_reply(repinfo);
985971 &repinfo->addr, repinfo->addrlen);
986972 goto send_reply;
987973 }
988 h = query_info_hash(&qinfo, sldns_buffer_read_u16_at(c->buffer, 2));
989 if((e=slabhash_lookup(worker->env.msg_cache, h, &qinfo, 0))) {
990 /* answer from cache - we have acquired a readlock on it */
991 if(answer_from_cache(worker, &qinfo,
992 (struct reply_info*)e->data,
993 *(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
994 sldns_buffer_read_u16_at(c->buffer, 2), repinfo,
995 &edns)) {
996 /* prefetch it if the prefetch TTL expired */
997 if(worker->env.cfg->prefetch && *worker->env.now >=
998 ((struct reply_info*)e->data)->prefetch_ttl) {
999 time_t leeway = ((struct reply_info*)e->
1000 data)->ttl - *worker->env.now;
974
975 /* If we've found a local alias, replace the qname with the alias
976 * target before resolving it. */
977 if(qinfo.local_alias) {
978 struct ub_packed_rrset_key* rrset = qinfo.local_alias->rrset;
979 struct packed_rrset_data* d = rrset->entry.data;
980
981 /* Sanity check: our current implementation only supports
982 * a single CNAME RRset as a local alias. */
983 if(qinfo.local_alias->next ||
984 rrset->rk.type != htons(LDNS_RR_TYPE_CNAME) ||
985 d->count != 1) {
986 log_err("assumption failure: unexpected local alias");
987 regional_free_all(worker->scratchpad);
988 return 0; /* drop it */
989 }
990 qinfo.qname = d->rr_data[0] + 2;
991 qinfo.qname_len = d->rr_len[0] - 2;
992 }
993
994 if(!edns_bypass_cache_stage(edns.opt_list, &worker->env)) {
995 h = query_info_hash(&qinfo, sldns_buffer_read_u16_at(c->buffer, 2));
996 if((e=slabhash_lookup(worker->env.msg_cache, h, &qinfo, 0))) {
997 /* answer from cache - we have acquired a readlock on it */
998 if(answer_from_cache(worker, &qinfo,
999 (struct reply_info*)e->data,
1000 *(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
1001 sldns_buffer_read_u16_at(c->buffer, 2), repinfo,
1002 &edns)) {
1003 /* prefetch it if the prefetch TTL expired */
1004 if((worker->env.cfg->prefetch || worker->env.cfg->serve_expired)
1005 && *worker->env.now >=
1006 ((struct reply_info*)e->data)->prefetch_ttl) {
1007 time_t leeway = ((struct reply_info*)e->
1008 data)->ttl - *worker->env.now;
1009 if(((struct reply_info*)e->data)->ttl
1010 < *worker->env.now)
1011 leeway = 0;
1012 lock_rw_unlock(&e->lock);
1013 reply_and_prefetch(worker, &qinfo,
1014 sldns_buffer_read_u16_at(c->buffer, 2),
1015 repinfo, leeway);
1016 rc = 0;
1017 regional_free_all(worker->scratchpad);
1018 goto send_reply_rc;
1019 }
10011020 lock_rw_unlock(&e->lock);
1002 reply_and_prefetch(worker, &qinfo,
1003 sldns_buffer_read_u16_at(c->buffer, 2),
1004 repinfo, leeway);
1005 rc = 0;
10061021 regional_free_all(worker->scratchpad);
1007 goto send_reply_rc;
1022 goto send_reply;
10081023 }
1024 verbose(VERB_ALGO, "answer from the cache failed");
10091025 lock_rw_unlock(&e->lock);
1010 regional_free_all(worker->scratchpad);
1011 goto send_reply;
1012 }
1013 verbose(VERB_ALGO, "answer from the cache failed");
1014 lock_rw_unlock(&e->lock);
1015 }
1016 if(!LDNS_RD_WIRE(sldns_buffer_begin(c->buffer))) {
1017 if(answer_norec_from_cache(worker, &qinfo,
1018 *(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
1019 sldns_buffer_read_u16_at(c->buffer, 2), repinfo,
1020 &edns)) {
1021 regional_free_all(worker->scratchpad);
1022 goto send_reply;
1023 }
1024 verbose(VERB_ALGO, "answer norec from cache -- "
1025 "need to validate or not primed");
1026 }
1027 if(!LDNS_RD_WIRE(sldns_buffer_begin(c->buffer))) {
1028 if(answer_norec_from_cache(worker, &qinfo,
1029 *(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
1030 sldns_buffer_read_u16_at(c->buffer, 2), repinfo,
1031 &edns)) {
1032 regional_free_all(worker->scratchpad);
1033 goto send_reply;
1034 }
1035 verbose(VERB_ALGO, "answer norec from cache -- "
1036 "need to validate or not primed");
1037 }
10261038 }
10271039 sldns_buffer_rewind(c->buffer);
10281040 server_stats_querymiss(&worker->stats, worker);
13761388 }
13771389
13781390 struct outbound_entry*
1379 worker_send_query(uint8_t* qname, size_t qnamelen, uint16_t qtype,
1380 uint16_t qclass, uint16_t flags, int dnssec, int want_dnssec,
1381 int nocaps, struct edns_option* opt_list,
1382 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone,
1383 size_t zonelen, struct module_qstate* q)
1391 worker_send_query(struct query_info* qinfo, uint16_t flags, int dnssec,
1392 int want_dnssec, int nocaps, struct sockaddr_storage* addr,
1393 socklen_t addrlen, uint8_t* zone, size_t zonelen, int ssl_upstream,
1394 struct module_qstate* q)
13841395 {
13851396 struct worker* worker = q->env->worker;
13861397 struct outbound_entry* e = (struct outbound_entry*)regional_alloc(
13881399 if(!e)
13891400 return NULL;
13901401 e->qstate = q;
1391 e->qsent = outnet_serviced_query(worker->back, qname,
1392 qnamelen, qtype, qclass, flags, dnssec, want_dnssec, nocaps,
1393 q->env->cfg->tcp_upstream, q->env->cfg->ssl_upstream, opt_list,
1394 addr, addrlen, zone, zonelen, worker_handle_service_reply, e,
1395 worker->back->udp_buff);
1402 e->qsent = outnet_serviced_query(worker->back, qinfo, flags, dnssec,
1403 want_dnssec, nocaps, q->env->cfg->tcp_upstream,
1404 ssl_upstream, addr, addrlen, zone, zonelen, q,
1405 worker_handle_service_reply, e, worker->back->udp_buff, q->env);
13961406 if(!e->qsent) {
13971407 return NULL;
13981408 }
14321442 }
14331443
14341444 /* --- fake callbacks for fptr_wlist to work --- */
1435 struct outbound_entry* libworker_send_query(uint8_t* ATTR_UNUSED(qname),
1436 size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype),
1437 uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags),
1438 int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec),
1439 int ATTR_UNUSED(nocaps), struct edns_option* ATTR_UNUSED(opt_list),
1440 struct sockaddr_storage* ATTR_UNUSED(addr),
1441 socklen_t ATTR_UNUSED(addrlen), uint8_t* ATTR_UNUSED(zone),
1442 size_t ATTR_UNUSED(zonelen), struct module_qstate* ATTR_UNUSED(q))
1445 struct outbound_entry* libworker_send_query(
1446 struct query_info* ATTR_UNUSED(qinfo),
1447 uint16_t ATTR_UNUSED(flags), int ATTR_UNUSED(dnssec),
1448 int ATTR_UNUSED(want_dnssec), int ATTR_UNUSED(nocaps),
1449 struct sockaddr_storage* ATTR_UNUSED(addr), socklen_t ATTR_UNUSED(addrlen),
1450 uint8_t* ATTR_UNUSED(zone), size_t ATTR_UNUSED(zonelen),
1451 int ATTR_UNUSED(ssl_upstream), struct module_qstate* ATTR_UNUSED(q))
14431452 {
14441453 log_assert(0);
14451454 return 0;
6060 struct regional;
6161 struct tube;
6262 struct daemon_remote;
63 struct query_info;
6364
6465 /** worker commands */
6566 enum worker_commands {
824824 }
825825
826826 /* Store the generated response in cache. */
827 if (!dns_cache_store(super->env, &super->qinfo, super->return_msg->rep,
828 0, 0, 0, NULL, super->query_flags))
827 if (!super->no_cache_store &&
828 !dns_cache_store(super->env, &super->qinfo, super->return_msg->rep,
829 0, 0, 0, NULL, super->query_flags))
829830 log_err("out of memory");
830831 }
831832
0 8 December 2016: Wouter
1 - Fix downcast warnings from visual studio in sldns code.
2
3 7 December 2016: Ralph
4 - Add DSA support for OpenSSL 1.1.0
5 - Fix remote control without cert for LibreSSL
6
7 6 December 2016: George
8 - Added generic EDNS code for registering known EDNS option codes,
9 bypassing the cache response stage and uniquifying mesh states. Four EDNS
10 option lists were added to module_qstate (module_qstate.edns_opts_*) to
11 store EDNS options from/to front/back side.
12 - Added two flags to module_qstate (no_cache_lookup, no_cache_store) that
13 control the modules' cache interactions.
14 - Added code for registering inplace callback functions. The registered
15 functions can be called just before replying with local data or Chaos,
16 replying from cache, replying with SERVFAIL, replying with a resolved
17 query, sending a query to a nameserver. The functions can inspect the
18 available data and maybe change response/query related data (i.e. append
19 EDNS options).
20 - Updated Python module for the above.
21 - Updated Python documentation.
22
23 5 December 2016: Ralph
24 - Fix #1173: differ local-zone type deny from unset
25 tag_actions element.
26
27 5 December 2016: Wouter
28 - Fix #1170: document that 'inform' local-zone uses local-data.
29
30 1 December 2016: Ralph
31 - hyphen as minus fix, by Andreas Schulze
32
33 30 November 2016: Ralph
34 - Added local-zones and local-data bulk addition and removal
35 functionality in unbound-control (local_zones, local_zones_remove,
36 local_datas and local_datas_remove).
37 - iana portlist update
38
39 29 November 2016: Wouter
40 - version 1.6.0 is in the development branch.
41 - braces in view.c around lock statements.
42
43 28 November 2016: Wouter
44 - new install-sh.
45
46 25 November 2016: Wouter
47 - Fix that with openssl 1.1 control-use-cert: no uses less cpu, by
48 using no encryption over the unix socket.
49
50 22 Novenber 2016: Ralph
51 - Make access-control-tag-data RDATA absolute. This makes the RDATA
52 origin consistent between local-data and access-control-tag-data.
53 - Fix NSEC ENT wildcard check. Matching wildcard does not have to be a
54 subdomain of the NSEC owner.
55 - QNAME minimisation uses QTYPE=A, therefore always check cache for
56 this type in harden-below-nxdomain functionality.
57 - Added unit test for QNAME minimisation + harden below nxdomain
58 synergy.
59
60 22 November 2016: Wouter
61 - iana portlist update.
62 - Fix unit tests for DS hash processing for fake-dsa test option.
63 - patch from Dag-Erling Smorgrav that removes code that relies
64 on sbrk().
65
66 21 November 2016: Wouter
67 - Fix #1158: reference RFC 8020 "NXDOMAIN: There Really Is Nothing
68 Underneath" for the harden-below-nxdomain option.
69
70 10 November 2016: Ralph
71 - Fix #1155: test status code of unbound-control in 04-checkconf,
72 not the status code from the tee command.
73
74 4 November 2016: Ralph
75 - Added stub-ssl-upstream and forward-ssl-upstream options.
76
77 4 November 2016: Wouter
78 - configure detects ssl security level API function in the autoconf
79 manner. Every function on its own, so that other libraries (eg.
80 LibreSSL) can develop their API without hindrance.
81 - Fix #1154: segfault when reading config with duplicate zones.
82 - Note that for harden-below-nxdomain the nxdomain must be secure,
83 this means nsec3 with optout is insufficient.
84
85 3 November 2016: Ralph
86 - Set OpenSSL security level to 0 when using aNULL ciphers.
87
88 3 November 2016: Wouter
89 - .gitattributes line for githubs code language display.
90 - log-identity: config option to set sys log identity, patch from
91 "Robin H. Johnson" <robbat2@gentoo.org>
92
93 2 November 2016: Wouter
94 - iana portlist update.
95
96 31 October 2016: Wouter
97 - Fix failure to build on arm64 with no sbrk.
98 - iana portlist update.
99
100 28 October 2016: Wouter
101 - Patch for server.num.zero_ttl stats for count of expired replies,
102 from Pavel Odintsov.
103
104 26 October 2016: Wouter
105 - Fix unit tests for openssl 1.1, with no DSA, by faking DSA, enabled
106 with the undocumented switch 'fake-dsa'. It logs a warning.
107
108 25 October 2016: Wouter
109 - Fix #1134: unbound-control set_option -- val-override-date: -1 works
110 immediately to ignore datetime, or back to 0 to enable it again.
111 The -- is to ignore the '-1' as an option flag.
112
113 24 October 2016: Wouter
114 - serve-expired config option: serve expired responses with TTL 0.
115 - g.root-servers.net has AAAA address.
116
117 21 October 2016: Wouter
118 - Ported tests for local_cname unit test to testbound framework.
119
120 20 October 2016: Wouter
121 - suppress compile warning in lex files.
122 - init lzt variable, for older gcc compiler warnings.
123 - fix --enable-dsa to work, instead of copying ecdsa enable.
124 - Fix DNSSEC validation of query type ANY with DNAME answers.
125 - Fixup query_info local_alias init.
126
127 19 October 2016: Wouter
128 - Fix #1130: whitespace in example.conf.in more consistent.
129
130 18 October 2016: Wouter
131 - Patch that resolves CNAMEs entered in local-data conf statements that
132 point to data on the internet, from Jinmei Tatuya (Infoblox).
133 - Removed patch comments from acllist.c and msgencode.c
134 - Added documentation doc/CNAME-basedRedirectionDesignNotes.pdf,
135 from Jinmei Tatuya (Infoblox).
136 - Fix #1125: unbound could reuse an answer packet incorrectly for
137 clients with different EDNS parameters, from Jinmei Tatuya.
138 - Fix #1118: libunbound.pc sets strange Libs, Libs.private values.
139 - Added Requires line to libunbound.pc
140 - Please doxygen by modifying mesh.h
141
142 17 October 2016: Wouter
143 - Re-fix #839 from view commit overwrite.
144 - Fixup const void cast warning.
145
146 12 October 2016: Ralph
147 - Free view config elements.
148
149 11 October 2016: Ralph
150 - Added qname-minimisation-strict config option.
151 - iana portlist update.
152 - fix memoryleak logfile when in debug mode.
153
154 5 October 2016: Ralph
155 - Added views functionality.
156 - Fix #1117: spelling errors, from Robert Edmonds.
157
158 30 September 2016: Wouter
159 - Fix Nits for 1.5.10 reported by Dag-Erling Smorgrav.
160
161 29 September 2016: Wouter
162 - Fix #838: 1.5.10 cannot be built on Solaris, undefined PATH_MAX.
163 - Fix #839: Memory grows unexpectedly with large RPZ files.
164 - Fix #840: infinite loop in unbound_munin_ plugin on unowned lockfile.
165 - Fix #841: big local-zone's make it consume large amounts of memory.
166
167 27 September 2016: Wouter
168 - tag for 1.5.10 release
169 - trunk contains 1.5.11 in development.
170 - Fix dnstap relaying "random" messages instead of resolver/forwarder
171 responses, from Nikolay Edigaryev.
172 - Fix #836: unbound could echo back EDNS options in an error response.
173
0174 20 September 2016: Wouter
1175 - iana portlist update.
2176 - Fix #835: fix --disable-dsa with nettle verify.
0 README for Unbound 1.5.10
0 README for Unbound 1.6.0
11 Copyright 2007 NLnet Labs
22 http://unbound.net
33
00 #
11 # Example configuration file.
22 #
3 # See unbound.conf(5) man page, version 1.5.10.
3 # See unbound.conf(5) man page, version 1.6.0.
44 #
55 # this is a comment.
66
5151 # outgoing-interface: 192.0.2.153
5252 # outgoing-interface: 2001:DB8::5
5353 # outgoing-interface: 2001:DB8::6
54
54
5555 # Specify a netblock to use remainder 64 bits as random bits for
5656 # upstream queries. Uses freebind option (Linux).
5757 # outgoing-interface: 2001:DB8::/64
170170
171171 # the maximum number of hosts that are cached (roundtrip, EDNS, lame).
172172 # infra-cache-numhosts: 10000
173
173
174174 # define a number of tags here, use with local-zone, access-control.
175175 # repeat the define-tag statement to add additional tags.
176176 # define-tag: "tag1 tag2 tag3"
229229 # set redirect data for particular tag for access control element
230230 # access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1"
231231
232 # Set view for access control element
233 # access-control-view: 192.0.2.0/24 viewname
234
232235 # if given, a chroot(2) is done to the given directory.
233236 # i.e. you can chroot to the working directory, for example,
234237 # for extra security, but make sure all files are in that directory.
271274 # logfile: ""
272275
273276 # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
274 # log to, with identity "unbound". If yes, it overrides the logfile.
277 # log to. If yes, it overrides the logfile.
275278 # use-syslog: yes
279
280 # Log identity to report. if empty, defaults to the name of argv[0]
281 # (usually "unbound").
282 # log-identity: ""
276283
277284 # print UTC timestamp in ascii to logfile, default is epoch in seconds.
278285 # log-time-ascii: no
327334 # Harden against queries that fall under dnssec-signed nxdomain names.
328335 # harden-below-nxdomain: no
329336
330 # Harden the referral path by performing additional queries for
337 # Harden the referral path by performing additional queries for
331338 # infrastructure data. Validates the replies (if possible).
332339 # Default off, because the lookups burden the server. Experimental
333340 # implementation of draft-wijngaards-dnsext-resolver-side-mitigation.
342349 # privacy. Only sent minimum required labels of the QNAME and set QTYPE
343350 # to NS when possible.
344351 # qname-minimisation: no
352
353 # QNAME minimisation in strict mode. Do not fall-back to sending full
354 # QNAME to potentially broken nameservers. A lot of domains will not be
355 # resolvable when this option in enabled.
356 # This option only has effect when qname-minimisation is enabled.
357 # qname-minimisation-strict: no
345358
346359 # Use 0x20-encoded random bits in the query to foil spoof attempts.
347360 # This feature is an experimental implementation of draft dns-0x20.
475488 # Enable it if the only clients of unbound are legacy servers (w2008)
476489 # that set CD but cannot validate themselves.
477490 # ignore-cd-flag: no
491
492 # Serve expired reponses from cache, with TTL 0 in the response,
493 # and then attempt to fetch the data afresh.
494 # serve-expired: no
478495
479496 # Have the validator log failed validations for your diagnosis.
480497 # 0: off. 1: A line per failed user query. 2: With reason and bad IP.
577594 # o redirect serves the zone data for any subdomain in the zone.
578595 # o nodefault can be used to normally resolve AS112 zones.
579596 # o typetransparent resolves normally for other types and other names
580 # o inform resolves normally, but logs client IP address
597 # o inform acts like transparent, but logs client IP address
581598 # o inform_deny drops queries and logs client IP address
582599 # o always_transparent, always_refuse, always_nxdomain, resolve in
583600 # that way but ignore local data for that name.
699716 # stub-addr: 192.0.2.68
700717 # stub-prime: no
701718 # stub-first: no
719 # stub-ssl-upstream: no
702720 # stub-zone:
703721 # name: "example.org"
704722 # stub-host: ns.example.com.
714732 # forward-addr: 192.0.2.68
715733 # forward-addr: 192.0.2.73@5355 # forward to port 5355.
716734 # forward-first: no
735 # forward-ssl-upstream: no
717736 # forward-zone:
718737 # name: "example.org"
719738 # forward-host: fwd.example.com
739
740 # Views
741 # Create named views. Name must be unique. Map views to requests using
742 # the access-control-view option. Views can contain zero or more local-zone
743 # and local-data options. Options from matching views will override global
744 # options. Global options will be used if no matching view is found.
745 # With view-first yes, it will try to answer using the global local-zone and
746 # local-data elements if there is no view specific match.
747 # view:
748 # name: "viewname"
749 # local-zone: "example.com" redirect
750 # local-data: "example.com A 192.0.2.3"
751 # view-first: no
752 # view:
753 # name: "anotherview"
754 # local-zone: "example.com" refuse
0 .TH "libunbound" "3" "Sep 27, 2016" "NLnet Labs" "unbound 1.5.10"
0 .TH "libunbound" "3" "Dec 15, 2016" "NLnet Labs" "unbound 1.6.0"
11 .\"
22 .\" libunbound.3 -- unbound library functions manual
33 .\"
4242 .B ub_ctx_zone_remove,
4343 .B ub_ctx_data_add,
4444 .B ub_ctx_data_remove
45 \- Unbound DNS validating resolver 1.5.10 functions.
45 \- Unbound DNS validating resolver 1.6.0 functions.
4646 .SH "SYNOPSIS"
4747 .B #include <unbound.h>
4848 .LP
179179 .B ub_ctx_hosts
180180 to read them.
181181 Before you call this, use the openssl functions CRYPTO_set_id_callback and
182 CRYPTO_set_locking_callback to set up asyncronous operation if you use
182 CRYPTO_set_locking_callback to set up asynchronous operation if you use
183183 lib openssl (the application calls these functions once for initialisation).
184184 Openssl 1.0.0 or later uses the CRYPTO_THREADID_set_callback function.
185185 .TP
0 .TH "unbound-anchor" "8" "Sep 27, 2016" "NLnet Labs" "unbound 1.5.10"
0 .TH "unbound-anchor" "8" "Dec 15, 2016" "NLnet Labs" "unbound 1.6.0"
11 .\"
22 .\" unbound-anchor.8 -- unbound anchor maintenance utility manual
33 .\"
6666 .B \-u \fIname
6767 The server name, it connects to https://name. Specify without https:// prefix.
6868 The default is "data.iana.org". It connects to the port specified with \-P.
69 You can pass an IPv4 addres or IPv6 address (no brackets) if you want.
69 You can pass an IPv4 address or IPv6 address (no brackets) if you want.
7070 .TP
7171 .B \-x \fIpath
7272 The pathname to the root\-anchors.xml file on the server. (forms URL with \-u).
0 .TH "unbound-checkconf" "8" "Sep 27, 2016" "NLnet Labs" "unbound 1.5.10"
0 .TH "unbound-checkconf" "8" "Dec 15, 2016" "NLnet Labs" "unbound 1.6.0"
11 .\"
22 .\" unbound-checkconf.8 -- unbound configuration checker manual
33 .\"
0 .TH "unbound-control" "8" "Sep 27, 2016" "NLnet Labs" "unbound 1.5.10"
0 .TH "unbound-control" "8" "Dec 15, 2016" "NLnet Labs" "unbound 1.6.0"
11 .\"
22 .\" unbound-control.8 -- unbound remote control manual
33 .\"
9898 domain names below the removed name), NOERROR nodata answers are the
9999 result for that name.
100100 .TP
101 .B local_zones
102 Add local zones read from stdin of unbound\-control. Input is read per line,
103 with name space type on a line. For bulk additions.
104 .TP
105 .B local_zones_remove
106 Remove local zones read from stdin of unbound\-control. Input is one name per
107 line. For bulk removals.
108 .TP
109 .B local_datas
110 Add local data RRs read from stdin of unbound\-control. Input is one RR per
111 line. For bulk additions.
112 .TP
113 .B local_datas_remove
114 Remove local data RRs read from stdin of unbound\-control. Input is one name per
115 line. For bulk removals.
116 .TP
101117 .B dump_cache
102118 The contents of the cache is printed in a text format to stdout. You can
103119 redirect it to a file to store the cache in a file.
262278 just the ratelimited domains, with their estimated qps. The ratelimited
263279 domains return an error for uncached (new) queries, but cached queries work
264280 as normal.
281 .TP
282 .B view_list_local_zones \fIview\fR
283 \fIlist_local_zones\fR for given view.
284 .TP
285 .B view_local_zone \fIview\fR \fIname\fR \fItype
286 \fIlocal_zone\fR for given view.
287 .TP
288 .B view_local_zone_remove \fIview\fR \fIname
289 \fIlocal_zone_remove\fR for given view.
290 .TP
291 .B view_local_data \fIview\fR \fIRR data...
292 \fIlocal_data\fR for given view.
293 .TP
294 .B view_local_data_remove \fIview\fR \fIname
295 \fIlocal_data_remove\fR for given view.
265296 .SH "EXIT CODE"
266297 The unbound\-control program exits with status code 1 on error, 0 on success.
267298 .SH "SET UP"
300331 Not part of the recursivereplies (or the histogram thereof) or cachemiss,
301332 as a cache response was sent.
302333 .TP
334 .I threadX.num.zero_ttl
335 number of replies with ttl zero, because they served an expired cache entry.
336 .TP
303337 .I threadX.num.recursivereplies
304338 The number of replies sent to queries that needed recursive processing. Could be smaller than threadX.num.cachemiss if due to timeouts no replies were sent for some queries.
305339 .TP
349383 .I total.num.prefetch
350384 summed over threads.
351385 .TP
386 .I total.num.zero_ttl
387 summed over threads.
388 .TP
352389 .I total.num.recursivereplies
353390 summed over threads.
354391 .TP
382419 .I time.elapsed
383420 time since last statistics printout, in seconds.
384421 .SH EXTENDED STATISTICS
385 .TP
386 .I mem.total.sbrk
387 If sbrk(2) is available, an estimate of the heap size of the program in number of bytes. Close to the total memory used by the program, as reported by top and ps. Could be wrong if the OS allocates memory non\-contiguously.
388422 .TP
389423 .I mem.cache.rrset
390424 Memory in bytes in use by the RRset cache.
0 .TH "unbound\-host" "1" "Sep 27, 2016" "NLnet Labs" "unbound 1.5.10"
0 .TH "unbound\-host" "1" "Dec 15, 2016" "NLnet Labs" "unbound 1.6.0"
11 .\"
22 .\" unbound-host.1 -- unbound DNS lookup utility
33 .\"
0 .TH "unbound" "8" "Sep 27, 2016" "NLnet Labs" "unbound 1.5.10"
0 .TH "unbound" "8" "Dec 15, 2016" "NLnet Labs" "unbound 1.6.0"
11 .\"
22 .\" unbound.8 -- unbound manual
33 .\"
88 .\"
99 .SH "NAME"
1010 .B unbound
11 \- Unbound DNS validating resolver 1.5.10.
11 \- Unbound DNS validating resolver 1.6.0.
1212 .SH "SYNOPSIS"
1313 .B unbound
1414 .RB [ \-h ]
0 .TH "unbound.conf" "5" "Sep 27, 2016" "NLnet Labs" "unbound 1.5.10"
0 .TH "unbound.conf" "5" "Dec 15, 2016" "NLnet Labs" "unbound 1.6.0"
11 .\"
22 .\" unbound.conf.5 -- unbound.conf manual
33 .\"
150150 to increase the likelihood of IPv6 nameservers being selected for queries.
151151 On Linux you need these two commands to be able to use the freebind socket
152152 option to receive traffic for the ip6 netblock:
153 ip -6 addr add mynetblock/64 dev lo &&
154 ip -6 route add local mynetblock/64 dev lo
153 ip \-6 addr add mynetblock/64 dev lo &&
154 ip \-6 route add local mynetblock/64 dev lo
155155 .TP
156156 .B outgoing\-range: \fI<number>
157157 Number of ports to open. This number of file descriptors can be opened per
473473 .B access\-control\-tag\-data: \fI<IP netblock> <tag> <"resource record string">
474474 Set redirect data for particular tag for given access control element.
475475 .TP
476 .B access\-control\-view: \fI<IP netblock> <view name>
477 Set view for given access control element.
478 .TP
476479 .B chroot: \fI<directory>
477480 If chroot is enabled, you should pass the configfile (from the
478481 commandline) as a full path from the original root. After the
529532 The log facility LOG_DAEMON is used, with identity "unbound".
530533 The logfile setting is overridden when use\-syslog is turned on.
531534 The default is to log to syslog.
535 .TP
536 .B log\-identity: \fI<string>
537 If "" is given (default), then the name of the executable, usually "unbound"
538 is used to report to the log. Enter a string to override it
539 with that, which is useful on systems that run more than one instance of
540 unbound, with different configurations, so that the logs can be easily
541 distinguished against.
532542 .TP
533543 .B log\-time\-ascii: \fI<yes or no>
534544 Sets logfile lines to use a timestamp in UTC ascii. Default is no, which
613623 downgrade attack that disables security for a zone. Default is on.
614624 .TP
615625 .B harden\-below\-nxdomain: \fI<yes or no>
616 From draft\-vixie\-dnsext\-resimprove, returns nxdomain to queries for a name
626 From RFC 8020 (with title "NXDOMAIN: There Really Is Nothing Underneath"),
627 returns nxdomain to queries for a name
617628 below another name that is already known to be nxdomain. DNSSEC mandates
618629 noerror for empty nonterminals, hence this is possible. Very old software
619630 might return nxdomain for empty nonterminals (that usually happen for reverse
620631 IP address lookups), and thus may be incompatible with this. To try to avoid
621632 this only DNSSEC-secure nxdomains are used, because the old software does not
622633 have DNSSEC. Default is off.
623 Currently, draft\-ietf\-dnsop\-nxdomain\-cut promotes this technique.
634 The nxdomain must be secure, this means nsec3 with optout is insufficient.
624635 .TP
625636 .B harden\-referral\-path: \fI<yes or no>
626637 Harden the referral path by performing additional queries for
657668 .B qname\-minimisation: \fI<yes or no>
658669 Send minimum amount of information to upstream servers to enhance privacy.
659670 Only sent minimum required labels of the QNAME and set QTYPE to NS when
660 possible. Best effort approach, full QNAME and original QTYPE will be sent when
661 upstream replies with a RCODE other than NOERROR. Default is off.
671 possible. Best effort approach; full QNAME and original QTYPE will be sent when
672 upstream replies with a RCODE other than NOERROR, except when receiving
673 NXDOMAIN from a DNSSEC signed zone. Default is off.
674 .TP
675 .B qname\-minimisation\-strict: \fI<yes or no>
676 QNAME minimisation in strict mode. Do not fall-back to sending full QNAME to
677 potentially broken nameservers. A lot of domains will not be resolvable when
678 this option in enabled. Only use if you know what you are doing.
679 This option only has effect when qname-minimisation is enabled. Default is off.
662680 .TP
663681 .B private\-address: \fI<IP address or subnet>
664682 Give IPv4 of IPv6 addresses or classless subnets. These are addresses
858876 the clients, and then unbound provides them with DNSSEC protection.
859877 The default value is "no".
860878 .TP
879 .B serve\-expired: \fI<yes or no>
880 If enabled, unbound attempts to serve old responses from cache with a
881 TTL of 0 in the response without waiting for the actual resolution to finish.
882 The actual resolution answer ends up in the cache later on. Default is "no".
883 .TP
861884 .B val\-nsec3\-keysize\-iterations: \fI<"list of values">
862885 List of keysize and iteration count values, separated by spaces, surrounded
863886 by quotes. Default is "1024 150 2048 500 4096 2500". This determines the
9771000 that users with web browsers cannot access sites with suffix example.com.
9781001 .TP 10
9791002 \h'5'\fIinform\fR
980 The query is answered normally. The client IP address (@portnumber)
981 is printed to the logfile. The log message is: timestamp, unbound-pid,
982 info: zonename inform IP@port queryname type class. This option can be
983 used for normal resolution, but machines looking up infected names are
984 logged, eg. to run antivirus on them.
1003 The query is answered normally, same as transparent. The client IP
1004 address (@portnumber) is printed to the logfile. The log message is:
1005 timestamp, unbound-pid, info: zonename inform IP@port queryname type
1006 class. This option can be used for normal resolution, but machines
1007 looking up infected names are logged, eg. to run antivirus on them.
9851008 .TP 10
9861009 \h'5'\fIinform_deny\fR
9871010 The query is dropped, like 'deny', and logged, like 'inform'. Ie. find
12791302 The data could not be retrieved and would have caused SERVFAIL because
12801303 the servers are unreachable, instead it is tried without this clause.
12811304 The default is no.
1305 .TP
1306 .B stub\-ssl\-upstream: \fI<yes or no>
1307 Enabled or disable whether the queries to this stub use SSL for transport.
1308 Default is no.
12821309 .SS "Forward Zone Options"
12831310 .LP
12841311 There may be multiple
13081335 If enabled, a query is attempted without the forward clause if it fails.
13091336 The data could not be retrieved and would have caused SERVFAIL because
13101337 the servers are unreachable, instead it is tried without this clause.
1338 The default is no.
1339 .TP
1340 .B forward\-ssl\-upstream: \fI<yes or no>
1341 Enabled or disable whether the queries to this forwarder use SSL for transport.
1342 Default is no.
1343 .SS "View Options"
1344 .LP
1345 There may be multiple
1346 .B view:
1347 clauses. Each with a \fBname:\fR and zero or more \fBlocal\-zone\fR and
1348 \fBlocal\-data\fR elements. View can be mapped to requests by specifying the view
1349 name in an \fBaccess\-control\-view\fR element. Options from matching views will
1350 override global options. Global options will be used if no matching view
1351 is found.
1352 .TP
1353 .B name: \fI<view name>
1354 Name of the view. Must be unique. This name is used in access\-control\-view
1355 elements.
1356 .TP
1357 .B local\-zone: \fI<zone> <type>
1358 View specific local\-zone elements. Has the same types and behaviour as the
1359 global local\-zone elements.
1360 .TP
1361 .B local\-data: \fI"<resource record string>"
1362 View specific local\-data elements. Has the same behaviour as the global
1363 local\-data elements.
1364 .TP
1365 .B view\-first: \fI<yes or no>
1366 If enabled, it attempts to use the global local\-zone and local\-data if there
1367 is no match in the view specific options.
13111368 The default is no.
13121369 .SS "Python Module Options"
13131370 .LP
7171 return NULL;
7272 copy->bogus = dp->bogus;
7373 copy->has_parent_side_NS = dp->has_parent_side_NS;
74 copy->ssl_upstream = dp->ssl_upstream;
7475 for(ns = dp->nslist; ns; ns = ns->next) {
7576 if(!delegpt_add_ns(copy, region, ns->name, ns->lame))
7677 return NULL;
8080 uint8_t has_parent_side_NS;
8181 /** for assertions on type of delegpt */
8282 uint8_t dp_type_mlc;
83 /** use SSL for upstream query */
84 uint8_t ssl_upstream;
8385 };
8486
8587 /**
354356
355357 /**
356358 * create malloced delegation point, with the given name
357 * @param name: uncompressed wireformat of degegpt name.
359 * @param name: uncompressed wireformat of delegpt name.
358360 * @return NULL on alloc failure
359361 */
360362 struct delegpt* delegpt_create_mlc(uint8_t* name);
264264 * last resort will ask for parent-side NS record and thus
265265 * fallback to the internet name servers on a failure */
266266 dp->has_parent_side_NS = (uint8_t)!s->isfirst;
267 /* use SSL for queries to this forwarder */
268 dp->ssl_upstream = (uint8_t)s->ssl_upstream;
267269 verbose(VERB_QUERY, "Forward zone server list:");
268270 delegpt_log(VERB_QUERY, dp);
269271 if(!forwards_insert(fwd, LDNS_RR_CLASS_IN, dp))
148148 if(!ah(dp, "D.ROOT-SERVERS.NET.", "2001:500:2d::d")) goto failed;
149149 if(!ah(dp, "E.ROOT-SERVERS.NET.", "2001:500:a8::e")) goto failed;
150150 if(!ah(dp, "F.ROOT-SERVERS.NET.", "2001:500:2f::f")) goto failed;
151 if(!ah(dp, "G.ROOT-SERVERS.NET.", "2001:500:12::d0d")) goto failed;
151152 if(!ah(dp, "H.ROOT-SERVERS.NET.", "2001:500:1::53")) goto failed;
152153 if(!ah(dp, "I.ROOT-SERVERS.NET.", "2001:7fe::53")) goto failed;
153154 if(!ah(dp, "J.ROOT-SERVERS.NET.", "2001:503:c27::2:30")) goto failed;
274275 * last resort will ask for parent-side NS record and thus
275276 * fallback to the internet name servers on a failure */
276277 dp->has_parent_side_NS = (uint8_t)!s->isfirst;
278 /* ssl_upstream */
279 dp->ssl_upstream = (uint8_t)s->ssl_upstream;
277280 delegpt_log(VERB_QUERY, dp);
278281 if(!hints_insert(hints, LDNS_RR_CLASS_IN, dp, !s->isprime))
279282 return 0;
531531 qinf.qname_len = namelen;
532532 qinf.qtype = t;
533533 qinf.qclass = c;
534 qinf.local_alias = NULL;
534535 fptr_ok(fptr_whitelist_modenv_detect_cycle(
535536 qstate->env->detect_cycle));
536537 return (*qstate->env->detect_cycle)(qstate, &qinf,
229229 return;
230230 } else {
231231 /* see if the failure did get (parent-lame) info */
232 if(!cache_fill_missing(super->env,
233 super_iq->qchase.qclass, super->region,
234 super_iq->dp))
232 if(!cache_fill_missing(super->env, super_iq->qchase.qclass,
233 super->region, super_iq->dp))
235234 log_err("out of memory adding missing");
236235 }
237236 dpns->resolved = 1; /* mark as failed */
277276 static int
278277 error_response_cache(struct module_qstate* qstate, int id, int rcode)
279278 {
280 /* store in cache */
281 struct reply_info err;
282 if(qstate->prefetch_leeway > NORR_TTL) {
283 verbose(VERB_ALGO, "error response for prefetch in cache");
284 /* attempt to adjust the cache entry prefetch */
285 if(dns_cache_prefetch_adjust(qstate->env, &qstate->qinfo,
286 NORR_TTL, qstate->query_flags))
287 return error_response(qstate, id, rcode);
288 /* if that fails (not in cache), fall through to store err */
289 }
290 memset(&err, 0, sizeof(err));
291 err.flags = (uint16_t)(BIT_QR | BIT_RA);
292 FLAGS_SET_RCODE(err.flags, rcode);
293 err.qdcount = 1;
294 err.ttl = NORR_TTL;
295 err.prefetch_ttl = PREFETCH_TTL_CALC(err.ttl);
296 /* do not waste time trying to validate this servfail */
297 err.security = sec_status_indeterminate;
298 verbose(VERB_ALGO, "store error response in message cache");
299 iter_dns_store(qstate->env, &qstate->qinfo, &err, 0, 0, 0, NULL,
300 qstate->query_flags);
279 if(!qstate->no_cache_store) {
280 /* store in cache */
281 struct reply_info err;
282 if(qstate->prefetch_leeway > NORR_TTL) {
283 verbose(VERB_ALGO, "error response for prefetch in cache");
284 /* attempt to adjust the cache entry prefetch */
285 if(dns_cache_prefetch_adjust(qstate->env, &qstate->qinfo,
286 NORR_TTL, qstate->query_flags))
287 return error_response(qstate, id, rcode);
288 /* if that fails (not in cache), fall through to store err */
289 }
290 memset(&err, 0, sizeof(err));
291 err.flags = (uint16_t)(BIT_QR | BIT_RA);
292 FLAGS_SET_RCODE(err.flags, rcode);
293 err.qdcount = 1;
294 err.ttl = NORR_TTL;
295 err.prefetch_ttl = PREFETCH_TTL_CALC(err.ttl);
296 /* do not waste time trying to validate this servfail */
297 err.security = sec_status_indeterminate;
298 verbose(VERB_ALGO, "store error response in message cache");
299 iter_dns_store(qstate->env, &qstate->qinfo, &err, 0, 0, 0, NULL,
300 qstate->query_flags);
301 }
301302 return error_response(qstate, id, rcode);
302303 }
303304
550551 qinf.qname_len = qnamelen;
551552 qinf.qtype = qtype;
552553 qinf.qclass = qclass;
554 qinf.local_alias = NULL;
553555
554556 /* RD should be set only when sending the query back through the INIT
555557 * state. */
967969 {
968970 uint8_t* delname;
969971 size_t delnamelen;
970 struct dns_msg* msg;
972 struct dns_msg* msg = NULL;
971973
972974 log_query_info(VERB_DETAIL, "resolving", &qstate->qinfo);
973975 /* check effort */
10071009 * getting older results from cache is a bad idea, no cache */
10081010 verbose(VERB_ALGO, "cache blacklisted, going to the network");
10091011 msg = NULL;
1010 } else {
1012 } else if(!qstate->no_cache_lookup) {
10111013 msg = dns_cache_lookup(qstate->env, iq->qchase.qname,
10121014 iq->qchase.qname_len, iq->qchase.qtype,
10131015 iq->qchase.qclass, qstate->query_flags,
10141016 qstate->region, qstate->env->scratch);
10151017 if(!msg && qstate->env->neg_cache) {
1016 /* lookup in negative cache; may result in
1018 /* lookup in negative cache; may result in
10171019 * NOERROR/NODATA or NXDOMAIN answers that need validation */
10181020 msg = val_neg_getmsg(qstate->env->neg_cache, &iq->qchase,
10191021 qstate->region, qstate->env->rrset_cache,
16991701
17001702 /* if this was a parent-side glue query itself, then store that
17011703 * failure in cache. */
1702 if(iq->query_for_pside_glue && !iq->pside_glue)
1703 iter_store_parentside_neg(qstate->env, &qstate->qinfo,
1704 iq->deleg_msg?iq->deleg_msg->rep:
1705 (iq->response?iq->response->rep:NULL));
1704 if(!qstate->no_cache_store && iq->query_for_pside_glue
1705 && !iq->pside_glue)
1706 iter_store_parentside_neg(qstate->env, &qstate->qinfo,
1707 iq->deleg_msg?iq->deleg_msg->rep:
1708 (iq->response?iq->response->rep:NULL));
17061709
17071710 verbose(VERB_QUERY, "out of query targets -- returning SERVFAIL");
17081711 /* fail -- no more targets, no more hope of targets, no hope
17861789 int tf_policy;
17871790 struct delegpt_addr* target;
17881791 struct outbound_entry* outq;
1789 /* EDNS options to set on outgoing packet */
1790 struct edns_option* opt_list = NULL;
17911792
17921793 /* NOTE: a request will encounter this state for each target it
17931794 * needs to send a query to. That is, at least one per referral,
20102011 iq->qinfo_out.qname_len = iq->dp->namelen;
20112012 iq->qinfo_out.qtype = LDNS_RR_TYPE_A;
20122013 iq->qinfo_out.qclass = iq->qchase.qclass;
2014 iq->qinfo_out.local_alias = NULL;
20132015 iq->minimise_count = 0;
20142016 }
20152017
20672069 || iq->qchase.qtype == LDNS_RR_TYPE_A)))
20682070 /* Stop minimising this query, resolve "as usual" */
20692071 iq->minimisation_state = DONOT_MINIMISE_STATE;
2070 else {
2072 else if(!qstate->no_cache_lookup) {
20712073 struct dns_msg* msg = dns_cache_lookup(qstate->env,
20722074 iq->qinfo_out.qname, iq->qinfo_out.qname_len,
20732075 iq->qinfo_out.qtype, iq->qinfo_out.qclass,
20872089 /* Do not increment qname, continue incrementing next
20882090 * iteration */
20892091 iq->minimisation_state = MINIMISE_STATE;
2090 else
2092 else if(!qstate->env->cfg->qname_minimisation_strict)
20912093 /* Too many time-outs detected for this QNAME and QTYPE.
20922094 * We give up, disable QNAME minimisation. */
20932095 iq->minimisation_state = DONOT_MINIMISE_STATE;
21052107 iq->dnssec_lame_query?" but lame_query anyway": "");
21062108 }
21072109 fptr_ok(fptr_whitelist_modenv_send_query(qstate->env->send_query));
2108 outq = (*qstate->env->send_query)(
2109 iq->qinfo_out.qname, iq->qinfo_out.qname_len,
2110 iq->qinfo_out.qtype, iq->qinfo_out.qclass,
2110 outq = (*qstate->env->send_query)(&iq->qinfo_out,
21112111 iq->chase_flags | (iq->chase_to_rd?BIT_RD:0),
21122112 /* unset CD if to forwarder(RD set) and not dnssec retry
21132113 * (blacklist nonempty) and no trust-anchors are configured
21162116 !qstate->blacklist&&(!iter_indicates_dnssec_fwd(qstate->env,
21172117 &iq->qinfo_out)||target->attempts==1)?0:BIT_CD),
21182118 iq->dnssec_expected, iq->caps_fallback || is_caps_whitelisted(
2119 ie, iq), opt_list, &target->addr, target->addrlen,
2120 iq->dp->name, iq->dp->namelen, qstate);
2119 ie, iq), &target->addr, target->addrlen,
2120 iq->dp->name, iq->dp->namelen,
2121 (iq->dp->ssl_upstream || qstate->env->cfg->ssl_upstream), qstate);
21212122 if(!outq) {
21222123 log_addr(VERB_DETAIL, "error sending query to auth server",
21232124 &target->addr, target->addrlen);
22582259 iq->num_target_queries = 0;
22592260 return processDSNSFind(qstate, iq, id);
22602261 }
2261 iter_dns_store(qstate->env, &iq->response->qinfo,
2262 iq->response->rep, 0, qstate->prefetch_leeway,
2263 iq->dp&&iq->dp->has_parent_side_NS,
2264 qstate->region, qstate->query_flags);
2262 if(!qstate->no_cache_store)
2263 iter_dns_store(qstate->env, &iq->response->qinfo,
2264 iq->response->rep, 0, qstate->prefetch_leeway,
2265 iq->dp&&iq->dp->has_parent_side_NS,
2266 qstate->region, qstate->query_flags);
22652267 /* close down outstanding requests to be discarded */
22662268 outbound_list_clear(&iq->outlist);
22672269 iq->num_current_queries = 0;
22742276 &qstate->reply->addr, qstate->reply->addrlen,
22752277 qstate->region);
22762278 if(iq->minimisation_state != DONOT_MINIMISE_STATE) {
2277 /* Best effort qname-minimisation.
2278 * Stop minimising and send full query when RCODE
2279 * is not NOERROR. */
22802279 if(FLAGS_GET_RCODE(iq->response->rep->flags) !=
2281 LDNS_RCODE_NOERROR)
2280 LDNS_RCODE_NOERROR) {
2281 if(qstate->env->cfg->qname_minimisation_strict)
2282 return final_state(iq);
2283 /* Best effort qname-minimisation.
2284 * Stop minimising and send full query when
2285 * RCODE is not NOERROR. */
22822286 iq->minimisation_state = DONOT_MINIMISE_STATE;
2287 }
22832288 if(FLAGS_GET_RCODE(iq->response->rep->flags) ==
22842289 LDNS_RCODE_NXDOMAIN) {
22852290 /* Stop resolving when NXDOMAIN is DNSSEC
23262331 }
23272332
23282333 /* if hardened, only store referral if we asked for it */
2329 if(!qstate->env->cfg->harden_referral_path ||
2334 if(!qstate->no_cache_store &&
2335 (!qstate->env->cfg->harden_referral_path ||
23302336 ( qstate->qinfo.qtype == LDNS_RR_TYPE_NS
23312337 && (qstate->query_flags&BIT_RD)
23322338 && !(qstate->query_flags&BIT_CD)
23412347 iq->qchase.qname, iq->qchase.qname_len,
23422348 LDNS_RR_TYPE_NS, iq->qchase.qclass)
23432349 )
2344 )) {
2350 ))) {
23452351 /* Store the referral under the current query */
23462352 /* no prefetch-leeway, since its not the answer */
23472353 iter_dns_store(qstate->env, &iq->response->qinfo,
23542360 iq->response->rep, iq->dp->name);
23552361 }
23562362 /* store parent-side-in-zone-glue, if directly queried for */
2357 if(iq->query_for_pside_glue && !iq->pside_glue) {
2358 iq->pside_glue = reply_find_rrset(iq->response->rep,
2359 iq->qchase.qname, iq->qchase.qname_len,
2360 iq->qchase.qtype, iq->qchase.qclass);
2361 if(iq->pside_glue) {
2362 log_rrset_key(VERB_ALGO, "found parent-side "
2363 "glue", iq->pside_glue);
2364 iter_store_parentside_rrset(qstate->env,
2365 iq->pside_glue);
2366 }
2363 if(!qstate->no_cache_store && iq->query_for_pside_glue
2364 && !iq->pside_glue) {
2365 iq->pside_glue = reply_find_rrset(iq->response->rep,
2366 iq->qchase.qname, iq->qchase.qname_len,
2367 iq->qchase.qtype, iq->qchase.qclass);
2368 if(iq->pside_glue) {
2369 log_rrset_key(VERB_ALGO, "found parent-side "
2370 "glue", iq->pside_glue);
2371 iter_store_parentside_rrset(qstate->env,
2372 iq->pside_glue);
2373 }
23672374 }
23682375
23692376 /* Reset the event state, setting the current delegation
24442451 /* NOTE : set referral=1, so that rrsets get stored but not
24452452 * the partial query answer (CNAME only). */
24462453 /* prefetchleeway applied because this updates answer parts */
2447 iter_dns_store(qstate->env, &iq->response->qinfo,
2448 iq->response->rep, 1, qstate->prefetch_leeway,
2449 iq->dp&&iq->dp->has_parent_side_NS, NULL,
2450 qstate->query_flags);
2454 if(!qstate->no_cache_store)
2455 iter_dns_store(qstate->env, &iq->response->qinfo,
2456 iq->response->rep, 1, qstate->prefetch_leeway,
2457 iq->dp&&iq->dp->has_parent_side_NS, NULL,
2458 qstate->query_flags);
24512459 /* set the current request's qname to the new value. */
24522460 iq->qchase.qname = sname;
24532461 iq->qchase.qname_len = snamelen;
25262534 /* LAME, THROWAWAY and "unknown" all end up here.
25272535 * Recycle to the QUERYTARGETS state to hopefully try a
25282536 * different target. */
2529 if (qstate->env->cfg->qname_minimisation)
2537 if (qstate->env->cfg->qname_minimisation &&
2538 !qstate->env->cfg->qname_minimisation_strict)
25302539 iq->minimisation_state = DONOT_MINIMISE_STATE;
25312540 return next_state(iq, QUERYTARGETS_STATE);
25322541 }
29262935 &qstate->qinfo);
29272936
29282937 /* store negative cache element for parent side glue. */
2929 if(iq->query_for_pside_glue && !iq->pside_glue)
2930 iter_store_parentside_neg(qstate->env, &qstate->qinfo,
2931 iq->deleg_msg?iq->deleg_msg->rep:
2932 (iq->response?iq->response->rep:NULL));
2938 if(!qstate->no_cache_store && iq->query_for_pside_glue
2939 && !iq->pside_glue)
2940 iter_store_parentside_neg(qstate->env, &qstate->qinfo,
2941 iq->deleg_msg?iq->deleg_msg->rep:
2942 (iq->response?iq->response->rep:NULL));
29332943 if(!iq->response) {
29342944 verbose(VERB_ALGO, "No response is set, servfail");
29352945 return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
29652975 /* store message with the finished prepended items,
29662976 * but only if we did recursion. The nonrecursion referral
29672977 * from cache does not need to be stored in the msg cache. */
2968 if(qstate->query_flags&BIT_RD) {
2978 if(!qstate->no_cache_store && qstate->query_flags&BIT_RD) {
29692979 iter_dns_store(qstate->env, &qstate->qinfo,
29702980 iq->response->rep, 0, qstate->prefetch_leeway,
29712981 iq->dp&&iq->dp->has_parent_side_NS,
31403150 if(parse_extract_edns(prs, &edns, qstate->env->scratch) !=
31413151 LDNS_RCODE_NOERROR)
31423152 goto handle_it;
3153
3154 /* Copy the edns options we may got from the back end */
3155 if(edns.opt_list) {
3156 qstate->edns_opts_back_in = edns_opt_copy_region(edns.opt_list,
3157 qstate->region);
3158 if(!qstate->edns_opts_back_in) {
3159 log_err("out of memory on incoming message");
3160 /* like packet got dropped */
3161 goto handle_it;
3162 }
3163 }
3164
31433165 /* remove CD-bit, we asked for in case we handle validation ourself */
31443166 prs->flags &= ~BIT_CD;
31453167
6161 config_apply(cfg);
6262 if(!modstack_setup(&ctx->mods, cfg->module_conf, ctx->env))
6363 return UB_INITFAIL;
64 log_edns_known_options(VERB_ALGO, ctx->env);
6465 ctx->local_zones = local_zones_create();
6566 if(!ctx->local_zones)
6667 return UB_NOMEM;
131131 errno = ENOMEM;
132132 return NULL;
133133 }
134 /* init edns_known_options */
135 if(!edns_known_options_init(ctx->env)) {
136 config_delete(ctx->env->cfg);
137 free(ctx->env);
138 ub_randfree(ctx->seed_rnd);
139 free(ctx);
140 errno = ENOMEM;
141 return NULL;
142 }
134143 ctx->env->alloc = &ctx->superalloc;
135144 ctx->env->worker = NULL;
136145 ctx->env->need_to_validate = 0;
150159 ub_randfree(ctx->seed_rnd);
151160 config_delete(ctx->env->cfg);
152161 modstack_desetup(&ctx->mods, ctx->env);
162 edns_known_options_delete(ctx->env);
153163 free(ctx->env);
154164 free(ctx);
155165 errno = e;
161171 ub_randfree(ctx->seed_rnd);
162172 config_delete(ctx->env->cfg);
163173 modstack_desetup(&ctx->mods, ctx->env);
174 edns_known_options_delete(ctx->env);
164175 free(ctx->env);
165176 free(ctx);
166177 errno = e;
297308 rrset_cache_delete(ctx->env->rrset_cache);
298309 infra_delete(ctx->env->infra_cache);
299310 config_delete(ctx->env->cfg);
311 edns_known_options_delete(ctx->env);
312 inplace_cb_lists_delete(ctx->env);
300313 free(ctx->env);
301314 }
302315 ub_randfree(ctx->seed_rnd);
572572 {
573573 qinfo->qtype = (uint16_t)q->res->qtype;
574574 qinfo->qclass = (uint16_t)q->res->qclass;
575 qinfo->local_alias = NULL;
575576 qinfo->qname = sldns_str2wire_dname(q->res->qname, &qinfo->qname_len);
576577 if(!qinfo->qname) {
577578 return 0;
578579 }
580 qinfo->local_alias = NULL;
579581 edns->edns_present = 1;
580582 edns->ext_rcode = 0;
581583 edns->edns_version = 0;
606608 /* see if there is a fixed answer */
607609 sldns_buffer_write_u16_at(w->back->udp_buff, 0, qid);
608610 sldns_buffer_write_u16_at(w->back->udp_buff, 2, qflags);
609 if(local_zones_answer(ctx->local_zones, &qinfo, &edns,
611 if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
610612 w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
611 NULL, 0, NULL, 0)) {
613 NULL, 0, NULL, 0, NULL)) {
612614 regional_free_all(w->env->scratch);
613615 libworker_fillup_fg(q, LDNS_RCODE_NOERROR,
614616 w->back->udp_buff, sec_status_insecure, NULL);
677679 /* see if there is a fixed answer */
678680 sldns_buffer_write_u16_at(w->back->udp_buff, 0, qid);
679681 sldns_buffer_write_u16_at(w->back->udp_buff, 2, qflags);
680 if(local_zones_answer(ctx->local_zones, &qinfo, &edns,
682 if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
681683 w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
682 NULL, 0, NULL, 0)) {
684 NULL, 0, NULL, 0, NULL)) {
683685 regional_free_all(w->env->scratch);
684686 free(qinfo.qname);
685687 libworker_event_done_cb(q, LDNS_RCODE_NOERROR,
798800 /* see if there is a fixed answer */
799801 sldns_buffer_write_u16_at(w->back->udp_buff, 0, qid);
800802 sldns_buffer_write_u16_at(w->back->udp_buff, 2, qflags);
801 if(local_zones_answer(w->ctx->local_zones, &qinfo, &edns,
803 if(local_zones_answer(w->ctx->local_zones, w->env, &qinfo, &edns,
802804 w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
803 NULL, 0, NULL, 0)) {
805 NULL, 0, NULL, 0, NULL)) {
804806 regional_free_all(w->env->scratch);
805807 q->msg_security = sec_status_insecure;
806808 add_bg_result(w, q, w->back->udp_buff, UB_NOERROR, NULL);
823825 slabhash_clear(w->env->msg_cache);
824826 }
825827
826 struct outbound_entry* libworker_send_query(uint8_t* qname, size_t qnamelen,
827 uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec,
828 int want_dnssec, int nocaps, struct edns_option* opt_list,
828 struct outbound_entry* libworker_send_query(struct query_info* qinfo,
829 uint16_t flags, int dnssec, int want_dnssec, int nocaps,
829830 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone,
830 size_t zonelen, struct module_qstate* q)
831 size_t zonelen, int ssl_upstream, struct module_qstate* q)
831832 {
832833 struct libworker* w = (struct libworker*)q->env->worker;
833834 struct outbound_entry* e = (struct outbound_entry*)regional_alloc(
835836 if(!e)
836837 return NULL;
837838 e->qstate = q;
838 e->qsent = outnet_serviced_query(w->back, qname,
839 qnamelen, qtype, qclass, flags, dnssec, want_dnssec, nocaps,
840 q->env->cfg->tcp_upstream, q->env->cfg->ssl_upstream, opt_list,
841 addr, addrlen, zone, zonelen, libworker_handle_service_reply,
842 e, w->back->udp_buff);
839 e->qsent = outnet_serviced_query(w->back, qinfo, flags, dnssec,
840 want_dnssec, nocaps, q->env->cfg->tcp_upstream, ssl_upstream,
841 addr, addrlen, zone, zonelen, q, libworker_handle_service_reply,
842 e, w->back->udp_buff, q->env);
843843 if(!e->qsent) {
844844 return NULL;
845845 }
954954 log_assert(0);
955955 }
956956
957 struct outbound_entry* worker_send_query(uint8_t* ATTR_UNUSED(qname),
958 size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype),
959 uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags),
960 int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec),
961 int ATTR_UNUSED(nocaps), struct edns_option* ATTR_UNUSED(opt_list),
962 struct sockaddr_storage* ATTR_UNUSED(addr),
963 socklen_t ATTR_UNUSED(addrlen), uint8_t* ATTR_UNUSED(zone),
964 size_t ATTR_UNUSED(zonelen), struct module_qstate* ATTR_UNUSED(q))
957 struct outbound_entry* worker_send_query(struct query_info* ATTR_UNUSED(qinfo),
958 uint16_t ATTR_UNUSED(flags), int ATTR_UNUSED(dnssec),
959 int ATTR_UNUSED(want_dnssec), int ATTR_UNUSED(nocaps),
960 struct sockaddr_storage* ATTR_UNUSED(addr), socklen_t ATTR_UNUSED(addrlen),
961 uint8_t* ATTR_UNUSED(zone), size_t ATTR_UNUSED(zonelen),
962 int ATTR_UNUSED(ssl_upstream), struct module_qstate* ATTR_UNUSED(q))
965963 {
966964 log_assert(0);
967965 return 0;
00 /*
1 * libunbound/worker.h - worker thread or process that resolves
1 * libunbound/libworker.h - worker thread or process that resolves
22 *
33 * Copyright (c) 2007, NLnet Labs. All rights reserved.
44 *
5858 struct tube;
5959 struct sldns_buffer;
6060 struct ub_event_base;
61 struct query_info;
6162
6263 /**
6364 * The library-worker status structure
8181 # Options for HTML output
8282 # -----------------------
8383
84 # The theme that the html output should use.
85 html_theme = "classic"
86
8487 # The style sheet to use for HTML and HTML Help pages. A file of that name
8588 # must exist either in Sphinx' static/ path, or in one of the custom paths
8689 # given in html_static_path.
87 html_style = 'default.css'
90 #html_style = 'default.css'
8891
8992 # The name for this set of Sphinx documents. If None, it defaults to
9093 # "<project> v<release> documentation".
00 .. _example_resolve_name:
11
2 ==============================
32 Resolve a name
4 ==============================
3 ==============
54
6 This basic example shows how to create a context and resolve a host address (DNS record of A type).
5 This basic example shows how to create a context and resolve a host address
6 (DNS record of A type).
7
8 Source code
9 -----------
710
811 ::
912
10 #!/usr/bin/python
11 import unbound
12
13 ctx = unbound.ub_ctx()
14 ctx.resolvconf("/etc/resolv.conf")
15
16 status, result = ctx.resolve("www.google.com")
17 if status == 0 and result.havedata:
18 print "Result.data:", result.data.address_list
19 elif status != 0:
20 print "Resolve error:", unbound.ub_strerror(status)
13 #!/usr/bin/python
14 import unbound
2115
22 In contrast with C API, the source code is more compact while the performance of C implementation is preserved.
23 The main advantage is that you need not take care about the deallocation and allocation of context and result structures; pyUnbound module do it automatically for you.
16 ctx = unbound.ub_ctx()
17 ctx.resolvconf("/etc/resolv.conf")
2418
25 If only domain name is given, the :meth:`unbound.ub_ctx.resolve` looks for A records in IN class.
19 status, result = ctx.resolve("www.google.com")
20 if status == 0 and result.havedata:
21 print "Result.data:", result.data.address_list
22 elif status != 0:
23 print "Resolve error:", unbound.ub_strerror(status)
24
25 In contrast with the C API, the source code is more compact while the
26 performance of C implementation is preserved.
27 The main advantage is that you need not take care about the deallocation and
28 allocation of context and result structures; pyUnbound module does it
29 automatically for you.
30
31 If only domain name is given, the :meth:`unbound.ub_ctx.resolve` looks for
32 A records in IN class.
00 .. _example_reverse_lookup:
11
2 ==============================
32 Reverse DNS lookup
4 ==============================
3 ==================
54
6 Reverse DNS lookup involves determining the hostname associated with a given IP address.
5 Reverse DNS lookup involves determining the hostname associated with a given IP
6 address.
77 This example shows how reverse lookup can be done using unbound module.
88
99 For the reverse DNS records, the special domain in-addr.arpa is reserved.
10 For example, a host name for the IP address 74.125.43.147 can be obtained by issuing a DNS query for the PTR record for address 147.43.125.74.in-addr.arpa.
10 For example, a host name for the IP address ``74.125.43.147`` can be obtained
11 by issuing a DNS query for the PTR record for address
12 ``147.43.125.74.in-addr.arpa.``
13
14 Source code
15 -----------
1116
1217 ::
1318
14 #!/usr/bin/python
15 import unbound
16
17 ctx = unbound.ub_ctx()
18 ctx.resolvconf("/etc/resolv.conf")
19
20 status, result = ctx.resolve(unbound.reverse("74.125.43.147") + ".in-addr.arpa.", unbound.RR_TYPE_PTR, unbound.RR_CLASS_IN)
21 if status == 0 and result.havedata:
22 print "Result.data:", result.data.domain_list
23 elif status != 0:
24 print "Resolve error:", unbound.ub_strerror(status)
19 #!/usr/bin/python
20 import unbound
2521
26 In order to simplify the python code, unbound module contains function which reverses the hostname components.
22 ctx = unbound.ub_ctx()
23 ctx.resolvconf("/etc/resolv.conf")
24
25 status, result = ctx.resolve(unbound.reverse("74.125.43.147") + ".in-addr.arpa.", unbound.RR_TYPE_PTR, unbound.RR_CLASS_IN)
26 if status == 0 and result.havedata:
27 print "Result.data:", result.data.domain_list
28 elif status != 0:
29 print "Resolve error:", unbound.ub_strerror(status)
30
31 In order to simplify the python code, unbound module contains the
32 :meth:`unbound.reverse` function which reverses the hostname components.
2733 This function is defined as follows::
2834
29 def reverse(domain):
30 return '.'.join([a for a in domain.split(".")][::-1])
31
32
35 def reverse(domain):
36 return '.'.join([a for a in domain.split(".")][::-1])
00 .. _example_setup_ctx:
11
2 ==============================
32 Lookup from threads
4 ==============================
3 ===================
54
6 This example shows how to use unbound module from a threaded program.
7 In this example, three lookup threads are created which work in background.
8 Each thread resolves different DNS record.
5 This example shows how to use unbound module from a threaded program.
6 In this example, three lookup threads are created which work in background.
7 Each thread resolves different DNS record.
8
9 Source code
10 -----------
911
1012 ::
1113
12 #!/usr/bin/python
13 from unbound import ub_ctx, RR_TYPE_A, RR_CLASS_IN
14 from threading import Thread
15
16 ctx = ub_ctx()
17 ctx.resolvconf("/etc/resolv.conf")
18
19 class LookupThread(Thread):
20 def __init__(self,ctx, name):
21 Thread.__init__(self)
22 self.ctx = ctx
23 self.name = name
14 #!/usr/bin/python
15 from unbound import ub_ctx, RR_TYPE_A, RR_CLASS_IN
16 from threading import Thread
2417
25 def run(self):
26 print "Thread lookup started:",self.name
27 status, result = self.ctx.resolve(self.name, RR_TYPE_A, RR_CLASS_IN)
28 if status == 0 and result.havedata:
29 print " Result:",self.name,":", result.data.address_list
30
31 threads = []
32 for name in ["www.fit.vutbr.cz","www.vutbr.cz","www.google.com"]:
33 thread = LookupThread(ctx, name)
34 thread.start()
35 threads.append(thread)
36
37 for thread in threads:
38 thread.join()
18 ctx = ub_ctx()
19 ctx.resolvconf("/etc/resolv.conf")
3920
21 class LookupThread(Thread):
22 def __init__(self,ctx, name):
23 Thread.__init__(self)
24 self.ctx = ctx
25 self.name = name
4026
27 def run(self):
28 print "Thread lookup started:",self.name
29 status, result = self.ctx.resolve(self.name, RR_TYPE_A, RR_CLASS_IN)
30 if status == 0 and result.havedata:
31 print " Result:",self.name,":", result.data.address_list
32
33 threads = []
34 for name in ["www.fit.vutbr.cz","www.vutbr.cz","www.google.com"]:
35 thread = LookupThread(ctx, name)
36 thread.start()
37 threads.append(thread)
38
39 for thread in threads:
40 thread.join()
00 .. _example_asynch:
11
2 ==============================
32 Asynchronous lookup
4 ==============================
3 ===================
54
65 This example performs the name lookup in the background.
76 The main program keeps running while the name is resolved.
7
8 Source code
9 -----------
810
911 ::
1012
3234 if (status != 0):
3335 print "Resolve error:", unbound.ub_strerror(status)
3436
35 The :meth:`unbound.ub_ctx.resolve_async` method is able to pass on any Python object. In this example, we used a dictionary object `my_data`.
37 The :meth:`unbound.ub_ctx.resolve_async` method is able to pass on any Python
38 object. In this example, we used a dictionary object ``my_data``.
00 .. _example_examine:
11
2 ==============================
32 DNSSEC validator
4 ==============================
3 ================
54
65 This example program performs DNSSEC validation of a DNS lookup.
76
7 Source code
8 -----------
9
810 ::
911
10 #!/usr/bin/python
11 import os
12 from unbound import ub_ctx,RR_TYPE_A,RR_CLASS_IN
13
14 ctx = ub_ctx()
15 ctx.resolvconf("/etc/resolv.conf")
16 if (os.path.isfile("keys")):
17 ctx.add_ta_file("keys") #read public keys for DNSSEC verification
18
19 status, result = ctx.resolve("www.nic.cz", RR_TYPE_A, RR_CLASS_IN)
20 if status == 0 and result.havedata:
21
22 print "Result:", result.data.address_list
23
24 if result.secure:
25 print "Result is secure"
26 elif result.bogus:
27 print "Result is bogus"
28 else:
29 print "Result is insecure"
12 #!/usr/bin/python
13 import os
14 from unbound import ub_ctx,RR_TYPE_A,RR_CLASS_IN
15
16 ctx = ub_ctx()
17 ctx.resolvconf("/etc/resolv.conf")
18 if (os.path.isfile("keys")):
19 ctx.add_ta_file("keys") #read public keys for DNSSEC verification
20
21 status, result = ctx.resolve("www.nic.cz", RR_TYPE_A, RR_CLASS_IN)
22 if status == 0 and result.havedata:
23
24 print "Result:", result.data.address_list
25
26 if result.secure:
27 print "Result is secure"
28 elif result.bogus:
29 print "Result is bogus"
30 else:
31 print "Result is insecure"
3032
3133 More detailed informations can be seen in libUnbound DNSSEC tutorial `here`_.
3234
00 .. _example_resolver_only:
11
2 ==============================
32 Resolver only
4 ==============================
3 =============
54
65 This example program shows how to perform DNS resolution only.
76 Unbound contains two basic modules: resolver and validator.
8 In case, the validator is not necessary, the validator module can be turned off using "module-config" option.
9 This option contains a list of module names separated by the space char. This list determined which modules should be employed and in what order.
7 In case, the validator is not necessary, the validator module can be turned off
8 using "module-config" option.
9 This option contains a list of module names separated by the space char. This
10 list determined which modules should be employed and in what order.
11
12 Source code
13 -----------
1014
1115 ::
1216
2428 print "Result:", result.data.address_list
2529
2630 .. note::
27 The :meth:`unbound.ub_ctx.set_option` method must be used before the first resolution (i.e. before :meth:`unbound.ub_ctx.resolve` or :meth:`unbound.ub_ctx.resolve_async` call).
28
31 The :meth:`unbound.ub_ctx.set_option` method must be used before the first
32 resolution (i.e. before :meth:`unbound.ub_ctx.resolve` or
33 :meth:`unbound.ub_ctx.resolve_async` call).
00 .. _example_localzone:
11
2 ==============================
32 Local zone manipulation
4 ==============================
3 =======================
54
6 This example program shows how to define local zone containing custom DNS records.
5 This example program shows how to define local zone containing custom DNS
6 records.
77
8 .. literalinclude:: example6-1.py
9 :language: python
8 Source code
9 -----------
1010
11 .. literalinclude:: example6-1.py
12 :language: python
00 .. _example_idna:
11
2 =================================================
32 Internationalized domain name support
4 =================================================
3 =====================================
54
65 Unlike the libUnbound, pyUnbound is able to handle IDN queries.
76
8 .. literalinclude:: example7-1.py
9 :language: python
7 Automatic IDN DNAME conversion
8 -------------------------------
109
11 If we use unicode string in :meth:`unbound.ub_ctx.resolve` method, the IDN DNAME conversion (if it is necessary) is performed on background.
10 If we use unicode string in :meth:`unbound.ub_ctx.resolve` method,
11 the IDN DNAME conversion (if it is necessary) is performed on background.
1212
13 .. literalinclude:: example7-2.py
14 :language: python
13 Source code
14 ...........
1515
16 The :class:`unbound.ub_data` class contains attributes suffix which converts the dname to UTF string. These attributes have the '_idn' suffix.
17 Apart from this aproach, two conversion functions exist (:func:`unbound.idn2dname` and :func:`unbound.dname2idn`).
16 .. literalinclude:: example7-1.py
17 :language: python
18
19 IDN converted attributes
20 ------------------------
21
22 The :class:`unbound.ub_data` class contains attributes suffix which converts
23 the dname to UTF string. These attributes have the ``_idn`` suffix.
24
25 Apart from this aproach, two conversion functions exist
26 (:func:`unbound.idn2dname` and :func:`unbound.dname2idn`).
27
28 Source code
29 ...........
30
31 .. literalinclude:: example7-2.py
32 :language: python
00 .. _example_mxlookup:
11
2 =================================================
32 Lookup for MX and NS records
4 =================================================
3 ============================
54
6 The pyUnbound extension provides functions which are able to encode RAW RDATA produces by unbound resolver (see :class:`unbound.ub_data`).
5 The pyUnbound extension provides functions which are able to encode RAW RDATA
6 produces by unbound resolver (see :class:`unbound.ub_data`).
77
8 .. literalinclude:: example8-1.py
9 :language: python
8 Source code
9 -----------
1010
11 Previous example produces following output::
11 .. literalinclude:: example8-1.py
12 :language: python
1213
13 Result:
14 raw data: 00 0F 05 6D 61 69 6C 34 03 6E 69 63 02 63 7A 00;00 14 02 6D 78 05 63 7A 6E 69 63 03 6F 72 67 00;00 0A 04 6D 61 69 6C 03 6E 69 63 02 63 7A 00
15 priority:15 address: mail4.nic.cz.
16 priority:20 address: mx.cznic.org.
17 priority:10 address: mail.nic.cz.
14 Output
15 ------
1816
19 Result:
20 raw data: D9 1F CD 32
21 address: 217.31.205.50
17 The previous example produces the following output::
2218
23 Result:
24 raw data: 01 61 02 6E 73 03 6E 69 63 02 63 7A 00;01 65 02 6E 73 03 6E 69 63 02 63 7A 00;01 63 02 6E 73 03 6E 69 63 02 63 7A 00
25 host: a.ns.nic.cz.
26 host: e.ns.nic.cz.
27 host: c.ns.nic.cz.
19 Result:
20 raw data: 00 0F 05 6D 61 69 6C 34 03 6E 69 63 02 63 7A 00;00 14 02 6D 78 05 63 7A 6E 69 63 03 6F 72 67 00;00 0A 04 6D 61 69 6C 03 6E 69 63 02 63 7A 00
21 priority:15 address: mail4.nic.cz.
22 priority:20 address: mx.cznic.org.
23 priority:10 address: mail.nic.cz.
24
25 Result:
26 raw data: D9 1F CD 32
27 address: 217.31.205.50
28
29 Result:
30 raw data: 01 61 02 6E 73 03 6E 69 63 02 63 7A 00;01 65 02 6E 73 03 6E 69 63 02 63 7A 00;01 63 02 6E 73 03 6E 69 63 02 63 7A 00
31 host: a.ns.nic.cz.
32 host: e.ns.nic.cz.
33 host: c.ns.nic.cz.
00 Examples
1 ==============================
1 ========
22
3 Here you can find several examples which utilizes the unbound library in Python environment.
4 Unbound is a caching validator and resolver and can be linked into an application, as a library where can answer DNS queries for the application.
3 Here you can find several examples which utilizes the unbound library in Python
4 environment. Unbound is a caching validator and resolver and can be linked into
5 an application, as a library where can answer DNS queries for the application.
56 This set of examples shows how to use the functions from Python environment.
67
7 `Tutorials`
8 Tutorials
9 ---------
810
911 .. toctree::
10 :maxdepth: 1
11 :glob:
12 :maxdepth: 1
13 :glob:
1214
13 example*
15 example*
00 Installation
1 ===================================
1 ============
22
3 **Prerequisites**
3 Prerequisites
4 -------------
45
56 Python 2.4 or higher, SWIG 1.3 or higher, GNU make
67
7 **Compiling**
8 Compiling
9 ---------
810
911 After downloading, you can compile the pyUnbound library by doing::
1012
11 > tar -xzf unbound-x.x.x-py.tar.gz
12 > cd unbound-x.x.x
13 > ./configure --with-pyunbound
14 > make
13 > tar -xzf unbound-x.x.x-py.tar.gz
14 > cd unbound-x.x.x
15 > ./configure --with-pyunbound
16 > make
1517
16 You may want to --with-pythonmodule as well if you want to use python as
17 a module in the resolver.
18 You may want to enable ``--with-pythonmodule`` as well if you want to use
19 python as a module in the resolver.
1820
19 You need GNU make to compile sources; SWIG and Python devel libraries to compile extension module.
21 You need ``GNU make`` to compile sources; ``SWIG`` and ``Python devel``
22 libraries to compile extension module.
2023
2124
22 **Testing**
25 Testing
26 -------
2327
24 If the compilation is successful, you can test the python LDNS extension module by::
28 If the compilation is successful, you can test the python LDNS extension module
29 by::
2530
26 > cd contrib/python
27 > make testenv
28 > ./dns-lookup.py
31 > cd contrib/python
32 > make testenv
33 > ./dns-lookup.py
2934
30 You may want to make install in the main directory since make testenv is for debugging. In contrib/examples you can find simple applications written in Python using the Unbound extension.
35 You may want to ``make install`` in the main directory since ``make testenv``
36 is for debugging. In contrib/examples you can find simple applications written
37 in Python using the Unbound extension.
00 Introduction
1 ===================================
1 ============
22
3 **Unbound**
3 Unbound
4 -------
45
5 `Unbound`_ is an implementation of a DNS resolver, that performs caching and DNSSEC validation.
6 Together with unbound, the libunbound library is provided.
7 This library can be used to convert hostnames to ip addresses, and back, as well as obtain other information.
8 Since the resolver allows to specify the class and type of a query (A record, NS, MX, ...), this library offers powerful resolving tool.
9 The library also performs public-key validation of results with DNSSEC.
10
11 .. _Unbound: http://www.unbound.net/documentation
6 `Unbound`_ is an implementation of a DNS resolver, that performs caching and
7 DNSSEC validation.
8 Together with unbound, the libunbound library is provided.
9 This library can be used to convert hostnames to ip addresses, and back, as
10 well as obtain other information.
11 Since the resolver allows to specify the class and type of a query (A record,
12 NS, MX, ...), this library offers powerful resolving tool.
13 The library also performs public-key validation of results with DNSSEC.
1214
13 **pyUnbound**
15 .. _Unbound: http://www.unbound.net/documentation
1416
15 The pyUnbound is an extension module for Python which provides an object-oriented interface to libunbound.
16 It is the first Python module which offers thread-safe caching resolver.
17
18 The interface was designed with the emphasis on the simplicity of use.
19 There are two main classes :class:`unbound.ub_ctx` (a validation and resolution context) and :class:`unbound.ub_result` which contains the validation and resolution results.
20 The objects are thread-safe, and a context can be used in non-threaded as well as threaded environment.
21 Resolution can be performed blocking and non-blocking (i.e. asynchronous).
22 The asynchronous method returns from the call immediately, so that processing can go on, while the results become available later.
17 pyUnbound
18 ---------
2319
24 **Features**
25 * customizable caching validation resolver for synchronous and asynchronous lookups
26 * easy to use object interface
27 * easy to integrate extension module
28 * designed for thread environment (i.e. thread-safe)
29 * allows define and customize of local zone and its RR's during the operation (i.e. without restart)
30 * includes encoding functions to simplify the results retrieval
31 * Internationalized domain name (`IDN`_) support
20 The pyUnbound is an extension module for Python which provides an
21 object-oriented interface to libunbound.
22 It is the first Python module which offers thread-safe caching resolver.
3223
33 .. _IDN: http://en.wikipedia.org/wiki/Internationalized_domain_name
24 The interface was designed with the emphasis on the simplicity of use.
25 There are two main classes :class:`unbound.ub_ctx` (a validation and resolution
26 context) and :class:`unbound.ub_result` which contains the validation and
27 resolution results.
28 The objects are thread-safe, and a context can be used in non-threaded as well
29 as threaded environment.
30 Resolution can be performed blocking and non-blocking (i.e. asynchronous).
31 The asynchronous method returns from the call immediately, so that processing
32 can go on, while the results become available later.
3433
35 **Application area**
36 * DNS-based applications performing DNS lookups; the caching resolver can reduce overhead
37 * Applications where the validation of DNS records is required
38 * Great solution for customizable and dynamic DNS-based white/blacklists (spam rejection, connection rejection, ...) using the dynamic local zone manipulation
34 Features
35 --------
36
37 * Customizable caching validation resolver for synchronous and asynchronous
38 lookups
39 * Easy to use object interface
40 * Easy to integrate extension module
41 * Designed for thread environment (i.e. thread-safe)
42 * Allows define and customize of local zone and its RR's during the operation
43 (i.e. without restart)
44 * Includes encoding functions to simplify the results retrieval
45 * Internationalized domain name (`IDN`_) support
46
47 .. _IDN: http://en.wikipedia.org/wiki/Internationalized_domain_name
48
49 Application area
50 ----------------
51
52 * DNS-based applications performing DNS lookups; the caching resolver can
53 reduce overhead
54 * Applications where the validation of DNS records is required
55 * Great solution for customizable and dynamic DNS-based white/blacklists (spam
56 rejection, connection rejection, ...) using the dynamic local zone
57 manipulation
4848 struct module_qstate;
4949 struct tube;
5050 struct edns_option;
51 struct query_info;
5152
5253 /**
5354 * Worker service routine to send serviced queries to authoritative servers.
54 * @param qname: query name. (host order)
55 * @param qnamelen: length in bytes of qname, including trailing 0.
56 * @param qtype: query type. (host order)
57 * @param qclass: query class. (host order)
55 * @param qinfo: query info.
5856 * @param flags: host order flags word, with opcode and CD bit.
5957 * @param dnssec: if set, EDNS record will have DO bit set.
6058 * @param want_dnssec: signatures needed.
6159 * @param nocaps: ignore capsforid(if in config), do not perturb qname.
62 * @param opt_list: EDNS options on outgoing packet.
6360 * @param addr: where to.
6461 * @param addrlen: length of addr.
6562 * @param zone: delegation point name.
6663 * @param zonelen: length of zone name wireformat dname.
64 * @param ssl_upstream: use SSL for upstream queries.
6765 * @param q: wich query state to reactivate upon return.
6866 * @return: false on failure (memory or socket related). no query was
6967 * sent.
7068 */
71 struct outbound_entry* libworker_send_query(uint8_t* qname, size_t qnamelen,
72 uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec,
73 int want_dnssec, int nocaps, struct edns_option* opt_list,
69 struct outbound_entry* libworker_send_query(struct query_info* qinfo,
70 uint16_t flags, int dnssec, int want_dnssec, int nocaps,
7471 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone,
75 size_t zonelen, struct module_qstate* q);
72 size_t zonelen, int ssl_upstream, struct module_qstate* q);
7673
7774 /** process incoming replies from the network */
7875 int libworker_handle_reply(struct comm_point* c, void* arg, int error,
107104
108105 /**
109106 * Worker service routine to send serviced queries to authoritative servers.
110 * @param qname: query name. (host order)
111 * @param qnamelen: length in bytes of qname, including trailing 0.
112 * @param qtype: query type. (host order)
113 * @param qclass: query class. (host order)
107 * @param qinfo: query info.
114108 * @param flags: host order flags word, with opcode and CD bit.
115109 * @param dnssec: if set, EDNS record will have DO bit set.
116110 * @param want_dnssec: signatures needed.
117111 * @param nocaps: ignore capsforid(if in config), do not perturb qname.
118 * @param opt_list: EDNS options on outgoing packet.
119112 * @param addr: where to.
120113 * @param addrlen: length of addr.
121114 * @param zone: wireformat dname of the zone.
122115 * @param zonelen: length of zone name.
116 * @param ssl_upstream: use SSL for upstream queries.
123117 * @param q: wich query state to reactivate upon return.
124118 * @return: false on failure (memory or socket related). no query was
125119 * sent.
126120 */
127 struct outbound_entry* worker_send_query(uint8_t* qname, size_t qnamelen,
128 uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec,
129 int want_dnssec, int nocaps, struct edns_option* opt_list,
121 struct outbound_entry* worker_send_query(struct query_info* qinfo,
122 uint16_t flags, int dnssec, int want_dnssec, int nocaps,
130123 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone,
131 size_t zonelen, struct module_qstate* q);
124 size_t zonelen, int ssl_upstream, struct module_qstate* q);
132125
133126 /**
134127 * process control messages from the main thread. Frees the control
7979 # Options for HTML output
8080 # -----------------------
8181
82 # The theme that the html output should use.
83 html_theme = "classic"
84
8285 # The style sheet to use for HTML and HTML Help pages. A file of that name
8386 # must exist either in Sphinx' static/ path, or in one of the custom paths
8487 # given in html_static_path.
85 html_style = 'default.css'
88 #html_style = 'default.css'
8689
8790 # The name for this set of Sphinx documents. If None, it defaults to
8891 # "<project> v<release> documentation".
00 .. _log_handler:
11
22 Packet logger
3 =========================
3 =============
44
55 This example shows how to log and print details about query and response.
6 As soon as the ``iterator`` has finished (event is :data:`module_event_moddone`), ``qstate.return_msg`` contains response packet or ``None``.
6 As soon as the ``iterator`` has finished (event is
7 :data:`module_event_moddone`), ``qstate.return_msg`` contains response packet
8 or ``None``.
79 This packet will be send to a client that asked for it.
810
911 Complete source code
1315 :language: python
1416
1517 Testing
16 ------------------
18 -------
1719 Run the unbound server:
1820
1921 ``root@localhost>unbound -dv -c ./test-log.conf``
2022
21 In case you use own configuration file, don't forget to enable python module: ``module-config: "validator python iterator"`` and use valid script path: ``python-script: "./examples/log.py"``.
23 In case you use own configuration file, don't forget to enable python module:
24 ``module-config: "validator python iterator"`` and use valid script path:
25 ``python-script: "./examples/log.py"``.
2226
23 Example of output::
27 Example of output::
2428
2529 [1231790168] unbound[7941:0] info: response for <f.gtld-servers.NET. AAAA IN>
2630 [1231790168] unbound[7941:0] info: reply from <gtld-servers.NET.> 192.5.6.31#53
00 Response generation
1 =====================
1 ===================
22
33 This example shows how to handle queries and generate response packet.
44
55 .. note::
6 If the python module is the first module and validator module is enabled (``module-config: "python validator iterator"``),
7 a return_msg security flag has to be set at least to 2. Leaving security flag untouched causes that the
8 response will be refused by unbound worker as unbound will consider it as non-valid response.
6 If the python module is the first module and validator module is enabled
7 (``module-config: "python validator iterator"``), a return_msg security flag
8 has to be set at least to 2. Leaving security flag untouched causes that the
9 response will be refused by unbound worker as unbound will consider it as
10 non-valid response.
911
1012 Complete source code
1113 --------------------
2628
2729 Dig produces the following output::
2830
29 ;; global options: printcmd
30 ;; Got answer:
31 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48426
32 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
33
34 ;; QUESTION SECTION:
35 ;test.xxx.localdomain. IN A
36
37 ;; ANSWER SECTION:
38 test.xxx.localdomain. 10 IN A 127.0.0.1
39
40 ;; Query time: 2 msec
41 ;; SERVER: 127.0.0.1#53(127.0.0.1)
42 ;; WHEN: Mon Jan 01 12:46:02 2009
43 ;; MSG SIZE rcvd: 54
31 ;; global options: printcmd
32 ;; Got answer:
33 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48426
34 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
4435
45 As we handle (override) in python module only queries ending with "localdomain.", the unboud can still resolve host names.
36 ;; QUESTION SECTION:
37 ;test.xxx.localdomain. IN A
38
39 ;; ANSWER SECTION:
40 test.xxx.localdomain. 10 IN A 127.0.0.1
41
42 ;; Query time: 2 msec
43 ;; SERVER: 127.0.0.1#53(127.0.0.1)
44 ;; WHEN: Mon Jan 01 12:46:02 2009
45 ;; MSG SIZE rcvd: 54
46
47 As we handle (override) in the python module only queries ending with
48 ``localdomain.``, unboud can still resolve host names.
00 DNS-based language dictionary
1 ===============================
1 =============================
22
33 This example shows how to create a simple language dictionary based on **DNS**
4 service within 15 minutes. The translation will be performed using TXT resource records.
4 service within 15 minutes. The translation will be performed using TXT resource
5 records.
56
67 Key parts
7 -----------
8 ---------
89
910 Initialization
10 ~~~~~~~~~~~~~~~~~~~~~~~
11 On **init()** module loads dictionary from a text file containing records in ``word [tab] translation`` format.
11 ~~~~~~~~~~~~~~
12
13 On **init()** module loads dictionary from a text file containing records in
14 ``word [tab] translation`` format.
15
1216 ::
1317
1418 def init(id, cfg):
1923 The suitable file can be found at http://slovnik.zcu.cz
2024
2125 DNS query and word lookup
22 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 ~~~~~~~~~~~~~~~~~~~~~~~~~
2327
24 Let's define the following format od DNS queries: ``word1[.]word2[.] ... wordN[.]{en,cs}[._dict_.cz.]``.
28 Let's define the following format od DNS queries:
29 ``word1[.]word2[.] ... wordN[.]{en,cs}[._dict_.cz.]``.
2530 Word lookup is done by simple ``dict`` lookup from broken DNS request.
26 Query name is divided into a list of labels. This list is accessible as qname_list attribute.
31 Query name is divided into a list of labels. This list is accessible as
32 ``qname_list`` attribute.
33
2734 ::
2835
2936 aword = ' '.join(qstate.qinfo.qname_list[0:-4]) #skip last four labels
3643 if (adict == "cs") and (aword in cz_dict):
3744 words = cz_dict[aword] # CS -> EN
3845
39 In the first step, we get a string in the form: ``word1[space]word2[space]...word[space]``.
40 In the second assignment, fourth label from the end is obtained. This label should contains *"cs"* or *"en"*.
41 This label determines the direction of translation.
42
46 In the first step, we get a string in the form:
47 ``word1[space]word2[space]...word[space]``.
48 In the second assignment, fourth label from the end is obtained. This label
49 should contains *"cs"* or *"en"*. This label determines the direction of
50 translation.
4351
4452 Forming of a DNS reply
45 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53 ~~~~~~~~~~~~~~~~~~~~~~
4654
4755 DNS reply is formed only on valid match and added as TXT answer.
56
4857 ::
4958
50 msg = DNSMessage(qstate.qinfo.qname_str, RR_TYPE_TXT, RR_CLASS_IN, PKT_AA)
59 msg = DNSMessage(qstate.qinfo.qname_str, RR_TYPE_TXT, RR_CLASS_IN, PKT_AA)
5160
52 for w in words:
53 msg.answer.append("%s 300 IN TXT \"%s\"" % (qstate.qinfo.qname_str, w.replace("\"", "\\\"")))
61 for w in words:
62 msg.answer.append("%s 300 IN TXT \"%s\"" % (qstate.qinfo.qname_str, w.replace("\"", "\\\"")))
5463
55 if not msg.set_return_msg(qstate):
56 qstate.ext_state[id] = MODULE_ERROR
57 return True
64 if not msg.set_return_msg(qstate):
65 qstate.ext_state[id] = MODULE_ERROR
66 return True
5867
59 qstate.return_rcode = RCODE_NOERROR
60 qstate.ext_state[id] = MODULE_FINISHED
61 return True
68 qstate.return_rcode = RCODE_NOERROR
69 qstate.ext_state[id] = MODULE_FINISHED
70 return True
6271
63 In the first step, a :class:`DNSMessage` instance is created for a given query *(type TXT)*.
72 In the first step, a :class:`DNSMessage` instance is created for a given query
73 *(type TXT)*.
6474 The fourth argument specifies the flags *(authoritative answer)*.
65 In the second step, we append TXT records containing the translation *(on the right side of RR)*.
75 In the second step, we append TXT records containing the translation *(on the
76 right side of RR)*.
6677 Then, the response is finished and ``qstate.return_msg`` contains new response.
67 If no error, the module sets :attr:`module_qstate.return_rcode` and :attr:`module_qstate.ext_state`.
78 If no error, the module sets :attr:`module_qstate.return_rcode` and
79 :attr:`module_qstate.ext_state`.
6880
6981 **Steps:**
7082
8193
8294 In case you use own configuration file, don't forget to enable Python module::
8395
84 module-config: "validator python iterator"
96 module-config: "validator python iterator"
8597
8698 and use valid script path::
8799
88 python-script: "./examples/dict.py"
100 python-script: "./examples/dict.py"
89101
90102 The translation from english word *"a bar fly"* to Czech can be done by doing:
91103
92104 ``>>>dig TXT @127.0.0.1 a.bar.fly.en._dict_.cz``
93105
94 ::
106 ::
95107
96 ; (1 server found)
97 ;; global options: printcmd
98 ;; Got answer:
99 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48691
100 ;; flags: aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
101
102 ;; QUESTION SECTION:
103 ;a.bar.fly.en._dict_.cz. IN TXT
104
105 ;; ANSWER SECTION:
106 a.bar.fly.en._dict_.cz. 300 IN TXT "barov\253 povale\232"
107
108 ;; Query time: 5 msec
109 ;; SERVER: 127.0.0.1#53(127.0.0.1)
110 ;; WHEN: Mon Jan 01 17:44:18 2009
111 ;; MSG SIZE rcvd: 67
112
108 ; (1 server found)
109 ;; global options: printcmd
110 ;; Got answer:
111 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48691
112 ;; flags: aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
113
114 ;; QUESTION SECTION:
115 ;a.bar.fly.en._dict_.cz. IN TXT
116
117 ;; ANSWER SECTION:
118 a.bar.fly.en._dict_.cz. 300 IN TXT "barov\253 povale\232"
119
120 ;; Query time: 5 msec
121 ;; SERVER: 127.0.0.1#53(127.0.0.1)
122 ;; WHEN: Mon Jan 01 17:44:18 2009
123 ;; MSG SIZE rcvd: 67
124
113125 ``>>>dig TXT @127.0.0.1 nic.cs._dict_.cz``
126
114127 ::
115128
116 ; <<>> DiG 9.5.0-P2 <<>> TXT @127.0.0.1 nic.cs._dict_.cz
117 ; (1 server found)
118 ;; global options: printcmd
119 ;; Got answer:
120 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58710
121 ;; flags: aa rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
122
123 ;; QUESTION SECTION:
124 ;nic.cs._dict_.cz. IN TXT
125
126 ;; ANSWER SECTION:
127 nic.cs._dict_.cz. 300 IN TXT "aught"
128 nic.cs._dict_.cz. 300 IN TXT "naught"
129 nic.cs._dict_.cz. 300 IN TXT "nihil"
130 nic.cs._dict_.cz. 300 IN TXT "nix"
131 nic.cs._dict_.cz. 300 IN TXT "nothing"
132 nic.cs._dict_.cz. 300 IN TXT "zilch"
133
134 ;; Query time: 0 msec
135 ;; SERVER: 127.0.0.1#53(127.0.0.1)
136 ;; WHEN: Mon Jan 01 17:45:39 2009
137 ;; MSG SIZE rcvd: 143
129 ; <<>> DiG 9.5.0-P2 <<>> TXT @127.0.0.1 nic.cs._dict_.cz
130 ; (1 server found)
131 ;; global options: printcmd
132 ;; Got answer:
133 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58710
134 ;; flags: aa rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
138135
139 Proof that the unbound still works as resolver.
136 ;; QUESTION SECTION:
137 ;nic.cs._dict_.cz. IN TXT
138
139 ;; ANSWER SECTION:
140 nic.cs._dict_.cz. 300 IN TXT "aught"
141 nic.cs._dict_.cz. 300 IN TXT "naught"
142 nic.cs._dict_.cz. 300 IN TXT "nihil"
143 nic.cs._dict_.cz. 300 IN TXT "nix"
144 nic.cs._dict_.cz. 300 IN TXT "nothing"
145 nic.cs._dict_.cz. 300 IN TXT "zilch"
146
147 ;; Query time: 0 msec
148 ;; SERVER: 127.0.0.1#53(127.0.0.1)
149 ;; WHEN: Mon Jan 01 17:45:39 2009
150 ;; MSG SIZE rcvd: 143
151
152 Proof that the unbound still works as resolver.
140153
141154 ``>>>dig A @127.0.0.1 www.nic.cz``
155
142156 ::
143157
144 ; (1 server found)
145 ;; global options: printcmd
146 ;; Got answer:
147 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19996
148 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 5
149
150 ;; QUESTION SECTION:
151 ;www.nic.cz. IN A
152
153 ;; ANSWER SECTION:
154 www.nic.cz. 1662 IN A 217.31.205.50
155
156 ;; AUTHORITY SECTION:
157 ...
158 ; (1 server found)
159 ;; global options: printcmd
160 ;; Got answer:
161 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19996
162 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 5
163
164 ;; QUESTION SECTION:
165 ;www.nic.cz. IN A
166
167 ;; ANSWER SECTION:
168 www.nic.cz. 1662 IN A 217.31.205.50
169
170 ;; AUTHORITY SECTION:
171 ...
158172
159173 Complete source code
160174 --------------------
0 EDNS options
1 ============
2
3 This example shows how to interact with EDNS options.
4
5 When quering unbound with the EDNS option ``65001`` and data ``0xc001`` we
6 expect an answer with the same EDNS option code and data ``0xdeadbeef``.
7
8
9 Key parts
10 ~~~~~~~~~
11
12 This example relies on the following functionalities:
13
14
15 Registering EDNS options
16 ------------------------
17
18 By registering EDNS options we can tune unbound's behavior when encountering a
19 query with a known EDNS option. The two available options are:
20
21 - ``bypass_cache_stage``: If set to ``True`` unbound will not try to answer
22 from cache. Instead execution is passed to the modules
23 - ``no_aggregation``: If set to ``True`` unbound will consider this query
24 unique and will not aggregate it with similar queries
25
26 Both values default to ``False``.
27
28 .. code-block:: python
29
30 if not register_edns_option(env, 65001, bypass_cache_stage=True,
31 no_aggregation=True):
32 log_info("python: Could not register EDNS option {}".format(65001))
33
34
35 EDNS option lists
36 -----------------
37
38 EDNS option lists can be found in the :class:`module_qstate` class. There are
39 four available lists in total:
40
41 - :class:`module_qstate.edns_opts_front_in`: options that came from the client
42 side. **Should not** be changed
43 - :class:`module_qstate.edns_opts_back_out`: options that will be sent to the
44 server side. Can be populated by edns literate modules
45 - :class:`module_qstate.edns_opts_back_in`: options that came from the server
46 side. **Should not** be changed
47 - :class:`module_qstate.edns_opts_front_out`: options that will be sent to the
48 client side. Can be populated by edns literate modules
49
50 Each list element has the following members:
51
52 - ``code``: the EDNS option code;
53 - ``data``: the EDNS option data.
54
55
56 Reading an EDNS option list
57 ...........................
58
59 The lists' contents can be accessed in python by their ``_iter`` counterpart as
60 an iterator:
61
62 .. code-block:: python
63
64 if not edns_opt_list_is_empty(qstate.edns_opts_front_in):
65 for o in qstate.edns_opts_front_in_iter:
66 log_info("python: Code: {}, Data: '{}'".format(o.code,
67 "".join('{:02x}'.format(x) for x in o.data)))
68
69
70 Writing to an EDNS option list
71 ..............................
72
73 By appending to an EDNS option list we can add new EDNS options. The new
74 element is going to be allocated in :class:`module_qstate.region`. The data
75 **must** be represented with a python ``bytearray``:
76
77 .. code-block:: python
78
79 b = bytearray.fromhex("deadbeef")
80 if not edns_opt_list_append(qstate.edns_opts_front_out,
81 o.code, b, qstate.region):
82 log_info("python: Could not append EDNS option {}".format(o.code))
83
84 We can also remove an EDNS option code from an EDNS option list.
85
86 .. code-block:: python
87
88 if not edns_opt_list_remove(edns_opt_list, code):
89 log_info("python: Option code {} was not found in the "
90 "list.".format(code))
91
92 .. note:: All occurences of the EDNS option code will be removed from the list:
93
94
95 Controlling other modules' cache behavior
96 -----------------------------------------
97
98 During the modules' operation, some modules may interact with the cache
99 (e.g., iterator). This behavior can be controlled by using the following
100 :class:`module_qstate` flags:
101
102 - :class:`module_qstate.no_cache_lookup`: Modules *operating after* this module
103 will not lookup the cache for an answer
104 - :class:`module_qstate.no_cache_store`: Modules *operating after* this module
105 will not store the response in the cache
106
107 Both values default to ``0``.
108
109 .. code-block:: python
110
111 def operate(id, event, qstate, qdata):
112 if (event == MODULE_EVENT_NEW) or (event == MODULE_EVENT_PASS):
113 # Detect if edns option code 56001 is present from the client side. If
114 # so turn on the flags for cache management.
115 if not edns_opt_list_is_empty(qstate.edns_opts_front_in):
116 log_info("python: searching for edns option code 65001 during NEW "
117 "or PASS event ")
118 for o in qstate.edns_opts_front_in_iter:
119 if o.code == 65001:
120 log_info("python: found edns option code 65001")
121 # Instruct other modules to not lookup for an
122 # answer in the cache.
123 qstate.no_cache_lookup = 1
124 log_info("python: enabled no_cache_lookup")
125
126 # Instruct other modules to not store the answer in
127 # the cache.
128 qstate.no_cache_store = 1
129 log_info("python: enabled no_cache_store")
130
131
132 Testing
133 ~~~~~~~
134
135 Run the Unbound server: ::
136
137 root@localhost$ unbound -dv -c ./test-edns.conf
138
139 In case you use your own configuration file, don't forget to enable the Python
140 module::
141
142 module-config: "validator python iterator"
143
144 and use a valid script path::
145
146 python-script: "./examples/edns.py"
147
148 Quering with EDNS option ``65001:0xc001``:
149
150 ::
151
152 root@localhost$ dig @localhost nlnetlabs.nl +ednsopt=65001:c001
153
154 ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @localhost nlnetlabs.nl +ednsopt=65001:c001
155 ; (1 server found)
156 ;; global options: +cmd
157 ;; Got answer:
158 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33450
159 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 3
160
161 ;; OPT PSEUDOSECTION:
162 ; EDNS: version: 0, flags:; udp: 4096
163 ; OPT=65001: de ad be ef ("....")
164 ;; QUESTION SECTION:
165 ;nlnetlabs.nl. IN A
166
167 ;; ANSWER SECTION:
168 nlnetlabs.nl. 10200 IN A 185.49.140.10
169
170 ;; AUTHORITY SECTION:
171 nlnetlabs.nl. 10200 IN NS anyns.pch.net.
172 nlnetlabs.nl. 10200 IN NS ns.nlnetlabs.nl.
173 nlnetlabs.nl. 10200 IN NS ns-ext1.sidn.nl.
174 nlnetlabs.nl. 10200 IN NS sec2.authdns.ripe.net.
175
176 ;; ADDITIONAL SECTION:
177 ns.nlnetlabs.nl. 10200 IN AAAA 2a04:b900::8:0:0:60
178 ns.nlnetlabs.nl. 10200 IN A 185.49.140.60
179
180 ;; Query time: 10 msec
181 ;; SERVER: 127.0.0.1#53(127.0.0.1)
182 ;; WHEN: Mon Dec 05 14:50:56 CET 2016
183 ;; MSG SIZE rcvd: 212
184
185
186 Complete source code
187 ~~~~~~~~~~~~~~~~~~~~
188
189 .. literalinclude:: ../../examples/edns.py
190 :language: python
0 Inplace callbacks
1 =================
2
3 This example shows how to register and use inplace callback functions. These
4 functions are going to be called just before unbound replies back to a client.
5 They can perform certain actions without interrupting unbound's execution flow
6 (e.g. add/remove EDNS options, manipulate the reply).
7
8 Two different scenarios will be shown:
9
10 - If answering from cache and the client used EDNS option code ``65002`` we
11 will answer with the same code but with data ``0xdeadbeef``;
12 - When answering with a SERVFAIL we also add an empty EDNS option code
13 ``65003``.
14
15
16 Key parts
17 ~~~~~~~~~
18
19 This example relies on the following functionalities:
20
21
22 Registering inplace callback functions
23 --------------------------------------
24
25 There are four types of inplace callback functions:
26
27 - `inplace callback reply functions`_
28 - `inplace callback reply_cache functions`_
29 - `inplace callback reply_local functions`_
30 - `inplace callback reply_servfail functions`_
31
32
33 Inplace callback reply functions
34 ................................
35
36 Called when answering with a *resolved* query.
37
38 The callback function's prototype is the following:
39
40 .. code-block:: python
41
42 def inplace_reply_callback(qinfo, qstate, rep, rcode, edns, opt_list_out, region):
43 """Function that will be registered as an inplace callback function.
44 It will be called when answering with a resolved query.
45 :param qinfo: query_info struct;
46 :param qstate: module qstate. It contains the available opt_lists; It
47 SHOULD NOT be altered;
48 :param rep: reply_info struct;
49 :param rcode: return code for the query;
50 :param edns: edns_data to be sent to the client side. It SHOULD NOT be
51 altered;
52 :param opt_list_out: the list with the EDNS options that will be sent as a
53 reply. It can be populated with EDNS options;
54 :param region: region to allocate temporary data. Needs to be used when we
55 want to append a new option to opt_list_out.
56 :return: True on success, False on failure.
57 """
58
59 .. note:: The function's name is irrelevant.
60
61 We can register such function as:
62
63 .. code-block:: python
64
65 if not register_inplace_cb_reply(inplace_reply_callback, env):
66 log_info("python: Could not register inplace callback function.")
67
68
69 Inplace callback reply_cache functions
70 ......................................
71
72 Called when answering *from cache*.
73
74 The callback function's prototype is the following:
75
76 .. code-block:: python
77
78 def inplace_cache_callback(qinfo, qstate, rep, rcode, edns, opt_list_out, region):
79 """Function that will be registered as an inplace callback function.
80 It will be called when answering from the cache.
81 :param qinfo: query_info struct;
82 :param qstate: module qstate. None;
83 :param rep: reply_info struct;
84 :param rcode: return code for the query;
85 :param edns: edns_data sent from the client side. The list with the EDNS
86 options is accesible through edns.opt_list. It SHOULD NOT be
87 altered;
88 :param opt_list_out: the list with the EDNS options that will be sent as a
89 reply. It can be populated with EDNS options;
90 :param region: region to allocate temporary data. Needs to be used when we
91 want to append a new option to opt_list_out.
92 :return: True on success, False on failure.
93 """
94
95 .. note:: The function's name is irrelevant.
96
97 We can register such function as:
98
99 .. code-block:: python
100
101 if not register_inplace_cb_reply_cache(inplace_cache_callback, env):
102 log_info("python: Could not register inplace callback function.")
103
104
105 Inplace callback reply_local functions
106 ......................................
107
108 Called when answering with *local data* or a *Chaos(CH) reply*.
109
110 The callback function's prototype is the following:
111
112 .. code-block:: python
113
114 def inplace_local_callback(qinfo, qstate, rep, rcode, edns, opt_list_out, region):
115 """Function that will be registered as an inplace callback function.
116 It will be called when answering from local data.
117 :param qinfo: query_info struct;
118 :param qstate: module qstate. None;
119 :param rep: reply_info struct;
120 :param rcode: return code for the query;
121 :param edns: edns_data sent from the client side. The list with the
122 EDNS options is accesible through edns.opt_list. It
123 SHOULD NOT be altered;
124 :param opt_list_out: the list with the EDNS options that will be sent as a
125 reply. It can be populated with EDNS options;
126 :param region: region to allocate temporary data. Needs to be used when we
127 want to append a new option to opt_list_out.
128 :return: True on success, False on failure.
129 """
130
131 .. note:: The function's name is irrelevant.
132
133 We can register such function as:
134
135 .. code-block:: python
136
137 if not register_inplace_cb_reply_local(inplace_local_callback, env):
138 log_info("python: Could not register inplace callback function.")
139
140
141 Inplace callback reply_servfail functions
142 .........................................
143
144 Called when answering with *SERVFAIL*.
145
146 The callback function's prototype is the following:
147
148 .. code-block:: python
149
150 def inplace_servfail_callback(qinfo, qstate, rep, rcode, edns, opt_list_out, region):
151 """Function that will be registered as an inplace callback function.
152 It will be called when answering with SERVFAIL.
153 :param qinfo: query_info struct;
154 :param qstate: module qstate. If not None the relevant opt_lists are
155 available here;
156 :param rep: reply_info struct. None;
157 :param rcode: return code for the query. LDNS_RCODE_SERVFAIL;
158 :param edns: edns_data to be sent to the client side. If qstate is None
159 edns.opt_list contains the EDNS options sent from the client
160 side. It SHOULD NOT be altered;
161 :param opt_list_out: the list with the EDNS options that will be sent as a
162 reply. It can be populated with EDNS options;
163 :param region: region to allocate temporary data. Needs to be used when we
164 want to append a new option to opt_list_out.
165 :return: True on success, False on failure.
166 """
167
168 .. note:: The function's name is irrelevant.
169
170 We can register such function as:
171
172 .. code-block:: python
173
174 if not register_inplace_cb_reply_servfail(inplace_servfail_callback, env):
175 log_info("python: Could not register inplace callback function.")
176
177
178 Testing
179 ~~~~~~~
180
181 Run the Unbound server: ::
182
183 root@localhost$ unbound -dv -c ./test-inplace_callbacks.conf
184
185 In case you use your own configuration file, don't forget to enable the Python
186 module::
187
188 module-config: "validator python iterator"
189
190 and use a valid script path ::
191
192 python-script: "./examples/inplace_callbacks.py"
193
194 On the first query for the nlnetlabs.nl A record we get no EDNS option back:
195
196 ::
197
198 root@localhost$ dig @localhost nlnetlabs.nl +ednsopt=65002
199
200 ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @localhost nlnetlabs.nl +ednsopt=65002
201 ; (1 server found)
202 ;; global options: +cmd
203 ;; Got answer:
204 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48057
205 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 3
206
207 ;; OPT PSEUDOSECTION:
208 ; EDNS: version: 0, flags:; udp: 4096
209 ;; QUESTION SECTION:
210 ;nlnetlabs.nl. IN A
211
212 ;; ANSWER SECTION:
213 nlnetlabs.nl. 10200 IN A 185.49.140.10
214
215 ;; AUTHORITY SECTION:
216 nlnetlabs.nl. 10200 IN NS ns.nlnetlabs.nl.
217 nlnetlabs.nl. 10200 IN NS sec2.authdns.ripe.net.
218 nlnetlabs.nl. 10200 IN NS anyns.pch.net.
219 nlnetlabs.nl. 10200 IN NS ns-ext1.sidn.nl.
220
221 ;; ADDITIONAL SECTION:
222 ns.nlnetlabs.nl. 10200 IN A 185.49.140.60
223 ns.nlnetlabs.nl. 10200 IN AAAA 2a04:b900::8:0:0:60
224
225 ;; Query time: 813 msec
226 ;; SERVER: 127.0.0.1#53(127.0.0.1)
227 ;; WHEN: Mon Dec 05 16:15:32 CET 2016
228 ;; MSG SIZE rcvd: 204
229
230 When we issue the same query again we get a cached response and the expected
231 ``65002: 0xdeadbeef`` EDNS option:
232
233 ::
234
235 root@localhost$ dig @localhost nlnetlabs.nl +ednsopt=65002
236
237 ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @localhost nlnetlabs.nl +ednsopt=65002
238 ; (1 server found)
239 ;; global options: +cmd
240 ;; Got answer:
241 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26489
242 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 3
243
244 ;; OPT PSEUDOSECTION:
245 ; EDNS: version: 0, flags:; udp: 4096
246 ; OPT=65002: de ad be ef ("....")
247 ;; QUESTION SECTION:
248 ;nlnetlabs.nl. IN A
249
250 ;; ANSWER SECTION:
251 nlnetlabs.nl. 10197 IN A 185.49.140.10
252
253 ;; AUTHORITY SECTION:
254 nlnetlabs.nl. 10197 IN NS ns.nlnetlabs.nl.
255 nlnetlabs.nl. 10197 IN NS sec2.authdns.ripe.net.
256 nlnetlabs.nl. 10197 IN NS anyns.pch.net.
257 nlnetlabs.nl. 10197 IN NS ns-ext1.sidn.nl.
258
259 ;; ADDITIONAL SECTION:
260 ns.nlnetlabs.nl. 10197 IN AAAA 2a04:b900::8:0:0:60
261 ns.nlnetlabs.nl. 10197 IN A 185.49.140.60
262
263 ;; Query time: 0 msec
264 ;; SERVER: 127.0.0.1#53(127.0.0.1)
265 ;; WHEN: Mon Dec 05 16:50:04 CET 2016
266 ;; MSG SIZE rcvd: 212
267
268 By issuing a query for a bogus domain unbound replies with SERVFAIL and an
269 empty EDNS option code ``65003``. *For this example to work unbound needs to be
270 validating*:
271
272 ::
273
274 root@localhost$ dig @localhost bogus.nlnetlabs.nl txt
275
276 ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @localhost bogus.nlnetlabs.nl txt
277 ; (1 server found)
278 ;; global options: +cmd
279 ;; Got answer:
280 ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 19865
281 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
282
283 ;; OPT PSEUDOSECTION:
284 ; EDNS: version: 0, flags:; udp: 4096
285 ; OPT=65003
286 ;; QUESTION SECTION:
287 ;bogus.nlnetlabs.nl. IN TXT
288
289 ;; Query time: 11 msec
290 ;; SERVER: 127.0.0.1#53(127.0.0.1)
291 ;; WHEN: Mon Dec 05 17:06:01 CET 2016
292 ;; MSG SIZE rcvd: 51
293
294
295 Complete source code
296 ~~~~~~~~~~~~~~~~~~~~
297 .. literalinclude:: ../../examples/inplace_callbacks.py
298 :language: python
00 .. _Tutorials:
11
2 ==============================
2 Examples
3 ========
4
5 Here you can find several tutorials which clarify the usage and capabilities of
6 the Unbound scriptable interface.
7
38 Tutorials
4 ==============================
5
6 Here you can find several tutorials which clarify the usage and capabilities of Unbound scriptable interface.
7
8 `Tutorials`
9 ---------
910
1011 .. toctree::
11 :maxdepth: 2
12 :glob:
12 :maxdepth: 2
13 :glob:
1314
14 example*
15 example*
00 Installation
1 ===================================
1 ============
22
3 **Prerequisites**
3 Prerequisites
4 -------------
45
56 Python 2.4 or higher, SWIG 1.3 or higher, GNU make
67
7 **Download**
8 Download
9 --------
810
911 You can download the source codes `here`_.
1012 The latest release is 1.1.1, Jan 15, 2009.
1113
1214 .. _here: unbound-1.1.1-py.tar.gz
1315
14 **Compiling**
16 Compiling
17 ---------
1518
1619 After downloading, you can compile the Unbound library by doing::
1720
18 > tar -xzf unbound-1.1.1-py.tar.gz
19 > cd unbound-1.1.1
20 > ./configure --with-pythonmodule
21 > make
21 > tar -xzf unbound-1.1.1-py.tar.gz
22 > cd unbound-1.1.1
23 > ./configure --with-pythonmodule
24 > make
2225
2326 You need GNU make to compile sources.
2427 SWIG and Python devel libraries to compile extension module.
2528
26 **Testing**
29 Testing
30 -------
2731
2832 If the compilation is successful, you can test the extension module by::
2933
30 > cd pythonmod
31 > make sudo # or "make test" or "make suexec"
34 > cd pythonmod
35 > make sudo # or "make test" or "make suexec"
3236
33 This will start unbound server with language dictionary service (see :ref:`Tutorials`).
37 This will start unbound server with language dictionary service
38 (see :ref:`Tutorials`).
3439 In order to test this service, type::
35
40
3641 > dig TXT @127.0.0.1 aught.en._dict_.cz
3742
3843 Dig should print this message (czech equivalent of aught)::
4348 ;; Got answer:
4449 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30085
4550 ;; flags: aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
46
51
4752 ;; QUESTION SECTION:
48 ;aught.en._dict_.cz. IN TXT
49
53 ;aught.en._dict_.cz. IN TXT
54
5055 ;; ANSWER SECTION:
51 aught.en._dict_.cz. 300 IN TXT "nic"
52
56 aught.en._dict_.cz. 300 IN TXT "nic"
57
5358 ;; Query time: 11 msec
5459 ;; SERVER: 127.0.0.1#53(127.0.0.1)
5560 ;; WHEN: Thu Jan 10 16:45:58 2009
5661 ;; MSG SIZE rcvd: 52
5762
58 The ``pythonmod/examples`` directory contains simple applications written in Python.
63 The ``pythonmod/examples`` directory contains simple applications written in
64 Python.
66 .. function:: ntohs(netshort)
77
88 This subroutine converts values between the host and network byte order.
9 Specifically, **ntohs()** converts 16-bit quantities from network byte order to host byte order.
10
9 Specifically, **ntohs()** converts 16-bit quantities from network byte order
10 to host byte order.
11
1112 :param netshort: 16-bit short addr
1213 :rtype: converted addr
13
14
14
15
1516 Cache
1617 -----
1718
1819 .. function:: storeQueryInCache(qstate, qinfo, msgrep, is_referral)
1920
2021 Store pending query in local cache.
21
22
2223 :param qstate: :class:`module_qstate`
2324 :param qinfo: :class:`query_info`
2425 :param msgrep: :class:`reply_info`
2526 :param is_referal: integer
2627 :rtype: boolean
27
28
2829 .. function:: invalidateQueryInCache(qstate, qinfo)
2930
3031 Invalidate record in local cache.
3132
3233 :param qstate: :class:`module_qstate`
3334 :param qinfo: :class:`query_info`
35
36
37 EDNS options
38 ------------
39
40 .. function:: register_edns_option(env, code, bypass_cache_stage=False, no_aggregation=False)
41
42 Register EDNS option code.
43
44 :param env: :class:`module_env`
45 :param code: option code(integer)
46 :param bypass_cache_stage: whether to bypass the cache response stage
47 :param no_aggregation: whether this query should be unique
48 :return: ``1`` if successful, ``0`` otherwise
49 :rtype: integer
50
51 .. function:: edns_opt_list_find(list, code)
52
53 Find the EDNS option code in the EDNS option list.
54
55 :param list: linked list of :class:`edns_option`
56 :param code: option code (integer)
57 :return: the edns option if found or None
58 :rtype: :class:`edns_option` or None
59
60 .. function:: edns_opt_list_remove(list, code);
61
62 Remove an ENDS option code from the list.
63 .. note:: All :class:`edns_option` with the code will be removed
64
65 :param list: linked list of :class:`edns_option`
66 :param code: option code (integer)
67 :return: ``1`` if at least one :class:`edns_option` was removed, ``0`` otherwise
68 :rtype: integer
69
70 .. function:: edns_opt_list_append(list, code, data, region)
71
72 Append given EDNS option code with data to the list.
73
74 :param list: linked list of :class:`edns_option`
75 :param code: option code (integer)
76 :param data: EDNS data. **Must** be a :class:`bytearray`
77 :param region: :class:`regional`
78
79 .. function:: edns_opt_list_is_empty(list)
80
81 Check if an EDNS option list is empty.
82
83 :param list: linked list of :class:`edns_option`
84 :return: ``1`` if list is empty, ``0`` otherwise
85 :rtype: integer
86
87
88 Inplace callbacks
89 -----------------
90
91 .. function:: inplace_cb_reply(qinfo, qstate, rep, rcode, edns, opt_list_out, region)
92
93 Function prototype for callback functions used in
94 `register_inplace_cb_reply`_, `register_inplace_cb_reply_cache`_,
95 `register_inplace_cb_reply_local` and `register_inplace_cb_reply_servfail`.
96
97 :param qinfo: :class:`query_info`
98 :param qstate: :class:`module_qstate`
99 :param rep: :class:`reply_info`
100 :param rcode: return code (integer), check ``RCODE_`` constants.
101 :param edns: :class:`edns_data`
102 :param opt_list_out: :class:`edns_option`. EDNS option list to append options to.
103 :param region: :class:`regional`
104
105 .. function:: register_inplace_cb_reply(py_cb, env)
106
107 Register py_cb as an inplace reply callback function.
108
109 :param py_cb: Python function that follows `inplace_cb_reply`_'s prototype. **Must** be callable.
110 :param env: :class:`module_env`
111 :return: True on success, False otherwise
112 :rtype: boolean
113
114 .. function:: register_inplace_cb_reply_cache(py_cb, env)
115
116 Register py_cb as an inplace reply_cache callback function.
117
118 :param py_cb: Python function that follows `inplace_cb_reply`_'s prototype. **Must** be callable.
119 :param env: :class:`module_env`
120 :return: True on success, False otherwise
121 :rtype: boolean
122
123 .. function:: register_inplace_cb_reply_local(py_cb, env)
124
125 Register py_cb as an inplace reply_local callback function.
126
127 :param py_cb: Python function that follows `inplace_cb_reply`_'s prototype. **Must** be callable.
128 :param env: :class:`module_env`
129 :return: True on success, False otherwise
130 :rtype: boolean
131
132 .. function:: register_inplace_cb_reply_servfail(py_cb, env)
133
134 Register py_cb as an inplace reply_servfail callback function.
135
136 :param py_cb: Python function that follows `inplace_cb_reply`_'s prototype. **Must** be callable.
137 :param env: :class:`module_env`
138 :return: True on success, False otherwise
139 :rtype: boolean
34140
35141
36142 Logging
70176 :param msg: string desc to accompany the hexdump.
71177 :param data: data to dump in hex format.
72178 :param length: length of data.
73
179
74180 .. function:: log_dns_msg(str, qinfo, reply)
75181
76182 Log DNS message.
77
183
78184 :param str: string message
79185 :param qinfo: :class:`query_info`
80186 :param reply: :class:`reply_info`
81
187
82188 .. function:: log_query_info(verbosity_value, str, qinf)
83189
84190 Log query information.
85
191
86192 :param verbosity_value: see constants
87193 :param str: string message
88194 :param qinf: :class:`query_info`
89
195
90196 .. function:: regional_log_stats(r)
91197
92198 Log regional statistics.
93
199
94200 :param r: :class:`regional`
201
95202
96203 Debugging
97204 ---------
99206 .. function:: strextstate(module_ext_state)
100207
101208 Debug utility, module external qstate to string.
102
209
103210 :param module_ext_state: the state value.
104211 :rtype: descriptive string.
105212
106213 .. function:: strmodulevent(module_event)
107214
108215 Debug utility, module event to string.
109
216
110217 :param module_event: the module event value.
111218 :rtype: descriptive string.
112
219
113220 .. function:: ldns_rr_type2str(atype)
114221
115222 Convert RR type to string.
116
223
117224 .. function:: ldns_rr_class2str(aclass)
118225
119226 Convert RR class to string.
55
66 .. class:: module_qstate
77
8 Module state, per query.
9
10 This class provides these data attributes:
11
12 .. attribute:: qinfo
13
14 (:class:`query_info`) Informations about query being answered. Name, RR type, RR class.
15
16 .. attribute:: query_flags
17
18 (uint16) Flags for query. See QF_BIT\_ predefined constants.
19
20 .. attribute:: is_priming
21
22 If this is a (stub or root) priming query (with hints).
23
24 .. attribute:: reply
25
26 comm_reply contains server replies.
27
28 .. attribute:: return_msg
29
30 (:class:`dns_msg`) The reply message, with message for client and calling module (read-only attribute).
31 Note that if you want to create of modify return_msg you should use :class:`DNSMessage`.
32
33 .. attribute:: return_rcode
34
35 The rcode, in case of error, instead of a reply message. Determines whether the return_msg contains reply.
36
37 .. attribute:: region
38
39 Region for this query. Cleared when query process finishes.
40
41 .. attribute:: curmod
42
43 Which module is executing.
44
45 .. attribute:: ext_state[]
46
47 Module states.
48
49 .. attribute:: env
50
51 Environment for this query.
52
53 .. attribute:: mesh_info
54
55 Mesh related information for this query.
56
8 Module state, per query.
9
10 This class provides these data attributes:
11
12 .. attribute:: qinfo
13
14 (:class:`query_info`) Informations about query being answered. Name, RR type, RR class.
15
16 .. attribute:: query_flags
17
18 (uint16) Flags for query. See QF_BIT\_ predefined constants.
19
20 .. attribute:: is_priming
21
22 If this is a (stub or root) priming query (with hints).
23
24 .. attribute:: reply
25
26 comm_reply contains server replies.
27
28 .. attribute:: return_msg
29
30 (:class:`dns_msg`) The reply message, with message for client and calling module (read-only attribute).
31 Note that if you want to create of modify return_msg you should use :class:`DNSMessage`.
32
33 .. attribute:: return_rcode
34
35 The rcode, in case of error, instead of a reply message. Determines whether the return_msg contains reply.
36
37 .. attribute:: region
38
39 Region for this query. Cleared when query process finishes.
40
41 .. attribute:: curmod
42
43 Which module is executing.
44
45 .. attribute:: ext_state[]
46
47 Module states.
48
49 .. attribute:: env
50
51 Environment for this query.
52
53 .. attribute:: mesh_info
54
55 Mesh related information for this query.
56
57 .. attribute:: edns_opts_front_in
58
59 Incoming EDNS options from the front end.
60
61 .. attribute:: edns_opts_front_in_iter
62
63 Iterator for `edns_opts_front_in`.
64
65 .. attribute:: edns_opts_back_out
66
67 Outgoing EDNS options to the back end.
68
69 .. attribute:: edns_opts_back_out_iter
70
71 Iterator for `edns_opts_back_out`.
72
73 .. attribute:: edns_opts_back_in
74
75 Incoming EDNS options from the back end.
76
77 .. attribute:: edns_opts_back_in_iter
78
79 Iterator for `ends_opts_back_in`.
80
81 .. attribute:: edns_opts_front_out
82
83 Outgoing EDNS options to the front end.
84
85 .. attribute:: edns_opts_front_out_iter
86
87 Iterator for `edns_opts_front_out`.
88
89 .. attribute:: no_cache_lookup
90
91 Flag to indicate whether modules should answer from the cache.
92
93 .. attribute:: no_cache_store
94
95 Flag to indicate whether modules should store answer in the cache.
5796
5897 query_info
5998 ----------------
93132 .. attribute:: qclass_str
94133
95134 The ``qclass`` in display presentation format (string).
96
135
136 edns_data
137 ---------
138
139 .. class:: edns_data
140
141 This class represents the EDNS information parsed/encoded from/to a packet. It provides these data attributes:
142
143 .. attribute:: edns_present
144
145 If EDNS OPT record is present.
146
147 .. attribute:: ext_rcode
148
149 Extended RCODE.
150
151 .. attribute:: edns_version
152
153 The EDNS version number.
154
155 .. attribute:: bits
156
157 The EDNS bits field from ttl (host order): Z.
158
159 .. attribute:: udp_size
160
161 UDP reassembly size.
162
163 .. attribute:: opt_list
164
165 The EDNS option list.
166
167 .. attribute:: opt_list_iter
168
169 Iterator for `opt_list`.
170
171 edns_option
172 -----------
173
174 .. class:: edns_option
175
176 This class represents an EDNS option (code, data) found in EDNS option lists. It provides these data attributes:
177
178 .. attribute:: code
179
180 The EDNS option code.
181
182 .. attribute:: data
183
184 The EDNS option data.
185
97186 reply_info
98187 --------------------
99188
0 # -*- coding: utf-8 -*-
1 '''
2 edns.py: python module showcasing EDNS option functionality.
3
4 Copyright (c) 2016, NLnet Labs.
5
6 This software is open source.
7
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions
10 are met:
11
12 * Redistributions of source code must retain the above copyright notice,
13 this list of conditions and the following disclaimer.
14
15 * Redistributions in binary form must reproduce the above copyright notice,
16 this list of conditions and the following disclaimer in the documentation
17 and/or other materials provided with the distribution.
18
19 * Neither the name of the organization nor the names of its
20 contributors may be used to endorse or promote products derived from this
21 software without specific prior written permission.
22
23 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
27 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 POSSIBILITY OF SUCH DAMAGE.
34 '''
35 #Try:
36 # - dig @localhost nlnetlabs.nl +ednsopt=65001:c001
37 # This query will always reach the modules stage as EDNS option 65001 is
38 # registered to bypass the cache response stage. It will also be handled
39 # as a unique query because of the no_aggregation flag. This means that
40 # it will not be aggregated with other queries for the same qinfo.
41 # For demonstration purposes when option 65001 with hexdata 'c001' is
42 # sent from the client side this module will reply with the same code and
43 # data 'deadbeef'.
44
45 # Useful functions:
46 # edns_opt_list_is_empty(edns_opt_list):
47 # Check if the option list is empty.
48 # Return True if empty, False otherwise.
49 #
50 # edns_opt_list_append(edns_opt_list, code, data_bytearray, region):
51 # Append the EDNS option with code and data_bytearray to the given
52 # edns_opt_list.
53 # NOTE: data_bytearray MUST be a Python bytearray.
54 # Return True on success, False on failure.
55 #
56 # edns_opt_list_remove(edns_opt_list, code):
57 # Remove all occurences of the given EDNS option code from the
58 # edns_opt_list.
59 # Return True when at least one EDNS option was removed, False otherwise.
60 #
61 # register_edns_option(env, code, bypass_cache_stage=True,
62 # no_aggregation=True):
63 # Register EDNS option code as a known EDNS option.
64 # bypass_cache_stage:
65 # bypasses answering from cache and allows the query to reach the
66 # modules for further EDNS handling.
67 # no_aggregation:
68 # makes every query with the said EDNS option code unique.
69 # Return True on success, False on failure.
70 #
71 # Examples on how to use the functions are given in this file.
72
73
74 def init_standard(id, env):
75 """New version of the init function.
76 The function's signature is the same as the C counterpart and allows for
77 extra functionality during init.
78 ..note:: This function is preferred by unbound over the old init function.
79 ..note:: The previously accesible configuration options can now be found in
80 env.cgf.
81 """
82 log_info("python: inited script {}".format(env.cfg.python_script))
83
84 # Register EDNS option 65001 as a known EDNS option.
85 if not register_edns_option(env, 65001, bypass_cache_stage=True,
86 no_aggregation=True):
87 return False
88
89 return True
90
91
92 def init(id, cfg):
93 """Previous version init function.
94 ..note:: This function is still supported for backwards compatibility when
95 the init_standard function is missing. When init_standard is
96 present this function SHOULD be ommited to avoid confusion to the
97 reader.
98 """
99 return True
100
101
102 def deinit(id): return True
103
104
105 def inform_super(id, qstate, superqstate, qdata): return True
106
107
108 def operate(id, event, qstate, qdata):
109 if (event == MODULE_EVENT_NEW) or (event == MODULE_EVENT_PASS):
110 # Detect if EDNS option code 56001 is present from the client side. If
111 # so turn on the flags for cache management.
112 if not edns_opt_list_is_empty(qstate.edns_opts_front_in):
113 log_info("python: searching for EDNS option code 65001 during NEW "
114 "or PASS event ")
115 for o in qstate.edns_opts_front_in_iter:
116 if o.code == 65001:
117 log_info("python: found EDNS option code 65001")
118 # Instruct other modules to not lookup for an
119 # answer in the cache.
120 qstate.no_cache_lookup = 1
121 log_info("python: enabled no_cache_lookup")
122
123 # Instruct other modules to not store the answer in
124 # the cache.
125 qstate.no_cache_store = 1
126 log_info("python: enabled no_cache_store")
127
128 #Pass on the query
129 qstate.ext_state[id] = MODULE_WAIT_MODULE
130 return True
131
132 elif event == MODULE_EVENT_MODDONE:
133 # If the client sent EDNS option code 65001 and data 'c001' reply
134 # with the same code and data 'deadbeef'.
135 if not edns_opt_list_is_empty(qstate.edns_opts_front_in):
136 log_info("python: searching for EDNS option code 65001 during "
137 "MODDONE")
138 for o in qstate.edns_opts_front_in_iter:
139 if o.code == 65001 and o.data == bytearray.fromhex("c001"):
140 b = bytearray.fromhex("deadbeef")
141 if not edns_opt_list_append(qstate.edns_opts_front_out,
142 o.code, b, qstate.region):
143 qstate.ext_state[id] = MODULE_ERROR
144 return False
145
146 # List every EDNS option in all lists.
147 # The available lists are:
148 # - qstate.edns_opts_front_in: EDNS options that came from the
149 # client side. SHOULD NOT be changed;
150 #
151 # - qstate.edns_opts_back_out: EDNS options that will be sent to the
152 # server side. Can be populated by
153 # EDNS literate modules;
154 #
155 # - qstate.edns_opts_back_in: EDNS options that came from the
156 # server side. SHOULD NOT be changed;
157 #
158 # - qstate.edns_opts_front_out: EDNS options that will be sent to the
159 # client side. Can be populated by
160 # EDNS literate modules;
161 #
162 # The lists' contents can be accessed in python by their _iter
163 # counterpart as an iterator.
164 if not edns_opt_list_is_empty(qstate.edns_opts_front_in):
165 log_info("python: EDNS options in edns_opts_front_in:")
166 for o in qstate.edns_opts_front_in_iter:
167 log_info("python: Code: {}, Data: '{}'".format(o.code,
168 "".join('{:02x}'.format(x) for x in o.data)))
169
170 if not edns_opt_list_is_empty(qstate.edns_opts_back_out):
171 log_info("python: EDNS options in edns_opts_back_out:")
172 for o in qstate.edns_opts_back_out_iter:
173 log_info("python: Code: {}, Data: '{}'".format(o.code,
174 "".join('{:02x}'.format(x) for x in o.data)))
175
176 if not edns_opt_list_is_empty(qstate.edns_opts_back_in):
177 log_info("python: EDNS options in edns_opts_back_in:")
178 for o in qstate.edns_opts_back_in_iter:
179 log_info("python: Code: {}, Data: '{}'".format(o.code,
180 "".join('{:02x}'.format(x) for x in o.data)))
181
182 if not edns_opt_list_is_empty(qstate.edns_opts_front_out):
183 log_info("python: EDNS options in edns_opts_front_out:")
184 for o in qstate.edns_opts_front_out_iter:
185 log_info("python: Code: {}, Data: '{}'".format(o.code,
186 "".join('{:02x}'.format(x) for x in o.data)))
187
188 qstate.ext_state[id] = MODULE_FINISHED
189 return True
190
191 log_err("pythonmod: Unknown event")
192 qstate.ext_state[id] = MODULE_ERROR
193 return True
0 # -*- coding: utf-8 -*-
1 '''
2 inplace_callbacks.py: python module showcasing inplace callback function
3 registration and functionality.
4
5 Copyright (c) 2016, NLnet Labs.
6
7 This software is open source.
8
9 Redistribution and use in source and binary forms, with or without
10 modification, are permitted provided that the following conditions
11 are met:
12
13 * Redistributions of source code must retain the above copyright notice,
14 this list of conditions and the following disclaimer.
15
16 * Redistributions in binary form must reproduce the above copyright notice,
17 this list of conditions and the following disclaimer in the documentation
18 and/or other materials provided with the distribution.
19
20 * Neither the name of the organization nor the names of its
21 contributors may be used to endorse or promote products derived from this
22 software without specific prior written permission.
23
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
35 '''
36 #Try:
37 # - dig @localhost nlnetlabs.nl +ednsopt=65002:
38 # This query *could* be answered from cache. If so, unbound will reply
39 # with the same EDNS option 65002, but with hexdata 'deadbeef' as data.
40 #
41 # - dig @localhost bogus.nlnetlabs.nl txt:
42 # This query returns SERVFAIL as the txt record of bogus.nlnetlabs.nl is
43 # intentionally bogus. The reply will contain an empty EDNS option
44 # with option code 65003.
45 # (unbound needs to be validating for this example to work)
46
47 # Useful functions:
48 # register_inplace_cb_reply(inplace_reply_callback, env):
49 # Register the reply_callback function as an inplace callback function
50 # when answering with a resolved query.
51 # Return True on success, False on failure.
52 #
53 # register_inplace_cb_reply_cache(inplace_reply_cache_callback, env):
54 # Register the reply_cache_callback function as an inplace callback
55 # function when answering from cache.
56 # Return True on success, False on failure.
57 #
58 # register_inplace_cb_reply_local(inplace_reply_local_callback, env):
59 # Register the reply_local_callback function as an inplace callback
60 # function when answering from local data or chaos reply.
61 # Return True on success, False on failure.
62 #
63 # register_inplace_cb_reply_servfail(inplace_reply_servfail_callback, env):
64 # Register the reply_servfail_callback function as an inplace callback
65 # function when answering with servfail.
66 # Return True on success, False on failure.
67 #
68 # Examples on how to use the functions are given in this file.
69
70
71 def inplace_reply_callback(qinfo, qstate, rep, rcode, edns, opt_list_out,
72 region):
73 """Function that will be registered as an inplace callback function.
74 It will be called when answering with a resolved query.
75 :param qinfo: query_info struct;
76 :param qstate: module qstate. It contains the available opt_lists; It
77 SHOULD NOT be altered;
78 :param rep: reply_info struct;
79 :param rcode: return code for the query;
80 :param edns: edns_data to be sent to the client side. It SHOULD NOT be
81 altered;
82 :param opt_list_out: the list with the EDNS options that will be sent as a
83 reply. It can be populated with EDNS options;
84 :param region: region to allocate temporary data. Needs to be used when we
85 want to append a new option to opt_list_out.
86 :return: True on success, False on failure.
87 """
88 log_info("python: called back while replying.")
89 return True
90
91
92 def inplace_cache_callback(qinfo, qstate, rep, rcode, edns, opt_list_out,
93 region):
94 """Function that will be registered as an inplace callback function.
95 It will be called when answering from the cache.
96 :param qinfo: query_info struct;
97 :param qstate: module qstate. None;
98 :param rep: reply_info struct;
99 :param rcode: return code for the query;
100 :param edns: edns_data sent from the client side. The list with the EDNS
101 options is accesible through edns.opt_list. It SHOULD NOT be
102 altered;
103 :param opt_list_out: the list with the EDNS options that will be sent as a
104 reply. It can be populated with EDNS options;
105 :param region: region to allocate temporary data. Needs to be used when we
106 want to append a new option to opt_list_out.
107 :return: True on success, False on failure.
108
109 For demostration purposes we want to see if EDNS option 65002 is present
110 and reply with a new value.
111 """
112 log_info("python: called back while answering from cache.")
113 # Inspect the incoming EDNS options.
114 if not edns_opt_list_is_empty(edns.opt_list):
115 log_info("python: available EDNS options:")
116 for o in edns.opt_list_iter:
117 log_info("python: Code: {}, Data: '{}'".format(o.code,
118 "".join('{:02x}'.format(x) for x in o.data)))
119 if o.code == 65002:
120 log_info("python: *found option code 65002*")
121
122 # add to opt_list
123 # Data MUST be represented in a bytearray.
124 b = bytearray.fromhex("deadbeef")
125 if edns_opt_list_append(opt_list_out, o.code, b, region):
126 log_info("python: *added new option code 65002*")
127 else:
128 log_info("python: *failed to add new option code 65002*")
129 return False
130 break
131
132 return True
133
134
135 def inplace_local_callback(qinfo, qstate, rep, rcode, edns, opt_list_out,
136 region):
137 """Function that will be registered as an inplace callback function.
138 It will be called when answering from local data.
139 :param qinfo: query_info struct;
140 :param qstate: module qstate. None;
141 :param rep: reply_info struct;
142 :param rcode: return code for the query;
143 :param edns: edns_data sent from the client side. The list with the
144 EDNS options is accesible through edns.opt_list. It
145 SHOULD NOT be altered;
146 :param opt_list_out: the list with the EDNS options that will be sent as a
147 reply. It can be populated with EDNS options;
148 :param region: region to allocate temporary data. Needs to be used when we
149 want to append a new option to opt_list_out.
150 :return: True on success, False on failure.
151 """
152 log_info("python: called back while replying with local data or chaos"
153 " reply.")
154 return True
155
156
157 def inplace_servfail_callback(qinfo, qstate, rep, rcode, edns, opt_list_out,
158 region):
159 """Function that will be registered as an inplace callback function.
160 It will be called when answering with SERVFAIL.
161 :param qinfo: query_info struct;
162 :param qstate: module qstate. If not None the relevant opt_lists are
163 available here;
164 :param rep: reply_info struct. None;
165 :param rcode: return code for the query. LDNS_RCODE_SERVFAIL;
166 :param edns: edns_data to be sent to the client side. If qstate is None
167 edns.opt_list contains the EDNS options sent from the client
168 side. It SHOULD NOT be altered;
169 :param opt_list_out: the list with the EDNS options that will be sent as a
170 reply. It can be populated with EDNS options;
171 :param region: region to allocate temporary data. Needs to be used when we
172 want to append a new option to opt_list_out.
173 :return: True on success, False on failure.
174
175 For demostration purposes we want to reply with an empty EDNS code '65003'.
176 """
177 log_info("python: called back while servfail.")
178 b = bytearray.fromhex("")
179 edns_opt_list_append(opt_list_out, 65003, b, region)
180 return True
181
182
183 def init_standard(id, env):
184 """New version of the init function.
185 The function's signature is the same as the C counterpart and allows for
186 extra functionality during init.
187 ..note:: This function is preferred by unbound over the old init function.
188 ..note:: The previously accesible configuration options can now be found in
189 env.cgf.
190 """
191 log_info("python: inited script {}".format(env.cfg.python_script))
192
193 # Register the inplace_reply_callback function as an inplace callback
194 # function when answering a resolved query.
195 if not register_inplace_cb_reply(inplace_reply_callback, env):
196 return False
197
198 # Register the inplace_cache_callback function as an inplace callback
199 # function when answering from cache.
200 if not register_inplace_cb_reply_cache(inplace_cache_callback, env):
201 return False
202
203 # Register the inplace_local_callback function as an inplace callback
204 # function when answering from local data.
205 if not register_inplace_cb_reply_local(inplace_local_callback, env):
206 return False
207
208 # Register the inplace_servfail_callback function as an inplace callback
209 # function when answering with SERVFAIL.
210 if not register_inplace_cb_reply_servfail(inplace_servfail_callback, env):
211 return False
212
213 return True
214
215
216 def init(id, cfg):
217 """Previous version init function.
218 ..note:: This function is still supported for backwards compatibility when
219 the init_standard function is missing. When init_standard is
220 present this function SHOULD be ommited to avoid confusion to the
221 reader.
222 """
223 return True
224
225
226 def deinit(id): return True
227
228
229 def inform_super(id, qstate, superqstate, qdata): return True
230
231
232 def operate(id, event, qstate, qdata):
233 if (event == MODULE_EVENT_NEW) or (event == MODULE_EVENT_PASS):
234 qstate.ext_state[id] = MODULE_WAIT_MODULE
235 return True
236
237 elif event == MODULE_EVENT_MODDONE:
238 qstate.ext_state[id] = MODULE_FINISHED
239 return True
240
241 log_err("pythonmod: Unknown event")
242 qstate.ext_state[id] = MODULE_ERROR
243 return True
00 /*
11 * interface.i: unbound python module
22 */
3
43 %module unboundmodule
54 %{
65 /**
3332 #include "sldns/pkthdr.h"
3433 %}
3534
36 %include "stdint.i" // uint_16_t can be known type now
35 %include "stdint.i" /* uint_16_t can be known type now */
3736
3837 %inline %{
39 //converts [len][data][len][data][0] string to a List of labels (PyBytes)
38 /* converts [len][data][len][data][0] string to a List of labels (PyBytes) */
4039 PyObject* GetNameAsLabelList(const char* name, int len) {
4140 PyObject* list;
4241 int cnt=0, i;
201200 char* dname;
202201 size_t dname_len;
203202 uint32_t flags;
204 uint16_t type; //rrset type in network format
205 uint16_t rrset_class; //rrset class in network format
203 uint16_t type; /* rrset type in network format */
204 uint16_t rrset_class; /* rrset class in network format */
206205 %mutable;
207206 };
208207
209 //This subroutine converts values between the host and network byte order.
210 //Specifically, ntohs() converts 16-bit quantities from network byte order to host byte order.
208 /**
209 * This subroutine converts values between the host and network byte order.
210 * Specifically, ntohs() converts 16-bit quantities from network byte order to
211 * host byte order.
212 */
211213 uint16_t ntohs(uint16_t netshort);
212214
213215 %inline %{
268270 %ignore packed_rrset_data::rr_data;
269271
270272 struct packed_rrset_data {
271 uint32_t ttl; //TTL (in seconds like time())
272
273 size_t count; //number of rrs
274 size_t rrsig_count; //number of rrsigs
273 /* TTL (in seconds like time()) */
274 uint32_t ttl;
275
276 /* number of rrs */
277 size_t count;
278 /* number of rrsigs */
279 size_t rrsig_count;
275280
276281 enum rrset_trust trust;
277282 enum sec_status security;
278283
279 size_t* rr_len; //length of every rr's rdata
280 uint32_t *rr_ttl; //ttl of every rr
281 uint8_t** rr_data; //array of pointers to every rr's rdata; The rr_data[i] rdata is stored in uncompressed wireformat.
284 /* length of every rr's rdata */
285 size_t* rr_len;
286 /* ttl of every rr */
287 uint32_t *rr_ttl;
288 /* array of pointers to every rr's rdata. The rr_data[i] rdata is stored in
289 * uncompressed wireformat. */
290 uint8_t** rr_data;
282291 };
283292
284293 %pythoncode %{
358367 size_t an_numrrsets;
359368 size_t ns_numrrsets;
360369 size_t ar_numrrsets;
361 size_t rrset_count; // an_numrrsets + ns_numrrsets + ar_numrrsets
370 size_t rrset_count; /* an_numrrsets + ns_numrrsets + ar_numrrsets */
362371
363372 struct ub_packed_rrset_key** rrsets;
364 struct rrset_ref ref[1]; //?
373 struct rrset_ref ref[1]; /* ? */
365374 };
366375
367376 struct rrset_ref {
395404
396405 struct rrset_ref* _rrset_ref_get(struct reply_info* r, int idx) {
397406 if ((r != NULL) && (idx >= 0) && ((size_t)idx < r->rrset_count)) {
398 //printf("_rrset_ref_get: %lX key:%lX\n", r->ref + idx, r->ref[idx].key);
407 /* printf("_rrset_ref_get: %lX key:%lX\n", r->ref + idx, r->ref[idx].key); */
399408 return &(r->ref[idx]);
400 // return &(r->ref[idx]);
409 /* return &(r->ref[idx]); */
401410 }
402 //printf("_rrset_ref_get: NULL\n");
411 /* printf("_rrset_ref_get: NULL\n"); */
403412 return NULL;
404413 }
405414 %}
478487 if _newclass:family = _swig_property(_family_get)
479488 %}
480489 }
490
481491 /* ************************************************************************************ *
492 Structure edns_option
493 * ************************************************************************************ */
494 /* Rename the members to follow the python convention of marking them as
495 * private. Access to the opt_code and opt_data members is given by the later
496 * python defined code and data members respectively. */
497 %rename(_next) edns_option::next;
498 %rename(_opt_code) edns_option::opt_code;
499 %rename(_opt_len) edns_option::opt_len;
500 %rename(_opt_data) edns_option::opt_data;
501 struct edns_option {
502 struct edns_option* next;
503 uint16_t opt_code;
504 size_t opt_len;
505 uint8_t* opt_data;
506 };
507
508 %inline %{
509 PyObject* _edns_option_opt_code_get(struct edns_option* option) {
510 uint16_t opt_code = option->opt_code;
511 return PyInt_FromLong(opt_code);
512 }
513
514 PyObject* _edns_option_opt_data_get(struct edns_option* option) {
515 return PyByteArray_FromStringAndSize((uint8_t*)option->opt_data,
516 option->opt_len);
517 }
518 %}
519 %extend edns_option {
520 %pythoncode %{
521 def _opt_code_get(self): return _edns_option_opt_code_get(self)
522 __swig_getmethods__["code"] = _opt_code_get
523 if _newclass: opt_code = _swig_property(_opt_code_get)
524
525 def _opt_data_get(self): return _edns_option_opt_data_get(self)
526 __swig_getmethods__["data"] = _opt_data_get
527 if _newclass: opt_data = _swig_property(_opt_data_get)
528 %}
529 }
530
531 /* ************************************************************************************ *
532 Structure edns_data
533 * ************************************************************************************ */
534 /* This is ignored because we will pass a double pointer of this to Python
535 * with custom getmethods. This is done to bypass Swig's behavior to pass NULL
536 * pointers as None. */
537 %ignore edns_data::opt_list;
538 struct edns_data {
539 int edns_present;
540 uint8_t ext_rcode;
541 uint8_t edns_version;
542 uint16_t bits;
543 uint16_t udp_size;
544 struct edns_option* opt_list;
545 };
546 %inline %{
547 struct edns_option** _edns_data_opt_list_get(struct edns_data* edns) {
548 return &edns->opt_list;
549 }
550 %}
551 %extend edns_data {
552 %pythoncode %{
553 def _opt_list_iter(self): return EdnsOptsListIter(self.opt_list)
554 __swig_getmethods__["opt_list_iter"] = _opt_list_iter
555 if _newclass:opt_list_iter = _swig_property(_opt_list_iter)
556 def _opt_list(self): return _edns_data_opt_list_get(self)
557 __swig_getmethods__["opt_list"] = _opt_list
558 if _newclass:opt_list = _swig_property(_opt_list)
559 %}
560 }
561
562 /* ************************************************************************************ *
563 Structure module_env
564 * ************************************************************************************ */
565 struct module_env {
566 struct config_file* cfg;
567 struct slabhash* msg_cache;
568 struct rrset_cache* rrset_cache;
569 struct infra_cache* infra_cache;
570 struct key_cache* key_cache;
571
572 /* --- services --- */
573 struct outbound_entry* (*send_query)(struct query_info* qinfo,
574 uint16_t flags, int dnssec, int want_dnssec, int nocaps,
575 struct sockaddr_storage* addr, socklen_t addrlen,
576 uint8_t* zone, size_t zonelen, int ssl_upstream,
577 struct module_qstate* q);
578 void (*detach_subs)(struct module_qstate* qstate);
579 int (*attach_sub)(struct module_qstate* qstate,
580 struct query_info* qinfo, uint16_t qflags, int prime,
581 int valrec, struct module_qstate** newq);
582 void (*kill_sub)(struct module_qstate* newq);
583 int (*detect_cycle)(struct module_qstate* qstate,
584 struct query_info* qinfo, uint16_t flags, int prime,
585 int valrec);
586
587 struct regional* scratch;
588 struct sldns_buffer* scratch_buffer;
589 struct worker* worker;
590 struct mesh_area* mesh;
591 struct alloc_cache* alloc;
592 struct ub_randstate* rnd;
593 time_t* now;
594 struct timeval* now_tv;
595 int need_to_validate;
596 struct val_anchors* anchors;
597 struct val_neg_cache* neg_cache;
598 struct comm_timer* probe_timer;
599 struct iter_forwards* fwds;
600 struct iter_hints* hints;
601 void* modinfo[MAX_MODULE];
602
603 void* inplace_cb_lists[inplace_cb_types_total];
604 struct edns_known_option* edns_known_options;
605 size_t edns_known_options_num;
606 };
607
608
609 /* ************************************************************************************ *
482610 Structure module_qstate
483611 * ************************************************************************************ */
484612 %ignore module_qstate::ext_state;
485613 %ignore module_qstate::minfo;
486614
615 /* These are ignored because we will pass a double pointer of them to Python
616 * with custom getmethods. This is done to bypass Swig's behavior to pass NULL
617 * pointers as None. */
618 %ignore module_qstate::edns_opts_front_in;
619 %ignore module_qstate::edns_opts_back_out;
620 %ignore module_qstate::edns_opts_back_in;
621 %ignore module_qstate::edns_opts_front_out;
622
487623 /* Query state */
488624 struct module_qstate {
489625 struct query_info qinfo;
490 uint16_t query_flags; //See QF_BIT_xx constants
491 int is_priming;
626 uint16_t query_flags; /* See QF_BIT_xx constants */
627 int is_priming;
628 int is_valrec;
492629
493630 struct comm_reply* reply;
494631 struct dns_msg* return_msg;
495 int return_rcode;
632 int return_rcode;
496633 struct regional* region; /* unwrapped */
497634
498 int curmod;
499
500 enum module_ext_state ext_state[MAX_MODULE];
501 void* minfo[MAX_MODULE];
635 int curmod;
636
637 enum module_ext_state ext_state[MAX_MODULE];
638 void* minfo[MAX_MODULE];
639 time_t prefetch_leeway;
502640
503641 struct module_env* env; /* unwrapped */
504642 struct mesh_state* mesh_info;
643
644 struct edns_option* edns_opts_front_in;
645 struct edns_option* edns_opts_back_out;
646 struct edns_option* edns_opts_back_in;
647 struct edns_option* edns_opts_front_out;
648 int no_cache_lookup;
649 int no_cache_store;
505650 };
506651
507652 %constant int MODULE_COUNT = MAX_MODULE;
539684 def __getitem__(self, index): return _unboundmodule._ext_state_get(self.obj, index)
540685 def __setitem__(self, index, value): _unboundmodule._ext_state_set(self.obj, index, value)
541686 def __len__(self): return _unboundmodule.MODULE_COUNT
687
688 class EdnsOptsListIter:
689 def __init__(self, obj):
690 self._current = obj
691 self._temp = None
692 def __iter__(self): return self
693 def __next__(self):
694 """Python 3 compatibility"""
695 return self._get_next()
696 def next(self):
697 """Python 2 compatibility"""
698 return self._get_next()
699 def _get_next(self):
700 if not edns_opt_list_is_empty(self._current):
701 self._temp = self._current
702 self._current = _p_p_edns_option_get_next(self._current)
703 return _dereference_edns_option(self._temp)
704 else:
705 raise StopIteration
542706 %}
543707
544708 %inline %{
548712 }
549713 return 0;
550714 }
551
715
552716 void _ext_state_set(struct module_qstate* q, int idx, enum module_ext_state state) {
553717 if ((q != NULL) && (idx >= 0) && (idx < MAX_MODULE)) {
554718 q->ext_state[idx] = state;
555719 }
720 }
721
722 int edns_opt_list_is_empty(struct edns_option** opt) {
723 if (!opt || !(*opt)) return 1;
724 return 0;
725 }
726
727 struct edns_option* _dereference_edns_option(struct edns_option** opt) {
728 if (!opt) return NULL;
729 return *opt;
730 }
731
732 struct edns_option** _p_p_edns_option_get_next(struct edns_option** opt) {
733 return &(*opt)->next;
734 }
735
736 struct edns_option** _edns_opts_front_in_get(struct module_qstate* q) {
737 return &q->edns_opts_front_in;
738 }
739
740 struct edns_option** _edns_opts_back_out_get(struct module_qstate* q) {
741 return &q->edns_opts_back_out;
742 }
743
744 struct edns_option** _edns_opts_back_in_get(struct module_qstate* q) {
745 return &q->edns_opts_back_in;
746 }
747
748 struct edns_option** _edns_opts_front_out_get(struct module_qstate* q) {
749 return &q->edns_opts_front_out;
556750 }
557751 %}
558752
565759 def __ext_state_get(self): return ExtState(self)
566760 __swig_getmethods__["ext_state"] = __ext_state_get
567761 if _newclass:ext_state = _swig_property(__ext_state_get)#, __ext_state_set)
762
763 def _edns_opts_front_in_iter(self): return EdnsOptsListIter(self.edns_opts_front_in)
764 __swig_getmethods__["edns_opts_front_in_iter"] = _edns_opts_front_in_iter
765 if _newclass:edns_opts_front_in_iter = _swig_property(_edns_opts_front_in_iter)
766 def _edns_opts_back_out_iter(self): return EdnsOptsListIter(self.edns_opts_back_out)
767 __swig_getmethods__["edns_opts_back_out_iter"] = _edns_opts_back_out_iter
768 if _newclass:edns_opts_back_out_iter = _swig_property(_edns_opts_back_out_iter)
769 def _edns_opts_back_in_iter(self): return EdnsOptsListIter(self.edns_opts_back_in)
770 __swig_getmethods__["edns_opts_back_in_iter"] = _edns_opts_back_in_iter
771 if _newclass:edns_opts_back_in_iter = _swig_property(_edns_opts_back_in_iter)
772 def _edns_opts_front_out_iter(self): return EdnsOptsListIter(self.edns_opts_front_out)
773 __swig_getmethods__["edns_opts_front_out_iter"] = _edns_opts_front_out_iter
774 if _newclass:edns_opts_front_out_iter = _swig_property(_edns_opts_front_out_iter)
775
776 def _edns_opts_front_in(self): return _edns_opts_front_in_get(self)
777 __swig_getmethods__["edns_opts_front_in"] = _edns_opts_front_in
778 if _newclass:edns_opts_front_in = _swig_property(_edns_opts_front_in)
779 def _edns_opts_back_out(self): return _edns_opts_back_out_get(self)
780 __swig_getmethods__["edns_opts_back_out"] = _edns_opts_back_out
781 if _newclass:edns_opts_back_out = _swig_property(_edns_opts_back_out)
782 def _edns_opts_back_in(self): return _edns_opts_back_in_get(self)
783 __swig_getmethods__["edns_opts_back_in"] = _edns_opts_back_in
784 if _newclass:edns_opts_back_in = _swig_property(_edns_opts_back_in)
785 def _edns_opts_front_out(self): return _edns_opts_front_out_get(self)
786 __swig_getmethods__["edns_opts_front_out"] = _edns_opts_front_out
787 if _newclass:edns_opts_front_out = _swig_property(_edns_opts_front_out)
568788 %}
569789 }
570790
10361256 /* ************************************************************************************ *
10371257 Functions
10381258 * ************************************************************************************ */
1039
1040 // Various debuging functions
1259 /******************************
1260 * Various debuging functions *
1261 ******************************/
10411262 void verbose(enum verbosity_value level, const char* format, ...);
10421263 void log_info(const char* format, ...);
10431264 void log_err(const char* format, ...);
10471268 void log_query_info(enum verbosity_value v, const char* str, struct query_info* qinf);
10481269 void regional_log_stats(struct regional *r);
10491270
1050 // Free allocated memory from marked sources returning corresponding types
1271 /***************************************************************************
1272 * Free allocated memory from marked sources returning corresponding types *
1273 ***************************************************************************/
10511274 %typemap(newfree, noblock = 1) char * {
10521275 free($1);
10531276 }
10541277
1055 // Mark as source returning newly allocated memory
1278 /***************************************************
1279 * Mark as source returning newly allocated memory *
1280 ***************************************************/
10561281 %newobject sldns_wire2str_type;
10571282 %newobject sldns_wire2str_class;
10581283
1059 // LDNS functions
1284 /******************
1285 * LDNS functions *
1286 ******************/
10601287 char *sldns_wire2str_type(const uint16_t atype);
10611288 char *sldns_wire2str_class(const uint16_t aclass);
10621289
1063 // Functions from pythonmod_utils
1290 /**********************************
1291 * Functions from pythonmod_utils *
1292 **********************************/
10641293 int storeQueryInCache(struct module_qstate* qstate, struct query_info* qinfo, struct reply_info* msgrep, int is_referral);
10651294 void invalidateQueryInCache(struct module_qstate* qstate, struct query_info* qinfo);
10661295
1067 // Module conversion functions
1296 /*******************************
1297 * Module conversion functions *
1298 *******************************/
10681299 const char* strextstate(enum module_ext_state s);
10691300 const char* strmodulevent(enum module_ev e);
10701301
1302 /**************************
1303 * Edns related functions *
1304 **************************/
1305 struct edns_option* edns_opt_list_find(struct edns_option* list, uint16_t code);
1306 int edns_register_option(uint16_t opt_code, int bypass_cache_stage,
1307 int no_aggregation, struct module_env* env);
1308
1309 %pythoncode %{
1310 def register_edns_option(env, code, bypass_cache_stage=False,
1311 no_aggregation=False):
1312 """Wrapper function to provide keyword attributes."""
1313 return edns_register_option(code, bypass_cache_stage,
1314 no_aggregation, env)
1315 %}
1316
1317 /******************************
1318 * Callback related functions *
1319 ******************************/
1320 /* typemap to check if argument is callable */
1321 %typemap(in) PyObject *py_cb {
1322 if (!PyCallable_Check($input)) {
1323 SWIG_exception_fail(SWIG_TypeError, "Need a callable object!");
1324 return NULL;
1325 }
1326 $1 = $input;
1327 }
1328 /* typemap to get content/size from a bytearray */
1329 %typemap(in) (size_t len, uint8_t* py_bytearray_data) {
1330 if (!PyByteArray_CheckExact($input)) {
1331 SWIG_exception_fail(SWIG_TypeError, "Expected bytearray!");
1332 return NULL;
1333 }
1334 $2 = PyByteArray_AsString($input);
1335 $1 = PyByteArray_Size($input);
1336 }
1337
1338 int edns_opt_list_remove(struct edns_option** list, uint16_t code);
1339 int edns_opt_list_append(struct edns_option** list, uint16_t code, size_t len,
1340 uint8_t* py_bytearray_data, struct regional* region);
1341
1342 %{
1343 /* This function is called by unbound in order to call the python
1344 * callback function. */
1345 int python_inplace_cb_reply_generic(struct query_info* qinfo,
1346 struct module_qstate* qstate, struct reply_info* rep, int rcode,
1347 struct edns_data* edns, struct edns_option** opt_list_out,
1348 struct regional* region, void* python_callback)
1349 {
1350 PyObject *func, *py_edns, *py_qstate, *py_opt_list_out, *py_qinfo;
1351 PyObject *py_rep, *py_region;
1352 PyObject *result;
1353 int res = 0;
1354
1355 func = (PyObject *) python_callback;
1356 PyGILState_STATE gstate = PyGILState_Ensure();
1357 py_edns = SWIG_NewPointerObj((void*) edns, SWIGTYPE_p_edns_data, 0);
1358 py_qstate = SWIG_NewPointerObj((void*) qstate,
1359 SWIGTYPE_p_module_qstate, 0);
1360 py_opt_list_out = SWIG_NewPointerObj((void*) opt_list_out,
1361 SWIGTYPE_p_p_edns_option, 0);
1362 py_qinfo = SWIG_NewPointerObj((void*) qinfo, SWIGTYPE_p_query_info, 0);
1363 py_rep = SWIG_NewPointerObj((void*) rep, SWIGTYPE_p_reply_info, 0);
1364 py_region = SWIG_NewPointerObj((void*) region, SWIGTYPE_p_regional, 0);
1365 result = PyObject_CallFunction(func, "OOOiOOO", py_qinfo, py_qstate,
1366 py_rep, rcode, py_edns, py_opt_list_out, py_region);
1367 Py_XDECREF(py_edns);
1368 Py_XDECREF(py_qstate);
1369 Py_XDECREF(py_opt_list_out);
1370 Py_XDECREF(py_qinfo);
1371 Py_XDECREF(py_rep);
1372 Py_XDECREF(py_region);
1373 if (result) {
1374 res = PyInt_AsLong(result);
1375 }
1376 Py_XDECREF(result);
1377 PyGILState_Release(gstate);
1378 return res;
1379 }
1380
1381 /* Swig implementations for Python */
1382 static int register_inplace_cb_reply(PyObject* py_cb,
1383 struct module_env* env)
1384 {
1385 int ret = inplace_cb_reply_register(
1386 python_inplace_cb_reply_generic, (void*) py_cb, env);
1387 if (ret) Py_INCREF(py_cb);
1388 return ret;
1389 }
1390 static int register_inplace_cb_reply_cache(PyObject* py_cb,
1391 struct module_env* env)
1392 {
1393 int ret = inplace_cb_reply_cache_register(
1394 python_inplace_cb_reply_generic, (void*) py_cb, env);
1395 if (ret) Py_INCREF(py_cb);
1396 return ret;
1397 }
1398 static int register_inplace_cb_reply_local(PyObject* py_cb,
1399 struct module_env* env)
1400 {
1401 int ret = inplace_cb_reply_local_register(
1402 python_inplace_cb_reply_generic, (void*) py_cb, env);
1403 if (ret) Py_INCREF(py_cb);
1404 return ret;
1405 }
1406 static int register_inplace_cb_reply_servfail(PyObject* py_cb,
1407 struct module_env* env)
1408 {
1409 int ret = inplace_cb_reply_servfail_register(
1410 python_inplace_cb_reply_generic, (void*) py_cb, env);
1411 if (ret) Py_INCREF(py_cb);
1412 return ret;
1413 }
1414 %}
1415 /* C declarations */
1416 int inplace_cb_reply_register(
1417 inplace_cb_reply_func_t* cb, void* cb_arg, struct module_env* env);
1418 int inplace_cb_reply_cache_register(
1419 inplace_cb_reply_func_t* cb, void* cb_arg, struct module_env* env);
1420 int inplace_cb_reply_local_register(
1421 inplace_cb_reply_func_t* cb, void* cb_arg, struct module_env* env);
1422 int inplace_cb_reply_servfail_register(
1423 inplace_cb_reply_func_t* cb, void* cb_arg, struct module_env* env);
1424
1425 /* Swig declarations */
1426 static int register_inplace_cb_reply(PyObject* py_cb,
1427 struct module_env* env);
1428 static int register_inplace_cb_reply_cache(PyObject* py_cb,
1429 struct module_env* env);
1430 static int register_inplace_cb_reply_local(PyObject* py_cb,
1431 struct module_env* env);
1432 static int register_inplace_cb_reply_servfail(PyObject* py_cb,
1433 struct module_env* env);
111111 {
112112 /* Initialize module */
113113 FILE* script_py = NULL;
114 PyObject* py_cfg, *res;
114 PyObject* py_init_arg, *res;
115115 PyGILState_STATE gil;
116 int init_standard = 1;
117
116118 struct pythonmod_env* pe = (struct pythonmod_env*)calloc(1, sizeof(struct pythonmod_env));
117119 if (!pe)
118120 {
155157 PyRun_SimpleString("import sys \n");
156158 PyRun_SimpleString("sys.path.append('.') \n");
157159 if(env->cfg->directory && env->cfg->directory[0]) {
158 char wdir[1524];
159 snprintf(wdir, sizeof(wdir), "sys.path.append('%s') \n",
160 env->cfg->directory);
161 PyRun_SimpleString(wdir);
160 char wdir[1524];
161 snprintf(wdir, sizeof(wdir), "sys.path.append('%s') \n",
162 env->cfg->directory);
163 PyRun_SimpleString(wdir);
162164 }
163165 PyRun_SimpleString("sys.path.append('"RUN_DIR"') \n");
164166 PyRun_SimpleString("sys.path.append('"SHARE_DIR"') \n");
197199
198200 fclose(script_py);
199201
200 if ((pe->func_init = PyDict_GetItemString(pe->dict, "init")) == NULL)
201 {
202 log_err("pythonmod: function init is missing in %s", pe->fname);
203 PyGILState_Release(gil);
204 return 0;
202 if ((pe->func_init = PyDict_GetItemString(pe->dict, "init_standard")) == NULL)
203 {
204 init_standard = 0;
205 if ((pe->func_init = PyDict_GetItemString(pe->dict, "init")) == NULL)
206 {
207 log_err("pythonmod: function init is missing in %s", pe->fname);
208 PyGILState_Release(gil);
209 return 0;
210 }
205211 }
206212 if ((pe->func_deinit = PyDict_GetItemString(pe->dict, "deinit")) == NULL)
207213 {
222228 return 0;
223229 }
224230
225 py_cfg = SWIG_NewPointerObj((void*) env->cfg, SWIGTYPE_p_config_file, 0);
226 res = PyObject_CallFunction(pe->func_init, "iO", id, py_cfg);
231 if (init_standard)
232 {
233 py_init_arg = SWIG_NewPointerObj((void*) env, SWIGTYPE_p_module_env, 0);
234 }
235 else
236 {
237 py_init_arg = SWIG_NewPointerObj((void*) env->cfg,
238 SWIGTYPE_p_config_file, 0);
239 }
240 res = PyObject_CallFunction(pe->func_init, "iO", id, py_init_arg);
227241 if (PyErr_Occurred())
228242 {
229243 log_err("pythonmod: Exception occurred in function init");
230244 PyErr_Print();
245 Py_XDECREF(res);
246 Py_XDECREF(py_init_arg);
247 PyGILState_Release(gil);
248 return 0;
231249 }
232250
233251 Py_XDECREF(res);
234 Py_XDECREF(py_cfg);
252 Py_XDECREF(py_init_arg);
235253 PyGILState_Release(gil);
236254
237255 return 1;
5454 void pythonmod_deinit(struct module_env* env, int id);
5555
5656 /** python module operate on a query */
57 void pythonmod_operate(struct module_qstate* qstate, enum module_ev event, int id, struct outbound_entry* outbound);
57 void pythonmod_operate(struct module_qstate* qstate, enum module_ev event,
58 int id, struct outbound_entry* outbound);
5859
5960 /** python module */
60 void pythonmod_inform_super(struct module_qstate* qstate, int id, struct module_qstate* super);
61 void pythonmod_inform_super(struct module_qstate* qstate, int id,
62 struct module_qstate* super);
6163
6264 /** python module cleanup query state */
6365 void pythonmod_clear(struct module_qstate* qstate, int id);
6466
6567 /** python module alloc size routine */
6668 size_t pythonmod_get_mem(struct module_env* env, int id);
69
70 /** Declared here for fptr_wlist access. The definition is in interface.i. */
71 int python_inplace_cb_reply_generic(struct query_info* qinfo,
72 struct module_qstate* qstate, struct reply_info* rep, int rcode,
73 struct edns_data* edns, struct edns_option** opt_list_out,
74 struct regional* region, void* python_callback);
6775 #endif /* PYTHONMOD_H */
0 # Example configuration file for edns.py
1 server:
2 verbosity: 1
3 interface: 0.0.0.0
4 do-daemonize: no
5 access-control: 0.0.0.0/0 allow
6 chroot: ""
7 username: ""
8 directory: ""
9 logfile: ""
10 pidfile: "unbound.pid"
11 module-config: "validator python iterator"
12
13 # Python config section
14 python:
15 # Script file to load
16 python-script: "./examples/edns.py"
0 # Example configuration file for edns.py
1 server:
2 verbosity: 1
3 interface: 0.0.0.0
4 do-daemonize: no
5 access-control: 0.0.0.0/0 allow
6 chroot: ""
7 username: ""
8 directory: ""
9 logfile: ""
10 pidfile: "unbound.pid"
11 module-config: "validator python iterator"
12
13 # Python config section
14 python:
15 # Script file to load
16 python-script: "./examples/inplace_callbacks.py"
193193 k.qname_len = qnamelen;
194194 k.qtype = qtype;
195195 k.qclass = qclass;
196 k.local_alias = NULL;
196197 h = query_info_hash(&k, flags);
197198 e = slabhash_lookup(env->msg_cache, h, &k, wr);
198199
360361 msg->qinfo.qname_len = qnamelen;
361362 msg->qinfo.qtype = qtype;
362363 msg->qinfo.qclass = qclass;
364 msg->qinfo.local_alias = NULL;
363365 /* non-packed reply_info, because it needs to grow the array */
364366 msg->rep = (struct reply_info*)regional_alloc_zero(region,
365367 sizeof(struct reply_info)-sizeof(struct rrset_ref));
715717 k.qname_len = qnamelen;
716718 k.qtype = qtype;
717719 k.qclass = qclass;
720 k.local_alias = NULL;
718721 h = query_info_hash(&k, flags);
719722 e = slabhash_lookup(env->msg_cache, h, &k, 0);
720723 if(e) {
794797 dname_remove_label(&k.qname, &k.qname_len);
795798 h = query_info_hash(&k, flags);
796799 e = slabhash_lookup(env->msg_cache, h, &k, 0);
797 if(!e && k.qtype != LDNS_RR_TYPE_NS &&
800 if(!e && k.qtype != LDNS_RR_TYPE_A &&
798801 env->cfg->qname_minimisation) {
799 k.qtype = LDNS_RR_TYPE_NS;
802 k.qtype = LDNS_RR_TYPE_A;
800803 h = query_info_hash(&k, flags);
801804 e = slabhash_lookup(env->msg_cache, h, &k, 0);
802805 }
816819 lock_rw_unlock(&e->lock);
817820 }
818821 k.qtype = qtype;
819 }
822 }
820823
821824 /* fill common RR types for ANY response to avoid requery */
822825 if(qtype == LDNS_RR_TYPE_ANY) {
5151 #include "util/data/msgreply.h"
5252 #include "util/data/msgparse.h"
5353 #include "util/as112.h"
54 #include "util/config_file.h"
55
56 /* maximum RRs in an RRset, to cap possible 'endless' list RRs.
57 * with 16 bytes for an A record, a 64K packet has about 4000 max */
58 #define LOCALZONE_RRSET_COUNT_MAX 4096
5459
5560 struct local_zones*
5661 local_zones_create(void)
153158 z->namelen = len;
154159 z->namelabs = labs;
155160 lock_rw_init(&z->lock);
156 z->region = regional_create();
161 z->region = regional_create_custom(sizeof(struct regional));
157162 if(!z->region) {
158163 free(z);
159164 return NULL;
180185 lock_rw_wrlock(&zones->lock);
181186 lock_rw_wrlock(&z->lock);
182187 if(!rbtree_insert(&zones->ztree, &z->node)) {
188 struct local_zone* oldz;
183189 log_warn("duplicate local-zone");
184190 lock_rw_unlock(&z->lock);
185 local_zone_delete(z);
191 /* save zone name locally before deallocation,
192 * otherwise, nm is gone if we zone_delete now. */
193 oldz = z;
186194 /* find the correct zone, so not an error for duplicate */
187195 z = local_zones_find(zones, nm, len, labs, c);
188196 lock_rw_wrlock(&z->lock);
189197 lock_rw_unlock(&zones->lock);
198 local_zone_delete(oldz);
190199 return z;
191200 }
192201 lock_rw_unlock(&zones->lock);
274283 * Find an rrset in local data structure.
275284 * @param data: local data domain name structure.
276285 * @param type: type to look for (host order).
286 * @param alias_ok: 1 if matching a non-exact, alias type such as CNAME is
287 * allowed. otherwise 0.
277288 * @return rrset pointer or NULL if not found.
278289 */
279290 static struct local_rrset*
280 local_data_find_type(struct local_data* data, uint16_t type)
291 local_data_find_type(struct local_data* data, uint16_t type, int alias_ok)
281292 {
282293 struct local_rrset* p;
283294 type = htons(type);
284295 for(p = data->rrsets; p; p = p->next) {
285296 if(p->rrset->rk.type == type)
297 return p;
298 if(alias_ok && p->rrset->rk.type == htons(LDNS_RR_TYPE_CNAME))
286299 return p;
287300 }
288301 return NULL;
341354 /** insert RR into RRset data structure; Wastes a couple of bytes */
342355 static int
343356 insert_rr(struct regional* region, struct packed_rrset_data* pd,
344 uint8_t* rdata, size_t rdata_len, time_t ttl)
357 uint8_t* rdata, size_t rdata_len, time_t ttl, const char* rrstr)
345358 {
346359 size_t* oldlen = pd->rr_len;
347360 time_t* oldttl = pd->rr_ttl;
348361 uint8_t** olddata = pd->rr_data;
349362
350363 /* add RR to rrset */
364 if(pd->count > LOCALZONE_RRSET_COUNT_MAX) {
365 log_warn("RRset '%s' has more than %d records, record ignored",
366 rrstr, LOCALZONE_RRSET_COUNT_MAX);
367 return 1;
368 }
351369 pd->count++;
352370 pd->rr_len = regional_alloc(region, sizeof(*pd->rr_len)*pd->count);
353371 pd->rr_ttl = regional_alloc(region, sizeof(*pd->rr_ttl)*pd->count);
458476 log_assert(node);
459477 free(nm);
460478
461 rrset = local_data_find_type(node, rrtype);
479 /* Reject it if we would end up having CNAME and other data (including
480 * another CNAME) for a redirect zone. */
481 if(z->type == local_zone_redirect && node->rrsets) {
482 const char* othertype = NULL;
483 if (rrtype == LDNS_RR_TYPE_CNAME)
484 othertype = "other";
485 else if (node->rrsets->rrset->rk.type ==
486 htons(LDNS_RR_TYPE_CNAME)) {
487 othertype = "CNAME";
488 }
489 if(othertype) {
490 log_err("local-data '%s' in redirect zone must not "
491 "coexist with %s local-data", rrstr, othertype);
492 return 0;
493 }
494 }
495 rrset = local_data_find_type(node, rrtype, 0);
462496 if(!rrset) {
463497 rrset = new_local_rrset(z->region, node, rrtype, rrclass);
464498 if(!rrset)
478512 verbose(VERB_ALGO, "ignoring duplicate RR: %s", rrstr);
479513 return 1;
480514 }
481 return insert_rr(z->region, pd, rdata, rdata_len, ttl);
515 return insert_rr(z->region, pd, rdata, rdata_len, ttl, rrstr);
482516 }
483517
484518 /** enter a data RR into auth data; a zone for it must exist */
11471181
11481182 /** encode answer consisting of 1 rrset */
11491183 static int
1150 local_encode(struct query_info* qinfo, struct edns_data* edns,
1151 sldns_buffer* buf, struct regional* temp,
1184 local_encode(struct query_info* qinfo, struct module_env* env,
1185 struct edns_data* edns, sldns_buffer* buf, struct regional* temp,
11521186 struct ub_packed_rrset_key* rrset, int ansec, int rcode)
11531187 {
11541188 struct reply_info rep;
11671201 edns->udp_size = EDNS_ADVERTISED_SIZE;
11681202 edns->ext_rcode = 0;
11691203 edns->bits &= EDNS_DO;
1170 if(!edns_opt_inplace_reply(edns, temp) ||
1171 !reply_info_answer_encode(qinfo, &rep,
1204 if(!inplace_cb_reply_local_call(env, qinfo, NULL, &rep, rcode, edns, temp)
1205 || !reply_info_answer_encode(qinfo, &rep,
11721206 *(uint16_t*)sldns_buffer_begin(buf),
11731207 sldns_buffer_read_u16_at(buf, 2),
1174 buf, 0, 0, temp, udpsize, edns,
1208 buf, 0, 0, temp, udpsize, edns,
11751209 (int)(edns->bits&EDNS_DO), 0))
11761210 error_encode(buf, (LDNS_RCODE_SERVFAIL|BIT_AA), qinfo,
11771211 *(uint16_t*)sldns_buffer_begin(buf),
1178 sldns_buffer_read_u16_at(buf, 2), edns);
1212 sldns_buffer_read_u16_at(buf, 2), edns);
11791213 return 1;
11801214 }
11811215
11821216 /** find local data tag string match for the given type in the list */
11831217 static int
11841218 find_tag_datas(struct query_info* qinfo, struct config_strlist* list,
1185 struct ub_packed_rrset_key* r, struct regional* temp,
1186 uint8_t* zname, size_t zlen)
1219 struct ub_packed_rrset_key* r, struct regional* temp)
11871220 {
11881221 struct config_strlist* p;
11891222 char buf[65536];
11921225 int res;
11931226 struct packed_rrset_data* d;
11941227 for(p=list; p; p=p->next) {
1228 uint16_t rdr_type;
1229
11951230 len = sizeof(rr);
11961231 /* does this element match the type? */
11971232 snprintf(buf, sizeof(buf), ". %s", p->str);
11981233 res = sldns_str2wire_rr_buf(buf, rr, &len, NULL, 3600,
1199 zname, zlen, NULL, 0);
1234 NULL, 0, NULL, 0);
12001235 if(res != 0)
12011236 /* parse errors are already checked before, in
12021237 * acllist check_data, skip this for robustness */
12031238 continue;
12041239 if(len < 1 /* . */ + 8 /* typeclassttl*/ + 2 /*rdatalen*/)
12051240 continue;
1206 if(sldns_wirerr_get_type(rr, len, 1) != qinfo->qtype)
1241 rdr_type = sldns_wirerr_get_type(rr, len, 1);
1242 if(rdr_type != qinfo->qtype && rdr_type != LDNS_RR_TYPE_CNAME)
12071243 continue;
12081244
12091245 /* do we have entries already? if not setup key */
12111247 r->entry.key = r;
12121248 r->rk.dname = qinfo->qname;
12131249 r->rk.dname_len = qinfo->qname_len;
1214 r->rk.type = htons(qinfo->qtype);
1250 r->rk.type = htons(rdr_type);
12151251 r->rk.rrset_class = htons(qinfo->qclass);
12161252 r->rk.flags = 0;
12171253 d = (struct packed_rrset_data*)regional_alloc_zero(
12601296 if(!d) return 0; /* out of memory */
12611297 d->count++;
12621298 }
1299 /* If we've found a non-exact alias type of local data, make a shallow
1300 * copy of the RRset and remember it in qinfo to complete the alias
1301 * chain later. */
1302 if(r->rk.dname && qinfo->qtype != LDNS_RR_TYPE_CNAME &&
1303 r->rk.type == htons(LDNS_RR_TYPE_CNAME)) {
1304 qinfo->local_alias =
1305 regional_alloc_zero(temp, sizeof(struct local_rrset));
1306 if(!qinfo->local_alias)
1307 return 0; /* out of memory */
1308 qinfo->local_alias->rrset =
1309 regional_alloc_init(temp, r, sizeof(*r));
1310 if(!qinfo->local_alias->rrset)
1311 return 0; /* out of memory */
1312 }
12631313 if(r->rk.dname)
12641314 return 1;
12651315 return 0;
12671317
12681318 /** answer local data match */
12691319 static int
1270 local_data_answer(struct local_zone* z, struct query_info* qinfo,
1271 struct edns_data* edns, sldns_buffer* buf, struct regional* temp,
1272 int labs, struct local_data** ldp, enum localzone_type lz_type,
1273 int tag, struct config_strlist** tag_datas, size_t tag_datas_size,
1274 char** tagname, int num_tags)
1320 local_data_answer(struct local_zone* z, struct module_env* env,
1321 struct query_info* qinfo, struct edns_data* edns, sldns_buffer* buf,
1322 struct regional* temp, int labs, struct local_data** ldp,
1323 enum localzone_type lz_type, int tag, struct config_strlist** tag_datas,
1324 size_t tag_datas_size, char** tagname, int num_tags)
12751325 {
12761326 struct local_data key;
12771327 struct local_data* ld;
12871337 if(tag != -1 && (size_t)tag<tag_datas_size && tag_datas[tag]) {
12881338 struct ub_packed_rrset_key r;
12891339 memset(&r, 0, sizeof(r));
1290 if(find_tag_datas(qinfo, tag_datas[tag], &r, temp,
1291 z->name, z->namelen)) {
1340 if(find_tag_datas(qinfo, tag_datas[tag], &r, temp)) {
12921341 verbose(VERB_ALGO, "redirect with tag data [%d] %s",
12931342 tag, (tag<num_tags?tagname[tag]:"null"));
1294 return local_encode(qinfo, edns, buf, temp,
1343
1344 /* If we found a matching alias, we should
1345 * use it as part of the answer, but we can't
1346 * encode it until we complete the alias
1347 * chain. */
1348 if(qinfo->local_alias)
1349 return 1;
1350 return local_encode(qinfo, env, edns, buf, temp,
12951351 &r, 1, LDNS_RCODE_NOERROR);
12961352 }
12971353 }
13011357 if(!ld) {
13021358 return 0;
13031359 }
1304 lr = local_data_find_type(ld, qinfo->qtype);
1360 lr = local_data_find_type(ld, qinfo->qtype, 1);
13051361 if(!lr)
13061362 return 0;
1363
1364 /* Special case for alias matching. See local_data_answer(). */
1365 if(lz_type == local_zone_redirect &&
1366 qinfo->qtype != LDNS_RR_TYPE_CNAME &&
1367 lr->rrset->rk.type == htons(LDNS_RR_TYPE_CNAME)) {
1368 qinfo->local_alias =
1369 regional_alloc_zero(temp, sizeof(struct local_rrset));
1370 if(!qinfo->local_alias)
1371 return 0; /* out of memory */
1372 qinfo->local_alias->rrset =
1373 regional_alloc_init(temp, lr->rrset, sizeof(*lr->rrset));
1374 if(!qinfo->local_alias->rrset)
1375 return 0; /* out of memory */
1376 qinfo->local_alias->rrset->rk.dname = qinfo->qname;
1377 qinfo->local_alias->rrset->rk.dname_len = qinfo->qname_len;
1378 return 1;
1379 }
13071380 if(lz_type == local_zone_redirect) {
13081381 /* convert rrset name to query name; like a wildcard */
13091382 struct ub_packed_rrset_key r = *lr->rrset;
13101383 r.rk.dname = qinfo->qname;
13111384 r.rk.dname_len = qinfo->qname_len;
1312 return local_encode(qinfo, edns, buf, temp, &r, 1,
1385 return local_encode(qinfo, env, edns, buf, temp, &r, 1,
13131386 LDNS_RCODE_NOERROR);
13141387 }
1315 return local_encode(qinfo, edns, buf, temp, lr->rrset, 1,
1388 return local_encode(qinfo, env, edns, buf, temp, lr->rrset, 1,
13161389 LDNS_RCODE_NOERROR);
13171390 }
13181391
13191392 /**
13201393 * answer in case where no exact match is found
13211394 * @param z: zone for query
1395 * @param env: module environment
13221396 * @param qinfo: query
13231397 * @param edns: edns from query
13241398 * @param buf: buffer for answer.
13281402 * @return 1 if a reply is to be sent, 0 if not.
13291403 */
13301404 static int
1331 lz_zone_answer(struct local_zone* z, struct query_info* qinfo,
1332 struct edns_data* edns, sldns_buffer* buf, struct regional* temp,
1333 struct local_data* ld, enum localzone_type lz_type)
1405 lz_zone_answer(struct local_zone* z, struct module_env* env,
1406 struct query_info* qinfo, struct edns_data* edns, sldns_buffer* buf,
1407 struct regional* temp, struct local_data* ld, enum localzone_type lz_type)
13341408 {
13351409 if(lz_type == local_zone_deny || lz_type == local_zone_inform_deny) {
13361410 /** no reply at all, signal caller by clearing buffer. */
13561430 int rcode = (ld || lz_type == local_zone_redirect)?
13571431 LDNS_RCODE_NOERROR:LDNS_RCODE_NXDOMAIN;
13581432 if(z->soa)
1359 return local_encode(qinfo, edns, buf, temp,
1433 return local_encode(qinfo, env, edns, buf, temp,
13601434 z->soa, 0, rcode);
13611435 error_encode(buf, (rcode|BIT_AA), qinfo,
13621436 *(uint16_t*)sldns_buffer_begin(buf),
13741448 if(ld && ld->rrsets) {
13751449 int rcode = LDNS_RCODE_NOERROR;
13761450 if(z->soa)
1377 return local_encode(qinfo, edns, buf, temp,
1451 return local_encode(qinfo, env, edns, buf, temp,
13781452 z->soa, 0, rcode);
13791453 error_encode(buf, (rcode|BIT_AA), qinfo,
13801454 *(uint16_t*)sldns_buffer_begin(buf),
14011475 log_nametypeclass(0, txt, qinfo->qname, qinfo->qtype, qinfo->qclass);
14021476 }
14031477
1404 enum localzone_type
1478 static enum localzone_type
14051479 lz_type(uint8_t *taglist, size_t taglen, uint8_t *taglist2, size_t taglen2,
14061480 uint8_t *tagactions, size_t tagactionssize, enum localzone_type lzt,
14071481 struct comm_reply* repinfo, struct rbtree_t* override_tree, int* tag,
14471521 }
14481522
14491523 int
1450 local_zones_answer(struct local_zones* zones, struct query_info* qinfo,
1451 struct edns_data* edns, sldns_buffer* buf, struct regional* temp,
1452 struct comm_reply* repinfo, uint8_t* taglist, size_t taglen,
1453 uint8_t* tagactions, size_t tagactionssize,
1524 local_zones_answer(struct local_zones* zones, struct module_env* env,
1525 struct query_info* qinfo, struct edns_data* edns, sldns_buffer* buf,
1526 struct regional* temp, struct comm_reply* repinfo, uint8_t* taglist,
1527 size_t taglen, uint8_t* tagactions, size_t tagactionssize,
14541528 struct config_strlist** tag_datas, size_t tag_datas_size,
1455 char** tagname, int num_tags)
1529 char** tagname, int num_tags, struct view* view)
14561530 {
14571531 /* see if query is covered by a zone,
14581532 * if so: - try to match (exact) local data
14591533 * - look at zone type for negative response. */
14601534 int labs = dname_count_labels(qinfo->qname);
14611535 struct local_data* ld = NULL;
1462 struct local_zone* z;
1463 enum localzone_type lzt;
1536 struct local_zone* z = NULL;
1537 enum localzone_type lzt = local_zone_transparent;
14641538 int r, tag = -1;
1465 lock_rw_rdlock(&zones->lock);
1466 z = local_zones_tags_lookup(zones, qinfo->qname,
1467 qinfo->qname_len, labs, qinfo->qclass, taglist, taglen, 0);
1539
1540 if(view) {
1541 lock_rw_rdlock(&view->lock);
1542 if(view->local_zones &&
1543 (z = local_zones_lookup(view->local_zones,
1544 qinfo->qname, qinfo->qname_len, labs,
1545 qinfo->qclass))) {
1546 verbose(VERB_ALGO,
1547 "using localzone from view: %s",
1548 view->name);
1549 lock_rw_rdlock(&z->lock);
1550 lzt = z->type;
1551 }
1552 if(!z && !view->isfirst){
1553 lock_rw_unlock(&view->lock);
1554 return 0;
1555 }
1556 lock_rw_unlock(&view->lock);
1557 }
14681558 if(!z) {
1559 /* try global local_zones tree */
1560 lock_rw_rdlock(&zones->lock);
1561 if(!(z = local_zones_tags_lookup(zones, qinfo->qname,
1562 qinfo->qname_len, labs, qinfo->qclass, taglist,
1563 taglen, 0))) {
1564 lock_rw_unlock(&zones->lock);
1565 return 0;
1566 }
1567 lock_rw_rdlock(&z->lock);
1568
1569 lzt = lz_type(taglist, taglen, z->taglist, z->taglen,
1570 tagactions, tagactionssize, z->type, repinfo,
1571 z->override_tree, &tag, tagname, num_tags);
14691572 lock_rw_unlock(&zones->lock);
1470 return 0;
1471 }
1472 lock_rw_rdlock(&z->lock);
1473 lock_rw_unlock(&zones->lock);
1474
1475 lzt = lz_type(taglist, taglen, z->taglist, z->taglen, tagactions,
1476 tagactionssize, z->type, repinfo, z->override_tree, &tag,
1477 tagname, num_tags);
1478
1573 }
14791574 if((lzt == local_zone_inform || lzt == local_zone_inform_deny)
14801575 && repinfo)
14811576 lz_inform_print(z, qinfo, repinfo);
14821577
1483 if(lzt != local_zone_always_refuse && lzt != local_zone_always_transparent
1578 if(lzt != local_zone_always_refuse
1579 && lzt != local_zone_always_transparent
14841580 && lzt != local_zone_always_nxdomain
1485 && local_data_answer(z, qinfo, edns, buf, temp, labs, &ld, lzt,
1486 tag, tag_datas, tag_datas_size, tagname, num_tags)) {
1581 && local_data_answer(z, env, qinfo, edns, buf, temp, labs, &ld, lzt,
1582 tag, tag_datas, tag_datas_size, tagname, num_tags)) {
14871583 lock_rw_unlock(&z->lock);
1488 return 1;
1489 }
1490 r = lz_zone_answer(z, qinfo, edns, buf, temp, ld, lzt);
1584 /* We should tell the caller that encode is deferred if we found
1585 * a local alias. */
1586 return !qinfo->local_alias;
1587 }
1588 r = lz_zone_answer(z, env, qinfo, edns, buf, temp, ld, lzt);
14911589 lock_rw_unlock(&z->lock);
1492 return r;
1590 return r && !qinfo->local_alias; /* see above */
14931591 }
14941592
14951593 const char* local_zone_type2str(enum localzone_type t)
14961594 {
14971595 switch(t) {
1596 case local_zone_unset: return "unset";
14981597 case local_zone_deny: return "deny";
14991598 case local_zone_refuse: return "refuse";
15001599 case local_zone_redirect: return "redirect";
4343 #include "util/rbtree.h"
4444 #include "util/locks.h"
4545 #include "util/storage/dnstree.h"
46 #include "util/module.h"
47 #include "services/view.h"
4648 struct ub_packed_rrset_key;
4749 struct regional;
4850 struct config_file;
5860 * local-data directly.
5961 */
6062 enum localzone_type {
63 /** unset type, used for unset tag_action elements */
64 local_zone_unset = 0,
6165 /** drop query */
62 local_zone_deny = 0,
66 local_zone_deny,
6367 /** answer with error */
6468 local_zone_refuse,
6569 /** answer nxdomain or nodata */
263267 * Answer authoritatively for local zones.
264268 * Takes care of locking.
265269 * @param zones: the stored zones (shared, read only).
270 * @param env: the module environment.
266271 * @param qinfo: query info (parsed).
267272 * @param edns: edns info (parsed).
268273 * @param buf: buffer with query ID and flags, also for reply.
276281 * @param tag_datas_size: size of tag_datas array.
277282 * @param tagname: array of tag name strings (for debug output).
278283 * @param num_tags: number of items in tagname array.
284 * @param view: answer using this view. May be NULL.
279285 * @return true if answer is in buffer. false if query is not answered
280286 * by authority data. If the reply should be dropped altogether, the return
281287 * value is true, but the buffer is cleared (empty).
282 */
283 int local_zones_answer(struct local_zones* zones, struct query_info* qinfo,
284 struct edns_data* edns, struct sldns_buffer* buf, struct regional* temp,
285 struct comm_reply* repinfo, uint8_t* taglist, size_t taglen,
286 uint8_t* tagactions, size_t tagactionssize,
288 * It can also return true if a non-exact alias answer is found. In this
289 * case qinfo->local_alias points to the corresponding alias RRset but the
290 * answer is NOT encoded in buffer. It's the caller's responsibility to
291 * complete the alias chain (if needed) and encode the final set of answer.
292 * Data pointed to by qinfo->local_alias is allocated in 'temp' or refers to
293 * configuration data. So the caller will need to make a deep copy of it
294 * if it needs to keep it beyond the lifetime of 'temp' or a dynamic update
295 * to local zone data.
296 */
297 int local_zones_answer(struct local_zones* zones, struct module_env* env,
298 struct query_info* qinfo, struct edns_data* edns, struct sldns_buffer* buf,
299 struct regional* temp, struct comm_reply* repinfo, uint8_t* taglist,
300 size_t taglen, uint8_t* tagactions, size_t tagactionssize,
287301 struct config_strlist** tag_datas, size_t tag_datas_size,
288 char** tagname, int num_tags);
302 char** tagname, int num_tags, struct view* view);
289303
290304 /**
291305 * Parse the string into localzone type.
5555 #include "util/alloc.h"
5656 #include "util/config_file.h"
5757 #include "sldns/sbuffer.h"
58 #include "sldns/wire2str.h"
59 #include "services/localzone.h"
60 #include "util/data/dname.h"
5861
5962 /** subtract timers and the values do not overflow or become negative */
6063 static void
125128 {
126129 struct mesh_state* a = (struct mesh_state*)ap;
127130 struct mesh_state* b = (struct mesh_state*)bp;
131
132 if(a->unique < b->unique)
133 return -1;
134 if(a->unique > b->unique)
135 return 1;
128136
129137 if(a->s.is_priming && !b->s.is_priming)
130138 return -1;
281289 uint16_t qflags, struct edns_data* edns, struct comm_reply* rep,
282290 uint16_t qid)
283291 {
284 struct mesh_state* s = mesh_area_find(mesh, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
292 struct mesh_state* s = NULL;
293 int unique = edns_unique_mesh_state(edns->opt_list, mesh->env);
285294 int was_detached = 0;
286295 int was_noreply = 0;
287296 int added = 0;
297 if(!unique)
298 s = mesh_area_find(mesh, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
288299 /* does this create a new reply state? */
289300 if(!s || s->list_select == mesh_no_list) {
290301 if(!mesh_make_new_space(mesh, rep->c->buffer)) {
314325 s = mesh_state_create(mesh->env, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
315326 if(!s) {
316327 log_err("mesh_state_create: out of memory; SERVFAIL");
317 if(!edns_opt_inplace_reply(edns, mesh->env->scratch))
318 edns->opt_list = NULL;
328 if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL, NULL,
329 LDNS_RCODE_SERVFAIL, edns, mesh->env->scratch))
330 edns->opt_list = NULL;
319331 error_encode(rep->c->buffer, LDNS_RCODE_SERVFAIL,
320332 qinfo, qid, qflags, edns);
321333 comm_point_send_reply(rep);
322334 return;
323335 }
336 if(unique)
337 mesh_state_make_unique(s);
338 /* copy the edns options we got from the front */
339 if(edns->opt_list) {
340 s->s.edns_opts_front_in = edns_opt_copy_region(edns->opt_list,
341 s->s.region);
342 if(!s->s.edns_opts_front_in) {
343 log_err("mesh_state_create: out of memory; SERVFAIL");
344 if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL,
345 NULL, LDNS_RCODE_SERVFAIL, edns, mesh->env->scratch))
346 edns->opt_list = NULL;
347 error_encode(rep->c->buffer, LDNS_RCODE_SERVFAIL,
348 qinfo, qid, qflags, edns);
349 comm_point_send_reply(rep);
350 return;
351 }
352 }
353
324354 #ifdef UNBOUND_DEBUG
325355 n =
326356 #else
337367 if(!s->reply_list && !s->cb_list)
338368 was_noreply = 1;
339369 /* add reply to s */
340 if(!mesh_state_add_reply(s, edns, rep, qid, qflags, qinfo->qname)) {
370 if(!mesh_state_add_reply(s, edns, rep, qid, qflags, qinfo)) {
341371 log_err("mesh_new_client: out of memory; SERVFAIL");
342 if(!edns_opt_inplace_reply(edns, mesh->env->scratch))
343 edns->opt_list = NULL;
372 if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, &s->s,
373 NULL, LDNS_RCODE_SERVFAIL, edns, mesh->env->scratch))
374 edns->opt_list = NULL;
344375 error_encode(rep->c->buffer, LDNS_RCODE_SERVFAIL,
345376 qinfo, qid, qflags, edns);
346377 comm_point_send_reply(rep);
379410 uint16_t qflags, struct edns_data* edns, sldns_buffer* buf,
380411 uint16_t qid, mesh_cb_func_t cb, void* cb_arg)
381412 {
382 struct mesh_state* s = mesh_area_find(mesh, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
413 struct mesh_state* s = NULL;
414 int unique = edns_unique_mesh_state(edns->opt_list, mesh->env);
383415 int was_detached = 0;
384416 int was_noreply = 0;
385417 int added = 0;
418 if(!unique)
419 s = mesh_area_find(mesh, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
386420 /* there are no limits on the number of callbacks */
387421
388422 /* see if it already exists, if not, create one */
393427 s = mesh_state_create(mesh->env, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
394428 if(!s) {
395429 return 0;
430 }
431 if(unique)
432 mesh_state_make_unique(s);
433 if(edns->opt_list) {
434 s->s.edns_opts_front_in = edns_opt_copy_region(edns->opt_list,
435 s->s.region);
436 if(!s->s.edns_opts_front_in) {
437 return 0;
438 }
396439 }
397440 #ifdef UNBOUND_DEBUG
398441 n =
432475 void mesh_new_prefetch(struct mesh_area* mesh, struct query_info* qinfo,
433476 uint16_t qflags, time_t leeway)
434477 {
435 struct mesh_state* s = mesh_area_find(mesh, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
478 struct mesh_state* s = mesh_area_find(mesh, qinfo, qflags&(BIT_RD|BIT_CD),
479 0, 0);
436480 #ifdef UNBOUND_DEBUG
437481 struct rbnode_t* n;
438482 #endif
451495 mesh->stats_dropped ++;
452496 return;
453497 }
498
454499 s = mesh_state_create(mesh->env, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0);
455500 if(!s) {
456501 log_err("prefetch mesh_state_create: out of memory");
524569 rbtree_init(&mstate->super_set, &mesh_state_ref_compare);
525570 rbtree_init(&mstate->sub_set, &mesh_state_ref_compare);
526571 mstate->num_activated = 0;
572 mstate->unique = NULL;
527573 /* init module qstate */
528574 mstate->s.qinfo.qtype = qinfo->qtype;
529575 mstate->s.qinfo.qclass = qinfo->qclass;
576 mstate->s.qinfo.local_alias = NULL;
530577 mstate->s.qinfo.qname_len = qinfo->qname_len;
531578 mstate->s.qinfo.qname = regional_alloc_init(region, qinfo->qname,
532579 qinfo->qname_len);
546593 mstate->s.env = env;
547594 mstate->s.mesh_info = mstate;
548595 mstate->s.prefetch_leeway = 0;
596 mstate->s.no_cache_lookup = 0;
597 mstate->s.no_cache_store = 0;
549598 /* init modules */
550599 for(i=0; i<env->mesh->mods.num; i++) {
551600 mstate->s.minfo[i] = NULL;
552601 mstate->s.ext_state[i] = module_state_initial;
553602 }
603 /* init edns option lists */
604 mstate->s.edns_opts_front_in = NULL;
605 mstate->s.edns_opts_back_out = NULL;
606 mstate->s.edns_opts_back_in = NULL;
607 mstate->s.edns_opts_front_out = NULL;
608
554609 return mstate;
610 }
611
612 int
613 mesh_state_is_unique(struct mesh_state* mstate)
614 {
615 return mstate->unique != NULL;
616 }
617
618 void
619 mesh_state_make_unique(struct mesh_state* mstate)
620 {
621 mstate->unique = mstate;
555622 }
556623
557624 void
688755 {
689756 /* find it, if not, create it */
690757 struct mesh_area* mesh = qstate->env->mesh;
691 struct mesh_state* sub = mesh_area_find(mesh, qinfo, qflags, prime,
692 valrec);
758 struct mesh_state* sub = mesh_area_find(mesh, qinfo, qflags, prime, valrec);
693759 int was_detached;
694760 if(mesh_detect_cycle_found(qstate, sub)) {
695761 verbose(VERB_ALGO, "attach failed, cycle detected");
700766 struct rbnode_t* n;
701767 #endif
702768 /* create a new one */
703 sub = mesh_state_create(qstate->env, qinfo, qflags, prime,
704 valrec);
769 sub = mesh_state_create(qstate->env, qinfo, qflags, prime, valrec);
705770 if(!sub) {
706771 log_err("mesh_attach_sub: out of memory");
707772 return 0;
803868 }
804869 /* send the reply */
805870 if(rcode) {
871 if(rcode == LDNS_RCODE_SERVFAIL) {
872 if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
873 rep, rcode, &r->edns, m->s.region))
874 r->edns.opt_list = NULL;
875 } else {
876 if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
877 &r->edns, m->s.region))
878 r->edns.opt_list = NULL;
879 }
806880 fptr_ok(fptr_whitelist_mesh_cb(r->cb));
807881 (*r->cb)(r->cb_arg, rcode, r->buf, sec_status_unchecked, NULL);
808882 } else {
812886 r->edns.udp_size = EDNS_ADVERTISED_SIZE;
813887 r->edns.ext_rcode = 0;
814888 r->edns.bits &= EDNS_DO;
815 if(!edns_opt_inplace_reply(&r->edns, m->s.region) ||
816 !reply_info_answer_encode(&m->s.qinfo, rep, r->qid,
889
890 if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
891 LDNS_RCODE_NOERROR, &r->edns, m->s.region) ||
892 !reply_info_answer_encode(&m->s.qinfo, rep, r->qid,
817893 r->qflags, r->buf, 0, 1,
818894 m->s.env->scratch, udp_size, &r->edns,
819895 (int)(r->edns.bits & EDNS_DO), secure))
846922 struct timeval end_time;
847923 struct timeval duration;
848924 int secure;
925 /* Copy the client's EDNS for later restore, to make sure the edns
926 * compare is with the correct edns options. */
927 struct edns_data edns_bak = r->edns;
849928 /* examine security status */
850929 if(m->s.env->need_to_validate && (!(r->qflags&BIT_CD) ||
851930 m->s.env->cfg->ignore_cd) && rep &&
860939 if(!rep && rcode == LDNS_RCODE_NOERROR)
861940 rcode = LDNS_RCODE_SERVFAIL;
862941 /* send the reply */
942 /* We don't reuse the encoded answer if either the previous or current
943 * response has a local alias. We could compare the alias records
944 * and still reuse the previous answer if they are the same, but that
945 * would be complicated and error prone for the relatively minor case.
946 * So we err on the side of safety. */
863947 if(prev && prev->qflags == r->qflags &&
948 !prev->local_alias && !r->local_alias &&
864949 prev->edns.edns_present == r->edns.edns_present &&
865950 prev->edns.bits == r->edns.bits &&
866951 prev->edns.udp_size == r->edns.udp_size &&
877962 comm_point_send_reply(&r->query_reply);
878963 } else if(rcode) {
879964 m->s.qinfo.qname = r->qname;
965 m->s.qinfo.local_alias = r->local_alias;
966 if(rcode == LDNS_RCODE_SERVFAIL) {
967 if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
968 rep, rcode, &r->edns, m->s.region))
969 r->edns.opt_list = NULL;
970 } else {
971 if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
972 &r->edns, m->s.region))
973 r->edns.opt_list = NULL;
974 }
880975 error_encode(r->query_reply.c->buffer, rcode, &m->s.qinfo,
881976 r->qid, r->qflags, &r->edns);
882977 comm_point_send_reply(&r->query_reply);
887982 r->edns.ext_rcode = 0;
888983 r->edns.bits &= EDNS_DO;
889984 m->s.qinfo.qname = r->qname;
890 if(!edns_opt_inplace_reply(&r->edns, m->s.region) ||
891 !reply_info_answer_encode(&m->s.qinfo, rep, r->qid,
985 m->s.qinfo.local_alias = r->local_alias;
986 if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
987 LDNS_RCODE_NOERROR, &r->edns, m->s.region) ||
988 !reply_info_answer_encode(&m->s.qinfo, rep, r->qid,
892989 r->qflags, r->query_reply.c->buffer, 0, 1,
893990 m->s.env->scratch, udp_size, &r->edns,
894991 (int)(r->edns.bits & EDNS_DO), secure))
895992 {
993 if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
994 rep, LDNS_RCODE_SERVFAIL, &r->edns, m->s.region))
995 r->edns.opt_list = NULL;
896996 error_encode(r->query_reply.c->buffer,
897997 LDNS_RCODE_SERVFAIL, &m->s.qinfo, r->qid,
898998 r->qflags, &r->edns);
899999 }
1000 r->edns = edns_bak;
9001001 comm_point_send_reply(&r->query_reply);
9011002 }
9021003 /* account */
9621063 key.s.is_valrec = valrec;
9631064 key.s.qinfo = *qinfo;
9641065 key.s.query_flags = qflags;
1066 /* We are searching for a similar mesh state when we DO want to
1067 * aggregate the state. Thus unique is set to NULL. (default when we
1068 * desire aggregation).*/
1069 key.unique = NULL;
9651070
9661071 result = (struct mesh_state*)rbtree_search(&mesh->all, &key);
9671072 return result;
9951100 }
9961101
9971102 int mesh_state_add_reply(struct mesh_state* s, struct edns_data* edns,
998 struct comm_reply* rep, uint16_t qid, uint16_t qflags, uint8_t* qname)
1103 struct comm_reply* rep, uint16_t qid, uint16_t qflags,
1104 const struct query_info* qinfo)
9991105 {
10001106 struct mesh_reply* r = regional_alloc(s->s.region,
10011107 sizeof(struct mesh_reply));
10131119 r->qflags = qflags;
10141120 r->start_time = *s->s.env->now_tv;
10151121 r->next = s->reply_list;
1016 r->qname = regional_alloc_init(s->s.region, qname,
1122 r->qname = regional_alloc_init(s->s.region, qinfo->qname,
10171123 s->s.qinfo.qname_len);
10181124 if(!r->qname)
10191125 return 0;
1126
1127 /* Data related to local alias stored in 'qinfo' (if any) is ephemeral
1128 * and can be different for different original queries (even if the
1129 * replaced query name is the same). So we need to make a deep copy
1130 * and store the copy for each reply info. */
1131 if(qinfo->local_alias) {
1132 struct packed_rrset_data* d;
1133 struct packed_rrset_data* dsrc;
1134 r->local_alias = regional_alloc_zero(s->s.region,
1135 sizeof(*qinfo->local_alias));
1136 if(!r->local_alias)
1137 return 0;
1138 r->local_alias->rrset = regional_alloc_init(s->s.region,
1139 qinfo->local_alias->rrset,
1140 sizeof(*qinfo->local_alias->rrset));
1141 if(!r->local_alias->rrset)
1142 return 0;
1143 dsrc = qinfo->local_alias->rrset->entry.data;
1144
1145 /* In the current implementation, a local alias must be
1146 * a single CNAME RR (see worker_handle_request()). */
1147 log_assert(!qinfo->local_alias->next && dsrc->count == 1 &&
1148 qinfo->local_alias->rrset->rk.type ==
1149 htons(LDNS_RR_TYPE_CNAME));
1150 /* Technically, we should make a local copy for the owner
1151 * name of the RRset, but in the case of the first (and
1152 * currently only) local alias RRset, the owner name should
1153 * point to the qname of the corresponding query, which should
1154 * be valid throughout the lifetime of this mesh_reply. So
1155 * we can skip copying. */
1156 log_assert(qinfo->local_alias->rrset->rk.dname ==
1157 sldns_buffer_at(rep->c->buffer, LDNS_HEADER_SIZE));
1158
1159 d = regional_alloc_init(s->s.region, dsrc,
1160 sizeof(struct packed_rrset_data)
1161 + sizeof(size_t) + sizeof(uint8_t*) + sizeof(time_t));
1162 if(!d)
1163 return 0;
1164 r->local_alias->rrset->entry.data = d;
1165 d->rr_len = (size_t*)((uint8_t*)d +
1166 sizeof(struct packed_rrset_data));
1167 d->rr_data = (uint8_t**)&(d->rr_len[1]);
1168 d->rr_ttl = (time_t*)&(d->rr_data[1]);
1169 d->rr_len[0] = dsrc->rr_len[0];
1170 d->rr_ttl[0] = dsrc->rr_ttl[0];
1171 d->rr_data[0] = regional_alloc_init(s->s.region,
1172 dsrc->rr_data[0], d->rr_len[0]);
1173 if(!d->rr_data[0])
1174 return 0;
1175 } else
1176 r->local_alias = NULL;
1177
10201178 s->reply_list = r;
10211179 return 1;
10221180 }
12111369 uint16_t flags, int prime, int valrec)
12121370 {
12131371 struct mesh_area* mesh = qstate->env->mesh;
1214 struct mesh_state* dep_m = mesh_area_find(mesh, qinfo, flags, prime,
1215 valrec);
1372 struct mesh_state* dep_m = NULL;
1373 if(!mesh_state_is_unique(qstate->mesh_info))
1374 dep_m = mesh_area_find(mesh, qinfo, flags, prime, valrec);
12161375 return mesh_detect_cycle_found(qstate, dep_m);
12171376 }
12181377
179179 /** if this state is in the forever list, jostle list, or neither */
180180 enum mesh_list_select { mesh_no_list, mesh_forever_list,
181181 mesh_jostle_list } list_select;
182 /** pointer to this state for uniqueness or NULL */
183 struct mesh_state* unique;
182184
183185 /** true if replies have been sent out (at end for alignment) */
184186 uint8_t replies_sent;
213215 uint16_t qflags;
214216 /** qname from this query. len same as mesh qinfo. */
215217 uint8_t* qname;
218 /** same as that in query_info. */
219 struct local_rrset* local_alias;
216220 };
217221
218222 /**
414418 struct query_info* qinfo, uint16_t qflags, int prime, int valrec);
415419
416420 /**
421 * Check if the mesh state is unique.
422 * A unique mesh state uses it's unique member to point to itself, else NULL.
423 * @param mstate: mesh state to check.
424 * @return true if the mesh state is unique, false otherwise.
425 */
426 int mesh_state_is_unique(struct mesh_state* mstate);
427
428 /**
429 * Make a mesh state unique.
430 * A unique mesh state uses it's unique member to point to itself.
431 * @param mstate: mesh state to check.
432 */
433 void mesh_state_make_unique(struct mesh_state* mstate);
434
435 /**
417436 * Cleanup a mesh state and its query state. Does not do rbtree or
418437 * reference cleanup.
419438 * @param mstate: mesh state to cleanup. Its pointer may no longer be used
458477 * @param rep: comm point reply info.
459478 * @param qid: ID of reply.
460479 * @param qflags: original query flags.
461 * @param qname: original query name.
480 * @param qinfo: original query info.
462481 * @return: 0 on alloc error.
463482 */
464 int mesh_state_add_reply(struct mesh_state* s, struct edns_data* edns,
465 struct comm_reply* rep, uint16_t qid, uint16_t qflags, uint8_t* qname);
483 int mesh_state_add_reply(struct mesh_state* s, struct edns_data* edns,
484 struct comm_reply* rep, uint16_t qid, uint16_t qflags,
485 const struct query_info* qinfo);
466486
467487 /**
468488 * Create new callback structure and attach it to a mesh state.
18781878 return 0;
18791879 }
18801880 #ifdef USE_DNSTAP
1881 if(outnet->dtenv &&
1881 if(error == NETEVENT_NOERROR && outnet->dtenv &&
18821882 (outnet->dtenv->log_resolver_response_messages ||
18831883 outnet->dtenv->log_forwarder_response_messages))
18841884 dt_msg_send_outside_response(outnet->dtenv, &sq->addr, c->type,
19851985
19861986 struct serviced_query*
19871987 outnet_serviced_query(struct outside_network* outnet,
1988 uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
1989 uint16_t flags, int dnssec, int want_dnssec, int nocaps,
1990 int tcp_upstream, int ssl_upstream, struct edns_option* opt_list,
1988 struct query_info* qinfo, uint16_t flags, int dnssec, int want_dnssec,
1989 int nocaps, int tcp_upstream, int ssl_upstream,
19911990 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone,
1992 size_t zonelen, comm_point_callback_t* callback, void* callback_arg,
1993 sldns_buffer* buff)
1991 size_t zonelen, struct module_qstate* qstate,
1992 comm_point_callback_t* callback, void* callback_arg, sldns_buffer* buff,
1993 struct module_env* env)
19941994 {
19951995 struct serviced_query* sq;
19961996 struct service_callback* cb;
1997 serviced_gen_query(buff, qname, qnamelen, qtype, qclass, flags);
1998 sq = lookup_serviced(outnet, buff, dnssec, addr, addrlen, opt_list);
1997 if(!inplace_cb_query_call(env, qinfo, flags, addr, addrlen, zone, zonelen,
1998 qstate, qstate->region))
1999 return NULL;
2000 serviced_gen_query(buff, qinfo->qname, qinfo->qname_len, qinfo->qtype,
2001 qinfo->qclass, flags);
2002 sq = lookup_serviced(outnet, buff, dnssec, addr, addrlen,
2003 qstate->edns_opts_back_out);
19992004 /* duplicate entries are included in the callback list, because
20002005 * there is a counterpart registration by our caller that needs to
20012006 * be doubly-removed (with callbacks perhaps). */
20052010 /* make new serviced query entry */
20062011 sq = serviced_create(outnet, buff, dnssec, want_dnssec, nocaps,
20072012 tcp_upstream, ssl_upstream, addr, addrlen, zone,
2008 zonelen, (int)qtype, opt_list);
2013 zonelen, (int)qinfo->qtype, qstate->edns_opts_back_out);
20092014 if(!sq) {
20102015 free(cb);
20112016 return NULL;
5858 struct serviced_query;
5959 struct dt_env;
6060 struct edns_option;
61 struct module_env;
62 struct module_qstate;
63 struct query_info;
6164
6265 /**
6366 * Send queries to outside servers and wait for answers from servers.
470473 * Perform a serviced query to the authoritative servers.
471474 * Duplicate efforts are detected, and EDNS, TCP and UDP retry is performed.
472475 * @param outnet: outside network, with rbtree of serviced queries.
473 * @param qname: what qname to query.
474 * @param qnamelen: length of qname in octets including 0 root label.
475 * @param qtype: rrset type to query (host format)
476 * @param qclass: query class. (host format)
476 * @param qinfo: query info.
477477 * @param flags: flags u16 (host format), includes opcode, CD bit.
478478 * @param dnssec: if set, DO bit is set in EDNS queries.
479479 * If the value includes BIT_CD, CD bit is set when in EDNS queries.
483483 * @param nocaps: ignore use_caps_for_id and use unperturbed qname.
484484 * @param tcp_upstream: use TCP for upstream queries.
485485 * @param ssl_upstream: use SSL for upstream queries.
486 * @param opt_list: pass edns option list (deep copied into serviced query)
487 * these options are set on the outgoing packets.
488 * @param callback: callback function.
489 * @param callback_arg: user argument to callback function.
490486 * @param addr: to which server to send the query.
491487 * @param addrlen: length of addr.
492488 * @param zone: name of the zone of the delegation point. wireformat dname.
493489 This is the delegation point name for which the server is deemed
494490 authoritative.
495491 * @param zonelen: length of zone.
492 * @param qstate: module qstate. Mainly for inspecting the available
493 * edns_opts_lists.
494 * @param callback: callback function.
495 * @param callback_arg: user argument to callback function.
496496 * @param buff: scratch buffer to create query contents in. Empty on exit.
497 * @param env: the module environment.
497498 * @return 0 on error, or pointer to serviced query that is used to answer
498499 * this serviced query may be shared with other callbacks as well.
499500 */
500501 struct serviced_query* outnet_serviced_query(struct outside_network* outnet,
501 uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
502 uint16_t flags, int dnssec, int want_dnssec, int nocaps,
503 int tcp_upstream, int ssl_upstream, struct edns_option* opt_list,
502 struct query_info* qinfo, uint16_t flags, int dnssec, int want_dnssec,
503 int nocaps, int tcp_upstream, int ssl_upstream,
504504 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone,
505 size_t zonelen, comm_point_callback_t* callback, void* callback_arg,
506 struct sldns_buffer* buff);
505 size_t zonelen, struct module_qstate* qstate,
506 comm_point_callback_t* callback, void* callback_arg,
507 struct sldns_buffer* buff, struct module_env* env);
507508
508509 /**
509510 * Remove service query callback.
0 /*
1 * services/view.c - named views containing local zones authority service.
2 *
3 * Copyright (c) 2016, NLnet Labs. All rights reserved.
4 *
5 * This software is open source.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * Redistributions of source code must retain the above copyright notice,
12 * this list of conditions and the following disclaimer.
13 *
14 * Redistributions in binary form must reproduce the above copyright notice,
15 * this list of conditions and the following disclaimer in the documentation
16 * and/or other materials provided with the distribution.
17 *
18 * Neither the name of the NLNET LABS nor the names of its contributors may
19 * be used to endorse or promote products derived from this software without
20 * specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
28 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35 /**
36 * \file
37 *
38 * This file contains functions to enable named views that can hold local zone
39 * authority service.
40 */
41 #include "config.h"
42 #include "services/view.h"
43 #include "services/localzone.h"
44 #include "util/config_file.h"
45
46 int
47 view_cmp(const void* v1, const void* v2)
48 {
49 struct view* a = (struct view*)v1;
50 struct view* b = (struct view*)v2;
51
52 return strcmp(a->name, b->name);
53 }
54
55 struct views*
56 views_create(void)
57 {
58 struct views* v = (struct views*)calloc(1,
59 sizeof(*v));
60 if(!v)
61 return NULL;
62 rbtree_init(&v->vtree, &view_cmp);
63 lock_rw_init(&v->lock);
64 lock_protect(&v->lock, &v->vtree, sizeof(v->vtree));
65 return v;
66 }
67
68 void
69 view_delete(struct view* v)
70 {
71 if(!v)
72 return;
73 lock_rw_destroy(&v->lock);
74 local_zones_delete(v->local_zones);
75 free(v->name);
76 free(v);
77 }
78
79 static void
80 delviewnode(rbnode_t* n, void* ATTR_UNUSED(arg))
81 {
82 struct view* v = (struct view*)n;
83 view_delete(v);
84 }
85
86 void
87 views_delete(struct views* v)
88 {
89 if(!v)
90 return;
91 lock_rw_destroy(&v->lock);
92 traverse_postorder(&v->vtree, delviewnode, NULL);
93 free(v);
94 }
95
96 /** create a new view */
97 static struct view*
98 view_create(char* name)
99 {
100 struct view* v = (struct view*)calloc(1, sizeof(*v));
101 if(!v)
102 return NULL;
103 v->node.key = v;
104 if(!(v->name = strdup(name))) {
105 free(v);
106 return NULL;
107 }
108 lock_rw_init(&v->lock);
109 lock_protect(&v->lock, &v->name, sizeof(*v)-sizeof(rbnode_t));
110 return v;
111 }
112
113 /** enter a new view returns with WRlock */
114 static struct view*
115 views_enter_view_name(struct views* vs, char* name)
116 {
117 struct view* v = view_create(name);
118 if(!v) {
119 log_err("out of memory");
120 return NULL;
121 }
122
123 /* add to rbtree */
124 lock_rw_wrlock(&vs->lock);
125 lock_rw_wrlock(&v->lock);
126 if(!rbtree_insert(&vs->vtree, &v->node)) {
127 log_warn("duplicate view: %s", name);
128 lock_rw_unlock(&v->lock);
129 view_delete(v);
130 lock_rw_unlock(&vs->lock);
131 return NULL;
132 }
133 lock_rw_unlock(&vs->lock);
134 return v;
135 }
136
137 int
138 views_apply_cfg(struct views* vs, struct config_file* cfg)
139 {
140 struct config_view* cv;
141 struct view* v;
142 struct config_file lz_cfg;
143 /* Check existence of name in first view (last in config). Rest of
144 * views are already checked when parsing config. */
145 if(cfg->views && !cfg->views->name) {
146 log_err("view without a name");
147 return 0;
148 }
149 for(cv = cfg->views; cv; cv = cv->next) {
150 /* create and enter view */
151 if(!(v = views_enter_view_name(vs, cv->name)))
152 return 0;
153 v->isfirst = cv->isfirst;
154 if(cv->local_zones || cv->local_data) {
155 if(!(v->local_zones = local_zones_create())){
156 lock_rw_unlock(&v->lock);
157 return 0;
158 }
159 memset(&lz_cfg, 0, sizeof(lz_cfg));
160 lz_cfg.local_zones = cv->local_zones;
161 lz_cfg.local_data = cv->local_data;
162 lz_cfg.local_zones_nodefault =
163 cv->local_zones_nodefault;
164 if(!local_zones_apply_cfg(v->local_zones, &lz_cfg)){
165 lock_rw_unlock(&v->lock);
166 return 0;
167 }
168 /* local_zones, local_zones_nodefault and local_data
169 * are free'd from config_view by local_zones_apply_cfg.
170 * Set pointers to NULL. */
171 cv->local_zones = NULL;
172 cv->local_data = NULL;
173 cv->local_zones_nodefault = NULL;
174 }
175 lock_rw_unlock(&v->lock);
176 }
177 return 1;
178 }
179
180 /** find a view by name */
181 struct view*
182 views_find_view(struct views* vs, const char* name, int write)
183 {
184 struct view* v;
185 struct view key;
186 key.node.key = &v;
187 key.name = (char *)name;
188 lock_rw_rdlock(&vs->lock);
189 if(!(v = (struct view*)rbtree_search(&vs->vtree, &key.node))) {
190 lock_rw_unlock(&vs->lock);
191 return 0;
192 }
193 if(write) {
194 lock_rw_wrlock(&v->lock);
195 } else {
196 lock_rw_rdlock(&v->lock);
197 }
198 lock_rw_unlock(&vs->lock);
199 return v;
200 }
201
202 void views_print(struct views* v)
203 {
204 /* TODO implement print */
205 (void)v;
206 }
0 /*
1 * services/view.h - named views containing local zones authority service.
2 *
3 * Copyright (c) 2016, NLnet Labs. All rights reserved.
4 *
5 * This software is open source.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * Redistributions of source code must retain the above copyright notice,
12 * this list of conditions and the following disclaimer.
13 *
14 * Redistributions in binary form must reproduce the above copyright notice,
15 * this list of conditions and the following disclaimer in the documentation
16 * and/or other materials provided with the distribution.
17 *
18 * Neither the name of the NLNET LABS nor the names of its contributors may
19 * be used to endorse or promote products derived from this software without
20 * specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
28 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35 /**
36 * \file
37 *
38 * This file contains functions to enable named views that can hold local zone
39 * authority service.
40 */
41
42 #ifndef SERVICES_VIEW_H
43 #define SERVICES_VIEW_H
44 #include "util/rbtree.h"
45 #include "util/locks.h"
46 struct regional;
47 struct config_file;
48 struct config_view;
49
50
51 /**
52 * Views storage, shared.
53 */
54 struct views {
55 /** lock on the view tree */
56 lock_rw_t lock;
57 /** rbtree of struct view */
58 rbtree_t vtree;
59 };
60
61 /**
62 * View. Named structure holding local authority zones.
63 */
64 struct view {
65 /** rbtree node, key is name */
66 rbnode_t node;
67 /** view name.
68 * Has to be right after rbnode_t due to pointer arithmatic in
69 * view_create's lock protect */
70 char* name;
71 /** view specific local authority zones */
72 struct local_zones* local_zones;
73 /** Fallback to global local_zones when there is no match in the view
74 * specific tree. 1 for yes, 0 for no */
75 int isfirst;
76 /** lock on the data in the structure
77 * For the node and name you
78 * need to also hold the views_tree lock to change them (or to
79 * delete this view) */
80 lock_rw_t lock;
81 };
82
83
84 /**
85 * Create views storage
86 * @return new struct or NULL on error.
87 */
88 struct views* views_create(void);
89
90 /**
91 * Delete views storage
92 * @param v: views to delete.
93 */
94 void views_delete(struct views* v);
95
96 /**
97 * Apply config settings;
98 * Takes care of locking.
99 * @param v: view is set up.
100 * @param cfg: config data.
101 * @return false on error.
102 */
103 int views_apply_cfg(struct views* v, struct config_file* cfg);
104
105 /**
106 * Compare two view entries in rbtree. Sort canonical.
107 * @param v1: view 1
108 * @param v2: view 2
109 * @return: negative, positive or 0 comparison value.
110 */
111 int view_cmp(const void* v1, const void* v2);
112
113 /**
114 * Delete one view
115 * @param v: view to delete.
116 */
117 void view_delete(struct view* v);
118
119 /**
120 * Debug helper. Print all views
121 * Takes care of locking.
122 * @param v: the views tree
123 */
124 void views_print(struct views* v);
125
126 /* Find a view by name.
127 * @param vs: views
128 * @param name: name of the view we are looking for
129 * @param write: 1 for obtaining write lock on found view, 0 for read lock
130 * @return: locked view or NULL.
131 */
132 struct view* views_find_view(struct views* vs, const char* name, int write);
133
134 #endif /* SERVICES_VIEW_H */
327327
328328 /** find delimiters for type */
329329 static const char*
330 rrinternal_get_delims(sldns_rdf_type rdftype, uint16_t r_cnt, uint16_t r_max)
330 rrinternal_get_delims(sldns_rdf_type rdftype, size_t r_cnt, size_t r_max)
331331 {
332332 switch(rdftype) {
333333 case LDNS_RDF_TYPE_B64 :
462462 static int
463463 rrinternal_parse_rdf(sldns_buffer* strbuf, char* token, size_t token_len,
464464 uint8_t* rr, size_t rr_len, size_t* rr_cur_len, sldns_rdf_type rdftype,
465 uint16_t rr_type, uint16_t r_cnt, uint16_t r_max, size_t dname_len,
465 uint16_t rr_type, size_t r_cnt, size_t r_max, size_t dname_len,
466466 uint8_t* origin, size_t origin_len)
467467 {
468468 size_t len;
612612 uint8_t* origin, size_t origin_len)
613613 {
614614 const sldns_rr_descriptor *desc = sldns_rr_descript((uint16_t)rr_type);
615 uint16_t r_cnt, r_min, r_max;
615 size_t r_cnt, r_min, r_max;
616616 size_t rr_cur_len = dname_len + 10, pre_data_pos, token_strlen;
617617 int was_unknown_rr_format = 0, parens = 0, status, quoted;
618618 const char* delimiters;
692692 sldns_buffer_position(strbuf));
693693 }
694694 /* write rdata length */
695 sldns_write_uint16(rr+dname_len+8, rr_cur_len-dname_len-10);
695 sldns_write_uint16(rr+dname_len+8, (uint16_t)(rr_cur_len-dname_len-10));
696696 *rr_len = rr_cur_len;
697697 return LDNS_WIREPARSE_ERR_OK;
698698 }
13681368 if (tm.tm_sec < 0 || tm.tm_sec > 59)
13691369 return LDNS_WIREPARSE_ERR_SYNTAX_TIME;
13701370
1371 sldns_write_uint32(rd, sldns_mktime_from_utc(&tm));
1371 sldns_write_uint32(rd, (uint32_t)sldns_mktime_from_utc(&tm));
13721372 } else {
13731373 /* handle it as 32 bits timestamp */
13741374 char *end;
19311931 if(!isalnum((unsigned char)*ptr))
19321932 return RET_ERR(LDNS_WIREPARSE_ERR_SYNTAX_TAG, ptr-str);
19331933 }
1934 rd[0] = slen;
1934 rd[0] = (uint8_t)slen;
19351935 memmove(rd+1, str, slen);
19361936 *len = slen+1;
19371937 return LDNS_WIREPARSE_ERR_OK;
19991999 return RET_ERR_SHIFT(e, s-(char*)str);
20002000 if(pklen > 65535)
20012001 return RET_ERR(LDNS_WIREPARSE_ERR_LABEL_OVERFLOW, s-(char*)str+65535);
2002 sldns_write_uint16(rd+2, pklen);
2002 sldns_write_uint16(rd+2, (uint16_t)pklen);
20032003
20042004 *len = 4 + hitlen + pklen;
20052005 return LDNS_WIREPARSE_ERR_OK;
666666 uint8_t* origd = *d;
667667 char* origs = *s;
668668 size_t origdlen = *dlen, origslen = *slen;
669 uint16_t r_cnt, r_max;
669 size_t r_cnt, r_max;
670670 sldns_rdf_type rdftype;
671671 int w = 0, n;
672672
787787 }
788788
789789 /* spool label characters, end with '.' */
790 if(in_buf && *dlen < labellen) labellen = *dlen;
791 else if(!in_buf && pos+labellen > pkt+pktlen)
790 if(in_buf && *dlen < (size_t)labellen)
791 labellen = (uint8_t)*dlen;
792 else if(!in_buf && pos+(size_t)labellen > pkt+pktlen)
792793 labellen = (uint8_t)(pkt + pktlen - pos);
793794 for(i=0; i<(unsigned)labellen; i++) {
794795 w += dname_char_print(s, slen, *pos++);
19591960 w += sldns_str_print(str, str_len, " ; udp: %u", (unsigned)udpsize);
19601961
19611962 if(rdatalen) {
1962 if(*data_len < rdatalen) {
1963 if((size_t)*data_len < rdatalen) {
19631964 w += sldns_str_print(str, str_len,
19641965 " ; Error EDNS rdata too short; ");
1965 rdatalen = *data_len;
1966 rdatalen = (uint16_t)*data_len;
19661967 }
19671968 w += print_edns_opts(str, str_len, *data, rdatalen);
19681969 (*data) += rdatalen;
419419 {
420420 const char* builtin_cert = get_builtin_cert();
421421 STACK_OF(X509)* sk;
422 BIO *bio = BIO_new_mem_buf((void*)builtin_cert,
423 (int)strlen(builtin_cert));
422 BIO *bio;
423 char* d = strdup(builtin_cert); /* to avoid const warnings in the
424 changed prototype of BIO_new_mem_buf */
425 if(!d) {
426 if(verb) printf("out of memory\n");
427 exit(0);
428 }
429 bio = BIO_new_mem_buf(d, (int)strlen(d));
424430 if(!bio) {
425431 if(verb) printf("out of memory\n");
426432 exit(0);
431437 exit(0);
432438 }
433439 BIO_free(bio);
440 free(d);
434441 return sk;
435442 }
436443
9696 print_option(struct config_file* cfg, const char* opt, int final)
9797 {
9898 if(strcmp(opt, "pidfile") == 0 && final) {
99 printf("%s\n", fname_after_chroot(cfg->pidfile, cfg, 1));
99 char *p = fname_after_chroot(cfg->pidfile, cfg, 1);
100 if(!p) fatal_exit("out of memory");
101 printf("%s\n", p);
102 free(p);
100103 return;
101104 }
102105 if(!config_get_option(cfg, opt, config_print_func, stdout))
114117 env.scratch_buffer = sldns_buffer_new(BUFSIZ);
115118 if(!env.scratch || !env.scratch_buffer)
116119 fatal_exit("out of memory");
120 if(!edns_known_options_init(&env))
121 fatal_exit("out of memory");
117122 if(!(*fb->init)(&env, 0)) {
118123 fatal_exit("bad config for %s module", fb->name);
119124 }
120125 (*fb->deinit)(&env, 0);
121126 sldns_buffer_free(env.scratch_buffer);
122127 regional_destroy(env.scratch);
128 edns_known_options_delete(&env);
123129 }
124130
125131 /** check localzones */
485491 static void
486492 checkconf(const char* cfgfile, const char* opt, int final)
487493 {
488 char oldwd[PATH_MAX];
494 char oldwd[4096];
489495 struct config_file* cfg = config_create();
490496 if(!cfg)
491497 fatal_exit("out of memory");
175175 free(c_cert);
176176 } else {
177177 /* Use ciphers that don't require authentication */
178 if(!SSL_CTX_set_cipher_list(ctx, "aNULL"))
178 #ifdef HAVE_SSL_CTX_SET_SECURITY_LEVEL
179 SSL_CTX_set_security_level(ctx, 0);
180 #endif
181 if(!SSL_CTX_set_cipher_list(ctx, "aNULL, eNULL"))
179182 ssl_err("Error setting NULL cipher!");
180183 }
181184 return ctx;
299302 }
300303 }
301304
305 /** send end-of-file marker to server */
306 static void
307 send_eof(SSL* ssl)
308 {
309 char e[] = {0x04, 0x0a};
310 if(SSL_write(ssl, e, (int)sizeof(e)) <= 0)
311 ssl_err("could not SSL_write end-of-file marker");
312 }
313
302314 /** send command and display result */
303315 static int
304316 go_cmd(SSL* ssl, int quiet, int argc, char* argv[])
323335
324336 if(argc == 1 && strcmp(argv[0], "load_cache") == 0) {
325337 send_file(ssl, stdin, buf, sizeof(buf));
338 }
339 else if(argc == 1 && (strcmp(argv[0], "local_zones") == 0 ||
340 strcmp(argv[0], "local_zones_remove") == 0 ||
341 strcmp(argv[0], "local_datas") == 0 ||
342 strcmp(argv[0], "local_datas_remove") == 0)) {
343 send_file(ssl, stdin, buf, sizeof(buf));
344 send_eof(ssl);
326345 }
327346
328347 while(1) {
9898 log_assert(0);
9999 }
100100
101 struct outbound_entry* worker_send_query(uint8_t* ATTR_UNUSED(qname),
102 size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype),
103 uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags),
101 struct outbound_entry* worker_send_query(
102 struct query_info* ATTR_UNUSED(qinfo), uint16_t ATTR_UNUSED(flags),
104103 int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec),
105 int ATTR_UNUSED(nocaps), struct edns_option* ATTR_UNUSED(opt_list),
106 struct sockaddr_storage* ATTR_UNUSED(addr),
104 int ATTR_UNUSED(nocaps), struct sockaddr_storage* ATTR_UNUSED(addr),
107105 socklen_t ATTR_UNUSED(addrlen), uint8_t* ATTR_UNUSED(zone),
108 size_t ATTR_UNUSED(zonelen), struct module_qstate* ATTR_UNUSED(q))
106 size_t ATTR_UNUSED(zonelen), int ATTR_UNUSED(ssl_upstream),
107 struct module_qstate* ATTR_UNUSED(q))
109108 {
110109 log_assert(0);
111110 return 0;
131130 log_assert(0);
132131 }
133132
134 struct outbound_entry* libworker_send_query(uint8_t* ATTR_UNUSED(qname),
135 size_t ATTR_UNUSED(qnamelen), uint16_t ATTR_UNUSED(qtype),
136 uint16_t ATTR_UNUSED(qclass), uint16_t ATTR_UNUSED(flags),
133 struct outbound_entry* libworker_send_query(
134 struct query_info* ATTR_UNUSED(qinfo), uint16_t ATTR_UNUSED(flags),
137135 int ATTR_UNUSED(dnssec), int ATTR_UNUSED(want_dnssec),
138 int ATTR_UNUSED(nocaps), struct edns_option* ATTR_UNUSED(opt_list),
139 struct sockaddr_storage* ATTR_UNUSED(addr),
136 int ATTR_UNUSED(nocaps), struct sockaddr_storage* ATTR_UNUSED(addr),
140137 socklen_t ATTR_UNUSED(addrlen), uint8_t* ATTR_UNUSED(zone),
141 size_t ATTR_UNUSED(zonelen), struct module_qstate* ATTR_UNUSED(q))
138 size_t ATTR_UNUSED(zonelen), int ATTR_UNUSED(ssl_upstream),
139 struct module_qstate* ATTR_UNUSED(q))
142140 {
143141 log_assert(0);
144142 return 0;
224222
225223 int order_lock_cmp(const void* e1, const void* e2)
226224 {
227 struct order_id* o1 = (struct order_id*)e1;
228 struct order_id* o2 = (struct order_id*)e2;
225 const struct order_id* o1 = e1;
226 const struct order_id* o2 = e2;
229227 if(o1->thr < o2->thr) return -1;
230228 if(o1->thr > o2->thr) return 1;
231229 if(o1->instance < o2->instance) return -1;
236234 int
237235 codeline_cmp(const void* a, const void* b)
238236 {
239 return strcmp((const char*)a, (const char*)b);
237 return strcmp(a, b);
240238 }
241239
242240 int replay_var_compare(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
469469 return 1;
470470 }
471471
472 /* perform asyncronous calls */
472 /* perform asynchronous calls */
473473 num_wait = argc;
474474 for(i=0; i<argc; i++) {
475475 lookups[i].name = argv[i];
10351035 }
10361036
10371037 struct serviced_query* outnet_serviced_query(struct outside_network* outnet,
1038 uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
1039 uint16_t flags, int dnssec, int ATTR_UNUSED(want_dnssec),
1040 int ATTR_UNUSED(nocaps), int ATTR_UNUSED(tcp_upstream),
1041 int ATTR_UNUSED(ssl_upstream), struct edns_option* opt_list,
1038 struct query_info* qinfo, uint16_t flags, int dnssec,
1039 int ATTR_UNUSED(want_dnssec), int ATTR_UNUSED(nocaps),
1040 int ATTR_UNUSED(tcp_upstream), int ATTR_UNUSED(ssl_upstream),
10421041 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone,
1043 size_t zonelen, comm_point_callback_t* callback, void* callback_arg,
1044 sldns_buffer* ATTR_UNUSED(buff))
1042 size_t zonelen, struct module_qstate* qstate,
1043 comm_point_callback_t* callback, void* callback_arg,
1044 sldns_buffer* ATTR_UNUSED(buff), struct module_env* ATTR_UNUSED(env))
10451045 {
10461046 struct replay_runtime* runtime = (struct replay_runtime*)outnet->base;
10471047 struct fake_pending* pend = (struct fake_pending*)calloc(1,
10491049 char z[256];
10501050 log_assert(pend);
10511051 log_nametypeclass(VERB_OPS, "pending serviced query",
1052 qname, qtype, qclass);
1052 qinfo->qname, qinfo->qtype, qinfo->qclass);
10531053 dname_str(zone, z);
10541054 verbose(VERB_OPS, "pending serviced query zone %s flags%s%s%s%s",
10551055 z, (flags&BIT_RD)?" RD":"", (flags&BIT_CD)?" CD":"",
10641064 sldns_buffer_write_u16(pend->buffer, 0); /* ancount */
10651065 sldns_buffer_write_u16(pend->buffer, 0); /* nscount */
10661066 sldns_buffer_write_u16(pend->buffer, 0); /* arcount */
1067 sldns_buffer_write(pend->buffer, qname, qnamelen);
1068 sldns_buffer_write_u16(pend->buffer, qtype);
1069 sldns_buffer_write_u16(pend->buffer, qclass);
1067 sldns_buffer_write(pend->buffer, qinfo->qname, qinfo->qname_len);
1068 sldns_buffer_write_u16(pend->buffer, qinfo->qtype);
1069 sldns_buffer_write_u16(pend->buffer, qinfo->qclass);
10701070 sldns_buffer_flip(pend->buffer);
10711071 if(1) {
10721072 /* add edns */
10761076 edns.edns_version = EDNS_ADVERTISED_VERSION;
10771077 edns.udp_size = EDNS_ADVERTISED_SIZE;
10781078 edns.bits = 0;
1079 edns.opt_list = opt_list;
1079 edns.opt_list = qstate->edns_opts_back_out;
10801080 if(dnssec)
10811081 edns.bits = EDNS_DO;
10821082 attach_edns_record(pend->buffer, &edns);
10851085 pend->addrlen = addrlen;
10861086 pend->zone = memdup(zone, zonelen);
10871087 pend->zonelen = zonelen;
1088 pend->qtype = (int)qtype;
1088 pend->qtype = (int)qinfo->qtype;
10891089 log_assert(pend->zone);
10901090 pend->callback = callback;
10911091 pend->cb_arg = callback_arg;
235235 int main(int argc, const char* argv[])
236236 {
237237 rbtree_t* tree = 0;
238 log_init(NULL, 0, 0);
238239 if(argc != 2) {
239240 usage();
240241 }
486486 qinfo.qname = sldns_str2wire_dname(nm, &qinfo.qname_len);
487487 if(!qinfo.qname)
488488 return 0;
489 qinfo.local_alias = NULL;
489490 qinfo_query_encode(buf, &qinfo);
490491 sldns_buffer_write_u16_at(buf, 0, 0); /* zero ID */
491492 if(rec) LDNS_RD_SET(sldns_buffer_begin(buf));
127127 qinfo.qtype = sldns_get_rr_type_by_name(strtype);
128128 qinfo.qclass = sldns_get_rr_class_by_name(strclass);
129129
130 /* clear local alias */
131 qinfo.local_alias = NULL;
132
130133 /* make query */
131134 qinfo_query_encode(buf, &qinfo);
132135 sldns_buffer_write_u16_at(buf, 0, id);
Binary diff not shown
0 ; config options
1 server:
2 # put unbound.conf config options here.
3
4 access-control: 127.0.0.1/32 allow_snoop #allow queries with RD bit
5
6 # DNSSEC trust anchor taken from a real world example. Used for
7 # DNSSEC-signed CNAME target.
8 trust-anchor: "infoblox.com. 172800 IN DNSKEY 257 3 5 AwEAAerW6xQkJIb5wxm48RoHD/LE8r/GzmdIGOam0lQczIth+I9ctltV dDJXz5BH8j4TOaOH1gBRCXhsPDyPom/eLEkdUuXNuhV6QnWGHOtz1fuY EO+kBqaI79jR0K31OmevR/H/F3C8gi4T6//6G9qsftvcl6m7+V1vI2+c cgxiiOlMrZZb4YAhue1+tRw57f3aVOSNtcrONO/Jffgb9jbDTKRi33oT fDznyPa1lCWMbuybr/LaCU0LP6fG4BII/FDWFi5rQxMHygWfscdYX06c eGUzHqiuNNGL8Jze6johni71T/hJGtLMozkY7qxOLfWBXOu9kr1MBQh5 6hfibOZMZJM="
9 # Use a fixed and faked date for DNSSEC validation to avoid run-time
10 # re-signing test signatures.
11 val-override-date: "20161001003725"
12
13 define-tag: "cname cname2 nx servfail sec ambiguous"
14 access-control-tag: 127.0.0.1/32 "cname cname2 nx servfail sec"
15
16 # Basic case: one CNAME whose target exists.
17 local-zone: example.com static
18 local-zone-tag: example.com "cname"
19 access-control-tag: 127.0.0.1/32 "cname"
20 access-control-tag-action: 127.0.0.1/32 "cname" redirect
21 access-control-tag-data: 127.0.0.1/32 "cname" "CNAME example.org."
22
23 # Similar to the above, but different original query name.
24 local-zone: another.example.com static
25 local-zone-tag: another.example.com "cname2"
26 access-control-tag: 127.0.0.1/32 "cname2"
27 access-control-tag-action: 127.0.0.1/32 "cname2" redirect
28 access-control-tag-data: 127.0.0.1/32 "cname2" "CNAME example.org."
29
30 # CNAME target is expected to be nonexistent.
31 local-zone: nx.example.com static
32 local-zone-tag: nx.example.com "nx"
33 access-control-tag: 127.0.0.1/32 "nx"
34 access-control-tag-action: 127.0.0.1/32 "nx" redirect
35 access-control-tag-data: 127.0.0.1/32 "nx" "CNAME nx.example.org."
36
37 # Resolution of this CNAME target will result in SERVFAIL.
38 local-zone: servfail.example.com static
39 local-zone-tag: servfail.example.com "servfail"
40 access-control-tag-action: 127.0.0.1/32 "servfail" redirect
41 access-control-tag-data: 127.0.0.1/32 "servfail" "CNAME servfail.example.org."
42
43 # CNAME target is supposed to be DNSSEC-signed.
44 local-zone: sec.example.com static
45 local-zone-tag: sec.example.com "sec"
46 access-control-tag-action: 127.0.0.1/32 "sec" redirect
47 access-control-tag-data: 127.0.0.1/32 "sec" "CNAME www.infoblox.com."
48
49 # Test setup for non-tag based redirect
50 local-zone: example.net redirect
51 local-data: "example.net. IN CNAME cname.example.org."
52
53 ### template zone and tag intended to be used for tests with CNAME and
54 ### other data.
55 ##local-zone: ambiguous.example.com redirect
56 ##@LOCALDATA1@
57 ##@LOCALDATA2@
58 ##local-zone-tag: ambiguous.example.com "ambiguous"
59 ##access-control-tag-action: 127.0.0.1/32 "ambiguous" redirect
60 ##@TAGDATA1@
61 ##@TAGDATA2@
62
63
64
65 target-fetch-policy: "0 0 0 0 0"
66
67 # send the queries to the test server (see the 10.0.10.3 entries below)
68 forward-zone:
69 name: "."
70 forward-addr: 10.0.10.3
71 CONFIG_END
72
73 ; short one-line description of scenario:
74 SCENARIO_BEGIN Test local-data CNAME aliases
75
76 ; Specification of the answers that the upstream server provides to unbound
77 RANGE_BEGIN 0 1000
78 ADDRESS 10.0.10.3
79 ; put entries here with answers to specific qname, qtype
80
81 ; infoblox.com
82 ENTRY_BEGIN
83 MATCH opcode qtype qname
84 ADJUST copy_id
85 REPLY QR NOERROR
86 SECTION QUESTION
87 infoblox.com. IN DNSKEY
88 SECTION ANSWER
89 infoblox.com. 172800 IN DNSKEY 256 3 5 AwEAAbi2VnVHFm5rO2EiawNWhTTRPPzaA+VEdpGOc+CtwIZq86C4Ndbp 0M7XTi0wru0Pgh54oGZ3ty9WllYEnVfoA1rcGwFJmAln7KKAuQP+dlGE yHPJYduAjG/JFA6Qq0zj18AmWgks+qvethASMm3PtihQkNytjmQWjiL6 6h8cQwFP
90 infoblox.com. 172800 IN DNSKEY 257 3 5 AwEAAerW6xQkJIb5wxm48RoHD/LE8r/GzmdIGOam0lQczIth+I9ctltV dDJXz5BH8j4TOaOH1gBRCXhsPDyPom/eLEkdUuXNuhV6QnWGHOtz1fuY EO+kBqaI79jR0K31OmevR/H/F3C8gi4T6//6G9qsftvcl6m7+V1vI2+c cgxiiOlMrZZb4YAhue1+tRw57f3aVOSNtcrONO/Jffgb9jbDTKRi33oT fDznyPa1lCWMbuybr/LaCU0LP6fG4BII/FDWFi5rQxMHygWfscdYX06c eGUzHqiuNNGL8Jze6johni71T/hJGtLMozkY7qxOLfWBXOu9kr1MBQh5 6hfibOZMZJM=
91 infoblox.com. 172800 IN RRSIG DNSKEY 5 2 172800 20161004003725 20160930000830 31651 infoblox.com. Ds7LZY2W59fq9cWgqi3W6so1NGFa7JdjO8zlhK3hGu2a2WG1W/rVftom rCf0gdI5q4BZJnq2o0SdLd/U7he1uWz8ATntEETiNs9/8G7myNK17wQu AN/+3gol+qT4DX0CA3Boz7Z+xFQbTwnnJJvGASa/1jPMIYU8DiyNx3Pe SSh9lbyU/4YI0mshn5ZC2HCFChxr+aVJxk4UHjaPfHhWwVu9oM4IbEfn KD9x4ltKjjy0pXMYqVlNs9+tG2nXdwr/6Q4G+yfRBAcW+cWeW5w4igxf xYFq4Y5gkZetGOReoNODZ9YC9WvcxBo+qY/iUN2k+lEFq+oL8+DthAGH uA1krw==
92 SECTION AUTHORITY
93 SECTION ADDITIONAL
94 ENTRY_END
95
96 ENTRY_BEGIN
97 MATCH opcode qtype qname
98 ADJUST copy_id
99 REPLY QR NOERROR
100 SECTION QUESTION
101 www.infoblox.com. IN A
102 SECTION ANSWER
103 www.infoblox.com. 3600 IN A 161.47.10.70
104 www.infoblox.com. 3600 IN RRSIG A 5 3 3600 20161003223322 20160929221122 14916 infoblox.com. WbO9ydRAoRTPvdK18atTdLEkkMGoOjuwbcb6vVI0d6Sea3xkcBMNmtst Wdzr+pKEJqO2bfm167X6uhcOHanHZRnirlTnEbuTdsP0HCiIEGQD5iHg UNH2FJSKGNYBmgZKJpuLhDca7oqtkl8EyGA+UEt6Rtq6aW8V0wpkhPHi Pug='
105 SECTION AUTHORITY
106 SECTION ADDITIONAL
107 ENTRY_END
108
109 ; example.org
110 ENTRY_BEGIN
111 MATCH opcode qtype qname
112 ADJUST copy_id
113 REPLY QR NOERROR
114 SECTION QUESTION
115 example.org. IN A
116 SECTION ANSWER
117 example.org. IN A 192.0.2.1
118 SECTION AUTHORITY
119 SECTION ADDITIONAL
120 ENTRY_END
121
122 ENTRY_BEGIN
123 MATCH opcode qtype qname
124 ADJUST copy_id
125 REPLY QR NOERROR
126 SECTION QUESTION
127 cname.example.org. IN A
128 SECTION ANSWER
129 cname.example.org. IN A 192.0.2.2
130 SECTION AUTHORITY
131 SECTION ADDITIONAL
132 ENTRY_END
133
134 ENTRY_BEGIN
135 MATCH opcode qtype qname
136 ADJUST copy_id
137 REPLY QR NOERROR
138 SECTION QUESTION
139 example.org. IN AAAA
140 SECTION ANSWER
141 SECTION AUTHORITY
142 example.org. IN SOA ns.example.org. hostmaster.example.org. 2016101900 28800 7200 604800 3600
143 SECTION ADDITIONAL
144 ENTRY_END
145
146 ENTRY_BEGIN
147 MATCH opcode qtype qname
148 ADJUST copy_id
149 REPLY QR NXDOMAIN
150 SECTION QUESTION
151 nx.example.org. IN A
152 SECTION ANSWER
153 SECTION AUTHORITY
154 example.org. IN SOA ns.example.org. hostmaster.example.org. 2016101900 28800 7200 604800 3600
155 SECTION ADDITIONAL
156 ENTRY_END
157
158 ; for norec query
159 ENTRY_BEGIN
160 MATCH opcode qtype qname
161 ADJUST copy_id
162 REPLY QR NOERROR
163 SECTION QUESTION
164 example.org. IN NS
165 SECTION ANSWER
166 example.org. IN NS ns.example.
167 SECTION AUTHORITY
168 SECTION ADDITIONAL
169 ENTRY_END
170
171 ENTRY_BEGIN
172 MATCH opcode qtype qname
173 ADJUST copy_id
174 REPLY QR SERVFAIL
175 SECTION QUESTION
176 servfail.example.org. IN A
177 SECTION ANSWER
178 SECTION AUTHORITY
179 SECTION ADDITIONAL
180 ENTRY_END
181
182 ; end of entries with answers from upstream server
183 RANGE_END
184 ; Steps where queries are sent, one at a time, to unbound.
185 ; QUERY is what the downstream client sends to unbound.
186 ; CHECK_ANSWER contains the response from unbound.
187
188
189 ; Basic case: both exact and subdomain matches result in the same CNAME
190 STEP 10 QUERY
191 ENTRY_BEGIN
192 REPLY RD
193 SECTION QUESTION
194 example.com. IN CNAME
195 ENTRY_END
196
197 ; For type-CNAME queries, the CNAME itself will be returned
198 STEP 20 CHECK_ANSWER
199 ENTRY_BEGIN
200 MATCH all
201 REPLY QR RD RA AA NOERROR
202 SECTION QUESTION
203 example.com. IN CNAME
204 SECTION ANSWER
205 example.com. IN CNAME example.org.
206 SECTION AUTHORITY
207 SECTION ADDITIONAL
208 ENTRY_END
209
210 STEP 30 QUERY
211 ENTRY_BEGIN
212 REPLY RD
213 SECTION QUESTION
214 alias.example.com. IN CNAME
215 ENTRY_END
216
217 ; For type-CNAME queries, the CNAME itself will be returned
218 STEP 40 CHECK_ANSWER
219 ENTRY_BEGIN
220 MATCH all
221 REPLY QR RD RA AA NOERROR
222 SECTION QUESTION
223 alias.example.com. IN CNAME
224 SECTION ANSWER
225 alias.example.com. IN CNAME example.org.
226 SECTION AUTHORITY
227 SECTION ADDITIONAL
228 ENTRY_END
229
230 ; Basic case: both exact and subdomain matches result in the same CNAME
231 ; For other types, a complete CNAME chain will have to be returned
232 STEP 50 QUERY
233 ENTRY_BEGIN
234 REPLY RD
235 SECTION QUESTION
236 example.com. IN A
237 ENTRY_END
238
239 STEP 60 CHECK_ANSWER
240 ENTRY_BEGIN
241 MATCH all
242 REPLY QR RD RA AA NOERROR
243 SECTION QUESTION
244 example.com. IN A
245 SECTION ANSWER
246 example.com. IN CNAME example.org.
247 example.org. IN A 192.0.2.1
248 SECTION AUTHORITY
249 SECTION ADDITIONAL
250 ENTRY_END
251
252 STEP 70 QUERY
253 ENTRY_BEGIN
254 REPLY RD
255 SECTION QUESTION
256 alias.example.com. IN A
257 ENTRY_END
258
259 STEP 80 CHECK_ANSWER
260 ENTRY_BEGIN
261 MATCH all
262 REPLY QR RD RA AA NOERROR
263 SECTION QUESTION
264 alias.example.com. IN A
265 SECTION ANSWER
266 alias.example.com. IN CNAME example.org.
267 example.org. IN A 192.0.2.1
268 SECTION AUTHORITY
269 SECTION ADDITIONAL
270 ENTRY_END
271
272 ; Basic case: both exact and subdomain matches result in the same CNAME.
273 ; The result is the same for non-recursive query as long as a
274 ; complete chain is cached.
275 STEP 90 QUERY
276 ENTRY_BEGIN
277 REPLY
278 SECTION QUESTION
279 example.com. IN A
280 ENTRY_END
281
282 STEP 100 CHECK_ANSWER
283 ENTRY_BEGIN
284 MATCH all
285 REPLY QR RA AA NOERROR
286 SECTION QUESTION
287 example.com. IN A
288 SECTION ANSWER
289 example.com. IN CNAME example.org.
290 example.org. IN A 192.0.2.1
291 SECTION AUTHORITY
292 SECTION ADDITIONAL
293 ENTRY_END
294
295 STEP 110 QUERY
296 ENTRY_BEGIN
297 REPLY
298 SECTION QUESTION
299 alias.example.com. IN A
300 ENTRY_END
301
302 STEP 120 CHECK_ANSWER
303 ENTRY_BEGIN
304 MATCH all
305 REPLY QR RA AA NOERROR
306 SECTION QUESTION
307 alias.example.com. IN A
308 SECTION ANSWER
309 alias.example.com. IN CNAME example.org.
310 example.org. IN A 192.0.2.1
311 SECTION AUTHORITY
312 SECTION ADDITIONAL
313 ENTRY_END
314
315 ; Similar to the above, but these are local-zone redirect, instead of
316 ; tag-based policies.
317 STEP 130 QUERY
318 ENTRY_BEGIN
319 REPLY RD
320 SECTION QUESTION
321 example.net. IN CNAME
322 ENTRY_END
323
324 ; For type-CNAME queries, the CNAME itself will be returned
325 STEP 140 CHECK_ANSWER
326 ENTRY_BEGIN
327 MATCH all
328 REPLY QR RD RA AA NOERROR
329 SECTION QUESTION
330 example.net. IN CNAME
331 SECTION ANSWER
332 example.net. IN CNAME cname.example.org.
333 SECTION AUTHORITY
334 SECTION ADDITIONAL
335 ENTRY_END
336
337 STEP 150 QUERY
338 ENTRY_BEGIN
339 REPLY RD
340 SECTION QUESTION
341 alias.example.net. IN CNAME
342 ENTRY_END
343
344 ; For type-CNAME queries, the CNAME itself will be returned
345 STEP 160 CHECK_ANSWER
346 ENTRY_BEGIN
347 MATCH all
348 REPLY QR RD RA AA NOERROR
349 SECTION QUESTION
350 alias.example.net. IN CNAME
351 SECTION ANSWER
352 alias.example.net. IN CNAME cname.example.org.
353 SECTION AUTHORITY
354 SECTION ADDITIONAL
355 ENTRY_END
356
357 STEP 170 QUERY
358 ENTRY_BEGIN
359 REPLY RD
360 SECTION QUESTION
361 example.net. IN A
362 ENTRY_END
363
364 STEP 180 CHECK_ANSWER
365 ENTRY_BEGIN
366 MATCH all
367 REPLY QR RD RA AA NOERROR
368 SECTION QUESTION
369 example.net. IN A
370 SECTION ANSWER
371 example.net. IN CNAME cname.example.org.
372 cname.example.org. IN A 192.0.2.2
373 SECTION AUTHORITY
374 SECTION ADDITIONAL
375 ENTRY_END
376
377 STEP 190 QUERY
378 ENTRY_BEGIN
379 REPLY RD
380 SECTION QUESTION
381 alias.example.net. IN A
382 ENTRY_END
383
384 STEP 200 CHECK_ANSWER
385 ENTRY_BEGIN
386 MATCH all
387 REPLY QR RD RA AA NOERROR
388 SECTION QUESTION
389 alias.example.net. IN A
390 SECTION ANSWER
391 alias.example.net. IN CNAME cname.example.org.
392 cname.example.org. IN A 192.0.2.2
393 SECTION AUTHORITY
394 SECTION ADDITIONAL
395 ENTRY_END
396
397
398 ; Relatively minor cases follow
399
400 ; query type doesn't exist for the CNAME target. The original query
401 ; succeeds with an "incomplete" chain only containing the CNAME.
402 STEP 210 QUERY
403 ENTRY_BEGIN
404 REPLY RD
405 SECTION QUESTION
406 example.com. IN AAAA
407 ENTRY_END
408
409 STEP 220 CHECK_ANSWER
410 ENTRY_BEGIN
411 MATCH all
412 REPLY QR RD RA AA NOERROR
413 SECTION QUESTION
414 example.com. IN AAAA
415 SECTION ANSWER
416 example.com. IN CNAME example.org.
417 SECTION AUTHORITY
418 example.org. 3600 IN SOA ns.example.org. hostmaster.example.org. 2016101900 28800 7200 604800 3600
419 SECTION ADDITIONAL
420 ENTRY_END
421
422 ; The CNAME target name doesn't exist. NXDOMAIN with the CNAME will
423 ; be returned.
424 STEP 230 QUERY
425 ENTRY_BEGIN
426 REPLY RD
427 SECTION QUESTION
428 nx.example.com. IN A
429 ENTRY_END
430
431 STEP 240 CHECK_ANSWER
432 ENTRY_BEGIN
433 MATCH all
434 REPLY QR RD RA AA NXDOMAIN
435 SECTION QUESTION
436 nx.example.com. IN A
437 SECTION ANSWER
438 nx.example.com. IN CNAME nx.example.org.
439 SECTION AUTHORITY
440 example.org. 3600 IN SOA ns.example.org. hostmaster.example.org. 2016101900 28800 7200 604800 3600
441 SECTION ADDITIONAL
442 ENTRY_END
443
444 ; Resolution for the CNAME target will result in SERVFAIL. It will
445 ; be forwarded to the original query. The answer section should be
446 ; empty.
447 STEP 250 QUERY
448 ENTRY_BEGIN
449 REPLY RD
450 SECTION QUESTION
451 servfail.example.com. IN A
452 ENTRY_END
453
454 STEP 260 CHECK_ANSWER
455 ENTRY_BEGIN
456 MATCH all
457 REPLY QR RD RA SERVFAIL
458 SECTION QUESTION
459 servfail.example.com. IN A
460 SECTION ANSWER
461 SECTION AUTHORITY
462 SECTION ADDITIONAL
463 ENTRY_END
464
465 ; The CNAME target is DNSSEC-signed and it's validated. If the original
466 ; query enabled the DNSSEC, the RRSIGs will be included in the answer,
467 ; but the response should have the AD bit off
468 STEP 270 QUERY
469 ENTRY_BEGIN
470 REPLY RD DO
471 SECTION QUESTION
472 sec.example.com. IN A
473 ENTRY_END
474
475 STEP 280 CHECK_ANSWER
476 ENTRY_BEGIN
477 MATCH all
478 REPLY QR RD DO RA AA NOERROR
479 SECTION QUESTION
480 sec.example.com. IN A
481 SECTION ANSWER
482 sec.example.com. IN CNAME www.infoblox.com.
483 www.infoblox.com. 3600 IN A 161.47.10.70
484 www.infoblox.com. 3600 IN RRSIG A 5 3 3600 20161003223322 20160929221122 14916 infoblox.com. WbO9ydRAoRTPvdK18atTdLEkkMGoOjuwbcb6vVI0d6Sea3xkcBMNmtst Wdzr+pKEJqO2bfm167X6uhcOHanHZRnirlTnEbuTdsP0HCiIEGQD5iHg UNH2FJSKGNYBmgZKJpuLhDca7oqtkl8EyGA+UEt6Rtq6aW8V0wpkhPHi Pug='
485 SECTION AUTHORITY
486 SECTION ADDITIONAL
487 ENTRY_END
488
489
490 SCENARIO_END
0 ; config options
1 server:
2 target-fetch-policy: "0 0 0 0 0"
3 harden-below-nxdomain: yes
4 qname-minimisation: yes
5 trust-anchor: ". IN DNSKEY 257 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3"
6 val-override-date: "20070916134226"
7
8 stub-zone:
9 name: "."
10 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
11 stub-zone:
12 name: "anotherexample.local."
13 stub-addr: 10.20.30.40
14 CONFIG_END
15
16 SCENARIO_BEGIN Test stop cache search on nxdomain for QNAME minimised query
17
18 ; K.ROOT-SERVERS.NET.
19 RANGE_BEGIN 0 100
20 ADDRESS 193.0.14.129
21 ENTRY_BEGIN
22 MATCH opcode qtype qname
23 ADJUST copy_id
24 REPLY QR NOERROR
25 SECTION QUESTION
26 . IN NS
27 SECTION ANSWER
28 . IN NS K.ROOT-SERVERS.NET.
29 SECTION ADDITIONAL
30 K.ROOT-SERVERS.NET. IN A 193.0.14.129
31 ENTRY_END
32
33 ENTRY_BEGIN
34 MATCH opcode qtype qname
35 ADJUST copy_id
36 REPLY QR NOERROR
37 SECTION QUESTION
38 . IN DNSKEY
39 SECTION ANSWER
40 . 3600 IN DNSKEY 257 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30900 (ksk), size = 512b}
41 . 3600 IN RRSIG DNSKEY 5 0 3600 20070926134150 20070829134150 30900 . BlVcSh8xSgm7ne+XVCJwNHQKjk5kTJgG4Fa3sOSfp3YUjb2YclmVWyIw7XEHl0/C6CN5gdy18idnM6vT6Hy42A== ;{id = 30900}
42 ENTRY_END
43
44 ENTRY_BEGIN
45 MATCH opcode qtype qname
46 ADJUST copy_id
47 REPLY QR AA NXDOMAIN
48 SECTION QUESTION
49 local. IN A
50 SECTION AUTHORITY
51 . 86400 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2010111601 1800 900 604800 86400
52 . 86400 IN RRSIG SOA 5 0 86400 20070926134150 20070829134150 30900 . bOYbFZZp7vWWC2oxV+kph+YXjoQj2f6QJktlgmzRI7oReFX9jy/LibTPQi/sW0SGHpLaj3G5p4IfIlBibne4DA== ;{id = 30900}
53 . 86400 IN NSEC ac. NS SOA RRSIG NSEC DNSKEY
54 . 86400 IN RRSIG NSEC 5 0 86400 20070926134150 20070829134150 30900 . U+/m5+FmczzkosEx1aTP7MK/F3PpcKWct8CzM1jhjwNe2RlnW7qFe0IH8SLzD/elvxDTQMpJSMlKOhUUdapB8g== ;{id = 30900}
55 lk. 86400 IN NSEC lr. NS DS RRSIG NSEC
56 lk. 86400 IN RRSIG NSEC 5 1 86400 20070926134150 20070829134150 30900 . j6Pw5Eu9vGHDJcckTSWa8YD1b7FV7c/Z8aVkLfJCH+iPcaa40/LSp784+t2PnAAXL8fgriNL6jF/ve1rti3ANQ== ;{id = 30900}
57 ENTRY_END
58 RANGE_END
59
60 RANGE_BEGIN 0 100
61 ADDRESS 10.20.30.40
62 ENTRY_BEGIN
63 MATCH opcode qtype qname
64 ADJUST copy_id
65 REPLY QR AA NOERROR
66 SECTION QUESTION
67 anotherexample.local. IN TXT
68 SECTION ANSWER
69 anotherexample.local. 86400 IN TXT "should not resolve this"
70 ENTRY_END
71 RANGE_END
72
73 STEP 1 QUERY
74 ENTRY_BEGIN
75 REPLY RD
76 SECTION QUESTION
77 example.local. IN TXT
78 ENTRY_END
79
80 ; recursion happens here.
81 STEP 10 CHECK_ANSWER
82 ENTRY_BEGIN
83 MATCH all
84 REPLY QR RD RA NXDOMAIN
85 SECTION QUESTION
86 example.local. IN TXT
87 SECTION AUTHORITY
88 . 86400 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2010111601 1800 900 604800 86400
89 ENTRY_END
90
91 STEP 20 QUERY
92 ENTRY_BEGIN
93 REPLY RD
94 SECTION QUESTION
95 anotherexample.local. IN TXT
96 ENTRY_END
97
98 ; query should be answered using NXDOMAIN for local in cache
99 STEP 30 CHECK_ANSWER
100 ENTRY_BEGIN
101 MATCH all
102 REPLY QR RD RA NXDOMAIN
103 SECTION QUESTION
104 anotherexample.local. IN TXT
105 SECTION AUTHORITY
106 . 86400 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2010111601 1800 900 604800 86400
107 ENTRY_END
108
109 SCENARIO_END
1010 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
1111 CONFIG_END
1212
13 SCENARIO_BEGIN Test validator with wilcard cname to nodata
13 SCENARIO_BEGIN Test validator with wildcard cname to nodata
1414
1515 ; K.ROOT-SERVERS.NET.
1616 RANGE_BEGIN 0 100
33 trust-anchor: "example.com. 3600 IN DS 2854 3 1 46e4ffc6e9a4793b488954bd3f0cc6af0dfb201b"
44 val-override-date: "20070916134226"
55 target-fetch-policy: "0 0 0 0 0"
6 fake-dsa: yes
67
78 stub-zone:
89 name: "."
33 trust-anchor: "example.com. 3600 IN DS 2854 3 1 46e4ffc6e9a4793b488954bd3f0cc6af0dfb201b"
44 val-override-date: "20070916134226"
55 target-fetch-policy: "0 0 0 0 0"
6 fake-dsa: yes
67
78 stub-zone:
89 name: "."
129129 SECTION AUTHORITY
130130 ; SOA record is missing in reply.
131131 ; Denies A, note this is the end of the NSEC chain.
132 ; this RRSIG is failed, we set to 0 base64 data to make this easy to detect
132133 www.example.com. IN NSEC example.com. RRSIG NSEC
133 www.example.com. 3600 IN RRSIG NSEC 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFDA8yqBITvLruoQjn/eqjYjwCwySAhUAk5/f3H1HKMsvM+spmmswwFtndyY= ;{id = 2854}
134 ;www.example.com. 3600 IN RRSIG NSEC 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFDA8yqBITvLruoQjn/eqjYjwCwySAhUAk5/f3H1HKMsvM+spmmswwFtndyY= ;{id = 2854}
135 www.example.com. 3600 IN RRSIG NSEC 3 3 3600 20070926135752 20070829135752 2854 example.com.
134136 ; Denies wildcard
135137 example.com. IN NSEC ns.example.com. NS SOA RRSIG NSEC DNSKEY
136138 example.com. 3600 IN RRSIG NSEC 3 2 3600 20070926135752 20070829135752 2854 example.com. MCwCFGlz/gvGdVxEo3Kpr+MijEGCZgwaAhRU7qbF13vmCVgR8dFw7LQFKopV6w== ;{id = 2854}
99 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
1010 CONFIG_END
1111
12 SCENARIO_BEGIN Test validator with NSEC3 wilcard qtype ANY response.
12 SCENARIO_BEGIN Test validator with NSEC3 wildcard qtype ANY response.
1313
1414 ; K.ROOT-SERVERS.NET.
1515 RANGE_BEGIN 0 100
99 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
1010 CONFIG_END
1111
12 SCENARIO_BEGIN Test validator with NSEC3 wilcard qtype ANY without denial.
12 SCENARIO_BEGIN Test validator with NSEC3 wildcard qtype ANY without denial.
1313
1414 ; K.ROOT-SERVERS.NET.
1515 RANGE_BEGIN 0 100
0 ; config options
1 server:
2 target-fetch-policy: "0 0 0 0 0"
3
4 access-control: 10.10.10.0/24 allow
5 access-control-view: 10.10.10.10/32 "view1"
6 access-control-view: 10.10.10.20/32 "view2"
7 access-control-view: 10.10.10.30/32 "view3"
8 access-control-view: 10.10.10.40/32 "view4"
9
10 local-zone: "example.com." redirect
11 local-data: 'example.com. IN TXT "global"'
12
13 view:
14 name: "view1"
15 local-zone: "nomatch.example.com." redirect
16 local-data: 'nomatch.example.com. IN TXT "view 1"'
17 view-first: no
18
19 view:
20 name: "view2"
21 local-zone: "example.com." redirect
22 local-data: 'example.com. IN TXT "view 2"'
23 ; view-first default = no
24
25 view:
26 name: "view3"
27 local-zone: "nomatch.example.com." redirect
28 local-data: 'nomatch.example.com. IN TXT "view 3"'
29 view-first: yes
30
31 view:
32 name: "view4"
33 local-zone: "example.com." redirect
34 local-data: 'example.com. IN TXT "view 4"'
35 view-first: yes
36
37 stub-zone:
38 name: "."
39 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
40 CONFIG_END
41 SCENARIO_BEGIN Test view specific local-zone and local-data elements
42
43 ; K.ROOT-SERVERS.NET.
44 RANGE_BEGIN 0 100
45 ADDRESS 193.0.14.129
46 ENTRY_BEGIN
47 MATCH opcode qtype qname
48 ADJUST copy_id
49 REPLY QR NOERROR
50 SECTION QUESTION
51 . IN NS
52 SECTION ANSWER
53 . IN NS K.ROOT-SERVERS.NET.
54 SECTION ADDITIONAL
55 K.ROOT-SERVERS.NET. IN A 193.0.14.129
56 ENTRY_END
57
58 ENTRY_BEGIN
59 MATCH opcode qtype qname
60 ADJUST copy_id
61 REPLY QR NOERROR
62 SECTION QUESTION
63 example.com. IN TXT
64 SECTION AUTHORITY
65 com. IN NS a.gtld-servers.net.
66 SECTION ADDITIONAL
67 a.gtld-servers.net. IN A 192.5.6.30
68 ENTRY_END
69 RANGE_END
70
71 ; a.gtld-servers.net.
72 RANGE_BEGIN 0 100
73 ADDRESS 192.5.6.30
74 ENTRY_BEGIN
75 MATCH opcode qtype qname
76 ADJUST copy_id
77 REPLY QR NOERROR
78 SECTION QUESTION
79 com. IN NS
80 SECTION ANSWER
81 com. IN NS a.gtld-servers.net.
82 SECTION ADDITIONAL
83 a.gtld-servers.net. IN A 192.5.6.30
84 ENTRY_END
85
86 ENTRY_BEGIN
87 MATCH opcode qtype qname
88 ADJUST copy_id
89 REPLY QR NOERROR
90 SECTION QUESTION
91 example.com. IN TXT
92 SECTION AUTHORITY
93 example.com. IN NS ns.example.com.
94 SECTION ADDITIONAL
95 ns.example.com. IN A 1.2.3.4
96 ENTRY_END
97 RANGE_END
98
99 ; ns.example.com.
100 RANGE_BEGIN 0 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 example.com. IN TXT
120 SECTION ANSWER
121 example.com. IN TXT "auth data"
122 SECTION AUTHORITY
123 example.com. IN NS ns.example.com.
124 SECTION ADDITIONAL
125 ns.example.com. IN A 1.2.3.4
126 ENTRY_END
127 RANGE_END
128
129 STEP 1 QUERY ADDRESS 10.10.10.10
130 ENTRY_BEGIN
131 REPLY RD
132 SECTION QUESTION
133 example.com. IN TXT
134 ENTRY_END
135 STEP 2 CHECK_ANSWER
136 ENTRY_BEGIN
137 MATCH all
138 REPLY QR RD RA
139 SECTION QUESTION
140 example.com. IN TXT
141 SECTION ANSWER
142 example.com. IN TXT "auth data"
143 SECTION AUTHORITY
144 example.com. IN NS ns.example.com.
145 SECTION ADDITIONAL
146 ns.example.com. IN A 1.2.3.4
147 ENTRY_END
148
149 STEP 3 QUERY ADDRESS 10.10.10.20
150 ENTRY_BEGIN
151 SECTION QUESTION
152 example.com. IN TXT
153 ENTRY_END
154 STEP 4 CHECK_ANSWER
155 ENTRY_BEGIN
156 MATCH all
157 REPLY QR RA AA
158 SECTION QUESTION
159 example.com. IN TXT
160 SECTION ANSWER
161 example.com. IN TXT "view 2"
162 ENTRY_END
163
164 STEP 5 QUERY ADDRESS 10.10.10.30
165 ENTRY_BEGIN
166 SECTION QUESTION
167 example.com. IN TXT
168 ENTRY_END
169 STEP 6 CHECK_ANSWER
170 ENTRY_BEGIN
171 MATCH all
172 REPLY QR RA AA
173 SECTION QUESTION
174 example.com. IN TXT
175 SECTION ANSWER
176 example.com. IN TXT "global"
177 ENTRY_END
178
179 STEP 7 QUERY ADDRESS 10.10.10.40
180 ENTRY_BEGIN
181 SECTION QUESTION
182 example.com. IN TXT
183 ENTRY_END
184 STEP 8 CHECK_ANSWER
185 ENTRY_BEGIN
186 MATCH all
187 REPLY QR RA AA
188 SECTION QUESTION
189 example.com. IN TXT
190 SECTION ANSWER
191 example.com. IN TXT "view 4"
192 ENTRY_END
193
194 STEP 9 QUERY ADDRESS 10.10.10.50
195 ENTRY_BEGIN
196 SECTION QUESTION
197 example.com. IN TXT
198 ENTRY_END
199 STEP 10 CHECK_ANSWER
200 ENTRY_BEGIN
201 MATCH all
202 REPLY QR RA AA
203 SECTION QUESTION
204 example.com. IN TXT
205 SECTION ANSWER
206 example.com. IN TXT "global"
207 ENTRY_END
208
209 SCENARIO_END
104104 cfg->ssl_port = 853;
105105 cfg->ssl_upstream = 0;
106106 cfg->use_syslog = 1;
107 cfg->log_identity = NULL; /* changed later with argv[0] */
107108 cfg->log_time_ascii = 0;
108109 cfg->log_queries = 0;
109110 #ifndef USE_WINSOCK
169170 cfg->out_ifs = NULL;
170171 cfg->stubs = NULL;
171172 cfg->forwards = NULL;
173 cfg->views = NULL;
172174 cfg->acls = NULL;
173175 cfg->harden_short_bufsize = 0;
174176 cfg->harden_large_queries = 0;
201203 cfg->val_log_squelch = 0;
202204 cfg->val_permissive_mode = 0;
203205 cfg->ignore_cd = 0;
206 cfg->serve_expired = 0;
204207 cfg->add_holddown = 30*24*3600;
205208 cfg->del_holddown = 30*24*3600;
206209 cfg->keep_missing = 366*24*3600; /* one year plus a little leeway */
246249 cfg->ratelimit_below_domain = NULL;
247250 cfg->ratelimit_factor = 10;
248251 cfg->qname_minimisation = 0;
252 cfg->qname_minimisation_strict = 0;
249253 return cfg;
250254 error_exit:
251255 config_delete(cfg);
366370 log_set_time_asc(cfg->log_time_ascii); }
367371 else S_SIZET_NONZERO("max-udp-size:", max_udp_size)
368372 else S_YNO("use-syslog:", use_syslog)
373 else S_STR("log-identity:", log_identity)
369374 else S_YNO("extended-statistics:", stat_extended)
370375 else S_YNO("statistics-cumulative:", stat_cumulative)
371376 else S_YNO("do-ip4:", do_ip4)
452457 else S_YNO("log-queries:", log_queries)
453458 else S_YNO("val-permissive-mode:", val_permissive_mode)
454459 else S_YNO("ignore-cd-flag:", ignore_cd)
460 else S_YNO("serve-expired:", serve_expired)
455461 else S_STR("val-nsec3-keysize-iterations:", val_nsec3_key_iterations)
456462 else S_UNSIGNED_OR_ZERO("add-holddown:", add_holddown)
457463 else S_UNSIGNED_OR_ZERO("del-holddown:", del_holddown)
485491 else S_POW2("ratelimit-slabs:", ratelimit_slabs)
486492 else S_NUMBER_OR_ZERO("ratelimit-factor:", ratelimit_factor)
487493 else S_YNO("qname-minimisation:", qname_minimisation)
494 else S_YNO("qname-minimisation-strict:", qname_minimisation_strict)
488495 else if(strcmp(opt, "define-tag:") ==0) {
489496 return config_add_tag(cfg, val);
490497 /* val_sig_skew_min and max are copied into val_env during init,
508515 /* unknown or unsupported (from the set_option interface):
509516 * interface, outgoing-interface, access-control,
510517 * stub-zone, name, stub-addr, stub-host, stub-prime
511 * forward-first, stub-first,
512 * forward-zone, name, forward-addr, forward-host,
518 * forward-first, stub-first, forward-ssl-upstream,
519 * stub-ssl-upstream, forward-zone,
520 * name, forward-addr, forward-host,
513521 * ratelimit-for-domain, ratelimit-below-domain,
514 * local-zone-tag */
522 * local-zone-tag, access-control-view */
515523 return 0;
516524 }
517525 return 1;
674682 else O_YNO(opt, "statistics-cumulative", stat_cumulative)
675683 else O_YNO(opt, "extended-statistics", stat_extended)
676684 else O_YNO(opt, "use-syslog", use_syslog)
685 else O_STR(opt, "log-identity", log_identity)
677686 else O_YNO(opt, "log-time-ascii", log_time_ascii)
678687 else O_DEC(opt, "num-threads", num_threads)
679688 else O_IFC(opt, "interface", num_ifs, ifs)
747756 else O_DEC(opt, "val-log-level", val_log_level)
748757 else O_YNO(opt, "val-permissive-mode", val_permissive_mode)
749758 else O_YNO(opt, "ignore-cd-flag", ignore_cd)
759 else O_YNO(opt, "serve-expired", serve_expired)
750760 else O_STR(opt, "val-nsec3-keysize-iterations",val_nsec3_key_iterations)
751761 else O_UNS(opt, "add-holddown", add_holddown)
752762 else O_UNS(opt, "del-holddown", del_holddown)
790800 else O_DEC(opt, "val-sig-skew-min", val_sig_skew_min)
791801 else O_DEC(opt, "val-sig-skew-max", val_sig_skew_max)
792802 else O_YNO(opt, "qname-minimisation", qname_minimisation)
803 else O_YNO(opt, "qname-minimisation-strict", qname_minimisation_strict)
793804 else O_IFC(opt, "define-tag", num_tags, tagname)
794805 else O_LTG(opt, "local-zone-tag", local_zone_tags)
795806 else O_LTG(opt, "access-control-tag", acl_tags)
796807 else O_LS3(opt, "local-zone-override", local_zone_overrides)
797808 else O_LS3(opt, "access-control-tag-action", acl_tag_actions)
798809 else O_LS3(opt, "access-control-tag-data", acl_tag_datas)
810 else O_LS2(opt, "access-control-view", acl_view)
799811 /* not here:
800812 * outgoing-permit, outgoing-avoid - have list of ports
801813 * local-zone - zones and nodefault variables
982994 }
983995 }
984996
997 void
998 config_delview(struct config_view* p)
999 {
1000 if(!p) return;
1001 free(p->name);
1002 config_deldblstrlist(p->local_zones);
1003 config_delstrlist(p->local_zones_nodefault);
1004 config_delstrlist(p->local_data);
1005 free(p);
1006 }
1007
1008 void
1009 config_delviews(struct config_view* p)
1010 {
1011 struct config_view* np;
1012 while(p) {
1013 np = p->next;
1014 config_delview(p);
1015 p = np;
1016 }
1017 }
9851018 /** delete string array */
9861019 static void
9871020 config_del_strarray(char** array, int num)
10201053 free(cfg->target_fetch_policy);
10211054 free(cfg->ssl_service_key);
10221055 free(cfg->ssl_service_pem);
1056 free(cfg->log_identity);
10231057 config_del_strarray(cfg->ifs, cfg->num_ifs);
10241058 config_del_strarray(cfg->out_ifs, cfg->num_out_ifs);
10251059 config_delstubs(cfg->stubs);
10261060 config_delstubs(cfg->forwards);
1061 config_delviews(cfg->views);
10271062 config_delstrlist(cfg->donotqueryaddrs);
10281063 config_delstrlist(cfg->root_hints);
10291064 free(cfg->identity);
4141 #ifndef UTIL_CONFIG_FILE_H
4242 #define UTIL_CONFIG_FILE_H
4343 struct config_stub;
44 struct config_view;
4445 struct config_strlist;
4546 struct config_str2list;
4647 struct config_str3list;
166167 struct config_stub* stubs;
167168 /** the forward zone definitions, linked list */
168169 struct config_stub* forwards;
170 /** the views definitions, linked list */
171 struct config_view* views;
169172 /** list of donotquery addresses, linked list */
170173 struct config_strlist* donotqueryaddrs;
171174 /** list of access control entries, linked list */
225228 int log_time_ascii;
226229 /** log queries with one line per query */
227230 int log_queries;
231 /** log identity to report */
232 char* log_identity;
228233
229234 /** do not report identity (id.server, hostname.bind) */
230235 int hide_identity;
271276 int val_permissive_mode;
272277 /** ignore the CD flag in incoming queries and refuse them bogus data */
273278 int ignore_cd;
279 /** serve expired entries and prefetch them */
280 int serve_expired;
274281 /** nsec3 maximum iterations per key size, string */
275282 char* val_nsec3_key_iterations;
276283 /** autotrust add holddown time, in seconds */
309316 struct config_str3list* acl_tag_actions;
310317 /** list of aclname, tagname, redirectdata */
311318 struct config_str3list* acl_tag_datas;
319 /** list of aclname, view*/
320 struct config_str2list* acl_view;
312321 /** tag list, array with tagname[i] is malloced string */
313322 char** tagname;
314323 /** number of items in the taglist */
395404 int ratelimit_factor;
396405 /** minimise outgoing QNAME and hide original QTYPE if possible */
397406 int qname_minimisation;
407 /** minimise QNAME in strict mode, minimise according to RFC.
408 * Do not apply fallback */
409 int qname_minimisation_strict;
398410 };
399411
400412 /** from cfg username, after daemonise setup performed */
420432 int isprime;
421433 /** if forward-first is set (failover to without if fails) */
422434 int isfirst;
435 /* use SSL for queries to this stub */
436 int ssl_upstream;
437 };
438
439 /**
440 * View config options
441 */
442 struct config_view {
443 /** next in list */
444 struct config_view* next;
445 /** view name */
446 char* name;
447 /** local zones */
448 struct config_str2list* local_zones;
449 /** local data RRs */
450 struct config_strlist* local_data;
451 /** local zones nodefault list */
452 struct config_strlist* local_zones_nodefault;
453 /** Fallback to global local_zones when there is no match in the view
454 * view specific tree. 1 for yes, 0 for no */
455 int isfirst;
423456 };
424457
425458 /**
679712 * @param list: list.
680713 */
681714 void config_delstubs(struct config_stub* list);
715
716 /**
717 * Delete a view item
718 * @param p: view item
719 */
720 void config_delview(struct config_view* p);
721
722 /**
723 * Delete items in config view list.
724 * @param list: list.
725 */
726 void config_delviews(struct config_view* list);
682727
683728 /**
684729 * Convert 14digit to time value
903948 void w_config_adjust_directory(struct config_file* cfg);
904949 #endif /* UB_ON_WINDOWS */
905950
951 /** debug option for unit tests. */
952 extern int fake_dsa;
953
906954 #endif /* UTIL_CONFIG_FILE_H */
183183 do \
184184 { \
185185 /* Undo effects of setting up yytext. */ \
186 int yyless_macro_arg = (n); \
186 yy_size_t yyless_macro_arg = (n); \
187187 YY_LESS_LINENO(yyless_macro_arg);\
188188 *yy_cp = (yy_hold_char); \
189189 YY_RESTORE_YY_MORE_OFFSET \
377377 *yy_cp = '\0'; \
378378 (yy_c_buf_p) = yy_cp;
379379
380 #define YY_NUM_RULES 188
381 #define YY_END_OF_BUFFER 189
380 #define YY_NUM_RULES 197
381 #define YY_END_OF_BUFFER 198
382382 /* This struct is not used in this scanner,
383383 but its presence is necessary. */
384384 struct yy_trans_info
386386 flex_int32_t yy_verify;
387387 flex_int32_t yy_nxt;
388388 };
389 static yyconst flex_int16_t yy_accept[1880] =
389 static yyconst flex_int16_t yy_accept[1956] =
390390 { 0,
391 1, 1, 170, 170, 174, 174, 178, 178, 182, 182,
392 1, 1, 189, 186, 1, 168, 168, 187, 2, 186,
393 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
394 186, 186, 186, 186, 186, 186, 186, 186, 186, 187,
395 170, 171, 171, 172, 187, 174, 175, 175, 176, 187,
396 181, 178, 179, 179, 180, 187, 182, 183, 183, 184,
397 187, 185, 169, 2, 173, 185, 187, 186, 0, 1,
398 2, 2, 2, 2, 186, 186, 186, 186, 186, 186,
399 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
400 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
401
402 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
403 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
404 186, 186, 186, 186, 186, 186, 170, 0, 174, 0,
405 181, 0, 178, 182, 0, 185, 0, 2, 2, 185,
406 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
407 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
408 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
409 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
410 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
411 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
412
413 186, 186, 186, 186, 185, 186, 186, 186, 186, 186,
414 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
415 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
416 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
417 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
418 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
419 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
420 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
421 186, 186, 185, 186, 186, 186, 186, 186, 186, 186,
422 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
423
424 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
425 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
426 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
427 186, 75, 186, 186, 186, 186, 186, 186, 7, 186,
428 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
429 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
430 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
431 186, 186, 186, 186, 185, 186, 186, 186, 186, 186,
432 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
433 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
434
435 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
436 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
437 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
438 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
439 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
440 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
441 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
442 186, 186, 185, 186, 186, 186, 186, 186, 35, 186,
443 186, 186, 186, 186, 186, 186, 186, 186, 186, 148,
444 186, 13, 14, 186, 17, 16, 186, 186, 186, 186,
445
446 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
447 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
448 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
449 186, 186, 186, 186, 186, 186, 186, 186, 135, 186,
450 186, 186, 186, 186, 186, 186, 3, 186, 186, 186,
451 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
452 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
453 186, 186, 186, 186, 186, 186, 186, 186, 185, 186,
454 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
455 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
456
457 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
458 186, 186, 186, 186, 186, 186, 177, 186, 186, 186,
459 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
460 186, 186, 186, 38, 186, 186, 186, 186, 186, 186,
461 186, 186, 186, 186, 39, 186, 186, 186, 186, 186,
462 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
463 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
464 19, 186, 186, 186, 186, 186, 186, 186, 186, 186,
465 186, 186, 186, 186, 186, 186, 186, 90, 177, 186,
466 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
467
468 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
469 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
470 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
471 186, 186, 186, 89, 186, 186, 186, 186, 186, 186,
472 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
473 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
474 186, 186, 186, 73, 186, 186, 186, 186, 186, 186,
475 186, 186, 186, 186, 186, 186, 186, 186, 24, 186,
476 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
477 186, 186, 186, 186, 186, 36, 186, 186, 186, 186,
478
479 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
480 186, 186, 186, 186, 186, 186, 186, 186, 186, 37,
481 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
482 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
483 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
484 186, 186, 186, 186, 186, 26, 186, 186, 186, 186,
485 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
486 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
487 186, 186, 186, 186, 186, 186, 186, 162, 186, 186,
488 186, 186, 186, 186, 30, 186, 31, 186, 186, 186,
489
490 76, 186, 77, 186, 74, 186, 186, 186, 186, 186,
491 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
492 6, 186, 186, 186, 186, 186, 186, 186, 186, 186,
493 186, 186, 186, 186, 142, 186, 186, 186, 186, 92,
494 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
495 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
496 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
497 186, 186, 186, 27, 186, 186, 186, 186, 186, 186,
498 118, 186, 117, 186, 186, 186, 186, 186, 186, 186,
499 186, 186, 186, 186, 186, 186, 186, 186, 186, 15,
500
501 186, 186, 186, 186, 186, 186, 186, 186, 186, 40,
502 186, 186, 186, 186, 186, 186, 186, 186, 79, 78,
503 186, 186, 186, 186, 186, 186, 186, 114, 186, 186,
504 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
505 186, 186, 186, 186, 186, 186, 186, 186, 186, 58,
506 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
507 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
508 186, 186, 186, 186, 62, 186, 186, 186, 186, 186,
509 186, 186, 186, 186, 186, 186, 186, 34, 186, 186,
510 186, 186, 186, 186, 186, 186, 116, 186, 186, 186,
511
512 186, 186, 186, 186, 186, 186, 5, 186, 186, 186,
513 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
514 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
515 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
516 186, 186, 186, 186, 186, 186, 186, 186, 110, 186,
517 186, 186, 186, 186, 186, 186, 186, 186, 128, 186,
518 111, 186, 186, 140, 186, 186, 186, 186, 186, 186,
519 186, 186, 186, 186, 25, 186, 186, 186, 186, 81,
520 186, 82, 80, 186, 186, 186, 186, 186, 186, 186,
521 88, 186, 186, 186, 186, 186, 186, 186, 186, 186,
522
523 186, 186, 186, 112, 186, 186, 186, 186, 186, 186,
524 139, 186, 186, 186, 186, 186, 186, 186, 186, 186,
525 186, 186, 186, 186, 72, 186, 186, 186, 186, 186,
526 186, 186, 186, 186, 186, 186, 186, 186, 186, 32,
527 186, 186, 21, 186, 186, 186, 18, 186, 97, 186,
528 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
529 186, 186, 186, 47, 49, 186, 186, 186, 186, 186,
530 186, 186, 186, 186, 149, 186, 186, 186, 186, 186,
531 186, 186, 186, 186, 186, 186, 186, 186, 83, 186,
532 186, 186, 186, 186, 186, 87, 186, 186, 186, 186,
533
534 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
535 186, 186, 186, 186, 186, 91, 186, 186, 186, 186,
536 186, 186, 186, 186, 186, 186, 186, 186, 186, 134,
537 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
538 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
539 186, 186, 101, 186, 105, 186, 186, 186, 186, 186,
540 86, 186, 186, 68, 186, 126, 186, 186, 186, 186,
541 186, 141, 186, 186, 186, 186, 186, 186, 186, 154,
542 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
543 186, 104, 186, 186, 186, 186, 186, 50, 51, 186,
544
545 186, 33, 57, 106, 186, 119, 186, 143, 115, 186,
546 186, 43, 186, 108, 186, 186, 186, 186, 186, 8,
547 186, 186, 186, 71, 186, 186, 186, 186, 164, 186,
548 125, 186, 186, 186, 186, 186, 186, 186, 186, 186,
549 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
550 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
551 93, 153, 186, 186, 186, 186, 186, 186, 186, 186,
552 136, 186, 186, 186, 186, 186, 186, 186, 186, 186,
553 186, 186, 186, 186, 186, 186, 107, 186, 186, 42,
554 44, 186, 186, 186, 186, 186, 186, 186, 70, 186,
555
556 186, 186, 186, 163, 186, 186, 186, 186, 130, 22,
557 23, 186, 186, 186, 186, 186, 186, 186, 67, 186,
558 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
559 132, 129, 186, 186, 186, 186, 186, 186, 186, 186,
560 186, 41, 186, 186, 186, 186, 186, 186, 186, 12,
561 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
562 11, 186, 186, 20, 186, 186, 186, 167, 186, 45,
563 186, 138, 131, 186, 186, 186, 186, 186, 186, 186,
564 186, 186, 186, 186, 100, 99, 186, 186, 186, 133,
565 127, 186, 186, 186, 186, 186, 186, 186, 186, 186,
566
567 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
568 52, 186, 186, 186, 137, 186, 186, 186, 186, 186,
569 186, 186, 186, 46, 186, 186, 186, 94, 96, 120,
570 186, 186, 186, 98, 186, 186, 144, 186, 186, 186,
571 186, 186, 186, 186, 186, 186, 150, 186, 186, 186,
572 186, 186, 186, 186, 186, 186, 186, 186, 186, 121,
573 186, 186, 186, 28, 186, 186, 186, 4, 186, 186,
574 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
575 186, 186, 186, 186, 186, 186, 186, 152, 186, 186,
576 124, 186, 186, 186, 186, 186, 186, 186, 55, 186,
577
578 29, 147, 186, 10, 186, 186, 186, 186, 186, 122,
579 59, 186, 186, 186, 103, 186, 186, 186, 186, 186,
580 186, 186, 186, 186, 186, 151, 84, 186, 186, 186,
581 186, 61, 65, 60, 186, 53, 186, 9, 186, 186,
582 165, 186, 186, 102, 186, 186, 186, 186, 186, 186,
583 186, 186, 186, 186, 186, 186, 186, 66, 64, 186,
584 54, 186, 113, 186, 123, 186, 186, 186, 186, 95,
585 48, 186, 186, 186, 186, 186, 186, 186, 85, 63,
586 56, 166, 186, 186, 186, 146, 186, 186, 186, 186,
587 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
588
589 186, 186, 186, 69, 186, 145, 161, 186, 186, 186,
590 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
591 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
592 186, 186, 186, 186, 109, 186, 186, 186, 186, 186,
593 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
594 186, 186, 186, 157, 186, 186, 186, 186, 186, 186,
595 186, 186, 186, 186, 186, 186, 186, 155, 186, 158,
596 159, 186, 186, 186, 186, 186, 156, 160, 0
391 1, 1, 179, 179, 183, 183, 187, 187, 191, 191,
392 1, 1, 198, 195, 1, 177, 177, 196, 2, 195,
393 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
394 195, 195, 195, 195, 195, 195, 195, 195, 195, 196,
395 179, 180, 180, 181, 196, 183, 184, 184, 185, 196,
396 190, 187, 188, 188, 189, 196, 191, 192, 192, 193,
397 196, 194, 178, 2, 182, 194, 196, 195, 0, 1,
398 2, 2, 2, 2, 195, 195, 195, 195, 195, 195,
399 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
400 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
401
402 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
403 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
404 195, 195, 195, 195, 195, 195, 195, 195, 179, 0,
405 183, 0, 190, 0, 187, 191, 0, 194, 0, 2,
406 2, 194, 195, 195, 195, 195, 195, 195, 195, 195,
407 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
408 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
409 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
410 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
411 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
412
413 195, 195, 195, 195, 195, 195, 195, 195, 194, 195,
414 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
415 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
416 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
417 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
418 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
419 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
420 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
421 195, 195, 195, 195, 195, 195, 195, 195, 194, 195,
422 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
423
424 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
425 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
426 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
427 195, 195, 195, 195, 195, 195, 195, 195, 195, 76,
428 195, 195, 195, 195, 195, 195, 8, 195, 195, 195,
429 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
430 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
431 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
432 195, 195, 195, 87, 194, 195, 195, 195, 195, 195,
433 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
434
435 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
436 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
437 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
438 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
439 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
440 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
441 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
442 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
443 195, 195, 195, 195, 195, 195, 195, 194, 195, 195,
444 195, 195, 195, 36, 195, 195, 195, 195, 195, 195,
445
446 195, 195, 195, 195, 157, 195, 14, 15, 195, 18,
447 17, 195, 195, 195, 195, 195, 195, 195, 195, 195,
448 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
449 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
450 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
451 195, 195, 195, 195, 195, 143, 195, 195, 195, 195,
452 195, 195, 195, 195, 3, 195, 195, 195, 195, 195,
453 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
454 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
455 195, 195, 195, 195, 195, 195, 195, 195, 194, 195,
456
457 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
458 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
459 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
460 195, 195, 195, 195, 195, 195, 195, 186, 195, 195,
461 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
462 195, 195, 195, 195, 195, 39, 195, 195, 195, 195,
463 195, 195, 195, 195, 195, 195, 40, 195, 195, 195,
464 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
465 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
466 195, 195, 195, 195, 20, 195, 195, 195, 195, 195,
467
468 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
469 195, 95, 195, 186, 195, 195, 195, 195, 195, 195,
470 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
471 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
472 195, 195, 195, 195, 195, 111, 195, 195, 195, 195,
473 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
474 94, 195, 195, 195, 195, 195, 195, 195, 195, 195,
475 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
476 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
477 195, 74, 195, 195, 195, 195, 195, 195, 195, 195,
478
479 195, 195, 195, 195, 195, 195, 195, 25, 195, 195,
480 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
481 195, 195, 195, 195, 195, 37, 195, 195, 195, 195,
482 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
483 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
484 38, 195, 195, 195, 195, 195, 195, 195, 195, 195,
485 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
486 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
487 195, 195, 195, 195, 195, 195, 195, 27, 195, 195,
488 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
489
490 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
491 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
492 171, 195, 195, 195, 195, 195, 195, 195, 31, 195,
493 32, 195, 195, 195, 77, 195, 78, 195, 195, 75,
494 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
495 195, 195, 195, 195, 195, 7, 195, 195, 195, 195,
496 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
497 150, 195, 195, 195, 195, 97, 195, 195, 195, 195,
498 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
499 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
500
501 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
502 28, 195, 195, 195, 195, 195, 195, 126, 195, 125,
503 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
504 195, 195, 195, 195, 195, 195, 195, 16, 195, 195,
505 195, 195, 195, 195, 195, 195, 195, 41, 195, 195,
506 195, 195, 195, 195, 195, 195, 195, 80, 79, 195,
507 195, 195, 195, 195, 195, 195, 195, 121, 195, 195,
508 195, 195, 195, 195, 195, 88, 195, 195, 195, 195,
509 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
510 59, 195, 195, 195, 195, 195, 195, 195, 195, 195,
511
512 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
513 195, 195, 195, 195, 195, 195, 63, 195, 195, 195,
514 195, 195, 195, 195, 195, 195, 195, 195, 195, 35,
515 195, 195, 195, 195, 195, 195, 195, 195, 195, 124,
516 195, 195, 195, 195, 195, 195, 195, 195, 195, 6,
517 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
518 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
519 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
520 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
521 195, 195, 195, 117, 195, 195, 195, 195, 195, 195,
522
523 195, 195, 195, 136, 195, 118, 195, 195, 148, 195,
524 195, 195, 195, 195, 195, 195, 195, 195, 195, 26,
525 195, 195, 195, 195, 83, 195, 84, 195, 82, 195,
526 195, 195, 195, 195, 195, 195, 93, 195, 195, 195,
527 195, 195, 195, 195, 195, 195, 195, 195, 195, 119,
528 195, 195, 195, 195, 195, 122, 195, 147, 195, 195,
529 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
530 195, 73, 195, 195, 195, 195, 195, 195, 195, 195,
531 195, 195, 195, 195, 195, 195, 195, 33, 195, 195,
532 22, 195, 195, 195, 195, 19, 195, 102, 195, 195,
533
534 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
535 195, 195, 48, 50, 195, 195, 195, 195, 195, 195,
536 195, 195, 195, 158, 195, 195, 195, 195, 195, 195,
537 195, 195, 195, 195, 195, 195, 195, 85, 195, 195,
538 195, 195, 195, 195, 195, 92, 195, 195, 195, 195,
539 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
540 195, 195, 195, 195, 195, 96, 195, 195, 195, 195,
541 195, 195, 195, 195, 195, 195, 195, 195, 195, 142,
542 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
543 110, 195, 195, 195, 195, 195, 195, 195, 195, 195,
544
545 195, 195, 195, 195, 106, 195, 112, 195, 195, 195,
546 195, 195, 91, 195, 195, 69, 195, 134, 195, 195,
547 195, 195, 195, 149, 195, 195, 195, 195, 195, 195,
548 195, 163, 195, 195, 195, 195, 195, 195, 195, 195,
549 195, 195, 195, 195, 109, 195, 195, 195, 195, 195,
550 51, 52, 195, 195, 34, 58, 113, 195, 127, 195,
551 151, 123, 195, 195, 44, 195, 115, 195, 195, 195,
552 195, 195, 9, 195, 195, 195, 72, 195, 195, 195,
553 195, 173, 195, 133, 195, 195, 195, 195, 195, 195,
554 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
555
556 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
557 195, 195, 195, 195, 195, 98, 162, 195, 195, 195,
558 195, 195, 195, 195, 195, 144, 195, 195, 195, 195,
559 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
560 195, 195, 114, 195, 195, 43, 45, 195, 195, 195,
561 195, 195, 195, 195, 71, 195, 195, 195, 195, 172,
562 195, 195, 195, 195, 138, 23, 24, 195, 195, 195,
563 195, 195, 195, 195, 195, 68, 195, 195, 195, 195,
564 195, 195, 195, 195, 195, 195, 195, 195, 140, 137,
565 195, 195, 195, 195, 195, 195, 195, 195, 195, 42,
566
567 195, 195, 195, 195, 195, 195, 195, 195, 13, 195,
568 195, 195, 195, 195, 195, 195, 195, 195, 195, 12,
569 195, 195, 21, 195, 195, 195, 176, 195, 46, 195,
570 146, 139, 195, 195, 195, 195, 195, 195, 195, 195,
571 195, 195, 195, 195, 105, 104, 195, 195, 195, 195,
572 141, 135, 195, 195, 195, 195, 195, 195, 195, 195,
573 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
574 195, 195, 53, 195, 195, 195, 145, 195, 195, 195,
575 195, 195, 195, 195, 195, 47, 195, 195, 81, 195,
576 99, 101, 128, 195, 195, 195, 103, 195, 195, 152,
577
578 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
579 159, 195, 195, 195, 195, 195, 195, 195, 195, 195,
580 195, 195, 195, 195, 129, 195, 195, 195, 29, 195,
581 195, 195, 195, 4, 195, 195, 195, 195, 195, 195,
582 195, 195, 195, 195, 195, 155, 195, 195, 195, 195,
583 195, 195, 195, 195, 161, 195, 195, 132, 195, 195,
584 195, 195, 195, 195, 195, 195, 56, 195, 30, 156,
585 195, 11, 195, 195, 195, 195, 195, 195, 130, 60,
586 195, 195, 195, 108, 195, 195, 195, 195, 195, 195,
587 195, 195, 195, 195, 160, 89, 195, 86, 195, 195,
588
589 195, 62, 66, 61, 195, 54, 195, 10, 195, 195,
590 195, 174, 195, 195, 107, 195, 195, 195, 195, 195,
591 195, 195, 195, 195, 195, 195, 195, 195, 67, 65,
592 195, 55, 195, 120, 195, 195, 131, 195, 195, 195,
593 195, 100, 49, 195, 195, 195, 195, 195, 195, 195,
594 90, 64, 57, 195, 175, 195, 195, 195, 154, 195,
595 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
596 195, 195, 195, 195, 195, 195, 195, 195, 70, 195,
597 153, 170, 195, 195, 195, 195, 195, 195, 5, 195,
598 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
599
600 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
601 116, 195, 195, 195, 195, 195, 195, 195, 195, 195,
602 195, 195, 195, 195, 195, 195, 195, 195, 195, 166,
603 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
604 195, 195, 195, 164, 195, 167, 168, 195, 195, 195,
605 195, 195, 165, 169, 0
597606 } ;
598607
599608 static yyconst YY_CHAR yy_ec[256] =
639648 1, 1, 1, 1, 1
640649 } ;
641650
642 static yyconst flex_uint16_t yy_base[1894] =
651 static yyconst flex_uint16_t yy_base[1970] =
643652 { 0,
644653 0, 0, 63, 66, 69, 71, 77, 83, 88, 91,
645 129, 135, 355, 314, 95, 5425, 5425, 5425, 107, 110,
646 142, 180, 108, 50, 145, 172, 118, 148, 121, 181,
647 197, 166, 241, 137, 225, 260, 233, 228, 257, 116,
648 263, 5425, 5425, 5425, 94, 244, 5425, 5425, 5425, 96,
649 221, 251, 5425, 5425, 5425, 304, 212, 5425, 5425, 5425,
650 102, 208, 5425, 308, 5425, 268, 318, 206, 322, 111,
651 0, 326, 0, 0, 201, 170, 217, 317, 193, 309,
652 318, 310, 183, 312, 336, 311, 307, 341, 343, 245,
653 335, 350, 363, 156, 346, 370, 371, 357, 358, 376,
654
655 387, 391, 393, 398, 386, 397, 385, 399, 414, 408,
656 429, 412, 421, 422, 424, 418, 352, 435, 439, 450,
657 438, 431, 467, 448, 459, 455, 164, 174, 141, 296,
658 134, 509, 165, 122, 312, 115, 513, 517, 0, 486,
659 487, 488, 496, 510, 501, 506, 502, 515, 529, 526,
660 533, 536, 542, 586, 538, 508, 541, 532, 548, 545,
661 553, 549, 559, 560, 565, 576, 582, 584, 569, 597,
662 598, 622, 618, 610, 609, 620, 616, 624, 627, 625,
663 626, 629, 638, 634, 641, 642, 647, 659, 655, 651,
664 667, 653, 665, 646, 661, 674, 682, 697, 677, 688,
665
666 678, 699, 711, 710, 701, 695, 722, 723, 715, 725,
667 716, 718, 719, 724, 728, 745, 752, 734, 344, 763,
668 765, 751, 755, 768, 769, 774, 738, 762, 784, 772,
669 778, 782, 788, 786, 795, 813, 815, 798, 817, 801,
670 805, 812, 790, 827, 825, 836, 811, 828, 845, 847,
671 863, 254, 857, 850, 846, 862, 869, 868, 874, 880,
672 876, 877, 887, 890, 835, 892, 895, 908, 888, 904,
673 907, 928, 927, 935, 922, 918, 930, 955, 937, 1000,
674 926, 952, 945, 946, 962, 943, 940, 957, 971, 979,
675 981, 982, 999, 990, 984, 1006, 1004, 1009, 1017, 1036,
676
677 1018, 1024, 1032, 1039, 1052, 1001, 1037, 1042, 1049, 1041,
678 1057, 1066, 1051, 1061, 1065, 1067, 1068, 1069, 1089, 1097,
679 1078, 1103, 1107, 1085, 1099, 1098, 1105, 1113, 1115, 1100,
680 1118, 5425, 1122, 1117, 1131, 1134, 1132, 1141, 5425, 1136,
681 1135, 1137, 1161, 1158, 1164, 1163, 1176, 1157, 1165, 1168,
682 1170, 1178, 1172, 1184, 1188, 1234, 1186, 1190, 1194, 1226,
683 1216, 1198, 1211, 1199, 1227, 1214, 1220, 1237, 1230, 1241,
684 1239, 1256, 1251, 1257, 1269, 1278, 1268, 1264, 1262, 1277,
685 1281, 1274, 1292, 1291, 1290, 1279, 1305, 1295, 1307, 1315,
686 1301, 1316, 1324, 1331, 1329, 1333, 1335, 1317, 1334, 1332,
687
688 1344, 1341, 1342, 1328, 1350, 1349, 1343, 1370, 1361, 1363,
689 1362, 1381, 1369, 1371, 1376, 1384, 1389, 1390, 1391, 1394,
690 1403, 1411, 1398, 1418, 1425, 1426, 1422, 1414, 1420, 1406,
691 1430, 1440, 1436, 1438, 1444, 1445, 1447, 1441, 1455, 1466,
692 1477, 1473, 1459, 1474, 1461, 1462, 1471, 1472, 1491, 1485,
693 1482, 1496, 1493, 1517, 1506, 1507, 1509, 1511, 1505, 1522,
694 1512, 1521, 1518, 1523, 1524, 1539, 1542, 1554, 1543, 1553,
695 1555, 1548, 1558, 1565, 1567, 1551, 1575, 1570, 5425, 1569,
696 1573, 1597, 1592, 1587, 1581, 1599, 1591, 1585, 1633, 5425,
697 1598, 5425, 5425, 1600, 5425, 5425, 1612, 1616, 1619, 1620,
698
699 1682, 1624, 1635, 1636, 1627, 1641, 1651, 1663, 1660, 1665,
700 1671, 1678, 1672, 1668, 1687, 1692, 1688, 1709, 1695, 1703,
701 1702, 1719, 1725, 1730, 1735, 1729, 1731, 1733, 1734, 1722,
702 1738, 1746, 1736, 1748, 1745, 1758, 1775, 1757, 5425, 1765,
703 1768, 1780, 1764, 1785, 1772, 1795, 5425, 1767, 1784, 1769,
704 1799, 1796, 1800, 1812, 1804, 1810, 1805, 1825, 1815, 1803,
705 1838, 1823, 1826, 1845, 1848, 1850, 1830, 1846, 1855, 1841,
706 1863, 1867, 1856, 1851, 1853, 1875, 1868, 1874, 1879, 1877,
707 1880, 1878, 1876, 1885, 1889, 1934, 1907, 1894, 1902, 1895,
708 1926, 1925, 1927, 1919, 1924, 1944, 1941, 1958, 1957, 1960,
709
710 1959, 1964, 1970, 1914, 1987, 1967, 1991, 1984, 1990, 2003,
711 1994, 2000, 2005, 1997, 1931, 2006, 5425, 1922, 2009, 2015,
712 2025, 2032, 2036, 2026, 2035, 2031, 2039, 2030, 2046, 2040,
713 2042, 2055, 2054, 5425, 2058, 2052, 2065, 2079, 2081, 2083,
714 2085, 2089, 2093, 2082, 5425, 2087, 2100, 2097, 2096, 2091,
715 2109, 2104, 2113, 2131, 2114, 2132, 2138, 2136, 2123, 2141,
716 1942, 2140, 2126, 2145, 2155, 2158, 2159, 2165, 2175, 2176,
717 5425, 2166, 2185, 2172, 2182, 2191, 2193, 2186, 2190, 2195,
718 2202, 2207, 120, 2205, 2215, 2206, 2210, 5425, 76, 2212,
719 2221, 2211, 2200, 2234, 2239, 2240, 2233, 2241, 2249, 2242,
720
721 2237, 2252, 2250, 2251, 2273, 2261, 2262, 2279, 2267, 2289,
722 2286, 2288, 2282, 2298, 2281, 2284, 2300, 2302, 2314, 2311,
723 2306, 2315, 2316, 2320, 2327, 2328, 2317, 2318, 2332, 2343,
724 2337, 2333, 2347, 5425, 2369, 2354, 2363, 2355, 2367, 2361,
725 2389, 2359, 2370, 2386, 2379, 2382, 2397, 2400, 2398, 2399,
726 2406, 2408, 2405, 2409, 2394, 2419, 2424, 2433, 2418, 2457,
727 2428, 1982, 2430, 5425, 2436, 2427, 2425, 2449, 2478, 2445,
728 2434, 2454, 2465, 2464, 2463, 2483, 2472, 2494, 5425, 2492,
729 2491, 2484, 2497, 2481, 2507, 2508, 2512, 2500, 2511, 2509,
730 2521, 2524, 2514, 2523, 2530, 5425, 2535, 2546, 2528, 2549,
731
732 2545, 2539, 2550, 2563, 2547, 2542, 2553, 2564, 2548, 2559,
733 2552, 2581, 2569, 2574, 2575, 2595, 2583, 2580, 2601, 5425,
734 2585, 2617, 2605, 2607, 2616, 2609, 2625, 2620, 2608, 2610,
735 2612, 2622, 2643, 2635, 2634, 2651, 2639, 2641, 2644, 2649,
736 2659, 2650, 2667, 2656, 2668, 2661, 2680, 2677, 2687, 2676,
737 2700, 2702, 2706, 2707, 2709, 5425, 2711, 2713, 2694, 2718,
738 2701, 2703, 2747, 2752, 2727, 2732, 2729, 2734, 2735, 2730,
739 2739, 2744, 2745, 2748, 2756, 2760, 2750, 2768, 2773, 2772,
740 2786, 2783, 2785, 2780, 2792, 2791, 2803, 5425, 2794, 2798,
741 2797, 2813, 2806, 2810, 5425, 2816, 5425, 2818, 2837, 2831,
742
743 5425, 2835, 5425, 2839, 5425, 2843, 2841, 2832, 2827, 2849,
744 2850, 2833, 2851, 2860, 2856, 2845, 2870, 2882, 2866, 2883,
745 5425, 2871, 2877, 2894, 2887, 2876, 2879, 2893, 2897, 2898,
746 2906, 2905, 2908, 2909, 5425, 2916, 2931, 2915, 2933, 5425,
747 2913, 2940, 2935, 2925, 2953, 2950, 2943, 2942, 2949, 2938,
748 2970, 2957, 2978, 2964, 2966, 2967, 2983, 2993, 2969, 2990,
749 2999, 2996, 2984, 2998, 3004, 2989, 3009, 3000, 3008, 3012,
750 3014, 3019, 3016, 5425, 3038, 3039, 3027, 3040, 3041, 3036,
751 5425, 3055, 5425, 3049, 3054, 3051, 3046, 3063, 3066, 3079,
752 3077, 3096, 3087, 3074, 3082, 3080, 3089, 3084, 3093, 5425,
753
754 3083, 3099, 3118, 3112, 3115, 3126, 3132, 3125, 3111, 5425,
755 3140, 3123, 3144, 3142, 3143, 3153, 3149, 3169, 5425, 5425,
756 3146, 3152, 3139, 3158, 3186, 3167, 3170, 5425, 3171, 3189,
757 3182, 3190, 3196, 3194, 3179, 3185, 3207, 3197, 3212, 3213,
758 3214, 3216, 3236, 3221, 3224, 3231, 3244, 3246, 3245, 5425,
759 3250, 3238, 3254, 3256, 3252, 3258, 3263, 3251, 3265, 3277,
760 3260, 3273, 3289, 3295, 3282, 3279, 3281, 3296, 3285, 3310,
761 3311, 3313, 3318, 3316, 5425, 3322, 3302, 3325, 3306, 3324,
762 3326, 3338, 3343, 3321, 3339, 3340, 3344, 5425, 3336, 3348,
763 3360, 3346, 3373, 3358, 3354, 3379, 5425, 3352, 3390, 3377,
764
765 3386, 3385, 3371, 3401, 3382, 3395, 5425, 3405, 3399, 3396,
766 3407, 3419, 3422, 3425, 3426, 3418, 3413, 3417, 3430, 3444,
767 3421, 3424, 3454, 3441, 3440, 3446, 3458, 3453, 3465, 3468,
768 3470, 3451, 3473, 3480, 3475, 3494, 3497, 3477, 3486, 3500,
769 3489, 3504, 3493, 3485, 3513, 3495, 3519, 3506, 5425, 3520,
770 3525, 3529, 3534, 3516, 3532, 3537, 3533, 3540, 5425, 3543,
771 5425, 3551, 3545, 5425, 3546, 3541, 3535, 3562, 3556, 3560,
772 3573, 3575, 3590, 3578, 5425, 3587, 3576, 3582, 3584, 5425,
773 3595, 5425, 5425, 3581, 3583, 3616, 3608, 3612, 3626, 3627,
774 5425, 3622, 3610, 3631, 3624, 3615, 3634, 3635, 3638, 3618,
775
776 3649, 3621, 3652, 5425, 3661, 3665, 3651, 3670, 3673, 3674,
777 5425, 3668, 3681, 3658, 3685, 3687, 3693, 3699, 3688, 3701,
778 3691, 3700, 3709, 3711, 5425, 3710, 3716, 3686, 3723, 3720,
779 3714, 3727, 3737, 3738, 3732, 3743, 3751, 3736, 3746, 5425,
780 3761, 3763, 5425, 3747, 3756, 3759, 5425, 3771, 5425, 3778,
781 3774, 3767, 3772, 3791, 3787, 3797, 3788, 3802, 3795, 3799,
782 3813, 3809, 3801, 5425, 5425, 3810, 3811, 3825, 3829, 3819,
783 3814, 3839, 3837, 3843, 5425, 3824, 3840, 3827, 3838, 3855,
784 3844, 3847, 3861, 3864, 3858, 3870, 3852, 3865, 5425, 3871,
785 3859, 3874, 3882, 3869, 3885, 5425, 3899, 3901, 3900, 3902,
786
787 3905, 3914, 3907, 3917, 3908, 3909, 3919, 3924, 3925, 3920,
788 3937, 3930, 3938, 3953, 3935, 5425, 3950, 3956, 3940, 3958,
789 3942, 3957, 3965, 3972, 3970, 3952, 3974, 3975, 3976, 5425,
790 3984, 3982, 3981, 3987, 3993, 3998, 4006, 3986, 4009, 4013,
791 4007, 4021, 4002, 4011, 4014, 4023, 4015, 4034, 4036, 4033,
792 4056, 4054, 5425, 4039, 5425, 4055, 4066, 4060, 4068, 4051,
793 5425, 4061, 4070, 5425, 4053, 5425, 4072, 4084, 4080, 4078,
794 4101, 5425, 4108, 4095, 4111, 4098, 4099, 4096, 4117, 5425,
795 4116, 4121, 4114, 4125, 4126, 4135, 4127, 4136, 4128, 4123,
796 4153, 5425, 4145, 4160, 4168, 4158, 4167, 5425, 5425, 4157,
797
798 4173, 5425, 5425, 5425, 4170, 5425, 4163, 5425, 5425, 4172,
799 4175, 5425, 4178, 5425, 4183, 4188, 4187, 4184, 4186, 5425,
800 4190, 4195, 4212, 5425, 4210, 4224, 4205, 4211, 5425, 4221,
801 5425, 4220, 4227, 4214, 4230, 4231, 4240, 4242, 4232, 4243,
802 4233, 4237, 4251, 4260, 4246, 4268, 4270, 4248, 4257, 4267,
803 4258, 4269, 4285, 4271, 4278, 4276, 4294, 4291, 4302, 4310,
804 5425, 5425, 4295, 4296, 4297, 4305, 4308, 4313, 4312, 4327,
805 5425, 4320, 4322, 4329, 4335, 4316, 4341, 4337, 4346, 4345,
806 4352, 4348, 4354, 4351, 4362, 4356, 5425, 4373, 4368, 5425,
807 5425, 4364, 4371, 4385, 4375, 4381, 4388, 4400, 5425, 4391,
808
809 4401, 4407, 4397, 5425, 4413, 4402, 4416, 4419, 5425, 5425,
810 5425, 4422, 4398, 4426, 4425, 4431, 4432, 4433, 5425, 4427,
811 4434, 4440, 4429, 4438, 4455, 4457, 4474, 4468, 4475, 4476,
812 5425, 5425, 4466, 4478, 4477, 4480, 4483, 4471, 4482, 4484,
813 4487, 5425, 4491, 4470, 4507, 4513, 4514, 4524, 4518, 5425,
814 4509, 4510, 4512, 4529, 4516, 4533, 4534, 4532, 4536, 4541,
815 5425, 4539, 4540, 5425, 4560, 4556, 4557, 5425, 4573, 5425,
816 4576, 5425, 5425, 4558, 4580, 4579, 4577, 4586, 4588, 4571,
817 4596, 4594, 4592, 4591, 5425, 5425, 4624, 4605, 4598, 5425,
818 5425, 4607, 4609, 4623, 4613, 4615, 4603, 4602, 4614, 4637,
819
820 4629, 4642, 4646, 4636, 4644, 4639, 4641, 4656, 4657, 4658,
821 5425, 4661, 4679, 4675, 5425, 4663, 4687, 4685, 4684, 4676,
822 4695, 4683, 4688, 5425, 4690, 4686, 4694, 5425, 5425, 5425,
823 4722, 4728, 4721, 5425, 4726, 4732, 5425, 4725, 4715, 4705,
824 4716, 4739, 4720, 4743, 4742, 4741, 5425, 4753, 4758, 4750,
825 4747, 4766, 4760, 4762, 4771, 4777, 4757, 4786, 4769, 5425,
826 4790, 4791, 4787, 5425, 4795, 4785, 4774, 5425, 4806, 4802,
827 4798, 4811, 4821, 4804, 4814, 4808, 4827, 4833, 4829, 4825,
828 4819, 4841, 4835, 4832, 4846, 4852, 4845, 5425, 4849, 4855,
829 5425, 4853, 4861, 4860, 4877, 4881, 4883, 4879, 5425, 4886,
830
831 5425, 5425, 4888, 5425, 4890, 4880, 4882, 4893, 4895, 5425,
832 5425, 4897, 4898, 4907, 5425, 4899, 4903, 4909, 4916, 4921,
833 4913, 4917, 4920, 4924, 4930, 5425, 5425, 4922, 4952, 4953,
834 4950, 5425, 5425, 5425, 4959, 5425, 4957, 5425, 4963, 4956,
835 5425, 4966, 4958, 5425, 4949, 4962, 4974, 4968, 4978, 4977,
836 4981, 4972, 4986, 4991, 4998, 4992, 5010, 5425, 5425, 5012,
837 5425, 5015, 5425, 5016, 5425, 5005, 5019, 5009, 5021, 5425,
838 5425, 5023, 4995, 5013, 5030, 5022, 5034, 5029, 5425, 5425,
839 5425, 5425, 5051, 5038, 5046, 5425, 5048, 5050, 5047, 5049,
840 5053, 5056, 5073, 5064, 5062, 5070, 5084, 5087, 5090, 5074,
841
842 5089, 5106, 5091, 5425, 5094, 5425, 5425, 5093, 5107, 5110,
843 5111, 5100, 5116, 5114, 5123, 5117, 5132, 5127, 5124, 5143,
844 5134, 5157, 5144, 5155, 5159, 5147, 5151, 5163, 5161, 5162,
845 5173, 5169, 5175, 5170, 5425, 5172, 5179, 5182, 5190, 5204,
846 5202, 5193, 5210, 5213, 5217, 5208, 5197, 5218, 5219, 5220,
847 5229, 5228, 5231, 5425, 5246, 5247, 5238, 5240, 5235, 5242,
848 5245, 5265, 5268, 5263, 5271, 5276, 5273, 5425, 5277, 5425,
849 5425, 5278, 5262, 5275, 5285, 5287, 5425, 5425, 5425, 5333,
850 5340, 5347, 5354, 5361, 82, 5368, 5375, 5382, 5389, 5396,
851 5403, 5410, 5417
852
654 129, 135, 354, 275, 95, 5624, 5624, 5624, 107, 110,
655 142, 180, 108, 145, 152, 186, 50, 149, 121, 182,
656 210, 177, 254, 137, 225, 229, 205, 227, 273, 116,
657 271, 5624, 5624, 5624, 94, 268, 5624, 5624, 5624, 96,
658 261, 295, 5624, 5624, 5624, 299, 256, 5624, 5624, 5624,
659 102, 250, 5624, 318, 5624, 141, 322, 228, 326, 111,
660 0, 330, 0, 0, 257, 235, 277, 324, 310, 266,
661 323, 314, 125, 312, 348, 322, 326, 341, 320, 351,
662 339, 359, 357, 374, 209, 362, 378, 392, 358, 373,
663
664 386, 404, 389, 405, 410, 398, 379, 424, 409, 435,
665 414, 432, 422, 430, 431, 429, 445, 218, 441, 464,
666 456, 450, 455, 477, 481, 472, 460, 483, 224, 174,
667 220, 150, 172, 524, 206, 159, 272, 122, 528, 536,
668 0, 495, 519, 307, 515, 525, 513, 520, 514, 528,
669 542, 539, 547, 468, 557, 601, 552, 546, 540, 549,
670 559, 564, 580, 573, 574, 581, 572, 592, 598, 625,
671 586, 611, 602, 633, 640, 639, 632, 623, 643, 642,
672 655, 659, 649, 650, 651, 660, 658, 666, 654, 652,
673 670, 679, 676, 690, 677, 682, 702, 685, 706, 703,
674
675 715, 697, 707, 712, 718, 722, 729, 724, 726, 725,
676 733, 754, 750, 758, 742, 743, 745, 756, 751, 763,
677 760, 772, 454, 778, 791, 780, 782, 795, 790, 793,
678 784, 787, 799, 803, 805, 812, 807, 815, 814, 823,
679 837, 813, 826, 841, 828, 829, 839, 852, 854, 849,
680 850, 860, 862, 872, 863, 889, 509, 877, 878, 886,
681 873, 884, 903, 909, 905, 900, 912, 896, 904, 925,
682 918, 921, 944, 923, 939, 934, 950, 935, 959, 936,
683 942, 954, 970, 961, 1015, 963, 983, 998, 985, 974,
684 981, 994, 995, 986, 1008, 1011, 1019, 1022, 1036, 1020,
685
686 1038, 1025, 1047, 1032, 1055, 551, 1042, 1052, 1054, 1057,
687 1074, 1069, 1079, 1067, 1064, 1077, 1081, 1075, 1084, 1100,
688 1096, 1093, 1110, 1115, 1113, 1120, 1117, 1111, 1127, 1129,
689 1126, 1112, 1123, 1140, 1131, 1160, 1158, 1143, 1165, 5624,
690 1167, 1148, 1170, 1162, 1153, 1172, 5624, 1156, 1182, 1190,
691 1138, 1197, 1181, 1199, 1185, 1214, 1193, 1195, 1217, 1203,
692 1220, 1211, 1209, 1259, 1219, 1230, 1234, 1257, 1253, 1243,
693 1268, 1246, 1273, 1264, 1270, 1266, 1280, 1288, 1298, 1295,
694 1292, 1301, 1231, 5624, 1309, 1318, 1305, 1302, 1308, 1315,
695 1324, 1322, 1331, 1327, 1330, 1326, 1347, 1343, 1340, 1369,
696
697 1349, 1355, 1363, 1368, 1371, 1372, 1379, 1357, 1375, 1358,
698 1383, 1385, 1384, 1386, 1373, 1396, 1389, 1395, 1416, 1390,
699 1402, 1407, 1421, 1413, 1405, 1422, 1430, 1435, 1432, 1436,
700 1429, 1440, 1449, 1458, 1448, 1444, 1471, 1475, 1468, 1462,
701 1467, 1483, 1477, 1487, 1488, 1479, 1490, 1486, 1503, 1497,
702 1510, 1509, 1515, 1525, 1521, 1513, 1526, 1504, 1511, 1514,
703 1524, 1530, 1536, 1543, 1546, 1547, 1550, 1571, 1549, 1556,
704 1561, 1574, 1569, 1576, 1563, 1567, 1584, 1592, 1577, 1593,
705 1605, 1607, 1596, 1608, 1609, 1602, 1613, 1620, 1627, 1617,
706 1629, 1637, 1624, 5624, 1632, 1635, 1649, 1651, 1640, 1665,
707
708 1660, 1648, 1644, 1692, 5624, 1657, 5624, 5624, 1662, 5624,
709 5624, 1682, 1675, 1690, 1685, 1678, 1741, 1683, 1680, 1695,
710 1700, 1723, 1722, 1734, 1724, 1736, 1747, 1751, 1750, 1738,
711 1757, 1763, 1766, 1765, 1770, 1774, 1777, 1778, 1790, 1788,
712 1730, 1798, 1799, 1800, 1801, 1803, 1813, 1814, 1817, 1815,
713 1808, 1812, 1829, 1818, 1828, 5624, 1823, 1840, 1850, 1838,
714 1842, 1839, 1833, 1860, 5624, 1841, 1867, 1861, 1858, 1864,
715 1873, 1874, 1888, 1877, 1884, 1887, 1885, 1894, 1900, 1875,
716 1898, 1902, 1911, 1921, 1922, 1909, 1919, 1927, 1913, 1936,
717 1943, 1938, 1924, 1939, 1948, 1930, 1947, 1944, 1956, 1945,
718
719 1963, 1954, 1958, 1964, 1966, 2011, 1975, 1980, 1977, 1971,
720 1997, 1991, 1983, 1985, 1994, 2013, 2010, 2024, 2026, 2028,
721 2009, 2034, 2040, 2038, 2045, 2075, 2050, 2055, 2057, 2051,
722 2069, 2059, 2072, 2065, 2066, 2068, 2084, 5624, 2078, 2097,
723 2090, 2091, 2117, 2111, 2095, 2110, 2107, 2120, 2106, 2121,
724 2112, 2128, 2131, 2136, 2134, 5624, 2130, 2144, 2139, 2155,
725 2159, 2163, 2156, 2166, 2174, 2171, 5624, 2161, 2179, 2195,
726 2170, 2188, 2183, 2190, 2187, 2182, 2192, 2200, 2215, 2219,
727 2212, 2209, 2222, 2208, 2229, 2223, 2230, 2226, 2235, 2239,
728 2245, 2252, 2256, 2262, 5624, 2246, 2260, 2265, 2257, 2274,
729
730 2278, 2280, 2275, 2279, 2283, 2281, 106, 2282, 2290, 2285,
731 2286, 5624, 2296, 90, 2302, 2303, 2294, 2323, 2332, 2328,
732 2329, 2321, 2322, 2339, 2325, 2327, 2330, 2338, 2349, 2347,
733 2355, 2352, 2345, 2357, 2374, 2376, 2378, 2372, 2380, 2371,
734 2379, 2382, 2373, 2406, 2398, 5624, 2414, 2412, 2405, 2403,
735 2408, 2419, 2415, 2409, 2410, 2416, 2445, 2425, 2436, 2448,
736 5624, 2397, 2446, 2454, 2439, 2463, 2452, 2469, 2455, 2466,
737 2470, 2472, 2467, 2481, 2487, 2495, 2483, 2497, 2503, 2496,
738 2501, 2499, 2491, 2515, 2520, 2512, 2521, 2544, 2540, 176,
739 2523, 5624, 2539, 2530, 2528, 2529, 2563, 2555, 2556, 2566,
740
741 2565, 2567, 2559, 2570, 2551, 2573, 2554, 5624, 2581, 2593,
742 2580, 2605, 2589, 2610, 2607, 2592, 2614, 2597, 2616, 2615,
743 2622, 2628, 2620, 2624, 2626, 5624, 2632, 2635, 2640, 2639,
744 2637, 2642, 2641, 2658, 2643, 2651, 2653, 2678, 2667, 2655,
745 2665, 2666, 2682, 2669, 2670, 2673, 2694, 2686, 2692, 2696,
746 5624, 2693, 2729, 2697, 2709, 2705, 2713, 2734, 2731, 2726,
747 2719, 2721, 2723, 2740, 2725, 2739, 2751, 2742, 2730, 2761,
748 2757, 2748, 2762, 2764, 2774, 2778, 2775, 2776, 2772, 2782,
749 2786, 2790, 2788, 2799, 2800, 2813, 2815, 5624, 2818, 2819,
750 2804, 2820, 2821, 2809, 2833, 2834, 2812, 2837, 2838, 2827,
751
752 2839, 2845, 2841, 2844, 2848, 2850, 2854, 2860, 2849, 2864,
753 2881, 2883, 2876, 2889, 2887, 2891, 2880, 2890, 2885, 2921,
754 5624, 2884, 2902, 2919, 2901, 2912, 2914, 2925, 5624, 2915,
755 5624, 2931, 2937, 2939, 5624, 2943, 5624, 2944, 2929, 5624,
756 2946, 2952, 2932, 2950, 2941, 2957, 2954, 2978, 2963, 2984,
757 2964, 2976, 2988, 2974, 2989, 5624, 2995, 2979, 2990, 2998,
758 3002, 3003, 3008, 2991, 3012, 3031, 3035, 3041, 3016, 3042,
759 5624, 3030, 3045, 3027, 3043, 5624, 3024, 3051, 3053, 3054,
760 3079, 3057, 3056, 3068, 3059, 3062, 3063, 3098, 3095, 3081,
761 3083, 3080, 3107, 3106, 3109, 3090, 3110, 3116, 3114, 3103,
762
763 3108, 3112, 3104, 3135, 3131, 3124, 3129, 3130, 3138, 3133,
764 5624, 3153, 3156, 3148, 3157, 3158, 3162, 5624, 3172, 5624,
765 3141, 3169, 3179, 3168, 3185, 3177, 3183, 3199, 3189, 3176,
766 3207, 3195, 3204, 3200, 3206, 3205, 3212, 5624, 3216, 3219,
767 3222, 3236, 3231, 3248, 3254, 3247, 3239, 5624, 3234, 3244,
768 3260, 3258, 3264, 3268, 3276, 3277, 3291, 5624, 5624, 3274,
769 3297, 3285, 3281, 3283, 3280, 3295, 3296, 5624, 3286, 3312,
770 3304, 3323, 3325, 3310, 3317, 5624, 3320, 3334, 3331, 3341,
771 3337, 3339, 3344, 3346, 3342, 3338, 3347, 3359, 3357, 3370,
772 5624, 3372, 3373, 3379, 3376, 3380, 3383, 3381, 3374, 3386,
773
774 3402, 3375, 3390, 3394, 3400, 3404, 3407, 3403, 3414, 3408,
775 3433, 3415, 3437, 3435, 3444, 3440, 5624, 3448, 3427, 3450,
776 3422, 3456, 3457, 3452, 3468, 3441, 3449, 3463, 3466, 5624,
777 3451, 3470, 3473, 3472, 3488, 3474, 3483, 3501, 3503, 5624,
778 3495, 3506, 3496, 3510, 3515, 3493, 3525, 3508, 3520, 5624,
779 3522, 3516, 3521, 3532, 3544, 3549, 3550, 3551, 3546, 3537,
780 3543, 3548, 3564, 3547, 3553, 3568, 3566, 3571, 3570, 3582,
781 3593, 3591, 3588, 3594, 3601, 3595, 3597, 3587, 3576, 3602,
782 3623, 3608, 3604, 3613, 3637, 3624, 3635, 3629, 3617, 3649,
783 3626, 3650, 3643, 5624, 3644, 3653, 3658, 3659, 3640, 3666,
784
785 3656, 3667, 3669, 5624, 3674, 5624, 3662, 3683, 5624, 3685,
786 3684, 3671, 3681, 3686, 3688, 3698, 3709, 3713, 3689, 5624,
787 3720, 3701, 3717, 3718, 5624, 3723, 5624, 3722, 5624, 3724,
788 3728, 3737, 3735, 3755, 3741, 3757, 5624, 3751, 3740, 3762,
789 3764, 3750, 3749, 3768, 3769, 3748, 3777, 3766, 3779, 5624,
790 3789, 3795, 3784, 3798, 3805, 5624, 3800, 5624, 3796, 3814,
791 3791, 3815, 3826, 3829, 3830, 3813, 3818, 3819, 3843, 3836,
792 3825, 5624, 3832, 3840, 3850, 3863, 3853, 3846, 3847, 3867,
793 3869, 3870, 3874, 3877, 3884, 3876, 3875, 5624, 3895, 3902,
794 5624, 3892, 3888, 3898, 3901, 5624, 3912, 5624, 3914, 3906,
795
796 3899, 3922, 3923, 3927, 3930, 3919, 3933, 3935, 3929, 3959,
797 3944, 3941, 5624, 5624, 3953, 3957, 3970, 3971, 3962, 3955,
798 3979, 3976, 3977, 5624, 3958, 3982, 3967, 3980, 3986, 3978,
799 3999, 3992, 3998, 3997, 4006, 3994, 4008, 5624, 4009, 4007,
800 4013, 4022, 4023, 4004, 4024, 5624, 4032, 4043, 4035, 4038,
801 4040, 4055, 4058, 4060, 4051, 4050, 4061, 4069, 4074, 4057,
802 4081, 4068, 4089, 4091, 4073, 5624, 4093, 4094, 4078, 4099,
803 4084, 4100, 4101, 4114, 4107, 4090, 4095, 4113, 4112, 5624,
804 4118, 4120, 4108, 4140, 4146, 4129, 4149, 4125, 4152, 4145,
805 5624, 4150, 4155, 4136, 4156, 4137, 4163, 4179, 4159, 4182,
806
807 4183, 4180, 4170, 4189, 5624, 4178, 5624, 4190, 4201, 4204,
808 4213, 4210, 5624, 4197, 4206, 5624, 4196, 5624, 4224, 4229,
809 4216, 4226, 4244, 5624, 4245, 4233, 4249, 4240, 4241, 4239,
810 4261, 5624, 4242, 4267, 4248, 4259, 4260, 4263, 4278, 4277,
811 4273, 4279, 4282, 4289, 5624, 4285, 4291, 4302, 4305, 4297,
812 5624, 5624, 4300, 4316, 5624, 5624, 5624, 4303, 5624, 4307,
813 5624, 5624, 4310, 4321, 5624, 4331, 5624, 4306, 4334, 4320,
814 4323, 4333, 5624, 4327, 4337, 4339, 5624, 4342, 4357, 4341,
815 4340, 5624, 4356, 5624, 4365, 4369, 4360, 4372, 4375, 4379,
816 4380, 4373, 4363, 4387, 4382, 4383, 4391, 4384, 4393, 4405,
817
818 4408, 4397, 4399, 4412, 4404, 4415, 4426, 4424, 4416, 4414,
819 4432, 4440, 4438, 4447, 4448, 5624, 5624, 4442, 4439, 4446,
820 4450, 4469, 4459, 4453, 4480, 5624, 4458, 4473, 4465, 4484,
821 4472, 4475, 4476, 4474, 4485, 4488, 4517, 4498, 4507, 4500,
822 4518, 4506, 5624, 4515, 4509, 5624, 5624, 4510, 4529, 4535,
823 4525, 4520, 4539, 4537, 5624, 4533, 4550, 4558, 4556, 5624,
824 4561, 4544, 4570, 4572, 5624, 5624, 5624, 4573, 4557, 4565,
825 4567, 4575, 4577, 4568, 4581, 5624, 4571, 4588, 4605, 4596,
826 4591, 4612, 4614, 4617, 4623, 4619, 4625, 4626, 5624, 5624,
827 4615, 4631, 4629, 4630, 4627, 4632, 4637, 4638, 4649, 5624,
828
829 4663, 4662, 4650, 4656, 4664, 4670, 4674, 4671, 5624, 4659,
830 4665, 4684, 4681, 4690, 4695, 4683, 4699, 4705, 4710, 5624,
831 4707, 4706, 5624, 4714, 4711, 4708, 5624, 4720, 5624, 4724,
832 5624, 5624, 4729, 4726, 4728, 4736, 4744, 4757, 4758, 4741,
833 4746, 4644, 4761, 4763, 5624, 5624, 4769, 4747, 4756, 4768,
834 5624, 5624, 4772, 4764, 4773, 4774, 4783, 4766, 4775, 4779,
835 4804, 4794, 4810, 4814, 4816, 4802, 4819, 4800, 4796, 4823,
836 4806, 4808, 5624, 4834, 4833, 4843, 5624, 4838, 4852, 4850,
837 4849, 4842, 4866, 4851, 4859, 5624, 4862, 4855, 5624, 4847,
838 5624, 5624, 5624, 4875, 4886, 4879, 5624, 4885, 4896, 5624,
839
840 4892, 4894, 4881, 4877, 4884, 4904, 4898, 4914, 4893, 4922,
841 5624, 4907, 4920, 4929, 4924, 4934, 4930, 4917, 4921, 4942,
842 4941, 4928, 4952, 4944, 5624, 4958, 4959, 4965, 5624, 4972,
843 4955, 4951, 4957, 5624, 4979, 4969, 4966, 4987, 4989, 4981,
844 4982, 4971, 4995, 5001, 5010, 5624, 4993, 4992, 5014, 5008,
845 5006, 5027, 5028, 5024, 5624, 5026, 5015, 5624, 5029, 5031,
846 5016, 5042, 5048, 5049, 5050, 5054, 5624, 5060, 5624, 5624,
847 5061, 5624, 5064, 5051, 5063, 5057, 5067, 5074, 5624, 5624,
848 5072, 5068, 5077, 5624, 5076, 5078, 5092, 5073, 5094, 5090,
849 5095, 5109, 5093, 5110, 5624, 5624, 5112, 5624, 5113, 5116,
850
851 5124, 5624, 5624, 5624, 5118, 5624, 5129, 5624, 5130, 5131,
852 5120, 5624, 5144, 5135, 5624, 5145, 5137, 5147, 5152, 5165,
853 5161, 5142, 5153, 5157, 5176, 5177, 5164, 5170, 5624, 5624,
854 5185, 5624, 5186, 5624, 5180, 5187, 5624, 5184, 5197, 5191,
855 5199, 5624, 5624, 5212, 5204, 5203, 5214, 5201, 5209, 5205,
856 5624, 5624, 5624, 5226, 5624, 5218, 5223, 5224, 5624, 5241,
857 5242, 5239, 5244, 5245, 5232, 5248, 5240, 5237, 5264, 5274,
858 5276, 5272, 5275, 5256, 5271, 5282, 5278, 5293, 5624, 5279,
859 5624, 5624, 5291, 5299, 5300, 5297, 5301, 5296, 5624, 5298,
860 5303, 5304, 5316, 5313, 5328, 5330, 5326, 5346, 5331, 5343,
861
862 5349, 5342, 5338, 5350, 5344, 5360, 5363, 5356, 5365, 5353,
863 5624, 5359, 5370, 5375, 5372, 5395, 5393, 5381, 5402, 5404,
864 5408, 5407, 5391, 5368, 5412, 5417, 5409, 5421, 5423, 5624,
865 5433, 5440, 5430, 5435, 5446, 5437, 5439, 5451, 5443, 5461,
866 5459, 5463, 5464, 5624, 5470, 5624, 5624, 5472, 5465, 5474,
867 5480, 5482, 5624, 5624, 5624, 5532, 5539, 5546, 5553, 5560,
868 82, 5567, 5574, 5581, 5588, 5595, 5602, 5609, 5616
853869 } ;
854870
855 static yyconst flex_int16_t yy_def[1894] =
871 static yyconst flex_int16_t yy_def[1970] =
856872 { 0,
857 1879, 1, 1880, 1880, 1881, 1881, 1882, 1882, 1883, 1883,
858 1884, 1884, 1879, 1885, 1879, 1879, 1879, 1879, 1886, 1885,
859 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
860 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
861 1887, 1879, 1879, 1879, 1887, 1888, 1879, 1879, 1879, 1888,
862 1889, 1879, 1879, 1879, 1879, 1889, 1890, 1879, 1879, 1879,
863 1890, 1891, 1879, 1892, 1879, 1891, 1891, 1885, 1885, 1879,
864 1893, 1886, 1893, 1886, 1885, 1885, 1885, 1885, 1885, 1885,
865 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
866 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
867
868 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
869 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
870 1885, 1885, 1885, 1885, 1885, 1885, 1887, 1887, 1888, 1888,
871 1889, 1889, 1879, 1890, 1890, 1891, 1891, 1892, 1892, 1891,
872 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
873 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
874 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
875 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
876 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
877 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
878
879 1885, 1885, 1885, 1885, 1891, 1885, 1885, 1885, 1885, 1885,
880 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
881 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
882 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
883 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
884 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
885 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
886 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
887 1885, 1885, 1891, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
888 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
889
890 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
891 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
892 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
893 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885,
894 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
895 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
896 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
897 1885, 1885, 1885, 1885, 1891, 1885, 1885, 1885, 1885, 1885,
898 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
899 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
900
901 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
902 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
903 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
904 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
905 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
906 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
907 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
908 1885, 1885, 1891, 1885, 1885, 1885, 1885, 1885, 1879, 1885,
909 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879,
910 1885, 1879, 1879, 1885, 1879, 1879, 1885, 1885, 1885, 1885,
911
912 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
913 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
914 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
915 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885,
916 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885,
917 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
918 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
919 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1891, 1885,
920 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
921 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
922
923 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
924 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885,
925 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
926 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1885,
927 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885,
928 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
929 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
930 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
931 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1891, 1885,
932 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
933
934 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
935 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
936 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
937 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1885,
938 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
939 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
940 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1885,
941 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885,
942 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
943 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885,
944
945 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
946 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879,
947 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
948 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
949 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
950 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885,
951 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
952 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
953 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885,
954 1885, 1885, 1885, 1885, 1879, 1885, 1879, 1885, 1885, 1885,
955
956 1879, 1885, 1879, 1885, 1879, 1885, 1885, 1885, 1885, 1885,
957 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
958 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
959 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1879,
960 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
961 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
962 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
963 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1885,
964 1879, 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
965 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879,
966
967 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879,
968 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1879,
969 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885,
970 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
971 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879,
972 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
973 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
974 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885,
975 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885,
976 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885,
977
978 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885,
979 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
980 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
981 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
982 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885,
983 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885,
984 1879, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1885,
985 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1879,
986 1885, 1879, 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
987 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
988
989 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1885,
990 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
991 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885,
992 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879,
993 1885, 1885, 1879, 1885, 1885, 1885, 1879, 1885, 1879, 1885,
994 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
995 1885, 1885, 1885, 1879, 1879, 1885, 1885, 1885, 1885, 1885,
996 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885,
997 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885,
998 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885,
999
1000 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1001 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885,
1002 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879,
1003 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1004 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1005 1885, 1885, 1879, 1885, 1879, 1885, 1885, 1885, 1885, 1885,
1006 1879, 1885, 1885, 1879, 1885, 1879, 1885, 1885, 1885, 1885,
1007 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879,
1008 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1009 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1879, 1879, 1885,
1010
1011 1885, 1879, 1879, 1879, 1885, 1879, 1885, 1879, 1879, 1885,
1012 1885, 1879, 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1879,
1013 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1879, 1885,
1014 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1015 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1016 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1017 1879, 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1018 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1019 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1879,
1020 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885,
1021
1022 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1879, 1879,
1023 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885,
1024 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1025 1879, 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1026 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879,
1027 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1028 1879, 1885, 1885, 1879, 1885, 1885, 1885, 1879, 1885, 1879,
1029 1885, 1879, 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1030 1885, 1885, 1885, 1885, 1879, 1879, 1885, 1885, 1885, 1879,
1031 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1032
1033 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1034 1879, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885,
1035 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1879, 1879, 1879,
1036 1885, 1885, 1885, 1879, 1885, 1885, 1879, 1885, 1885, 1885,
1037 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885,
1038 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879,
1039 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1879, 1885, 1885,
1040 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1041 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1885,
1042 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885,
1043
1044 1879, 1879, 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1879,
1045 1879, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885,
1046 1885, 1885, 1885, 1885, 1885, 1879, 1879, 1885, 1885, 1885,
1047 1885, 1879, 1879, 1879, 1885, 1879, 1885, 1879, 1885, 1885,
1048 1879, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1885,
1049 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1879, 1885,
1050 1879, 1885, 1879, 1885, 1879, 1885, 1885, 1885, 1885, 1879,
1051 1879, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1879,
1052 1879, 1879, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885,
1053 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1054
1055 1885, 1885, 1885, 1879, 1885, 1879, 1879, 1885, 1885, 1885,
1056 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1057 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1058 1885, 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885,
1059 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1885,
1060 1885, 1885, 1885, 1879, 1885, 1885, 1885, 1885, 1885, 1885,
1061 1885, 1885, 1885, 1885, 1885, 1885, 1885, 1879, 1885, 1879,
1062 1879, 1885, 1885, 1885, 1885, 1885, 1879, 1879, 0, 1879,
1063 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879,
1064 1879, 1879, 1879
1065
873 1955, 1, 1956, 1956, 1957, 1957, 1958, 1958, 1959, 1959,
874 1960, 1960, 1955, 1961, 1955, 1955, 1955, 1955, 1962, 1961,
875 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
876 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
877 1963, 1955, 1955, 1955, 1963, 1964, 1955, 1955, 1955, 1964,
878 1965, 1955, 1955, 1955, 1955, 1965, 1966, 1955, 1955, 1955,
879 1966, 1967, 1955, 1968, 1955, 1967, 1967, 1961, 1961, 1955,
880 1969, 1962, 1969, 1962, 1961, 1961, 1961, 1961, 1961, 1961,
881 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
882 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
883
884 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
885 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
886 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1963, 1963,
887 1964, 1964, 1965, 1965, 1955, 1966, 1966, 1967, 1967, 1968,
888 1968, 1967, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
889 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
890 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
891 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
892 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
893 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
894
895 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1967, 1961,
896 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
897 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
898 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
899 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
900 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
901 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
902 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
903 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1967, 1961,
904 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
905
906 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
907 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
908 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
909 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955,
910 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961,
911 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
912 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
913 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
914 1961, 1961, 1961, 1955, 1967, 1961, 1961, 1961, 1961, 1961,
915 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
916
917 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
918 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
919 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
920 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
921 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
922 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
923 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
924 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
925 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1967, 1961, 1961,
926 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961, 1961, 1961,
927
928 1961, 1961, 1961, 1961, 1955, 1961, 1955, 1955, 1961, 1955,
929 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
930 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
931 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
932 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
933 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961,
934 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961, 1961,
935 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
936 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
937 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1967, 1961,
938
939 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
940 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
941 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
942 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961,
943 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
944 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961,
945 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961,
946 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
947 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
948 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961, 1961,
949
950 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
951 1961, 1955, 1961, 1967, 1961, 1961, 1961, 1961, 1961, 1961,
952 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
953 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
954 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961,
955 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
956 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
957 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
958 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
959 1961, 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
960
961 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961,
962 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
963 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961,
964 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
965 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
966 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
967 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
968 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
969 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961,
970 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
971
972 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
973 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
974 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961,
975 1955, 1961, 1961, 1961, 1955, 1961, 1955, 1961, 1961, 1955,
976 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
977 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961,
978 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
979 1955, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961,
980 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
981 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
982
983 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
984 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1955,
985 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
986 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961,
987 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961,
988 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1955, 1961,
989 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961,
990 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961,
991 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
992 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
993
994 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
995 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961,
996 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955,
997 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955,
998 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955,
999 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1000 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1001 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1002 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1003 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961, 1961, 1961,
1004
1005 1961, 1961, 1961, 1955, 1961, 1955, 1961, 1961, 1955, 1961,
1006 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955,
1007 1961, 1961, 1961, 1961, 1955, 1961, 1955, 1961, 1955, 1961,
1008 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961,
1009 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955,
1010 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1955, 1961, 1961,
1011 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1012 1961, 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1013 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961,
1014 1955, 1961, 1961, 1961, 1961, 1955, 1961, 1955, 1961, 1961,
1015
1016 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1017 1961, 1961, 1955, 1955, 1961, 1961, 1961, 1961, 1961, 1961,
1018 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961, 1961, 1961,
1019 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961,
1020 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961,
1021 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1022 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961,
1023 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955,
1024 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1025 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1026
1027 1961, 1961, 1961, 1961, 1955, 1961, 1955, 1961, 1961, 1961,
1028 1961, 1961, 1955, 1961, 1961, 1955, 1961, 1955, 1961, 1961,
1029 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961, 1961, 1961,
1030 1961, 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1031 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961, 1961,
1032 1955, 1955, 1961, 1961, 1955, 1955, 1955, 1961, 1955, 1961,
1033 1955, 1955, 1961, 1961, 1955, 1961, 1955, 1961, 1961, 1961,
1034 1961, 1961, 1955, 1961, 1961, 1961, 1955, 1961, 1961, 1961,
1035 1961, 1955, 1961, 1955, 1961, 1961, 1961, 1961, 1961, 1961,
1036 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1037
1038 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1039 1961, 1961, 1961, 1961, 1961, 1955, 1955, 1961, 1961, 1961,
1040 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961,
1041 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1042 1961, 1961, 1955, 1961, 1961, 1955, 1955, 1961, 1961, 1961,
1043 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961, 1955,
1044 1961, 1961, 1961, 1961, 1955, 1955, 1955, 1961, 1961, 1961,
1045 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961,
1046 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1955,
1047 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955,
1048
1049 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961,
1050 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955,
1051 1961, 1961, 1955, 1961, 1961, 1961, 1955, 1961, 1955, 1961,
1052 1955, 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1053 1961, 1961, 1961, 1961, 1955, 1955, 1961, 1961, 1961, 1961,
1054 1955, 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1055 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1056 1961, 1961, 1955, 1961, 1961, 1961, 1955, 1961, 1961, 1961,
1057 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1955, 1961,
1058 1955, 1955, 1955, 1961, 1961, 1961, 1955, 1961, 1961, 1955,
1059
1060 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1061 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1062 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1955, 1961,
1063 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961, 1961, 1961,
1064 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961,
1065 1961, 1961, 1961, 1961, 1955, 1961, 1961, 1955, 1961, 1961,
1066 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961, 1955, 1955,
1067 1961, 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1955,
1068 1961, 1961, 1961, 1955, 1961, 1961, 1961, 1961, 1961, 1961,
1069 1961, 1961, 1961, 1961, 1955, 1955, 1961, 1955, 1961, 1961,
1070
1071 1961, 1955, 1955, 1955, 1961, 1955, 1961, 1955, 1961, 1961,
1072 1961, 1955, 1961, 1961, 1955, 1961, 1961, 1961, 1961, 1961,
1073 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1955,
1074 1961, 1955, 1961, 1955, 1961, 1961, 1955, 1961, 1961, 1961,
1075 1961, 1955, 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1076 1955, 1955, 1955, 1961, 1955, 1961, 1961, 1961, 1955, 1961,
1077 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1078 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961,
1079 1955, 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1955, 1961,
1080 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1081
1082 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1083 1955, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1084 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1955,
1085 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961, 1961,
1086 1961, 1961, 1961, 1955, 1961, 1955, 1955, 1961, 1961, 1961,
1087 1961, 1961, 1955, 1955, 0, 1955, 1955, 1955, 1955, 1955,
1088 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955
10661089 } ;
10671090
1068 static yyconst flex_uint16_t yy_nxt[5491] =
1091 static yyconst flex_uint16_t yy_nxt[5690] =
10691092 { 0,
10701093 14, 15, 16, 17, 18, 19, 18, 14, 14, 14,
10711094 14, 18, 20, 14, 21, 22, 23, 24, 14, 25,
10741097 14, 21, 22, 23, 24, 14, 25, 26, 27, 28,
10751098 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
10761099 39, 14, 14, 14, 14, 42, 43, 44, 42, 43,
1077 44, 47, 48, 47, 48, 49, 88, 49, 52, 53,
1100 44, 47, 48, 47, 48, 49, 96, 49, 52, 53,
10781101 54, 55, 68, 18, 52, 53, 54, 55, 69, 18,
1079 58, 59, 60, 58, 59, 60, 70, 127, 127, 129,
1080
1081 71, 45, 129, 88, 45, 134, 134, 50, 73, 50,
1082 73, 73, 70, 73, 137, 56, 71, 68, 73, 68,
1083 68, 56, 68, 86, 75, 76, 61, 68, 800, 61,
1102 58, 59, 60, 58, 59, 60, 70, 129, 129, 131,
1103
1104 71, 45, 131, 96, 45, 136, 136, 50, 73, 50,
1105 73, 73, 70, 73, 830, 56, 71, 68, 73, 68,
1106 68, 56, 68, 86, 75, 76, 61, 68, 139, 61,
10841107 15, 16, 17, 63, 64, 65, 15, 16, 17, 63,
1085 64, 65, 77, 87, 95, 74, 69, 97, 69, 66,
1086 86, 75, 76, 137, 78, 66, 69, 89, 69, 69,
1087 135, 79, 111, 167, 96, 90, 133, 67, 80, 77,
1088 87, 95, 132, 67, 97, 69, 66, 127, 127, 130,
1089 69, 78, 66, 69, 89, 142, 69, 91, 79, 111,
1090 92, 96, 90, 98, 69, 80, 81, 93, 105, 94,
1091
1092 82, 99, 128, 83, 69, 84, 85, 100, 69, 102,
1093 69, 101, 142, 103, 91, 141, 152, 92, 69, 69,
1094 98, 69, 146, 81, 93, 105, 94, 82, 99, 104,
1095 83, 69, 84, 85, 100, 69, 102, 112, 101, 69,
1096 103, 113, 141, 152, 69, 120, 137, 121, 143, 146,
1097 135, 114, 133, 123, 115, 69, 104, 106, 124, 132,
1098 160, 107, 122, 69, 112, 332, 69, 108, 113, 125,
1099 109, 69, 120, 126, 121, 143, 116, 110, 114, 69,
1100 123, 115, 130, 69, 106, 124, 117, 160, 107, 122,
1101 118, 119, 69, 140, 108, 69, 125, 109, 69, 129,
1102
1103 126, 128, 129, 116, 110, 131, 137, 131, 131, 73,
1104 131, 73, 73, 117, 73, 134, 134, 118, 119, 136,
1105 140, 136, 136, 68, 136, 68, 68, 73, 68, 73,
1106 73, 144, 73, 68, 147, 148, 156, 73, 157, 150,
1107 151, 149, 153, 154, 145, 69, 139, 69, 69, 69,
1108 69, 161, 69, 297, 1879, 69, 69, 1879, 144, 193,
1109 155, 147, 148, 156, 74, 157, 150, 151, 149, 153,
1110 158, 145, 159, 69, 69, 162, 168, 163, 161, 69,
1111 164, 69, 69, 174, 69, 171, 169, 155, 69, 172,
1112 69, 175, 173, 165, 166, 69, 69, 158, 1879, 159,
1113
1114 182, 69, 162, 168, 163, 176, 170, 164, 69, 69,
1115 174, 178, 171, 169, 69, 177, 172, 180, 175, 173,
1116 165, 166, 179, 69, 69, 69, 181, 182, 183, 69,
1117 184, 69, 176, 170, 185, 69, 69, 69, 178, 186,
1118 1879, 187, 177, 188, 180, 189, 69, 192, 190, 179,
1119 69, 195, 69, 181, 191, 183, 69, 184, 194, 69,
1120 69, 185, 69, 199, 202, 198, 186, 69, 187, 69,
1121 188, 196, 189, 69, 192, 190, 69, 69, 195, 197,
1122 200, 191, 203, 1879, 204, 194, 69, 1879, 69, 1879,
1123 199, 202, 198, 69, 1879, 207, 1879, 69, 196, 1879,
1124
1125 205, 201, 1879, 206, 1879, 69, 197, 200, 1879, 203,
1126 131, 204, 131, 131, 136, 131, 136, 136, 73, 136,
1127 73, 73, 208, 73, 137, 69, 69, 205, 201, 209,
1128 206, 210, 211, 212, 69, 213, 214, 1879, 227, 69,
1129 69, 215, 216, 218, 69, 217, 69, 1879, 69, 208,
1130 226, 1879, 219, 69, 1879, 139, 209, 228, 210, 211,
1131 212, 231, 213, 230, 69, 227, 229, 69, 215, 216,
1132 69, 69, 217, 220, 69, 233, 69, 226, 232, 69,
1133 69, 237, 234, 69, 228, 235, 69, 69, 231, 236,
1134 230, 69, 238, 229, 239, 1879, 243, 69, 69, 240,
1135
1136 220, 221, 233, 69, 244, 232, 222, 69, 237, 234,
1137 245, 223, 235, 241, 69, 242, 236, 224, 225, 238,
1138 69, 239, 69, 243, 69, 248, 240, 251, 221, 246,
1139 249, 253, 252, 222, 254, 69, 69, 245, 223, 247,
1140 241, 250, 242, 255, 224, 225, 257, 69, 69, 1879,
1141 256, 259, 1879, 270, 69, 1879, 69, 249, 69, 252,
1142 69, 261, 69, 69, 69, 69, 247, 69, 250, 258,
1143 255, 262, 69, 257, 260, 263, 69, 256, 259, 69,
1144 69, 264, 265, 266, 69, 69, 267, 272, 261, 69,
1145 277, 69, 271, 69, 268, 269, 258, 69, 262, 69,
1146
1147 273, 260, 263, 69, 274, 69, 278, 275, 264, 265,
1148 266, 276, 69, 267, 272, 69, 69, 277, 280, 271,
1149 69, 268, 269, 281, 283, 284, 69, 273, 279, 1879,
1150 286, 287, 288, 69, 275, 69, 1879, 69, 276, 137,
1151 282, 285, 289, 292, 291, 305, 296, 290, 69, 69,
1152 281, 283, 284, 69, 69, 279, 69, 69, 287, 294,
1153 69, 69, 69, 69, 293, 295, 69, 282, 285, 289,
1154 292, 291, 69, 296, 290, 298, 69, 299, 300, 1879,
1155 1879, 301, 302, 69, 303, 309, 294, 306, 308, 69,
1156 69, 293, 295, 69, 304, 1879, 307, 321, 1879, 1879,
1157
1158 69, 69, 298, 69, 299, 300, 69, 69, 301, 302,
1159 69, 303, 69, 310, 306, 308, 69, 311, 312, 313,
1160 69, 304, 69, 307, 69, 314, 69, 316, 69, 315,
1161 318, 326, 317, 69, 319, 320, 69, 1879, 1879, 69,
1162 310, 322, 346, 69, 311, 312, 313, 1879, 323, 69,
1163 69, 69, 314, 69, 316, 69, 315, 318, 326, 317,
1164 327, 319, 320, 69, 324, 69, 69, 325, 322, 328,
1165 329, 333, 336, 69, 69, 323, 330, 331, 334, 339,
1166 1879, 335, 337, 69, 69, 69, 1879, 327, 69, 338,
1167 340, 324, 341, 343, 325, 69, 328, 329, 333, 336,
1168
1169 69, 69, 342, 330, 331, 334, 69, 69, 335, 337,
1170 344, 348, 69, 351, 69, 69, 338, 340, 69, 341,
1171 343, 345, 349, 347, 350, 69, 69, 355, 69, 342,
1172 69, 352, 1879, 69, 353, 356, 354, 344, 348, 1879,
1173 351, 1879, 69, 357, 361, 69, 69, 379, 345, 349,
1174 347, 350, 373, 360, 355, 362, 69, 1879, 352, 358,
1175 69, 353, 365, 354, 69, 69, 69, 359, 69, 363,
1176 357, 361, 374, 69, 378, 69, 376, 375, 69, 373,
1177 360, 69, 362, 137, 69, 364, 358, 1879, 377, 365,
1178 69, 380, 1879, 69, 359, 69, 363, 383, 1879, 374,
1179
1180 69, 378, 381, 376, 375, 382, 385, 387, 384, 69,
1181 1879, 389, 364, 366, 367, 377, 399, 69, 380, 69,
1182 69, 386, 69, 368, 383, 369, 370, 371, 69, 381,
1183 372, 388, 382, 391, 387, 384, 390, 69, 69, 69,
1184 366, 367, 69, 399, 69, 392, 393, 69, 386, 394,
1185 368, 395, 369, 370, 371, 69, 69, 372, 388, 396,
1186 391, 404, 69, 390, 397, 398, 400, 401, 408, 402,
1187 69, 407, 1879, 405, 69, 69, 394, 69, 395, 69,
1188 69, 406, 403, 411, 410, 412, 396, 69, 404, 69,
1189 69, 397, 398, 400, 401, 69, 402, 409, 407, 69,
1190
1191 405, 413, 415, 69, 69, 69, 69, 69, 406, 403,
1192 411, 410, 412, 414, 417, 416, 69, 418, 1879, 419,
1193 421, 420, 1879, 69, 409, 422, 1879, 69, 413, 415,
1194 425, 423, 424, 1879, 426, 69, 69, 69, 69, 1879,
1195 414, 69, 416, 69, 418, 69, 419, 421, 420, 427,
1196 428, 69, 422, 69, 429, 69, 69, 425, 423, 424,
1197 69, 426, 435, 430, 431, 432, 434, 433, 436, 69,
1198 69, 1879, 69, 69, 69, 69, 427, 428, 437, 69,
1199 438, 429, 439, 440, 1879, 444, 441, 1879, 446, 435,
1200 430, 431, 432, 434, 433, 69, 69, 1879, 442, 69,
1201
1202 443, 69, 69, 69, 445, 437, 69, 438, 69, 439,
1203 69, 447, 444, 441, 69, 446, 69, 454, 448, 1879,
1204 455, 456, 69, 461, 69, 442, 69, 443, 69, 460,
1205 459, 445, 69, 457, 1879, 462, 69, 69, 447, 463,
1206 464, 1879, 458, 465, 454, 448, 449, 455, 456, 69,
1207 461, 450, 69, 451, 69, 469, 460, 459, 69, 1879,
1208 467, 452, 462, 466, 69, 69, 463, 464, 69, 458,
1209 465, 453, 69, 449, 468, 69, 470, 69, 450, 69,
1210 451, 471, 469, 472, 473, 474, 477, 467, 452, 69,
1211 466, 475, 479, 476, 69, 69, 478, 480, 453, 481,
1212
1213 69, 468, 69, 470, 483, 484, 69, 137, 471, 486,
1214 472, 473, 69, 477, 482, 69, 69, 69, 475, 69,
1215 476, 485, 489, 478, 480, 491, 490, 492, 69, 69,
1216 69, 483, 484, 69, 487, 493, 486, 488, 494, 69,
1217 495, 482, 497, 69, 496, 69, 1879, 500, 485, 498,
1218 499, 501, 491, 69, 69, 69, 502, 505, 503, 504,
1219 1879, 487, 69, 1879, 488, 506, 69, 69, 507, 69,
1220 69, 69, 69, 69, 500, 512, 498, 499, 516, 69,
1221 69, 69, 69, 502, 508, 503, 504, 69, 69, 509,
1222 511, 513, 506, 510, 515, 507, 517, 514, 518, 69,
1223
1224 69, 69, 512, 1879, 519, 526, 521, 69, 69, 69,
1225 523, 508, 1879, 533, 69, 522, 509, 511, 513, 69,
1226 510, 515, 69, 517, 514, 518, 520, 69, 69, 69,
1227 524, 519, 69, 521, 525, 527, 69, 523, 530, 528,
1228 529, 69, 522, 531, 69, 532, 534, 535, 542, 69,
1229 536, 538, 69, 520, 537, 539, 69, 524, 69, 1879,
1230 69, 525, 527, 69, 69, 530, 528, 529, 69, 540,
1231 531, 541, 532, 534, 69, 543, 69, 536, 69, 69,
1232 544, 537, 69, 69, 546, 69, 548, 550, 547, 549,
1233 551, 552, 1879, 69, 1879, 545, 540, 69, 541, 69,
1234
1235 69, 553, 543, 554, 69, 556, 555, 544, 557, 69,
1236 69, 69, 69, 548, 550, 69, 549, 551, 552, 559,
1237 69, 563, 545, 69, 560, 558, 564, 565, 553, 69,
1238 554, 69, 556, 555, 69, 557, 561, 562, 566, 567,
1239 571, 570, 569, 69, 69, 69, 559, 69, 563, 69,
1240 69, 568, 558, 564, 565, 69, 69, 572, 573, 69,
1241 69, 69, 69, 561, 562, 566, 567, 571, 570, 569,
1242 574, 576, 575, 578, 579, 577, 586, 69, 568, 580,
1243 69, 69, 581, 582, 572, 573, 69, 583, 591, 69,
1244 585, 69, 69, 69, 1879, 584, 137, 574, 576, 575,
1245
1246 578, 579, 577, 69, 587, 69, 580, 69, 69, 581,
1247 582, 69, 588, 69, 583, 589, 590, 585, 592, 69,
1248 593, 594, 584, 69, 600, 69, 1879, 605, 601, 69,
1249 69, 587, 602, 603, 604, 69, 69, 69, 69, 588,
1250 613, 616, 589, 590, 1879, 592, 1879, 593, 594, 595,
1251 69, 600, 617, 596, 69, 601, 597, 69, 69, 602,
1252 603, 604, 69, 598, 614, 69, 599, 613, 616, 618,
1253 1879, 69, 615, 69, 69, 619, 595, 621, 1879, 69,
1254 596, 625, 1879, 597, 1879, 1879, 620, 622, 624, 69,
1255 598, 614, 623, 599, 606, 607, 618, 608, 69, 615,
1256
1257 609, 69, 619, 69, 621, 610, 69, 630, 625, 69,
1258 69, 611, 612, 620, 622, 624, 69, 626, 628, 623,
1259 69, 606, 607, 627, 608, 69, 69, 609, 629, 631,
1260 69, 632, 610, 69, 630, 633, 634, 635, 611, 612,
1261 69, 69, 636, 637, 626, 628, 1879, 69, 638, 1879,
1262 627, 641, 639, 640, 642, 629, 631, 69, 632, 645,
1263 69, 1879, 633, 69, 643, 646, 644, 69, 69, 69,
1264 637, 69, 69, 69, 69, 638, 69, 647, 641, 639,
1265 640, 642, 648, 69, 69, 650, 69, 649, 651, 653,
1266 1879, 643, 646, 644, 652, 69, 69, 654, 655, 658,
1267
1268 659, 660, 69, 69, 647, 69, 69, 69, 1879, 656,
1269 69, 1879, 650, 69, 649, 651, 653, 657, 69, 665,
1270 670, 652, 69, 69, 654, 655, 658, 659, 660, 662,
1271 661, 663, 664, 69, 69, 667, 656, 69, 69, 666,
1272 669, 69, 69, 69, 657, 668, 665, 670, 69, 671,
1273 69, 673, 674, 69, 672, 675, 662, 661, 663, 664,
1274 677, 69, 667, 69, 69, 676, 666, 669, 69, 678,
1275 683, 679, 668, 680, 682, 681, 69, 685, 673, 69,
1276 684, 672, 686, 69, 69, 688, 69, 677, 69, 69,
1277 689, 69, 676, 69, 69, 691, 678, 683, 679, 687,
1278
1279 680, 69, 681, 690, 685, 69, 69, 684, 692, 703,
1280 694, 693, 69, 69, 69, 69, 69, 137, 69, 702,
1281 695, 720, 691, 69, 1879, 1879, 687, 69, 704, 736,
1282 690, 705, 69, 69, 1879, 692, 703, 694, 693, 1879,
1283 69, 706, 734, 708, 709, 69, 702, 695, 696, 710,
1284 697, 707, 69, 779, 698, 704, 699, 69, 705, 711,
1285 69, 700, 69, 69, 69, 69, 701, 712, 706, 69,
1286 708, 709, 69, 715, 713, 696, 710, 697, 707, 69,
1287 69, 698, 69, 699, 714, 716, 711, 719, 700, 718,
1288 725, 717, 881, 701, 712, 69, 69, 69, 69, 721,
1289
1290 715, 713, 69, 1879, 722, 69, 723, 726, 69, 727,
1291 730, 714, 716, 728, 719, 729, 718, 725, 717, 731,
1292 69, 735, 69, 737, 724, 69, 721, 733, 69, 69,
1293 732, 722, 69, 723, 726, 69, 727, 730, 69, 740,
1294 728, 69, 729, 69, 69, 738, 731, 69, 735, 739,
1295 737, 724, 741, 69, 733, 743, 742, 732, 744, 745,
1296 746, 751, 747, 69, 69, 1879, 1879, 749, 69, 69,
1297 69, 748, 738, 69, 69, 750, 739, 69, 69, 741,
1298 69, 753, 743, 742, 69, 744, 745, 746, 752, 747,
1299 69, 754, 69, 69, 749, 755, 69, 756, 748, 757,
1300
1301 760, 759, 750, 69, 1879, 758, 761, 763, 753, 765,
1302 767, 764, 766, 1879, 762, 752, 768, 69, 754, 69,
1303 69, 69, 755, 69, 756, 69, 757, 69, 759, 69,
1304 770, 69, 758, 761, 69, 69, 765, 767, 69, 766,
1305 769, 762, 69, 768, 771, 772, 773, 69, 774, 1879,
1306 777, 69, 69, 776, 775, 781, 1879, 770, 778, 782,
1307 780, 69, 1879, 1879, 69, 1879, 1879, 769, 1879, 69,
1308 69, 771, 772, 773, 69, 774, 69, 777, 69, 69,
1309 776, 775, 781, 69, 783, 778, 782, 780, 784, 786,
1310 785, 787, 788, 69, 791, 789, 69, 69, 793, 790,
1311
1312 794, 796, 1879, 69, 69, 792, 1879, 808, 1879, 1879,
1313 69, 783, 795, 69, 69, 784, 786, 785, 787, 788,
1314 69, 791, 789, 69, 69, 797, 790, 798, 69, 69,
1315 799, 69, 792, 69, 801, 802, 803, 805, 69, 795,
1316 69, 809, 807, 69, 69, 69, 804, 806, 69, 69,
1317 69, 1879, 797, 69, 798, 810, 811, 799, 812, 69,
1318 1879, 801, 802, 803, 805, 814, 813, 816, 815, 807,
1319 817, 69, 69, 804, 806, 69, 818, 69, 69, 69,
1320 69, 819, 810, 811, 820, 812, 821, 69, 69, 69,
1321 69, 822, 814, 813, 816, 815, 823, 817, 824, 69,
1322
1323 69, 825, 826, 818, 831, 69, 827, 828, 819, 1879,
1324 830, 69, 829, 821, 1879, 1879, 832, 69, 822, 69,
1325 69, 836, 69, 823, 69, 824, 69, 69, 825, 826,
1326 834, 831, 833, 827, 828, 837, 69, 830, 69, 829,
1327 69, 835, 838, 832, 69, 840, 839, 842, 836, 69,
1328 843, 841, 69, 69, 69, 69, 69, 834, 69, 833,
1329 845, 844, 837, 846, 847, 69, 69, 848, 835, 838,
1330 69, 69, 840, 839, 842, 69, 849, 843, 841, 850,
1331 1879, 69, 851, 853, 854, 69, 852, 845, 844, 857,
1332 846, 847, 69, 69, 848, 858, 855, 69, 859, 69,
1333
1334 856, 69, 861, 860, 862, 69, 850, 69, 69, 851,
1335 853, 854, 863, 852, 864, 865, 857, 69, 866, 1879,
1336 69, 868, 858, 870, 69, 859, 871, 69, 867, 861,
1337 860, 872, 69, 874, 869, 69, 69, 69, 69, 863,
1338 880, 864, 865, 69, 69, 866, 69, 69, 868, 873,
1339 870, 883, 882, 884, 885, 867, 69, 69, 1879, 1879,
1340 874, 869, 69, 69, 890, 69, 69, 880, 69, 886,
1341 889, 69, 69, 891, 69, 1879, 873, 875, 883, 882,
1342 884, 885, 876, 69, 877, 887, 878, 69, 879, 888,
1343 892, 890, 69, 893, 895, 69, 886, 889, 896, 894,
1344
1345 891, 69, 69, 69, 875, 897, 898, 899, 901, 876,
1346 69, 877, 902, 878, 900, 879, 69, 892, 903, 69,
1347 893, 69, 69, 905, 904, 896, 894, 907, 908, 69,
1348 69, 906, 69, 898, 899, 69, 910, 909, 69, 902,
1349 912, 900, 914, 911, 916, 69, 69, 69, 913, 69,
1350 69, 904, 69, 915, 907, 908, 917, 1879, 906, 69,
1351 924, 69, 69, 910, 909, 918, 69, 912, 69, 919,
1352 911, 916, 920, 69, 921, 913, 923, 69, 922, 927,
1353 69, 929, 928, 69, 69, 69, 69, 69, 69, 925,
1354 69, 69, 918, 930, 935, 926, 919, 69, 1879, 920,
1355
1356 931, 69, 69, 923, 933, 922, 927, 69, 929, 928,
1357 932, 934, 69, 69, 936, 938, 925, 937, 69, 69,
1358 930, 69, 926, 69, 939, 941, 942, 931, 940, 943,
1359 947, 933, 945, 69, 944, 946, 1879, 932, 934, 69,
1360 948, 936, 938, 69, 937, 69, 69, 69, 69, 949,
1361 69, 950, 941, 942, 69, 69, 943, 947, 69, 951,
1362 69, 944, 946, 69, 952, 953, 954, 948, 955, 957,
1363 1879, 956, 69, 69, 962, 958, 949, 69, 950, 69,
1364 960, 69, 69, 961, 963, 959, 951, 69, 69, 69,
1365 964, 952, 953, 954, 69, 955, 957, 69, 956, 69,
1366
1367 965, 962, 958, 966, 967, 69, 69, 960, 968, 970,
1368 961, 963, 959, 971, 69, 69, 969, 964, 69, 972,
1369 1879, 973, 974, 976, 1879, 69, 978, 965, 975, 1879,
1370 966, 967, 69, 979, 977, 968, 1879, 989, 69, 69,
1371 69, 69, 1879, 969, 69, 69, 972, 69, 973, 69,
1372 976, 69, 988, 978, 980, 975, 69, 984, 981, 982,
1373 979, 977, 985, 983, 987, 69, 986, 69, 69, 990,
1374 69, 1879, 69, 69, 991, 992, 996, 69, 993, 988,
1375 997, 994, 69, 69, 984, 69, 69, 998, 69, 985,
1376 69, 987, 995, 986, 69, 999, 990, 1000, 69, 1001,
1377
1378 1002, 991, 992, 996, 1003, 993, 69, 997, 994, 1010,
1379 69, 69, 1004, 1011, 998, 1005, 1006, 1014, 69, 995,
1380 1007, 69, 999, 69, 69, 1009, 1001, 1002, 1012, 69,
1381 69, 1003, 69, 1008, 1016, 69, 69, 1013, 1018, 1004,
1382 1011, 69, 1005, 1006, 69, 1015, 1019, 1007, 69, 1017,
1383 1020, 69, 1009, 1022, 69, 1012, 69, 1021, 1023, 1027,
1384 1008, 1016, 1028, 1024, 1013, 69, 1026, 1879, 1030, 69,
1385 69, 69, 1015, 69, 1025, 69, 1017, 69, 1031, 69,
1386 1022, 69, 1879, 69, 1021, 1023, 1027, 69, 69, 69,
1387 1024, 1029, 1032, 1026, 69, 1030, 1034, 1033, 69, 1035,
1388
1389 1036, 1025, 1037, 1039, 69, 1031, 1038, 1040, 69, 69,
1390 1041, 1044, 1046, 1042, 69, 69, 1048, 69, 1029, 1032,
1391 69, 69, 1045, 1034, 1033, 69, 1035, 1036, 1043, 1037,
1392 1039, 69, 69, 1038, 1040, 69, 69, 1041, 1044, 1047,
1393 1042, 1049, 1050, 69, 69, 1051, 69, 69, 1053, 1045,
1394 1052, 69, 1054, 69, 69, 1043, 1056, 1060, 1055, 1061,
1395 1879, 1879, 1062, 69, 1066, 1063, 1047, 1057, 1049, 69,
1396 1058, 69, 1051, 69, 1064, 1053, 69, 1052, 69, 1054,
1397 69, 69, 1059, 1056, 1065, 1055, 1061, 69, 69, 1062,
1398 1067, 69, 1063, 1068, 1057, 69, 1069, 1058, 1070, 1071,
1399
1400 1072, 1064, 69, 1073, 69, 69, 1074, 69, 69, 1059,
1401 1075, 1065, 1076, 1077, 1080, 1083, 69, 1067, 1879, 1879,
1402 1068, 69, 69, 1069, 1082, 1070, 1071, 69, 69, 1078,
1403 1073, 69, 1081, 1074, 69, 1079, 69, 69, 69, 1076,
1404 1077, 1080, 69, 1084, 1086, 1085, 69, 69, 1087, 1088,
1405 69, 1082, 69, 1090, 69, 1089, 1078, 69, 1091, 1081,
1406 1097, 1092, 1079, 1094, 1093, 69, 1879, 1099, 1098, 1879,
1407 1084, 1086, 1085, 1100, 69, 1087, 69, 69, 69, 69,
1408 1090, 1095, 1089, 1101, 69, 1091, 1096, 69, 1092, 69,
1409 1094, 1093, 69, 69, 1099, 1098, 1102, 1105, 1107, 1103,
1410
1411 1100, 69, 1104, 1106, 69, 1108, 1109, 1879, 1095, 1110,
1412 1101, 1112, 69, 1096, 1111, 69, 1113, 69, 69, 1114,
1413 69, 69, 69, 1102, 1105, 69, 1103, 69, 1115, 1104,
1414 1116, 69, 1108, 1109, 69, 1118, 1110, 69, 1112, 1117,
1415 1124, 1111, 1119, 1113, 1120, 1122, 1114, 1125, 1123, 69,
1416 69, 1127, 1126, 69, 1879, 1115, 69, 1116, 1121, 1128,
1417 1130, 69, 1118, 69, 69, 1134, 1117, 1124, 1136, 1119,
1418 69, 1120, 1122, 1131, 1129, 1123, 1135, 69, 69, 1126,
1419 69, 69, 69, 1132, 69, 1121, 1128, 69, 1137, 1133,
1420 69, 69, 1134, 1138, 1139, 1136, 69, 1879, 1143, 1140,
1421
1422 1131, 1129, 1141, 1135, 1142, 69, 1144, 69, 69, 69,
1423 1132, 1148, 1145, 1147, 1146, 1137, 1133, 69, 1149, 1879,
1424 69, 1139, 1150, 69, 69, 1143, 1140, 69, 69, 1141,
1425 1151, 1142, 69, 1144, 69, 69, 1152, 1153, 1148, 1145,
1426 1147, 1146, 1879, 1155, 1156, 69, 1154, 1879, 1158, 1150,
1427 69, 69, 69, 1157, 69, 1159, 1161, 1151, 1163, 69,
1428 1160, 1879, 69, 1152, 1153, 1164, 1162, 1879, 1166, 69,
1429 1879, 1156, 1879, 1154, 69, 1158, 69, 1169, 1167, 1165,
1430 1157, 1170, 69, 69, 69, 1163, 1168, 1160, 69, 69,
1431 69, 1173, 69, 1162, 69, 1166, 69, 1171, 69, 1174,
1432
1433 1175, 69, 1176, 69, 1169, 1167, 1165, 1180, 1170, 1178,
1434 1172, 69, 1179, 1168, 1177, 69, 1181, 69, 1173, 69,
1435 69, 1182, 1183, 69, 1171, 1185, 1174, 69, 1184, 1187,
1436 1186, 1188, 1189, 69, 69, 1191, 1178, 1172, 1192, 1179,
1437 69, 1177, 1190, 1181, 69, 1193, 1879, 1200, 69, 69,
1438 1879, 69, 1198, 1879, 69, 1184, 69, 1186, 1188, 69,
1439 69, 1202, 69, 69, 69, 1192, 1194, 1195, 1196, 1190,
1440 1199, 1204, 1210, 1197, 69, 1201, 69, 69, 69, 1198,
1441 1203, 69, 69, 1205, 69, 1206, 69, 1208, 1202, 1207,
1442 69, 1209, 69, 1194, 1195, 1196, 69, 1199, 69, 1210,
1443
1444 1197, 1211, 1201, 1212, 1213, 1214, 1220, 1203, 1215, 69,
1445 1205, 69, 1206, 1216, 1208, 69, 1207, 69, 1209, 1217,
1446 69, 1219, 1218, 69, 69, 1222, 1223, 1221, 69, 1224,
1447 1212, 1213, 1214, 69, 69, 1215, 1225, 69, 1227, 69,
1448 1216, 1879, 1226, 69, 1228, 69, 1217, 1229, 1219, 1218,
1449 1232, 69, 1222, 1230, 1221, 69, 69, 69, 1231, 69,
1450 69, 1233, 69, 69, 69, 1227, 1234, 1235, 69, 1226,
1451 1236, 1228, 1237, 1239, 1229, 1238, 1240, 1232, 69, 69,
1452 1230, 1243, 69, 1244, 69, 1231, 1247, 1246, 1233, 69,
1453 1241, 69, 69, 1234, 1235, 1242, 69, 1236, 1245, 1237,
1454
1455 1239, 1248, 1238, 69, 1250, 1249, 69, 1253, 69, 1252,
1456 1244, 69, 1254, 69, 1251, 69, 1256, 1241, 69, 1255,
1457 1258, 1257, 1242, 69, 69, 1245, 1260, 69, 1259, 1261,
1458 1879, 69, 69, 69, 1262, 69, 1252, 1263, 69, 1254,
1459 1264, 1251, 69, 1256, 69, 1265, 1255, 1266, 1257, 1267,
1460 1269, 69, 1275, 1268, 69, 1259, 1261, 69, 69, 1271,
1461 1270, 1262, 1879, 69, 1263, 1272, 1276, 69, 1273, 1274,
1462 69, 69, 69, 69, 1266, 69, 1267, 1269, 69, 69,
1463 1268, 69, 1277, 69, 69, 1278, 1271, 1270, 1280, 69,
1464 1279, 1281, 1272, 1276, 69, 1273, 1274, 1282, 69, 1284,
1465
1466 69, 1879, 1287, 1283, 1288, 1286, 1289, 1290, 1291, 1277,
1467 1285, 69, 1278, 69, 69, 1280, 69, 1279, 1281, 69,
1468 69, 69, 69, 1292, 1294, 69, 1284, 1879, 69, 1287,
1469 1283, 1288, 1286, 69, 1290, 1291, 1293, 1285, 1296, 1295,
1470 1297, 1298, 1879, 1299, 1300, 1879, 69, 1301, 69, 1879,
1471 69, 1294, 1307, 69, 69, 1305, 69, 1302, 1303, 69,
1472 69, 1304, 69, 1293, 69, 69, 1295, 1297, 1298, 69,
1473 1299, 1300, 69, 69, 1301, 1306, 69, 1309, 1310, 1307,
1474 1311, 1879, 1305, 1308, 1302, 1303, 1312, 69, 1304, 69,
1475 69, 1313, 1316, 1315, 1314, 1317, 69, 1330, 1324, 69,
1476
1477 1319, 1318, 1306, 69, 1309, 1310, 69, 1311, 69, 1320,
1478 1308, 69, 69, 1312, 1879, 1321, 1325, 1322, 1313, 69,
1479 1315, 1314, 1317, 69, 69, 69, 69, 1319, 1318, 69,
1480 1327, 69, 1323, 1326, 1334, 1331, 1320, 69, 69, 69,
1481 1328, 1329, 1321, 1325, 1322, 1333, 1332, 69, 69, 69,
1482 1879, 1336, 69, 1335, 69, 1337, 1341, 1327, 69, 1323,
1483 1326, 69, 1331, 1338, 1340, 69, 1339, 1328, 1329, 1342,
1484 69, 1345, 1333, 1332, 69, 69, 69, 1343, 1336, 1344,
1485 1335, 69, 1337, 1341, 69, 69, 1347, 1346, 1348, 69,
1486 1338, 1340, 1352, 1339, 69, 1349, 1342, 69, 1345, 69,
1487
1488 1350, 69, 1353, 1351, 1343, 69, 1344, 1354, 1355, 69,
1489 69, 1358, 69, 1347, 1346, 1348, 69, 1357, 1356, 1352,
1490 1360, 1364, 1349, 1359, 1361, 69, 69, 1350, 1362, 69,
1491 1351, 1365, 1363, 69, 1354, 69, 1366, 69, 1358, 69,
1492 69, 1367, 1368, 1369, 1357, 1356, 1370, 69, 69, 69,
1493 1359, 69, 69, 1371, 1372, 1362, 1374, 69, 1365, 1363,
1494 1373, 1375, 69, 69, 1376, 69, 1879, 69, 1367, 1368,
1495 1369, 1377, 1380, 1378, 1379, 69, 69, 69, 69, 1381,
1496 1371, 69, 69, 1374, 1382, 69, 1383, 1373, 1375, 1384,
1497 69, 1376, 1390, 69, 1387, 1385, 69, 69, 1377, 69,
1498
1499 1378, 1379, 69, 69, 1388, 1386, 1381, 69, 69, 69,
1500 1392, 1382, 69, 1383, 1389, 1393, 1384, 1391, 1398, 1390,
1501 69, 1387, 1385, 69, 1394, 1879, 1397, 1395, 1399, 1396,
1502 1402, 1388, 1386, 1401, 1400, 1403, 1404, 69, 69, 69,
1503 69, 1389, 1393, 69, 1391, 69, 69, 69, 1406, 1408,
1504 1405, 1394, 69, 1397, 1395, 69, 1396, 69, 69, 1407,
1505 1401, 1400, 69, 69, 1409, 1410, 1411, 1412, 69, 1414,
1506 1413, 1415, 1879, 69, 1416, 69, 69, 1405, 69, 1417,
1507 69, 1420, 1421, 1879, 1418, 1879, 1407, 1424, 69, 1879,
1508 69, 69, 1410, 1411, 69, 69, 69, 1413, 1415, 1419,
1509
1510 1422, 1416, 1428, 69, 1429, 1423, 1417, 1427, 69, 1421,
1511 69, 1418, 69, 69, 69, 1425, 1426, 1431, 1879, 69,
1512 69, 1433, 69, 1432, 69, 69, 1419, 1422, 1430, 1428,
1513 1435, 69, 1423, 1434, 1427, 1438, 69, 1436, 1437, 1440,
1514 69, 1441, 1425, 1426, 69, 69, 1439, 69, 1433, 69,
1515 1432, 69, 69, 69, 1442, 1430, 1443, 1435, 1444, 69,
1516 1434, 69, 1438, 1445, 1436, 1437, 1440, 1450, 1441, 1446,
1517 1447, 69, 69, 1439, 69, 1448, 1456, 69, 1449, 1879,
1518 1451, 1442, 1453, 1443, 1879, 1444, 1457, 1454, 1452, 69,
1519 1455, 69, 69, 69, 69, 1879, 1446, 1447, 69, 69,
1520
1521 1458, 1460, 1448, 1456, 69, 1449, 69, 1451, 69, 1453,
1522 69, 1459, 1461, 1457, 1454, 1452, 69, 1455, 69, 1462,
1523 1463, 1465, 69, 1464, 1466, 1471, 1467, 1458, 1460, 1468,
1524 1478, 1469, 1879, 69, 69, 1470, 69, 69, 1459, 69,
1525 1879, 1472, 1475, 1879, 1477, 1879, 69, 1463, 1465, 69,
1526 1464, 1466, 69, 1467, 69, 69, 1468, 1473, 1469, 69,
1527 1474, 69, 1470, 69, 69, 69, 69, 1476, 1472, 1475,
1528 1479, 1477, 1480, 69, 69, 1482, 1481, 1483, 1879, 1879,
1529 1484, 1487, 1485, 69, 1473, 1486, 1490, 1474, 1489, 1491,
1530 1492, 69, 1488, 1879, 1476, 69, 69, 1479, 69, 1480,
1531
1532 1493, 69, 1496, 1481, 1483, 69, 69, 1484, 69, 1485,
1533 69, 69, 1486, 69, 1494, 1489, 69, 1495, 1498, 1488,
1534 1497, 69, 69, 1499, 69, 69, 69, 1493, 69, 1496,
1535 1500, 1501, 1504, 69, 1502, 1879, 1505, 1503, 1879, 1507,
1536 1506, 1494, 1509, 69, 1495, 1498, 1508, 1497, 69, 69,
1537 69, 1510, 69, 1511, 1879, 1512, 1514, 1500, 69, 69,
1538 1515, 1502, 69, 1505, 1503, 69, 1507, 1506, 69, 69,
1539 69, 69, 1513, 1508, 1516, 69, 1517, 1518, 69, 1519,
1540 69, 69, 1512, 1514, 69, 1521, 69, 1515, 1522, 69,
1541 1520, 1523, 1529, 1524, 1525, 69, 69, 1526, 69, 1513,
1542
1543 1527, 1516, 1531, 1517, 1518, 69, 69, 69, 69, 69,
1544 1530, 1528, 1521, 1532, 69, 1522, 69, 1520, 1523, 1529,
1545 1524, 1525, 1533, 69, 1526, 1535, 1534, 1527, 1538, 69,
1546 1536, 1542, 69, 69, 69, 69, 1537, 1530, 1528, 1541,
1547 69, 1540, 1543, 69, 1539, 1546, 69, 1544, 69, 1533,
1548 69, 69, 1535, 1534, 69, 1538, 1550, 1536, 69, 1551,
1549 69, 1545, 1879, 1537, 1548, 69, 1541, 69, 1540, 1543,
1550 1547, 1539, 1546, 69, 1544, 69, 1549, 1552, 1555, 69,
1551 1553, 1554, 1879, 69, 69, 1560, 69, 1556, 1545, 69,
1552 69, 1548, 69, 1557, 69, 1559, 1561, 1547, 1558, 1564,
1553
1554 69, 1562, 69, 1549, 1552, 1555, 69, 1553, 1554, 69,
1555 1563, 69, 1560, 69, 1556, 1565, 1567, 1566, 1568, 69,
1556 1557, 1569, 1559, 69, 1570, 1558, 69, 1572, 1562, 69,
1557 1573, 1575, 1571, 1879, 1574, 69, 69, 1563, 69, 69,
1558 69, 1577, 1565, 1567, 1566, 69, 1576, 1578, 1569, 1585,
1559 1582, 69, 1580, 1581, 69, 1584, 1583, 69, 1575, 1571,
1560 69, 1574, 1579, 69, 69, 69, 1586, 69, 1577, 69,
1561 69, 69, 69, 1576, 1578, 1587, 69, 1582, 69, 1580,
1562 1581, 1588, 1584, 1583, 1589, 1593, 1590, 1591, 1879, 1579,
1563 1592, 1879, 1594, 69, 1879, 69, 1595, 1597, 1879, 1602,
1564
1565 1599, 1598, 1587, 1596, 69, 1601, 69, 1879, 69, 69,
1566 1600, 1589, 69, 69, 69, 69, 69, 1592, 69, 1594,
1567 69, 69, 69, 1595, 1597, 69, 1602, 1599, 1598, 69,
1568 1596, 1603, 1601, 1604, 1605, 1879, 1606, 1600, 1607, 1608,
1569 1611, 1609, 1610, 1615, 1879, 69, 1612, 69, 69, 1614,
1570 69, 69, 69, 1613, 69, 1616, 69, 1617, 1603, 1618,
1571 1604, 1605, 69, 1606, 1619, 1607, 1608, 69, 1609, 1610,
1572 69, 69, 69, 1612, 69, 1620, 1614, 69, 69, 69,
1573 1613, 1621, 1616, 1622, 1617, 1623, 1618, 1624, 1628, 1625,
1574 1879, 1619, 1626, 1627, 69, 69, 69, 1629, 69, 1630,
1575
1576 1631, 1633, 1620, 1634, 1879, 1639, 1635, 1879, 1621, 69,
1577 1622, 69, 1623, 1647, 69, 69, 1625, 69, 69, 1626,
1578 1627, 1632, 1638, 1640, 69, 1879, 69, 1631, 1646, 69,
1579 69, 1636, 69, 1635, 69, 1637, 69, 1641, 1642, 1643,
1580 69, 69, 1644, 69, 1648, 69, 1645, 69, 1632, 1638,
1581 1640, 69, 69, 69, 1651, 1646, 1649, 1879, 1652, 1650,
1582 1654, 69, 69, 1653, 1641, 1642, 1643, 69, 1879, 1644,
1583 1655, 1648, 1660, 1645, 69, 69, 1657, 69, 1656, 69,
1584 69, 1651, 69, 1649, 69, 1652, 1650, 1654, 1658, 1659,
1585 1653, 1662, 1663, 1661, 69, 69, 69, 1655, 1664, 69,
1586
1587 1665, 69, 1667, 1657, 1666, 1656, 1668, 1669, 1670, 1672,
1588 1671, 1879, 1682, 69, 69, 1658, 1659, 69, 1662, 1663,
1589 1661, 69, 69, 69, 69, 69, 69, 1665, 69, 1667,
1590 1673, 1666, 69, 69, 1669, 1670, 1672, 1671, 1674, 1879,
1591 1675, 1676, 1677, 69, 1678, 1680, 1681, 1679, 1683, 1685,
1592 1686, 1879, 1688, 69, 69, 1684, 1879, 1673, 69, 69,
1593 69, 1691, 1692, 69, 69, 1674, 69, 1675, 1676, 1677,
1594 69, 1678, 1680, 1681, 1679, 1683, 1685, 69, 1687, 69,
1595 69, 69, 1684, 1689, 1690, 69, 1693, 1694, 69, 1692,
1596 1696, 69, 1695, 1697, 1698, 69, 69, 1699, 69, 1700,
1597
1598 69, 1701, 1702, 1703, 69, 1687, 1704, 69, 1706, 69,
1599 1689, 1690, 69, 1693, 1694, 69, 1705, 1696, 1707, 1695,
1600 1697, 1698, 1710, 69, 69, 69, 1700, 1708, 69, 69,
1601 1703, 1709, 1711, 69, 1712, 1706, 69, 1713, 1715, 1714,
1602 69, 1717, 69, 1705, 69, 1707, 69, 1716, 1718, 69,
1603 1719, 1721, 69, 1723, 1708, 1720, 1726, 69, 1709, 69,
1604 1727, 1712, 1722, 69, 1713, 69, 1714, 69, 1717, 1729,
1605 69, 69, 1879, 69, 1716, 1718, 1731, 1719, 1721, 69,
1606 1724, 1725, 1720, 69, 69, 1728, 1730, 69, 1732, 1722,
1607 69, 69, 1733, 69, 1734, 1735, 1729, 1736, 69, 69,
1608
1609 1737, 1738, 1740, 1731, 1741, 1739, 1879, 1724, 1725, 1744,
1610 1879, 1742, 1728, 1730, 1879, 69, 1743, 69, 69, 69,
1611 69, 69, 1735, 1745, 69, 1748, 69, 1737, 69, 1740,
1612 1746, 69, 1739, 69, 1747, 69, 69, 69, 1742, 1749,
1613 1750, 69, 1751, 1743, 1752, 69, 1756, 69, 1753, 1754,
1614 1745, 69, 1748, 1757, 69, 69, 1755, 1746, 69, 69,
1615 69, 1747, 69, 1758, 1759, 1760, 1749, 1750, 69, 1751,
1616 1761, 1752, 1762, 1756, 1763, 1753, 1754, 1765, 1767, 1770,
1617 1757, 1764, 1768, 1755, 1766, 1879, 1769, 69, 69, 1771,
1618 69, 69, 1760, 1772, 69, 69, 69, 69, 1774, 1762,
1619
1620 69, 69, 1788, 1879, 69, 1767, 69, 1776, 1764, 1768,
1621 69, 1766, 69, 1769, 1777, 69, 69, 1773, 1775, 69,
1622 1772, 1779, 1778, 1780, 69, 1774, 1781, 1782, 1783, 69,
1623 69, 1784, 1786, 69, 1776, 1785, 69, 1787, 1789, 1879,
1624 1879, 1777, 1879, 69, 1773, 1775, 1790, 69, 69, 1778,
1625 69, 69, 1791, 69, 69, 1783, 1793, 69, 1784, 69,
1626 69, 69, 1785, 1792, 1787, 1789, 1794, 69, 69, 1795,
1627 1797, 1796, 69, 1790, 1798, 1804, 69, 1799, 1800, 1791,
1628 1801, 1806, 1805, 1793, 69, 69, 69, 69, 69, 69,
1629 1792, 69, 1802, 1794, 69, 1807, 1795, 1797, 1796, 1803,
1630
1631 69, 1798, 69, 1808, 1799, 1800, 1809, 1801, 69, 1805,
1632 1810, 69, 69, 1812, 1816, 1811, 1813, 1817, 1879, 1802,
1633 1814, 1879, 69, 1815, 1819, 69, 1803, 69, 69, 69,
1634 1808, 69, 69, 1809, 1879, 1879, 1818, 1810, 69, 1821,
1635 1826, 1823, 1811, 1813, 69, 69, 1820, 1814, 69, 69,
1636 1815, 1819, 69, 1822, 69, 69, 1824, 1825, 1834, 1827,
1637 1830, 69, 69, 1818, 1828, 69, 1821, 1826, 1823, 1829,
1638 69, 1831, 69, 1820, 1835, 1832, 1839, 1833, 1879, 1836,
1639 1822, 69, 69, 1824, 1825, 69, 1827, 1830, 1842, 69,
1640 1879, 1828, 1837, 69, 1841, 69, 1829, 69, 1831, 69,
1641
1642 69, 69, 1832, 1838, 1833, 1840, 1836, 69, 69, 1843,
1643 69, 69, 1844, 69, 1845, 1842, 1846, 69, 1847, 1837,
1644 69, 1841, 1849, 1848, 1879, 1850, 1852, 1853, 69, 1854,
1645 1838, 69, 1840, 1851, 1879, 69, 1843, 1855, 1856, 1844,
1646 69, 1845, 69, 1846, 1858, 1847, 69, 1864, 69, 1849,
1647 1848, 69, 1850, 1852, 1853, 69, 69, 69, 69, 1857,
1648 1851, 1859, 1860, 1861, 1855, 1856, 69, 69, 1862, 69,
1649 1863, 1858, 1865, 69, 1864, 1866, 69, 1867, 69, 1868,
1650 69, 1869, 1870, 69, 69, 69, 1857, 1871, 1859, 1860,
1651 1861, 1872, 1875, 1873, 1874, 1862, 1877, 1863, 1878, 1865,
1652
1653 69, 69, 1866, 69, 1867, 1876, 69, 1879, 1869, 69,
1654 1879, 69, 1879, 69, 69, 69, 69, 1879, 1872, 1875,
1655 1873, 1874, 1879, 69, 1879, 69, 1879, 1879, 1879, 1879,
1656 1879, 1879, 1876, 41, 41, 41, 41, 41, 41, 41,
1657 46, 46, 46, 46, 46, 46, 46, 51, 51, 51,
1658 51, 51, 51, 51, 57, 57, 57, 57, 57, 57,
1659 57, 62, 62, 62, 62, 62, 62, 62, 72, 72,
1660 1879, 72, 72, 72, 72, 127, 127, 1879, 1879, 1879,
1661 127, 127, 129, 129, 1879, 1879, 129, 1879, 129, 131,
1662 1879, 1879, 1879, 1879, 1879, 131, 134, 134, 1879, 1879,
1663
1664 1879, 134, 134, 136, 1879, 1879, 1879, 1879, 1879, 136,
1665 138, 138, 1879, 138, 138, 138, 138, 73, 73, 1879,
1666 73, 73, 73, 73, 13, 1879, 1879, 1879, 1879, 1879,
1667 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879,
1668 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879,
1669 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879,
1670 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879,
1671 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879,
1672 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879
1108 64, 65, 77, 87, 69, 74, 69, 98, 69, 66,
1109 86, 75, 76, 131, 78, 66, 131, 88, 154, 69,
1110 139, 79, 112, 69, 90, 97, 142, 67, 80, 77,
1111 87, 89, 91, 67, 98, 69, 66, 129, 129, 139,
1112 69, 78, 66, 69, 88, 154, 914, 69, 79, 112,
1113 69, 90, 97, 142, 99, 80, 81, 137, 89, 91,
1114
1115 82, 92, 100, 83, 93, 84, 85, 135, 101, 106,
1116 134, 94, 102, 95, 69, 69, 170, 121, 69, 122,
1117 69, 99, 103, 81, 69, 196, 104, 82, 92, 100,
1118 83, 93, 84, 85, 123, 101, 106, 113, 94, 102,
1119 95, 114, 105, 69, 121, 117, 122, 69, 69, 103,
1120 144, 115, 124, 104, 116, 118, 69, 125, 132, 119,
1121 120, 123, 130, 69, 113, 69, 69, 69, 114, 105,
1122 107, 143, 117, 69, 108, 136, 136, 144, 115, 124,
1123 109, 116, 118, 110, 125, 126, 119, 120, 139, 127,
1124 111, 149, 69, 128, 137, 69, 135, 107, 143, 134,
1125
1126 133, 108, 133, 133, 69, 133, 132, 109, 145, 130,
1127 110, 69, 126, 69, 211, 69, 127, 111, 149, 73,
1128 128, 73, 73, 138, 73, 138, 138, 68, 138, 68,
1129 68, 73, 68, 73, 73, 145, 73, 68, 146, 148,
1130 150, 73, 155, 152, 153, 69, 151, 158, 69, 161,
1131 69, 147, 69, 1955, 163, 156, 141, 159, 69, 1955,
1132 69, 69, 69, 160, 69, 146, 148, 150, 74, 155,
1133 152, 153, 157, 151, 158, 164, 161, 69, 147, 69,
1134 162, 163, 165, 1955, 159, 1955, 69, 1955, 166, 69,
1135 160, 167, 171, 176, 172, 69, 69, 69, 177, 157,
1136
1137 69, 178, 164, 1955, 168, 169, 174, 162, 184, 165,
1138 175, 69, 69, 180, 173, 166, 69, 69, 167, 171,
1139 176, 172, 179, 181, 69, 177, 1955, 69, 178, 183,
1140 69, 168, 169, 174, 182, 184, 69, 175, 186, 185,
1141 180, 173, 69, 69, 190, 189, 1955, 69, 69, 179,
1142 181, 187, 69, 191, 192, 188, 183, 193, 1955, 194,
1143 69, 182, 69, 303, 197, 186, 185, 69, 69, 69,
1144 69, 190, 189, 69, 195, 222, 198, 201, 187, 69,
1145 191, 192, 188, 69, 193, 200, 194, 202, 69, 207,
1146 203, 197, 69, 69, 69, 206, 199, 205, 69, 208,
1147
1148 1955, 195, 69, 198, 201, 1955, 69, 1955, 1955, 209,
1149 69, 204, 200, 1955, 202, 69, 207, 203, 1955, 69,
1150 340, 69, 206, 199, 205, 133, 208, 133, 133, 138,
1151 133, 138, 138, 139, 138, 210, 209, 73, 204, 73,
1152 73, 212, 73, 214, 213, 216, 215, 69, 217, 218,
1153 1955, 69, 69, 69, 219, 220, 232, 69, 69, 221,
1154 402, 403, 210, 69, 230, 233, 69, 223, 212, 1955,
1155 214, 213, 216, 215, 141, 217, 231, 69, 69, 235,
1156 69, 219, 220, 232, 69, 69, 221, 69, 224, 69,
1157 69, 230, 233, 234, 1955, 69, 236, 69, 237, 1955,
1158
1159 238, 241, 69, 231, 239, 1955, 235, 240, 242, 249,
1160 69, 69, 69, 1955, 243, 224, 225, 247, 69, 69,
1161 234, 226, 1955, 236, 69, 237, 227, 238, 241, 1955,
1162 69, 239, 228, 229, 240, 242, 69, 244, 248, 69,
1163 69, 243, 245, 225, 247, 250, 253, 251, 226, 69,
1164 256, 1955, 254, 227, 1955, 255, 246, 252, 257, 228,
1165 229, 69, 258, 69, 244, 248, 259, 260, 262, 245,
1166 69, 69, 250, 266, 261, 264, 267, 69, 69, 254,
1167 69, 69, 255, 246, 252, 257, 268, 69, 69, 69,
1168 69, 263, 69, 69, 260, 262, 69, 69, 69, 265,
1169
1170 266, 261, 264, 267, 69, 269, 271, 270, 69, 275,
1171 272, 273, 274, 268, 69, 69, 276, 69, 263, 277,
1172 69, 278, 279, 69, 282, 283, 265, 280, 69, 285,
1173 281, 1955, 269, 271, 270, 69, 1955, 272, 273, 274,
1174 69, 69, 286, 276, 69, 69, 277, 284, 278, 289,
1175 69, 282, 291, 69, 280, 290, 69, 281, 288, 287,
1176 69, 292, 69, 69, 139, 294, 293, 69, 295, 286,
1177 297, 69, 296, 301, 284, 298, 289, 300, 1955, 291,
1178 69, 69, 290, 69, 302, 288, 287, 299, 69, 69,
1179 304, 311, 69, 293, 69, 295, 69, 297, 69, 296,
1180
1181 301, 69, 298, 305, 300, 309, 313, 306, 307, 308,
1182 69, 302, 312, 310, 299, 314, 69, 304, 69, 316,
1183 69, 315, 69, 1955, 1955, 69, 1955, 322, 69, 69,
1184 305, 69, 309, 69, 306, 307, 308, 69, 317, 312,
1185 310, 69, 314, 69, 318, 69, 319, 320, 315, 321,
1186 69, 69, 69, 69, 322, 323, 324, 325, 326, 328,
1187 1955, 69, 327, 1955, 69, 317, 69, 69, 329, 1955,
1188 331, 318, 330, 319, 320, 69, 321, 69, 332, 69,
1189 334, 333, 323, 324, 325, 326, 337, 69, 69, 327,
1190 69, 341, 69, 345, 335, 329, 336, 331, 69, 330,
1191
1192 69, 69, 338, 339, 346, 332, 342, 334, 333, 343,
1193 69, 69, 344, 337, 347, 69, 69, 349, 341, 352,
1194 345, 335, 69, 336, 69, 348, 350, 69, 351, 338,
1195 339, 346, 354, 342, 69, 353, 343, 356, 69, 344,
1196 1955, 69, 69, 69, 349, 1955, 352, 69, 359, 355,
1197 69, 365, 348, 350, 363, 351, 69, 364, 357, 69,
1198 358, 69, 353, 69, 356, 1955, 360, 368, 369, 361,
1199 1955, 362, 69, 69, 69, 359, 355, 69, 365, 370,
1200 69, 363, 69, 366, 371, 357, 373, 358, 69, 381,
1201 1955, 367, 69, 360, 368, 369, 361, 69, 362, 69,
1202
1203 372, 69, 389, 382, 386, 383, 370, 387, 69, 384,
1204 366, 371, 69, 373, 1955, 1955, 381, 385, 367, 69,
1205 390, 69, 1955, 139, 69, 388, 1955, 372, 374, 375,
1206 382, 386, 69, 69, 387, 393, 69, 392, 376, 391,
1207 377, 378, 379, 395, 385, 380, 69, 390, 394, 69,
1208 398, 396, 388, 69, 399, 374, 375, 69, 69, 400,
1209 69, 397, 393, 69, 392, 376, 391, 377, 378, 379,
1210 69, 401, 380, 404, 69, 394, 69, 398, 396, 405,
1211 69, 406, 407, 1955, 409, 69, 400, 408, 397, 412,
1212 69, 416, 69, 69, 410, 69, 411, 413, 401, 417,
1213
1214 404, 415, 69, 419, 1955, 69, 405, 69, 406, 407,
1215 414, 409, 69, 69, 408, 69, 412, 69, 416, 69,
1216 418, 410, 69, 411, 413, 420, 417, 421, 415, 423,
1217 422, 69, 424, 425, 69, 426, 428, 414, 69, 427,
1218 1955, 429, 1955, 431, 430, 448, 433, 418, 69, 69,
1219 69, 69, 420, 69, 421, 69, 423, 422, 69, 424,
1220 425, 69, 426, 432, 69, 69, 427, 69, 429, 69,
1221 431, 430, 434, 433, 435, 436, 69, 437, 69, 438,
1222 439, 69, 441, 1955, 442, 444, 69, 445, 1955, 440,
1223 432, 69, 452, 1955, 69, 443, 69, 450, 69, 434,
1224
1225 69, 435, 436, 69, 437, 69, 438, 439, 69, 441,
1226 69, 442, 444, 446, 445, 447, 440, 449, 451, 69,
1227 69, 453, 443, 69, 450, 1955, 455, 456, 69, 458,
1228 1955, 69, 457, 69, 1955, 69, 459, 69, 460, 461,
1229 446, 69, 447, 454, 449, 451, 1955, 69, 487, 69,
1230 468, 1955, 69, 455, 456, 69, 458, 69, 69, 457,
1231 469, 470, 1955, 459, 471, 460, 461, 473, 69, 69,
1232 454, 462, 69, 472, 474, 487, 463, 468, 464, 1955,
1233 475, 69, 476, 1955, 69, 477, 465, 469, 470, 466,
1234 478, 69, 480, 479, 473, 69, 467, 69, 462, 1955,
1235
1236 472, 474, 69, 463, 69, 464, 69, 475, 69, 476,
1237 481, 69, 477, 465, 483, 484, 466, 478, 69, 480,
1238 479, 482, 485, 467, 488, 489, 69, 486, 490, 1955,
1239 69, 491, 492, 69, 493, 494, 69, 481, 496, 69,
1240 69, 483, 484, 69, 498, 495, 69, 139, 482, 485,
1241 497, 488, 499, 69, 486, 490, 69, 501, 491, 492,
1242 69, 493, 69, 500, 69, 69, 507, 502, 69, 69,
1243 503, 498, 495, 506, 508, 509, 504, 497, 69, 499,
1244 505, 69, 510, 511, 501, 69, 512, 69, 515, 513,
1245 500, 514, 517, 69, 502, 69, 69, 503, 516, 518,
1246
1247 506, 69, 519, 521, 520, 522, 69, 69, 1955, 69,
1248 69, 69, 532, 69, 528, 515, 513, 69, 514, 527,
1249 523, 69, 69, 69, 69, 516, 518, 69, 69, 519,
1250 524, 520, 522, 69, 69, 525, 529, 530, 531, 526,
1251 69, 528, 533, 69, 534, 69, 527, 523, 537, 1955,
1252 535, 69, 538, 539, 69, 543, 540, 524, 1955, 69,
1253 69, 544, 525, 529, 530, 531, 526, 69, 69, 533,
1254 69, 534, 536, 69, 69, 537, 541, 535, 69, 538,
1255 539, 542, 69, 540, 547, 545, 69, 69, 544, 546,
1256 550, 548, 549, 551, 552, 554, 69, 555, 1955, 536,
1257
1258 69, 556, 553, 541, 559, 69, 69, 1955, 542, 69,
1259 557, 547, 545, 69, 1955, 69, 546, 69, 548, 549,
1260 551, 69, 554, 561, 69, 69, 69, 558, 69, 553,
1261 560, 563, 564, 569, 566, 69, 565, 557, 562, 568,
1262 570, 69, 69, 567, 571, 573, 1955, 69, 69, 69,
1263 561, 69, 69, 69, 558, 572, 574, 560, 563, 69,
1264 569, 566, 69, 69, 69, 562, 568, 570, 69, 575,
1265 567, 571, 573, 582, 69, 576, 578, 577, 579, 580,
1266 1955, 69, 572, 574, 69, 69, 581, 69, 69, 583,
1267 586, 584, 585, 590, 69, 1955, 575, 587, 1955, 69,
1268
1269 582, 69, 576, 578, 577, 69, 580, 69, 588, 69,
1270 589, 591, 69, 581, 69, 69, 583, 586, 584, 585,
1271 590, 592, 69, 593, 587, 594, 595, 597, 1955, 596,
1272 69, 69, 601, 598, 69, 588, 599, 589, 591, 606,
1273 69, 600, 1955, 69, 605, 69, 69, 69, 592, 603,
1274 593, 69, 594, 595, 597, 69, 596, 604, 139, 601,
1275 598, 602, 69, 599, 608, 69, 607, 69, 600, 610,
1276 69, 605, 611, 69, 609, 69, 603, 613, 69, 612,
1277 614, 1955, 69, 620, 604, 626, 69, 69, 602, 69,
1278 621, 608, 623, 607, 1955, 69, 610, 625, 69, 634,
1279
1280 69, 609, 622, 69, 613, 624, 612, 614, 615, 635,
1281 620, 1955, 616, 69, 637, 617, 69, 621, 69, 623,
1282 69, 69, 618, 69, 625, 619, 634, 1955, 69, 622,
1283 69, 636, 624, 69, 638, 615, 635, 657, 69, 616,
1284 639, 637, 617, 1955, 1955, 1955, 640, 1955, 642, 618,
1285 641, 646, 619, 627, 628, 1955, 629, 1955, 636, 630,
1286 69, 69, 69, 643, 631, 644, 645, 639, 69, 1955,
1287 632, 633, 69, 640, 69, 642, 69, 641, 646, 69,
1288 627, 628, 651, 629, 650, 69, 630, 647, 69, 69,
1289 643, 631, 644, 645, 648, 69, 649, 632, 633, 656,
1290
1291 652, 69, 653, 69, 69, 658, 655, 654, 69, 651,
1292 1955, 650, 69, 659, 647, 69, 69, 660, 1955, 667,
1293 661, 648, 662, 649, 1955, 670, 69, 652, 69, 653,
1294 664, 1955, 668, 655, 654, 665, 69, 69, 69, 69,
1295 659, 69, 663, 672, 660, 666, 69, 661, 669, 662,
1296 69, 69, 69, 69, 676, 69, 69, 664, 671, 668,
1297 673, 69, 665, 675, 674, 677, 69, 69, 678, 663,
1298 672, 69, 666, 681, 679, 669, 69, 69, 69, 69,
1299 69, 676, 680, 682, 1955, 671, 695, 673, 69, 684,
1300 675, 674, 677, 683, 687, 678, 69, 685, 69, 69,
1301
1302 681, 679, 69, 688, 686, 69, 689, 691, 692, 680,
1303 682, 69, 69, 69, 690, 69, 684, 694, 698, 693,
1304 683, 687, 69, 69, 685, 69, 69, 697, 699, 696,
1305 688, 686, 69, 689, 691, 692, 69, 700, 69, 701,
1306 69, 690, 702, 703, 694, 704, 693, 69, 705, 69,
1307 706, 69, 707, 708, 697, 710, 696, 69, 712, 69,
1308 69, 711, 69, 709, 700, 69, 701, 714, 69, 702,
1309 703, 715, 704, 713, 69, 705, 69, 69, 716, 707,
1310 708, 69, 69, 69, 717, 69, 69, 727, 711, 719,
1311 709, 1955, 69, 718, 139, 728, 69, 720, 715, 733,
1312
1313 713, 69, 69, 729, 69, 716, 1955, 730, 1955, 69,
1314 734, 717, 731, 69, 727, 69, 719, 732, 69, 735,
1315 718, 69, 728, 69, 720, 721, 733, 722, 736, 69,
1316 729, 723, 69, 724, 730, 69, 737, 734, 725, 731,
1317 738, 742, 740, 726, 732, 745, 735, 69, 69, 69,
1318 739, 69, 721, 741, 722, 736, 746, 744, 723, 743,
1319 724, 1955, 69, 737, 69, 725, 69, 738, 742, 740,
1320 726, 753, 69, 752, 755, 757, 69, 739, 69, 761,
1321 741, 756, 754, 69, 744, 763, 743, 747, 69, 69,
1322 759, 758, 748, 69, 749, 69, 760, 69, 753, 762,
1323
1324 752, 755, 757, 69, 69, 750, 69, 69, 756, 754,
1325 69, 764, 751, 69, 747, 766, 69, 759, 758, 748,
1326 765, 749, 69, 760, 767, 769, 762, 768, 69, 69,
1327 770, 1955, 750, 69, 771, 69, 773, 774, 764, 751,
1328 772, 779, 766, 775, 69, 69, 1955, 765, 69, 69,
1329 69, 1955, 769, 776, 768, 69, 778, 770, 69, 69,
1330 780, 771, 777, 773, 774, 782, 69, 772, 69, 69,
1331 775, 783, 69, 781, 69, 784, 786, 69, 787, 785,
1332 776, 788, 69, 778, 795, 1955, 791, 780, 790, 777,
1333 792, 1955, 782, 69, 69, 789, 800, 69, 783, 69,
1334
1335 781, 69, 784, 786, 69, 787, 785, 793, 69, 69,
1336 794, 795, 69, 796, 797, 790, 798, 69, 799, 808,
1337 69, 69, 789, 800, 801, 69, 69, 802, 69, 805,
1338 69, 803, 1955, 69, 793, 804, 806, 794, 69, 807,
1339 796, 797, 1955, 798, 811, 799, 69, 69, 1955, 809,
1340 69, 801, 810, 69, 802, 812, 805, 69, 803, 816,
1341 69, 69, 804, 806, 69, 813, 807, 69, 69, 815,
1342 814, 811, 817, 69, 820, 819, 809, 69, 818, 810,
1343 822, 823, 812, 69, 69, 824, 826, 821, 1955, 1955,
1344 69, 1955, 813, 1955, 69, 69, 815, 814, 69, 817,
1345
1346 69, 820, 819, 69, 829, 818, 825, 822, 828, 827,
1347 832, 831, 69, 69, 821, 833, 69, 69, 69, 69,
1348 69, 69, 834, 69, 69, 838, 835, 836, 69, 837,
1349 839, 829, 69, 825, 69, 828, 827, 832, 831, 840,
1350 69, 69, 833, 1955, 841, 842, 843, 844, 848, 834,
1351 1955, 846, 838, 835, 836, 845, 837, 847, 851, 69,
1352 69, 69, 854, 69, 849, 69, 69, 69, 69, 1955,
1353 69, 841, 842, 843, 844, 848, 69, 69, 846, 850,
1354 852, 853, 845, 69, 847, 69, 856, 69, 855, 854,
1355 69, 849, 857, 69, 860, 69, 858, 859, 863, 862,
1356
1357 861, 1955, 1955, 864, 881, 1955, 850, 852, 853, 69,
1358 69, 69, 69, 856, 69, 855, 69, 69, 69, 857,
1359 69, 860, 865, 858, 859, 863, 862, 861, 866, 867,
1360 864, 869, 868, 870, 871, 69, 69, 872, 873, 874,
1361 1955, 69, 875, 69, 69, 876, 69, 69, 69, 865,
1362 69, 878, 69, 69, 69, 866, 867, 69, 869, 868,
1363 870, 871, 877, 69, 872, 873, 874, 879, 880, 875,
1364 884, 882, 876, 883, 69, 886, 887, 69, 878, 885,
1365 888, 1955, 891, 69, 69, 889, 69, 893, 894, 877,
1366 69, 890, 69, 69, 879, 880, 892, 884, 882, 895,
1367
1368 883, 69, 886, 897, 69, 69, 885, 69, 69, 891,
1369 69, 896, 889, 898, 893, 899, 900, 901, 890, 69,
1370 903, 69, 904, 892, 902, 69, 895, 905, 906, 69,
1371 897, 1955, 1955, 69, 69, 69, 907, 69, 896, 69,
1372 898, 69, 899, 900, 901, 915, 1955, 903, 1955, 919,
1373 69, 902, 913, 69, 916, 906, 917, 918, 69, 69,
1374 1955, 69, 929, 907, 908, 931, 69, 69, 69, 909,
1375 920, 910, 915, 911, 921, 912, 919, 69, 69, 913,
1376 922, 916, 69, 917, 918, 924, 923, 926, 927, 69,
1377 925, 908, 69, 69, 69, 932, 909, 69, 910, 930,
1378
1379 911, 69, 912, 69, 69, 69, 928, 922, 69, 933,
1380 934, 69, 924, 923, 926, 927, 935, 925, 69, 69,
1381 936, 937, 932, 938, 939, 940, 930, 69, 941, 1955,
1382 69, 69, 942, 928, 943, 69, 933, 934, 944, 949,
1383 945, 947, 950, 69, 948, 69, 952, 936, 69, 946,
1384 938, 939, 69, 69, 69, 941, 951, 953, 69, 942,
1385 69, 943, 69, 955, 69, 944, 69, 945, 947, 956,
1386 69, 948, 954, 69, 957, 69, 946, 69, 69, 69,
1387 69, 69, 958, 951, 953, 960, 963, 959, 964, 69,
1388 955, 69, 961, 69, 966, 965, 69, 971, 962, 954,
1389
1390 967, 957, 969, 69, 69, 69, 968, 69, 69, 958,
1391 970, 69, 973, 963, 959, 964, 69, 977, 979, 961,
1392 69, 966, 965, 974, 69, 962, 972, 967, 978, 969,
1393 69, 69, 69, 968, 69, 69, 975, 970, 980, 973,
1394 976, 981, 1955, 69, 977, 979, 982, 69, 983, 984,
1395 974, 69, 986, 972, 988, 978, 987, 69, 985, 69,
1396 992, 69, 1955, 69, 69, 980, 990, 69, 69, 69,
1397 989, 991, 69, 982, 995, 983, 984, 69, 69, 986,
1398 69, 988, 994, 987, 993, 985, 69, 992, 996, 69,
1399 998, 1000, 1002, 990, 997, 69, 999, 989, 991, 69,
1400
1401 69, 995, 69, 1004, 1006, 1001, 1007, 1008, 1003, 994,
1402 69, 993, 69, 69, 69, 996, 69, 998, 1000, 1002,
1403 69, 997, 1005, 999, 69, 1009, 69, 1010, 69, 1011,
1404 1004, 1006, 1001, 1013, 1012, 1003, 1014, 69, 69, 1016,
1405 1017, 1019, 69, 1021, 1018, 1020, 1015, 69, 1027, 1005,
1406 69, 69, 1009, 69, 1010, 1955, 69, 69, 69, 69,
1407 1013, 1012, 1026, 1014, 1024, 69, 1016, 1022, 1023, 1025,
1408 1021, 69, 69, 1015, 1028, 69, 69, 69, 1029, 69,
1409 1030, 1033, 69, 69, 1031, 1032, 69, 69, 69, 1026,
1410 1034, 1024, 69, 1035, 1022, 1023, 1025, 1036, 69, 1037,
1411
1412 1038, 1028, 69, 1039, 1041, 1029, 1040, 1030, 1033, 1043,
1413 1042, 1031, 1032, 1048, 69, 1047, 1050, 1034, 69, 69,
1414 1035, 69, 69, 69, 1036, 69, 1037, 69, 69, 69,
1415 1039, 1041, 1053, 1040, 1044, 1049, 1043, 1042, 1045, 69,
1416 69, 1051, 1047, 1050, 1054, 1052, 1057, 1055, 1955, 1056,
1417 69, 1046, 69, 69, 1058, 1059, 1060, 69, 1063, 69,
1418 1061, 1044, 1049, 69, 1062, 1045, 1065, 69, 1051, 69,
1419 69, 1054, 1052, 1066, 1055, 69, 1056, 69, 1046, 69,
1420 1067, 69, 69, 1060, 69, 1063, 1064, 1061, 69, 1068,
1421 69, 1062, 69, 1065, 1069, 69, 1070, 1071, 1072, 1955,
1422
1423 1066, 69, 69, 1073, 1074, 1075, 1076, 1067, 1077, 1955,
1424 1079, 1083, 69, 1064, 69, 1078, 69, 69, 1080, 1955,
1425 1955, 1069, 69, 1070, 1071, 1072, 69, 69, 69, 69,
1426 1073, 1074, 1075, 69, 1081, 1077, 69, 1079, 1083, 1082,
1427 69, 69, 1078, 1084, 1085, 1080, 69, 1088, 1087, 1089,
1428 69, 1086, 1955, 1955, 69, 1090, 1091, 1092, 1955, 1094,
1429 1093, 1081, 69, 1095, 1101, 69, 1082, 1955, 69, 69,
1430 1084, 1085, 1102, 69, 1088, 1104, 1096, 1106, 1086, 69,
1431 69, 69, 1090, 69, 1092, 1097, 1094, 1093, 1103, 69,
1432 1095, 69, 69, 1098, 69, 69, 1099, 69, 1105, 1102,
1433
1434 69, 69, 1104, 1096, 1106, 1107, 69, 1108, 1100, 1955,
1435 1109, 1111, 1097, 1110, 1112, 1103, 1114, 69, 69, 69,
1436 1098, 69, 1113, 1099, 1115, 1105, 1116, 1117, 69, 1122,
1437 1118, 1125, 1119, 69, 1108, 1100, 69, 1109, 1111, 1120,
1438 1110, 69, 69, 1121, 69, 69, 69, 69, 69, 1113,
1439 69, 1115, 69, 1116, 69, 1124, 1122, 1118, 1123, 1119,
1440 1126, 1127, 69, 1128, 1130, 1129, 1120, 69, 69, 69,
1441 1121, 69, 1131, 69, 1132, 1133, 69, 1139, 1134, 69,
1442 1140, 1135, 1124, 1149, 1142, 1123, 69, 1126, 1127, 1136,
1443 1128, 69, 1129, 1141, 69, 69, 69, 1144, 1137, 1131,
1444
1445 69, 1132, 1133, 1138, 1139, 1134, 69, 69, 1135, 1148,
1446 69, 1142, 1143, 1145, 69, 69, 1136, 69, 1150, 1146,
1447 1141, 69, 1147, 69, 1144, 1137, 1151, 69, 1152, 1153,
1448 1138, 1154, 1155, 69, 1159, 1156, 1148, 69, 69, 1143,
1449 1145, 1168, 69, 69, 69, 69, 1146, 1955, 1158, 1147,
1450 69, 1161, 1157, 1151, 69, 1152, 1153, 69, 1154, 1155,
1451 69, 1159, 1156, 1160, 1162, 1171, 1163, 1165, 1167, 69,
1452 1166, 1955, 69, 1169, 69, 1158, 1170, 69, 1161, 1157,
1453 1164, 1172, 69, 1174, 1955, 69, 69, 1183, 1955, 1955,
1454 1160, 1162, 69, 1163, 1165, 1167, 69, 1166, 69, 1173,
1455
1456 1169, 1175, 69, 1170, 1178, 1176, 69, 1164, 1172, 1180,
1457 1181, 1177, 69, 1182, 69, 69, 1179, 1186, 69, 69,
1458 1188, 69, 1184, 69, 69, 1185, 1173, 1187, 1175, 69,
1459 1191, 1178, 1176, 69, 69, 69, 1180, 1181, 1177, 1189,
1460 1182, 1190, 69, 1179, 1186, 1194, 1193, 1188, 69, 1184,
1461 69, 1192, 1185, 1200, 1187, 69, 1195, 1191, 69, 1196,
1462 1197, 69, 1198, 69, 1203, 1201, 1189, 1202, 1190, 69,
1463 1204, 1205, 69, 1193, 1199, 69, 69, 69, 1192, 69,
1464 69, 1206, 69, 1195, 69, 69, 1196, 1197, 1207, 1198,
1465 1209, 1203, 1201, 1208, 1202, 69, 1211, 69, 1205, 1210,
1466
1467 1214, 1199, 1215, 1212, 1213, 1220, 1218, 1221, 69, 1955,
1468 69, 69, 69, 69, 69, 1207, 1219, 69, 69, 69,
1469 1208, 69, 1216, 1211, 69, 1225, 1210, 1214, 69, 1215,
1470 1212, 1213, 69, 1218, 1224, 1217, 1222, 1223, 69, 1226,
1471 69, 69, 69, 1219, 1227, 69, 69, 1228, 1229, 1216,
1472 1230, 1231, 69, 69, 1232, 1233, 1234, 1235, 1236, 1239,
1473 69, 1224, 1217, 1222, 1223, 69, 1226, 1237, 1955, 1238,
1474 1246, 69, 1244, 69, 1228, 69, 1248, 1230, 69, 69,
1475 1245, 1232, 69, 1234, 1250, 1236, 69, 69, 69, 69,
1476 69, 1240, 1241, 1242, 69, 69, 1238, 1247, 1243, 1244,
1477
1478 1252, 69, 1249, 1248, 69, 1253, 69, 1245, 69, 1251,
1479 69, 69, 69, 1255, 1256, 1257, 1254, 1258, 1240, 1241,
1480 1242, 69, 1259, 1267, 1247, 1243, 69, 1252, 1260, 1249,
1481 1262, 69, 1253, 69, 69, 1261, 1251, 1263, 1266, 69,
1482 1255, 69, 1257, 1254, 69, 1264, 69, 1265, 69, 1259,
1483 1269, 1270, 1268, 69, 69, 1260, 1271, 1262, 69, 69,
1484 69, 1272, 1261, 69, 1263, 1266, 1274, 1273, 1275, 1955,
1485 69, 1277, 1264, 1276, 1265, 69, 1279, 1269, 1278, 1268,
1486 1281, 69, 69, 1295, 69, 69, 69, 69, 69, 69,
1487 1280, 69, 1282, 1274, 1273, 1275, 1284, 1285, 1277, 1288,
1488
1489 1276, 1283, 69, 1279, 69, 1278, 69, 1281, 69, 69,
1490 1286, 1287, 1291, 1296, 69, 1299, 1289, 1280, 1294, 1282,
1491 69, 1290, 1293, 1284, 1285, 69, 69, 1292, 1283, 69,
1492 1297, 69, 69, 69, 1298, 69, 1301, 1286, 1287, 69,
1493 69, 1300, 69, 1289, 1302, 1294, 69, 1303, 1290, 1293,
1494 1304, 69, 1305, 1306, 1292, 69, 1307, 1309, 1311, 1308,
1495 1955, 69, 69, 1301, 69, 1312, 1310, 69, 1300, 1313,
1496 1314, 1315, 1317, 69, 1303, 69, 1321, 1304, 69, 1305,
1497 1306, 69, 69, 1316, 1318, 1311, 1308, 69, 69, 1319,
1498 1320, 69, 1312, 1310, 69, 1324, 69, 69, 1315, 1317,
1499
1500 69, 1326, 1325, 1321, 69, 69, 1322, 69, 1323, 69,
1501 1316, 1318, 69, 1329, 1332, 1327, 1319, 1320, 1328, 69,
1502 1331, 69, 69, 69, 69, 1330, 69, 69, 1326, 1325,
1503 1335, 1955, 1333, 1322, 1338, 1323, 69, 1336, 1337, 69,
1504 1329, 1332, 1327, 1334, 1342, 1328, 1955, 69, 1955, 1339,
1505 1340, 69, 1330, 1341, 1345, 69, 69, 1335, 69, 1333,
1506 69, 69, 69, 1343, 1336, 1337, 69, 1344, 1346, 1347,
1507 1334, 1348, 1352, 69, 1349, 69, 1339, 1340, 69, 69,
1508 1341, 1345, 1351, 1955, 1350, 1355, 69, 69, 69, 69,
1509 1343, 1353, 1354, 69, 1344, 69, 1347, 1357, 1348, 1352,
1510
1511 69, 1349, 69, 1356, 69, 1359, 69, 69, 1360, 1351,
1512 1358, 1350, 1355, 1361, 1362, 69, 1955, 69, 1353, 1354,
1513 1364, 1365, 69, 1363, 1357, 1366, 1374, 69, 1367, 69,
1514 1356, 1368, 1359, 69, 69, 1360, 69, 1358, 69, 1369,
1515 1361, 1362, 1372, 69, 1377, 1370, 1371, 1364, 1365, 1373,
1516 1363, 69, 69, 69, 1384, 1367, 69, 69, 1368, 1375,
1517 1376, 1380, 1378, 69, 69, 1379, 1369, 69, 69, 1372,
1518 69, 1377, 1370, 1371, 69, 1381, 1373, 1383, 69, 1382,
1519 1955, 69, 1386, 1385, 69, 69, 1375, 1376, 69, 1378,
1520 1390, 69, 1379, 1387, 1388, 1391, 1392, 1389, 1393, 1955,
1521
1522 1955, 69, 1381, 1955, 1383, 69, 1382, 69, 69, 1386,
1523 1385, 1394, 69, 69, 69, 69, 1396, 1390, 1395, 1397,
1524 1387, 1388, 69, 1392, 1389, 1393, 69, 1398, 1399, 1400,
1525 69, 1401, 1402, 69, 1405, 1403, 69, 69, 1394, 69,
1526 69, 1407, 1404, 1396, 69, 1395, 1397, 1406, 1409, 1408,
1527 69, 1410, 69, 1411, 1398, 1399, 1400, 69, 1401, 1402,
1528 69, 69, 1403, 1414, 1416, 69, 1412, 69, 69, 1404,
1529 1413, 69, 1415, 69, 1406, 1409, 1408, 1417, 1410, 69,
1530 1411, 1418, 69, 1419, 1421, 1420, 1422, 1955, 1424, 1955,
1531 1414, 69, 1423, 69, 1425, 69, 69, 69, 1426, 1415,
1532
1533 69, 1427, 1429, 1432, 1417, 69, 1428, 1430, 69, 69,
1534 1419, 1421, 1420, 1433, 69, 69, 69, 69, 69, 1423,
1535 69, 1425, 1435, 1434, 69, 1426, 1431, 1443, 1427, 1429,
1536 69, 1436, 69, 1428, 1430, 69, 69, 69, 1437, 1438,
1537 1433, 1439, 69, 1445, 69, 69, 69, 69, 1440, 1435,
1538 1434, 69, 1441, 1431, 1443, 1442, 1444, 1446, 1436, 1447,
1539 69, 69, 69, 1448, 1449, 1437, 1438, 1450, 1439, 1451,
1540 69, 1452, 1455, 69, 1454, 1440, 69, 1453, 69, 1441,
1541 1456, 69, 1442, 1444, 1446, 1457, 1447, 1458, 69, 69,
1542 1448, 1449, 1459, 69, 1450, 69, 69, 1460, 69, 69,
1543
1544 1461, 1454, 1462, 1463, 1453, 1465, 69, 69, 1466, 1464,
1545 1467, 69, 69, 1468, 1458, 1470, 69, 1469, 1473, 69,
1546 1474, 1475, 69, 1477, 1460, 1955, 1471, 69, 69, 69,
1547 1463, 69, 69, 69, 1480, 1466, 1464, 69, 69, 69,
1548 1468, 1472, 1470, 1476, 1469, 69, 69, 1474, 1475, 1478,
1549 69, 69, 69, 1471, 1479, 1481, 69, 1482, 69, 1483,
1550 1484, 1480, 1485, 69, 1486, 1487, 1955, 69, 1472, 1492,
1551 1476, 1489, 1490, 1488, 69, 69, 1478, 1499, 69, 1493,
1552 1491, 1479, 1481, 69, 69, 1495, 1483, 69, 69, 1485,
1553 69, 1486, 1487, 69, 69, 1494, 1492, 69, 1489, 1490,
1554
1555 1488, 69, 1496, 1497, 1500, 1498, 1493, 1491, 69, 1501,
1556 1502, 1504, 1495, 1503, 1955, 1955, 69, 69, 69, 1511,
1557 69, 69, 1494, 1509, 1955, 1505, 1510, 69, 69, 1496,
1558 1497, 1500, 1498, 1506, 69, 69, 1501, 1502, 1512, 69,
1559 1503, 1507, 69, 1508, 69, 1513, 1511, 1514, 69, 1515,
1560 1509, 69, 1505, 1510, 69, 1516, 1517, 1524, 1518, 1526,
1561 1506, 1519, 69, 1520, 69, 1512, 1521, 69, 1507, 1522,
1562 1508, 69, 1513, 1523, 1514, 1527, 1515, 69, 69, 69,
1563 69, 1525, 69, 69, 1524, 1518, 69, 69, 1519, 1534,
1564 1520, 1528, 1531, 1521, 1529, 1533, 1522, 69, 69, 69,
1565
1566 1523, 69, 1527, 1530, 1532, 69, 1535, 1537, 1525, 1538,
1567 1540, 69, 1536, 1548, 1543, 69, 69, 69, 1528, 1531,
1568 69, 1529, 1533, 69, 1539, 1541, 1545, 69, 1542, 69,
1569 1530, 1532, 1546, 1535, 1537, 69, 1544, 1540, 69, 1536,
1570 69, 69, 1547, 69, 69, 69, 1549, 1550, 69, 1552,
1571 1555, 1539, 1541, 1545, 69, 1542, 1551, 1553, 69, 69,
1572 1554, 69, 1556, 1544, 1557, 69, 1559, 1560, 1955, 69,
1573 1558, 69, 69, 1549, 1550, 69, 1552, 69, 69, 69,
1574 69, 1561, 1562, 1551, 1553, 1563, 1565, 1554, 1564, 1556,
1575 1566, 1567, 1569, 1559, 69, 69, 1568, 1558, 69, 1570,
1576
1577 1574, 69, 1955, 69, 1955, 1571, 1572, 69, 1561, 1562,
1578 69, 69, 1563, 69, 1573, 1564, 1576, 69, 69, 1569,
1579 69, 69, 69, 1568, 1575, 69, 1570, 1574, 1577, 69,
1580 1579, 69, 1571, 1572, 1578, 69, 1580, 69, 1583, 1581,
1581 1582, 1573, 69, 69, 1584, 1585, 69, 1586, 1587, 1589,
1582 69, 1575, 69, 69, 69, 1577, 1588, 1579, 1590, 1955,
1583 1591, 1578, 69, 1580, 69, 1583, 1581, 1582, 1593, 1600,
1584 69, 1584, 1585, 1592, 1586, 1587, 69, 69, 69, 1594,
1585 69, 1595, 1598, 1588, 69, 69, 69, 1591, 69, 1596,
1586 1597, 69, 1599, 1601, 1602, 1593, 69, 69, 1604, 1609,
1587
1588 1592, 1607, 1603, 69, 1605, 1606, 1594, 69, 1595, 1598,
1589 69, 69, 69, 69, 69, 1608, 1596, 1597, 69, 1599,
1590 1601, 1602, 69, 69, 1610, 1604, 69, 1611, 1607, 1603,
1591 1613, 1605, 1606, 1612, 1614, 1616, 69, 1615, 69, 1617,
1592 1955, 1618, 1608, 1619, 69, 69, 1620, 69, 69, 1622,
1593 1623, 1621, 1624, 69, 1611, 69, 69, 1613, 69, 1625,
1594 1612, 1614, 1616, 69, 1615, 1626, 1617, 69, 1618, 1627,
1595 1619, 69, 1629, 69, 1630, 69, 1622, 69, 1621, 1624,
1596 1628, 1631, 69, 1632, 1955, 1633, 1625, 1636, 69, 1635,
1597 1634, 1637, 1626, 1638, 69, 69, 69, 1641, 1639, 69,
1598
1599 1640, 1630, 1645, 69, 1642, 69, 69, 1628, 69, 69,
1600 69, 69, 1633, 69, 1636, 69, 1635, 1634, 1637, 69,
1601 1638, 1643, 1644, 1646, 1641, 1639, 69, 1640, 1955, 69,
1602 1649, 1642, 1647, 1648, 69, 1650, 1651, 1652, 1654, 1653,
1603 1955, 1955, 1955, 69, 1655, 1955, 1656, 1657, 1643, 1644,
1604 69, 1696, 69, 69, 1660, 69, 1659, 69, 1658, 1647,
1605 1648, 69, 1650, 69, 69, 69, 1653, 69, 69, 69,
1606 69, 1655, 1661, 1656, 1657, 69, 69, 1662, 1663, 1664,
1607 1665, 1660, 69, 1659, 1666, 1658, 1668, 69, 69, 1670,
1608 1667, 1669, 1673, 1955, 69, 1955, 1671, 69, 1676, 1661,
1609
1610 69, 69, 69, 69, 1662, 1663, 1664, 1665, 69, 69,
1611 1677, 1666, 69, 1668, 1672, 1675, 1670, 1667, 1669, 69,
1612 1674, 69, 69, 1671, 1678, 1676, 1679, 1680, 69, 1682,
1613 1681, 1955, 1685, 69, 1684, 1686, 1683, 69, 1688, 1689,
1614 1955, 1672, 1675, 69, 69, 69, 69, 1674, 69, 69,
1615 1690, 1678, 69, 1679, 1680, 1691, 1682, 1681, 69, 1685,
1616 1687, 1684, 69, 1683, 69, 1688, 69, 69, 1692, 1693,
1617 1694, 1695, 1697, 1702, 69, 1703, 1699, 1690, 1698, 69,
1618 1700, 1701, 69, 1955, 69, 69, 1711, 1687, 1704, 1707,
1619 1955, 1710, 1705, 1706, 69, 69, 69, 1694, 1695, 69,
1620
1621 1702, 69, 69, 1708, 69, 1698, 69, 69, 1701, 1712,
1622 69, 69, 69, 69, 1709, 1704, 1707, 69, 1710, 1705,
1623 1706, 69, 1715, 1713, 1714, 1955, 1716, 1955, 1717, 1718,
1624 1708, 1720, 69, 1721, 69, 1719, 1712, 1723, 69, 1724,
1625 69, 1709, 69, 1722, 69, 1725, 69, 1726, 69, 1715,
1626 1713, 1714, 69, 1716, 69, 1717, 1718, 69, 1720, 1727,
1627 1721, 69, 1719, 1729, 1723, 1730, 1724, 1728, 1732, 1731,
1628 1722, 69, 69, 1733, 1726, 1735, 69, 1734, 1738, 1736,
1629 69, 69, 1737, 1739, 1749, 69, 1727, 69, 69, 69,
1630 69, 1740, 1730, 69, 1728, 1732, 1731, 69, 1741, 1742,
1631
1632 69, 1743, 1735, 1746, 69, 1738, 1736, 1955, 1744, 1737,
1633 1739, 1745, 1748, 69, 1747, 69, 1750, 69, 1740, 69,
1634 1751, 1753, 69, 69, 69, 1741, 1742, 1752, 1743, 1754,
1635 69, 69, 69, 1755, 69, 1744, 69, 1756, 1745, 1748,
1636 1758, 1747, 69, 1750, 1762, 69, 1757, 1751, 1759, 1760,
1637 1761, 1763, 69, 1955, 1752, 69, 1754, 1765, 69, 69,
1638 69, 1764, 69, 1767, 1756, 1766, 69, 69, 69, 1769,
1639 1770, 1762, 69, 1757, 1768, 1759, 1760, 1761, 1763, 69,
1640 69, 1771, 69, 1772, 1765, 1774, 1773, 1775, 1764, 69,
1641 69, 1776, 1766, 69, 1777, 69, 69, 69, 1779, 1778,
1642
1643 1780, 1768, 1783, 69, 69, 1782, 1784, 69, 1771, 69,
1644 69, 1781, 1774, 1773, 1775, 1785, 1787, 69, 1776, 69,
1645 69, 1777, 1786, 1788, 1790, 69, 1778, 69, 1789, 1783,
1646 69, 69, 1782, 69, 1792, 1795, 1791, 1796, 1781, 69,
1647 1798, 1800, 1785, 1787, 69, 1797, 69, 1799, 69, 1786,
1648 1788, 1790, 69, 69, 69, 1789, 1793, 1794, 1801, 1802,
1649 1803, 1804, 69, 1791, 69, 69, 69, 69, 1800, 69,
1650 1805, 1806, 1797, 1807, 1799, 1808, 1809, 1811, 1812, 1815,
1651 69, 1955, 1955, 1793, 1794, 1801, 69, 69, 69, 69,
1652 1813, 1814, 69, 1816, 1810, 69, 1820, 1805, 69, 69,
1653
1654 1807, 69, 69, 1809, 1811, 69, 69, 1817, 1819, 1818,
1655 69, 69, 69, 1821, 69, 69, 69, 1813, 1814, 1822,
1656 1816, 1810, 1823, 1820, 1829, 1826, 1827, 1830, 69, 1832,
1657 69, 69, 69, 69, 1817, 1819, 1818, 1824, 1825, 1831,
1658 1821, 1834, 1955, 1828, 1833, 1836, 1822, 69, 69, 1823,
1659 69, 69, 1826, 1827, 69, 1837, 69, 1840, 69, 1841,
1660 1835, 1838, 69, 1842, 1824, 1825, 1831, 69, 69, 69,
1661 1828, 1833, 1836, 69, 1839, 69, 1843, 1844, 1845, 1846,
1662 69, 1851, 69, 69, 1840, 69, 1841, 1835, 1838, 1847,
1663 69, 69, 1848, 1849, 1850, 69, 1852, 1853, 1855, 69,
1664
1665 1854, 1839, 69, 69, 1844, 1845, 1846, 1856, 69, 1857,
1666 1859, 1861, 1955, 1955, 69, 69, 1847, 1858, 69, 1848,
1667 1849, 1850, 69, 69, 69, 69, 1860, 1854, 1862, 69,
1668 1863, 1864, 1866, 1868, 1856, 69, 1857, 69, 1865, 69,
1669 1867, 69, 69, 69, 1858, 1955, 1955, 69, 1879, 1870,
1670 69, 1955, 69, 1860, 1869, 1862, 69, 1863, 1864, 1866,
1671 1868, 69, 69, 1871, 69, 1865, 1872, 1867, 1876, 1873,
1672 69, 1878, 1875, 1874, 1877, 69, 1870, 69, 69, 69,
1673 69, 1869, 69, 69, 1880, 1881, 69, 1882, 1883, 1887,
1674 1871, 1884, 1885, 1872, 69, 1876, 1873, 1886, 1878, 1875,
1675
1676 1874, 1877, 69, 1888, 1889, 1890, 1892, 1893, 1955, 69,
1677 69, 1880, 69, 69, 69, 1883, 69, 69, 1884, 1885,
1678 69, 1891, 1894, 1897, 1886, 1895, 1896, 1955, 1899, 69,
1679 1888, 69, 1890, 1898, 69, 69, 69, 69, 69, 69,
1680 1900, 69, 69, 1901, 1902, 1910, 1903, 1906, 1891, 1894,
1681 1897, 69, 1895, 1896, 69, 1899, 1904, 1955, 1905, 1907,
1682 1898, 1911, 1912, 1915, 69, 1908, 69, 1900, 69, 69,
1683 1901, 1902, 1909, 1903, 1906, 1918, 69, 1917, 1955, 1930,
1684 69, 69, 69, 1904, 69, 1905, 1907, 69, 69, 1912,
1685 1913, 69, 1908, 1914, 69, 1916, 1921, 69, 69, 1909,
1686
1687 1919, 69, 1918, 69, 1917, 1920, 69, 1922, 69, 1923,
1688 69, 1924, 1955, 69, 1925, 1955, 1926, 1913, 1955, 69,
1689 1914, 1929, 1916, 1921, 1927, 1928, 1955, 1919, 1955, 69,
1690 1931, 69, 1920, 69, 1922, 1932, 1923, 1934, 1924, 1933,
1691 69, 1925, 69, 1926, 1955, 69, 69, 69, 1929, 1936,
1692 69, 1927, 1928, 1935, 1944, 69, 1937, 1931, 1940, 69,
1693 1938, 69, 1932, 1943, 1934, 1939, 1933, 1941, 69, 1942,
1694 1946, 69, 1955, 69, 1947, 69, 1936, 69, 69, 1945,
1695 1935, 69, 1948, 1937, 69, 1940, 1949, 1938, 1950, 69,
1696 1943, 1953, 1939, 1954, 1941, 1951, 1942, 69, 1955, 69,
1697
1698 1955, 69, 69, 69, 1952, 1955, 1945, 1955, 69, 1948,
1699 69, 1955, 69, 1949, 1955, 1950, 1955, 1955, 69, 1955,
1700 69, 1955, 1951, 1955, 1955, 1955, 1955, 1955, 1955, 1955,
1701 1955, 1952, 41, 41, 41, 41, 41, 41, 41, 46,
1702 46, 46, 46, 46, 46, 46, 51, 51, 51, 51,
1703 51, 51, 51, 57, 57, 57, 57, 57, 57, 57,
1704 62, 62, 62, 62, 62, 62, 62, 72, 72, 1955,
1705 72, 72, 72, 72, 129, 129, 1955, 1955, 1955, 129,
1706 129, 131, 131, 1955, 1955, 131, 1955, 131, 133, 1955,
1707 1955, 1955, 1955, 1955, 133, 136, 136, 1955, 1955, 1955,
1708
1709 136, 136, 138, 1955, 1955, 1955, 1955, 1955, 138, 140,
1710 140, 1955, 140, 140, 140, 140, 73, 73, 1955, 73,
1711 73, 73, 73, 13, 1955, 1955, 1955, 1955, 1955, 1955,
1712 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955,
1713 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955,
1714 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955,
1715 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955,
1716 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955,
1717 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955
16731718 } ;
16741719
1675 static yyconst flex_int16_t yy_chk[5491] =
1720 static yyconst flex_int16_t yy_chk[5690] =
16761721 { 0,
16771722 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
16781723 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
16811726 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
16821727 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
16831728 1, 1, 1, 1, 1, 3, 3, 3, 4, 4,
1684 4, 5, 5, 6, 6, 5, 24, 6, 7, 7,
1685 7, 7, 1885, 7, 8, 8, 8, 8, 24, 8,
1729 4, 5, 5, 6, 6, 5, 27, 6, 7, 7,
1730 7, 7, 1961, 7, 8, 8, 8, 8, 27, 8,
16861731 9, 9, 9, 10, 10, 10, 15, 45, 45, 50,
16871732
1688 15, 3, 50, 24, 4, 61, 61, 5, 19, 6,
1689 19, 19, 70, 19, 689, 7, 70, 40, 19, 40,
1690 40, 8, 40, 23, 20, 20, 9, 40, 683, 10,
1733 15, 3, 50, 27, 4, 61, 61, 5, 19, 6,
1734 19, 19, 70, 19, 707, 7, 70, 40, 19, 40,
1735 40, 8, 40, 23, 20, 20, 9, 40, 714, 10,
16911736 11, 11, 11, 11, 11, 11, 12, 12, 12, 12,
1692 12, 12, 20, 23, 27, 19, 23, 29, 20, 11,
1693 23, 20, 20, 136, 21, 12, 27, 25, 683, 29,
1694 134, 21, 34, 94, 28, 25, 133, 11, 21, 20,
1695 23, 27, 131, 12, 29, 34, 11, 128, 128, 129,
1696 21, 21, 12, 25, 25, 76, 28, 26, 21, 34,
1697 26, 28, 25, 30, 94, 21, 22, 26, 32, 26,
1698
1699 22, 30, 127, 22, 32, 22, 22, 30, 76, 31,
1700 26, 30, 76, 31, 26, 75, 83, 26, 22, 30,
1701 30, 83, 79, 22, 26, 32, 26, 22, 30, 31,
1702 22, 79, 22, 22, 30, 31, 31, 35, 30, 75,
1703 31, 35, 75, 83, 68, 37, 62, 37, 77, 79,
1704 57, 35, 52, 38, 35, 77, 31, 33, 38, 51,
1705 90, 33, 37, 35, 35, 252, 38, 33, 35, 39,
1706 33, 37, 37, 39, 37, 77, 36, 33, 35, 33,
1707 38, 35, 46, 90, 33, 38, 36, 90, 33, 37,
1708 36, 36, 252, 66, 33, 39, 39, 33, 36, 130,
1709
1710 39, 41, 130, 36, 33, 56, 66, 56, 56, 64,
1711 56, 64, 64, 36, 64, 135, 135, 36, 36, 67,
1712 66, 67, 67, 69, 67, 69, 69, 72, 69, 72,
1713 72, 78, 72, 69, 80, 81, 86, 72, 87, 82,
1714 82, 81, 84, 85, 78, 87, 64, 80, 82, 86,
1715 84, 91, 14, 219, 13, 78, 81, 0, 78, 117,
1716 85, 80, 81, 86, 72, 87, 82, 82, 81, 84,
1717 88, 78, 89, 91, 85, 92, 95, 93, 91, 88,
1718 93, 89, 219, 99, 95, 97, 96, 85, 92, 97,
1719 117, 100, 98, 93, 93, 98, 99, 88, 0, 89,
1720
1721 107, 93, 92, 95, 93, 101, 96, 93, 96, 97,
1722 99, 103, 97, 96, 100, 102, 97, 105, 100, 98,
1723 93, 93, 104, 107, 105, 101, 106, 107, 108, 102,
1724 109, 103, 101, 96, 109, 106, 104, 108, 103, 110,
1725 0, 111, 102, 112, 105, 113, 110, 116, 114, 104,
1726 112, 119, 109, 106, 115, 108, 116, 109, 118, 113,
1727 114, 109, 115, 122, 124, 121, 110, 111, 111, 122,
1728 112, 119, 113, 118, 116, 114, 121, 119, 119, 120,
1729 123, 115, 125, 0, 126, 118, 124, 0, 120, 0,
1730 122, 124, 121, 126, 0, 142, 0, 125, 119, 0,
1731
1732 140, 123, 0, 141, 0, 123, 120, 123, 0, 125,
1733 132, 126, 132, 132, 137, 132, 137, 137, 138, 137,
1734 138, 138, 143, 138, 140, 141, 142, 140, 123, 144,
1735 141, 145, 146, 147, 143, 148, 149, 0, 156, 145,
1736 147, 149, 150, 152, 146, 151, 156, 0, 144, 143,
1737 155, 0, 153, 148, 0, 138, 144, 157, 145, 146,
1738 147, 160, 148, 159, 150, 156, 158, 149, 149, 150,
1739 158, 151, 151, 153, 152, 162, 155, 155, 161, 157,
1740 153, 165, 163, 160, 157, 163, 159, 162, 160, 164,
1741 159, 161, 166, 158, 167, 0, 169, 163, 164, 167,
1742
1743 153, 154, 162, 165, 170, 161, 154, 169, 165, 163,
1744 171, 154, 163, 167, 166, 168, 164, 154, 154, 166,
1745 167, 167, 168, 169, 154, 173, 167, 176, 154, 172,
1746 174, 178, 177, 154, 179, 170, 171, 171, 154, 172,
1747 167, 175, 168, 180, 154, 154, 182, 175, 174, 0,
1748 181, 184, 0, 194, 177, 0, 173, 174, 176, 177,
1749 172, 186, 178, 180, 181, 179, 172, 182, 175, 183,
1750 180, 187, 184, 182, 185, 188, 183, 181, 184, 185,
1751 186, 189, 190, 191, 194, 187, 192, 196, 186, 190,
1752 201, 192, 195, 189, 193, 193, 183, 188, 187, 195,
1753
1754 197, 185, 188, 193, 198, 191, 202, 199, 189, 190,
1755 191, 200, 196, 192, 196, 199, 201, 201, 203, 195,
1756 197, 193, 193, 204, 205, 206, 200, 197, 202, 0,
1757 208, 209, 210, 206, 199, 198, 0, 202, 200, 205,
1758 204, 207, 211, 214, 213, 227, 218, 212, 204, 203,
1759 204, 205, 206, 209, 211, 202, 212, 213, 209, 216,
1760 207, 208, 214, 210, 215, 217, 215, 204, 207, 211,
1761 214, 213, 218, 218, 212, 220, 227, 221, 222, 0,
1762 0, 223, 224, 216, 225, 231, 216, 228, 230, 222,
1763 217, 215, 217, 223, 226, 0, 229, 243, 0, 0,
1764
1765 228, 220, 220, 221, 221, 222, 224, 225, 223, 224,
1766 230, 225, 226, 232, 228, 230, 231, 233, 234, 235,
1767 232, 226, 229, 229, 234, 236, 233, 238, 243, 237,
1768 240, 247, 239, 235, 241, 242, 238, 0, 0, 240,
1769 232, 244, 265, 241, 233, 234, 235, 0, 245, 247,
1770 242, 236, 236, 237, 238, 239, 237, 240, 247, 239,
1771 248, 241, 242, 245, 246, 244, 248, 246, 244, 249,
1772 250, 253, 255, 265, 246, 245, 251, 251, 254, 258,
1773 0, 254, 256, 249, 255, 250, 0, 248, 254, 257,
1774 259, 246, 260, 262, 246, 253, 249, 250, 253, 255,
1775
1776 256, 251, 261, 251, 251, 254, 258, 257, 254, 256,
1777 263, 267, 259, 269, 261, 262, 257, 259, 260, 260,
1778 262, 264, 268, 266, 268, 263, 269, 271, 264, 261,
1779 266, 270, 0, 267, 270, 272, 270, 263, 267, 0,
1780 269, 0, 270, 273, 276, 271, 268, 287, 264, 268,
1781 266, 268, 281, 275, 271, 277, 276, 0, 270, 274,
1782 275, 270, 279, 270, 281, 273, 272, 274, 277, 278,
1783 273, 276, 282, 274, 286, 279, 284, 283, 287, 281,
1784 275, 286, 277, 283, 284, 278, 274, 0, 285, 279,
1785 282, 288, 0, 278, 274, 288, 278, 291, 0, 282,
1786
1787 285, 286, 289, 284, 283, 290, 293, 295, 292, 289,
1788 0, 297, 278, 280, 280, 285, 306, 290, 288, 291,
1789 292, 294, 295, 280, 291, 280, 280, 280, 294, 289,
1790 280, 296, 290, 299, 295, 292, 298, 293, 280, 306,
1791 280, 280, 297, 306, 296, 300, 300, 298, 294, 301,
1792 280, 302, 280, 280, 280, 299, 301, 280, 296, 303,
1793 299, 310, 302, 298, 304, 305, 307, 308, 314, 309,
1794 303, 313, 0, 311, 300, 307, 301, 304, 302, 310,
1795 308, 312, 309, 317, 316, 318, 303, 309, 310, 313,
1796 305, 304, 305, 307, 308, 311, 309, 315, 313, 314,
1797
1798 311, 319, 321, 315, 312, 316, 317, 318, 312, 309,
1799 317, 316, 318, 320, 323, 322, 321, 324, 0, 325,
1800 327, 326, 0, 324, 315, 328, 0, 319, 319, 321,
1801 331, 329, 330, 0, 333, 320, 326, 325, 330, 0,
1802 320, 322, 322, 327, 324, 323, 325, 327, 326, 334,
1803 335, 328, 328, 329, 336, 334, 331, 331, 329, 330,
1804 333, 333, 342, 337, 338, 340, 341, 340, 343, 335,
1805 337, 0, 336, 341, 340, 342, 334, 335, 344, 338,
1806 345, 336, 346, 347, 0, 351, 348, 0, 353, 342,
1807 337, 338, 340, 341, 340, 348, 344, 0, 349, 343,
1808
1809 350, 346, 345, 349, 352, 344, 350, 345, 351, 346,
1810 353, 354, 351, 348, 347, 353, 352, 357, 355, 0,
1811 358, 359, 354, 363, 357, 349, 355, 350, 358, 362,
1812 361, 352, 359, 360, 0, 364, 362, 364, 354, 365,
1813 366, 0, 360, 367, 357, 355, 356, 358, 359, 363,
1814 363, 356, 366, 356, 361, 371, 362, 361, 367, 0,
1815 369, 356, 364, 368, 360, 365, 365, 366, 369, 360,
1816 367, 356, 356, 356, 370, 368, 372, 371, 356, 370,
1817 356, 373, 371, 374, 375, 376, 379, 369, 356, 373,
1818 368, 377, 381, 378, 372, 374, 380, 382, 356, 383,
1819
1820 379, 370, 378, 372, 385, 386, 377, 375, 373, 388,
1821 374, 375, 382, 379, 384, 380, 376, 386, 377, 381,
1822 378, 387, 390, 380, 382, 391, 390, 392, 385, 384,
1823 383, 385, 386, 388, 389, 393, 388, 389, 394, 391,
1824 395, 384, 397, 387, 396, 389, 0, 400, 387, 398,
1825 399, 401, 391, 390, 392, 398, 402, 405, 403, 404,
1826 0, 389, 393, 0, 389, 406, 404, 395, 407, 394,
1827 400, 396, 399, 397, 400, 410, 398, 399, 414, 402,
1828 403, 407, 401, 402, 408, 403, 404, 406, 405, 408,
1829 409, 411, 406, 408, 413, 407, 415, 412, 416, 409,
1830
1831 411, 410, 410, 0, 417, 423, 418, 413, 408, 414,
1832 420, 408, 0, 430, 415, 419, 408, 409, 411, 412,
1833 408, 413, 416, 415, 412, 416, 417, 417, 418, 419,
1834 421, 417, 420, 418, 422, 424, 423, 420, 427, 425,
1835 426, 421, 419, 428, 430, 429, 431, 432, 438, 422,
1836 433, 435, 428, 417, 434, 435, 424, 421, 429, 0,
1837 427, 422, 424, 425, 426, 427, 425, 426, 431, 436,
1838 428, 437, 429, 431, 433, 439, 434, 433, 432, 438,
1839 440, 434, 435, 436, 441, 437, 442, 444, 441, 443,
1840 445, 446, 0, 439, 0, 440, 436, 443, 437, 445,
1841
1842 446, 447, 439, 448, 440, 450, 449, 440, 451, 447,
1843 448, 442, 444, 442, 444, 441, 443, 445, 446, 453,
1844 451, 457, 440, 450, 454, 452, 458, 459, 447, 449,
1845 448, 453, 450, 449, 452, 451, 455, 456, 460, 461,
1846 465, 464, 463, 459, 455, 456, 453, 457, 457, 458,
1847 461, 462, 452, 458, 459, 454, 463, 466, 467, 462,
1848 460, 464, 465, 455, 456, 460, 461, 465, 464, 463,
1849 468, 470, 469, 472, 473, 471, 480, 466, 462, 474,
1850 467, 469, 475, 476, 466, 467, 472, 477, 485, 476,
1851 478, 470, 468, 471, 0, 477, 473, 468, 470, 469,
1852
1853 472, 473, 471, 474, 481, 475, 474, 480, 478, 475,
1854 476, 481, 482, 477, 477, 483, 484, 478, 486, 485,
1855 487, 488, 477, 488, 491, 484, 0, 500, 494, 487,
1856 483, 481, 497, 498, 499, 482, 491, 486, 494, 482,
1857 502, 505, 483, 484, 0, 486, 0, 487, 488, 489,
1858 497, 491, 506, 489, 498, 494, 489, 499, 500, 497,
1859 498, 499, 502, 489, 503, 505, 489, 502, 505, 507,
1860 0, 489, 504, 503, 504, 508, 489, 510, 0, 506,
1861 489, 514, 0, 489, 0, 0, 509, 511, 513, 507,
1862 489, 503, 512, 489, 501, 501, 507, 501, 509, 504,
1863
1864 501, 508, 508, 510, 510, 501, 514, 519, 514, 511,
1865 513, 501, 501, 509, 511, 513, 512, 515, 517, 512,
1866 501, 501, 501, 516, 501, 515, 517, 501, 518, 520,
1867 516, 521, 501, 519, 519, 522, 523, 524, 501, 501,
1868 521, 520, 525, 526, 515, 517, 0, 518, 527, 0,
1869 516, 530, 528, 529, 531, 518, 520, 522, 521, 534,
1870 530, 0, 522, 523, 532, 535, 533, 526, 524, 527,
1871 526, 528, 529, 525, 533, 527, 531, 536, 530, 528,
1872 529, 531, 537, 535, 532, 540, 534, 538, 541, 543,
1873 0, 532, 535, 533, 542, 538, 536, 544, 545, 548,
1874
1875 549, 550, 543, 540, 536, 548, 541, 550, 0, 546,
1876 545, 0, 540, 537, 538, 541, 543, 546, 542, 555,
1877 560, 542, 549, 544, 544, 545, 548, 549, 550, 552,
1878 551, 553, 554, 546, 552, 557, 546, 551, 553, 556,
1879 559, 560, 555, 557, 546, 558, 555, 560, 556, 561,
1880 554, 563, 564, 559, 562, 565, 552, 551, 553, 554,
1881 567, 562, 557, 558, 563, 566, 556, 559, 567, 568,
1882 573, 569, 558, 570, 572, 571, 561, 575, 563, 570,
1883 574, 562, 576, 564, 568, 578, 565, 567, 566, 574,
1884 579, 575, 566, 569, 573, 581, 568, 573, 569, 577,
1885
1886 570, 571, 571, 580, 575, 572, 577, 574, 582, 588,
1887 584, 583, 578, 576, 583, 580, 582, 579, 581, 587,
1888 585, 604, 581, 584, 0, 0, 577, 585, 589, 618,
1889 580, 590, 588, 590, 0, 582, 588, 584, 583, 0,
1890 589, 591, 615, 593, 594, 587, 587, 585, 586, 595,
1891 586, 592, 604, 661, 586, 589, 586, 594, 590, 596,
1892 618, 586, 595, 592, 591, 593, 586, 597, 591, 615,
1893 593, 594, 586, 599, 598, 586, 595, 586, 592, 597,
1894 661, 586, 596, 586, 598, 600, 596, 603, 586, 602,
1895 606, 601, 762, 586, 597, 599, 598, 601, 600, 605,
1896
1897 599, 598, 602, 0, 605, 606, 605, 607, 603, 608,
1898 611, 598, 600, 609, 603, 610, 602, 606, 601, 612,
1899 762, 616, 608, 619, 605, 605, 605, 614, 609, 607,
1900 613, 605, 611, 605, 607, 614, 608, 611, 612, 622,
1901 609, 610, 610, 613, 616, 620, 612, 619, 616, 621,
1902 619, 605, 623, 620, 614, 625, 624, 613, 626, 627,
1903 628, 633, 629, 621, 624, 0, 0, 631, 628, 626,
1904 622, 630, 620, 625, 623, 632, 621, 627, 630, 623,
1905 631, 636, 625, 624, 629, 626, 627, 628, 635, 629,
1906 636, 637, 633, 632, 631, 638, 635, 639, 630, 640,
1907
1908 643, 642, 632, 637, 0, 641, 644, 647, 636, 648,
1909 649, 647, 648, 0, 646, 635, 650, 638, 637, 639,
1910 644, 640, 638, 641, 639, 646, 640, 642, 642, 650,
1911 652, 643, 641, 644, 649, 648, 648, 649, 647, 648,
1912 651, 646, 652, 650, 653, 654, 655, 651, 656, 0,
1913 659, 653, 655, 658, 657, 663, 0, 652, 660, 664,
1914 662, 659, 0, 0, 663, 0, 0, 651, 0, 654,
1915 656, 653, 654, 655, 658, 656, 657, 659, 662, 660,
1916 658, 657, 663, 664, 665, 660, 664, 662, 666, 668,
1917 667, 669, 670, 665, 674, 672, 666, 667, 676, 673,
1918
1919 677, 679, 0, 668, 672, 675, 0, 693, 0, 0,
1920 674, 665, 678, 669, 670, 666, 668, 667, 669, 670,
1921 675, 674, 672, 673, 678, 680, 673, 681, 679, 676,
1922 682, 677, 675, 680, 684, 685, 686, 690, 693, 678,
1923 681, 694, 692, 684, 686, 682, 687, 691, 687, 692,
1924 690, 0, 680, 685, 681, 695, 696, 682, 697, 691,
1925 0, 684, 685, 686, 690, 699, 698, 701, 700, 692,
1926 702, 697, 694, 687, 691, 701, 703, 695, 696, 698,
1927 700, 704, 695, 696, 705, 697, 706, 699, 703, 704,
1928 702, 707, 699, 698, 701, 700, 708, 702, 709, 706,
1929
1930 707, 710, 711, 703, 716, 709, 712, 713, 704, 0,
1931 715, 705, 714, 706, 0, 0, 717, 708, 707, 715,
1932 713, 721, 716, 708, 711, 709, 712, 710, 710, 711,
1933 719, 716, 718, 712, 713, 722, 714, 715, 717, 714,
1934 718, 720, 723, 717, 721, 725, 724, 727, 721, 720,
1935 728, 726, 719, 722, 723, 727, 728, 719, 724, 718,
1936 730, 729, 722, 731, 732, 725, 726, 733, 720, 723,
1937 729, 732, 725, 724, 727, 731, 735, 728, 726, 736,
1938 0, 730, 737, 739, 740, 733, 738, 730, 729, 742,
1939 731, 732, 736, 738, 733, 743, 741, 742, 744, 740,
1940
1941 741, 737, 746, 745, 747, 739, 736, 735, 743, 737,
1942 739, 740, 748, 738, 749, 750, 742, 745, 751, 0,
1943 746, 753, 743, 755, 744, 744, 756, 741, 752, 746,
1944 745, 757, 755, 759, 754, 747, 749, 750, 748, 748,
1945 761, 749, 750, 753, 751, 751, 752, 754, 753, 758,
1946 755, 765, 763, 766, 767, 752, 759, 756, 0, 0,
1947 759, 754, 757, 767, 771, 766, 761, 761, 763, 768,
1948 770, 758, 771, 772, 765, 0, 758, 760, 765, 763,
1949 766, 767, 760, 770, 760, 769, 760, 768, 760, 769,
1950 773, 771, 772, 774, 776, 760, 768, 770, 777, 775,
1951
1952 772, 775, 774, 773, 760, 778, 780, 781, 783, 760,
1953 777, 760, 784, 760, 782, 760, 769, 773, 785, 784,
1954 774, 776, 782, 787, 786, 777, 775, 789, 790, 781,
1955 780, 788, 778, 780, 781, 783, 792, 791, 788, 784,
1956 794, 782, 797, 793, 799, 785, 786, 790, 795, 789,
1957 787, 786, 793, 798, 789, 790, 800, 0, 788, 791,
1958 807, 794, 792, 792, 791, 801, 799, 794, 795, 802,
1959 793, 799, 803, 797, 804, 795, 806, 802, 805, 809,
1960 806, 811, 810, 801, 798, 805, 809, 800, 803, 808,
1961 811, 807, 801, 812, 817, 808, 802, 810, 0, 803,
1962
1963 813, 804, 808, 806, 815, 805, 809, 813, 811, 810,
1964 814, 816, 814, 815, 818, 821, 808, 819, 818, 812,
1965 812, 817, 808, 821, 822, 823, 824, 813, 822, 825,
1966 829, 815, 827, 816, 826, 828, 0, 814, 816, 819,
1967 830, 818, 821, 823, 819, 824, 829, 826, 830, 831,
1968 831, 832, 823, 824, 825, 822, 825, 829, 828, 833,
1969 832, 826, 828, 827, 834, 835, 836, 830, 837, 839,
1970 0, 838, 835, 834, 844, 840, 831, 837, 832, 838,
1971 842, 833, 839, 843, 845, 841, 833, 840, 842, 836,
1972 846, 834, 835, 836, 844, 837, 839, 841, 838, 846,
1973
1974 847, 844, 840, 848, 849, 843, 845, 842, 850, 852,
1975 843, 845, 841, 853, 850, 848, 851, 846, 847, 854,
1976 0, 855, 857, 859, 0, 849, 861, 847, 858, 0,
1977 848, 849, 859, 862, 860, 850, 0, 870, 851, 861,
1978 852, 862, 0, 851, 853, 854, 854, 855, 855, 857,
1979 859, 858, 869, 861, 863, 858, 860, 865, 863, 864,
1980 862, 860, 866, 864, 868, 865, 867, 867, 870, 871,
1981 866, 0, 868, 869, 872, 873, 877, 871, 874, 869,
1982 878, 875, 872, 873, 865, 863, 874, 879, 877, 866,
1983 864, 868, 876, 867, 875, 880, 871, 881, 876, 882,
1984
1985 883, 872, 873, 877, 884, 874, 878, 878, 875, 890,
1986 880, 879, 885, 891, 879, 886, 887, 894, 884, 876,
1987 887, 882, 880, 883, 881, 889, 882, 883, 892, 886,
1988 885, 884, 889, 887, 898, 891, 890, 893, 900, 885,
1989 891, 887, 886, 887, 893, 896, 902, 887, 894, 899,
1990 904, 892, 889, 907, 896, 892, 898, 906, 908, 912,
1991 887, 898, 913, 909, 893, 909, 911, 0, 915, 900,
1992 908, 912, 896, 902, 910, 899, 899, 904, 916, 907,
1993 907, 906, 0, 916, 906, 908, 912, 910, 911, 913,
1994 909, 914, 917, 911, 915, 915, 919, 918, 914, 920,
1995
1996 922, 910, 923, 925, 919, 916, 924, 926, 917, 922,
1997 927, 930, 932, 928, 926, 923, 934, 927, 914, 917,
1998 918, 920, 931, 919, 918, 925, 920, 922, 929, 923,
1999 925, 928, 924, 924, 926, 929, 930, 927, 930, 933,
2000 928, 936, 937, 932, 931, 938, 933, 934, 941, 931,
2001 939, 941, 942, 938, 936, 929, 944, 946, 943, 947,
2002 0, 0, 948, 944, 952, 949, 933, 945, 936, 937,
2003 945, 939, 938, 943, 950, 941, 950, 939, 942, 942,
2004 948, 947, 945, 944, 951, 943, 947, 949, 946, 948,
2005 953, 945, 949, 954, 945, 952, 955, 945, 956, 957,
2006
2007 958, 950, 954, 959, 955, 956, 960, 959, 951, 945,
2008 961, 951, 962, 963, 966, 969, 953, 953, 0, 0,
2009 954, 957, 963, 955, 968, 956, 957, 966, 960, 964,
2010 959, 958, 967, 960, 962, 965, 964, 961, 968, 962,
2011 963, 966, 965, 970, 972, 971, 969, 967, 973, 975,
2012 970, 968, 971, 977, 973, 976, 964, 972, 978, 967,
2013 984, 979, 965, 980, 979, 977, 0, 986, 985, 0,
2014 970, 972, 971, 987, 980, 973, 975, 976, 978, 979,
2015 977, 982, 976, 988, 987, 978, 982, 984, 979, 986,
2016 980, 979, 985, 982, 986, 985, 989, 991, 993, 990,
2017
2018 987, 988, 990, 992, 989, 994, 995, 0, 982, 996,
2019 988, 998, 994, 982, 997, 991, 999, 990, 996, 1001,
2020 995, 1001, 998, 989, 991, 993, 990, 997, 1002, 990,
2021 1003, 999, 994, 995, 992, 1005, 996, 1002, 998, 1004,
2022 1009, 997, 1006, 999, 1007, 1008, 1001, 1011, 1008, 1009,
2023 1004, 1013, 1012, 1005, 0, 1002, 1003, 1003, 1007, 1014,
2024 1016, 1012, 1005, 1008, 1006, 1021, 1004, 1009, 1023, 1006,
2025 1007, 1007, 1008, 1017, 1015, 1008, 1022, 1023, 1011, 1012,
2026 1014, 1015, 1013, 1018, 1021, 1007, 1014, 1017, 1024, 1018,
2027 1022, 1016, 1021, 1025, 1026, 1023, 1024, 0, 1031, 1027,
2028
2029 1017, 1015, 1029, 1022, 1030, 1026, 1032, 1018, 1027, 1029,
2030 1018, 1036, 1033, 1035, 1034, 1024, 1018, 1035, 1037, 0,
2031 1031, 1026, 1038, 1036, 1025, 1031, 1027, 1030, 1032, 1029,
2032 1039, 1030, 1034, 1032, 1033, 1038, 1040, 1041, 1036, 1033,
2033 1035, 1034, 0, 1043, 1044, 1037, 1042, 0, 1046, 1038,
2034 1039, 1040, 1041, 1045, 1042, 1047, 1049, 1039, 1052, 1044,
2035 1048, 0, 1045, 1040, 1041, 1053, 1051, 0, 1055, 1046,
2036 0, 1044, 0, 1042, 1043, 1046, 1052, 1058, 1056, 1054,
2037 1045, 1059, 1047, 1049, 1048, 1052, 1057, 1048, 1051, 1058,
2038 1055, 1061, 1053, 1051, 1054, 1055, 1056, 1060, 1061, 1062,
2039
2040 1063, 1057, 1064, 1059, 1058, 1056, 1054, 1068, 1059, 1066,
2041 1060, 1062, 1067, 1057, 1065, 1060, 1069, 1066, 1061, 1067,
2042 1065, 1070, 1071, 1069, 1060, 1073, 1062, 1063, 1072, 1076,
2043 1074, 1077, 1078, 1064, 1068, 1080, 1066, 1060, 1081, 1067,
2044 1077, 1065, 1079, 1069, 1079, 1082, 0, 1086, 1070, 1071,
2045 0, 1072, 1084, 0, 1074, 1072, 1073, 1074, 1077, 1084,
2046 1076, 1089, 1080, 1078, 1081, 1081, 1083, 1083, 1083, 1079,
2047 1085, 1091, 1098, 1083, 1089, 1087, 1082, 1085, 1086, 1084,
2048 1090, 1083, 1087, 1092, 1092, 1093, 1090, 1095, 1089, 1094,
2049 1098, 1096, 1095, 1083, 1083, 1083, 1094, 1085, 1091, 1098,
2050
2051 1083, 1099, 1087, 1100, 1101, 1102, 1109, 1090, 1103, 1103,
2052 1092, 1093, 1093, 1104, 1095, 1100, 1094, 1096, 1096, 1105,
2053 1105, 1108, 1106, 1102, 1101, 1111, 1112, 1110, 1099, 1113,
2054 1100, 1101, 1102, 1106, 1110, 1103, 1114, 1109, 1116, 1104,
2055 1104, 0, 1115, 1108, 1117, 1111, 1105, 1118, 1108, 1106,
2056 1121, 1117, 1111, 1119, 1110, 1118, 1116, 1112, 1120, 1121,
2057 1113, 1122, 1122, 1114, 1115, 1116, 1123, 1124, 1119, 1115,
2058 1125, 1117, 1126, 1128, 1118, 1127, 1129, 1121, 1125, 1124,
2059 1119, 1131, 1120, 1132, 1126, 1120, 1135, 1134, 1122, 1132,
2060 1130, 1128, 1123, 1123, 1124, 1130, 1127, 1125, 1133, 1126,
2061
2062 1128, 1136, 1127, 1129, 1137, 1136, 1130, 1140, 1131, 1139,
2063 1132, 1133, 1141, 1135, 1138, 1138, 1143, 1130, 1134, 1142,
2064 1145, 1144, 1130, 1144, 1139, 1133, 1147, 1141, 1146, 1148,
2065 0, 1143, 1136, 1146, 1150, 1137, 1139, 1151, 1140, 1141,
2066 1152, 1138, 1142, 1143, 1148, 1153, 1142, 1154, 1144, 1155,
2067 1157, 1145, 1166, 1156, 1154, 1146, 1148, 1147, 1150, 1160,
2068 1158, 1150, 0, 1151, 1151, 1162, 1167, 1152, 1163, 1165,
2069 1155, 1157, 1153, 1167, 1154, 1156, 1155, 1157, 1158, 1166,
2070 1156, 1160, 1168, 1163, 1165, 1169, 1160, 1158, 1171, 1162,
2071 1170, 1172, 1162, 1167, 1169, 1163, 1165, 1173, 1170, 1176,
2072
2073 1168, 0, 1178, 1174, 1179, 1177, 1181, 1184, 1185, 1168,
2074 1176, 1171, 1169, 1172, 1177, 1171, 1174, 1170, 1172, 1184,
2075 1178, 1185, 1179, 1186, 1188, 1176, 1176, 0, 1173, 1178,
2076 1174, 1179, 1177, 1181, 1184, 1185, 1187, 1176, 1190, 1189,
2077 1192, 1193, 0, 1194, 1195, 0, 1187, 1196, 1193, 0,
2078 1188, 1188, 1202, 1196, 1186, 1200, 1200, 1197, 1198, 1202,
2079 1192, 1199, 1195, 1187, 1189, 1190, 1189, 1192, 1193, 1194,
2080 1194, 1195, 1197, 1198, 1196, 1201, 1199, 1205, 1206, 1202,
2081 1207, 0, 1200, 1203, 1197, 1198, 1208, 1201, 1199, 1207,
2082 1203, 1209, 1213, 1212, 1210, 1214, 1214, 1228, 1221, 1205,
2083
2084 1216, 1215, 1201, 1206, 1205, 1206, 1212, 1207, 1208, 1217,
2085 1203, 1209, 1210, 1208, 0, 1218, 1222, 1219, 1209, 1213,
2086 1212, 1210, 1214, 1215, 1228, 1216, 1219, 1216, 1215, 1221,
2087 1224, 1217, 1220, 1223, 1232, 1229, 1217, 1218, 1222, 1220,
2088 1226, 1227, 1218, 1222, 1219, 1231, 1230, 1223, 1226, 1224,
2089 0, 1234, 1231, 1233, 1227, 1235, 1238, 1224, 1230, 1220,
2090 1223, 1229, 1229, 1236, 1237, 1232, 1236, 1226, 1227, 1239,
2091 1235, 1244, 1231, 1230, 1238, 1233, 1234, 1241, 1234, 1242,
2092 1233, 1236, 1235, 1238, 1239, 1244, 1246, 1245, 1248, 1237,
2093 1236, 1237, 1253, 1236, 1245, 1250, 1239, 1246, 1244, 1241,
2094
2095 1251, 1242, 1254, 1252, 1241, 1252, 1242, 1255, 1256, 1248,
2096 1253, 1259, 1251, 1246, 1245, 1248, 1250, 1258, 1257, 1253,
2097 1261, 1266, 1250, 1260, 1261, 1255, 1257, 1251, 1262, 1254,
2098 1252, 1267, 1263, 1259, 1255, 1256, 1268, 1260, 1259, 1263,
2099 1258, 1269, 1270, 1271, 1258, 1257, 1272, 1262, 1266, 1267,
2100 1260, 1261, 1271, 1273, 1274, 1262, 1277, 1270, 1267, 1263,
2101 1276, 1278, 1276, 1268, 1279, 1278, 0, 1269, 1269, 1270,
2102 1271, 1280, 1283, 1281, 1282, 1273, 1279, 1272, 1277, 1284,
2103 1273, 1274, 1281, 1277, 1285, 1282, 1286, 1276, 1278, 1287,
2104 1287, 1279, 1294, 1280, 1291, 1288, 1285, 1291, 1280, 1283,
2105
2106 1281, 1282, 1284, 1288, 1292, 1290, 1284, 1294, 1286, 1290,
2107 1297, 1285, 1292, 1286, 1293, 1298, 1287, 1295, 1303, 1294,
2108 1293, 1291, 1288, 1295, 1299, 0, 1302, 1300, 1304, 1301,
2109 1307, 1292, 1290, 1306, 1305, 1308, 1309, 1297, 1299, 1298,
2110 1300, 1293, 1298, 1301, 1295, 1303, 1305, 1306, 1311, 1313,
2111 1310, 1299, 1302, 1302, 1300, 1304, 1301, 1307, 1310, 1312,
2112 1306, 1305, 1308, 1309, 1314, 1315, 1317, 1318, 1312, 1320,
2113 1319, 1321, 0, 1315, 1322, 1311, 1313, 1310, 1319, 1323,
2114 1321, 1325, 1326, 0, 1324, 0, 1312, 1329, 1317, 0,
2115 1326, 1314, 1315, 1317, 1318, 1322, 1320, 1319, 1321, 1324,
2116
2117 1327, 1322, 1334, 1323, 1335, 1328, 1323, 1333, 1325, 1326,
2118 1324, 1324, 1327, 1328, 1329, 1331, 1332, 1337, 0, 1333,
2119 1332, 1339, 1331, 1338, 1338, 1334, 1324, 1327, 1336, 1334,
2120 1341, 1335, 1328, 1340, 1333, 1344, 1336, 1342, 1343, 1346,
2121 1343, 1347, 1331, 1332, 1337, 1341, 1345, 1339, 1339, 1344,
2122 1338, 1340, 1345, 1347, 1348, 1336, 1349, 1341, 1350, 1342,
2123 1340, 1346, 1344, 1351, 1342, 1343, 1346, 1358, 1347, 1352,
2124 1354, 1350, 1348, 1345, 1349, 1356, 1365, 1354, 1357, 0,
2125 1359, 1348, 1360, 1349, 0, 1350, 1367, 1362, 1359, 1360,
2126 1363, 1365, 1352, 1356, 1351, 0, 1352, 1354, 1358, 1362,
2127
2128 1368, 1370, 1356, 1365, 1357, 1357, 1359, 1359, 1363, 1360,
2129 1367, 1369, 1371, 1367, 1362, 1359, 1370, 1363, 1369, 1373,
2130 1374, 1376, 1368, 1375, 1377, 1383, 1378, 1368, 1370, 1379,
2131 1390, 1381, 0, 1374, 1378, 1382, 1376, 1377, 1369, 1371,
2132 0, 1384, 1387, 0, 1389, 0, 1373, 1374, 1376, 1375,
2133 1375, 1377, 1383, 1378, 1381, 1379, 1379, 1385, 1381, 1382,
2134 1386, 1390, 1382, 1384, 1385, 1387, 1389, 1388, 1384, 1387,
2135 1391, 1389, 1393, 1386, 1388, 1395, 1394, 1396, 0, 0,
2136 1397, 1405, 1400, 1393, 1385, 1401, 1411, 1386, 1410, 1413,
2137 1415, 1391, 1407, 0, 1388, 1400, 1396, 1391, 1394, 1393,
2138
2139 1416, 1407, 1419, 1394, 1396, 1397, 1395, 1397, 1405, 1400,
2140 1410, 1401, 1401, 1411, 1417, 1410, 1413, 1418, 1422, 1407,
2141 1421, 1415, 1418, 1423, 1419, 1417, 1416, 1416, 1421, 1419,
2142 1425, 1426, 1430, 1422, 1427, 0, 1432, 1428, 0, 1434,
2143 1433, 1417, 1436, 1427, 1418, 1422, 1435, 1421, 1425, 1428,
2144 1423, 1437, 1434, 1438, 0, 1439, 1441, 1425, 1432, 1430,
2145 1442, 1427, 1426, 1432, 1428, 1433, 1434, 1433, 1435, 1436,
2146 1439, 1441, 1440, 1435, 1443, 1442, 1444, 1445, 1437, 1446,
2147 1438, 1440, 1439, 1441, 1445, 1448, 1448, 1442, 1449, 1443,
2148 1447, 1450, 1456, 1451, 1452, 1449, 1451, 1453, 1444, 1440,
2149
2150 1454, 1443, 1458, 1444, 1445, 1450, 1446, 1452, 1447, 1454,
2151 1457, 1455, 1448, 1459, 1456, 1449, 1455, 1447, 1450, 1456,
2152 1451, 1452, 1460, 1453, 1453, 1464, 1463, 1454, 1467, 1458,
2153 1465, 1472, 1457, 1463, 1464, 1465, 1466, 1457, 1455, 1470,
2154 1459, 1469, 1473, 1466, 1468, 1476, 1467, 1474, 1460, 1460,
2155 1469, 1468, 1464, 1463, 1476, 1467, 1480, 1465, 1472, 1481,
2156 1473, 1475, 0, 1466, 1478, 1470, 1470, 1474, 1469, 1473,
2157 1477, 1468, 1476, 1475, 1474, 1478, 1479, 1482, 1485, 1477,
2158 1483, 1484, 0, 1480, 1479, 1493, 1482, 1486, 1475, 1484,
2159 1481, 1478, 1483, 1488, 1486, 1492, 1494, 1477, 1489, 1497,
2160
2161 1485, 1495, 1492, 1479, 1482, 1485, 1489, 1483, 1484, 1493,
2162 1496, 1488, 1493, 1495, 1486, 1498, 1501, 1500, 1502, 1496,
2163 1488, 1503, 1492, 1494, 1505, 1489, 1497, 1507, 1495, 1500,
2164 1508, 1513, 1506, 0, 1512, 1503, 1513, 1496, 1498, 1501,
2165 1506, 1515, 1498, 1501, 1500, 1502, 1514, 1516, 1503, 1524,
2166 1521, 1505, 1518, 1520, 1507, 1523, 1522, 1508, 1513, 1506,
2167 1512, 1512, 1517, 1515, 1514, 1520, 1525, 1523, 1515, 1516,
2168 1517, 1518, 1521, 1514, 1516, 1526, 1524, 1521, 1522, 1518,
2169 1520, 1527, 1523, 1522, 1528, 1534, 1529, 1530, 0, 1517,
2170 1533, 0, 1535, 1525, 0, 1526, 1536, 1538, 0, 1544,
2171
2172 1540, 1539, 1526, 1537, 1533, 1543, 1528, 0, 1544, 1538,
2173 1541, 1528, 1527, 1529, 1530, 1535, 1534, 1533, 1536, 1535,
2174 1539, 1537, 1540, 1536, 1538, 1541, 1544, 1540, 1539, 1543,
2175 1537, 1545, 1543, 1546, 1547, 0, 1548, 1541, 1549, 1551,
2176 1554, 1552, 1553, 1558, 0, 1545, 1555, 1551, 1552, 1557,
2177 1553, 1546, 1547, 1556, 1555, 1559, 1549, 1560, 1545, 1562,
2178 1546, 1547, 1548, 1548, 1563, 1549, 1551, 1554, 1552, 1553,
2179 1558, 1556, 1557, 1555, 1559, 1565, 1557, 1562, 1563, 1560,
2180 1556, 1566, 1559, 1567, 1560, 1569, 1562, 1571, 1577, 1574,
2181 0, 1563, 1575, 1576, 1566, 1567, 1574, 1578, 1565, 1579,
2182
2183 1580, 1582, 1565, 1583, 0, 1589, 1584, 0, 1566, 1580,
2184 1567, 1569, 1569, 1598, 1571, 1577, 1574, 1576, 1575, 1575,
2185 1576, 1581, 1588, 1592, 1578, 0, 1579, 1580, 1597, 1584,
2186 1583, 1587, 1582, 1584, 1581, 1587, 1589, 1593, 1593, 1594,
2187 1598, 1597, 1595, 1588, 1599, 1592, 1596, 1593, 1581, 1588,
2188 1592, 1595, 1599, 1596, 1602, 1597, 1600, 0, 1603, 1601,
2189 1605, 1594, 1587, 1604, 1593, 1593, 1594, 1601, 0, 1595,
2190 1606, 1599, 1612, 1596, 1604, 1600, 1608, 1606, 1607, 1607,
2191 1602, 1602, 1605, 1600, 1603, 1603, 1601, 1605, 1609, 1610,
2192 1604, 1614, 1616, 1613, 1608, 1609, 1610, 1606, 1617, 1612,
2193
2194 1618, 1616, 1620, 1608, 1619, 1607, 1621, 1622, 1623, 1626,
2195 1625, 0, 1640, 1614, 1620, 1609, 1610, 1613, 1614, 1616,
2196 1613, 1622, 1619, 1618, 1626, 1617, 1623, 1618, 1625, 1620,
2197 1627, 1619, 1627, 1621, 1622, 1623, 1626, 1625, 1631, 0,
2198 1632, 1633, 1635, 1640, 1636, 1638, 1639, 1636, 1641, 1643,
2199 1644, 0, 1646, 1639, 1641, 1642, 0, 1627, 1643, 1633,
2200 1631, 1650, 1651, 1638, 1635, 1631, 1632, 1632, 1633, 1635,
2201 1636, 1636, 1638, 1639, 1636, 1641, 1643, 1642, 1645, 1646,
2202 1645, 1644, 1642, 1648, 1649, 1651, 1652, 1653, 1650, 1651,
2203 1655, 1648, 1654, 1656, 1657, 1657, 1649, 1658, 1653, 1659,
2204
2205 1654, 1661, 1662, 1663, 1652, 1645, 1665, 1659, 1667, 1655,
2206 1648, 1649, 1667, 1652, 1653, 1656, 1666, 1655, 1669, 1654,
2207 1656, 1657, 1672, 1666, 1658, 1663, 1659, 1670, 1661, 1662,
2208 1663, 1671, 1673, 1665, 1674, 1667, 1671, 1675, 1677, 1676,
2209 1670, 1679, 1674, 1666, 1669, 1669, 1676, 1678, 1680, 1672,
2210 1681, 1683, 1675, 1685, 1670, 1682, 1687, 1681, 1671, 1673,
2211 1689, 1674, 1684, 1680, 1675, 1677, 1676, 1679, 1679, 1692,
2212 1684, 1678, 0, 1683, 1678, 1680, 1694, 1681, 1683, 1682,
2213 1686, 1686, 1682, 1687, 1685, 1690, 1693, 1689, 1695, 1684,
2214 1686, 1692, 1696, 1690, 1697, 1698, 1692, 1700, 1694, 1693,
2215
2216 1703, 1705, 1707, 1694, 1708, 1706, 0, 1686, 1686, 1713,
2217 0, 1709, 1690, 1693, 0, 1695, 1712, 1698, 1706, 1696,
2218 1707, 1697, 1698, 1714, 1700, 1718, 1703, 1703, 1705, 1707,
2219 1716, 1708, 1706, 1709, 1717, 1712, 1713, 1716, 1709, 1719,
2220 1720, 1717, 1721, 1712, 1722, 1714, 1725, 1718, 1723, 1723,
2221 1714, 1721, 1718, 1728, 1719, 1722, 1724, 1716, 1723, 1720,
2222 1728, 1717, 1724, 1729, 1730, 1731, 1719, 1720, 1725, 1721,
2223 1735, 1722, 1737, 1725, 1739, 1723, 1723, 1742, 1745, 1748,
2224 1728, 1740, 1746, 1724, 1743, 0, 1747, 1745, 1731, 1749,
2225 1729, 1730, 1731, 1750, 1740, 1737, 1743, 1735, 1752, 1737,
2226
2227 1746, 1739, 1773, 0, 1742, 1745, 1748, 1754, 1740, 1746,
2228 1752, 1743, 1747, 1747, 1755, 1750, 1749, 1751, 1753, 1751,
2229 1750, 1757, 1756, 1760, 1753, 1752, 1762, 1764, 1766, 1754,
2230 1756, 1767, 1769, 1773, 1754, 1768, 1755, 1772, 1774, 0,
2231 0, 1755, 0, 1766, 1751, 1753, 1775, 1768, 1757, 1756,
2232 1760, 1774, 1776, 1762, 1764, 1766, 1778, 1767, 1767, 1769,
2233 1776, 1772, 1768, 1777, 1772, 1774, 1783, 1778, 1775, 1784,
2234 1787, 1785, 1777, 1775, 1788, 1794, 1784, 1789, 1790, 1776,
2235 1791, 1796, 1795, 1778, 1785, 1789, 1787, 1790, 1788, 1783,
2236 1777, 1791, 1792, 1783, 1792, 1797, 1784, 1787, 1785, 1793,
2237
2238 1795, 1788, 1794, 1798, 1789, 1790, 1799, 1791, 1796, 1795,
2239 1800, 1793, 1800, 1802, 1809, 1801, 1803, 1810, 0, 1792,
2240 1805, 0, 1797, 1808, 1812, 1798, 1793, 1801, 1799, 1803,
2241 1798, 1808, 1805, 1799, 0, 0, 1811, 1800, 1812, 1814,
2242 1819, 1816, 1801, 1803, 1802, 1809, 1813, 1805, 1810, 1811,
2243 1808, 1812, 1814, 1815, 1813, 1816, 1817, 1818, 1827, 1820,
2244 1823, 1815, 1819, 1811, 1821, 1818, 1814, 1819, 1816, 1822,
2245 1817, 1824, 1821, 1813, 1828, 1825, 1832, 1826, 0, 1829,
2246 1815, 1820, 1823, 1817, 1818, 1826, 1820, 1823, 1836, 1827,
2247 0, 1821, 1830, 1824, 1834, 1822, 1822, 1825, 1824, 1829,
2248
2249 1830, 1828, 1825, 1831, 1826, 1833, 1829, 1832, 1834, 1837,
2250 1836, 1831, 1838, 1833, 1839, 1836, 1840, 1837, 1841, 1830,
2251 1838, 1834, 1843, 1842, 0, 1844, 1846, 1847, 1839, 1848,
2252 1831, 1842, 1833, 1845, 0, 1847, 1837, 1849, 1850, 1838,
2253 1841, 1839, 1840, 1840, 1852, 1841, 1846, 1859, 1843, 1843,
2254 1842, 1844, 1844, 1846, 1847, 1845, 1848, 1849, 1850, 1851,
2255 1845, 1853, 1855, 1856, 1849, 1850, 1852, 1851, 1857, 1853,
2256 1858, 1852, 1860, 1859, 1859, 1861, 1857, 1862, 1858, 1863,
2257 1860, 1864, 1865, 1861, 1855, 1856, 1851, 1866, 1853, 1855,
2258 1856, 1867, 1873, 1869, 1872, 1857, 1875, 1858, 1876, 1860,
2259
2260 1873, 1864, 1861, 1862, 1862, 1874, 1863, 0, 1864, 1865,
2261 0, 1867, 0, 1874, 1866, 1869, 1872, 0, 1867, 1873,
2262 1869, 1872, 0, 1875, 0, 1876, 0, 0, 0, 0,
2263 0, 0, 1874, 1880, 1880, 1880, 1880, 1880, 1880, 1880,
2264 1881, 1881, 1881, 1881, 1881, 1881, 1881, 1882, 1882, 1882,
2265 1882, 1882, 1882, 1882, 1883, 1883, 1883, 1883, 1883, 1883,
2266 1883, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1886, 1886,
2267 0, 1886, 1886, 1886, 1886, 1887, 1887, 0, 0, 0,
2268 1887, 1887, 1888, 1888, 0, 0, 1888, 0, 1888, 1889,
2269 0, 0, 0, 0, 0, 1889, 1890, 1890, 0, 0,
2270
2271 0, 1890, 1890, 1891, 0, 0, 0, 0, 0, 1891,
2272 1892, 1892, 0, 1892, 1892, 1892, 1892, 1893, 1893, 0,
2273 1893, 1893, 1893, 1893, 1879, 1879, 1879, 1879, 1879, 1879,
2274 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879,
2275 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879,
2276 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879,
2277 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879,
2278 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879,
2279 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879, 1879
1737 12, 12, 20, 23, 707, 19, 23, 29, 20, 11,
1738 23, 20, 20, 132, 21, 12, 132, 24, 83, 29,
1739 138, 21, 34, 83, 25, 28, 66, 11, 21, 20,
1740 23, 24, 25, 12, 29, 34, 11, 130, 130, 66,
1741 21, 21, 12, 24, 24, 83, 790, 28, 21, 34,
1742 25, 25, 28, 66, 30, 21, 22, 136, 24, 25,
1743
1744 22, 26, 30, 22, 26, 22, 22, 135, 30, 32,
1745 133, 26, 30, 26, 790, 32, 95, 37, 22, 37,
1746 30, 30, 31, 22, 26, 118, 31, 22, 26, 30,
1747 22, 26, 22, 22, 37, 30, 32, 35, 26, 30,
1748 26, 35, 31, 37, 37, 36, 37, 95, 31, 31,
1749 76, 35, 38, 31, 35, 36, 118, 38, 131, 36,
1750 36, 37, 129, 35, 35, 38, 68, 36, 35, 31,
1751 33, 75, 36, 76, 33, 137, 137, 76, 35, 38,
1752 33, 35, 36, 33, 38, 39, 36, 36, 62, 39,
1753 33, 80, 33, 39, 57, 75, 52, 33, 75, 51,
1754
1755 56, 33, 56, 56, 80, 56, 46, 33, 77, 41,
1756 33, 39, 39, 14, 144, 77, 39, 33, 80, 64,
1757 39, 64, 64, 67, 64, 67, 67, 69, 67, 69,
1758 69, 72, 69, 72, 72, 77, 72, 69, 78, 79,
1759 81, 72, 84, 82, 82, 144, 81, 86, 79, 89,
1760 84, 78, 82, 13, 91, 85, 64, 87, 89, 0,
1761 86, 81, 78, 88, 87, 78, 79, 81, 72, 84,
1762 82, 82, 85, 81, 86, 92, 89, 91, 78, 88,
1763 90, 91, 93, 0, 87, 0, 85, 0, 94, 90,
1764 88, 94, 96, 99, 97, 93, 99, 92, 100, 85,
1765
1766 96, 101, 92, 0, 94, 94, 98, 90, 107, 93,
1767 98, 100, 94, 103, 97, 94, 97, 107, 94, 96,
1768 99, 97, 102, 104, 101, 100, 0, 103, 101, 106,
1769 98, 94, 94, 98, 105, 107, 106, 98, 109, 108,
1770 103, 97, 102, 104, 112, 111, 0, 109, 105, 102,
1771 104, 110, 111, 113, 114, 110, 106, 115, 0, 116,
1772 113, 105, 108, 223, 119, 109, 108, 116, 114, 115,
1773 112, 112, 111, 110, 117, 154, 120, 122, 110, 119,
1774 113, 114, 110, 117, 115, 121, 116, 123, 122, 127,
1775 124, 119, 223, 123, 121, 126, 120, 125, 127, 128,
1776
1777 0, 117, 120, 120, 122, 0, 154, 0, 0, 142,
1778 126, 124, 121, 0, 123, 124, 127, 124, 0, 125,
1779 257, 128, 126, 120, 125, 134, 128, 134, 134, 139,
1780 134, 139, 139, 142, 139, 143, 142, 140, 124, 140,
1781 140, 145, 140, 147, 146, 149, 148, 257, 150, 151,
1782 0, 147, 149, 145, 151, 152, 159, 143, 148, 153,
1783 306, 306, 143, 146, 157, 160, 150, 155, 145, 0,
1784 147, 146, 149, 148, 140, 150, 158, 152, 159, 162,
1785 151, 151, 152, 159, 158, 153, 153, 160, 155, 306,
1786 157, 157, 160, 161, 0, 155, 163, 161, 164, 0,
1787
1788 165, 167, 162, 158, 166, 0, 162, 166, 168, 173,
1789 167, 164, 165, 0, 169, 155, 156, 171, 163, 166,
1790 161, 156, 0, 163, 171, 164, 156, 165, 167, 0,
1791 168, 166, 156, 156, 166, 168, 169, 170, 172, 156,
1792 173, 169, 170, 156, 171, 174, 176, 175, 156, 172,
1793 179, 0, 177, 156, 0, 178, 170, 175, 180, 156,
1794 156, 178, 181, 170, 170, 172, 182, 183, 185, 170,
1795 177, 174, 174, 189, 184, 187, 190, 176, 175, 177,
1796 180, 179, 178, 170, 175, 180, 191, 183, 184, 185,
1797 190, 186, 189, 181, 183, 185, 187, 182, 186, 188,
1798
1799 189, 184, 187, 190, 188, 192, 194, 193, 191, 197,
1800 195, 196, 196, 191, 193, 195, 198, 192, 186, 199,
1801 196, 200, 201, 198, 204, 205, 188, 202, 194, 206,
1802 203, 0, 192, 194, 193, 202, 0, 195, 196, 196,
1803 197, 200, 207, 198, 199, 203, 199, 205, 200, 209,
1804 204, 204, 211, 201, 202, 210, 205, 203, 208, 207,
1805 206, 212, 208, 210, 209, 214, 213, 207, 215, 207,
1806 217, 211, 216, 221, 205, 218, 209, 220, 0, 211,
1807 215, 216, 210, 217, 222, 208, 207, 219, 213, 219,
1808 224, 231, 212, 213, 218, 215, 214, 217, 221, 216,
1809
1810 221, 220, 218, 225, 220, 229, 233, 226, 227, 228,
1811 222, 222, 232, 230, 219, 234, 224, 224, 226, 236,
1812 227, 235, 231, 0, 0, 232, 0, 242, 229, 225,
1813 225, 230, 229, 228, 226, 227, 228, 233, 237, 232,
1814 230, 234, 234, 235, 238, 237, 239, 240, 235, 241,
1815 236, 242, 239, 238, 242, 243, 244, 245, 246, 248,
1816 0, 240, 247, 0, 243, 237, 245, 246, 249, 0,
1817 251, 238, 250, 239, 240, 241, 241, 247, 251, 244,
1818 252, 251, 243, 244, 245, 246, 255, 250, 251, 247,
1819 248, 258, 249, 261, 253, 249, 254, 251, 252, 250,
1820
1821 253, 255, 256, 256, 262, 251, 259, 252, 251, 259,
1822 254, 261, 260, 255, 263, 258, 259, 265, 258, 268,
1823 261, 253, 262, 254, 260, 264, 266, 256, 267, 256,
1824 256, 262, 270, 259, 268, 269, 259, 272, 266, 260,
1825 0, 263, 269, 265, 265, 0, 268, 264, 274, 271,
1826 267, 278, 264, 266, 276, 267, 271, 277, 273, 272,
1827 273, 274, 269, 270, 272, 0, 275, 280, 281, 275,
1828 0, 275, 276, 278, 280, 274, 271, 275, 278, 282,
1829 281, 276, 273, 279, 283, 273, 284, 273, 277, 286,
1830 0, 279, 282, 275, 280, 281, 275, 279, 275, 284,
1831
1832 283, 286, 293, 287, 290, 288, 282, 291, 283, 288,
1833 279, 283, 290, 284, 0, 0, 286, 289, 279, 291,
1834 294, 287, 0, 289, 294, 292, 0, 283, 285, 285,
1835 287, 290, 292, 293, 291, 297, 288, 296, 285, 295,
1836 285, 285, 285, 299, 289, 285, 295, 294, 298, 296,
1837 302, 300, 292, 285, 303, 285, 285, 297, 300, 304,
1838 298, 301, 297, 302, 296, 285, 295, 285, 285, 285,
1839 304, 305, 285, 307, 299, 298, 301, 302, 300, 308,
1840 307, 309, 310, 0, 312, 303, 304, 311, 301, 315,
1841 308, 318, 309, 305, 313, 310, 314, 316, 305, 319,
1842
1843 307, 317, 315, 321, 0, 314, 308, 312, 309, 310,
1844 316, 312, 311, 318, 311, 316, 315, 313, 318, 317,
1845 320, 313, 319, 314, 316, 322, 319, 323, 317, 325,
1846 324, 322, 326, 327, 321, 328, 330, 316, 320, 329,
1847 0, 331, 0, 333, 332, 351, 335, 320, 323, 328,
1848 332, 325, 322, 324, 323, 327, 325, 324, 326, 326,
1849 327, 333, 328, 334, 331, 329, 329, 330, 331, 335,
1850 333, 332, 336, 335, 337, 338, 351, 339, 334, 341,
1851 342, 338, 344, 0, 345, 348, 342, 348, 0, 343,
1852 334, 345, 355, 0, 348, 346, 337, 353, 336, 336,
1853
1854 344, 337, 338, 339, 339, 341, 341, 342, 343, 344,
1855 346, 345, 348, 349, 348, 350, 343, 352, 354, 353,
1856 349, 356, 346, 355, 353, 0, 357, 358, 350, 360,
1857 0, 357, 359, 358, 0, 352, 361, 354, 362, 363,
1858 349, 360, 350, 356, 352, 354, 0, 363, 383, 362,
1859 365, 0, 356, 357, 358, 359, 360, 365, 361, 359,
1860 366, 367, 0, 361, 368, 362, 363, 369, 366, 383,
1861 356, 364, 367, 368, 370, 383, 364, 365, 364, 0,
1862 371, 370, 372, 0, 372, 373, 364, 366, 367, 364,
1863 374, 369, 376, 375, 369, 368, 364, 364, 364, 0,
1864
1865 368, 370, 374, 364, 376, 364, 371, 371, 375, 372,
1866 377, 373, 373, 364, 379, 380, 364, 374, 377, 376,
1867 375, 378, 381, 364, 385, 386, 378, 382, 387, 0,
1868 381, 388, 389, 380, 390, 391, 379, 377, 393, 382,
1869 388, 379, 380, 387, 395, 392, 389, 385, 378, 381,
1870 394, 385, 396, 390, 382, 387, 386, 398, 388, 389,
1871 392, 390, 391, 397, 396, 394, 402, 399, 395, 393,
1872 399, 395, 392, 401, 403, 404, 400, 394, 399, 396,
1873 400, 398, 405, 406, 398, 397, 407, 401, 410, 408,
1874 397, 409, 412, 402, 399, 408, 410, 399, 411, 413,
1875
1876 401, 403, 414, 416, 415, 417, 404, 400, 0, 405,
1877 406, 415, 425, 409, 421, 410, 408, 407, 409, 420,
1878 418, 411, 413, 412, 414, 411, 413, 417, 420, 414,
1879 419, 415, 417, 418, 416, 419, 422, 423, 424, 419,
1880 421, 421, 426, 425, 427, 422, 420, 418, 429, 0,
1881 428, 424, 430, 431, 419, 435, 432, 419, 0, 423,
1882 426, 436, 419, 422, 423, 424, 419, 431, 427, 426,
1883 429, 427, 428, 428, 430, 429, 433, 428, 432, 430,
1884 431, 434, 436, 432, 439, 437, 435, 433, 436, 438,
1885 442, 440, 441, 443, 444, 446, 434, 447, 0, 428,
1886
1887 440, 447, 445, 433, 450, 441, 439, 0, 434, 437,
1888 448, 439, 437, 438, 0, 443, 438, 446, 440, 441,
1889 443, 442, 446, 452, 448, 444, 445, 449, 447, 445,
1890 451, 453, 454, 458, 455, 450, 454, 448, 452, 457,
1891 459, 449, 458, 456, 460, 462, 0, 452, 451, 459,
1892 452, 456, 460, 453, 449, 461, 463, 451, 453, 455,
1893 458, 455, 461, 454, 457, 452, 457, 459, 462, 464,
1894 456, 460, 462, 471, 463, 465, 467, 466, 468, 469,
1895 0, 464, 461, 463, 465, 466, 470, 469, 467, 472,
1896 475, 473, 474, 479, 470, 0, 464, 476, 0, 471,
1897
1898 471, 475, 465, 467, 466, 476, 469, 473, 477, 468,
1899 478, 480, 472, 470, 474, 479, 472, 475, 473, 474,
1900 479, 481, 477, 482, 476, 483, 484, 486, 0, 485,
1901 478, 480, 490, 487, 483, 477, 488, 478, 480, 495,
1902 486, 489, 0, 481, 493, 482, 484, 485, 481, 492,
1903 482, 487, 483, 484, 486, 490, 485, 492, 488, 490,
1904 487, 491, 493, 488, 497, 489, 496, 491, 489, 499,
1905 495, 493, 500, 496, 498, 492, 492, 502, 499, 501,
1906 503, 0, 503, 506, 492, 516, 502, 497, 491, 498,
1907 509, 497, 513, 496, 0, 506, 499, 515, 501, 518,
1908
1909 509, 498, 512, 500, 502, 514, 501, 503, 504, 519,
1910 506, 0, 504, 513, 521, 504, 516, 509, 519, 513,
1911 512, 518, 504, 515, 515, 504, 518, 0, 514, 512,
1912 504, 520, 514, 520, 522, 504, 519, 541, 521, 504,
1913 523, 521, 504, 0, 0, 0, 524, 0, 526, 504,
1914 525, 530, 504, 517, 517, 0, 517, 0, 520, 517,
1915 523, 522, 525, 527, 517, 528, 529, 523, 541, 0,
1916 517, 517, 524, 524, 526, 526, 530, 525, 530, 517,
1917 517, 517, 535, 517, 534, 527, 517, 531, 529, 528,
1918 527, 517, 528, 529, 532, 531, 533, 517, 517, 540,
1919
1920 536, 532, 537, 534, 533, 542, 539, 538, 535, 535,
1921 0, 534, 536, 543, 531, 537, 538, 544, 0, 551,
1922 545, 532, 546, 533, 0, 554, 540, 536, 539, 537,
1923 548, 0, 552, 539, 538, 549, 542, 543, 544, 545,
1924 543, 546, 547, 557, 544, 550, 551, 545, 553, 546,
1925 552, 547, 548, 550, 561, 549, 554, 548, 555, 552,
1926 558, 557, 549, 560, 559, 562, 555, 553, 563, 547,
1927 557, 563, 550, 566, 564, 553, 560, 562, 558, 566,
1928 561, 561, 564, 567, 0, 555, 580, 558, 559, 569,
1929 560, 559, 562, 568, 572, 563, 569, 570, 564, 568,
1930
1931 566, 564, 570, 573, 571, 567, 574, 576, 577, 564,
1932 567, 571, 572, 580, 575, 574, 569, 579, 583, 578,
1933 568, 572, 575, 577, 570, 576, 573, 582, 584, 581,
1934 573, 571, 578, 574, 576, 577, 581, 585, 579, 586,
1935 582, 575, 587, 588, 579, 589, 578, 586, 590, 583,
1936 591, 589, 592, 593, 582, 595, 581, 587, 597, 584,
1937 585, 596, 593, 594, 585, 588, 586, 599, 596, 587,
1938 588, 600, 589, 598, 590, 590, 592, 594, 601, 592,
1939 593, 591, 598, 600, 602, 597, 595, 607, 596, 604,
1940 594, 0, 602, 603, 599, 608, 603, 605, 600, 613,
1941
1942 598, 601, 604, 609, 605, 601, 0, 610, 0, 610,
1943 614, 602, 611, 607, 607, 609, 604, 612, 608, 615,
1944 603, 613, 608, 614, 605, 606, 613, 606, 616, 612,
1945 609, 606, 615, 606, 610, 611, 617, 614, 606, 611,
1946 618, 621, 619, 606, 612, 624, 615, 621, 617, 606,
1947 618, 616, 606, 620, 606, 616, 625, 623, 606, 622,
1948 606, 0, 618, 617, 619, 606, 620, 618, 621, 619,
1949 606, 628, 622, 627, 630, 632, 624, 618, 623, 636,
1950 620, 631, 629, 625, 623, 639, 622, 626, 627, 630,
1951 634, 633, 626, 628, 626, 629, 635, 632, 628, 637,
1952
1953 627, 630, 632, 634, 635, 626, 636, 631, 631, 629,
1954 633, 640, 626, 626, 626, 642, 639, 634, 633, 626,
1955 641, 626, 637, 635, 643, 645, 637, 644, 641, 642,
1956 646, 0, 626, 645, 647, 640, 649, 650, 640, 626,
1957 648, 655, 642, 651, 649, 647, 0, 641, 646, 644,
1958 651, 0, 645, 652, 644, 643, 654, 646, 648, 650,
1959 657, 647, 653, 649, 650, 659, 652, 648, 657, 653,
1960 651, 660, 655, 658, 654, 661, 663, 659, 664, 662,
1961 652, 665, 658, 654, 671, 0, 669, 657, 668, 653,
1962 669, 0, 659, 660, 663, 666, 676, 661, 660, 668,
1963
1964 658, 662, 661, 663, 664, 664, 662, 670, 671, 666,
1965 670, 671, 665, 672, 673, 668, 674, 669, 675, 684,
1966 676, 673, 666, 676, 677, 675, 672, 678, 674, 681,
1967 677, 679, 0, 670, 670, 680, 682, 670, 678, 683,
1968 672, 673, 0, 674, 687, 675, 684, 682, 0, 685,
1969 681, 677, 686, 679, 678, 688, 681, 680, 679, 692,
1970 683, 686, 680, 682, 688, 689, 683, 685, 687, 691,
1971 690, 687, 693, 689, 697, 696, 685, 690, 694, 686,
1972 699, 700, 688, 691, 696, 701, 703, 698, 0, 0,
1973 692, 0, 689, 0, 693, 699, 691, 690, 697, 693,
1974
1975 694, 697, 696, 698, 706, 694, 702, 699, 705, 704,
1976 709, 708, 700, 703, 698, 710, 701, 704, 702, 706,
1977 708, 705, 711, 710, 711, 717, 713, 715, 709, 716,
1978 718, 706, 717, 702, 713, 705, 704, 709, 708, 719,
1979 715, 716, 710, 0, 720, 721, 722, 723, 727, 711,
1980 0, 725, 717, 713, 715, 724, 716, 726, 730, 722,
1981 723, 718, 733, 725, 728, 726, 720, 721, 727, 0,
1982 719, 720, 721, 722, 723, 727, 728, 724, 725, 729,
1983 731, 732, 724, 733, 726, 730, 735, 729, 734, 733,
1984 732, 728, 736, 731, 739, 734, 737, 738, 742, 741,
1985
1986 740, 0, 0, 743, 762, 0, 729, 731, 732, 740,
1987 738, 743, 735, 735, 736, 734, 737, 741, 739, 736,
1988 742, 739, 744, 737, 738, 742, 741, 740, 745, 747,
1989 743, 749, 748, 750, 751, 762, 745, 752, 753, 754,
1990 0, 750, 755, 749, 744, 756, 751, 754, 755, 744,
1991 748, 758, 747, 753, 756, 745, 747, 752, 749, 748,
1992 750, 751, 757, 758, 752, 753, 754, 759, 760, 755,
1993 765, 763, 756, 764, 759, 767, 768, 765, 758, 766,
1994 768, 0, 771, 757, 763, 769, 760, 773, 774, 757,
1995 767, 770, 764, 769, 759, 760, 772, 765, 763, 775,
1996
1997 764, 766, 767, 777, 770, 773, 766, 768, 771, 771,
1998 772, 776, 769, 778, 773, 779, 780, 781, 770, 774,
1999 783, 777, 784, 772, 782, 775, 775, 785, 786, 783,
2000 777, 0, 0, 776, 780, 778, 787, 782, 776, 781,
2001 778, 779, 779, 780, 781, 791, 0, 783, 0, 796,
2002 786, 782, 789, 784, 793, 786, 794, 795, 785, 787,
2003 0, 791, 805, 787, 788, 807, 795, 796, 794, 788,
2004 797, 788, 791, 788, 797, 788, 796, 793, 789, 789,
2005 798, 793, 788, 794, 795, 800, 799, 802, 803, 805,
2006 801, 788, 807, 798, 799, 809, 788, 803, 788, 806,
2007
2008 788, 797, 788, 801, 800, 802, 804, 798, 804, 810,
2009 811, 806, 800, 799, 802, 803, 812, 801, 811, 809,
2010 813, 814, 809, 815, 816, 817, 806, 813, 818, 0,
2011 816, 810, 819, 804, 820, 818, 810, 811, 821, 827,
2012 822, 824, 828, 812, 825, 815, 830, 813, 814, 823,
2013 815, 816, 817, 820, 819, 818, 829, 831, 823, 819,
2014 821, 820, 824, 833, 825, 821, 822, 822, 824, 834,
2015 827, 825, 832, 828, 835, 831, 823, 830, 829, 833,
2016 832, 835, 836, 829, 831, 838, 840, 837, 841, 836,
2017 833, 837, 839, 840, 843, 842, 834, 848, 839, 832,
2018
2019 844, 835, 846, 841, 842, 839, 845, 844, 845, 836,
2020 847, 846, 850, 840, 837, 841, 838, 854, 856, 839,
2021 843, 843, 842, 852, 848, 839, 849, 844, 855, 846,
2022 849, 852, 847, 845, 850, 854, 853, 847, 857, 850,
2023 853, 858, 0, 856, 854, 856, 859, 855, 860, 861,
2024 852, 857, 863, 849, 865, 855, 864, 861, 862, 862,
2025 869, 863, 0, 865, 860, 857, 867, 853, 869, 859,
2026 866, 868, 858, 859, 872, 860, 861, 866, 864, 863,
2027 868, 865, 871, 864, 870, 862, 872, 869, 873, 867,
2028 875, 877, 879, 867, 874, 871, 876, 866, 868, 870,
2029
2030 873, 872, 874, 881, 883, 878, 884, 885, 880, 871,
2031 879, 870, 875, 877, 878, 873, 876, 875, 877, 879,
2032 880, 874, 882, 876, 881, 886, 883, 887, 882, 889,
2033 881, 883, 878, 891, 890, 880, 892, 884, 885, 894,
2034 895, 896, 891, 897, 895, 896, 893, 894, 903, 882,
2035 897, 886, 886, 887, 887, 0, 889, 890, 892, 893,
2036 891, 890, 902, 892, 900, 900, 894, 898, 899, 901,
2037 897, 895, 896, 893, 904, 898, 899, 901, 905, 903,
2038 906, 909, 904, 902, 907, 908, 905, 909, 906, 902,
2039 910, 900, 907, 911, 898, 899, 901, 912, 908, 913,
2040
2041 914, 904, 910, 915, 917, 905, 916, 906, 909, 919,
2042 918, 907, 908, 923, 913, 922, 925, 910, 917, 911,
2043 911, 912, 922, 919, 912, 915, 913, 914, 918, 916,
2044 915, 917, 928, 916, 920, 924, 919, 918, 920, 925,
2045 923, 926, 922, 925, 930, 927, 934, 932, 0, 933,
2046 926, 920, 927, 930, 936, 938, 939, 924, 943, 920,
2047 941, 920, 924, 928, 942, 920, 945, 939, 926, 932,
2048 943, 930, 927, 946, 932, 933, 933, 934, 920, 945,
2049 947, 936, 938, 939, 941, 943, 944, 941, 944, 948,
2050 942, 942, 947, 945, 949, 946, 950, 951, 952, 0,
2051
2052 946, 949, 951, 953, 954, 955, 957, 947, 958, 0,
2053 960, 964, 954, 944, 952, 959, 948, 958, 961, 0,
2054 0, 949, 950, 950, 951, 952, 953, 955, 959, 964,
2055 953, 954, 955, 957, 962, 958, 960, 960, 964, 963,
2056 961, 962, 959, 965, 966, 961, 963, 969, 968, 970,
2057 965, 967, 0, 0, 969, 972, 973, 974, 0, 977,
2058 975, 962, 977, 978, 982, 974, 963, 0, 972, 966,
2059 965, 966, 983, 967, 969, 985, 979, 987, 967, 968,
2060 970, 975, 972, 973, 974, 980, 977, 975, 984, 978,
2061 978, 979, 980, 981, 983, 982, 981, 985, 986, 983,
2062
2063 986, 987, 985, 979, 987, 988, 984, 989, 981, 0,
2064 990, 992, 980, 991, 993, 984, 995, 981, 992, 990,
2065 981, 991, 994, 981, 996, 986, 997, 998, 996, 1003,
2066 999, 1006, 1000, 989, 989, 981, 988, 990, 992, 1001,
2067 991, 1000, 1003, 1002, 994, 993, 1001, 995, 997, 994,
2068 1002, 996, 999, 997, 998, 1005, 1003, 999, 1004, 1000,
2069 1007, 1008, 1006, 1009, 1012, 1010, 1001, 1007, 1008, 1005,
2070 1002, 1010, 1013, 1004, 1014, 1015, 1009, 1021, 1016, 1021,
2071 1022, 1016, 1005, 1030, 1024, 1004, 1014, 1007, 1008, 1017,
2072 1009, 1012, 1010, 1023, 1013, 1015, 1016, 1026, 1019, 1013,
2073
2074 1017, 1014, 1015, 1019, 1021, 1016, 1024, 1022, 1016, 1029,
2075 1019, 1024, 1025, 1027, 1030, 1026, 1017, 1023, 1031, 1028,
2076 1023, 1027, 1028, 1025, 1026, 1019, 1032, 1029, 1033, 1034,
2077 1019, 1035, 1036, 1032, 1041, 1037, 1029, 1028, 1034, 1025,
2078 1027, 1049, 1033, 1036, 1035, 1031, 1028, 0, 1040, 1028,
2079 1037, 1043, 1039, 1032, 1039, 1033, 1034, 1040, 1035, 1036,
2080 1041, 1041, 1037, 1042, 1044, 1052, 1045, 1046, 1047, 1043,
2081 1046, 0, 1049, 1050, 1042, 1040, 1051, 1047, 1043, 1039,
2082 1045, 1053, 1050, 1055, 0, 1046, 1044, 1065, 0, 0,
2083 1042, 1044, 1045, 1045, 1046, 1047, 1052, 1046, 1051, 1054,
2084
2085 1050, 1056, 1053, 1051, 1060, 1057, 1054, 1045, 1053, 1062,
2086 1063, 1057, 1060, 1064, 1055, 1056, 1061, 1069, 1065, 1063,
2087 1071, 1064, 1066, 1062, 1069, 1067, 1054, 1070, 1056, 1057,
2088 1074, 1060, 1057, 1066, 1067, 1061, 1062, 1063, 1057, 1072,
2089 1064, 1073, 1071, 1061, 1069, 1078, 1077, 1071, 1074, 1066,
2090 1070, 1075, 1067, 1084, 1070, 1075, 1079, 1074, 1077, 1080,
2091 1081, 1072, 1082, 1073, 1087, 1085, 1072, 1086, 1073, 1079,
2092 1088, 1089, 1078, 1077, 1083, 1081, 1086, 1082, 1075, 1080,
2093 1085, 1090, 1083, 1079, 1084, 1087, 1080, 1081, 1092, 1082,
2094 1094, 1087, 1085, 1093, 1086, 1089, 1096, 1088, 1089, 1095,
2095
2096 1099, 1083, 1100, 1097, 1098, 1104, 1102, 1105, 1090, 0,
2097 1092, 1093, 1099, 1102, 1095, 1092, 1103, 1094, 1096, 1098,
2098 1093, 1097, 1101, 1096, 1100, 1109, 1095, 1099, 1103, 1100,
2099 1097, 1098, 1104, 1102, 1108, 1101, 1106, 1107, 1105, 1110,
2100 1101, 1108, 1106, 1103, 1111, 1107, 1110, 1112, 1113, 1101,
2101 1114, 1115, 1109, 1112, 1116, 1118, 1119, 1120, 1121, 1124,
2102 1121, 1108, 1101, 1106, 1107, 1119, 1110, 1122, 0, 1123,
2103 1128, 1111, 1126, 1114, 1112, 1113, 1131, 1114, 1116, 1126,
2104 1127, 1116, 1115, 1119, 1133, 1121, 1118, 1127, 1120, 1131,
2105 1124, 1125, 1125, 1125, 1122, 1123, 1123, 1129, 1125, 1126,
2106
2107 1135, 1128, 1132, 1131, 1129, 1136, 1125, 1127, 1132, 1134,
2108 1134, 1133, 1136, 1138, 1139, 1141, 1137, 1142, 1125, 1125,
2109 1125, 1137, 1143, 1152, 1129, 1125, 1135, 1135, 1144, 1132,
2110 1146, 1146, 1136, 1141, 1143, 1145, 1134, 1147, 1151, 1138,
2111 1138, 1139, 1141, 1137, 1142, 1148, 1148, 1149, 1144, 1143,
2112 1154, 1155, 1153, 1145, 1152, 1144, 1156, 1146, 1149, 1153,
2113 1151, 1157, 1145, 1147, 1147, 1151, 1159, 1158, 1160, 0,
2114 1154, 1162, 1148, 1161, 1149, 1160, 1164, 1154, 1163, 1153,
2115 1166, 1161, 1155, 1179, 1159, 1164, 1162, 1156, 1157, 1158,
2116 1165, 1165, 1167, 1159, 1158, 1160, 1169, 1170, 1162, 1173,
2117
2118 1161, 1168, 1163, 1164, 1167, 1163, 1166, 1166, 1169, 1168,
2119 1171, 1172, 1175, 1180, 1179, 1182, 1174, 1165, 1178, 1167,
2120 1170, 1174, 1177, 1169, 1170, 1178, 1173, 1176, 1168, 1172,
2121 1181, 1171, 1174, 1176, 1181, 1177, 1184, 1171, 1172, 1175,
2122 1180, 1183, 1183, 1174, 1185, 1178, 1182, 1186, 1174, 1177,
2123 1187, 1184, 1188, 1189, 1176, 1189, 1190, 1192, 1195, 1191,
2124 0, 1181, 1186, 1184, 1191, 1196, 1193, 1188, 1183, 1197,
2125 1198, 1199, 1201, 1187, 1186, 1185, 1207, 1187, 1199, 1188,
2126 1189, 1193, 1195, 1200, 1202, 1195, 1191, 1190, 1192, 1203,
2127 1205, 1196, 1196, 1193, 1201, 1211, 1197, 1198, 1199, 1201,
2128
2129 1207, 1213, 1212, 1207, 1200, 1202, 1208, 1203, 1210, 1212,
2130 1200, 1202, 1205, 1216, 1219, 1214, 1203, 1205, 1215, 1213,
2131 1218, 1208, 1211, 1210, 1214, 1217, 1215, 1219, 1213, 1212,
2132 1222, 0, 1221, 1208, 1226, 1210, 1216, 1223, 1224, 1222,
2133 1216, 1219, 1214, 1221, 1232, 1215, 0, 1217, 0, 1228,
2134 1230, 1218, 1217, 1231, 1235, 1223, 1224, 1222, 1221, 1221,
2135 1228, 1226, 1230, 1233, 1223, 1224, 1231, 1234, 1236, 1238,
2136 1221, 1239, 1243, 1233, 1240, 1232, 1228, 1230, 1239, 1235,
2137 1231, 1235, 1242, 0, 1241, 1246, 1246, 1243, 1242, 1238,
2138 1233, 1244, 1245, 1234, 1234, 1236, 1238, 1248, 1239, 1243,
2139
2140 1240, 1240, 1241, 1247, 1248, 1251, 1244, 1245, 1252, 1242,
2141 1249, 1241, 1246, 1253, 1254, 1247, 0, 1249, 1244, 1245,
2142 1257, 1259, 1253, 1255, 1248, 1260, 1268, 1251, 1261, 1261,
2143 1247, 1262, 1251, 1252, 1259, 1252, 1254, 1249, 1257, 1263,
2144 1253, 1254, 1266, 1255, 1271, 1264, 1265, 1257, 1259, 1267,
2145 1255, 1266, 1260, 1262, 1279, 1261, 1267, 1268, 1262, 1269,
2146 1270, 1275, 1273, 1271, 1263, 1274, 1263, 1264, 1265, 1266,
2147 1273, 1271, 1264, 1265, 1270, 1276, 1267, 1278, 1274, 1277,
2148 0, 1269, 1281, 1280, 1278, 1279, 1269, 1270, 1275, 1273,
2149 1284, 1277, 1274, 1282, 1283, 1285, 1286, 1283, 1287, 0,
2150
2151 0, 1276, 1276, 0, 1278, 1280, 1277, 1281, 1282, 1281,
2152 1280, 1289, 1283, 1287, 1286, 1284, 1292, 1284, 1290, 1293,
2153 1282, 1283, 1285, 1286, 1283, 1287, 1293, 1294, 1295, 1297,
2154 1292, 1299, 1300, 1289, 1303, 1301, 1294, 1301, 1289, 1295,
2155 1290, 1305, 1302, 1292, 1300, 1290, 1293, 1304, 1307, 1306,
2156 1297, 1308, 1299, 1309, 1294, 1295, 1297, 1306, 1299, 1300,
2157 1302, 1303, 1301, 1311, 1315, 1304, 1310, 1309, 1305, 1302,
2158 1310, 1307, 1312, 1308, 1304, 1307, 1306, 1316, 1308, 1312,
2159 1309, 1317, 1311, 1318, 1320, 1319, 1321, 0, 1323, 0,
2160 1311, 1315, 1322, 1320, 1325, 1316, 1325, 1310, 1326, 1312,
2161
2162 1319, 1327, 1329, 1332, 1316, 1327, 1328, 1330, 1317, 1318,
2163 1318, 1320, 1319, 1333, 1322, 1323, 1330, 1321, 1328, 1322,
2164 1326, 1325, 1335, 1334, 1329, 1326, 1331, 1344, 1327, 1329,
2165 1332, 1336, 1336, 1328, 1330, 1334, 1333, 1331, 1337, 1339,
2166 1333, 1340, 1344, 1347, 1335, 1340, 1337, 1339, 1341, 1335,
2167 1334, 1341, 1342, 1331, 1344, 1343, 1345, 1348, 1336, 1349,
2168 1342, 1343, 1345, 1350, 1351, 1337, 1339, 1352, 1340, 1353,
2169 1347, 1354, 1357, 1349, 1356, 1341, 1350, 1355, 1351, 1342,
2170 1358, 1348, 1343, 1345, 1348, 1359, 1349, 1360, 1356, 1355,
2171 1350, 1351, 1361, 1352, 1352, 1360, 1353, 1362, 1354, 1357,
2172
2173 1363, 1356, 1364, 1365, 1355, 1368, 1362, 1358, 1369, 1367,
2174 1370, 1365, 1359, 1371, 1360, 1373, 1369, 1372, 1375, 1361,
2175 1376, 1377, 1371, 1379, 1362, 0, 1374, 1363, 1376, 1364,
2176 1365, 1367, 1368, 1377, 1383, 1369, 1367, 1370, 1372, 1373,
2177 1371, 1374, 1373, 1378, 1372, 1375, 1383, 1376, 1377, 1381,
2178 1379, 1378, 1374, 1374, 1382, 1384, 1381, 1385, 1382, 1386,
2179 1387, 1383, 1388, 1388, 1389, 1390, 0, 1386, 1374, 1396,
2180 1378, 1393, 1394, 1392, 1394, 1396, 1381, 1403, 1384, 1397,
2181 1395, 1382, 1384, 1390, 1385, 1399, 1386, 1387, 1392, 1388,
2182 1389, 1389, 1390, 1393, 1395, 1398, 1396, 1399, 1393, 1394,
2183
2184 1392, 1397, 1400, 1401, 1404, 1402, 1397, 1395, 1403, 1406,
2185 1408, 1410, 1399, 1409, 0, 0, 1406, 1398, 1402, 1417,
2186 1400, 1401, 1398, 1414, 0, 1411, 1415, 1404, 1408, 1400,
2187 1401, 1404, 1402, 1411, 1417, 1414, 1406, 1408, 1419, 1409,
2188 1409, 1412, 1410, 1412, 1415, 1420, 1417, 1421, 1412, 1422,
2189 1414, 1411, 1411, 1415, 1421, 1423, 1425, 1433, 1426, 1435,
2190 1411, 1427, 1419, 1428, 1422, 1419, 1429, 1420, 1412, 1430,
2191 1412, 1426, 1420, 1431, 1421, 1436, 1422, 1430, 1428, 1429,
2192 1433, 1434, 1423, 1425, 1433, 1426, 1435, 1427, 1427, 1443,
2193 1428, 1437, 1440, 1429, 1438, 1442, 1430, 1436, 1437, 1431,
2194
2195 1431, 1438, 1436, 1439, 1441, 1434, 1444, 1447, 1434, 1448,
2196 1450, 1441, 1446, 1468, 1458, 1440, 1439, 1442, 1437, 1440,
2197 1443, 1438, 1442, 1446, 1449, 1453, 1463, 1444, 1454, 1447,
2198 1439, 1441, 1464, 1444, 1447, 1450, 1460, 1450, 1453, 1446,
2199 1448, 1458, 1466, 1449, 1468, 1460, 1469, 1470, 1463, 1472,
2200 1476, 1449, 1453, 1463, 1454, 1454, 1471, 1474, 1470, 1464,
2201 1475, 1471, 1478, 1460, 1479, 1474, 1481, 1483, 0, 1466,
2202 1480, 1472, 1469, 1469, 1470, 1475, 1472, 1476, 1481, 1480,
2203 1478, 1485, 1486, 1471, 1474, 1487, 1489, 1475, 1488, 1478,
2204 1490, 1491, 1493, 1481, 1483, 1479, 1492, 1480, 1487, 1494,
2205
2206 1498, 1493, 0, 1485, 0, 1495, 1496, 1486, 1485, 1486,
2207 1488, 1492, 1487, 1489, 1497, 1488, 1500, 1490, 1491, 1493,
2208 1495, 1496, 1498, 1492, 1499, 1494, 1494, 1498, 1501, 1497,
2209 1503, 1499, 1495, 1496, 1502, 1502, 1504, 1503, 1507, 1505,
2210 1506, 1497, 1505, 1500, 1508, 1509, 1501, 1510, 1511, 1513,
2211 1504, 1499, 1510, 1506, 1509, 1501, 1512, 1503, 1514, 0,
2212 1515, 1502, 1508, 1504, 1507, 1507, 1505, 1506, 1519, 1527,
2213 1511, 1508, 1509, 1518, 1510, 1511, 1513, 1519, 1512, 1520,
2214 1518, 1521, 1524, 1512, 1520, 1514, 1515, 1515, 1521, 1522,
2215 1523, 1524, 1525, 1528, 1529, 1519, 1527, 1523, 1531, 1536,
2216
2217 1518, 1534, 1530, 1529, 1532, 1533, 1520, 1522, 1521, 1524,
2218 1531, 1528, 1534, 1532, 1533, 1535, 1522, 1523, 1525, 1525,
2219 1528, 1529, 1530, 1535, 1537, 1531, 1536, 1538, 1534, 1530,
2220 1540, 1532, 1533, 1539, 1541, 1544, 1538, 1542, 1540, 1545,
2221 0, 1548, 1535, 1549, 1542, 1539, 1550, 1545, 1548, 1552,
2222 1553, 1551, 1554, 1544, 1538, 1537, 1541, 1540, 1552, 1556,
2223 1539, 1541, 1544, 1551, 1542, 1557, 1545, 1549, 1548, 1558,
2224 1549, 1556, 1561, 1550, 1562, 1554, 1552, 1553, 1551, 1554,
2225 1559, 1563, 1562, 1564, 0, 1568, 1556, 1571, 1557, 1570,
2226 1569, 1572, 1557, 1573, 1559, 1569, 1558, 1577, 1574, 1561,
2227
2228 1575, 1562, 1581, 1570, 1578, 1571, 1574, 1559, 1563, 1577,
2229 1564, 1568, 1568, 1572, 1571, 1573, 1570, 1569, 1572, 1575,
2230 1573, 1579, 1580, 1582, 1577, 1574, 1578, 1575, 0, 1581,
2231 1585, 1578, 1583, 1584, 1580, 1586, 1587, 1588, 1592, 1591,
2232 0, 0, 0, 1579, 1593, 0, 1594, 1595, 1579, 1580,
2233 1582, 1642, 1583, 1591, 1598, 1584, 1597, 1586, 1596, 1583,
2234 1584, 1585, 1586, 1587, 1588, 1595, 1591, 1593, 1594, 1592,
2235 1596, 1593, 1599, 1594, 1595, 1597, 1598, 1601, 1602, 1603,
2236 1604, 1598, 1642, 1597, 1605, 1596, 1607, 1599, 1603, 1610,
2237 1606, 1608, 1613, 0, 1604, 0, 1611, 1610, 1616, 1599,
2238
2239 1602, 1601, 1605, 1611, 1601, 1602, 1603, 1604, 1606, 1608,
2240 1617, 1605, 1607, 1607, 1612, 1615, 1610, 1606, 1608, 1613,
2241 1614, 1616, 1612, 1611, 1618, 1616, 1619, 1621, 1614, 1624,
2242 1622, 0, 1628, 1615, 1626, 1630, 1625, 1617, 1634, 1635,
2243 0, 1612, 1615, 1618, 1622, 1621, 1626, 1614, 1619, 1625,
2244 1636, 1618, 1624, 1619, 1621, 1637, 1624, 1622, 1628, 1628,
2245 1633, 1626, 1630, 1625, 1634, 1634, 1635, 1633, 1638, 1639,
2246 1640, 1641, 1643, 1649, 1636, 1650, 1647, 1636, 1644, 1640,
2247 1647, 1648, 1637, 0, 1641, 1648, 1659, 1633, 1653, 1655,
2248 0, 1658, 1654, 1654, 1649, 1638, 1639, 1640, 1641, 1643,
2249
2250 1649, 1644, 1654, 1656, 1658, 1644, 1650, 1647, 1648, 1660,
2251 1653, 1655, 1656, 1659, 1657, 1653, 1655, 1660, 1658, 1654,
2252 1654, 1657, 1663, 1661, 1662, 0, 1664, 0, 1665, 1666,
2253 1656, 1668, 1662, 1669, 1669, 1667, 1660, 1671, 1668, 1672,
2254 1666, 1657, 1661, 1670, 1671, 1674, 1672, 1675, 1663, 1663,
2255 1661, 1662, 1664, 1664, 1665, 1665, 1666, 1667, 1668, 1676,
2256 1669, 1670, 1667, 1679, 1671, 1680, 1672, 1678, 1682, 1681,
2257 1670, 1675, 1674, 1683, 1675, 1684, 1678, 1683, 1688, 1685,
2258 1682, 1676, 1687, 1690, 1704, 1690, 1676, 1681, 1680, 1684,
2259 1679, 1694, 1680, 1688, 1678, 1682, 1681, 1685, 1695, 1696,
2260
2261 1687, 1698, 1684, 1701, 1683, 1688, 1685, 0, 1699, 1687,
2262 1690, 1699, 1703, 1694, 1702, 1704, 1705, 1696, 1694, 1703,
2263 1706, 1708, 1705, 1698, 1695, 1695, 1696, 1707, 1698, 1709,
2264 1701, 1709, 1702, 1710, 1699, 1699, 1707, 1712, 1699, 1703,
2265 1714, 1702, 1706, 1705, 1718, 1712, 1713, 1706, 1715, 1716,
2266 1717, 1719, 1708, 0, 1707, 1718, 1709, 1721, 1713, 1719,
2267 1710, 1720, 1715, 1723, 1712, 1722, 1722, 1714, 1717, 1726,
2268 1727, 1718, 1716, 1713, 1724, 1715, 1716, 1717, 1719, 1721,
2269 1720, 1728, 1724, 1730, 1721, 1732, 1731, 1733, 1720, 1732,
2270 1723, 1735, 1722, 1731, 1736, 1733, 1726, 1727, 1738, 1737,
2271
2272 1739, 1724, 1742, 1728, 1737, 1741, 1743, 1736, 1728, 1742,
2273 1730, 1740, 1732, 1731, 1733, 1744, 1747, 1735, 1735, 1740,
2274 1741, 1736, 1745, 1748, 1750, 1738, 1737, 1739, 1749, 1742,
2275 1748, 1747, 1741, 1743, 1752, 1754, 1751, 1756, 1740, 1744,
2276 1759, 1761, 1744, 1747, 1751, 1757, 1750, 1760, 1745, 1745,
2277 1748, 1750, 1749, 1757, 1761, 1749, 1753, 1753, 1762, 1763,
2278 1764, 1765, 1754, 1751, 1756, 1752, 1753, 1759, 1761, 1760,
2279 1766, 1768, 1757, 1771, 1760, 1773, 1774, 1776, 1777, 1782,
2280 1762, 0, 0, 1753, 1753, 1762, 1763, 1764, 1765, 1774,
2281 1778, 1781, 1766, 1783, 1775, 1776, 1788, 1766, 1768, 1771,
2282
2283 1771, 1775, 1773, 1774, 1776, 1777, 1782, 1785, 1787, 1786,
2284 1781, 1788, 1778, 1789, 1785, 1783, 1786, 1778, 1781, 1790,
2285 1783, 1775, 1791, 1788, 1799, 1793, 1794, 1800, 1790, 1805,
2286 1787, 1793, 1789, 1791, 1785, 1787, 1786, 1792, 1792, 1801,
2287 1789, 1809, 0, 1797, 1807, 1811, 1790, 1792, 1794, 1791,
2288 1797, 1799, 1793, 1794, 1800, 1813, 1805, 1817, 1811, 1818,
2289 1810, 1814, 1801, 1819, 1792, 1792, 1801, 1807, 1809, 1810,
2290 1797, 1807, 1811, 1814, 1816, 1817, 1820, 1821, 1822, 1823,
2291 1822, 1828, 1813, 1816, 1817, 1818, 1818, 1810, 1814, 1824,
2292 1819, 1823, 1825, 1826, 1827, 1824, 1831, 1833, 1836, 1821,
2293
2294 1835, 1816, 1827, 1820, 1821, 1822, 1823, 1838, 1828, 1839,
2295 1841, 1845, 0, 0, 1825, 1826, 1824, 1840, 1835, 1825,
2296 1826, 1827, 1838, 1831, 1833, 1836, 1844, 1835, 1846, 1840,
2297 1847, 1848, 1850, 1856, 1838, 1839, 1839, 1841, 1849, 1848,
2298 1854, 1846, 1845, 1850, 1840, 0, 0, 1849, 1868, 1858,
2299 1844, 0, 1847, 1844, 1857, 1846, 1856, 1847, 1848, 1850,
2300 1856, 1857, 1858, 1860, 1854, 1849, 1861, 1854, 1865, 1862,
2301 1865, 1867, 1864, 1863, 1866, 1868, 1858, 1862, 1867, 1860,
2302 1861, 1857, 1863, 1864, 1869, 1870, 1866, 1871, 1872, 1876,
2303 1860, 1873, 1874, 1861, 1874, 1865, 1862, 1875, 1867, 1864,
2304
2305 1863, 1866, 1869, 1877, 1878, 1880, 1884, 1885, 0, 1875,
2306 1872, 1869, 1870, 1873, 1871, 1872, 1877, 1880, 1873, 1874,
2307 1876, 1883, 1886, 1890, 1875, 1887, 1888, 0, 1892, 1883,
2308 1877, 1878, 1880, 1891, 1888, 1886, 1890, 1884, 1885, 1887,
2309 1893, 1891, 1892, 1894, 1895, 1903, 1896, 1899, 1883, 1886,
2310 1890, 1894, 1887, 1888, 1893, 1892, 1897, 0, 1898, 1900,
2311 1891, 1904, 1905, 1908, 1897, 1901, 1895, 1893, 1896, 1899,
2312 1894, 1895, 1902, 1896, 1899, 1912, 1903, 1910, 0, 1924,
2313 1902, 1900, 1905, 1897, 1898, 1898, 1900, 1901, 1904, 1905,
2314 1906, 1910, 1901, 1907, 1908, 1909, 1915, 1912, 1906, 1902,
2315
2316 1913, 1907, 1912, 1909, 1910, 1914, 1924, 1916, 1913, 1917,
2317 1915, 1918, 0, 1914, 1919, 0, 1920, 1906, 0, 1918,
2318 1907, 1923, 1909, 1915, 1921, 1922, 0, 1913, 0, 1923,
2319 1925, 1917, 1914, 1916, 1916, 1926, 1917, 1928, 1918, 1927,
2320 1919, 1919, 1920, 1920, 0, 1922, 1921, 1927, 1923, 1931,
2321 1925, 1921, 1922, 1929, 1939, 1926, 1932, 1925, 1935, 1928,
2322 1933, 1929, 1926, 1938, 1928, 1934, 1927, 1936, 1933, 1937,
2323 1941, 1931, 0, 1934, 1942, 1936, 1931, 1937, 1932, 1940,
2324 1929, 1939, 1943, 1932, 1935, 1935, 1945, 1933, 1948, 1938,
2325 1938, 1951, 1934, 1952, 1936, 1949, 1937, 1941, 0, 1940,
2326
2327 0, 1942, 1943, 1949, 1950, 0, 1940, 0, 1945, 1943,
2328 1948, 0, 1950, 1945, 0, 1948, 0, 0, 1951, 0,
2329 1952, 0, 1949, 0, 0, 0, 0, 0, 0, 0,
2330 0, 1950, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1957,
2331 1957, 1957, 1957, 1957, 1957, 1957, 1958, 1958, 1958, 1958,
2332 1958, 1958, 1958, 1959, 1959, 1959, 1959, 1959, 1959, 1959,
2333 1960, 1960, 1960, 1960, 1960, 1960, 1960, 1962, 1962, 0,
2334 1962, 1962, 1962, 1962, 1963, 1963, 0, 0, 0, 1963,
2335 1963, 1964, 1964, 0, 0, 1964, 0, 1964, 1965, 0,
2336 0, 0, 0, 0, 1965, 1966, 1966, 0, 0, 0,
2337
2338 1966, 1966, 1967, 0, 0, 0, 0, 0, 1967, 1968,
2339 1968, 0, 1968, 1968, 1968, 1968, 1969, 1969, 0, 1969,
2340 1969, 1969, 1969, 1955, 1955, 1955, 1955, 1955, 1955, 1955,
2341 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955,
2342 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955,
2343 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955,
2344 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955,
2345 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955,
2346 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955
22802347 } ;
22812348
22822349 static yy_state_type yy_last_accepting_state;
23072374 */
23082375
23092376 /* because flex keeps having sign-unsigned compare problems that are unfixed*/
2377 #if defined(__clang__)||(defined(__GNUC__)&&((__GNUC__ >4)||(defined(__GNUC_MINOR__)&&(__GNUC__ ==4)&&(__GNUC_MINOR__ >=2))))
23102378 #pragma GCC diagnostic ignored "-Wsign-compare"
2379 #endif
23112380
23122381 #include <ctype.h>
23132382 #include <string.h>
24772546 #endif
24782547
24792548 #define YY_NO_INPUT 1
2480 #line 185 "util/configlexer.lex"
2549 #line 187 "util/configlexer.lex"
24812550 #ifndef YY_NO_UNPUT
24822551 #define YY_NO_UNPUT 1
24832552 #endif
24852554 #define YY_NO_INPUT 1
24862555 #endif
24872556
2488 #line 2488 "<stdout>"
2557 #line 2557 "<stdout>"
24892558
24902559 #define INITIAL 0
24912560 #define quotedstring 1
27062775 }
27072776
27082777 {
2709 #line 205 "util/configlexer.lex"
2710
2711 #line 2711 "<stdout>"
2778 #line 207 "util/configlexer.lex"
2779
2780 #line 2780 "<stdout>"
27122781
27132782 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
27142783 {
27412810 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
27422811 {
27432812 yy_current_state = (int) yy_def[yy_current_state];
2744 if ( yy_current_state >= 1880 )
2813 if ( yy_current_state >= 1956 )
27452814 yy_c = yy_meta[(unsigned int) yy_c];
27462815 }
27472816 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
27482817 ++yy_cp;
27492818 }
2750 while ( yy_base[yy_current_state] != 5425 );
2819 while ( yy_base[yy_current_state] != 5624 );
27512820
27522821 yy_find_action:
27532822 yy_act = yy_accept[yy_current_state];
27732842
27742843 case 1:
27752844 YY_RULE_SETUP
2776 #line 206 "util/configlexer.lex"
2845 #line 208 "util/configlexer.lex"
27772846 {
27782847 LEXOUT(("SP ")); /* ignore */ }
27792848 YY_BREAK
27802849 case 2:
27812850 YY_RULE_SETUP
2782 #line 208 "util/configlexer.lex"
2851 #line 210 "util/configlexer.lex"
27832852 {
27842853 /* note that flex makes the longest match and '.' is any but not nl */
27852854 LEXOUT(("comment(%s) ", yytext)); /* ignore */ }
27862855 YY_BREAK
27872856 case 3:
27882857 YY_RULE_SETUP
2789 #line 211 "util/configlexer.lex"
2858 #line 213 "util/configlexer.lex"
27902859 { YDVAR(0, VAR_SERVER) }
27912860 YY_BREAK
27922861 case 4:
27932862 YY_RULE_SETUP
2794 #line 212 "util/configlexer.lex"
2863 #line 214 "util/configlexer.lex"
27952864 { YDVAR(1, VAR_QNAME_MINIMISATION) }
27962865 YY_BREAK
27972866 case 5:
27982867 YY_RULE_SETUP
2799 #line 213 "util/configlexer.lex"
2868 #line 215 "util/configlexer.lex"
2869 { YDVAR(1, VAR_QNAME_MINIMISATION_STRICT) }
2870 YY_BREAK
2871 case 6:
2872 YY_RULE_SETUP
2873 #line 216 "util/configlexer.lex"
28002874 { YDVAR(1, VAR_NUM_THREADS) }
28012875 YY_BREAK
2802 case 6:
2803 YY_RULE_SETUP
2804 #line 214 "util/configlexer.lex"
2876 case 7:
2877 YY_RULE_SETUP
2878 #line 217 "util/configlexer.lex"
28052879 { YDVAR(1, VAR_VERBOSITY) }
28062880 YY_BREAK
2807 case 7:
2808 YY_RULE_SETUP
2809 #line 215 "util/configlexer.lex"
2881 case 8:
2882 YY_RULE_SETUP
2883 #line 218 "util/configlexer.lex"
28102884 { YDVAR(1, VAR_PORT) }
28112885 YY_BREAK
2812 case 8:
2813 YY_RULE_SETUP
2814 #line 216 "util/configlexer.lex"
2886 case 9:
2887 YY_RULE_SETUP
2888 #line 219 "util/configlexer.lex"
28152889 { YDVAR(1, VAR_OUTGOING_RANGE) }
28162890 YY_BREAK
2817 case 9:
2818 YY_RULE_SETUP
2819 #line 217 "util/configlexer.lex"
2891 case 10:
2892 YY_RULE_SETUP
2893 #line 220 "util/configlexer.lex"
28202894 { YDVAR(1, VAR_OUTGOING_PORT_PERMIT) }
28212895 YY_BREAK
2822 case 10:
2823 YY_RULE_SETUP
2824 #line 218 "util/configlexer.lex"
2896 case 11:
2897 YY_RULE_SETUP
2898 #line 221 "util/configlexer.lex"
28252899 { YDVAR(1, VAR_OUTGOING_PORT_AVOID) }
28262900 YY_BREAK
2827 case 11:
2828 YY_RULE_SETUP
2829 #line 219 "util/configlexer.lex"
2901 case 12:
2902 YY_RULE_SETUP
2903 #line 222 "util/configlexer.lex"
28302904 { YDVAR(1, VAR_OUTGOING_NUM_TCP) }
28312905 YY_BREAK
2832 case 12:
2833 YY_RULE_SETUP
2834 #line 220 "util/configlexer.lex"
2906 case 13:
2907 YY_RULE_SETUP
2908 #line 223 "util/configlexer.lex"
28352909 { YDVAR(1, VAR_INCOMING_NUM_TCP) }
28362910 YY_BREAK
2837 case 13:
2838 YY_RULE_SETUP
2839 #line 221 "util/configlexer.lex"
2911 case 14:
2912 YY_RULE_SETUP
2913 #line 224 "util/configlexer.lex"
28402914 { YDVAR(1, VAR_DO_IP4) }
28412915 YY_BREAK
2842 case 14:
2843 YY_RULE_SETUP
2844 #line 222 "util/configlexer.lex"
2916 case 15:
2917 YY_RULE_SETUP
2918 #line 225 "util/configlexer.lex"
28452919 { YDVAR(1, VAR_DO_IP6) }
28462920 YY_BREAK
2847 case 15:
2848 YY_RULE_SETUP
2849 #line 223 "util/configlexer.lex"
2921 case 16:
2922 YY_RULE_SETUP
2923 #line 226 "util/configlexer.lex"
28502924 { YDVAR(1, VAR_PREFER_IP6) }
28512925 YY_BREAK
2852 case 16:
2853 YY_RULE_SETUP
2854 #line 224 "util/configlexer.lex"
2926 case 17:
2927 YY_RULE_SETUP
2928 #line 227 "util/configlexer.lex"
28552929 { YDVAR(1, VAR_DO_UDP) }
28562930 YY_BREAK
2857 case 17:
2858 YY_RULE_SETUP
2859 #line 225 "util/configlexer.lex"
2931 case 18:
2932 YY_RULE_SETUP
2933 #line 228 "util/configlexer.lex"
28602934 { YDVAR(1, VAR_DO_TCP) }
28612935 YY_BREAK
2862 case 18:
2863 YY_RULE_SETUP
2864 #line 226 "util/configlexer.lex"
2936 case 19:
2937 YY_RULE_SETUP
2938 #line 229 "util/configlexer.lex"
28652939 { YDVAR(1, VAR_TCP_UPSTREAM) }
28662940 YY_BREAK
2867 case 19:
2868 YY_RULE_SETUP
2869 #line 227 "util/configlexer.lex"
2941 case 20:
2942 YY_RULE_SETUP
2943 #line 230 "util/configlexer.lex"
28702944 { YDVAR(1, VAR_TCP_MSS) }
28712945 YY_BREAK
2872 case 20:
2873 YY_RULE_SETUP
2874 #line 228 "util/configlexer.lex"
2946 case 21:
2947 YY_RULE_SETUP
2948 #line 231 "util/configlexer.lex"
28752949 { YDVAR(1, VAR_OUTGOING_TCP_MSS) }
28762950 YY_BREAK
2877 case 21:
2878 YY_RULE_SETUP
2879 #line 229 "util/configlexer.lex"
2951 case 22:
2952 YY_RULE_SETUP
2953 #line 232 "util/configlexer.lex"
28802954 { YDVAR(1, VAR_SSL_UPSTREAM) }
28812955 YY_BREAK
2882 case 22:
2883 YY_RULE_SETUP
2884 #line 230 "util/configlexer.lex"
2956 case 23:
2957 YY_RULE_SETUP
2958 #line 233 "util/configlexer.lex"
28852959 { YDVAR(1, VAR_SSL_SERVICE_KEY) }
28862960 YY_BREAK
2887 case 23:
2888 YY_RULE_SETUP
2889 #line 231 "util/configlexer.lex"
2961 case 24:
2962 YY_RULE_SETUP
2963 #line 234 "util/configlexer.lex"
28902964 { YDVAR(1, VAR_SSL_SERVICE_PEM) }
28912965 YY_BREAK
2892 case 24:
2893 YY_RULE_SETUP
2894 #line 232 "util/configlexer.lex"
2966 case 25:
2967 YY_RULE_SETUP
2968 #line 235 "util/configlexer.lex"
28952969 { YDVAR(1, VAR_SSL_PORT) }
28962970 YY_BREAK
2897 case 25:
2898 YY_RULE_SETUP
2899 #line 233 "util/configlexer.lex"
2971 case 26:
2972 YY_RULE_SETUP
2973 #line 236 "util/configlexer.lex"
29002974 { YDVAR(1, VAR_DO_DAEMONIZE) }
29012975 YY_BREAK
2902 case 26:
2903 YY_RULE_SETUP
2904 #line 234 "util/configlexer.lex"
2976 case 27:
2977 YY_RULE_SETUP
2978 #line 237 "util/configlexer.lex"
29052979 { YDVAR(1, VAR_INTERFACE) }
29062980 YY_BREAK
2907 case 27:
2908 YY_RULE_SETUP
2909 #line 235 "util/configlexer.lex"
2981 case 28:
2982 YY_RULE_SETUP
2983 #line 238 "util/configlexer.lex"
29102984 { YDVAR(1, VAR_INTERFACE) }
29112985 YY_BREAK
2912 case 28:
2913 YY_RULE_SETUP
2914 #line 236 "util/configlexer.lex"
2986 case 29:
2987 YY_RULE_SETUP
2988 #line 239 "util/configlexer.lex"
29152989 { YDVAR(1, VAR_OUTGOING_INTERFACE) }
29162990 YY_BREAK
2917 case 29:
2918 YY_RULE_SETUP
2919 #line 237 "util/configlexer.lex"
2991 case 30:
2992 YY_RULE_SETUP
2993 #line 240 "util/configlexer.lex"
29202994 { YDVAR(1, VAR_INTERFACE_AUTOMATIC) }
29212995 YY_BREAK
2922 case 30:
2923 YY_RULE_SETUP
2924 #line 238 "util/configlexer.lex"
2996 case 31:
2997 YY_RULE_SETUP
2998 #line 241 "util/configlexer.lex"
29252999 { YDVAR(1, VAR_SO_RCVBUF) }
29263000 YY_BREAK
2927 case 31:
2928 YY_RULE_SETUP
2929 #line 239 "util/configlexer.lex"
3001 case 32:
3002 YY_RULE_SETUP
3003 #line 242 "util/configlexer.lex"
29303004 { YDVAR(1, VAR_SO_SNDBUF) }
29313005 YY_BREAK
2932 case 32:
2933 YY_RULE_SETUP
2934 #line 240 "util/configlexer.lex"
3006 case 33:
3007 YY_RULE_SETUP
3008 #line 243 "util/configlexer.lex"
29353009 { YDVAR(1, VAR_SO_REUSEPORT) }
29363010 YY_BREAK
2937 case 33:
2938 YY_RULE_SETUP
2939 #line 241 "util/configlexer.lex"
3011 case 34:
3012 YY_RULE_SETUP
3013 #line 244 "util/configlexer.lex"
29403014 { YDVAR(1, VAR_IP_TRANSPARENT) }
29413015 YY_BREAK
2942 case 34:
2943 YY_RULE_SETUP
2944 #line 242 "util/configlexer.lex"
3016 case 35:
3017 YY_RULE_SETUP
3018 #line 245 "util/configlexer.lex"
29453019 { YDVAR(1, VAR_IP_FREEBIND) }
29463020 YY_BREAK
2947 case 35:
2948 YY_RULE_SETUP
2949 #line 243 "util/configlexer.lex"
3021 case 36:
3022 YY_RULE_SETUP
3023 #line 246 "util/configlexer.lex"
29503024 { YDVAR(1, VAR_CHROOT) }
29513025 YY_BREAK
2952 case 36:
2953 YY_RULE_SETUP
2954 #line 244 "util/configlexer.lex"
3026 case 37:
3027 YY_RULE_SETUP
3028 #line 247 "util/configlexer.lex"
29553029 { YDVAR(1, VAR_USERNAME) }
29563030 YY_BREAK
2957 case 37:
2958 YY_RULE_SETUP
2959 #line 245 "util/configlexer.lex"
3031 case 38:
3032 YY_RULE_SETUP
3033 #line 248 "util/configlexer.lex"
29603034 { YDVAR(1, VAR_DIRECTORY) }
29613035 YY_BREAK
2962 case 38:
2963 YY_RULE_SETUP
2964 #line 246 "util/configlexer.lex"
3036 case 39:
3037 YY_RULE_SETUP
3038 #line 249 "util/configlexer.lex"
29653039 { YDVAR(1, VAR_LOGFILE) }
29663040 YY_BREAK
2967 case 39:
2968 YY_RULE_SETUP
2969 #line 247 "util/configlexer.lex"
3041 case 40:
3042 YY_RULE_SETUP
3043 #line 250 "util/configlexer.lex"
29703044 { YDVAR(1, VAR_PIDFILE) }
29713045 YY_BREAK
2972 case 40:
2973 YY_RULE_SETUP
2974 #line 248 "util/configlexer.lex"
3046 case 41:
3047 YY_RULE_SETUP
3048 #line 251 "util/configlexer.lex"
29753049 { YDVAR(1, VAR_ROOT_HINTS) }
29763050 YY_BREAK
2977 case 41:
2978 YY_RULE_SETUP
2979 #line 249 "util/configlexer.lex"
3051 case 42:
3052 YY_RULE_SETUP
3053 #line 252 "util/configlexer.lex"
29803054 { YDVAR(1, VAR_EDNS_BUFFER_SIZE) }
29813055 YY_BREAK
2982 case 42:
2983 YY_RULE_SETUP
2984 #line 250 "util/configlexer.lex"
3056 case 43:
3057 YY_RULE_SETUP
3058 #line 253 "util/configlexer.lex"
29853059 { YDVAR(1, VAR_MSG_BUFFER_SIZE) }
29863060 YY_BREAK
2987 case 43:
2988 YY_RULE_SETUP
2989 #line 251 "util/configlexer.lex"
3061 case 44:
3062 YY_RULE_SETUP
3063 #line 254 "util/configlexer.lex"
29903064 { YDVAR(1, VAR_MSG_CACHE_SIZE) }
29913065 YY_BREAK
2992 case 44:
2993 YY_RULE_SETUP
2994 #line 252 "util/configlexer.lex"
3066 case 45:
3067 YY_RULE_SETUP
3068 #line 255 "util/configlexer.lex"
29953069 { YDVAR(1, VAR_MSG_CACHE_SLABS) }
29963070 YY_BREAK
2997 case 45:
2998 YY_RULE_SETUP
2999 #line 253 "util/configlexer.lex"
3071 case 46:
3072 YY_RULE_SETUP
3073 #line 256 "util/configlexer.lex"
30003074 { YDVAR(1, VAR_RRSET_CACHE_SIZE) }
30013075 YY_BREAK
3002 case 46:
3003 YY_RULE_SETUP
3004 #line 254 "util/configlexer.lex"
3076 case 47:
3077 YY_RULE_SETUP
3078 #line 257 "util/configlexer.lex"
30053079 { YDVAR(1, VAR_RRSET_CACHE_SLABS) }
30063080 YY_BREAK
3007 case 47:
3008 YY_RULE_SETUP
3009 #line 255 "util/configlexer.lex"
3081 case 48:
3082 YY_RULE_SETUP
3083 #line 258 "util/configlexer.lex"
30103084 { YDVAR(1, VAR_CACHE_MAX_TTL) }
30113085 YY_BREAK
3012 case 48:
3013 YY_RULE_SETUP
3014 #line 256 "util/configlexer.lex"
3086 case 49:
3087 YY_RULE_SETUP
3088 #line 259 "util/configlexer.lex"
30153089 { YDVAR(1, VAR_CACHE_MAX_NEGATIVE_TTL) }
30163090 YY_BREAK
3017 case 49:
3018 YY_RULE_SETUP
3019 #line 257 "util/configlexer.lex"
3091 case 50:
3092 YY_RULE_SETUP
3093 #line 260 "util/configlexer.lex"
30203094 { YDVAR(1, VAR_CACHE_MIN_TTL) }
30213095 YY_BREAK
3022 case 50:
3023 YY_RULE_SETUP
3024 #line 258 "util/configlexer.lex"
3096 case 51:
3097 YY_RULE_SETUP
3098 #line 261 "util/configlexer.lex"
30253099 { YDVAR(1, VAR_INFRA_HOST_TTL) }
30263100 YY_BREAK
3027 case 51:
3028 YY_RULE_SETUP
3029 #line 259 "util/configlexer.lex"
3101 case 52:
3102 YY_RULE_SETUP
3103 #line 262 "util/configlexer.lex"
30303104 { YDVAR(1, VAR_INFRA_LAME_TTL) }
30313105 YY_BREAK
3032 case 52:
3033 YY_RULE_SETUP
3034 #line 260 "util/configlexer.lex"
3106 case 53:
3107 YY_RULE_SETUP
3108 #line 263 "util/configlexer.lex"
30353109 { YDVAR(1, VAR_INFRA_CACHE_SLABS) }
30363110 YY_BREAK
3037 case 53:
3038 YY_RULE_SETUP
3039 #line 261 "util/configlexer.lex"
3111 case 54:
3112 YY_RULE_SETUP
3113 #line 264 "util/configlexer.lex"
30403114 { YDVAR(1, VAR_INFRA_CACHE_NUMHOSTS) }
30413115 YY_BREAK
3042 case 54:
3043 YY_RULE_SETUP
3044 #line 262 "util/configlexer.lex"
3116 case 55:
3117 YY_RULE_SETUP
3118 #line 265 "util/configlexer.lex"
30453119 { YDVAR(1, VAR_INFRA_CACHE_LAME_SIZE) }
30463120 YY_BREAK
3047 case 55:
3048 YY_RULE_SETUP
3049 #line 263 "util/configlexer.lex"
3121 case 56:
3122 YY_RULE_SETUP
3123 #line 266 "util/configlexer.lex"
30503124 { YDVAR(1, VAR_INFRA_CACHE_MIN_RTT) }
30513125 YY_BREAK
3052 case 56:
3053 YY_RULE_SETUP
3054 #line 264 "util/configlexer.lex"
3126 case 57:
3127 YY_RULE_SETUP
3128 #line 267 "util/configlexer.lex"
30553129 { YDVAR(1, VAR_NUM_QUERIES_PER_THREAD) }
30563130 YY_BREAK
3057 case 57:
3058 YY_RULE_SETUP
3059 #line 265 "util/configlexer.lex"
3131 case 58:
3132 YY_RULE_SETUP
3133 #line 268 "util/configlexer.lex"
30603134 { YDVAR(1, VAR_JOSTLE_TIMEOUT) }
30613135 YY_BREAK
3062 case 58:
3063 YY_RULE_SETUP
3064 #line 266 "util/configlexer.lex"
3136 case 59:
3137 YY_RULE_SETUP
3138 #line 269 "util/configlexer.lex"
30653139 { YDVAR(1, VAR_DELAY_CLOSE) }
30663140 YY_BREAK
3067 case 59:
3068 YY_RULE_SETUP
3069 #line 267 "util/configlexer.lex"
3141 case 60:
3142 YY_RULE_SETUP
3143 #line 270 "util/configlexer.lex"
30703144 { YDVAR(1, VAR_TARGET_FETCH_POLICY) }
30713145 YY_BREAK
3072 case 60:
3073 YY_RULE_SETUP
3074 #line 268 "util/configlexer.lex"
3146 case 61:
3147 YY_RULE_SETUP
3148 #line 271 "util/configlexer.lex"
30753149 { YDVAR(1, VAR_HARDEN_SHORT_BUFSIZE) }
30763150 YY_BREAK
3077 case 61:
3078 YY_RULE_SETUP
3079 #line 269 "util/configlexer.lex"
3151 case 62:
3152 YY_RULE_SETUP
3153 #line 272 "util/configlexer.lex"
30803154 { YDVAR(1, VAR_HARDEN_LARGE_QUERIES) }
30813155 YY_BREAK
3082 case 62:
3083 YY_RULE_SETUP
3084 #line 270 "util/configlexer.lex"
3156 case 63:
3157 YY_RULE_SETUP
3158 #line 273 "util/configlexer.lex"
30853159 { YDVAR(1, VAR_HARDEN_GLUE) }
30863160 YY_BREAK
3087 case 63:
3088 YY_RULE_SETUP
3089 #line 271 "util/configlexer.lex"
3161 case 64:
3162 YY_RULE_SETUP
3163 #line 274 "util/configlexer.lex"
30903164 { YDVAR(1, VAR_HARDEN_DNSSEC_STRIPPED) }
30913165 YY_BREAK
3092 case 64:
3093 YY_RULE_SETUP
3094 #line 272 "util/configlexer.lex"
3166 case 65:
3167 YY_RULE_SETUP
3168 #line 275 "util/configlexer.lex"
30953169 { YDVAR(1, VAR_HARDEN_BELOW_NXDOMAIN) }
30963170 YY_BREAK
3097 case 65:
3098 YY_RULE_SETUP
3099 #line 273 "util/configlexer.lex"
3171 case 66:
3172 YY_RULE_SETUP
3173 #line 276 "util/configlexer.lex"
31003174 { YDVAR(1, VAR_HARDEN_REFERRAL_PATH) }
31013175 YY_BREAK
3102 case 66:
3103 YY_RULE_SETUP
3104 #line 274 "util/configlexer.lex"
3176 case 67:
3177 YY_RULE_SETUP
3178 #line 277 "util/configlexer.lex"
31053179 { YDVAR(1, VAR_HARDEN_ALGO_DOWNGRADE) }
31063180 YY_BREAK
3107 case 67:
3108 YY_RULE_SETUP
3109 #line 275 "util/configlexer.lex"
3181 case 68:
3182 YY_RULE_SETUP
3183 #line 278 "util/configlexer.lex"
31103184 { YDVAR(1, VAR_USE_CAPS_FOR_ID) }
31113185 YY_BREAK
3112 case 68:
3113 YY_RULE_SETUP
3114 #line 276 "util/configlexer.lex"
3186 case 69:
3187 YY_RULE_SETUP
3188 #line 279 "util/configlexer.lex"
31153189 { YDVAR(1, VAR_CAPS_WHITELIST) }
31163190 YY_BREAK
3117 case 69:
3118 YY_RULE_SETUP
3119 #line 277 "util/configlexer.lex"
3191 case 70:
3192 YY_RULE_SETUP
3193 #line 280 "util/configlexer.lex"
31203194 { YDVAR(1, VAR_UNWANTED_REPLY_THRESHOLD) }
31213195 YY_BREAK
3122 case 70:
3123 YY_RULE_SETUP
3124 #line 278 "util/configlexer.lex"
3196 case 71:
3197 YY_RULE_SETUP
3198 #line 281 "util/configlexer.lex"
31253199 { YDVAR(1, VAR_PRIVATE_ADDRESS) }
31263200 YY_BREAK
3127 case 71:
3128 YY_RULE_SETUP
3129 #line 279 "util/configlexer.lex"
3201 case 72:
3202 YY_RULE_SETUP
3203 #line 282 "util/configlexer.lex"
31303204 { YDVAR(1, VAR_PRIVATE_DOMAIN) }
31313205 YY_BREAK
3132 case 72:
3133 YY_RULE_SETUP
3134 #line 280 "util/configlexer.lex"
3206 case 73:
3207 YY_RULE_SETUP
3208 #line 283 "util/configlexer.lex"
31353209 { YDVAR(1, VAR_PREFETCH_KEY) }
31363210 YY_BREAK
3137 case 73:
3138 YY_RULE_SETUP
3139 #line 281 "util/configlexer.lex"
3211 case 74:
3212 YY_RULE_SETUP
3213 #line 284 "util/configlexer.lex"
31403214 { YDVAR(1, VAR_PREFETCH) }
31413215 YY_BREAK
3142 case 74:
3143 YY_RULE_SETUP
3144 #line 282 "util/configlexer.lex"
3216 case 75:
3217 YY_RULE_SETUP
3218 #line 285 "util/configlexer.lex"
31453219 { YDVAR(0, VAR_STUB_ZONE) }
31463220 YY_BREAK
3147 case 75:
3148 YY_RULE_SETUP
3149 #line 283 "util/configlexer.lex"
3221 case 76:
3222 YY_RULE_SETUP
3223 #line 286 "util/configlexer.lex"
31503224 { YDVAR(1, VAR_NAME) }
31513225 YY_BREAK
3152 case 76:
3153 YY_RULE_SETUP
3154 #line 284 "util/configlexer.lex"
3226 case 77:
3227 YY_RULE_SETUP
3228 #line 287 "util/configlexer.lex"
31553229 { YDVAR(1, VAR_STUB_ADDR) }
31563230 YY_BREAK
3157 case 77:
3158 YY_RULE_SETUP
3159 #line 285 "util/configlexer.lex"
3231 case 78:
3232 YY_RULE_SETUP
3233 #line 288 "util/configlexer.lex"
31603234 { YDVAR(1, VAR_STUB_HOST) }
31613235 YY_BREAK
3162 case 78:
3163 YY_RULE_SETUP
3164 #line 286 "util/configlexer.lex"
3236 case 79:
3237 YY_RULE_SETUP
3238 #line 289 "util/configlexer.lex"
31653239 { YDVAR(1, VAR_STUB_PRIME) }
31663240 YY_BREAK
3167 case 79:
3168 YY_RULE_SETUP
3169 #line 287 "util/configlexer.lex"
3241 case 80:
3242 YY_RULE_SETUP
3243 #line 290 "util/configlexer.lex"
31703244 { YDVAR(1, VAR_STUB_FIRST) }
31713245 YY_BREAK
3172 case 80:
3173 YY_RULE_SETUP
3174 #line 288 "util/configlexer.lex"
3246 case 81:
3247 YY_RULE_SETUP
3248 #line 291 "util/configlexer.lex"
3249 { YDVAR(1, VAR_STUB_SSL_UPSTREAM) }
3250 YY_BREAK
3251 case 82:
3252 YY_RULE_SETUP
3253 #line 292 "util/configlexer.lex"
31753254 { YDVAR(0, VAR_FORWARD_ZONE) }
31763255 YY_BREAK
3177 case 81:
3178 YY_RULE_SETUP
3179 #line 289 "util/configlexer.lex"
3256 case 83:
3257 YY_RULE_SETUP
3258 #line 293 "util/configlexer.lex"
31803259 { YDVAR(1, VAR_FORWARD_ADDR) }
31813260 YY_BREAK
3182 case 82:
3183 YY_RULE_SETUP
3184 #line 290 "util/configlexer.lex"
3261 case 84:
3262 YY_RULE_SETUP
3263 #line 294 "util/configlexer.lex"
31853264 { YDVAR(1, VAR_FORWARD_HOST) }
31863265 YY_BREAK
3187 case 83:
3188 YY_RULE_SETUP
3189 #line 291 "util/configlexer.lex"
3266 case 85:
3267 YY_RULE_SETUP
3268 #line 295 "util/configlexer.lex"
31903269 { YDVAR(1, VAR_FORWARD_FIRST) }
31913270 YY_BREAK
3192 case 84:
3193 YY_RULE_SETUP
3194 #line 292 "util/configlexer.lex"
3271 case 86:
3272 YY_RULE_SETUP
3273 #line 296 "util/configlexer.lex"
3274 { YDVAR(1, VAR_FORWARD_SSL_UPSTREAM) }
3275 YY_BREAK
3276 case 87:
3277 YY_RULE_SETUP
3278 #line 297 "util/configlexer.lex"
3279 { YDVAR(0, VAR_VIEW) }
3280 YY_BREAK
3281 case 88:
3282 YY_RULE_SETUP
3283 #line 298 "util/configlexer.lex"
3284 { YDVAR(1, VAR_VIEW_FIRST) }
3285 YY_BREAK
3286 case 89:
3287 YY_RULE_SETUP
3288 #line 299 "util/configlexer.lex"
31953289 { YDVAR(1, VAR_DO_NOT_QUERY_ADDRESS) }
31963290 YY_BREAK
3197 case 85:
3198 YY_RULE_SETUP
3199 #line 293 "util/configlexer.lex"
3291 case 90:
3292 YY_RULE_SETUP
3293 #line 300 "util/configlexer.lex"
32003294 { YDVAR(1, VAR_DO_NOT_QUERY_LOCALHOST) }
32013295 YY_BREAK
3202 case 86:
3203 YY_RULE_SETUP
3204 #line 294 "util/configlexer.lex"
3296 case 91:
3297 YY_RULE_SETUP
3298 #line 301 "util/configlexer.lex"
32053299 { YDVAR(2, VAR_ACCESS_CONTROL) }
32063300 YY_BREAK
3207 case 87:
3208 YY_RULE_SETUP
3209 #line 295 "util/configlexer.lex"
3301 case 92:
3302 YY_RULE_SETUP
3303 #line 302 "util/configlexer.lex"
32103304 { YDVAR(1, VAR_HIDE_IDENTITY) }
32113305 YY_BREAK
3212 case 88:
3213 YY_RULE_SETUP
3214 #line 296 "util/configlexer.lex"
3306 case 93:
3307 YY_RULE_SETUP
3308 #line 303 "util/configlexer.lex"
32153309 { YDVAR(1, VAR_HIDE_VERSION) }
32163310 YY_BREAK
3217 case 89:
3218 YY_RULE_SETUP
3219 #line 297 "util/configlexer.lex"
3311 case 94:
3312 YY_RULE_SETUP
3313 #line 304 "util/configlexer.lex"
32203314 { YDVAR(1, VAR_IDENTITY) }
32213315 YY_BREAK
3222 case 90:
3223 YY_RULE_SETUP
3224 #line 298 "util/configlexer.lex"
3316 case 95:
3317 YY_RULE_SETUP
3318 #line 305 "util/configlexer.lex"
32253319 { YDVAR(1, VAR_VERSION) }
32263320 YY_BREAK
3227 case 91:
3228 YY_RULE_SETUP
3229 #line 299 "util/configlexer.lex"
3321 case 96:
3322 YY_RULE_SETUP
3323 #line 306 "util/configlexer.lex"
32303324 { YDVAR(1, VAR_MODULE_CONF) }
32313325 YY_BREAK
3232 case 92:
3233 YY_RULE_SETUP
3234 #line 300 "util/configlexer.lex"
3326 case 97:
3327 YY_RULE_SETUP
3328 #line 307 "util/configlexer.lex"
32353329 { YDVAR(1, VAR_DLV_ANCHOR) }
32363330 YY_BREAK
3237 case 93:
3238 YY_RULE_SETUP
3239 #line 301 "util/configlexer.lex"
3331 case 98:
3332 YY_RULE_SETUP
3333 #line 308 "util/configlexer.lex"
32403334 { YDVAR(1, VAR_DLV_ANCHOR_FILE) }
32413335 YY_BREAK
3242 case 94:
3243 YY_RULE_SETUP
3244 #line 302 "util/configlexer.lex"
3336 case 99:
3337 YY_RULE_SETUP
3338 #line 309 "util/configlexer.lex"
32453339 { YDVAR(1, VAR_TRUST_ANCHOR_FILE) }
32463340 YY_BREAK
3247 case 95:
3248 YY_RULE_SETUP
3249 #line 303 "util/configlexer.lex"
3341 case 100:
3342 YY_RULE_SETUP
3343 #line 310 "util/configlexer.lex"
32503344 { YDVAR(1, VAR_AUTO_TRUST_ANCHOR_FILE) }
32513345 YY_BREAK
3252 case 96:
3253 YY_RULE_SETUP
3254 #line 304 "util/configlexer.lex"
3346 case 101:
3347 YY_RULE_SETUP
3348 #line 311 "util/configlexer.lex"
32553349 { YDVAR(1, VAR_TRUSTED_KEYS_FILE) }
32563350 YY_BREAK
3257 case 97:
3258 YY_RULE_SETUP
3259 #line 305 "util/configlexer.lex"
3351 case 102:
3352 YY_RULE_SETUP
3353 #line 312 "util/configlexer.lex"
32603354 { YDVAR(1, VAR_TRUST_ANCHOR) }
32613355 YY_BREAK
3262 case 98:
3263 YY_RULE_SETUP
3264 #line 306 "util/configlexer.lex"
3356 case 103:
3357 YY_RULE_SETUP
3358 #line 313 "util/configlexer.lex"
32653359 { YDVAR(1, VAR_VAL_OVERRIDE_DATE) }
32663360 YY_BREAK
3267 case 99:
3268 YY_RULE_SETUP
3269 #line 307 "util/configlexer.lex"
3361 case 104:
3362 YY_RULE_SETUP
3363 #line 314 "util/configlexer.lex"
32703364 { YDVAR(1, VAR_VAL_SIG_SKEW_MIN) }
32713365 YY_BREAK
3272 case 100:
3273 YY_RULE_SETUP
3274 #line 308 "util/configlexer.lex"
3366 case 105:
3367 YY_RULE_SETUP
3368 #line 315 "util/configlexer.lex"
32753369 { YDVAR(1, VAR_VAL_SIG_SKEW_MAX) }
32763370 YY_BREAK
3277 case 101:
3278 YY_RULE_SETUP
3279 #line 309 "util/configlexer.lex"
3371 case 106:
3372 YY_RULE_SETUP
3373 #line 316 "util/configlexer.lex"
32803374 { YDVAR(1, VAR_BOGUS_TTL) }
32813375 YY_BREAK
3282 case 102:
3283 YY_RULE_SETUP
3284 #line 310 "util/configlexer.lex"
3376 case 107:
3377 YY_RULE_SETUP
3378 #line 317 "util/configlexer.lex"
32853379 { YDVAR(1, VAR_VAL_CLEAN_ADDITIONAL) }
32863380 YY_BREAK
3287 case 103:
3288 YY_RULE_SETUP
3289 #line 311 "util/configlexer.lex"
3381 case 108:
3382 YY_RULE_SETUP
3383 #line 318 "util/configlexer.lex"
32903384 { YDVAR(1, VAR_VAL_PERMISSIVE_MODE) }
32913385 YY_BREAK
3292 case 104:
3293 YY_RULE_SETUP
3294 #line 312 "util/configlexer.lex"
3386 case 109:
3387 YY_RULE_SETUP
3388 #line 319 "util/configlexer.lex"
32953389 { YDVAR(1, VAR_IGNORE_CD_FLAG) }
32963390 YY_BREAK
3297 case 105:
3298 YY_RULE_SETUP
3299 #line 313 "util/configlexer.lex"
3391 case 110:
3392 YY_RULE_SETUP
3393 #line 320 "util/configlexer.lex"
3394 { YDVAR(1, VAR_SERVE_EXPIRED) }
3395 YY_BREAK
3396 case 111:
3397 YY_RULE_SETUP
3398 #line 321 "util/configlexer.lex"
3399 { YDVAR(1, VAR_FAKE_DSA) }
3400 YY_BREAK
3401 case 112:
3402 YY_RULE_SETUP
3403 #line 322 "util/configlexer.lex"
33003404 { YDVAR(1, VAR_VAL_LOG_LEVEL) }
33013405 YY_BREAK
3302 case 106:
3303 YY_RULE_SETUP
3304 #line 314 "util/configlexer.lex"
3406 case 113:
3407 YY_RULE_SETUP
3408 #line 323 "util/configlexer.lex"
33053409 { YDVAR(1, VAR_KEY_CACHE_SIZE) }
33063410 YY_BREAK
3307 case 107:
3308 YY_RULE_SETUP
3309 #line 315 "util/configlexer.lex"
3411 case 114:
3412 YY_RULE_SETUP
3413 #line 324 "util/configlexer.lex"
33103414 { YDVAR(1, VAR_KEY_CACHE_SLABS) }
33113415 YY_BREAK
3312 case 108:
3313 YY_RULE_SETUP
3314 #line 316 "util/configlexer.lex"
3416 case 115:
3417 YY_RULE_SETUP
3418 #line 325 "util/configlexer.lex"
33153419 { YDVAR(1, VAR_NEG_CACHE_SIZE) }
33163420 YY_BREAK
3317 case 109:
3318 YY_RULE_SETUP
3319 #line 317 "util/configlexer.lex"
3421 case 116:
3422 YY_RULE_SETUP
3423 #line 326 "util/configlexer.lex"
33203424 {
33213425 YDVAR(1, VAR_VAL_NSEC3_KEYSIZE_ITERATIONS) }
33223426 YY_BREAK
3323 case 110:
3324 YY_RULE_SETUP
3325 #line 319 "util/configlexer.lex"
3427 case 117:
3428 YY_RULE_SETUP
3429 #line 328 "util/configlexer.lex"
33263430 { YDVAR(1, VAR_ADD_HOLDDOWN) }
33273431 YY_BREAK
3328 case 111:
3329 YY_RULE_SETUP
3330 #line 320 "util/configlexer.lex"
3432 case 118:
3433 YY_RULE_SETUP
3434 #line 329 "util/configlexer.lex"
33313435 { YDVAR(1, VAR_DEL_HOLDDOWN) }
33323436 YY_BREAK
3333 case 112:
3334 YY_RULE_SETUP
3335 #line 321 "util/configlexer.lex"
3437 case 119:
3438 YY_RULE_SETUP
3439 #line 330 "util/configlexer.lex"
33363440 { YDVAR(1, VAR_KEEP_MISSING) }
33373441 YY_BREAK
3338 case 113:
3339 YY_RULE_SETUP
3340 #line 322 "util/configlexer.lex"
3442 case 120:
3443 YY_RULE_SETUP
3444 #line 331 "util/configlexer.lex"
33413445 { YDVAR(1, VAR_PERMIT_SMALL_HOLDDOWN) }
33423446 YY_BREAK
3343 case 114:
3344 YY_RULE_SETUP
3345 #line 323 "util/configlexer.lex"
3447 case 121:
3448 YY_RULE_SETUP
3449 #line 332 "util/configlexer.lex"
33463450 { YDVAR(1, VAR_USE_SYSLOG) }
33473451 YY_BREAK
3348 case 115:
3349 YY_RULE_SETUP
3350 #line 324 "util/configlexer.lex"
3452 case 122:
3453 YY_RULE_SETUP
3454 #line 333 "util/configlexer.lex"
3455 { YDVAR(1, VAR_LOG_IDENTITY) }
3456 YY_BREAK
3457 case 123:
3458 YY_RULE_SETUP
3459 #line 334 "util/configlexer.lex"
33513460 { YDVAR(1, VAR_LOG_TIME_ASCII) }
33523461 YY_BREAK
3353 case 116:
3354 YY_RULE_SETUP
3355 #line 325 "util/configlexer.lex"
3462 case 124:
3463 YY_RULE_SETUP
3464 #line 335 "util/configlexer.lex"
33563465 { YDVAR(1, VAR_LOG_QUERIES) }
33573466 YY_BREAK
3358 case 117:
3359 YY_RULE_SETUP
3360 #line 326 "util/configlexer.lex"
3467 case 125:
3468 YY_RULE_SETUP
3469 #line 336 "util/configlexer.lex"
33613470 { YDVAR(2, VAR_LOCAL_ZONE) }
33623471 YY_BREAK
3363 case 118:
3364 YY_RULE_SETUP
3365 #line 327 "util/configlexer.lex"
3472 case 126:
3473 YY_RULE_SETUP
3474 #line 337 "util/configlexer.lex"
33663475 { YDVAR(1, VAR_LOCAL_DATA) }
33673476 YY_BREAK
3368 case 119:
3369 YY_RULE_SETUP
3370 #line 328 "util/configlexer.lex"
3477 case 127:
3478 YY_RULE_SETUP
3479 #line 338 "util/configlexer.lex"
33713480 { YDVAR(1, VAR_LOCAL_DATA_PTR) }
33723481 YY_BREAK
3373 case 120:
3374 YY_RULE_SETUP
3375 #line 329 "util/configlexer.lex"
3482 case 128:
3483 YY_RULE_SETUP
3484 #line 339 "util/configlexer.lex"
33763485 { YDVAR(1, VAR_UNBLOCK_LAN_ZONES) }
33773486 YY_BREAK
3378 case 121:
3379 YY_RULE_SETUP
3380 #line 330 "util/configlexer.lex"
3487 case 129:
3488 YY_RULE_SETUP
3489 #line 340 "util/configlexer.lex"
33813490 { YDVAR(1, VAR_INSECURE_LAN_ZONES) }
33823491 YY_BREAK
3383 case 122:
3384 YY_RULE_SETUP
3385 #line 331 "util/configlexer.lex"
3492 case 130:
3493 YY_RULE_SETUP
3494 #line 341 "util/configlexer.lex"
33863495 { YDVAR(1, VAR_STATISTICS_INTERVAL) }
33873496 YY_BREAK
3388 case 123:
3389 YY_RULE_SETUP
3390 #line 332 "util/configlexer.lex"
3497 case 131:
3498 YY_RULE_SETUP
3499 #line 342 "util/configlexer.lex"
33913500 { YDVAR(1, VAR_STATISTICS_CUMULATIVE) }
33923501 YY_BREAK
3393 case 124:
3394 YY_RULE_SETUP
3395 #line 333 "util/configlexer.lex"
3502 case 132:
3503 YY_RULE_SETUP
3504 #line 343 "util/configlexer.lex"
33963505 { YDVAR(1, VAR_EXTENDED_STATISTICS) }
33973506 YY_BREAK
3398 case 125:
3399 YY_RULE_SETUP
3400 #line 334 "util/configlexer.lex"
3507 case 133:
3508 YY_RULE_SETUP
3509 #line 344 "util/configlexer.lex"
34013510 { YDVAR(0, VAR_REMOTE_CONTROL) }
34023511 YY_BREAK
3403 case 126:
3404 YY_RULE_SETUP
3405 #line 335 "util/configlexer.lex"
3512 case 134:
3513 YY_RULE_SETUP
3514 #line 345 "util/configlexer.lex"
34063515 { YDVAR(1, VAR_CONTROL_ENABLE) }
34073516 YY_BREAK
3408 case 127:
3409 YY_RULE_SETUP
3410 #line 336 "util/configlexer.lex"
3517 case 135:
3518 YY_RULE_SETUP
3519 #line 346 "util/configlexer.lex"
34113520 { YDVAR(1, VAR_CONTROL_INTERFACE) }
34123521 YY_BREAK
3413 case 128:
3414 YY_RULE_SETUP
3415 #line 337 "util/configlexer.lex"
3522 case 136:
3523 YY_RULE_SETUP
3524 #line 347 "util/configlexer.lex"
34163525 { YDVAR(1, VAR_CONTROL_PORT) }
34173526 YY_BREAK
3418 case 129:
3419 YY_RULE_SETUP
3420 #line 338 "util/configlexer.lex"
3527 case 137:
3528 YY_RULE_SETUP
3529 #line 348 "util/configlexer.lex"
34213530 { YDVAR(1, VAR_CONTROL_USE_CERT) }
34223531 YY_BREAK
3423 case 130:
3424 YY_RULE_SETUP
3425 #line 339 "util/configlexer.lex"
3532 case 138:
3533 YY_RULE_SETUP
3534 #line 349 "util/configlexer.lex"
34263535 { YDVAR(1, VAR_SERVER_KEY_FILE) }
34273536 YY_BREAK
3428 case 131:
3429 YY_RULE_SETUP
3430 #line 340 "util/configlexer.lex"
3537 case 139:
3538 YY_RULE_SETUP
3539 #line 350 "util/configlexer.lex"
34313540 { YDVAR(1, VAR_SERVER_CERT_FILE) }
34323541 YY_BREAK
3433 case 132:
3434 YY_RULE_SETUP
3435 #line 341 "util/configlexer.lex"
3542 case 140:
3543 YY_RULE_SETUP
3544 #line 351 "util/configlexer.lex"
34363545 { YDVAR(1, VAR_CONTROL_KEY_FILE) }
34373546 YY_BREAK
3438 case 133:
3439 YY_RULE_SETUP
3440 #line 342 "util/configlexer.lex"
3547 case 141:
3548 YY_RULE_SETUP
3549 #line 352 "util/configlexer.lex"
34413550 { YDVAR(1, VAR_CONTROL_CERT_FILE) }
34423551 YY_BREAK
3443 case 134:
3444 YY_RULE_SETUP
3445 #line 343 "util/configlexer.lex"
3552 case 142:
3553 YY_RULE_SETUP
3554 #line 353 "util/configlexer.lex"
34463555 { YDVAR(1, VAR_PYTHON_SCRIPT) }
34473556 YY_BREAK
3448 case 135:
3449 YY_RULE_SETUP
3450 #line 344 "util/configlexer.lex"
3557 case 143:
3558 YY_RULE_SETUP
3559 #line 354 "util/configlexer.lex"
34513560 { YDVAR(0, VAR_PYTHON) }
34523561 YY_BREAK
3453 case 136:
3454 YY_RULE_SETUP
3455 #line 345 "util/configlexer.lex"
3562 case 144:
3563 YY_RULE_SETUP
3564 #line 355 "util/configlexer.lex"
34563565 { YDVAR(1, VAR_DOMAIN_INSECURE) }
34573566 YY_BREAK
3458 case 137:
3459 YY_RULE_SETUP
3460 #line 346 "util/configlexer.lex"
3567 case 145:
3568 YY_RULE_SETUP
3569 #line 356 "util/configlexer.lex"
34613570 { YDVAR(1, VAR_MINIMAL_RESPONSES) }
34623571 YY_BREAK
3463 case 138:
3464 YY_RULE_SETUP
3465 #line 347 "util/configlexer.lex"
3572 case 146:
3573 YY_RULE_SETUP
3574 #line 357 "util/configlexer.lex"
34663575 { YDVAR(1, VAR_RRSET_ROUNDROBIN) }
34673576 YY_BREAK
3468 case 139:
3469 YY_RULE_SETUP
3470 #line 348 "util/configlexer.lex"
3577 case 147:
3578 YY_RULE_SETUP
3579 #line 358 "util/configlexer.lex"
34713580 { YDVAR(1, VAR_MAX_UDP_SIZE) }
34723581 YY_BREAK
3473 case 140:
3474 YY_RULE_SETUP
3475 #line 349 "util/configlexer.lex"
3582 case 148:
3583 YY_RULE_SETUP
3584 #line 359 "util/configlexer.lex"
34763585 { YDVAR(1, VAR_DNS64_PREFIX) }
34773586 YY_BREAK
3478 case 141:
3479 YY_RULE_SETUP
3480 #line 350 "util/configlexer.lex"
3587 case 149:
3588 YY_RULE_SETUP
3589 #line 360 "util/configlexer.lex"
34813590 { YDVAR(1, VAR_DNS64_SYNTHALL) }
34823591 YY_BREAK
3483 case 142:
3484 YY_RULE_SETUP
3485 #line 351 "util/configlexer.lex"
3592 case 150:
3593 YY_RULE_SETUP
3594 #line 361 "util/configlexer.lex"
34863595 { YDVAR(1, VAR_DEFINE_TAG) }
34873596 YY_BREAK
3488 case 143:
3489 YY_RULE_SETUP
3490 #line 352 "util/configlexer.lex"
3597 case 151:
3598 YY_RULE_SETUP
3599 #line 362 "util/configlexer.lex"
34913600 { YDVAR(2, VAR_LOCAL_ZONE_TAG) }
34923601 YY_BREAK
3493 case 144:
3494 YY_RULE_SETUP
3495 #line 353 "util/configlexer.lex"
3602 case 152:
3603 YY_RULE_SETUP
3604 #line 363 "util/configlexer.lex"
34963605 { YDVAR(2, VAR_ACCESS_CONTROL_TAG) }
34973606 YY_BREAK
3498 case 145:
3499 YY_RULE_SETUP
3500 #line 354 "util/configlexer.lex"
3607 case 153:
3608 YY_RULE_SETUP
3609 #line 364 "util/configlexer.lex"
35013610 { YDVAR(3, VAR_ACCESS_CONTROL_TAG_ACTION) }
35023611 YY_BREAK
3503 case 146:
3504 YY_RULE_SETUP
3505 #line 355 "util/configlexer.lex"
3612 case 154:
3613 YY_RULE_SETUP
3614 #line 365 "util/configlexer.lex"
35063615 { YDVAR(3, VAR_ACCESS_CONTROL_TAG_DATA) }
35073616 YY_BREAK
3508 case 147:
3509 YY_RULE_SETUP
3510 #line 356 "util/configlexer.lex"
3617 case 155:
3618 YY_RULE_SETUP
3619 #line 366 "util/configlexer.lex"
3620 { YDVAR(2, VAR_ACCESS_CONTROL_VIEW) }
3621 YY_BREAK
3622 case 156:
3623 YY_RULE_SETUP
3624 #line 367 "util/configlexer.lex"
35113625 { YDVAR(3, VAR_LOCAL_ZONE_OVERRIDE) }
35123626 YY_BREAK
3513 case 148:
3514 YY_RULE_SETUP
3515 #line 357 "util/configlexer.lex"
3627 case 157:
3628 YY_RULE_SETUP
3629 #line 368 "util/configlexer.lex"
35163630 { YDVAR(0, VAR_DNSTAP) }
35173631 YY_BREAK
3518 case 149:
3519 YY_RULE_SETUP
3520 #line 358 "util/configlexer.lex"
3632 case 158:
3633 YY_RULE_SETUP
3634 #line 369 "util/configlexer.lex"
35213635 { YDVAR(1, VAR_DNSTAP_ENABLE) }
35223636 YY_BREAK
3523 case 150:
3524 YY_RULE_SETUP
3525 #line 359 "util/configlexer.lex"
3637 case 159:
3638 YY_RULE_SETUP
3639 #line 370 "util/configlexer.lex"
35263640 { YDVAR(1, VAR_DNSTAP_SOCKET_PATH) }
35273641 YY_BREAK
3528 case 151:
3529 YY_RULE_SETUP
3530 #line 360 "util/configlexer.lex"
3642 case 160:
3643 YY_RULE_SETUP
3644 #line 371 "util/configlexer.lex"
35313645 { YDVAR(1, VAR_DNSTAP_SEND_IDENTITY) }
35323646 YY_BREAK
3533 case 152:
3534 YY_RULE_SETUP
3535 #line 361 "util/configlexer.lex"
3647 case 161:
3648 YY_RULE_SETUP
3649 #line 372 "util/configlexer.lex"
35363650 { YDVAR(1, VAR_DNSTAP_SEND_VERSION) }
35373651 YY_BREAK
3538 case 153:
3539 YY_RULE_SETUP
3540 #line 362 "util/configlexer.lex"
3652 case 162:
3653 YY_RULE_SETUP
3654 #line 373 "util/configlexer.lex"
35413655 { YDVAR(1, VAR_DNSTAP_IDENTITY) }
35423656 YY_BREAK
3543 case 154:
3544 YY_RULE_SETUP
3545 #line 363 "util/configlexer.lex"
3657 case 163:
3658 YY_RULE_SETUP
3659 #line 374 "util/configlexer.lex"
35463660 { YDVAR(1, VAR_DNSTAP_VERSION) }
35473661 YY_BREAK
3548 case 155:
3549 YY_RULE_SETUP
3550 #line 364 "util/configlexer.lex"
3662 case 164:
3663 YY_RULE_SETUP
3664 #line 375 "util/configlexer.lex"
35513665 {
35523666 YDVAR(1, VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES) }
35533667 YY_BREAK
3554 case 156:
3555 YY_RULE_SETUP
3556 #line 366 "util/configlexer.lex"
3668 case 165:
3669 YY_RULE_SETUP
3670 #line 377 "util/configlexer.lex"
35573671 {
35583672 YDVAR(1, VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES) }
35593673 YY_BREAK
3560 case 157:
3561 YY_RULE_SETUP
3562 #line 368 "util/configlexer.lex"
3674 case 166:
3675 YY_RULE_SETUP
3676 #line 379 "util/configlexer.lex"
35633677 {
35643678 YDVAR(1, VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES) }
35653679 YY_BREAK
3566 case 158:
3567 YY_RULE_SETUP
3568 #line 370 "util/configlexer.lex"
3680 case 167:
3681 YY_RULE_SETUP
3682 #line 381 "util/configlexer.lex"
35693683 {
35703684 YDVAR(1, VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES) }
35713685 YY_BREAK
3572 case 159:
3573 YY_RULE_SETUP
3574 #line 372 "util/configlexer.lex"
3686 case 168:
3687 YY_RULE_SETUP
3688 #line 383 "util/configlexer.lex"
35753689 {
35763690 YDVAR(1, VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES) }
35773691 YY_BREAK
3578 case 160:
3579 YY_RULE_SETUP
3580 #line 374 "util/configlexer.lex"
3692 case 169:
3693 YY_RULE_SETUP
3694 #line 385 "util/configlexer.lex"
35813695 {
35823696 YDVAR(1, VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES) }
35833697 YY_BREAK
3584 case 161:
3585 YY_RULE_SETUP
3586 #line 376 "util/configlexer.lex"
3698 case 170:
3699 YY_RULE_SETUP
3700 #line 387 "util/configlexer.lex"
35873701 { YDVAR(1, VAR_DISABLE_DNSSEC_LAME_CHECK) }
35883702 YY_BREAK
3589 case 162:
3590 YY_RULE_SETUP
3591 #line 377 "util/configlexer.lex"
3703 case 171:
3704 YY_RULE_SETUP
3705 #line 388 "util/configlexer.lex"
35923706 { YDVAR(1, VAR_RATELIMIT) }
35933707 YY_BREAK
3594 case 163:
3595 YY_RULE_SETUP
3596 #line 378 "util/configlexer.lex"
3708 case 172:
3709 YY_RULE_SETUP
3710 #line 389 "util/configlexer.lex"
35973711 { YDVAR(1, VAR_RATELIMIT_SLABS) }
35983712 YY_BREAK
3599 case 164:
3600 YY_RULE_SETUP
3601 #line 379 "util/configlexer.lex"
3713 case 173:
3714 YY_RULE_SETUP
3715 #line 390 "util/configlexer.lex"
36023716 { YDVAR(1, VAR_RATELIMIT_SIZE) }
36033717 YY_BREAK
3604 case 165:
3605 YY_RULE_SETUP
3606 #line 380 "util/configlexer.lex"
3718 case 174:
3719 YY_RULE_SETUP
3720 #line 391 "util/configlexer.lex"
36073721 { YDVAR(2, VAR_RATELIMIT_FOR_DOMAIN) }
36083722 YY_BREAK
3609 case 166:
3610 YY_RULE_SETUP
3611 #line 381 "util/configlexer.lex"
3723 case 175:
3724 YY_RULE_SETUP
3725 #line 392 "util/configlexer.lex"
36123726 { YDVAR(2, VAR_RATELIMIT_BELOW_DOMAIN) }
36133727 YY_BREAK
3614 case 167:
3615 YY_RULE_SETUP
3616 #line 382 "util/configlexer.lex"
3728 case 176:
3729 YY_RULE_SETUP
3730 #line 393 "util/configlexer.lex"
36173731 { YDVAR(1, VAR_RATELIMIT_FACTOR) }
36183732 YY_BREAK
3619 case 168:
3620 /* rule 168 can match eol */
3621 YY_RULE_SETUP
3622 #line 383 "util/configlexer.lex"
3733 case 177:
3734 /* rule 177 can match eol */
3735 YY_RULE_SETUP
3736 #line 394 "util/configlexer.lex"
36233737 { LEXOUT(("NL\n")); cfg_parser->line++; }
36243738 YY_BREAK
36253739 /* Quoted strings. Strip leading and ending quotes */
3626 case 169:
3627 YY_RULE_SETUP
3628 #line 386 "util/configlexer.lex"
3740 case 178:
3741 YY_RULE_SETUP
3742 #line 397 "util/configlexer.lex"
36293743 { BEGIN(quotedstring); LEXOUT(("QS ")); }
36303744 YY_BREAK
36313745 case YY_STATE_EOF(quotedstring):
3632 #line 387 "util/configlexer.lex"
3746 #line 398 "util/configlexer.lex"
36333747 {
36343748 yyerror("EOF inside quoted string");
36353749 if(--num_args == 0) { BEGIN(INITIAL); }
36363750 else { BEGIN(val); }
36373751 }
36383752 YY_BREAK
3639 case 170:
3640 YY_RULE_SETUP
3641 #line 392 "util/configlexer.lex"
3753 case 179:
3754 YY_RULE_SETUP
3755 #line 403 "util/configlexer.lex"
36423756 { LEXOUT(("STR(%s) ", yytext)); yymore(); }
36433757 YY_BREAK
3644 case 171:
3645 /* rule 171 can match eol */
3646 YY_RULE_SETUP
3647 #line 393 "util/configlexer.lex"
3758 case 180:
3759 /* rule 180 can match eol */
3760 YY_RULE_SETUP
3761 #line 404 "util/configlexer.lex"
36483762 { yyerror("newline inside quoted string, no end \"");
36493763 cfg_parser->line++; BEGIN(INITIAL); }
36503764 YY_BREAK
3651 case 172:
3652 YY_RULE_SETUP
3653 #line 395 "util/configlexer.lex"
3765 case 181:
3766 YY_RULE_SETUP
3767 #line 406 "util/configlexer.lex"
36543768 {
36553769 LEXOUT(("QE "));
36563770 if(--num_args == 0) { BEGIN(INITIAL); }
36633777 }
36643778 YY_BREAK
36653779 /* Single Quoted strings. Strip leading and ending quotes */
3666 case 173:
3667 YY_RULE_SETUP
3668 #line 407 "util/configlexer.lex"
3780 case 182:
3781 YY_RULE_SETUP
3782 #line 418 "util/configlexer.lex"
36693783 { BEGIN(singlequotedstr); LEXOUT(("SQS ")); }
36703784 YY_BREAK
36713785 case YY_STATE_EOF(singlequotedstr):
3672 #line 408 "util/configlexer.lex"
3786 #line 419 "util/configlexer.lex"
36733787 {
36743788 yyerror("EOF inside quoted string");
36753789 if(--num_args == 0) { BEGIN(INITIAL); }
36763790 else { BEGIN(val); }
36773791 }
36783792 YY_BREAK
3679 case 174:
3680 YY_RULE_SETUP
3681 #line 413 "util/configlexer.lex"
3793 case 183:
3794 YY_RULE_SETUP
3795 #line 424 "util/configlexer.lex"
36823796 { LEXOUT(("STR(%s) ", yytext)); yymore(); }
36833797 YY_BREAK
3684 case 175:
3685 /* rule 175 can match eol */
3686 YY_RULE_SETUP
3687 #line 414 "util/configlexer.lex"
3798 case 184:
3799 /* rule 184 can match eol */
3800 YY_RULE_SETUP
3801 #line 425 "util/configlexer.lex"
36883802 { yyerror("newline inside quoted string, no end '");
36893803 cfg_parser->line++; BEGIN(INITIAL); }
36903804 YY_BREAK
3691 case 176:
3692 YY_RULE_SETUP
3693 #line 416 "util/configlexer.lex"
3805 case 185:
3806 YY_RULE_SETUP
3807 #line 427 "util/configlexer.lex"
36943808 {
36953809 LEXOUT(("SQE "));
36963810 if(--num_args == 0) { BEGIN(INITIAL); }
37033817 }
37043818 YY_BREAK
37053819 /* include: directive */
3706 case 177:
3707 YY_RULE_SETUP
3708 #line 428 "util/configlexer.lex"
3820 case 186:
3821 YY_RULE_SETUP
3822 #line 439 "util/configlexer.lex"
37093823 {
37103824 LEXOUT(("v(%s) ", yytext)); inc_prev = YYSTATE; BEGIN(include); }
37113825 YY_BREAK
37123826 case YY_STATE_EOF(include):
3713 #line 430 "util/configlexer.lex"
3827 #line 441 "util/configlexer.lex"
37143828 {
37153829 yyerror("EOF inside include directive");
37163830 BEGIN(inc_prev);
37173831 }
37183832 YY_BREAK
3719 case 178:
3720 YY_RULE_SETUP
3721 #line 434 "util/configlexer.lex"
3833 case 187:
3834 YY_RULE_SETUP
3835 #line 445 "util/configlexer.lex"
37223836 { LEXOUT(("ISP ")); /* ignore */ }
37233837 YY_BREAK
3724 case 179:
3725 /* rule 179 can match eol */
3726 YY_RULE_SETUP
3727 #line 435 "util/configlexer.lex"
3838 case 188:
3839 /* rule 188 can match eol */
3840 YY_RULE_SETUP
3841 #line 446 "util/configlexer.lex"
37283842 { LEXOUT(("NL\n")); cfg_parser->line++;}
37293843 YY_BREAK
3730 case 180:
3731 YY_RULE_SETUP
3732 #line 436 "util/configlexer.lex"
3844 case 189:
3845 YY_RULE_SETUP
3846 #line 447 "util/configlexer.lex"
37333847 { LEXOUT(("IQS ")); BEGIN(include_quoted); }
37343848 YY_BREAK
3735 case 181:
3736 YY_RULE_SETUP
3737 #line 437 "util/configlexer.lex"
3849 case 190:
3850 YY_RULE_SETUP
3851 #line 448 "util/configlexer.lex"
37383852 {
37393853 LEXOUT(("Iunquotedstr(%s) ", yytext));
37403854 config_start_include_glob(yytext);
37423856 }
37433857 YY_BREAK
37443858 case YY_STATE_EOF(include_quoted):
3745 #line 442 "util/configlexer.lex"
3859 #line 453 "util/configlexer.lex"
37463860 {
37473861 yyerror("EOF inside quoted string");
37483862 BEGIN(inc_prev);
37493863 }
37503864 YY_BREAK
3751 case 182:
3752 YY_RULE_SETUP
3753 #line 446 "util/configlexer.lex"
3865 case 191:
3866 YY_RULE_SETUP
3867 #line 457 "util/configlexer.lex"
37543868 { LEXOUT(("ISTR(%s) ", yytext)); yymore(); }
37553869 YY_BREAK
3756 case 183:
3757 /* rule 183 can match eol */
3758 YY_RULE_SETUP
3759 #line 447 "util/configlexer.lex"
3870 case 192:
3871 /* rule 192 can match eol */
3872 YY_RULE_SETUP
3873 #line 458 "util/configlexer.lex"
37603874 { yyerror("newline before \" in include name");
37613875 cfg_parser->line++; BEGIN(inc_prev); }
37623876 YY_BREAK
3763 case 184:
3764 YY_RULE_SETUP
3765 #line 449 "util/configlexer.lex"
3877 case 193:
3878 YY_RULE_SETUP
3879 #line 460 "util/configlexer.lex"
37663880 {
37673881 LEXOUT(("IQE "));
37683882 yytext[yyleng - 1] = '\0';
37723886 YY_BREAK
37733887 case YY_STATE_EOF(INITIAL):
37743888 case YY_STATE_EOF(val):
3775 #line 455 "util/configlexer.lex"
3889 #line 466 "util/configlexer.lex"
37763890 {
37773891 LEXOUT(("LEXEOF "));
37783892 yy_set_bol(1); /* Set beginning of line, so "^" rules match. */
37843898 }
37853899 }
37863900 YY_BREAK
3787 case 185:
3788 YY_RULE_SETUP
3789 #line 466 "util/configlexer.lex"
3901 case 194:
3902 YY_RULE_SETUP
3903 #line 477 "util/configlexer.lex"
37903904 { LEXOUT(("unquotedstr(%s) ", yytext));
37913905 if(--num_args == 0) { BEGIN(INITIAL); }
37923906 yylval.str = strdup(yytext); return STRING_ARG; }
37933907 YY_BREAK
3794 case 186:
3795 YY_RULE_SETUP
3796 #line 470 "util/configlexer.lex"
3908 case 195:
3909 YY_RULE_SETUP
3910 #line 481 "util/configlexer.lex"
37973911 {
37983912 ub_c_error_msg("unknown keyword '%s'", yytext);
37993913 }
38003914 YY_BREAK
3801 case 187:
3802 YY_RULE_SETUP
3803 #line 474 "util/configlexer.lex"
3915 case 196:
3916 YY_RULE_SETUP
3917 #line 485 "util/configlexer.lex"
38043918 {
38053919 ub_c_error_msg("stray '%s'", yytext);
38063920 }
38073921 YY_BREAK
3808 case 188:
3809 YY_RULE_SETUP
3810 #line 478 "util/configlexer.lex"
3922 case 197:
3923 YY_RULE_SETUP
3924 #line 489 "util/configlexer.lex"
38113925 ECHO;
38123926 YY_BREAK
3813 #line 3813 "<stdout>"
3927 #line 3927 "<stdout>"
38143928
38153929 case YY_END_OF_BUFFER:
38163930 {
41014215 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
41024216 {
41034217 yy_current_state = (int) yy_def[yy_current_state];
4104 if ( yy_current_state >= 1880 )
4218 if ( yy_current_state >= 1956 )
41054219 yy_c = yy_meta[(unsigned int) yy_c];
41064220 }
41074221 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
41294243 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
41304244 {
41314245 yy_current_state = (int) yy_def[yy_current_state];
4132 if ( yy_current_state >= 1880 )
4246 if ( yy_current_state >= 1956 )
41334247 yy_c = yy_meta[(unsigned int) yy_c];
41344248 }
41354249 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
4136 yy_is_jam = (yy_current_state == 1879);
4250 yy_is_jam = (yy_current_state == 1955);
41374251
41384252 return yy_is_jam ? 0 : yy_current_state;
41394253 }
44464560 * scanner will even need a stack. We use 2 instead of 1 to avoid an
44474561 * immediate realloc on the next call.
44484562 */
4449 num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
4563 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
44504564 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
44514565 (num_to_alloc * sizeof(struct yy_buffer_state*)
44524566 );
45824696 do \
45834697 { \
45844698 /* Undo effects of setting up yytext. */ \
4585 int yyless_macro_arg = (n); \
4699 yy_size_t yyless_macro_arg = (n); \
45864700 YY_LESS_LINENO(yyless_macro_arg);\
45874701 yytext[yyleng] = (yy_hold_char); \
45884702 (yy_c_buf_p) = yytext + yyless_macro_arg; \
47724886
47734887 #define YYTABLES_NAME "yytables"
47744888
4775 #line 478 "util/configlexer.lex"
4776
4777
4778
4889 #line 489 "util/configlexer.lex"
4890
4891
4892
88 */
99
1010 /* because flex keeps having sign-unsigned compare problems that are unfixed*/
11 #if defined(__clang__)||(defined(__GNUC__)&&((__GNUC__ >4)||(defined(__GNUC_MINOR__)&&(__GNUC__ ==4)&&(__GNUC_MINOR__ >=2))))
1112 #pragma GCC diagnostic ignored "-Wsign-compare"
13 #endif
1214
1315 #include <ctype.h>
1416 #include <string.h>
209211 LEXOUT(("comment(%s) ", yytext)); /* ignore */ }
210212 server{COLON} { YDVAR(0, VAR_SERVER) }
211213 qname-minimisation{COLON} { YDVAR(1, VAR_QNAME_MINIMISATION) }
214 qname-minimisation-strict{COLON} { YDVAR(1, VAR_QNAME_MINIMISATION_STRICT) }
212215 num-threads{COLON} { YDVAR(1, VAR_NUM_THREADS) }
213216 verbosity{COLON} { YDVAR(1, VAR_VERBOSITY) }
214217 port{COLON} { YDVAR(1, VAR_PORT) }
284287 stub-host{COLON} { YDVAR(1, VAR_STUB_HOST) }
285288 stub-prime{COLON} { YDVAR(1, VAR_STUB_PRIME) }
286289 stub-first{COLON} { YDVAR(1, VAR_STUB_FIRST) }
290 stub-ssl-upstream{COLON} { YDVAR(1, VAR_STUB_SSL_UPSTREAM) }
287291 forward-zone{COLON} { YDVAR(0, VAR_FORWARD_ZONE) }
288292 forward-addr{COLON} { YDVAR(1, VAR_FORWARD_ADDR) }
289293 forward-host{COLON} { YDVAR(1, VAR_FORWARD_HOST) }
290294 forward-first{COLON} { YDVAR(1, VAR_FORWARD_FIRST) }
295 forward-ssl-upstream{COLON} { YDVAR(1, VAR_FORWARD_SSL_UPSTREAM) }
296 view{COLON} { YDVAR(0, VAR_VIEW) }
297 view-first{COLON} { YDVAR(1, VAR_VIEW_FIRST) }
291298 do-not-query-address{COLON} { YDVAR(1, VAR_DO_NOT_QUERY_ADDRESS) }
292299 do-not-query-localhost{COLON} { YDVAR(1, VAR_DO_NOT_QUERY_LOCALHOST) }
293300 access-control{COLON} { YDVAR(2, VAR_ACCESS_CONTROL) }
309316 val-clean-additional{COLON} { YDVAR(1, VAR_VAL_CLEAN_ADDITIONAL) }
310317 val-permissive-mode{COLON} { YDVAR(1, VAR_VAL_PERMISSIVE_MODE) }
311318 ignore-cd-flag{COLON} { YDVAR(1, VAR_IGNORE_CD_FLAG) }
319 serve-expired{COLON} { YDVAR(1, VAR_SERVE_EXPIRED) }
320 fake-dsa{COLON} { YDVAR(1, VAR_FAKE_DSA) }
312321 val-log-level{COLON} { YDVAR(1, VAR_VAL_LOG_LEVEL) }
313322 key-cache-size{COLON} { YDVAR(1, VAR_KEY_CACHE_SIZE) }
314323 key-cache-slabs{COLON} { YDVAR(1, VAR_KEY_CACHE_SLABS) }
320329 keep-missing{COLON} { YDVAR(1, VAR_KEEP_MISSING) }
321330 permit-small-holddown{COLON} { YDVAR(1, VAR_PERMIT_SMALL_HOLDDOWN) }
322331 use-syslog{COLON} { YDVAR(1, VAR_USE_SYSLOG) }
332 log-identity{COLON} { YDVAR(1, VAR_LOG_IDENTITY) }
323333 log-time-ascii{COLON} { YDVAR(1, VAR_LOG_TIME_ASCII) }
324334 log-queries{COLON} { YDVAR(1, VAR_LOG_QUERIES) }
325335 local-zone{COLON} { YDVAR(2, VAR_LOCAL_ZONE) }
352362 access-control-tag{COLON} { YDVAR(2, VAR_ACCESS_CONTROL_TAG) }
353363 access-control-tag-action{COLON} { YDVAR(3, VAR_ACCESS_CONTROL_TAG_ACTION) }
354364 access-control-tag-data{COLON} { YDVAR(3, VAR_ACCESS_CONTROL_TAG_DATA) }
365 access-control-view{COLON} { YDVAR(2, VAR_ACCESS_CONTROL_VIEW) }
355366 local-zone-override{COLON} { YDVAR(3, VAR_LOCAL_ZONE_OVERRIDE) }
356367 dnstap{COLON} { YDVAR(0, VAR_DNSTAP) }
357368 dnstap-enable{COLON} { YDVAR(1, VAR_DNSTAP_ENABLE) }
252252 VAR_SSL_SERVICE_PEM = 384,
253253 VAR_SSL_PORT = 385,
254254 VAR_FORWARD_FIRST = 386,
255 VAR_STUB_FIRST = 387,
256 VAR_MINIMAL_RESPONSES = 388,
257 VAR_RRSET_ROUNDROBIN = 389,
258 VAR_MAX_UDP_SIZE = 390,
259 VAR_DELAY_CLOSE = 391,
260 VAR_UNBLOCK_LAN_ZONES = 392,
261 VAR_INSECURE_LAN_ZONES = 393,
262 VAR_INFRA_CACHE_MIN_RTT = 394,
263 VAR_DNS64_PREFIX = 395,
264 VAR_DNS64_SYNTHALL = 396,
265 VAR_DNSTAP = 397,
266 VAR_DNSTAP_ENABLE = 398,
267 VAR_DNSTAP_SOCKET_PATH = 399,
268 VAR_DNSTAP_SEND_IDENTITY = 400,
269 VAR_DNSTAP_SEND_VERSION = 401,
270 VAR_DNSTAP_IDENTITY = 402,
271 VAR_DNSTAP_VERSION = 403,
272 VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES = 404,
273 VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES = 405,
274 VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES = 406,
275 VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES = 407,
276 VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES = 408,
277 VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES = 409,
278 VAR_HARDEN_ALGO_DOWNGRADE = 410,
279 VAR_IP_TRANSPARENT = 411,
280 VAR_DISABLE_DNSSEC_LAME_CHECK = 412,
281 VAR_RATELIMIT = 413,
282 VAR_RATELIMIT_SLABS = 414,
283 VAR_RATELIMIT_SIZE = 415,
284 VAR_RATELIMIT_FOR_DOMAIN = 416,
285 VAR_RATELIMIT_BELOW_DOMAIN = 417,
286 VAR_RATELIMIT_FACTOR = 418,
287 VAR_CAPS_WHITELIST = 419,
288 VAR_CACHE_MAX_NEGATIVE_TTL = 420,
289 VAR_PERMIT_SMALL_HOLDDOWN = 421,
290 VAR_QNAME_MINIMISATION = 422,
291 VAR_IP_FREEBIND = 423,
292 VAR_DEFINE_TAG = 424,
293 VAR_LOCAL_ZONE_TAG = 425,
294 VAR_ACCESS_CONTROL_TAG = 426,
295 VAR_LOCAL_ZONE_OVERRIDE = 427,
296 VAR_ACCESS_CONTROL_TAG_ACTION = 428,
297 VAR_ACCESS_CONTROL_TAG_DATA = 429
255 VAR_STUB_SSL_UPSTREAM = 387,
256 VAR_FORWARD_SSL_UPSTREAM = 388,
257 VAR_STUB_FIRST = 389,
258 VAR_MINIMAL_RESPONSES = 390,
259 VAR_RRSET_ROUNDROBIN = 391,
260 VAR_MAX_UDP_SIZE = 392,
261 VAR_DELAY_CLOSE = 393,
262 VAR_UNBLOCK_LAN_ZONES = 394,
263 VAR_INSECURE_LAN_ZONES = 395,
264 VAR_INFRA_CACHE_MIN_RTT = 396,
265 VAR_DNS64_PREFIX = 397,
266 VAR_DNS64_SYNTHALL = 398,
267 VAR_DNSTAP = 399,
268 VAR_DNSTAP_ENABLE = 400,
269 VAR_DNSTAP_SOCKET_PATH = 401,
270 VAR_DNSTAP_SEND_IDENTITY = 402,
271 VAR_DNSTAP_SEND_VERSION = 403,
272 VAR_DNSTAP_IDENTITY = 404,
273 VAR_DNSTAP_VERSION = 405,
274 VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES = 406,
275 VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES = 407,
276 VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES = 408,
277 VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES = 409,
278 VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES = 410,
279 VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES = 411,
280 VAR_HARDEN_ALGO_DOWNGRADE = 412,
281 VAR_IP_TRANSPARENT = 413,
282 VAR_DISABLE_DNSSEC_LAME_CHECK = 414,
283 VAR_RATELIMIT = 415,
284 VAR_RATELIMIT_SLABS = 416,
285 VAR_RATELIMIT_SIZE = 417,
286 VAR_RATELIMIT_FOR_DOMAIN = 418,
287 VAR_RATELIMIT_BELOW_DOMAIN = 419,
288 VAR_RATELIMIT_FACTOR = 420,
289 VAR_CAPS_WHITELIST = 421,
290 VAR_CACHE_MAX_NEGATIVE_TTL = 422,
291 VAR_PERMIT_SMALL_HOLDDOWN = 423,
292 VAR_QNAME_MINIMISATION = 424,
293 VAR_QNAME_MINIMISATION_STRICT = 425,
294 VAR_IP_FREEBIND = 426,
295 VAR_DEFINE_TAG = 427,
296 VAR_LOCAL_ZONE_TAG = 428,
297 VAR_ACCESS_CONTROL_TAG = 429,
298 VAR_LOCAL_ZONE_OVERRIDE = 430,
299 VAR_ACCESS_CONTROL_TAG_ACTION = 431,
300 VAR_ACCESS_CONTROL_TAG_DATA = 432,
301 VAR_VIEW = 433,
302 VAR_ACCESS_CONTROL_VIEW = 434,
303 VAR_VIEW_FIRST = 435,
304 VAR_SERVE_EXPIRED = 436,
305 VAR_FAKE_DSA = 437,
306 VAR_LOG_IDENTITY = 438
298307 };
299308 #endif
300309 /* Tokens. */
427436 #define VAR_SSL_SERVICE_PEM 384
428437 #define VAR_SSL_PORT 385
429438 #define VAR_FORWARD_FIRST 386
430 #define VAR_STUB_FIRST 387
431 #define VAR_MINIMAL_RESPONSES 388
432 #define VAR_RRSET_ROUNDROBIN 389
433 #define VAR_MAX_UDP_SIZE 390
434 #define VAR_DELAY_CLOSE 391
435 #define VAR_UNBLOCK_LAN_ZONES 392
436 #define VAR_INSECURE_LAN_ZONES 393
437 #define VAR_INFRA_CACHE_MIN_RTT 394
438 #define VAR_DNS64_PREFIX 395
439 #define VAR_DNS64_SYNTHALL 396
440 #define VAR_DNSTAP 397
441 #define VAR_DNSTAP_ENABLE 398
442 #define VAR_DNSTAP_SOCKET_PATH 399
443 #define VAR_DNSTAP_SEND_IDENTITY 400
444 #define VAR_DNSTAP_SEND_VERSION 401
445 #define VAR_DNSTAP_IDENTITY 402
446 #define VAR_DNSTAP_VERSION 403
447 #define VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES 404
448 #define VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES 405
449 #define VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES 406
450 #define VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES 407
451 #define VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES 408
452 #define VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES 409
453 #define VAR_HARDEN_ALGO_DOWNGRADE 410
454 #define VAR_IP_TRANSPARENT 411
455 #define VAR_DISABLE_DNSSEC_LAME_CHECK 412
456 #define VAR_RATELIMIT 413
457 #define VAR_RATELIMIT_SLABS 414
458 #define VAR_RATELIMIT_SIZE 415
459 #define VAR_RATELIMIT_FOR_DOMAIN 416
460 #define VAR_RATELIMIT_BELOW_DOMAIN 417
461 #define VAR_RATELIMIT_FACTOR 418
462 #define VAR_CAPS_WHITELIST 419
463 #define VAR_CACHE_MAX_NEGATIVE_TTL 420
464 #define VAR_PERMIT_SMALL_HOLDDOWN 421
465 #define VAR_QNAME_MINIMISATION 422
466 #define VAR_IP_FREEBIND 423
467 #define VAR_DEFINE_TAG 424
468 #define VAR_LOCAL_ZONE_TAG 425
469 #define VAR_ACCESS_CONTROL_TAG 426
470 #define VAR_LOCAL_ZONE_OVERRIDE 427
471 #define VAR_ACCESS_CONTROL_TAG_ACTION 428
472 #define VAR_ACCESS_CONTROL_TAG_DATA 429
439 #define VAR_STUB_SSL_UPSTREAM 387
440 #define VAR_FORWARD_SSL_UPSTREAM 388
441 #define VAR_STUB_FIRST 389
442 #define VAR_MINIMAL_RESPONSES 390
443 #define VAR_RRSET_ROUNDROBIN 391
444 #define VAR_MAX_UDP_SIZE 392
445 #define VAR_DELAY_CLOSE 393
446 #define VAR_UNBLOCK_LAN_ZONES 394
447 #define VAR_INSECURE_LAN_ZONES 395
448 #define VAR_INFRA_CACHE_MIN_RTT 396
449 #define VAR_DNS64_PREFIX 397
450 #define VAR_DNS64_SYNTHALL 398
451 #define VAR_DNSTAP 399
452 #define VAR_DNSTAP_ENABLE 400
453 #define VAR_DNSTAP_SOCKET_PATH 401
454 #define VAR_DNSTAP_SEND_IDENTITY 402
455 #define VAR_DNSTAP_SEND_VERSION 403
456 #define VAR_DNSTAP_IDENTITY 404
457 #define VAR_DNSTAP_VERSION 405
458 #define VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES 406
459 #define VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES 407
460 #define VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES 408
461 #define VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES 409
462 #define VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES 410
463 #define VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES 411
464 #define VAR_HARDEN_ALGO_DOWNGRADE 412
465 #define VAR_IP_TRANSPARENT 413
466 #define VAR_DISABLE_DNSSEC_LAME_CHECK 414
467 #define VAR_RATELIMIT 415
468 #define VAR_RATELIMIT_SLABS 416
469 #define VAR_RATELIMIT_SIZE 417
470 #define VAR_RATELIMIT_FOR_DOMAIN 418
471 #define VAR_RATELIMIT_BELOW_DOMAIN 419
472 #define VAR_RATELIMIT_FACTOR 420
473 #define VAR_CAPS_WHITELIST 421
474 #define VAR_CACHE_MAX_NEGATIVE_TTL 422
475 #define VAR_PERMIT_SMALL_HOLDDOWN 423
476 #define VAR_QNAME_MINIMISATION 424
477 #define VAR_QNAME_MINIMISATION_STRICT 425
478 #define VAR_IP_FREEBIND 426
479 #define VAR_DEFINE_TAG 427
480 #define VAR_LOCAL_ZONE_TAG 428
481 #define VAR_ACCESS_CONTROL_TAG 429
482 #define VAR_LOCAL_ZONE_OVERRIDE 430
483 #define VAR_ACCESS_CONTROL_TAG_ACTION 431
484 #define VAR_ACCESS_CONTROL_TAG_DATA 432
485 #define VAR_VIEW 433
486 #define VAR_ACCESS_CONTROL_VIEW 434
487 #define VAR_VIEW_FIRST 435
488 #define VAR_SERVE_EXPIRED 436
489 #define VAR_FAKE_DSA 437
490 #define VAR_LOG_IDENTITY 438
473491
474492 /* Value type. */
475493 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
480498
481499 char* str;
482500
483 #line 485 "util/configparser.c" /* yacc.c:355 */
501 #line 503 "util/configparser.c" /* yacc.c:355 */
484502 };
485503
486504 typedef union YYSTYPE YYSTYPE;
497515
498516 /* Copy the second part of user declarations. */
499517
500 #line 502 "util/configparser.c" /* yacc.c:358 */
518 #line 520 "util/configparser.c" /* yacc.c:358 */
501519
502520 #ifdef short
503521 # undef short
739757 /* YYFINAL -- State number of the termination state. */
740758 #define YYFINAL 2
741759 /* YYLAST -- Last index in YYTABLE. */
742 #define YYLAST 337
760 #define YYLAST 363
743761
744762 /* YYNTOKENS -- Number of terminals. */
745 #define YYNTOKENS 175
763 #define YYNTOKENS 184
746764 /* YYNNTS -- Number of nonterminals. */
747 #define YYNNTS 180
765 #define YYNNTS 194
748766 /* YYNRULES -- Number of rules. */
749 #define YYNRULES 345
767 #define YYNRULES 371
750768 /* YYNSTATES -- Number of states. */
751 #define YYNSTATES 517
769 #define YYNSTATES 556
752770
753771 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
754772 by yylex, with out-of-bounds checking. */
755773 #define YYUNDEFTOK 2
756 #define YYMAXUTOK 429
774 #define YYMAXUTOK 438
757775
758776 #define YYTRANSLATE(YYX) \
759777 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
804822 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
805823 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
806824 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
807 165, 166, 167, 168, 169, 170, 171, 172, 173, 174
825 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
826 175, 176, 177, 178, 179, 180, 181, 182, 183
808827 };
809828
810829 #if YYDEBUG
811830 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
812831 static const yytype_uint16 yyrline[] =
813832 {
814 0, 133, 133, 133, 134, 134, 135, 135, 136, 136,
815 140, 145, 146, 147, 147, 147, 148, 148, 149, 149,
816 150, 150, 151, 151, 152, 152, 152, 153, 153, 153,
817 154, 154, 155, 155, 156, 156, 157, 157, 158, 158,
818 159, 159, 160, 160, 161, 161, 162, 162, 162, 163,
819 163, 163, 164, 164, 164, 165, 165, 166, 166, 167,
820 167, 168, 168, 169, 169, 169, 170, 170, 171, 171,
821 172, 172, 172, 173, 173, 174, 174, 175, 175, 176,
822 176, 176, 177, 177, 178, 178, 179, 179, 180, 180,
823 181, 181, 182, 182, 182, 183, 183, 184, 184, 184,
824 185, 185, 185, 186, 186, 186, 187, 187, 187, 188,
825 188, 188, 189, 189, 189, 190, 190, 191, 191, 192,
826 192, 193, 193, 194, 194, 194, 195, 195, 196, 196,
833 0, 137, 137, 137, 138, 138, 139, 139, 140, 140,
834 140, 145, 150, 151, 152, 152, 152, 153, 153, 154,
835 154, 155, 155, 156, 156, 157, 157, 157, 158, 158,
836 158, 159, 159, 160, 160, 161, 161, 162, 162, 163,
837 163, 164, 164, 165, 165, 166, 166, 167, 167, 167,
838 168, 168, 168, 169, 169, 169, 170, 170, 171, 171,
839 172, 172, 173, 173, 174, 174, 174, 175, 175, 176,
840 176, 177, 177, 177, 178, 178, 179, 179, 180, 180,
841 181, 181, 181, 182, 182, 183, 183, 184, 184, 185,
842 185, 186, 186, 187, 187, 187, 188, 188, 189, 189,
843 189, 190, 190, 190, 191, 191, 191, 192, 192, 192,
844 193, 193, 193, 194, 194, 194, 195, 195, 196, 196,
827845 197, 197, 198, 198, 199, 199, 199, 200, 200, 201,
828 201, 202, 204, 216, 217, 218, 218, 218, 218, 218,
829 220, 232, 233, 234, 234, 234, 234, 236, 245, 254,
830 265, 274, 283, 292, 305, 320, 329, 338, 347, 356,
831 365, 374, 383, 392, 401, 410, 419, 428, 437, 446,
832 455, 462, 469, 478, 487, 501, 510, 519, 526, 533,
833 557, 565, 572, 579, 586, 593, 601, 609, 617, 624,
834 631, 640, 649, 656, 663, 671, 679, 689, 699, 709,
835 722, 733, 741, 754, 763, 772, 781, 791, 801, 809,
836 822, 831, 839, 848, 856, 869, 878, 885, 895, 905,
837 915, 925, 935, 945, 955, 965, 972, 979, 986, 995,
838 1004, 1013, 1020, 1030, 1047, 1054, 1072, 1085, 1098, 1107,
839 1116, 1125, 1134, 1144, 1154, 1163, 1172, 1179, 1188, 1197,
840 1206, 1215, 1223, 1236, 1244, 1272, 1279, 1294, 1304, 1314,
841 1321, 1328, 1337, 1351, 1370, 1389, 1401, 1413, 1425, 1434,
842 1442, 1455, 1468, 1481, 1490, 1500, 1510, 1517, 1524, 1533,
843 1543, 1553, 1560, 1567, 1576, 1581, 1582, 1583, 1583, 1583,
844 1584, 1584, 1584, 1585, 1585, 1587, 1597, 1606, 1613, 1623,
845 1630, 1637, 1644, 1651, 1656, 1657, 1658, 1658, 1659, 1659,
846 1660, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1668, 1676,
847 1683, 1691, 1699, 1706, 1713, 1722, 1731, 1740, 1749, 1758,
848 1767, 1772, 1773, 1774, 1776, 1782
846 201, 202, 202, 203, 203, 204, 204, 204, 205, 205,
847 206, 206, 207, 207, 208, 208, 209, 209, 211, 223,
848 224, 225, 225, 225, 225, 225, 226, 228, 240, 241,
849 242, 242, 242, 242, 243, 245, 259, 260, 261, 261,
850 261, 261, 263, 272, 281, 292, 301, 310, 319, 332,
851 347, 356, 365, 374, 383, 392, 401, 410, 419, 428,
852 437, 446, 455, 464, 473, 482, 489, 496, 505, 514,
853 528, 537, 546, 553, 560, 584, 592, 599, 606, 613,
854 620, 628, 636, 644, 651, 658, 667, 676, 683, 690,
855 698, 706, 716, 726, 736, 749, 760, 768, 781, 790,
856 799, 808, 818, 828, 836, 849, 858, 866, 875, 883,
857 896, 905, 912, 922, 932, 942, 952, 962, 972, 982,
858 992, 999, 1006, 1013, 1022, 1031, 1040, 1047, 1057, 1074,
859 1081, 1099, 1112, 1125, 1134, 1143, 1152, 1161, 1171, 1181,
860 1190, 1199, 1210, 1219, 1226, 1235, 1244, 1253, 1262, 1270,
861 1283, 1291, 1319, 1326, 1341, 1351, 1361, 1368, 1375, 1384,
862 1398, 1417, 1436, 1448, 1460, 1472, 1483, 1492, 1500, 1513,
863 1526, 1539, 1548, 1558, 1568, 1578, 1585, 1592, 1601, 1611,
864 1621, 1631, 1638, 1645, 1654, 1664, 1674, 1703, 1712, 1721,
865 1726, 1727, 1728, 1728, 1728, 1729, 1729, 1729, 1730, 1730,
866 1732, 1742, 1751, 1758, 1768, 1775, 1782, 1789, 1796, 1801,
867 1802, 1803, 1803, 1804, 1804, 1805, 1805, 1806, 1807, 1808,
868 1809, 1810, 1811, 1813, 1821, 1828, 1836, 1844, 1851, 1858,
869 1867, 1876, 1885, 1894, 1903, 1912, 1917, 1918, 1919, 1921,
870 1927, 1937
849871 };
850872 #endif
851873
895917 "VAR_HARDEN_BELOW_NXDOMAIN", "VAR_IGNORE_CD_FLAG", "VAR_LOG_QUERIES",
896918 "VAR_TCP_UPSTREAM", "VAR_SSL_UPSTREAM", "VAR_SSL_SERVICE_KEY",
897919 "VAR_SSL_SERVICE_PEM", "VAR_SSL_PORT", "VAR_FORWARD_FIRST",
898 "VAR_STUB_FIRST", "VAR_MINIMAL_RESPONSES", "VAR_RRSET_ROUNDROBIN",
899 "VAR_MAX_UDP_SIZE", "VAR_DELAY_CLOSE", "VAR_UNBLOCK_LAN_ZONES",
900 "VAR_INSECURE_LAN_ZONES", "VAR_INFRA_CACHE_MIN_RTT", "VAR_DNS64_PREFIX",
901 "VAR_DNS64_SYNTHALL", "VAR_DNSTAP", "VAR_DNSTAP_ENABLE",
902 "VAR_DNSTAP_SOCKET_PATH", "VAR_DNSTAP_SEND_IDENTITY",
903 "VAR_DNSTAP_SEND_VERSION", "VAR_DNSTAP_IDENTITY", "VAR_DNSTAP_VERSION",
920 "VAR_STUB_SSL_UPSTREAM", "VAR_FORWARD_SSL_UPSTREAM", "VAR_STUB_FIRST",
921 "VAR_MINIMAL_RESPONSES", "VAR_RRSET_ROUNDROBIN", "VAR_MAX_UDP_SIZE",
922 "VAR_DELAY_CLOSE", "VAR_UNBLOCK_LAN_ZONES", "VAR_INSECURE_LAN_ZONES",
923 "VAR_INFRA_CACHE_MIN_RTT", "VAR_DNS64_PREFIX", "VAR_DNS64_SYNTHALL",
924 "VAR_DNSTAP", "VAR_DNSTAP_ENABLE", "VAR_DNSTAP_SOCKET_PATH",
925 "VAR_DNSTAP_SEND_IDENTITY", "VAR_DNSTAP_SEND_VERSION",
926 "VAR_DNSTAP_IDENTITY", "VAR_DNSTAP_VERSION",
904927 "VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES",
905928 "VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES",
906929 "VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES",
912935 "VAR_RATELIMIT_SIZE", "VAR_RATELIMIT_FOR_DOMAIN",
913936 "VAR_RATELIMIT_BELOW_DOMAIN", "VAR_RATELIMIT_FACTOR",
914937 "VAR_CAPS_WHITELIST", "VAR_CACHE_MAX_NEGATIVE_TTL",
915 "VAR_PERMIT_SMALL_HOLDDOWN", "VAR_QNAME_MINIMISATION", "VAR_IP_FREEBIND",
916 "VAR_DEFINE_TAG", "VAR_LOCAL_ZONE_TAG", "VAR_ACCESS_CONTROL_TAG",
938 "VAR_PERMIT_SMALL_HOLDDOWN", "VAR_QNAME_MINIMISATION",
939 "VAR_QNAME_MINIMISATION_STRICT", "VAR_IP_FREEBIND", "VAR_DEFINE_TAG",
940 "VAR_LOCAL_ZONE_TAG", "VAR_ACCESS_CONTROL_TAG",
917941 "VAR_LOCAL_ZONE_OVERRIDE", "VAR_ACCESS_CONTROL_TAG_ACTION",
918 "VAR_ACCESS_CONTROL_TAG_DATA", "$accept", "toplevelvars", "toplevelvar",
942 "VAR_ACCESS_CONTROL_TAG_DATA", "VAR_VIEW", "VAR_ACCESS_CONTROL_VIEW",
943 "VAR_VIEW_FIRST", "VAR_SERVE_EXPIRED", "VAR_FAKE_DSA",
944 "VAR_LOG_IDENTITY", "$accept", "toplevelvars", "toplevelvar",
919945 "serverstart", "contents_server", "content_server", "stubstart",
920946 "contents_stub", "content_stub", "forwardstart", "contents_forward",
921 "content_forward", "server_num_threads", "server_verbosity",
922 "server_statistics_interval", "server_statistics_cumulative",
923 "server_extended_statistics", "server_port", "server_interface",
924 "server_outgoing_interface", "server_outgoing_range",
925 "server_outgoing_port_permit", "server_outgoing_port_avoid",
926 "server_outgoing_num_tcp", "server_incoming_num_tcp",
927 "server_interface_automatic", "server_do_ip4", "server_do_ip6",
928 "server_do_udp", "server_do_tcp", "server_prefer_ip6", "server_tcp_mss",
929 "server_outgoing_tcp_mss", "server_tcp_upstream", "server_ssl_upstream",
930 "server_ssl_service_key", "server_ssl_service_pem", "server_ssl_port",
931 "server_do_daemonize", "server_use_syslog", "server_log_time_ascii",
932 "server_log_queries", "server_chroot", "server_username",
933 "server_directory", "server_logfile", "server_pidfile",
934 "server_root_hints", "server_dlv_anchor_file", "server_dlv_anchor",
935 "server_auto_trust_anchor_file", "server_trust_anchor_file",
936 "server_trusted_keys_file", "server_trust_anchor",
937 "server_domain_insecure", "server_hide_identity", "server_hide_version",
938 "server_identity", "server_version", "server_so_rcvbuf",
939 "server_so_sndbuf", "server_so_reuseport", "server_ip_transparent",
940 "server_ip_freebind", "server_edns_buffer_size",
947 "content_forward", "viewstart", "contents_view", "content_view",
948 "server_num_threads", "server_verbosity", "server_statistics_interval",
949 "server_statistics_cumulative", "server_extended_statistics",
950 "server_port", "server_interface", "server_outgoing_interface",
951 "server_outgoing_range", "server_outgoing_port_permit",
952 "server_outgoing_port_avoid", "server_outgoing_num_tcp",
953 "server_incoming_num_tcp", "server_interface_automatic", "server_do_ip4",
954 "server_do_ip6", "server_do_udp", "server_do_tcp", "server_prefer_ip6",
955 "server_tcp_mss", "server_outgoing_tcp_mss", "server_tcp_upstream",
956 "server_ssl_upstream", "server_ssl_service_key",
957 "server_ssl_service_pem", "server_ssl_port", "server_do_daemonize",
958 "server_use_syslog", "server_log_time_ascii", "server_log_queries",
959 "server_chroot", "server_username", "server_directory", "server_logfile",
960 "server_pidfile", "server_root_hints", "server_dlv_anchor_file",
961 "server_dlv_anchor", "server_auto_trust_anchor_file",
962 "server_trust_anchor_file", "server_trusted_keys_file",
963 "server_trust_anchor", "server_domain_insecure", "server_hide_identity",
964 "server_hide_version", "server_identity", "server_version",
965 "server_so_rcvbuf", "server_so_sndbuf", "server_so_reuseport",
966 "server_ip_transparent", "server_ip_freebind", "server_edns_buffer_size",
941967 "server_msg_buffer_size", "server_msg_cache_size",
942968 "server_msg_cache_slabs", "server_num_queries_per_thread",
943969 "server_jostle_timeout", "server_delay_close",
960986 "server_cache_max_negative_ttl", "server_cache_min_ttl",
961987 "server_bogus_ttl", "server_val_clean_additional",
962988 "server_val_permissive_mode", "server_ignore_cd_flag",
963 "server_val_log_level", "server_val_nsec3_keysize_iterations",
964 "server_add_holddown", "server_del_holddown", "server_keep_missing",
989 "server_serve_expired", "server_fake_dsa", "server_val_log_level",
990 "server_val_nsec3_keysize_iterations", "server_add_holddown",
991 "server_del_holddown", "server_keep_missing",
965992 "server_permit_small_holddown", "server_key_cache_size",
966993 "server_key_cache_slabs", "server_neg_cache_size", "server_local_zone",
967994 "server_local_data", "server_local_data_ptr", "server_minimal_responses",
969996 "server_dns64_synthall", "server_define_tag", "server_local_zone_tag",
970997 "server_access_control_tag", "server_access_control_tag_action",
971998 "server_access_control_tag_data", "server_local_zone_override",
972 "server_ratelimit", "server_ratelimit_size", "server_ratelimit_slabs",
999 "server_access_control_view", "server_ratelimit",
1000 "server_ratelimit_size", "server_ratelimit_slabs",
9731001 "server_ratelimit_for_domain", "server_ratelimit_below_domain",
974 "server_ratelimit_factor", "server_qname_minimisation", "stub_name",
975 "stub_host", "stub_addr", "stub_first", "stub_prime", "forward_name",
976 "forward_host", "forward_addr", "forward_first", "rcstart",
977 "contents_rc", "content_rc", "rc_control_enable", "rc_control_port",
978 "rc_control_interface", "rc_control_use_cert", "rc_server_key_file",
979 "rc_server_cert_file", "rc_control_key_file", "rc_control_cert_file",
980 "dtstart", "contents_dt", "content_dt", "dt_dnstap_enable",
981 "dt_dnstap_socket_path", "dt_dnstap_send_identity",
982 "dt_dnstap_send_version", "dt_dnstap_identity", "dt_dnstap_version",
1002 "server_ratelimit_factor", "server_qname_minimisation",
1003 "server_qname_minimisation_strict", "stub_name", "stub_host",
1004 "stub_addr", "stub_first", "stub_ssl_upstream", "stub_prime",
1005 "forward_name", "forward_host", "forward_addr", "forward_first",
1006 "forward_ssl_upstream", "view_name", "view_local_zone",
1007 "view_local_data", "view_first", "rcstart", "contents_rc", "content_rc",
1008 "rc_control_enable", "rc_control_port", "rc_control_interface",
1009 "rc_control_use_cert", "rc_server_key_file", "rc_server_cert_file",
1010 "rc_control_key_file", "rc_control_cert_file", "dtstart", "contents_dt",
1011 "content_dt", "dt_dnstap_enable", "dt_dnstap_socket_path",
1012 "dt_dnstap_send_identity", "dt_dnstap_send_version",
1013 "dt_dnstap_identity", "dt_dnstap_version",
9831014 "dt_dnstap_log_resolver_query_messages",
9841015 "dt_dnstap_log_resolver_response_messages",
9851016 "dt_dnstap_log_client_query_messages",
9871018 "dt_dnstap_log_forwarder_query_messages",
9881019 "dt_dnstap_log_forwarder_response_messages", "pythonstart",
9891020 "contents_py", "content_py", "py_script",
990 "server_disable_dnssec_lame_check", YY_NULLPTR
1021 "server_disable_dnssec_lame_check", "server_log_identity", YY_NULLPTR
9911022 };
9921023 #endif
9931024
10131044 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
10141045 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
10151046 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1016 425, 426, 427, 428, 429
1047 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
1048 435, 436, 437, 438
10171049 };
10181050 # endif
10191051
1020 #define YYPACT_NINF -81
1052 #define YYPACT_NINF -130
10211053
10221054 #define yypact_value_is_default(Yystate) \
1023 (!!((Yystate) == (-81)))
1055 (!!((Yystate) == (-130)))
10241056
10251057 #define YYTABLE_NINF -1
10261058
10311063 STATE-NUM. */
10321064 static const yytype_int16 yypact[] =
10331065 {
1034 -81, 130, -81, -81, -81, -81, -81, -81, -81, -81,
1035 -81, -81, -81, -81, -81, -81, -12, 91, 47, -13,
1036 36, -80, 19, 20, 21, 25, 26, 27, 81, 109,
1037 110, 122, 125, 126, 127, 128, 129, 132, 153, 154,
1038 155, 156, 157, 158, 159, 160, 162, 163, 164, 165,
1039 166, 181, 182, 183, 185, 186, 187, 188, 189, 190,
1040 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
1041 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
1042 212, 214, 215, 216, 217, 218, 219, 220, 221, 222,
1043 223, 224, 225, 226, 228, 229, 230, 231, 232, 233,
1044 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
1045 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
1046 254, 255, 256, 257, 258, 259, 260, 261, 263, 264,
1047 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1048 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1049 285, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1050 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1051 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1052 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1053 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1054 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1055 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1056 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1057 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1058 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1059 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1060 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1061 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1062 -81, 286, 287, 288, 289, 290, -81, -81, -81, -81,
1063 -81, -81, 291, 292, 293, 294, -81, -81, -81, -81,
1064 -81, 295, 296, 297, 298, 299, 300, 301, 302, -81,
1065 -81, -81, -81, -81, -81, -81, -81, -81, 303, 304,
1066 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1067 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1068 -81, -81, -81, 315, -81, -81, -81, -81, -81, -81,
1069 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1070 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1071 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1072 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1073 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1074 -81, -81, 316, 317, -81, -81, -81, -81, -81, -81,
1075 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1076 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1077 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1078 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1079 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1080 -81, 318, 319, -81, -81, -81, -81, -81, -81, -81,
1081 320, 321, 322, 323, 324, -81, -81, -81, -81, -81,
1082 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1083 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1084 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1085 -81, 325, 326, 327, -81, -81, -81
1066 -130, 0, -130, -130, -130, -130, -130, -130, -130, -130,
1067 -130, -130, -130, -130, -130, -130, -130, -130, 135, -38,
1068 -34, -39, -64, -129, -105, -3, -2, -1, 2, 3,
1069 26, 29, 30, 32, 33, 34, 35, 36, 38, 39,
1070 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
1071 50, 51, 52, 53, 54, 56, 57, 58, 59, 60,
1072 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1073 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1074 82, 83, 85, 88, 90, 91, 92, 93, 94, 95,
1075 96, 98, 99, 100, 101, 102, 103, 104, 105, 106,
1076 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1077 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
1078 127, 128, 129, 130, 132, 133, 136, 165, 166, 167,
1079 172, 173, 174, 216, 217, 218, 219, 220, 221, 222,
1080 223, 224, 228, 232, 233, 256, 257, 258, 259, 269,
1081 270, 271, 272, 273, 274, 275, 276, 277, 278, -130,
1082 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1083 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1084 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1085 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1086 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1087 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1088 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1089 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1090 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1091 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1092 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1093 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1094 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1095 -130, -130, -130, -130, 279, 280, 281, 303, 305, 309,
1096 -130, -130, -130, -130, -130, -130, -130, 310, 311, 312,
1097 313, 314, -130, -130, -130, -130, -130, -130, 315, 316,
1098 317, 318, -130, -130, -130, -130, -130, 319, 320, 321,
1099 322, 323, 324, 325, 326, -130, -130, -130, -130, -130,
1100 -130, -130, -130, -130, 327, 328, 329, 330, 331, 332,
1101 333, 334, 335, 336, 337, 338, -130, -130, -130, -130,
1102 -130, -130, -130, -130, -130, -130, -130, -130, -130, 339,
1103 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1104 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1105 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1106 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1107 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1108 -130, -130, -130, -130, -130, -130, -130, -130, 340, 341,
1109 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1110 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1111 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1112 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1113 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1114 -130, -130, -130, -130, -130, -130, -130, 342, 343, -130,
1115 -130, -130, -130, -130, -130, -130, -130, 344, 345, 346,
1116 347, 348, 349, -130, -130, -130, -130, -130, -130, -130,
1117 -130, -130, -130, -130, -130, -130, -130, -130, 350, -130,
1118 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1119 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1120 -130, -130, -130, -130, -130, -130, -130, -130, 351, 352,
1121 353, -130, -130, -130, -130, -130
10861122 };
10871123
10881124 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
10901126 means the default is an error. */
10911127 static const yytype_uint16 yydefact[] =
10921128 {
1093 2, 0, 1, 10, 142, 150, 294, 340, 313, 3,
1094 12, 144, 152, 296, 315, 342, 4, 5, 6, 8,
1095 9, 7, 0, 0, 0, 0, 0, 0, 0, 0,
1129 2, 0, 1, 11, 148, 157, 319, 365, 338, 165,
1130 3, 13, 150, 159, 167, 321, 340, 367, 4, 5,
1131 6, 10, 8, 9, 7, 0, 0, 0, 0, 0,
10961132 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
10971133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
10981134 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11051141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11061142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11071143 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1108 0, 11, 13, 14, 73, 76, 85, 15, 24, 64,
1109 16, 77, 78, 35, 57, 72, 17, 18, 20, 21,
1110 19, 22, 23, 107, 108, 109, 110, 111, 74, 63,
1111 89, 106, 25, 26, 27, 28, 29, 65, 79, 80,
1112 95, 51, 61, 52, 90, 45, 46, 47, 48, 99,
1113 103, 115, 123, 134, 100, 58, 30, 31, 32, 87,
1114 116, 117, 118, 33, 34, 36, 37, 39, 40, 38,
1115 121, 41, 42, 43, 49, 68, 104, 82, 122, 75,
1116 130, 83, 84, 101, 102, 88, 44, 66, 69, 50,
1117 53, 91, 92, 67, 131, 93, 54, 55, 56, 105,
1118 94, 62, 96, 97, 98, 132, 59, 60, 81, 70,
1119 71, 86, 112, 113, 114, 119, 120, 135, 136, 138,
1120 140, 141, 139, 124, 126, 125, 127, 128, 129, 133,
1121 137, 0, 0, 0, 0, 0, 143, 145, 146, 147,
1122 149, 148, 0, 0, 0, 0, 151, 153, 154, 155,
1123 156, 0, 0, 0, 0, 0, 0, 0, 0, 295,
1124 297, 299, 298, 304, 300, 301, 302, 303, 0, 0,
1125 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1126 314, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1127 325, 326, 327, 0, 341, 343, 158, 157, 162, 165,
1128 163, 171, 172, 175, 173, 174, 176, 177, 187, 188,
1129 189, 190, 191, 211, 212, 213, 218, 219, 168, 220,
1130 221, 224, 222, 223, 226, 227, 228, 241, 200, 201,
1131 202, 203, 229, 244, 196, 198, 245, 251, 252, 253,
1132 169, 210, 261, 262, 197, 256, 184, 164, 192, 242,
1133 248, 230, 0, 0, 265, 170, 159, 183, 234, 160,
1134 166, 167, 193, 194, 263, 232, 236, 237, 161, 266,
1135 214, 240, 185, 199, 246, 247, 250, 255, 195, 259,
1136 257, 258, 204, 209, 238, 239, 205, 206, 231, 254,
1137 186, 178, 179, 180, 181, 182, 267, 268, 269, 215,
1138 216, 217, 225, 270, 271, 233, 207, 345, 278, 280,
1139 279, 0, 0, 283, 235, 249, 260, 284, 208, 272,
1140 0, 0, 0, 0, 0, 285, 286, 287, 289, 288,
1141 290, 291, 292, 293, 305, 307, 306, 309, 310, 311,
1142 312, 308, 328, 329, 330, 331, 332, 333, 334, 335,
1143 336, 337, 338, 339, 344, 243, 264, 281, 282, 273,
1144 274, 0, 0, 0, 277, 275, 276
1144 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,
1145 14, 15, 74, 77, 86, 16, 25, 65, 17, 78,
1146 79, 36, 58, 73, 18, 19, 21, 22, 20, 23,
1147 24, 108, 109, 110, 111, 112, 75, 64, 90, 107,
1148 26, 27, 28, 29, 30, 66, 80, 81, 96, 52,
1149 62, 53, 91, 46, 47, 48, 49, 100, 104, 116,
1150 124, 135, 101, 59, 31, 32, 33, 88, 117, 118,
1151 119, 34, 35, 37, 38, 40, 41, 39, 122, 42,
1152 43, 44, 50, 69, 105, 83, 123, 76, 131, 84,
1153 85, 102, 103, 89, 45, 67, 70, 51, 54, 92,
1154 93, 68, 132, 94, 55, 56, 57, 106, 145, 146,
1155 95, 63, 97, 98, 99, 133, 60, 61, 82, 71,
1156 72, 87, 113, 114, 115, 120, 121, 136, 137, 139,
1157 141, 142, 140, 143, 125, 127, 126, 128, 129, 130,
1158 134, 144, 138, 147, 0, 0, 0, 0, 0, 0,
1159 149, 151, 152, 153, 155, 156, 154, 0, 0, 0,
1160 0, 0, 158, 160, 161, 162, 163, 164, 0, 0,
1161 0, 0, 166, 168, 169, 170, 171, 0, 0, 0,
1162 0, 0, 0, 0, 0, 320, 322, 324, 323, 329,
1163 325, 326, 327, 328, 0, 0, 0, 0, 0, 0,
1164 0, 0, 0, 0, 0, 0, 339, 341, 342, 343,
1165 344, 345, 346, 347, 348, 349, 350, 351, 352, 0,
1166 366, 368, 173, 172, 177, 180, 178, 186, 187, 190,
1167 188, 189, 191, 192, 202, 203, 204, 205, 206, 226,
1168 227, 228, 233, 234, 183, 235, 236, 239, 237, 238,
1169 241, 242, 243, 256, 215, 216, 217, 218, 244, 259,
1170 211, 213, 260, 266, 267, 268, 184, 225, 278, 279,
1171 212, 273, 199, 179, 207, 257, 263, 245, 0, 0,
1172 282, 185, 174, 198, 249, 175, 181, 182, 208, 209,
1173 280, 247, 251, 252, 176, 283, 229, 255, 200, 214,
1174 261, 262, 265, 272, 210, 276, 274, 275, 219, 224,
1175 253, 254, 220, 221, 246, 269, 201, 193, 194, 195,
1176 196, 197, 284, 285, 286, 230, 231, 232, 240, 287,
1177 288, 248, 222, 370, 296, 298, 297, 0, 0, 301,
1178 250, 264, 277, 302, 303, 223, 289, 0, 0, 0,
1179 0, 0, 0, 270, 271, 371, 304, 305, 306, 309,
1180 308, 307, 310, 311, 312, 313, 314, 315, 0, 317,
1181 318, 330, 332, 331, 334, 335, 336, 337, 333, 353,
1182 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
1183 364, 369, 258, 281, 299, 300, 290, 291, 0, 0,
1184 0, 295, 316, 294, 292, 293
11451185 };
11461186
11471187 /* YYPGOTO[NTERM-NUM]. */
1148 static const yytype_int8 yypgoto[] =
1188 static const yytype_int16 yypgoto[] =
11491189 {
1150 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1151 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1152 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1153 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1154 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1155 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1156 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1157 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1158 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1159 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1160 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1161 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1162 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1163 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1164 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1165 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1166 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81,
1167 -81, -81, -81, -81, -81, -81, -81, -81, -81, -81
1190 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1191 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1192 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1193 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1194 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1195 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1196 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1197 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1198 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1199 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1200 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1201 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1202 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1203 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1204 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1205 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1206 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1207 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1208 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1209 -130, -130, -130, -130
11681210 };
11691211
11701212 /* YYDEFGOTO[NTERM-NUM]. */
11711213 static const yytype_int16 yydefgoto[] =
11721214 {
1173 -1, 1, 9, 10, 16, 151, 11, 17, 286, 12,
1174 18, 296, 152, 153, 154, 155, 156, 157, 158, 159,
1175 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
1176 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
1177 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
1178 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
1179 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
1180 210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
1181 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
1182 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1183 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
1184 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
1185 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
1186 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
1187 287, 288, 289, 290, 291, 297, 298, 299, 300, 13,
1188 19, 309, 310, 311, 312, 313, 314, 315, 316, 317,
1189 14, 20, 330, 331, 332, 333, 334, 335, 336, 337,
1190 338, 339, 340, 341, 342, 15, 21, 344, 345, 280
1191 };
1192
1193 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1194 positive, shift that token. If negative, reduce the rule whose
1195 number is the opposite. If YYTABLE_NINF, syntax error. */
1196 static const yytype_uint16 yytable[] =
1197 {
1198 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1199 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1200 42, 43, 44, 45, 46, 47, 48, 49, 343, 346,
1201 347, 348, 50, 51, 52, 349, 350, 351, 53, 54,
1202 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1203 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1204 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1205 85, 86, 87, 88, 89, 90, 91, 92, 93, 301,
1206 302, 303, 304, 305, 306, 307, 308, 292, 94, 95,
1207 96, 352, 97, 98, 99, 293, 294, 100, 101, 102,
1208 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
1209 113, 114, 115, 116, 117, 118, 119, 120, 121, 353,
1210 354, 122, 123, 124, 125, 126, 127, 128, 129, 130,
1211 2, 281, 355, 282, 283, 356, 357, 358, 359, 360,
1212 0, 3, 361, 131, 132, 133, 134, 135, 136, 137,
1213 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1214 148, 149, 150, 362, 363, 364, 365, 366, 367, 368,
1215 369, 4, 370, 371, 372, 373, 374, 5, 295, 318,
1216 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
1217 329, 375, 376, 377, 284, 378, 379, 380, 381, 382,
1218 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
1219 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
1220 403, 6, 404, 285, 405, 406, 407, 408, 409, 410,
1221 411, 412, 413, 414, 415, 416, 417, 7, 418, 419,
1222 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
1223 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
1224 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
1225 450, 451, 8, 452, 453, 454, 455, 456, 457, 458,
1226 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
1227 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
1228 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
1229 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
1230 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
1231 509, 510, 511, 512, 513, 514, 515, 516
1232 };
1233
1234 static const yytype_int16 yycheck[] =
1235 {
1236 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1237 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1238 32, 33, 34, 35, 36, 37, 38, 39, 108, 10,
1239 10, 10, 44, 45, 46, 10, 10, 10, 50, 51,
1240 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1241 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
1242 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1243 82, 83, 84, 85, 86, 87, 88, 89, 90, 92,
1244 93, 94, 95, 96, 97, 98, 99, 40, 100, 101,
1245 102, 10, 104, 105, 106, 48, 49, 109, 110, 111,
1246 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
1247 122, 123, 124, 125, 126, 127, 128, 129, 130, 10,
1248 10, 133, 134, 135, 136, 137, 138, 139, 140, 141,
1249 0, 40, 10, 42, 43, 10, 10, 10, 10, 10,
1250 -1, 11, 10, 155, 156, 157, 158, 159, 160, 161,
1251 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
1252 172, 173, 174, 10, 10, 10, 10, 10, 10, 10,
1253 10, 41, 10, 10, 10, 10, 10, 47, 131, 143,
1254 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
1255 154, 10, 10, 10, 103, 10, 10, 10, 10, 10,
1256 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1257 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1258 10, 91, 10, 132, 10, 10, 10, 10, 10, 10,
1259 10, 10, 10, 10, 10, 10, 10, 107, 10, 10,
1260 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1261 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1262 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1263 10, 10, 142, 10, 10, 10, 10, 10, 10, 10,
1264 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1265 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1266 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1267 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1268 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1269 10, 10, 10, 10, 10, 10, 10, 10
1270 };
1271
1272 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1273 symbol of state STATE-NUM. */
1274 static const yytype_uint16 yystos[] =
1275 {
1276 0, 176, 0, 11, 41, 47, 91, 107, 142, 177,
1277 178, 181, 184, 324, 335, 350, 179, 182, 185, 325,
1278 336, 351, 12, 13, 14, 15, 16, 17, 18, 19,
1279 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1280 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1281 44, 45, 46, 50, 51, 52, 53, 54, 55, 56,
1282 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
1283 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1284 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
1285 87, 88, 89, 90, 100, 101, 102, 104, 105, 106,
1286 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1287 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
1288 129, 130, 133, 134, 135, 136, 137, 138, 139, 140,
1289 141, 155, 156, 157, 158, 159, 160, 161, 162, 163,
1290 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
1291 174, 180, 187, 188, 189, 190, 191, 192, 193, 194,
1215 -1, 1, 10, 11, 18, 159, 12, 19, 300, 13,
1216 20, 312, 14, 21, 322, 160, 161, 162, 163, 164,
1217 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
1218 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
1219 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
12921220 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
12931221 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
12941222 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
12981226 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
12991227 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
13001228 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1301 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1302 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1303 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1304 354, 40, 42, 43, 103, 132, 183, 315, 316, 317,
1305 318, 319, 40, 48, 49, 131, 186, 320, 321, 322,
1306 323, 92, 93, 94, 95, 96, 97, 98, 99, 326,
1307 327, 328, 329, 330, 331, 332, 333, 334, 143, 144,
1308 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
1309 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
1310 347, 348, 349, 108, 352, 353, 10, 10, 10, 10,
1229 285, 286, 287, 288, 289, 290, 291, 301, 302, 303,
1230 304, 305, 306, 313, 314, 315, 316, 317, 323, 324,
1231 325, 326, 15, 22, 335, 336, 337, 338, 339, 340,
1232 341, 342, 343, 16, 23, 356, 357, 358, 359, 360,
1233 361, 362, 363, 364, 365, 366, 367, 368, 17, 24,
1234 370, 371, 292, 293
1235 };
1236
1237 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1238 positive, shift that token. If negative, reduce the rule whose
1239 number is the opposite. If YYTABLE_NINF, syntax error. */
1240 static const yytype_uint16 yytable[] =
1241 {
1242 2, 318, 294, 369, 295, 296, 307, 372, 373, 374,
1243 0, 3, 375, 376, 308, 309, 344, 345, 346, 347,
1244 348, 349, 350, 351, 352, 353, 354, 355, 327, 328,
1245 329, 330, 331, 332, 333, 334, 377, 319, 320, 378,
1246 379, 4, 380, 381, 382, 383, 384, 5, 385, 386,
1247 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
1248 397, 398, 399, 400, 401, 297, 402, 403, 404, 405,
1249 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
1250 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
1251 426, 6, 427, 428, 298, 429, 299, 310, 430, 311,
1252 431, 432, 433, 434, 435, 436, 437, 7, 438, 439,
1253 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
1254 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
1255 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
1256 470, 321, 471, 472, 8, 0, 473, 25, 26, 27,
1257 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1258 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1259 48, 49, 50, 51, 52, 474, 475, 476, 9, 53,
1260 54, 55, 477, 478, 479, 56, 57, 58, 59, 60,
1261 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1262 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
1263 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1264 91, 92, 93, 94, 95, 96, 480, 481, 482, 483,
1265 484, 485, 486, 487, 488, 97, 98, 99, 489, 100,
1266 101, 102, 490, 491, 103, 104, 105, 106, 107, 108,
1267 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1268 119, 120, 121, 122, 123, 124, 492, 493, 494, 495,
1269 125, 126, 127, 128, 129, 130, 131, 132, 133, 496,
1270 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
1271 507, 508, 134, 135, 136, 137, 138, 139, 140, 141,
1272 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
1273 152, 153, 154, 509, 155, 510, 156, 157, 158, 511,
1274 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
1275 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
1276 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
1277 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
1278 552, 553, 554, 555
1279 };
1280
1281 static const yytype_int16 yycheck[] =
1282 {
1283 0, 40, 40, 108, 42, 43, 40, 10, 10, 10,
1284 -1, 11, 10, 10, 48, 49, 145, 146, 147, 148,
1285 149, 150, 151, 152, 153, 154, 155, 156, 92, 93,
1286 94, 95, 96, 97, 98, 99, 10, 76, 77, 10,
1287 10, 41, 10, 10, 10, 10, 10, 47, 10, 10,
1288 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1289 10, 10, 10, 10, 10, 103, 10, 10, 10, 10,
1290 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1291 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1292 10, 91, 10, 10, 132, 10, 134, 131, 10, 133,
1293 10, 10, 10, 10, 10, 10, 10, 107, 10, 10,
1294 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1295 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1296 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1297 10, 180, 10, 10, 144, -1, 10, 12, 13, 14,
1298 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1299 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1300 35, 36, 37, 38, 39, 10, 10, 10, 178, 44,
1301 45, 46, 10, 10, 10, 50, 51, 52, 53, 54,
1302 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1303 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1304 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1305 85, 86, 87, 88, 89, 90, 10, 10, 10, 10,
1306 10, 10, 10, 10, 10, 100, 101, 102, 10, 104,
1307 105, 106, 10, 10, 109, 110, 111, 112, 113, 114,
1308 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
1309 125, 126, 127, 128, 129, 130, 10, 10, 10, 10,
1310 135, 136, 137, 138, 139, 140, 141, 142, 143, 10,
1311 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1312 10, 10, 157, 158, 159, 160, 161, 162, 163, 164,
1313 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
1314 175, 176, 177, 10, 179, 10, 181, 182, 183, 10,
1315 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1316 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1317 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1318 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1319 10, 10, 10, 10
1320 };
1321
1322 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1323 symbol of state STATE-NUM. */
1324 static const yytype_uint16 yystos[] =
1325 {
1326 0, 185, 0, 11, 41, 47, 91, 107, 144, 178,
1327 186, 187, 190, 193, 196, 346, 357, 372, 188, 191,
1328 194, 197, 347, 358, 373, 12, 13, 14, 15, 16,
1329 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1330 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
1331 37, 38, 39, 44, 45, 46, 50, 51, 52, 53,
1332 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1333 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1334 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
1335 84, 85, 86, 87, 88, 89, 90, 100, 101, 102,
1336 104, 105, 106, 109, 110, 111, 112, 113, 114, 115,
1337 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
1338 126, 127, 128, 129, 130, 135, 136, 137, 138, 139,
1339 140, 141, 142, 143, 157, 158, 159, 160, 161, 162,
1340 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
1341 173, 174, 175, 176, 177, 179, 181, 182, 183, 189,
1342 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
1343 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
1344 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
1345 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
1346 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
1347 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
1348 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
1349 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
1350 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
1351 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
1352 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
1353 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
1354 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
1355 329, 330, 376, 377, 40, 42, 43, 103, 132, 134,
1356 192, 331, 332, 333, 334, 335, 336, 40, 48, 49,
1357 131, 133, 195, 337, 338, 339, 340, 341, 40, 76,
1358 77, 180, 198, 342, 343, 344, 345, 92, 93, 94,
1359 95, 96, 97, 98, 99, 348, 349, 350, 351, 352,
1360 353, 354, 355, 356, 145, 146, 147, 148, 149, 150,
1361 151, 152, 153, 154, 155, 156, 359, 360, 361, 362,
1362 363, 364, 365, 366, 367, 368, 369, 370, 371, 108,
1363 374, 375, 10, 10, 10, 10, 10, 10, 10, 10,
13111364 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
13121365 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
13131366 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
13241377 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
13251378 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
13261379 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1327 10, 10, 10, 10, 10, 10, 10
1380 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
1381 10, 10, 10, 10, 10, 10
13281382 };
13291383
13301384 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
13311385 static const yytype_uint16 yyr1[] =
13321386 {
1333 0, 175, 176, 176, 177, 177, 177, 177, 177, 177,
1334 178, 179, 179, 180, 180, 180, 180, 180, 180, 180,
1335 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1336 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1337 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1338 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1339 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1340 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1341 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1342 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1343 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1344 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1345 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1346 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1347 180, 180, 181, 182, 182, 183, 183, 183, 183, 183,
1348 184, 185, 185, 186, 186, 186, 186, 187, 188, 189,
1349 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
1350 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
1351 210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
1352 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
1353 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1354 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
1355 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
1356 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
1357 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
1358 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
1359 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
1360 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
1361 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
1362 320, 321, 322, 323, 324, 325, 325, 326, 326, 326,
1363 326, 326, 326, 326, 326, 327, 328, 329, 330, 331,
1364 332, 333, 334, 335, 336, 336, 337, 337, 337, 337,
1365 337, 337, 337, 337, 337, 337, 337, 337, 338, 339,
1366 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
1367 350, 351, 351, 352, 353, 354
1387 0, 184, 185, 185, 186, 186, 186, 186, 186, 186,
1388 186, 187, 188, 188, 189, 189, 189, 189, 189, 189,
1389 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
1390 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
1391 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
1392 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
1393 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
1394 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
1395 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
1396 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
1397 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
1398 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
1399 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
1400 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
1401 189, 189, 189, 189, 189, 189, 189, 189, 190, 191,
1402 191, 192, 192, 192, 192, 192, 192, 193, 194, 194,
1403 195, 195, 195, 195, 195, 196, 197, 197, 198, 198,
1404 198, 198, 199, 200, 201, 202, 203, 204, 205, 206,
1405 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
1406 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
1407 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
1408 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
1409 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
1410 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
1411 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
1412 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
1413 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
1414 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
1415 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
1416 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
1417 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
1418 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
1419 347, 347, 348, 348, 348, 348, 348, 348, 348, 348,
1420 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
1421 358, 359, 359, 359, 359, 359, 359, 359, 359, 359,
1422 359, 359, 359, 360, 361, 362, 363, 364, 365, 366,
1423 367, 368, 369, 370, 371, 372, 373, 373, 374, 375,
1424 376, 377
13681425 };
13691426
13701427 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
13711428 static const yytype_uint8 yyr2[] =
13721429 {
13731430 0, 2, 0, 2, 2, 2, 2, 2, 2, 2,
1374 1, 2, 0, 1, 1, 1, 1, 1, 1, 1,
1431 2, 1, 2, 0, 1, 1, 1, 1, 1, 1,
13751432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
13761433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
13771434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
13841441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
13851442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
13861443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1387 1, 1, 1, 2, 0, 1, 1, 1, 1, 1,
1388 1, 2, 0, 1, 1, 1, 1, 2, 2, 2,
1444 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1445 0, 1, 1, 1, 1, 1, 1, 1, 2, 0,
1446 1, 1, 1, 1, 1, 1, 2, 0, 1, 1,
1447 1, 1, 2, 2, 2, 2, 2, 2, 2, 2,
13891448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13901449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13911450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13931452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13941453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13951454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1455 2, 2, 2, 2, 2, 2, 2, 2, 3, 2,
13961456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1397 2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
13981457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1399 2, 2, 2, 2, 3, 2, 2, 2, 2, 2,
1400 2, 2, 2, 3, 3, 4, 4, 4, 2, 2,
1401 2, 3, 3, 2, 2, 2, 2, 2, 2, 2,
1402 2, 2, 2, 2, 1, 2, 0, 1, 1, 1,
1403 1, 1, 1, 1, 1, 2, 2, 2, 2, 2,
1404 2, 2, 2, 1, 2, 0, 1, 1, 1, 1,
1405 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1406 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1407 1, 2, 0, 1, 2, 2
1458 2, 3, 2, 2, 2, 2, 2, 2, 2, 2,
1459 3, 3, 4, 4, 4, 3, 2, 2, 2, 3,
1460 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1461 2, 2, 2, 2, 2, 2, 3, 2, 2, 1,
1462 2, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1463 2, 2, 2, 2, 2, 2, 2, 2, 1, 2,
1464 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1465 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
1466 2, 2, 2, 2, 2, 1, 2, 0, 1, 2,
1467 2, 2
14081468 };
14091469
14101470
20802140 YY_REDUCE_PRINT (yyn);
20812141 switch (yyn)
20822142 {
2083 case 10:
2084 #line 141 "util/configparser.y" /* yacc.c:1646 */
2143 case 11:
2144 #line 146 "util/configparser.y" /* yacc.c:1646 */
20852145 {
20862146 OUTYY(("\nP(server:)\n"));
20872147 }
2088 #line 2090 "util/configparser.c" /* yacc.c:1646 */
2089 break;
2090
2091 case 142:
2092 #line 205 "util/configparser.y" /* yacc.c:1646 */
2148 #line 2150 "util/configparser.c" /* yacc.c:1646 */
2149 break;
2150
2151 case 148:
2152 #line 212 "util/configparser.y" /* yacc.c:1646 */
20932153 {
20942154 struct config_stub* s;
20952155 OUTYY(("\nP(stub_zone:)\n"));
21002160 } else
21012161 yyerror("out of memory");
21022162 }
2103 #line 2105 "util/configparser.c" /* yacc.c:1646 */
2104 break;
2105
2106 case 150:
2107 #line 221 "util/configparser.y" /* yacc.c:1646 */
2163 #line 2165 "util/configparser.c" /* yacc.c:1646 */
2164 break;
2165
2166 case 157:
2167 #line 229 "util/configparser.y" /* yacc.c:1646 */
21082168 {
21092169 struct config_stub* s;
21102170 OUTYY(("\nP(forward_zone:)\n"));
21152175 } else
21162176 yyerror("out of memory");
21172177 }
2118 #line 2120 "util/configparser.c" /* yacc.c:1646 */
2119 break;
2120
2121 case 157:
2122 #line 237 "util/configparser.y" /* yacc.c:1646 */
2178 #line 2180 "util/configparser.c" /* yacc.c:1646 */
2179 break;
2180
2181 case 165:
2182 #line 246 "util/configparser.y" /* yacc.c:1646 */
2183 {
2184 struct config_view* s;
2185 OUTYY(("\nP(view:)\n"));
2186 s = (struct config_view*)calloc(1, sizeof(struct config_view));
2187 if(s) {
2188 s->next = cfg_parser->cfg->views;
2189 if(s->next && !s->next->name)
2190 yyerror("view without name");
2191 cfg_parser->cfg->views = s;
2192 } else
2193 yyerror("out of memory");
2194 }
2195 #line 2197 "util/configparser.c" /* yacc.c:1646 */
2196 break;
2197
2198 case 172:
2199 #line 264 "util/configparser.y" /* yacc.c:1646 */
21232200 {
21242201 OUTYY(("P(server_num_threads:%s)\n", (yyvsp[0].str)));
21252202 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
21272204 else cfg_parser->cfg->num_threads = atoi((yyvsp[0].str));
21282205 free((yyvsp[0].str));
21292206 }
2130 #line 2132 "util/configparser.c" /* yacc.c:1646 */
2131 break;
2132
2133 case 158:
2134 #line 246 "util/configparser.y" /* yacc.c:1646 */
2207 #line 2209 "util/configparser.c" /* yacc.c:1646 */
2208 break;
2209
2210 case 173:
2211 #line 273 "util/configparser.y" /* yacc.c:1646 */
21352212 {
21362213 OUTYY(("P(server_verbosity:%s)\n", (yyvsp[0].str)));
21372214 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
21392216 else cfg_parser->cfg->verbosity = atoi((yyvsp[0].str));
21402217 free((yyvsp[0].str));
21412218 }
2142 #line 2144 "util/configparser.c" /* yacc.c:1646 */
2143 break;
2144
2145 case 159:
2146 #line 255 "util/configparser.y" /* yacc.c:1646 */
2219 #line 2221 "util/configparser.c" /* yacc.c:1646 */
2220 break;
2221
2222 case 174:
2223 #line 282 "util/configparser.y" /* yacc.c:1646 */
21472224 {
21482225 OUTYY(("P(server_statistics_interval:%s)\n", (yyvsp[0].str)));
21492226 if(strcmp((yyvsp[0].str), "") == 0 || strcmp((yyvsp[0].str), "0") == 0)
21532230 else cfg_parser->cfg->stat_interval = atoi((yyvsp[0].str));
21542231 free((yyvsp[0].str));
21552232 }
2156 #line 2158 "util/configparser.c" /* yacc.c:1646 */
2157 break;
2158
2159 case 160:
2160 #line 266 "util/configparser.y" /* yacc.c:1646 */
2233 #line 2235 "util/configparser.c" /* yacc.c:1646 */
2234 break;
2235
2236 case 175:
2237 #line 293 "util/configparser.y" /* yacc.c:1646 */
21612238 {
21622239 OUTYY(("P(server_statistics_cumulative:%s)\n", (yyvsp[0].str)));
21632240 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
21652242 else cfg_parser->cfg->stat_cumulative = (strcmp((yyvsp[0].str), "yes")==0);
21662243 free((yyvsp[0].str));
21672244 }
2168 #line 2170 "util/configparser.c" /* yacc.c:1646 */
2169 break;
2170
2171 case 161:
2172 #line 275 "util/configparser.y" /* yacc.c:1646 */
2245 #line 2247 "util/configparser.c" /* yacc.c:1646 */
2246 break;
2247
2248 case 176:
2249 #line 302 "util/configparser.y" /* yacc.c:1646 */
21732250 {
21742251 OUTYY(("P(server_extended_statistics:%s)\n", (yyvsp[0].str)));
21752252 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
21772254 else cfg_parser->cfg->stat_extended = (strcmp((yyvsp[0].str), "yes")==0);
21782255 free((yyvsp[0].str));
21792256 }
2180 #line 2182 "util/configparser.c" /* yacc.c:1646 */
2181 break;
2182
2183 case 162:
2184 #line 284 "util/configparser.y" /* yacc.c:1646 */
2257 #line 2259 "util/configparser.c" /* yacc.c:1646 */
2258 break;
2259
2260 case 177:
2261 #line 311 "util/configparser.y" /* yacc.c:1646 */
21852262 {
21862263 OUTYY(("P(server_port:%s)\n", (yyvsp[0].str)));
21872264 if(atoi((yyvsp[0].str)) == 0)
21892266 else cfg_parser->cfg->port = atoi((yyvsp[0].str));
21902267 free((yyvsp[0].str));
21912268 }
2192 #line 2194 "util/configparser.c" /* yacc.c:1646 */
2193 break;
2194
2195 case 163:
2196 #line 293 "util/configparser.y" /* yacc.c:1646 */
2269 #line 2271 "util/configparser.c" /* yacc.c:1646 */
2270 break;
2271
2272 case 178:
2273 #line 320 "util/configparser.y" /* yacc.c:1646 */
21972274 {
21982275 OUTYY(("P(server_interface:%s)\n", (yyvsp[0].str)));
21992276 if(cfg_parser->cfg->num_ifs == 0)
22052282 else
22062283 cfg_parser->cfg->ifs[cfg_parser->cfg->num_ifs++] = (yyvsp[0].str);
22072284 }
2208 #line 2210 "util/configparser.c" /* yacc.c:1646 */
2209 break;
2210
2211 case 164:
2212 #line 306 "util/configparser.y" /* yacc.c:1646 */
2285 #line 2287 "util/configparser.c" /* yacc.c:1646 */
2286 break;
2287
2288 case 179:
2289 #line 333 "util/configparser.y" /* yacc.c:1646 */
22132290 {
22142291 OUTYY(("P(server_outgoing_interface:%s)\n", (yyvsp[0].str)));
22152292 if(cfg_parser->cfg->num_out_ifs == 0)
22232300 cfg_parser->cfg->out_ifs[
22242301 cfg_parser->cfg->num_out_ifs++] = (yyvsp[0].str);
22252302 }
2226 #line 2228 "util/configparser.c" /* yacc.c:1646 */
2227 break;
2228
2229 case 165:
2230 #line 321 "util/configparser.y" /* yacc.c:1646 */
2303 #line 2305 "util/configparser.c" /* yacc.c:1646 */
2304 break;
2305
2306 case 180:
2307 #line 348 "util/configparser.y" /* yacc.c:1646 */
22312308 {
22322309 OUTYY(("P(server_outgoing_range:%s)\n", (yyvsp[0].str)));
22332310 if(atoi((yyvsp[0].str)) == 0)
22352312 else cfg_parser->cfg->outgoing_num_ports = atoi((yyvsp[0].str));
22362313 free((yyvsp[0].str));
22372314 }
2238 #line 2240 "util/configparser.c" /* yacc.c:1646 */
2239 break;
2240
2241 case 166:
2242 #line 330 "util/configparser.y" /* yacc.c:1646 */
2315 #line 2317 "util/configparser.c" /* yacc.c:1646 */
2316 break;
2317
2318 case 181:
2319 #line 357 "util/configparser.y" /* yacc.c:1646 */
22432320 {
22442321 OUTYY(("P(server_outgoing_port_permit:%s)\n", (yyvsp[0].str)));
22452322 if(!cfg_mark_ports((yyvsp[0].str), 1,
22472324 yyerror("port number or range (\"low-high\") expected");
22482325 free((yyvsp[0].str));
22492326 }
2250 #line 2252 "util/configparser.c" /* yacc.c:1646 */
2251 break;
2252
2253 case 167:
2254 #line 339 "util/configparser.y" /* yacc.c:1646 */
2327 #line 2329 "util/configparser.c" /* yacc.c:1646 */
2328 break;
2329
2330 case 182:
2331 #line 366 "util/configparser.y" /* yacc.c:1646 */
22552332 {
22562333 OUTYY(("P(server_outgoing_port_avoid:%s)\n", (yyvsp[0].str)));
22572334 if(!cfg_mark_ports((yyvsp[0].str), 0,
22592336 yyerror("port number or range (\"low-high\") expected");
22602337 free((yyvsp[0].str));
22612338 }
2262 #line 2264 "util/configparser.c" /* yacc.c:1646 */
2263 break;
2264
2265 case 168:
2266 #line 348 "util/configparser.y" /* yacc.c:1646 */
2339 #line 2341 "util/configparser.c" /* yacc.c:1646 */
2340 break;
2341
2342 case 183:
2343 #line 375 "util/configparser.y" /* yacc.c:1646 */
22672344 {
22682345 OUTYY(("P(server_outgoing_num_tcp:%s)\n", (yyvsp[0].str)));
22692346 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
22712348 else cfg_parser->cfg->outgoing_num_tcp = atoi((yyvsp[0].str));
22722349 free((yyvsp[0].str));
22732350 }
2274 #line 2276 "util/configparser.c" /* yacc.c:1646 */
2275 break;
2276
2277 case 169:
2278 #line 357 "util/configparser.y" /* yacc.c:1646 */
2351 #line 2353 "util/configparser.c" /* yacc.c:1646 */
2352 break;
2353
2354 case 184:
2355 #line 384 "util/configparser.y" /* yacc.c:1646 */
22792356 {
22802357 OUTYY(("P(server_incoming_num_tcp:%s)\n", (yyvsp[0].str)));
22812358 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
22832360 else cfg_parser->cfg->incoming_num_tcp = atoi((yyvsp[0].str));
22842361 free((yyvsp[0].str));
22852362 }
2286 #line 2288 "util/configparser.c" /* yacc.c:1646 */
2287 break;
2288
2289 case 170:
2290 #line 366 "util/configparser.y" /* yacc.c:1646 */
2363 #line 2365 "util/configparser.c" /* yacc.c:1646 */
2364 break;
2365
2366 case 185:
2367 #line 393 "util/configparser.y" /* yacc.c:1646 */
22912368 {
22922369 OUTYY(("P(server_interface_automatic:%s)\n", (yyvsp[0].str)));
22932370 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
22952372 else cfg_parser->cfg->if_automatic = (strcmp((yyvsp[0].str), "yes")==0);
22962373 free((yyvsp[0].str));
22972374 }
2298 #line 2300 "util/configparser.c" /* yacc.c:1646 */
2299 break;
2300
2301 case 171:
2302 #line 375 "util/configparser.y" /* yacc.c:1646 */
2375 #line 2377 "util/configparser.c" /* yacc.c:1646 */
2376 break;
2377
2378 case 186:
2379 #line 402 "util/configparser.y" /* yacc.c:1646 */
23032380 {
23042381 OUTYY(("P(server_do_ip4:%s)\n", (yyvsp[0].str)));
23052382 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
23072384 else cfg_parser->cfg->do_ip4 = (strcmp((yyvsp[0].str), "yes")==0);
23082385 free((yyvsp[0].str));
23092386 }
2310 #line 2312 "util/configparser.c" /* yacc.c:1646 */
2311 break;
2312
2313 case 172:
2314 #line 384 "util/configparser.y" /* yacc.c:1646 */
2387 #line 2389 "util/configparser.c" /* yacc.c:1646 */
2388 break;
2389
2390 case 187:
2391 #line 411 "util/configparser.y" /* yacc.c:1646 */
23152392 {
23162393 OUTYY(("P(server_do_ip6:%s)\n", (yyvsp[0].str)));
23172394 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
23192396 else cfg_parser->cfg->do_ip6 = (strcmp((yyvsp[0].str), "yes")==0);
23202397 free((yyvsp[0].str));
23212398 }
2322 #line 2324 "util/configparser.c" /* yacc.c:1646 */
2323 break;
2324
2325 case 173:
2326 #line 393 "util/configparser.y" /* yacc.c:1646 */
2399 #line 2401 "util/configparser.c" /* yacc.c:1646 */
2400 break;
2401
2402 case 188:
2403 #line 420 "util/configparser.y" /* yacc.c:1646 */
23272404 {
23282405 OUTYY(("P(server_do_udp:%s)\n", (yyvsp[0].str)));
23292406 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
23312408 else cfg_parser->cfg->do_udp = (strcmp((yyvsp[0].str), "yes")==0);
23322409 free((yyvsp[0].str));
23332410 }
2334 #line 2336 "util/configparser.c" /* yacc.c:1646 */
2335 break;
2336
2337 case 174:
2338 #line 402 "util/configparser.y" /* yacc.c:1646 */
2411 #line 2413 "util/configparser.c" /* yacc.c:1646 */
2412 break;
2413
2414 case 189:
2415 #line 429 "util/configparser.y" /* yacc.c:1646 */
23392416 {
23402417 OUTYY(("P(server_do_tcp:%s)\n", (yyvsp[0].str)));
23412418 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
23432420 else cfg_parser->cfg->do_tcp = (strcmp((yyvsp[0].str), "yes")==0);
23442421 free((yyvsp[0].str));
23452422 }
2346 #line 2348 "util/configparser.c" /* yacc.c:1646 */
2347 break;
2348
2349 case 175:
2350 #line 411 "util/configparser.y" /* yacc.c:1646 */
2423 #line 2425 "util/configparser.c" /* yacc.c:1646 */
2424 break;
2425
2426 case 190:
2427 #line 438 "util/configparser.y" /* yacc.c:1646 */
23512428 {
23522429 OUTYY(("P(server_prefer_ip6:%s)\n", (yyvsp[0].str)));
23532430 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
23552432 else cfg_parser->cfg->prefer_ip6 = (strcmp((yyvsp[0].str), "yes")==0);
23562433 free((yyvsp[0].str));
23572434 }
2358 #line 2360 "util/configparser.c" /* yacc.c:1646 */
2359 break;
2360
2361 case 176:
2362 #line 420 "util/configparser.y" /* yacc.c:1646 */
2435 #line 2437 "util/configparser.c" /* yacc.c:1646 */
2436 break;
2437
2438 case 191:
2439 #line 447 "util/configparser.y" /* yacc.c:1646 */
23632440 {
23642441 OUTYY(("P(server_tcp_mss:%s)\n", (yyvsp[0].str)));
23652442 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
23672444 else cfg_parser->cfg->tcp_mss = atoi((yyvsp[0].str));
23682445 free((yyvsp[0].str));
23692446 }
2370 #line 2372 "util/configparser.c" /* yacc.c:1646 */
2371 break;
2372
2373 case 177:
2374 #line 429 "util/configparser.y" /* yacc.c:1646 */
2447 #line 2449 "util/configparser.c" /* yacc.c:1646 */
2448 break;
2449
2450 case 192:
2451 #line 456 "util/configparser.y" /* yacc.c:1646 */
23752452 {
23762453 OUTYY(("P(server_outgoing_tcp_mss:%s)\n", (yyvsp[0].str)));
23772454 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
23792456 else cfg_parser->cfg->outgoing_tcp_mss = atoi((yyvsp[0].str));
23802457 free((yyvsp[0].str));
23812458 }
2382 #line 2384 "util/configparser.c" /* yacc.c:1646 */
2383 break;
2384
2385 case 178:
2386 #line 438 "util/configparser.y" /* yacc.c:1646 */
2459 #line 2461 "util/configparser.c" /* yacc.c:1646 */
2460 break;
2461
2462 case 193:
2463 #line 465 "util/configparser.y" /* yacc.c:1646 */
23872464 {
23882465 OUTYY(("P(server_tcp_upstream:%s)\n", (yyvsp[0].str)));
23892466 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
23912468 else cfg_parser->cfg->tcp_upstream = (strcmp((yyvsp[0].str), "yes")==0);
23922469 free((yyvsp[0].str));
23932470 }
2394 #line 2396 "util/configparser.c" /* yacc.c:1646 */
2395 break;
2396
2397 case 179:
2398 #line 447 "util/configparser.y" /* yacc.c:1646 */
2471 #line 2473 "util/configparser.c" /* yacc.c:1646 */
2472 break;
2473
2474 case 194:
2475 #line 474 "util/configparser.y" /* yacc.c:1646 */
23992476 {
24002477 OUTYY(("P(server_ssl_upstream:%s)\n", (yyvsp[0].str)));
24012478 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
24032480 else cfg_parser->cfg->ssl_upstream = (strcmp((yyvsp[0].str), "yes")==0);
24042481 free((yyvsp[0].str));
24052482 }
2406 #line 2408 "util/configparser.c" /* yacc.c:1646 */
2407 break;
2408
2409 case 180:
2410 #line 456 "util/configparser.y" /* yacc.c:1646 */
2483 #line 2485 "util/configparser.c" /* yacc.c:1646 */
2484 break;
2485
2486 case 195:
2487 #line 483 "util/configparser.y" /* yacc.c:1646 */
24112488 {
24122489 OUTYY(("P(server_ssl_service_key:%s)\n", (yyvsp[0].str)));
24132490 free(cfg_parser->cfg->ssl_service_key);
24142491 cfg_parser->cfg->ssl_service_key = (yyvsp[0].str);
24152492 }
2416 #line 2418 "util/configparser.c" /* yacc.c:1646 */
2417 break;
2418
2419 case 181:
2420 #line 463 "util/configparser.y" /* yacc.c:1646 */
2493 #line 2495 "util/configparser.c" /* yacc.c:1646 */
2494 break;
2495
2496 case 196:
2497 #line 490 "util/configparser.y" /* yacc.c:1646 */
24212498 {
24222499 OUTYY(("P(server_ssl_service_pem:%s)\n", (yyvsp[0].str)));
24232500 free(cfg_parser->cfg->ssl_service_pem);
24242501 cfg_parser->cfg->ssl_service_pem = (yyvsp[0].str);
24252502 }
2426 #line 2428 "util/configparser.c" /* yacc.c:1646 */
2427 break;
2428
2429 case 182:
2430 #line 470 "util/configparser.y" /* yacc.c:1646 */
2503 #line 2505 "util/configparser.c" /* yacc.c:1646 */
2504 break;
2505
2506 case 197:
2507 #line 497 "util/configparser.y" /* yacc.c:1646 */
24312508 {
24322509 OUTYY(("P(server_ssl_port:%s)\n", (yyvsp[0].str)));
24332510 if(atoi((yyvsp[0].str)) == 0)
24352512 else cfg_parser->cfg->ssl_port = atoi((yyvsp[0].str));
24362513 free((yyvsp[0].str));
24372514 }
2438 #line 2440 "util/configparser.c" /* yacc.c:1646 */
2439 break;
2440
2441 case 183:
2442 #line 479 "util/configparser.y" /* yacc.c:1646 */
2515 #line 2517 "util/configparser.c" /* yacc.c:1646 */
2516 break;
2517
2518 case 198:
2519 #line 506 "util/configparser.y" /* yacc.c:1646 */
24432520 {
24442521 OUTYY(("P(server_do_daemonize:%s)\n", (yyvsp[0].str)));
24452522 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
24472524 else cfg_parser->cfg->do_daemonize = (strcmp((yyvsp[0].str), "yes")==0);
24482525 free((yyvsp[0].str));
24492526 }
2450 #line 2452 "util/configparser.c" /* yacc.c:1646 */
2451 break;
2452
2453 case 184:
2454 #line 488 "util/configparser.y" /* yacc.c:1646 */
2527 #line 2529 "util/configparser.c" /* yacc.c:1646 */
2528 break;
2529
2530 case 199:
2531 #line 515 "util/configparser.y" /* yacc.c:1646 */
24552532 {
24562533 OUTYY(("P(server_use_syslog:%s)\n", (yyvsp[0].str)));
24572534 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
24642541 #endif
24652542 free((yyvsp[0].str));
24662543 }
2467 #line 2469 "util/configparser.c" /* yacc.c:1646 */
2468 break;
2469
2470 case 185:
2471 #line 502 "util/configparser.y" /* yacc.c:1646 */
2544 #line 2546 "util/configparser.c" /* yacc.c:1646 */
2545 break;
2546
2547 case 200:
2548 #line 529 "util/configparser.y" /* yacc.c:1646 */
24722549 {
24732550 OUTYY(("P(server_log_time_ascii:%s)\n", (yyvsp[0].str)));
24742551 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
24762553 else cfg_parser->cfg->log_time_ascii = (strcmp((yyvsp[0].str), "yes")==0);
24772554 free((yyvsp[0].str));
24782555 }
2479 #line 2481 "util/configparser.c" /* yacc.c:1646 */
2480 break;
2481
2482 case 186:
2483 #line 511 "util/configparser.y" /* yacc.c:1646 */
2556 #line 2558 "util/configparser.c" /* yacc.c:1646 */
2557 break;
2558
2559 case 201:
2560 #line 538 "util/configparser.y" /* yacc.c:1646 */
24842561 {
24852562 OUTYY(("P(server_log_queries:%s)\n", (yyvsp[0].str)));
24862563 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
24882565 else cfg_parser->cfg->log_queries = (strcmp((yyvsp[0].str), "yes")==0);
24892566 free((yyvsp[0].str));
24902567 }
2491 #line 2493 "util/configparser.c" /* yacc.c:1646 */
2492 break;
2493
2494 case 187:
2495 #line 520 "util/configparser.y" /* yacc.c:1646 */
2568 #line 2570 "util/configparser.c" /* yacc.c:1646 */
2569 break;
2570
2571 case 202:
2572 #line 547 "util/configparser.y" /* yacc.c:1646 */
24962573 {
24972574 OUTYY(("P(server_chroot:%s)\n", (yyvsp[0].str)));
24982575 free(cfg_parser->cfg->chrootdir);
24992576 cfg_parser->cfg->chrootdir = (yyvsp[0].str);
25002577 }
2501 #line 2503 "util/configparser.c" /* yacc.c:1646 */
2502 break;
2503
2504 case 188:
2505 #line 527 "util/configparser.y" /* yacc.c:1646 */
2578 #line 2580 "util/configparser.c" /* yacc.c:1646 */
2579 break;
2580
2581 case 203:
2582 #line 554 "util/configparser.y" /* yacc.c:1646 */
25062583 {
25072584 OUTYY(("P(server_username:%s)\n", (yyvsp[0].str)));
25082585 free(cfg_parser->cfg->username);
25092586 cfg_parser->cfg->username = (yyvsp[0].str);
25102587 }
2511 #line 2513 "util/configparser.c" /* yacc.c:1646 */
2512 break;
2513
2514 case 189:
2515 #line 534 "util/configparser.y" /* yacc.c:1646 */
2588 #line 2590 "util/configparser.c" /* yacc.c:1646 */
2589 break;
2590
2591 case 204:
2592 #line 561 "util/configparser.y" /* yacc.c:1646 */
25162593 {
25172594 OUTYY(("P(server_directory:%s)\n", (yyvsp[0].str)));
25182595 free(cfg_parser->cfg->directory);
25352612 d, strerror(errno));
25362613 }
25372614 }
2538 #line 2540 "util/configparser.c" /* yacc.c:1646 */
2539 break;
2540
2541 case 190:
2542 #line 558 "util/configparser.y" /* yacc.c:1646 */
2615 #line 2617 "util/configparser.c" /* yacc.c:1646 */
2616 break;
2617
2618 case 205:
2619 #line 585 "util/configparser.y" /* yacc.c:1646 */
25432620 {
25442621 OUTYY(("P(server_logfile:%s)\n", (yyvsp[0].str)));
25452622 free(cfg_parser->cfg->logfile);
25462623 cfg_parser->cfg->logfile = (yyvsp[0].str);
25472624 cfg_parser->cfg->use_syslog = 0;
25482625 }
2549 #line 2551 "util/configparser.c" /* yacc.c:1646 */
2550 break;
2551
2552 case 191:
2553 #line 566 "util/configparser.y" /* yacc.c:1646 */
2626 #line 2628 "util/configparser.c" /* yacc.c:1646 */
2627 break;
2628
2629 case 206:
2630 #line 593 "util/configparser.y" /* yacc.c:1646 */
25542631 {
25552632 OUTYY(("P(server_pidfile:%s)\n", (yyvsp[0].str)));
25562633 free(cfg_parser->cfg->pidfile);
25572634 cfg_parser->cfg->pidfile = (yyvsp[0].str);
25582635 }
2559 #line 2561 "util/configparser.c" /* yacc.c:1646 */
2560 break;
2561
2562 case 192:
2563 #line 573 "util/configparser.y" /* yacc.c:1646 */
2636 #line 2638 "util/configparser.c" /* yacc.c:1646 */
2637 break;
2638
2639 case 207:
2640 #line 600 "util/configparser.y" /* yacc.c:1646 */
25642641 {
25652642 OUTYY(("P(server_root_hints:%s)\n", (yyvsp[0].str)));
25662643 if(!cfg_strlist_insert(&cfg_parser->cfg->root_hints, (yyvsp[0].str)))
25672644 yyerror("out of memory");
25682645 }
2569 #line 2571 "util/configparser.c" /* yacc.c:1646 */
2570 break;
2571
2572 case 193:
2573 #line 580 "util/configparser.y" /* yacc.c:1646 */
2646 #line 2648 "util/configparser.c" /* yacc.c:1646 */
2647 break;
2648
2649 case 208:
2650 #line 607 "util/configparser.y" /* yacc.c:1646 */
25742651 {
25752652 OUTYY(("P(server_dlv_anchor_file:%s)\n", (yyvsp[0].str)));
25762653 free(cfg_parser->cfg->dlv_anchor_file);
25772654 cfg_parser->cfg->dlv_anchor_file = (yyvsp[0].str);
25782655 }
2579 #line 2581 "util/configparser.c" /* yacc.c:1646 */
2580 break;
2581
2582 case 194:
2583 #line 587 "util/configparser.y" /* yacc.c:1646 */
2656 #line 2658 "util/configparser.c" /* yacc.c:1646 */
2657 break;
2658
2659 case 209:
2660 #line 614 "util/configparser.y" /* yacc.c:1646 */
25842661 {
25852662 OUTYY(("P(server_dlv_anchor:%s)\n", (yyvsp[0].str)));
25862663 if(!cfg_strlist_insert(&cfg_parser->cfg->dlv_anchor_list, (yyvsp[0].str)))
25872664 yyerror("out of memory");
25882665 }
2589 #line 2591 "util/configparser.c" /* yacc.c:1646 */
2590 break;
2591
2592 case 195:
2593 #line 594 "util/configparser.y" /* yacc.c:1646 */
2666 #line 2668 "util/configparser.c" /* yacc.c:1646 */
2667 break;
2668
2669 case 210:
2670 #line 621 "util/configparser.y" /* yacc.c:1646 */
25942671 {
25952672 OUTYY(("P(server_auto_trust_anchor_file:%s)\n", (yyvsp[0].str)));
25962673 if(!cfg_strlist_insert(&cfg_parser->cfg->
25972674 auto_trust_anchor_file_list, (yyvsp[0].str)))
25982675 yyerror("out of memory");
25992676 }
2600 #line 2602 "util/configparser.c" /* yacc.c:1646 */
2601 break;
2602
2603 case 196:
2604 #line 602 "util/configparser.y" /* yacc.c:1646 */
2677 #line 2679 "util/configparser.c" /* yacc.c:1646 */
2678 break;
2679
2680 case 211:
2681 #line 629 "util/configparser.y" /* yacc.c:1646 */
26052682 {
26062683 OUTYY(("P(server_trust_anchor_file:%s)\n", (yyvsp[0].str)));
26072684 if(!cfg_strlist_insert(&cfg_parser->cfg->
26082685 trust_anchor_file_list, (yyvsp[0].str)))
26092686 yyerror("out of memory");
26102687 }
2611 #line 2613 "util/configparser.c" /* yacc.c:1646 */
2612 break;
2613
2614 case 197:
2615 #line 610 "util/configparser.y" /* yacc.c:1646 */
2688 #line 2690 "util/configparser.c" /* yacc.c:1646 */
2689 break;
2690
2691 case 212:
2692 #line 637 "util/configparser.y" /* yacc.c:1646 */
26162693 {
26172694 OUTYY(("P(server_trusted_keys_file:%s)\n", (yyvsp[0].str)));
26182695 if(!cfg_strlist_insert(&cfg_parser->cfg->
26192696 trusted_keys_file_list, (yyvsp[0].str)))
26202697 yyerror("out of memory");
26212698 }
2622 #line 2624 "util/configparser.c" /* yacc.c:1646 */
2623 break;
2624
2625 case 198:
2626 #line 618 "util/configparser.y" /* yacc.c:1646 */
2699 #line 2701 "util/configparser.c" /* yacc.c:1646 */
2700 break;
2701
2702 case 213:
2703 #line 645 "util/configparser.y" /* yacc.c:1646 */
26272704 {
26282705 OUTYY(("P(server_trust_anchor:%s)\n", (yyvsp[0].str)));
26292706 if(!cfg_strlist_insert(&cfg_parser->cfg->trust_anchor_list, (yyvsp[0].str)))
26302707 yyerror("out of memory");
26312708 }
2632 #line 2634 "util/configparser.c" /* yacc.c:1646 */
2633 break;
2634
2635 case 199:
2636 #line 625 "util/configparser.y" /* yacc.c:1646 */
2709 #line 2711 "util/configparser.c" /* yacc.c:1646 */
2710 break;
2711
2712 case 214:
2713 #line 652 "util/configparser.y" /* yacc.c:1646 */
26372714 {
26382715 OUTYY(("P(server_domain_insecure:%s)\n", (yyvsp[0].str)));
26392716 if(!cfg_strlist_insert(&cfg_parser->cfg->domain_insecure, (yyvsp[0].str)))
26402717 yyerror("out of memory");
26412718 }
2642 #line 2644 "util/configparser.c" /* yacc.c:1646 */
2643 break;
2644
2645 case 200:
2646 #line 632 "util/configparser.y" /* yacc.c:1646 */
2719 #line 2721 "util/configparser.c" /* yacc.c:1646 */
2720 break;
2721
2722 case 215:
2723 #line 659 "util/configparser.y" /* yacc.c:1646 */
26472724 {
26482725 OUTYY(("P(server_hide_identity:%s)\n", (yyvsp[0].str)));
26492726 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
26512728 else cfg_parser->cfg->hide_identity = (strcmp((yyvsp[0].str), "yes")==0);
26522729 free((yyvsp[0].str));
26532730 }
2654 #line 2656 "util/configparser.c" /* yacc.c:1646 */
2655 break;
2656
2657 case 201:
2658 #line 641 "util/configparser.y" /* yacc.c:1646 */
2731 #line 2733 "util/configparser.c" /* yacc.c:1646 */
2732 break;
2733
2734 case 216:
2735 #line 668 "util/configparser.y" /* yacc.c:1646 */
26592736 {
26602737 OUTYY(("P(server_hide_version:%s)\n", (yyvsp[0].str)));
26612738 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
26632740 else cfg_parser->cfg->hide_version = (strcmp((yyvsp[0].str), "yes")==0);
26642741 free((yyvsp[0].str));
26652742 }
2666 #line 2668 "util/configparser.c" /* yacc.c:1646 */
2667 break;
2668
2669 case 202:
2670 #line 650 "util/configparser.y" /* yacc.c:1646 */
2743 #line 2745 "util/configparser.c" /* yacc.c:1646 */
2744 break;
2745
2746 case 217:
2747 #line 677 "util/configparser.y" /* yacc.c:1646 */
26712748 {
26722749 OUTYY(("P(server_identity:%s)\n", (yyvsp[0].str)));
26732750 free(cfg_parser->cfg->identity);
26742751 cfg_parser->cfg->identity = (yyvsp[0].str);
26752752 }
2676 #line 2678 "util/configparser.c" /* yacc.c:1646 */
2677 break;
2678
2679 case 203:
2680 #line 657 "util/configparser.y" /* yacc.c:1646 */
2753 #line 2755 "util/configparser.c" /* yacc.c:1646 */
2754 break;
2755
2756 case 218:
2757 #line 684 "util/configparser.y" /* yacc.c:1646 */
26812758 {
26822759 OUTYY(("P(server_version:%s)\n", (yyvsp[0].str)));
26832760 free(cfg_parser->cfg->version);
26842761 cfg_parser->cfg->version = (yyvsp[0].str);
26852762 }
2686 #line 2688 "util/configparser.c" /* yacc.c:1646 */
2687 break;
2688
2689 case 204:
2690 #line 664 "util/configparser.y" /* yacc.c:1646 */
2763 #line 2765 "util/configparser.c" /* yacc.c:1646 */
2764 break;
2765
2766 case 219:
2767 #line 691 "util/configparser.y" /* yacc.c:1646 */
26912768 {
26922769 OUTYY(("P(server_so_rcvbuf:%s)\n", (yyvsp[0].str)));
26932770 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->so_rcvbuf))
26942771 yyerror("buffer size expected");
26952772 free((yyvsp[0].str));
26962773 }
2697 #line 2699 "util/configparser.c" /* yacc.c:1646 */
2698 break;
2699
2700 case 205:
2701 #line 672 "util/configparser.y" /* yacc.c:1646 */
2774 #line 2776 "util/configparser.c" /* yacc.c:1646 */
2775 break;
2776
2777 case 220:
2778 #line 699 "util/configparser.y" /* yacc.c:1646 */
27022779 {
27032780 OUTYY(("P(server_so_sndbuf:%s)\n", (yyvsp[0].str)));
27042781 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->so_sndbuf))
27052782 yyerror("buffer size expected");
27062783 free((yyvsp[0].str));
27072784 }
2708 #line 2710 "util/configparser.c" /* yacc.c:1646 */
2709 break;
2710
2711 case 206:
2712 #line 680 "util/configparser.y" /* yacc.c:1646 */
2785 #line 2787 "util/configparser.c" /* yacc.c:1646 */
2786 break;
2787
2788 case 221:
2789 #line 707 "util/configparser.y" /* yacc.c:1646 */
27132790 {
27142791 OUTYY(("P(server_so_reuseport:%s)\n", (yyvsp[0].str)));
27152792 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
27182795 (strcmp((yyvsp[0].str), "yes")==0);
27192796 free((yyvsp[0].str));
27202797 }
2721 #line 2723 "util/configparser.c" /* yacc.c:1646 */
2722 break;
2723
2724 case 207:
2725 #line 690 "util/configparser.y" /* yacc.c:1646 */
2798 #line 2800 "util/configparser.c" /* yacc.c:1646 */
2799 break;
2800
2801 case 222:
2802 #line 717 "util/configparser.y" /* yacc.c:1646 */
27262803 {
27272804 OUTYY(("P(server_ip_transparent:%s)\n", (yyvsp[0].str)));
27282805 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
27312808 (strcmp((yyvsp[0].str), "yes")==0);
27322809 free((yyvsp[0].str));
27332810 }
2734 #line 2736 "util/configparser.c" /* yacc.c:1646 */
2735 break;
2736
2737 case 208:
2738 #line 700 "util/configparser.y" /* yacc.c:1646 */
2811 #line 2813 "util/configparser.c" /* yacc.c:1646 */
2812 break;
2813
2814 case 223:
2815 #line 727 "util/configparser.y" /* yacc.c:1646 */
27392816 {
27402817 OUTYY(("P(server_ip_freebind:%s)\n", (yyvsp[0].str)));
27412818 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
27442821 (strcmp((yyvsp[0].str), "yes")==0);
27452822 free((yyvsp[0].str));
27462823 }
2747 #line 2749 "util/configparser.c" /* yacc.c:1646 */
2748 break;
2749
2750 case 209:
2751 #line 710 "util/configparser.y" /* yacc.c:1646 */
2824 #line 2826 "util/configparser.c" /* yacc.c:1646 */
2825 break;
2826
2827 case 224:
2828 #line 737 "util/configparser.y" /* yacc.c:1646 */
27522829 {
27532830 OUTYY(("P(server_edns_buffer_size:%s)\n", (yyvsp[0].str)));
27542831 if(atoi((yyvsp[0].str)) == 0)
27602837 else cfg_parser->cfg->edns_buffer_size = atoi((yyvsp[0].str));
27612838 free((yyvsp[0].str));
27622839 }
2763 #line 2765 "util/configparser.c" /* yacc.c:1646 */
2764 break;
2765
2766 case 210:
2767 #line 723 "util/configparser.y" /* yacc.c:1646 */
2840 #line 2842 "util/configparser.c" /* yacc.c:1646 */
2841 break;
2842
2843 case 225:
2844 #line 750 "util/configparser.y" /* yacc.c:1646 */
27682845 {
27692846 OUTYY(("P(server_msg_buffer_size:%s)\n", (yyvsp[0].str)));
27702847 if(atoi((yyvsp[0].str)) == 0)
27742851 else cfg_parser->cfg->msg_buffer_size = atoi((yyvsp[0].str));
27752852 free((yyvsp[0].str));
27762853 }
2777 #line 2779 "util/configparser.c" /* yacc.c:1646 */
2778 break;
2779
2780 case 211:
2781 #line 734 "util/configparser.y" /* yacc.c:1646 */
2854 #line 2856 "util/configparser.c" /* yacc.c:1646 */
2855 break;
2856
2857 case 226:
2858 #line 761 "util/configparser.y" /* yacc.c:1646 */
27822859 {
27832860 OUTYY(("P(server_msg_cache_size:%s)\n", (yyvsp[0].str)));
27842861 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->msg_cache_size))
27852862 yyerror("memory size expected");
27862863 free((yyvsp[0].str));
27872864 }
2788 #line 2790 "util/configparser.c" /* yacc.c:1646 */
2789 break;
2790
2791 case 212:
2792 #line 742 "util/configparser.y" /* yacc.c:1646 */
2865 #line 2867 "util/configparser.c" /* yacc.c:1646 */
2866 break;
2867
2868 case 227:
2869 #line 769 "util/configparser.y" /* yacc.c:1646 */
27932870 {
27942871 OUTYY(("P(server_msg_cache_slabs:%s)\n", (yyvsp[0].str)));
27952872 if(atoi((yyvsp[0].str)) == 0)
28012878 }
28022879 free((yyvsp[0].str));
28032880 }
2804 #line 2806 "util/configparser.c" /* yacc.c:1646 */
2805 break;
2806
2807 case 213:
2808 #line 755 "util/configparser.y" /* yacc.c:1646 */
2881 #line 2883 "util/configparser.c" /* yacc.c:1646 */
2882 break;
2883
2884 case 228:
2885 #line 782 "util/configparser.y" /* yacc.c:1646 */
28092886 {
28102887 OUTYY(("P(server_num_queries_per_thread:%s)\n", (yyvsp[0].str)));
28112888 if(atoi((yyvsp[0].str)) == 0)
28132890 else cfg_parser->cfg->num_queries_per_thread = atoi((yyvsp[0].str));
28142891 free((yyvsp[0].str));
28152892 }
2816 #line 2818 "util/configparser.c" /* yacc.c:1646 */
2817 break;
2818
2819 case 214:
2820 #line 764 "util/configparser.y" /* yacc.c:1646 */
2893 #line 2895 "util/configparser.c" /* yacc.c:1646 */
2894 break;
2895
2896 case 229:
2897 #line 791 "util/configparser.y" /* yacc.c:1646 */
28212898 {
28222899 OUTYY(("P(server_jostle_timeout:%s)\n", (yyvsp[0].str)));
28232900 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
28252902 else cfg_parser->cfg->jostle_time = atoi((yyvsp[0].str));
28262903 free((yyvsp[0].str));
28272904 }
2828 #line 2830 "util/configparser.c" /* yacc.c:1646 */
2829 break;
2830
2831 case 215:
2832 #line 773 "util/configparser.y" /* yacc.c:1646 */
2905 #line 2907 "util/configparser.c" /* yacc.c:1646 */
2906 break;
2907
2908 case 230:
2909 #line 800 "util/configparser.y" /* yacc.c:1646 */
28332910 {
28342911 OUTYY(("P(server_delay_close:%s)\n", (yyvsp[0].str)));
28352912 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
28372914 else cfg_parser->cfg->delay_close = atoi((yyvsp[0].str));
28382915 free((yyvsp[0].str));
28392916 }
2840 #line 2842 "util/configparser.c" /* yacc.c:1646 */
2841 break;
2842
2843 case 216:
2844 #line 782 "util/configparser.y" /* yacc.c:1646 */
2917 #line 2919 "util/configparser.c" /* yacc.c:1646 */
2918 break;
2919
2920 case 231:
2921 #line 809 "util/configparser.y" /* yacc.c:1646 */
28452922 {
28462923 OUTYY(("P(server_unblock_lan_zones:%s)\n", (yyvsp[0].str)));
28472924 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
28502927 (strcmp((yyvsp[0].str), "yes")==0);
28512928 free((yyvsp[0].str));
28522929 }
2853 #line 2855 "util/configparser.c" /* yacc.c:1646 */
2854 break;
2855
2856 case 217:
2857 #line 792 "util/configparser.y" /* yacc.c:1646 */
2930 #line 2932 "util/configparser.c" /* yacc.c:1646 */
2931 break;
2932
2933 case 232:
2934 #line 819 "util/configparser.y" /* yacc.c:1646 */
28582935 {
28592936 OUTYY(("P(server_insecure_lan_zones:%s)\n", (yyvsp[0].str)));
28602937 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
28632940 (strcmp((yyvsp[0].str), "yes")==0);
28642941 free((yyvsp[0].str));
28652942 }
2866 #line 2868 "util/configparser.c" /* yacc.c:1646 */
2867 break;
2868
2869 case 218:
2870 #line 802 "util/configparser.y" /* yacc.c:1646 */
2943 #line 2945 "util/configparser.c" /* yacc.c:1646 */
2944 break;
2945
2946 case 233:
2947 #line 829 "util/configparser.y" /* yacc.c:1646 */
28712948 {
28722949 OUTYY(("P(server_rrset_cache_size:%s)\n", (yyvsp[0].str)));
28732950 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->rrset_cache_size))
28742951 yyerror("memory size expected");
28752952 free((yyvsp[0].str));
28762953 }
2877 #line 2879 "util/configparser.c" /* yacc.c:1646 */
2878 break;
2879
2880 case 219:
2881 #line 810 "util/configparser.y" /* yacc.c:1646 */
2954 #line 2956 "util/configparser.c" /* yacc.c:1646 */
2955 break;
2956
2957 case 234:
2958 #line 837 "util/configparser.y" /* yacc.c:1646 */
28822959 {
28832960 OUTYY(("P(server_rrset_cache_slabs:%s)\n", (yyvsp[0].str)));
28842961 if(atoi((yyvsp[0].str)) == 0)
28902967 }
28912968 free((yyvsp[0].str));
28922969 }
2893 #line 2895 "util/configparser.c" /* yacc.c:1646 */
2894 break;
2895
2896 case 220:
2897 #line 823 "util/configparser.y" /* yacc.c:1646 */
2970 #line 2972 "util/configparser.c" /* yacc.c:1646 */
2971 break;
2972
2973 case 235:
2974 #line 850 "util/configparser.y" /* yacc.c:1646 */
28982975 {
28992976 OUTYY(("P(server_infra_host_ttl:%s)\n", (yyvsp[0].str)));
29002977 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
29022979 else cfg_parser->cfg->host_ttl = atoi((yyvsp[0].str));
29032980 free((yyvsp[0].str));
29042981 }
2905 #line 2907 "util/configparser.c" /* yacc.c:1646 */
2906 break;
2907
2908 case 221:
2909 #line 832 "util/configparser.y" /* yacc.c:1646 */
2982 #line 2984 "util/configparser.c" /* yacc.c:1646 */
2983 break;
2984
2985 case 236:
2986 #line 859 "util/configparser.y" /* yacc.c:1646 */
29102987 {
29112988 OUTYY(("P(server_infra_lame_ttl:%s)\n", (yyvsp[0].str)));
29122989 verbose(VERB_DETAIL, "ignored infra-lame-ttl: %s (option "
29132990 "removed, use infra-host-ttl)", (yyvsp[0].str));
29142991 free((yyvsp[0].str));
29152992 }
2916 #line 2918 "util/configparser.c" /* yacc.c:1646 */
2917 break;
2918
2919 case 222:
2920 #line 840 "util/configparser.y" /* yacc.c:1646 */
2993 #line 2995 "util/configparser.c" /* yacc.c:1646 */
2994 break;
2995
2996 case 237:
2997 #line 867 "util/configparser.y" /* yacc.c:1646 */
29212998 {
29222999 OUTYY(("P(server_infra_cache_numhosts:%s)\n", (yyvsp[0].str)));
29233000 if(atoi((yyvsp[0].str)) == 0)
29253002 else cfg_parser->cfg->infra_cache_numhosts = atoi((yyvsp[0].str));
29263003 free((yyvsp[0].str));
29273004 }
2928 #line 2930 "util/configparser.c" /* yacc.c:1646 */
2929 break;
2930
2931 case 223:
2932 #line 849 "util/configparser.y" /* yacc.c:1646 */
3005 #line 3007 "util/configparser.c" /* yacc.c:1646 */
3006 break;
3007
3008 case 238:
3009 #line 876 "util/configparser.y" /* yacc.c:1646 */
29333010 {
29343011 OUTYY(("P(server_infra_cache_lame_size:%s)\n", (yyvsp[0].str)));
29353012 verbose(VERB_DETAIL, "ignored infra-cache-lame-size: %s "
29363013 "(option removed, use infra-cache-numhosts)", (yyvsp[0].str));
29373014 free((yyvsp[0].str));
29383015 }
2939 #line 2941 "util/configparser.c" /* yacc.c:1646 */
2940 break;
2941
2942 case 224:
2943 #line 857 "util/configparser.y" /* yacc.c:1646 */
3016 #line 3018 "util/configparser.c" /* yacc.c:1646 */
3017 break;
3018
3019 case 239:
3020 #line 884 "util/configparser.y" /* yacc.c:1646 */
29443021 {
29453022 OUTYY(("P(server_infra_cache_slabs:%s)\n", (yyvsp[0].str)));
29463023 if(atoi((yyvsp[0].str)) == 0)
29523029 }
29533030 free((yyvsp[0].str));
29543031 }
2955 #line 2957 "util/configparser.c" /* yacc.c:1646 */
2956 break;
2957
2958 case 225:
2959 #line 870 "util/configparser.y" /* yacc.c:1646 */
3032 #line 3034 "util/configparser.c" /* yacc.c:1646 */
3033 break;
3034
3035 case 240:
3036 #line 897 "util/configparser.y" /* yacc.c:1646 */
29603037 {
29613038 OUTYY(("P(server_infra_cache_min_rtt:%s)\n", (yyvsp[0].str)));
29623039 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
29643041 else cfg_parser->cfg->infra_cache_min_rtt = atoi((yyvsp[0].str));
29653042 free((yyvsp[0].str));
29663043 }
2967 #line 2969 "util/configparser.c" /* yacc.c:1646 */
2968 break;
2969
2970 case 226:
2971 #line 879 "util/configparser.y" /* yacc.c:1646 */
3044 #line 3046 "util/configparser.c" /* yacc.c:1646 */
3045 break;
3046
3047 case 241:
3048 #line 906 "util/configparser.y" /* yacc.c:1646 */
29723049 {
29733050 OUTYY(("P(server_target_fetch_policy:%s)\n", (yyvsp[0].str)));
29743051 free(cfg_parser->cfg->target_fetch_policy);
29753052 cfg_parser->cfg->target_fetch_policy = (yyvsp[0].str);
29763053 }
2977 #line 2979 "util/configparser.c" /* yacc.c:1646 */
2978 break;
2979
2980 case 227:
2981 #line 886 "util/configparser.y" /* yacc.c:1646 */
3054 #line 3056 "util/configparser.c" /* yacc.c:1646 */
3055 break;
3056
3057 case 242:
3058 #line 913 "util/configparser.y" /* yacc.c:1646 */
29823059 {
29833060 OUTYY(("P(server_harden_short_bufsize:%s)\n", (yyvsp[0].str)));
29843061 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
29873064 (strcmp((yyvsp[0].str), "yes")==0);
29883065 free((yyvsp[0].str));
29893066 }
2990 #line 2992 "util/configparser.c" /* yacc.c:1646 */
2991 break;
2992
2993 case 228:
2994 #line 896 "util/configparser.y" /* yacc.c:1646 */
3067 #line 3069 "util/configparser.c" /* yacc.c:1646 */
3068 break;
3069
3070 case 243:
3071 #line 923 "util/configparser.y" /* yacc.c:1646 */
29953072 {
29963073 OUTYY(("P(server_harden_large_queries:%s)\n", (yyvsp[0].str)));
29973074 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
30003077 (strcmp((yyvsp[0].str), "yes")==0);
30013078 free((yyvsp[0].str));
30023079 }
3003 #line 3005 "util/configparser.c" /* yacc.c:1646 */
3004 break;
3005
3006 case 229:
3007 #line 906 "util/configparser.y" /* yacc.c:1646 */
3080 #line 3082 "util/configparser.c" /* yacc.c:1646 */
3081 break;
3082
3083 case 244:
3084 #line 933 "util/configparser.y" /* yacc.c:1646 */
30083085 {
30093086 OUTYY(("P(server_harden_glue:%s)\n", (yyvsp[0].str)));
30103087 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
30133090 (strcmp((yyvsp[0].str), "yes")==0);
30143091 free((yyvsp[0].str));
30153092 }
3016 #line 3018 "util/configparser.c" /* yacc.c:1646 */
3017 break;
3018
3019 case 230:
3020 #line 916 "util/configparser.y" /* yacc.c:1646 */
3093 #line 3095 "util/configparser.c" /* yacc.c:1646 */
3094 break;
3095
3096 case 245:
3097 #line 943 "util/configparser.y" /* yacc.c:1646 */
30213098 {
30223099 OUTYY(("P(server_harden_dnssec_stripped:%s)\n", (yyvsp[0].str)));
30233100 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
30263103 (strcmp((yyvsp[0].str), "yes")==0);
30273104 free((yyvsp[0].str));
30283105 }
3029 #line 3031 "util/configparser.c" /* yacc.c:1646 */
3030 break;
3031
3032 case 231:
3033 #line 926 "util/configparser.y" /* yacc.c:1646 */
3106 #line 3108 "util/configparser.c" /* yacc.c:1646 */
3107 break;
3108
3109 case 246:
3110 #line 953 "util/configparser.y" /* yacc.c:1646 */
30343111 {
30353112 OUTYY(("P(server_harden_below_nxdomain:%s)\n", (yyvsp[0].str)));
30363113 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
30393116 (strcmp((yyvsp[0].str), "yes")==0);
30403117 free((yyvsp[0].str));
30413118 }
3042 #line 3044 "util/configparser.c" /* yacc.c:1646 */
3043 break;
3044
3045 case 232:
3046 #line 936 "util/configparser.y" /* yacc.c:1646 */
3119 #line 3121 "util/configparser.c" /* yacc.c:1646 */
3120 break;
3121
3122 case 247:
3123 #line 963 "util/configparser.y" /* yacc.c:1646 */
30473124 {
30483125 OUTYY(("P(server_harden_referral_path:%s)\n", (yyvsp[0].str)));
30493126 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
30523129 (strcmp((yyvsp[0].str), "yes")==0);
30533130 free((yyvsp[0].str));
30543131 }
3055 #line 3057 "util/configparser.c" /* yacc.c:1646 */
3056 break;
3057
3058 case 233:
3059 #line 946 "util/configparser.y" /* yacc.c:1646 */
3132 #line 3134 "util/configparser.c" /* yacc.c:1646 */
3133 break;
3134
3135 case 248:
3136 #line 973 "util/configparser.y" /* yacc.c:1646 */
30603137 {
30613138 OUTYY(("P(server_harden_algo_downgrade:%s)\n", (yyvsp[0].str)));
30623139 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
30653142 (strcmp((yyvsp[0].str), "yes")==0);
30663143 free((yyvsp[0].str));
30673144 }
3068 #line 3070 "util/configparser.c" /* yacc.c:1646 */
3069 break;
3070
3071 case 234:
3072 #line 956 "util/configparser.y" /* yacc.c:1646 */
3145 #line 3147 "util/configparser.c" /* yacc.c:1646 */
3146 break;
3147
3148 case 249:
3149 #line 983 "util/configparser.y" /* yacc.c:1646 */
30733150 {
30743151 OUTYY(("P(server_use_caps_for_id:%s)\n", (yyvsp[0].str)));
30753152 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
30783155 (strcmp((yyvsp[0].str), "yes")==0);
30793156 free((yyvsp[0].str));
30803157 }
3081 #line 3083 "util/configparser.c" /* yacc.c:1646 */
3082 break;
3083
3084 case 235:
3085 #line 966 "util/configparser.y" /* yacc.c:1646 */
3158 #line 3160 "util/configparser.c" /* yacc.c:1646 */
3159 break;
3160
3161 case 250:
3162 #line 993 "util/configparser.y" /* yacc.c:1646 */
30863163 {
30873164 OUTYY(("P(server_caps_whitelist:%s)\n", (yyvsp[0].str)));
30883165 if(!cfg_strlist_insert(&cfg_parser->cfg->caps_whitelist, (yyvsp[0].str)))
30893166 yyerror("out of memory");
30903167 }
3091 #line 3093 "util/configparser.c" /* yacc.c:1646 */
3092 break;
3093
3094 case 236:
3095 #line 973 "util/configparser.y" /* yacc.c:1646 */
3168 #line 3170 "util/configparser.c" /* yacc.c:1646 */
3169 break;
3170
3171 case 251:
3172 #line 1000 "util/configparser.y" /* yacc.c:1646 */
30963173 {
30973174 OUTYY(("P(server_private_address:%s)\n", (yyvsp[0].str)));
30983175 if(!cfg_strlist_insert(&cfg_parser->cfg->private_address, (yyvsp[0].str)))
30993176 yyerror("out of memory");
31003177 }
3101 #line 3103 "util/configparser.c" /* yacc.c:1646 */
3102 break;
3103
3104 case 237:
3105 #line 980 "util/configparser.y" /* yacc.c:1646 */
3178 #line 3180 "util/configparser.c" /* yacc.c:1646 */
3179 break;
3180
3181 case 252:
3182 #line 1007 "util/configparser.y" /* yacc.c:1646 */
31063183 {
31073184 OUTYY(("P(server_private_domain:%s)\n", (yyvsp[0].str)));
31083185 if(!cfg_strlist_insert(&cfg_parser->cfg->private_domain, (yyvsp[0].str)))
31093186 yyerror("out of memory");
31103187 }
3111 #line 3113 "util/configparser.c" /* yacc.c:1646 */
3112 break;
3113
3114 case 238:
3115 #line 987 "util/configparser.y" /* yacc.c:1646 */
3188 #line 3190 "util/configparser.c" /* yacc.c:1646 */
3189 break;
3190
3191 case 253:
3192 #line 1014 "util/configparser.y" /* yacc.c:1646 */
31163193 {
31173194 OUTYY(("P(server_prefetch:%s)\n", (yyvsp[0].str)));
31183195 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
31203197 else cfg_parser->cfg->prefetch = (strcmp((yyvsp[0].str), "yes")==0);
31213198 free((yyvsp[0].str));
31223199 }
3123 #line 3125 "util/configparser.c" /* yacc.c:1646 */
3124 break;
3125
3126 case 239:
3127 #line 996 "util/configparser.y" /* yacc.c:1646 */
3200 #line 3202 "util/configparser.c" /* yacc.c:1646 */
3201 break;
3202
3203 case 254:
3204 #line 1023 "util/configparser.y" /* yacc.c:1646 */
31283205 {
31293206 OUTYY(("P(server_prefetch_key:%s)\n", (yyvsp[0].str)));
31303207 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
31323209 else cfg_parser->cfg->prefetch_key = (strcmp((yyvsp[0].str), "yes")==0);
31333210 free((yyvsp[0].str));
31343211 }
3135 #line 3137 "util/configparser.c" /* yacc.c:1646 */
3136 break;
3137
3138 case 240:
3139 #line 1005 "util/configparser.y" /* yacc.c:1646 */
3212 #line 3214 "util/configparser.c" /* yacc.c:1646 */
3213 break;
3214
3215 case 255:
3216 #line 1032 "util/configparser.y" /* yacc.c:1646 */
31403217 {
31413218 OUTYY(("P(server_unwanted_reply_threshold:%s)\n", (yyvsp[0].str)));
31423219 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
31443221 else cfg_parser->cfg->unwanted_threshold = atoi((yyvsp[0].str));
31453222 free((yyvsp[0].str));
31463223 }
3147 #line 3149 "util/configparser.c" /* yacc.c:1646 */
3148 break;
3149
3150 case 241:
3151 #line 1014 "util/configparser.y" /* yacc.c:1646 */
3224 #line 3226 "util/configparser.c" /* yacc.c:1646 */
3225 break;
3226
3227 case 256:
3228 #line 1041 "util/configparser.y" /* yacc.c:1646 */
31523229 {
31533230 OUTYY(("P(server_do_not_query_address:%s)\n", (yyvsp[0].str)));
31543231 if(!cfg_strlist_insert(&cfg_parser->cfg->donotqueryaddrs, (yyvsp[0].str)))
31553232 yyerror("out of memory");
31563233 }
3157 #line 3159 "util/configparser.c" /* yacc.c:1646 */
3158 break;
3159
3160 case 242:
3161 #line 1021 "util/configparser.y" /* yacc.c:1646 */
3234 #line 3236 "util/configparser.c" /* yacc.c:1646 */
3235 break;
3236
3237 case 257:
3238 #line 1048 "util/configparser.y" /* yacc.c:1646 */
31623239 {
31633240 OUTYY(("P(server_do_not_query_localhost:%s)\n", (yyvsp[0].str)));
31643241 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
31673244 (strcmp((yyvsp[0].str), "yes")==0);
31683245 free((yyvsp[0].str));
31693246 }
3170 #line 3172 "util/configparser.c" /* yacc.c:1646 */
3171 break;
3172
3173 case 243:
3174 #line 1031 "util/configparser.y" /* yacc.c:1646 */
3247 #line 3249 "util/configparser.c" /* yacc.c:1646 */
3248 break;
3249
3250 case 258:
3251 #line 1058 "util/configparser.y" /* yacc.c:1646 */
31753252 {
31763253 OUTYY(("P(server_access_control:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
31773254 if(strcmp((yyvsp[0].str), "deny")!=0 && strcmp((yyvsp[0].str), "refuse")!=0 &&
31873264 fatal_exit("out of memory adding acl");
31883265 }
31893266 }
3190 #line 3192 "util/configparser.c" /* yacc.c:1646 */
3191 break;
3192
3193 case 244:
3194 #line 1048 "util/configparser.y" /* yacc.c:1646 */
3267 #line 3269 "util/configparser.c" /* yacc.c:1646 */
3268 break;
3269
3270 case 259:
3271 #line 1075 "util/configparser.y" /* yacc.c:1646 */
31953272 {
31963273 OUTYY(("P(server_module_conf:%s)\n", (yyvsp[0].str)));
31973274 free(cfg_parser->cfg->module_conf);
31983275 cfg_parser->cfg->module_conf = (yyvsp[0].str);
31993276 }
3200 #line 3202 "util/configparser.c" /* yacc.c:1646 */
3201 break;
3202
3203 case 245:
3204 #line 1055 "util/configparser.y" /* yacc.c:1646 */
3277 #line 3279 "util/configparser.c" /* yacc.c:1646 */
3278 break;
3279
3280 case 260:
3281 #line 1082 "util/configparser.y" /* yacc.c:1646 */
32053282 {
32063283 OUTYY(("P(server_val_override_date:%s)\n", (yyvsp[0].str)));
32073284 if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) {
32183295 }
32193296 free((yyvsp[0].str));
32203297 }
3221 #line 3223 "util/configparser.c" /* yacc.c:1646 */
3222 break;
3223
3224 case 246:
3225 #line 1073 "util/configparser.y" /* yacc.c:1646 */
3298 #line 3300 "util/configparser.c" /* yacc.c:1646 */
3299 break;
3300
3301 case 261:
3302 #line 1100 "util/configparser.y" /* yacc.c:1646 */
32263303 {
32273304 OUTYY(("P(server_val_sig_skew_min:%s)\n", (yyvsp[0].str)));
32283305 if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) {
32343311 }
32353312 free((yyvsp[0].str));
32363313 }
3237 #line 3239 "util/configparser.c" /* yacc.c:1646 */
3238 break;
3239
3240 case 247:
3241 #line 1086 "util/configparser.y" /* yacc.c:1646 */
3314 #line 3316 "util/configparser.c" /* yacc.c:1646 */
3315 break;
3316
3317 case 262:
3318 #line 1113 "util/configparser.y" /* yacc.c:1646 */
32423319 {
32433320 OUTYY(("P(server_val_sig_skew_max:%s)\n", (yyvsp[0].str)));
32443321 if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) {
32503327 }
32513328 free((yyvsp[0].str));
32523329 }
3253 #line 3255 "util/configparser.c" /* yacc.c:1646 */
3254 break;
3255
3256 case 248:
3257 #line 1099 "util/configparser.y" /* yacc.c:1646 */
3330 #line 3332 "util/configparser.c" /* yacc.c:1646 */
3331 break;
3332
3333 case 263:
3334 #line 1126 "util/configparser.y" /* yacc.c:1646 */
32583335 {
32593336 OUTYY(("P(server_cache_max_ttl:%s)\n", (yyvsp[0].str)));
32603337 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
32623339 else cfg_parser->cfg->max_ttl = atoi((yyvsp[0].str));
32633340 free((yyvsp[0].str));
32643341 }
3265 #line 3267 "util/configparser.c" /* yacc.c:1646 */
3266 break;
3267
3268 case 249:
3269 #line 1108 "util/configparser.y" /* yacc.c:1646 */
3342 #line 3344 "util/configparser.c" /* yacc.c:1646 */
3343 break;
3344
3345 case 264:
3346 #line 1135 "util/configparser.y" /* yacc.c:1646 */
32703347 {
32713348 OUTYY(("P(server_cache_max_negative_ttl:%s)\n", (yyvsp[0].str)));
32723349 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
32743351 else cfg_parser->cfg->max_negative_ttl = atoi((yyvsp[0].str));
32753352 free((yyvsp[0].str));
32763353 }
3277 #line 3279 "util/configparser.c" /* yacc.c:1646 */
3278 break;
3279
3280 case 250:
3281 #line 1117 "util/configparser.y" /* yacc.c:1646 */
3354 #line 3356 "util/configparser.c" /* yacc.c:1646 */
3355 break;
3356
3357 case 265:
3358 #line 1144 "util/configparser.y" /* yacc.c:1646 */
32823359 {
32833360 OUTYY(("P(server_cache_min_ttl:%s)\n", (yyvsp[0].str)));
32843361 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
32863363 else cfg_parser->cfg->min_ttl = atoi((yyvsp[0].str));
32873364 free((yyvsp[0].str));
32883365 }
3289 #line 3291 "util/configparser.c" /* yacc.c:1646 */
3290 break;
3291
3292 case 251:
3293 #line 1126 "util/configparser.y" /* yacc.c:1646 */
3366 #line 3368 "util/configparser.c" /* yacc.c:1646 */
3367 break;
3368
3369 case 266:
3370 #line 1153 "util/configparser.y" /* yacc.c:1646 */
32943371 {
32953372 OUTYY(("P(server_bogus_ttl:%s)\n", (yyvsp[0].str)));
32963373 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
32983375 else cfg_parser->cfg->bogus_ttl = atoi((yyvsp[0].str));
32993376 free((yyvsp[0].str));
33003377 }
3301 #line 3303 "util/configparser.c" /* yacc.c:1646 */
3302 break;
3303
3304 case 252:
3305 #line 1135 "util/configparser.y" /* yacc.c:1646 */
3378 #line 3380 "util/configparser.c" /* yacc.c:1646 */
3379 break;
3380
3381 case 267:
3382 #line 1162 "util/configparser.y" /* yacc.c:1646 */
33063383 {
33073384 OUTYY(("P(server_val_clean_additional:%s)\n", (yyvsp[0].str)));
33083385 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
33113388 (strcmp((yyvsp[0].str), "yes")==0);
33123389 free((yyvsp[0].str));
33133390 }
3314 #line 3316 "util/configparser.c" /* yacc.c:1646 */
3315 break;
3316
3317 case 253:
3318 #line 1145 "util/configparser.y" /* yacc.c:1646 */
3391 #line 3393 "util/configparser.c" /* yacc.c:1646 */
3392 break;
3393
3394 case 268:
3395 #line 1172 "util/configparser.y" /* yacc.c:1646 */
33193396 {
33203397 OUTYY(("P(server_val_permissive_mode:%s)\n", (yyvsp[0].str)));
33213398 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
33243401 (strcmp((yyvsp[0].str), "yes")==0);
33253402 free((yyvsp[0].str));
33263403 }
3327 #line 3329 "util/configparser.c" /* yacc.c:1646 */
3328 break;
3329
3330 case 254:
3331 #line 1155 "util/configparser.y" /* yacc.c:1646 */
3404 #line 3406 "util/configparser.c" /* yacc.c:1646 */
3405 break;
3406
3407 case 269:
3408 #line 1182 "util/configparser.y" /* yacc.c:1646 */
33323409 {
33333410 OUTYY(("P(server_ignore_cd_flag:%s)\n", (yyvsp[0].str)));
33343411 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
33363413 else cfg_parser->cfg->ignore_cd = (strcmp((yyvsp[0].str), "yes")==0);
33373414 free((yyvsp[0].str));
33383415 }
3339 #line 3341 "util/configparser.c" /* yacc.c:1646 */
3340 break;
3341
3342 case 255:
3343 #line 1164 "util/configparser.y" /* yacc.c:1646 */
3416 #line 3418 "util/configparser.c" /* yacc.c:1646 */
3417 break;
3418
3419 case 270:
3420 #line 1191 "util/configparser.y" /* yacc.c:1646 */
3421 {
3422 OUTYY(("P(server_serve_expired:%s)\n", (yyvsp[0].str)));
3423 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
3424 yyerror("expected yes or no.");
3425 else cfg_parser->cfg->serve_expired = (strcmp((yyvsp[0].str), "yes")==0);
3426 free((yyvsp[0].str));
3427 }
3428 #line 3430 "util/configparser.c" /* yacc.c:1646 */
3429 break;
3430
3431 case 271:
3432 #line 1200 "util/configparser.y" /* yacc.c:1646 */
3433 {
3434 OUTYY(("P(server_fake_dsa:%s)\n", (yyvsp[0].str)));
3435 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
3436 yyerror("expected yes or no.");
3437 else fake_dsa = (strcmp((yyvsp[0].str), "yes")==0);
3438 if(fake_dsa)
3439 log_warn("test option fake_dsa is enabled");
3440 free((yyvsp[0].str));
3441 }
3442 #line 3444 "util/configparser.c" /* yacc.c:1646 */
3443 break;
3444
3445 case 272:
3446 #line 1211 "util/configparser.y" /* yacc.c:1646 */
33443447 {
33453448 OUTYY(("P(server_val_log_level:%s)\n", (yyvsp[0].str)));
33463449 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
33483451 else cfg_parser->cfg->val_log_level = atoi((yyvsp[0].str));
33493452 free((yyvsp[0].str));
33503453 }
3351 #line 3353 "util/configparser.c" /* yacc.c:1646 */
3352 break;
3353
3354 case 256:
3355 #line 1173 "util/configparser.y" /* yacc.c:1646 */
3454 #line 3456 "util/configparser.c" /* yacc.c:1646 */
3455 break;
3456
3457 case 273:
3458 #line 1220 "util/configparser.y" /* yacc.c:1646 */
33563459 {
33573460 OUTYY(("P(server_val_nsec3_keysize_iterations:%s)\n", (yyvsp[0].str)));
33583461 free(cfg_parser->cfg->val_nsec3_key_iterations);
33593462 cfg_parser->cfg->val_nsec3_key_iterations = (yyvsp[0].str);
33603463 }
3361 #line 3363 "util/configparser.c" /* yacc.c:1646 */
3362 break;
3363
3364 case 257:
3365 #line 1180 "util/configparser.y" /* yacc.c:1646 */
3464 #line 3466 "util/configparser.c" /* yacc.c:1646 */
3465 break;
3466
3467 case 274:
3468 #line 1227 "util/configparser.y" /* yacc.c:1646 */
33663469 {
33673470 OUTYY(("P(server_add_holddown:%s)\n", (yyvsp[0].str)));
33683471 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
33703473 else cfg_parser->cfg->add_holddown = atoi((yyvsp[0].str));
33713474 free((yyvsp[0].str));
33723475 }
3373 #line 3375 "util/configparser.c" /* yacc.c:1646 */
3374 break;
3375
3376 case 258:
3377 #line 1189 "util/configparser.y" /* yacc.c:1646 */
3476 #line 3478 "util/configparser.c" /* yacc.c:1646 */
3477 break;
3478
3479 case 275:
3480 #line 1236 "util/configparser.y" /* yacc.c:1646 */
33783481 {
33793482 OUTYY(("P(server_del_holddown:%s)\n", (yyvsp[0].str)));
33803483 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
33823485 else cfg_parser->cfg->del_holddown = atoi((yyvsp[0].str));
33833486 free((yyvsp[0].str));
33843487 }
3385 #line 3387 "util/configparser.c" /* yacc.c:1646 */
3386 break;
3387
3388 case 259:
3389 #line 1198 "util/configparser.y" /* yacc.c:1646 */
3488 #line 3490 "util/configparser.c" /* yacc.c:1646 */
3489 break;
3490
3491 case 276:
3492 #line 1245 "util/configparser.y" /* yacc.c:1646 */
33903493 {
33913494 OUTYY(("P(server_keep_missing:%s)\n", (yyvsp[0].str)));
33923495 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
33943497 else cfg_parser->cfg->keep_missing = atoi((yyvsp[0].str));
33953498 free((yyvsp[0].str));
33963499 }
3397 #line 3399 "util/configparser.c" /* yacc.c:1646 */
3398 break;
3399
3400 case 260:
3401 #line 1207 "util/configparser.y" /* yacc.c:1646 */
3500 #line 3502 "util/configparser.c" /* yacc.c:1646 */
3501 break;
3502
3503 case 277:
3504 #line 1254 "util/configparser.y" /* yacc.c:1646 */
34023505 {
34033506 OUTYY(("P(server_permit_small_holddown:%s)\n", (yyvsp[0].str)));
34043507 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
34073510 (strcmp((yyvsp[0].str), "yes")==0);
34083511 free((yyvsp[0].str));
34093512 }
3410 #line 3412 "util/configparser.c" /* yacc.c:1646 */
3411 break;
3412
3413 case 261:
3414 #line 1216 "util/configparser.y" /* yacc.c:1646 */
3513 #line 3515 "util/configparser.c" /* yacc.c:1646 */
3514 break;
3515
3516 case 278:
3517 #line 1263 "util/configparser.y" /* yacc.c:1646 */
34153518 {
34163519 OUTYY(("P(server_key_cache_size:%s)\n", (yyvsp[0].str)));
34173520 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->key_cache_size))
34183521 yyerror("memory size expected");
34193522 free((yyvsp[0].str));
34203523 }
3421 #line 3423 "util/configparser.c" /* yacc.c:1646 */
3422 break;
3423
3424 case 262:
3425 #line 1224 "util/configparser.y" /* yacc.c:1646 */
3524 #line 3526 "util/configparser.c" /* yacc.c:1646 */
3525 break;
3526
3527 case 279:
3528 #line 1271 "util/configparser.y" /* yacc.c:1646 */
34263529 {
34273530 OUTYY(("P(server_key_cache_slabs:%s)\n", (yyvsp[0].str)));
34283531 if(atoi((yyvsp[0].str)) == 0)
34343537 }
34353538 free((yyvsp[0].str));
34363539 }
3437 #line 3439 "util/configparser.c" /* yacc.c:1646 */
3438 break;
3439
3440 case 263:
3441 #line 1237 "util/configparser.y" /* yacc.c:1646 */
3540 #line 3542 "util/configparser.c" /* yacc.c:1646 */
3541 break;
3542
3543 case 280:
3544 #line 1284 "util/configparser.y" /* yacc.c:1646 */
34423545 {
34433546 OUTYY(("P(server_neg_cache_size:%s)\n", (yyvsp[0].str)));
34443547 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->neg_cache_size))
34453548 yyerror("memory size expected");
34463549 free((yyvsp[0].str));
34473550 }
3448 #line 3450 "util/configparser.c" /* yacc.c:1646 */
3449 break;
3450
3451 case 264:
3452 #line 1245 "util/configparser.y" /* yacc.c:1646 */
3551 #line 3553 "util/configparser.c" /* yacc.c:1646 */
3552 break;
3553
3554 case 281:
3555 #line 1292 "util/configparser.y" /* yacc.c:1646 */
34533556 {
34543557 OUTYY(("P(server_local_zone:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
34553558 if(strcmp((yyvsp[0].str), "static")!=0 && strcmp((yyvsp[0].str), "deny")!=0 &&
34763579 fatal_exit("out of memory adding local-zone");
34773580 }
34783581 }
3479 #line 3481 "util/configparser.c" /* yacc.c:1646 */
3480 break;
3481
3482 case 265:
3483 #line 1273 "util/configparser.y" /* yacc.c:1646 */
3582 #line 3584 "util/configparser.c" /* yacc.c:1646 */
3583 break;
3584
3585 case 282:
3586 #line 1320 "util/configparser.y" /* yacc.c:1646 */
34843587 {
34853588 OUTYY(("P(server_local_data:%s)\n", (yyvsp[0].str)));
34863589 if(!cfg_strlist_insert(&cfg_parser->cfg->local_data, (yyvsp[0].str)))
34873590 fatal_exit("out of memory adding local-data");
34883591 }
3489 #line 3491 "util/configparser.c" /* yacc.c:1646 */
3490 break;
3491
3492 case 266:
3493 #line 1280 "util/configparser.y" /* yacc.c:1646 */
3592 #line 3594 "util/configparser.c" /* yacc.c:1646 */
3593 break;
3594
3595 case 283:
3596 #line 1327 "util/configparser.y" /* yacc.c:1646 */
34943597 {
34953598 char* ptr;
34963599 OUTYY(("P(server_local_data_ptr:%s)\n", (yyvsp[0].str)));
35043607 yyerror("local-data-ptr could not be reversed");
35053608 }
35063609 }
3507 #line 3509 "util/configparser.c" /* yacc.c:1646 */
3508 break;
3509
3510 case 267:
3511 #line 1295 "util/configparser.y" /* yacc.c:1646 */
3610 #line 3612 "util/configparser.c" /* yacc.c:1646 */
3611 break;
3612
3613 case 284:
3614 #line 1342 "util/configparser.y" /* yacc.c:1646 */
35123615 {
35133616 OUTYY(("P(server_minimal_responses:%s)\n", (yyvsp[0].str)));
35143617 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
35173620 (strcmp((yyvsp[0].str), "yes")==0);
35183621 free((yyvsp[0].str));
35193622 }
3520 #line 3522 "util/configparser.c" /* yacc.c:1646 */
3521 break;
3522
3523 case 268:
3524 #line 1305 "util/configparser.y" /* yacc.c:1646 */
3623 #line 3625 "util/configparser.c" /* yacc.c:1646 */
3624 break;
3625
3626 case 285:
3627 #line 1352 "util/configparser.y" /* yacc.c:1646 */
35253628 {
35263629 OUTYY(("P(server_rrset_roundrobin:%s)\n", (yyvsp[0].str)));
35273630 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
35303633 (strcmp((yyvsp[0].str), "yes")==0);
35313634 free((yyvsp[0].str));
35323635 }
3533 #line 3535 "util/configparser.c" /* yacc.c:1646 */
3534 break;
3535
3536 case 269:
3537 #line 1315 "util/configparser.y" /* yacc.c:1646 */
3636 #line 3638 "util/configparser.c" /* yacc.c:1646 */
3637 break;
3638
3639 case 286:
3640 #line 1362 "util/configparser.y" /* yacc.c:1646 */
35383641 {
35393642 OUTYY(("P(server_max_udp_size:%s)\n", (yyvsp[0].str)));
35403643 cfg_parser->cfg->max_udp_size = atoi((yyvsp[0].str));
35413644 free((yyvsp[0].str));
35423645 }
3543 #line 3545 "util/configparser.c" /* yacc.c:1646 */
3544 break;
3545
3546 case 270:
3547 #line 1322 "util/configparser.y" /* yacc.c:1646 */
3646 #line 3648 "util/configparser.c" /* yacc.c:1646 */
3647 break;
3648
3649 case 287:
3650 #line 1369 "util/configparser.y" /* yacc.c:1646 */
35483651 {
35493652 OUTYY(("P(dns64_prefix:%s)\n", (yyvsp[0].str)));
35503653 free(cfg_parser->cfg->dns64_prefix);
35513654 cfg_parser->cfg->dns64_prefix = (yyvsp[0].str);
35523655 }
3553 #line 3555 "util/configparser.c" /* yacc.c:1646 */
3554 break;
3555
3556 case 271:
3557 #line 1329 "util/configparser.y" /* yacc.c:1646 */
3656 #line 3658 "util/configparser.c" /* yacc.c:1646 */
3657 break;
3658
3659 case 288:
3660 #line 1376 "util/configparser.y" /* yacc.c:1646 */
35583661 {
35593662 OUTYY(("P(server_dns64_synthall:%s)\n", (yyvsp[0].str)));
35603663 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
35623665 else cfg_parser->cfg->dns64_synthall = (strcmp((yyvsp[0].str), "yes")==0);
35633666 free((yyvsp[0].str));
35643667 }
3565 #line 3567 "util/configparser.c" /* yacc.c:1646 */
3566 break;
3567
3568 case 272:
3569 #line 1338 "util/configparser.y" /* yacc.c:1646 */
3668 #line 3670 "util/configparser.c" /* yacc.c:1646 */
3669 break;
3670
3671 case 289:
3672 #line 1385 "util/configparser.y" /* yacc.c:1646 */
35703673 {
35713674 char* p, *s = (yyvsp[0].str);
35723675 OUTYY(("P(server_define_tag:%s)\n", (yyvsp[0].str)));
35793682 }
35803683 free((yyvsp[0].str));
35813684 }
3582 #line 3584 "util/configparser.c" /* yacc.c:1646 */
3583 break;
3584
3585 case 273:
3586 #line 1352 "util/configparser.y" /* yacc.c:1646 */
3685 #line 3687 "util/configparser.c" /* yacc.c:1646 */
3686 break;
3687
3688 case 290:
3689 #line 1399 "util/configparser.y" /* yacc.c:1646 */
35873690 {
35883691 size_t len = 0;
35893692 uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, (yyvsp[0].str),
36013704 }
36023705 }
36033706 }
3604 #line 3606 "util/configparser.c" /* yacc.c:1646 */
3605 break;
3606
3607 case 274:
3608 #line 1371 "util/configparser.y" /* yacc.c:1646 */
3707 #line 3709 "util/configparser.c" /* yacc.c:1646 */
3708 break;
3709
3710 case 291:
3711 #line 1418 "util/configparser.y" /* yacc.c:1646 */
36093712 {
36103713 size_t len = 0;
36113714 uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, (yyvsp[0].str),
36233726 }
36243727 }
36253728 }
3626 #line 3628 "util/configparser.c" /* yacc.c:1646 */
3627 break;
3628
3629 case 275:
3630 #line 1390 "util/configparser.y" /* yacc.c:1646 */
3729 #line 3731 "util/configparser.c" /* yacc.c:1646 */
3730 break;
3731
3732 case 292:
3733 #line 1437 "util/configparser.y" /* yacc.c:1646 */
36313734 {
36323735 OUTYY(("P(server_access_control_tag_action:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str)));
36333736 if(!cfg_str3list_insert(&cfg_parser->cfg->acl_tag_actions,
36383741 free((yyvsp[0].str));
36393742 }
36403743 }
3641 #line 3643 "util/configparser.c" /* yacc.c:1646 */
3642 break;
3643
3644 case 276:
3645 #line 1402 "util/configparser.y" /* yacc.c:1646 */
3744 #line 3746 "util/configparser.c" /* yacc.c:1646 */
3745 break;
3746
3747 case 293:
3748 #line 1449 "util/configparser.y" /* yacc.c:1646 */
36463749 {
36473750 OUTYY(("P(server_access_control_tag_data:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str)));
36483751 if(!cfg_str3list_insert(&cfg_parser->cfg->acl_tag_datas,
36533756 free((yyvsp[0].str));
36543757 }
36553758 }
3656 #line 3658 "util/configparser.c" /* yacc.c:1646 */
3657 break;
3658
3659 case 277:
3660 #line 1414 "util/configparser.y" /* yacc.c:1646 */
3759 #line 3761 "util/configparser.c" /* yacc.c:1646 */
3760 break;
3761
3762 case 294:
3763 #line 1461 "util/configparser.y" /* yacc.c:1646 */
36613764 {
36623765 OUTYY(("P(server_local_zone_override:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str)));
36633766 if(!cfg_str3list_insert(&cfg_parser->cfg->local_zone_overrides,
36683771 free((yyvsp[0].str));
36693772 }
36703773 }
3671 #line 3673 "util/configparser.c" /* yacc.c:1646 */
3672 break;
3673
3674 case 278:
3675 #line 1426 "util/configparser.y" /* yacc.c:1646 */
3774 #line 3776 "util/configparser.c" /* yacc.c:1646 */
3775 break;
3776
3777 case 295:
3778 #line 1473 "util/configparser.y" /* yacc.c:1646 */
3779 {
3780 OUTYY(("P(server_access_control_view:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
3781 if(!cfg_str2list_insert(&cfg_parser->cfg->acl_view,
3782 (yyvsp[-1].str), (yyvsp[0].str))) {
3783 yyerror("out of memory");
3784 free((yyvsp[-1].str));
3785 free((yyvsp[0].str));
3786 }
3787 }
3788 #line 3790 "util/configparser.c" /* yacc.c:1646 */
3789 break;
3790
3791 case 296:
3792 #line 1484 "util/configparser.y" /* yacc.c:1646 */
36763793 {
36773794 OUTYY(("P(server_ratelimit:%s)\n", (yyvsp[0].str)));
36783795 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
36803797 else cfg_parser->cfg->ratelimit = atoi((yyvsp[0].str));
36813798 free((yyvsp[0].str));
36823799 }
3683 #line 3685 "util/configparser.c" /* yacc.c:1646 */
3684 break;
3685
3686 case 279:
3687 #line 1435 "util/configparser.y" /* yacc.c:1646 */
3800 #line 3802 "util/configparser.c" /* yacc.c:1646 */
3801 break;
3802
3803 case 297:
3804 #line 1493 "util/configparser.y" /* yacc.c:1646 */
36883805 {
36893806 OUTYY(("P(server_ratelimit_size:%s)\n", (yyvsp[0].str)));
36903807 if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->ratelimit_size))
36913808 yyerror("memory size expected");
36923809 free((yyvsp[0].str));
36933810 }
3694 #line 3696 "util/configparser.c" /* yacc.c:1646 */
3695 break;
3696
3697 case 280:
3698 #line 1443 "util/configparser.y" /* yacc.c:1646 */
3811 #line 3813 "util/configparser.c" /* yacc.c:1646 */
3812 break;
3813
3814 case 298:
3815 #line 1501 "util/configparser.y" /* yacc.c:1646 */
36993816 {
37003817 OUTYY(("P(server_ratelimit_slabs:%s)\n", (yyvsp[0].str)));
37013818 if(atoi((yyvsp[0].str)) == 0)
37073824 }
37083825 free((yyvsp[0].str));
37093826 }
3710 #line 3712 "util/configparser.c" /* yacc.c:1646 */
3711 break;
3712
3713 case 281:
3714 #line 1456 "util/configparser.y" /* yacc.c:1646 */
3827 #line 3829 "util/configparser.c" /* yacc.c:1646 */
3828 break;
3829
3830 case 299:
3831 #line 1514 "util/configparser.y" /* yacc.c:1646 */
37153832 {
37163833 OUTYY(("P(server_ratelimit_for_domain:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
37173834 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) {
37233840 "ratelimit-for-domain");
37243841 }
37253842 }
3726 #line 3728 "util/configparser.c" /* yacc.c:1646 */
3727 break;
3728
3729 case 282:
3730 #line 1469 "util/configparser.y" /* yacc.c:1646 */
3843 #line 3845 "util/configparser.c" /* yacc.c:1646 */
3844 break;
3845
3846 case 300:
3847 #line 1527 "util/configparser.y" /* yacc.c:1646 */
37313848 {
37323849 OUTYY(("P(server_ratelimit_below_domain:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
37333850 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) {
37393856 "ratelimit-below-domain");
37403857 }
37413858 }
3742 #line 3744 "util/configparser.c" /* yacc.c:1646 */
3743 break;
3744
3745 case 283:
3746 #line 1482 "util/configparser.y" /* yacc.c:1646 */
3859 #line 3861 "util/configparser.c" /* yacc.c:1646 */
3860 break;
3861
3862 case 301:
3863 #line 1540 "util/configparser.y" /* yacc.c:1646 */
37473864 {
37483865 OUTYY(("P(server_ratelimit_factor:%s)\n", (yyvsp[0].str)));
37493866 if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
37513868 else cfg_parser->cfg->ratelimit_factor = atoi((yyvsp[0].str));
37523869 free((yyvsp[0].str));
37533870 }
3754 #line 3756 "util/configparser.c" /* yacc.c:1646 */
3755 break;
3756
3757 case 284:
3758 #line 1491 "util/configparser.y" /* yacc.c:1646 */
3871 #line 3873 "util/configparser.c" /* yacc.c:1646 */
3872 break;
3873
3874 case 302:
3875 #line 1549 "util/configparser.y" /* yacc.c:1646 */
37593876 {
37603877 OUTYY(("P(server_qname_minimisation:%s)\n", (yyvsp[0].str)));
37613878 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
37643881 (strcmp((yyvsp[0].str), "yes")==0);
37653882 free((yyvsp[0].str));
37663883 }
3767 #line 3769 "util/configparser.c" /* yacc.c:1646 */
3768 break;
3769
3770 case 285:
3771 #line 1501 "util/configparser.y" /* yacc.c:1646 */
3884 #line 3886 "util/configparser.c" /* yacc.c:1646 */
3885 break;
3886
3887 case 303:
3888 #line 1559 "util/configparser.y" /* yacc.c:1646 */
3889 {
3890 OUTYY(("P(server_qname_minimisation_strict:%s)\n", (yyvsp[0].str)));
3891 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
3892 yyerror("expected yes or no.");
3893 else cfg_parser->cfg->qname_minimisation_strict =
3894 (strcmp((yyvsp[0].str), "yes")==0);
3895 free((yyvsp[0].str));
3896 }
3897 #line 3899 "util/configparser.c" /* yacc.c:1646 */
3898 break;
3899
3900 case 304:
3901 #line 1569 "util/configparser.y" /* yacc.c:1646 */
37723902 {
37733903 OUTYY(("P(name:%s)\n", (yyvsp[0].str)));
37743904 if(cfg_parser->cfg->stubs->name)
37773907 free(cfg_parser->cfg->stubs->name);
37783908 cfg_parser->cfg->stubs->name = (yyvsp[0].str);
37793909 }
3780 #line 3782 "util/configparser.c" /* yacc.c:1646 */
3781 break;
3782
3783 case 286:
3784 #line 1511 "util/configparser.y" /* yacc.c:1646 */
3910 #line 3912 "util/configparser.c" /* yacc.c:1646 */
3911 break;
3912
3913 case 305:
3914 #line 1579 "util/configparser.y" /* yacc.c:1646 */
37853915 {
37863916 OUTYY(("P(stub-host:%s)\n", (yyvsp[0].str)));
37873917 if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->hosts, (yyvsp[0].str)))
37883918 yyerror("out of memory");
37893919 }
3790 #line 3792 "util/configparser.c" /* yacc.c:1646 */
3791 break;
3792
3793 case 287:
3794 #line 1518 "util/configparser.y" /* yacc.c:1646 */
3920 #line 3922 "util/configparser.c" /* yacc.c:1646 */
3921 break;
3922
3923 case 306:
3924 #line 1586 "util/configparser.y" /* yacc.c:1646 */
37953925 {
37963926 OUTYY(("P(stub-addr:%s)\n", (yyvsp[0].str)));
37973927 if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->addrs, (yyvsp[0].str)))
37983928 yyerror("out of memory");
37993929 }
3800 #line 3802 "util/configparser.c" /* yacc.c:1646 */
3801 break;
3802
3803 case 288:
3804 #line 1525 "util/configparser.y" /* yacc.c:1646 */
3930 #line 3932 "util/configparser.c" /* yacc.c:1646 */
3931 break;
3932
3933 case 307:
3934 #line 1593 "util/configparser.y" /* yacc.c:1646 */
38053935 {
38063936 OUTYY(("P(stub-first:%s)\n", (yyvsp[0].str)));
38073937 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
38093939 else cfg_parser->cfg->stubs->isfirst=(strcmp((yyvsp[0].str), "yes")==0);
38103940 free((yyvsp[0].str));
38113941 }
3812 #line 3814 "util/configparser.c" /* yacc.c:1646 */
3813 break;
3814
3815 case 289:
3816 #line 1534 "util/configparser.y" /* yacc.c:1646 */
3942 #line 3944 "util/configparser.c" /* yacc.c:1646 */
3943 break;
3944
3945 case 308:
3946 #line 1602 "util/configparser.y" /* yacc.c:1646 */
3947 {
3948 OUTYY(("P(stub-ssl-upstream:%s)\n", (yyvsp[0].str)));
3949 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
3950 yyerror("expected yes or no.");
3951 else cfg_parser->cfg->stubs->ssl_upstream =
3952 (strcmp((yyvsp[0].str), "yes")==0);
3953 free((yyvsp[0].str));
3954 }
3955 #line 3957 "util/configparser.c" /* yacc.c:1646 */
3956 break;
3957
3958 case 309:
3959 #line 1612 "util/configparser.y" /* yacc.c:1646 */
38173960 {
38183961 OUTYY(("P(stub-prime:%s)\n", (yyvsp[0].str)));
38193962 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
38223965 (strcmp((yyvsp[0].str), "yes")==0);
38233966 free((yyvsp[0].str));
38243967 }
3825 #line 3827 "util/configparser.c" /* yacc.c:1646 */
3826 break;
3827
3828 case 290:
3829 #line 1544 "util/configparser.y" /* yacc.c:1646 */
3968 #line 3970 "util/configparser.c" /* yacc.c:1646 */
3969 break;
3970
3971 case 310:
3972 #line 1622 "util/configparser.y" /* yacc.c:1646 */
38303973 {
38313974 OUTYY(("P(name:%s)\n", (yyvsp[0].str)));
38323975 if(cfg_parser->cfg->forwards->name)
38353978 free(cfg_parser->cfg->forwards->name);
38363979 cfg_parser->cfg->forwards->name = (yyvsp[0].str);
38373980 }
3838 #line 3840 "util/configparser.c" /* yacc.c:1646 */
3839 break;
3840
3841 case 291:
3842 #line 1554 "util/configparser.y" /* yacc.c:1646 */
3981 #line 3983 "util/configparser.c" /* yacc.c:1646 */
3982 break;
3983
3984 case 311:
3985 #line 1632 "util/configparser.y" /* yacc.c:1646 */
38433986 {
38443987 OUTYY(("P(forward-host:%s)\n", (yyvsp[0].str)));
38453988 if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->hosts, (yyvsp[0].str)))
38463989 yyerror("out of memory");
38473990 }
3848 #line 3850 "util/configparser.c" /* yacc.c:1646 */
3849 break;
3850
3851 case 292:
3852 #line 1561 "util/configparser.y" /* yacc.c:1646 */
3991 #line 3993 "util/configparser.c" /* yacc.c:1646 */
3992 break;
3993
3994 case 312:
3995 #line 1639 "util/configparser.y" /* yacc.c:1646 */
38533996 {
38543997 OUTYY(("P(forward-addr:%s)\n", (yyvsp[0].str)));
38553998 if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->addrs, (yyvsp[0].str)))
38563999 yyerror("out of memory");
38574000 }
3858 #line 3860 "util/configparser.c" /* yacc.c:1646 */
3859 break;
3860
3861 case 293:
3862 #line 1568 "util/configparser.y" /* yacc.c:1646 */
4001 #line 4003 "util/configparser.c" /* yacc.c:1646 */
4002 break;
4003
4004 case 313:
4005 #line 1646 "util/configparser.y" /* yacc.c:1646 */
38634006 {
38644007 OUTYY(("P(forward-first:%s)\n", (yyvsp[0].str)));
38654008 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
38674010 else cfg_parser->cfg->forwards->isfirst=(strcmp((yyvsp[0].str), "yes")==0);
38684011 free((yyvsp[0].str));
38694012 }
3870 #line 3872 "util/configparser.c" /* yacc.c:1646 */
3871 break;
3872
3873 case 294:
3874 #line 1577 "util/configparser.y" /* yacc.c:1646 */
4013 #line 4015 "util/configparser.c" /* yacc.c:1646 */
4014 break;
4015
4016 case 314:
4017 #line 1655 "util/configparser.y" /* yacc.c:1646 */
4018 {
4019 OUTYY(("P(forward-ssl-upstream:%s)\n", (yyvsp[0].str)));
4020 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
4021 yyerror("expected yes or no.");
4022 else cfg_parser->cfg->forwards->ssl_upstream =
4023 (strcmp((yyvsp[0].str), "yes")==0);
4024 free((yyvsp[0].str));
4025 }
4026 #line 4028 "util/configparser.c" /* yacc.c:1646 */
4027 break;
4028
4029 case 315:
4030 #line 1665 "util/configparser.y" /* yacc.c:1646 */
4031 {
4032 OUTYY(("P(name:%s)\n", (yyvsp[0].str)));
4033 if(cfg_parser->cfg->views->name)
4034 yyerror("view name override, there must be one "
4035 "name for one view");
4036 free(cfg_parser->cfg->views->name);
4037 cfg_parser->cfg->views->name = (yyvsp[0].str);
4038 }
4039 #line 4041 "util/configparser.c" /* yacc.c:1646 */
4040 break;
4041
4042 case 316:
4043 #line 1675 "util/configparser.y" /* yacc.c:1646 */
4044 {
4045 OUTYY(("P(view_local_zone:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
4046 if(strcmp((yyvsp[0].str), "static")!=0 && strcmp((yyvsp[0].str), "deny")!=0 &&
4047 strcmp((yyvsp[0].str), "refuse")!=0 && strcmp((yyvsp[0].str), "redirect")!=0 &&
4048 strcmp((yyvsp[0].str), "transparent")!=0 && strcmp((yyvsp[0].str), "nodefault")!=0
4049 && strcmp((yyvsp[0].str), "typetransparent")!=0
4050 && strcmp((yyvsp[0].str), "always_transparent")!=0
4051 && strcmp((yyvsp[0].str), "always_refuse")!=0
4052 && strcmp((yyvsp[0].str), "always_nxdomain")!=0
4053 && strcmp((yyvsp[0].str), "inform")!=0 && strcmp((yyvsp[0].str), "inform_deny")!=0)
4054 yyerror("local-zone type: expected static, deny, "
4055 "refuse, redirect, transparent, "
4056 "typetransparent, inform, inform_deny, "
4057 "always_transparent, always_refuse, "
4058 "always_nxdomain or nodefault");
4059 else if(strcmp((yyvsp[0].str), "nodefault")==0) {
4060 if(!cfg_strlist_insert(&cfg_parser->cfg->views->
4061 local_zones_nodefault, (yyvsp[-1].str)))
4062 fatal_exit("out of memory adding local-zone");
4063 free((yyvsp[0].str));
4064 } else {
4065 if(!cfg_str2list_insert(
4066 &cfg_parser->cfg->views->local_zones,
4067 (yyvsp[-1].str), (yyvsp[0].str)))
4068 fatal_exit("out of memory adding local-zone");
4069 }
4070 }
4071 #line 4073 "util/configparser.c" /* yacc.c:1646 */
4072 break;
4073
4074 case 317:
4075 #line 1704 "util/configparser.y" /* yacc.c:1646 */
4076 {
4077 OUTYY(("P(view_local_data:%s)\n", (yyvsp[0].str)));
4078 if(!cfg_strlist_insert(&cfg_parser->cfg->views->local_data, (yyvsp[0].str))) {
4079 fatal_exit("out of memory adding local-data");
4080 free((yyvsp[0].str));
4081 }
4082 }
4083 #line 4085 "util/configparser.c" /* yacc.c:1646 */
4084 break;
4085
4086 case 318:
4087 #line 1713 "util/configparser.y" /* yacc.c:1646 */
4088 {
4089 OUTYY(("P(view-first:%s)\n", (yyvsp[0].str)));
4090 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
4091 yyerror("expected yes or no.");
4092 else cfg_parser->cfg->views->isfirst=(strcmp((yyvsp[0].str), "yes")==0);
4093 free((yyvsp[0].str));
4094 }
4095 #line 4097 "util/configparser.c" /* yacc.c:1646 */
4096 break;
4097
4098 case 319:
4099 #line 1722 "util/configparser.y" /* yacc.c:1646 */
38754100 {
38764101 OUTYY(("\nP(remote-control:)\n"));
38774102 }
3878 #line 3880 "util/configparser.c" /* yacc.c:1646 */
3879 break;
3880
3881 case 305:
3882 #line 1588 "util/configparser.y" /* yacc.c:1646 */
4103 #line 4105 "util/configparser.c" /* yacc.c:1646 */
4104 break;
4105
4106 case 330:
4107 #line 1733 "util/configparser.y" /* yacc.c:1646 */
38834108 {
38844109 OUTYY(("P(control_enable:%s)\n", (yyvsp[0].str)));
38854110 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
38884113 (strcmp((yyvsp[0].str), "yes")==0);
38894114 free((yyvsp[0].str));
38904115 }
3891 #line 3893 "util/configparser.c" /* yacc.c:1646 */
3892 break;
3893
3894 case 306:
3895 #line 1598 "util/configparser.y" /* yacc.c:1646 */
4116 #line 4118 "util/configparser.c" /* yacc.c:1646 */
4117 break;
4118
4119 case 331:
4120 #line 1743 "util/configparser.y" /* yacc.c:1646 */
38964121 {
38974122 OUTYY(("P(control_port:%s)\n", (yyvsp[0].str)));
38984123 if(atoi((yyvsp[0].str)) == 0)
39004125 else cfg_parser->cfg->control_port = atoi((yyvsp[0].str));
39014126 free((yyvsp[0].str));
39024127 }
3903 #line 3905 "util/configparser.c" /* yacc.c:1646 */
3904 break;
3905
3906 case 307:
3907 #line 1607 "util/configparser.y" /* yacc.c:1646 */
4128 #line 4130 "util/configparser.c" /* yacc.c:1646 */
4129 break;
4130
4131 case 332:
4132 #line 1752 "util/configparser.y" /* yacc.c:1646 */
39084133 {
39094134 OUTYY(("P(control_interface:%s)\n", (yyvsp[0].str)));
39104135 if(!cfg_strlist_insert(&cfg_parser->cfg->control_ifs, (yyvsp[0].str)))
39114136 yyerror("out of memory");
39124137 }
3913 #line 3915 "util/configparser.c" /* yacc.c:1646 */
3914 break;
3915
3916 case 308:
3917 #line 1614 "util/configparser.y" /* yacc.c:1646 */
4138 #line 4140 "util/configparser.c" /* yacc.c:1646 */
4139 break;
4140
4141 case 333:
4142 #line 1759 "util/configparser.y" /* yacc.c:1646 */
39184143 {
39194144 OUTYY(("P(control_use_cert:%s)\n", (yyvsp[0].str)));
39204145 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
39234148 (strcmp((yyvsp[0].str), "yes")==0);
39244149 free((yyvsp[0].str));
39254150 }
3926 #line 3928 "util/configparser.c" /* yacc.c:1646 */
3927 break;
3928
3929 case 309:
3930 #line 1624 "util/configparser.y" /* yacc.c:1646 */
4151 #line 4153 "util/configparser.c" /* yacc.c:1646 */
4152 break;
4153
4154 case 334:
4155 #line 1769 "util/configparser.y" /* yacc.c:1646 */
39314156 {
39324157 OUTYY(("P(rc_server_key_file:%s)\n", (yyvsp[0].str)));
39334158 free(cfg_parser->cfg->server_key_file);
39344159 cfg_parser->cfg->server_key_file = (yyvsp[0].str);
39354160 }
3936 #line 3938 "util/configparser.c" /* yacc.c:1646 */
3937 break;
3938
3939 case 310:
3940 #line 1631 "util/configparser.y" /* yacc.c:1646 */
4161 #line 4163 "util/configparser.c" /* yacc.c:1646 */
4162 break;
4163
4164 case 335:
4165 #line 1776 "util/configparser.y" /* yacc.c:1646 */
39414166 {
39424167 OUTYY(("P(rc_server_cert_file:%s)\n", (yyvsp[0].str)));
39434168 free(cfg_parser->cfg->server_cert_file);
39444169 cfg_parser->cfg->server_cert_file = (yyvsp[0].str);
39454170 }
3946 #line 3948 "util/configparser.c" /* yacc.c:1646 */
3947 break;
3948
3949 case 311:
3950 #line 1638 "util/configparser.y" /* yacc.c:1646 */
4171 #line 4173 "util/configparser.c" /* yacc.c:1646 */
4172 break;
4173
4174 case 336:
4175 #line 1783 "util/configparser.y" /* yacc.c:1646 */
39514176 {
39524177 OUTYY(("P(rc_control_key_file:%s)\n", (yyvsp[0].str)));
39534178 free(cfg_parser->cfg->control_key_file);
39544179 cfg_parser->cfg->control_key_file = (yyvsp[0].str);
39554180 }
3956 #line 3958 "util/configparser.c" /* yacc.c:1646 */
3957 break;
3958
3959 case 312:
3960 #line 1645 "util/configparser.y" /* yacc.c:1646 */
4181 #line 4183 "util/configparser.c" /* yacc.c:1646 */
4182 break;
4183
4184 case 337:
4185 #line 1790 "util/configparser.y" /* yacc.c:1646 */
39614186 {
39624187 OUTYY(("P(rc_control_cert_file:%s)\n", (yyvsp[0].str)));
39634188 free(cfg_parser->cfg->control_cert_file);
39644189 cfg_parser->cfg->control_cert_file = (yyvsp[0].str);
39654190 }
3966 #line 3968 "util/configparser.c" /* yacc.c:1646 */
3967 break;
3968
3969 case 313:
3970 #line 1652 "util/configparser.y" /* yacc.c:1646 */
4191 #line 4193 "util/configparser.c" /* yacc.c:1646 */
4192 break;
4193
4194 case 338:
4195 #line 1797 "util/configparser.y" /* yacc.c:1646 */
39714196 {
39724197 OUTYY(("\nP(dnstap:)\n"));
39734198 }
3974 #line 3976 "util/configparser.c" /* yacc.c:1646 */
3975 break;
3976
3977 case 328:
3978 #line 1669 "util/configparser.y" /* yacc.c:1646 */
4199 #line 4201 "util/configparser.c" /* yacc.c:1646 */
4200 break;
4201
4202 case 353:
4203 #line 1814 "util/configparser.y" /* yacc.c:1646 */
39794204 {
39804205 OUTYY(("P(dt_dnstap_enable:%s)\n", (yyvsp[0].str)));
39814206 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
39824207 yyerror("expected yes or no.");
39834208 else cfg_parser->cfg->dnstap = (strcmp((yyvsp[0].str), "yes")==0);
39844209 }
3985 #line 3987 "util/configparser.c" /* yacc.c:1646 */
3986 break;
3987
3988 case 329:
3989 #line 1677 "util/configparser.y" /* yacc.c:1646 */
4210 #line 4212 "util/configparser.c" /* yacc.c:1646 */
4211 break;
4212
4213 case 354:
4214 #line 1822 "util/configparser.y" /* yacc.c:1646 */
39904215 {
39914216 OUTYY(("P(dt_dnstap_socket_path:%s)\n", (yyvsp[0].str)));
39924217 free(cfg_parser->cfg->dnstap_socket_path);
39934218 cfg_parser->cfg->dnstap_socket_path = (yyvsp[0].str);
39944219 }
3995 #line 3997 "util/configparser.c" /* yacc.c:1646 */
3996 break;
3997
3998 case 330:
3999 #line 1684 "util/configparser.y" /* yacc.c:1646 */
4220 #line 4222 "util/configparser.c" /* yacc.c:1646 */
4221 break;
4222
4223 case 355:
4224 #line 1829 "util/configparser.y" /* yacc.c:1646 */
40004225 {
40014226 OUTYY(("P(dt_dnstap_send_identity:%s)\n", (yyvsp[0].str)));
40024227 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
40034228 yyerror("expected yes or no.");
40044229 else cfg_parser->cfg->dnstap_send_identity = (strcmp((yyvsp[0].str), "yes")==0);
40054230 }
4006 #line 4008 "util/configparser.c" /* yacc.c:1646 */
4007 break;
4008
4009 case 331:
4010 #line 1692 "util/configparser.y" /* yacc.c:1646 */
4231 #line 4233 "util/configparser.c" /* yacc.c:1646 */
4232 break;
4233
4234 case 356:
4235 #line 1837 "util/configparser.y" /* yacc.c:1646 */
40114236 {
40124237 OUTYY(("P(dt_dnstap_send_version:%s)\n", (yyvsp[0].str)));
40134238 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
40144239 yyerror("expected yes or no.");
40154240 else cfg_parser->cfg->dnstap_send_version = (strcmp((yyvsp[0].str), "yes")==0);
40164241 }
4017 #line 4019 "util/configparser.c" /* yacc.c:1646 */
4018 break;
4019
4020 case 332:
4021 #line 1700 "util/configparser.y" /* yacc.c:1646 */
4242 #line 4244 "util/configparser.c" /* yacc.c:1646 */
4243 break;
4244
4245 case 357:
4246 #line 1845 "util/configparser.y" /* yacc.c:1646 */
40224247 {
40234248 OUTYY(("P(dt_dnstap_identity:%s)\n", (yyvsp[0].str)));
40244249 free(cfg_parser->cfg->dnstap_identity);
40254250 cfg_parser->cfg->dnstap_identity = (yyvsp[0].str);
40264251 }
4027 #line 4029 "util/configparser.c" /* yacc.c:1646 */
4028 break;
4029
4030 case 333:
4031 #line 1707 "util/configparser.y" /* yacc.c:1646 */
4252 #line 4254 "util/configparser.c" /* yacc.c:1646 */
4253 break;
4254
4255 case 358:
4256 #line 1852 "util/configparser.y" /* yacc.c:1646 */
40324257 {
40334258 OUTYY(("P(dt_dnstap_version:%s)\n", (yyvsp[0].str)));
40344259 free(cfg_parser->cfg->dnstap_version);
40354260 cfg_parser->cfg->dnstap_version = (yyvsp[0].str);
40364261 }
4037 #line 4039 "util/configparser.c" /* yacc.c:1646 */
4038 break;
4039
4040 case 334:
4041 #line 1714 "util/configparser.y" /* yacc.c:1646 */
4262 #line 4264 "util/configparser.c" /* yacc.c:1646 */
4263 break;
4264
4265 case 359:
4266 #line 1859 "util/configparser.y" /* yacc.c:1646 */
40424267 {
40434268 OUTYY(("P(dt_dnstap_log_resolver_query_messages:%s)\n", (yyvsp[0].str)));
40444269 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
40464271 else cfg_parser->cfg->dnstap_log_resolver_query_messages =
40474272 (strcmp((yyvsp[0].str), "yes")==0);
40484273 }
4049 #line 4051 "util/configparser.c" /* yacc.c:1646 */
4050 break;
4051
4052 case 335:
4053 #line 1723 "util/configparser.y" /* yacc.c:1646 */
4274 #line 4276 "util/configparser.c" /* yacc.c:1646 */
4275 break;
4276
4277 case 360:
4278 #line 1868 "util/configparser.y" /* yacc.c:1646 */
40544279 {
40554280 OUTYY(("P(dt_dnstap_log_resolver_response_messages:%s)\n", (yyvsp[0].str)));
40564281 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
40584283 else cfg_parser->cfg->dnstap_log_resolver_response_messages =
40594284 (strcmp((yyvsp[0].str), "yes")==0);
40604285 }
4061 #line 4063 "util/configparser.c" /* yacc.c:1646 */
4062 break;
4063
4064 case 336:
4065 #line 1732 "util/configparser.y" /* yacc.c:1646 */
4286 #line 4288 "util/configparser.c" /* yacc.c:1646 */
4287 break;
4288
4289 case 361:
4290 #line 1877 "util/configparser.y" /* yacc.c:1646 */
40664291 {
40674292 OUTYY(("P(dt_dnstap_log_client_query_messages:%s)\n", (yyvsp[0].str)));
40684293 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
40704295 else cfg_parser->cfg->dnstap_log_client_query_messages =
40714296 (strcmp((yyvsp[0].str), "yes")==0);
40724297 }
4073 #line 4075 "util/configparser.c" /* yacc.c:1646 */
4074 break;
4075
4076 case 337:
4077 #line 1741 "util/configparser.y" /* yacc.c:1646 */
4298 #line 4300 "util/configparser.c" /* yacc.c:1646 */
4299 break;
4300
4301 case 362:
4302 #line 1886 "util/configparser.y" /* yacc.c:1646 */
40784303 {
40794304 OUTYY(("P(dt_dnstap_log_client_response_messages:%s)\n", (yyvsp[0].str)));
40804305 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
40824307 else cfg_parser->cfg->dnstap_log_client_response_messages =
40834308 (strcmp((yyvsp[0].str), "yes")==0);
40844309 }
4085 #line 4087 "util/configparser.c" /* yacc.c:1646 */
4086 break;
4087
4088 case 338:
4089 #line 1750 "util/configparser.y" /* yacc.c:1646 */
4310 #line 4312 "util/configparser.c" /* yacc.c:1646 */
4311 break;
4312
4313 case 363:
4314 #line 1895 "util/configparser.y" /* yacc.c:1646 */
40904315 {
40914316 OUTYY(("P(dt_dnstap_log_forwarder_query_messages:%s)\n", (yyvsp[0].str)));
40924317 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
40944319 else cfg_parser->cfg->dnstap_log_forwarder_query_messages =
40954320 (strcmp((yyvsp[0].str), "yes")==0);
40964321 }
4097 #line 4099 "util/configparser.c" /* yacc.c:1646 */
4098 break;
4099
4100 case 339:
4101 #line 1759 "util/configparser.y" /* yacc.c:1646 */
4322 #line 4324 "util/configparser.c" /* yacc.c:1646 */
4323 break;
4324
4325 case 364:
4326 #line 1904 "util/configparser.y" /* yacc.c:1646 */
41024327 {
41034328 OUTYY(("P(dt_dnstap_log_forwarder_response_messages:%s)\n", (yyvsp[0].str)));
41044329 if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
41064331 else cfg_parser->cfg->dnstap_log_forwarder_response_messages =
41074332 (strcmp((yyvsp[0].str), "yes")==0);
41084333 }
4109 #line 4111 "util/configparser.c" /* yacc.c:1646 */
4110 break;
4111
4112 case 340:
4113 #line 1768 "util/configparser.y" /* yacc.c:1646 */
4334 #line 4336 "util/configparser.c" /* yacc.c:1646 */
4335 break;
4336
4337 case 365:
4338 #line 1913 "util/configparser.y" /* yacc.c:1646 */
41144339 {
41154340 OUTYY(("\nP(python:)\n"));
41164341 }
4117 #line 4119 "util/configparser.c" /* yacc.c:1646 */
4118 break;
4119
4120 case 344:
4121 #line 1777 "util/configparser.y" /* yacc.c:1646 */
4342 #line 4344 "util/configparser.c" /* yacc.c:1646 */
4343 break;
4344
4345 case 369:
4346 #line 1922 "util/configparser.y" /* yacc.c:1646 */
41224347 {
41234348 OUTYY(("P(python-script:%s)\n", (yyvsp[0].str)));
41244349 free(cfg_parser->cfg->python_script);
41254350 cfg_parser->cfg->python_script = (yyvsp[0].str);
41264351 }
4127 #line 4129 "util/configparser.c" /* yacc.c:1646 */
4128 break;
4129
4130 case 345:
4131 #line 1783 "util/configparser.y" /* yacc.c:1646 */
4352 #line 4354 "util/configparser.c" /* yacc.c:1646 */
4353 break;
4354
4355 case 370:
4356 #line 1928 "util/configparser.y" /* yacc.c:1646 */
41324357 {
41334358 OUTYY(("P(disable_dnssec_lame_check:%s)\n", (yyvsp[0].str)));
41344359 if (strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
41374362 (strcmp((yyvsp[0].str), "yes")==0);
41384363 free((yyvsp[0].str));
41394364 }
4140 #line 4142 "util/configparser.c" /* yacc.c:1646 */
4141 break;
4142
4143
4144 #line 4146 "util/configparser.c" /* yacc.c:1646 */
4365 #line 4367 "util/configparser.c" /* yacc.c:1646 */
4366 break;
4367
4368 case 371:
4369 #line 1938 "util/configparser.y" /* yacc.c:1646 */
4370 {
4371 OUTYY(("P(server_log_identity:%s)\n", (yyvsp[0].str)));
4372 free(cfg_parser->cfg->log_identity);
4373 cfg_parser->cfg->log_identity = (yyvsp[0].str);
4374 }
4375 #line 4377 "util/configparser.c" /* yacc.c:1646 */
4376 break;
4377
4378
4379 #line 4381 "util/configparser.c" /* yacc.c:1646 */
41454380 default: break;
41464381 }
41474382 /* User semantic actions sometimes alter yychar, and that requires
43694604 #endif
43704605 return yyresult;
43714606 }
4372 #line 1791 "util/configparser.y" /* yacc.c:1906 */
4607 #line 1944 "util/configparser.y" /* yacc.c:1906 */
43734608
43744609
43754610 /* parse helper routines could be here */
173173 VAR_SSL_SERVICE_PEM = 384,
174174 VAR_SSL_PORT = 385,
175175 VAR_FORWARD_FIRST = 386,
176 VAR_STUB_FIRST = 387,
177 VAR_MINIMAL_RESPONSES = 388,
178 VAR_RRSET_ROUNDROBIN = 389,
179 VAR_MAX_UDP_SIZE = 390,
180 VAR_DELAY_CLOSE = 391,
181 VAR_UNBLOCK_LAN_ZONES = 392,
182 VAR_INSECURE_LAN_ZONES = 393,
183 VAR_INFRA_CACHE_MIN_RTT = 394,
184 VAR_DNS64_PREFIX = 395,
185 VAR_DNS64_SYNTHALL = 396,
186 VAR_DNSTAP = 397,
187 VAR_DNSTAP_ENABLE = 398,
188 VAR_DNSTAP_SOCKET_PATH = 399,
189 VAR_DNSTAP_SEND_IDENTITY = 400,
190 VAR_DNSTAP_SEND_VERSION = 401,
191 VAR_DNSTAP_IDENTITY = 402,
192 VAR_DNSTAP_VERSION = 403,
193 VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES = 404,
194 VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES = 405,
195 VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES = 406,
196 VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES = 407,
197 VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES = 408,
198 VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES = 409,
199 VAR_HARDEN_ALGO_DOWNGRADE = 410,
200 VAR_IP_TRANSPARENT = 411,
201 VAR_DISABLE_DNSSEC_LAME_CHECK = 412,
202 VAR_RATELIMIT = 413,
203 VAR_RATELIMIT_SLABS = 414,
204 VAR_RATELIMIT_SIZE = 415,
205 VAR_RATELIMIT_FOR_DOMAIN = 416,
206 VAR_RATELIMIT_BELOW_DOMAIN = 417,
207 VAR_RATELIMIT_FACTOR = 418,
208 VAR_CAPS_WHITELIST = 419,
209 VAR_CACHE_MAX_NEGATIVE_TTL = 420,
210 VAR_PERMIT_SMALL_HOLDDOWN = 421,
211 VAR_QNAME_MINIMISATION = 422,
212 VAR_IP_FREEBIND = 423,
213 VAR_DEFINE_TAG = 424,
214 VAR_LOCAL_ZONE_TAG = 425,
215 VAR_ACCESS_CONTROL_TAG = 426,
216 VAR_LOCAL_ZONE_OVERRIDE = 427,
217 VAR_ACCESS_CONTROL_TAG_ACTION = 428,
218 VAR_ACCESS_CONTROL_TAG_DATA = 429
176 VAR_STUB_SSL_UPSTREAM = 387,
177 VAR_FORWARD_SSL_UPSTREAM = 388,
178 VAR_STUB_FIRST = 389,
179 VAR_MINIMAL_RESPONSES = 390,
180 VAR_RRSET_ROUNDROBIN = 391,
181 VAR_MAX_UDP_SIZE = 392,
182 VAR_DELAY_CLOSE = 393,
183 VAR_UNBLOCK_LAN_ZONES = 394,
184 VAR_INSECURE_LAN_ZONES = 395,
185 VAR_INFRA_CACHE_MIN_RTT = 396,
186 VAR_DNS64_PREFIX = 397,
187 VAR_DNS64_SYNTHALL = 398,
188 VAR_DNSTAP = 399,
189 VAR_DNSTAP_ENABLE = 400,
190 VAR_DNSTAP_SOCKET_PATH = 401,
191 VAR_DNSTAP_SEND_IDENTITY = 402,
192 VAR_DNSTAP_SEND_VERSION = 403,
193 VAR_DNSTAP_IDENTITY = 404,
194 VAR_DNSTAP_VERSION = 405,
195 VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES = 406,
196 VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES = 407,
197 VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES = 408,
198 VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES = 409,
199 VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES = 410,
200 VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES = 411,
201 VAR_HARDEN_ALGO_DOWNGRADE = 412,
202 VAR_IP_TRANSPARENT = 413,
203 VAR_DISABLE_DNSSEC_LAME_CHECK = 414,
204 VAR_RATELIMIT = 415,
205 VAR_RATELIMIT_SLABS = 416,
206 VAR_RATELIMIT_SIZE = 417,
207 VAR_RATELIMIT_FOR_DOMAIN = 418,
208 VAR_RATELIMIT_BELOW_DOMAIN = 419,
209 VAR_RATELIMIT_FACTOR = 420,
210 VAR_CAPS_WHITELIST = 421,
211 VAR_CACHE_MAX_NEGATIVE_TTL = 422,
212 VAR_PERMIT_SMALL_HOLDDOWN = 423,
213 VAR_QNAME_MINIMISATION = 424,
214 VAR_QNAME_MINIMISATION_STRICT = 425,
215 VAR_IP_FREEBIND = 426,
216 VAR_DEFINE_TAG = 427,
217 VAR_LOCAL_ZONE_TAG = 428,
218 VAR_ACCESS_CONTROL_TAG = 429,
219 VAR_LOCAL_ZONE_OVERRIDE = 430,
220 VAR_ACCESS_CONTROL_TAG_ACTION = 431,
221 VAR_ACCESS_CONTROL_TAG_DATA = 432,
222 VAR_VIEW = 433,
223 VAR_ACCESS_CONTROL_VIEW = 434,
224 VAR_VIEW_FIRST = 435,
225 VAR_SERVE_EXPIRED = 436,
226 VAR_FAKE_DSA = 437,
227 VAR_LOG_IDENTITY = 438
219228 };
220229 #endif
221230 /* Tokens. */
348357 #define VAR_SSL_SERVICE_PEM 384
349358 #define VAR_SSL_PORT 385
350359 #define VAR_FORWARD_FIRST 386
351 #define VAR_STUB_FIRST 387
352 #define VAR_MINIMAL_RESPONSES 388
353 #define VAR_RRSET_ROUNDROBIN 389
354 #define VAR_MAX_UDP_SIZE 390
355 #define VAR_DELAY_CLOSE 391
356 #define VAR_UNBLOCK_LAN_ZONES 392
357 #define VAR_INSECURE_LAN_ZONES 393
358 #define VAR_INFRA_CACHE_MIN_RTT 394
359 #define VAR_DNS64_PREFIX 395
360 #define VAR_DNS64_SYNTHALL 396
361 #define VAR_DNSTAP 397
362 #define VAR_DNSTAP_ENABLE 398
363 #define VAR_DNSTAP_SOCKET_PATH 399
364 #define VAR_DNSTAP_SEND_IDENTITY 400
365 #define VAR_DNSTAP_SEND_VERSION 401
366 #define VAR_DNSTAP_IDENTITY 402
367 #define VAR_DNSTAP_VERSION 403
368 #define VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES 404
369 #define VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES 405
370 #define VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES 406
371 #define VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES 407
372 #define VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES 408
373 #define VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES 409
374 #define VAR_HARDEN_ALGO_DOWNGRADE 410
375 #define VAR_IP_TRANSPARENT 411
376 #define VAR_DISABLE_DNSSEC_LAME_CHECK 412
377 #define VAR_RATELIMIT 413
378 #define VAR_RATELIMIT_SLABS 414
379 #define VAR_RATELIMIT_SIZE 415
380 #define VAR_RATELIMIT_FOR_DOMAIN 416
381 #define VAR_RATELIMIT_BELOW_DOMAIN 417
382 #define VAR_RATELIMIT_FACTOR 418
383 #define VAR_CAPS_WHITELIST 419
384 #define VAR_CACHE_MAX_NEGATIVE_TTL 420
385 #define VAR_PERMIT_SMALL_HOLDDOWN 421
386 #define VAR_QNAME_MINIMISATION 422
387 #define VAR_IP_FREEBIND 423
388 #define VAR_DEFINE_TAG 424
389 #define VAR_LOCAL_ZONE_TAG 425
390 #define VAR_ACCESS_CONTROL_TAG 426
391 #define VAR_LOCAL_ZONE_OVERRIDE 427
392 #define VAR_ACCESS_CONTROL_TAG_ACTION 428
393 #define VAR_ACCESS_CONTROL_TAG_DATA 429
360 #define VAR_STUB_SSL_UPSTREAM 387
361 #define VAR_FORWARD_SSL_UPSTREAM 388
362 #define VAR_STUB_FIRST 389
363 #define VAR_MINIMAL_RESPONSES 390
364 #define VAR_RRSET_ROUNDROBIN 391
365 #define VAR_MAX_UDP_SIZE 392
366 #define VAR_DELAY_CLOSE 393
367 #define VAR_UNBLOCK_LAN_ZONES 394
368 #define VAR_INSECURE_LAN_ZONES 395
369 #define VAR_INFRA_CACHE_MIN_RTT 396
370 #define VAR_DNS64_PREFIX 397
371 #define VAR_DNS64_SYNTHALL 398
372 #define VAR_DNSTAP 399
373 #define VAR_DNSTAP_ENABLE 400
374 #define VAR_DNSTAP_SOCKET_PATH 401
375 #define VAR_DNSTAP_SEND_IDENTITY 402
376 #define VAR_DNSTAP_SEND_VERSION 403
377 #define VAR_DNSTAP_IDENTITY 404
378 #define VAR_DNSTAP_VERSION 405
379 #define VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES 406
380 #define VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES 407
381 #define VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES 408
382 #define VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES 409
383 #define VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES 410
384 #define VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES 411
385 #define VAR_HARDEN_ALGO_DOWNGRADE 412
386 #define VAR_IP_TRANSPARENT 413
387 #define VAR_DISABLE_DNSSEC_LAME_CHECK 414
388 #define VAR_RATELIMIT 415
389 #define VAR_RATELIMIT_SLABS 416
390 #define VAR_RATELIMIT_SIZE 417
391 #define VAR_RATELIMIT_FOR_DOMAIN 418
392 #define VAR_RATELIMIT_BELOW_DOMAIN 419
393 #define VAR_RATELIMIT_FACTOR 420
394 #define VAR_CAPS_WHITELIST 421
395 #define VAR_CACHE_MAX_NEGATIVE_TTL 422
396 #define VAR_PERMIT_SMALL_HOLDDOWN 423
397 #define VAR_QNAME_MINIMISATION 424
398 #define VAR_QNAME_MINIMISATION_STRICT 425
399 #define VAR_IP_FREEBIND 426
400 #define VAR_DEFINE_TAG 427
401 #define VAR_LOCAL_ZONE_TAG 428
402 #define VAR_ACCESS_CONTROL_TAG 429
403 #define VAR_LOCAL_ZONE_OVERRIDE 430
404 #define VAR_ACCESS_CONTROL_TAG_ACTION 431
405 #define VAR_ACCESS_CONTROL_TAG_DATA 432
406 #define VAR_VIEW 433
407 #define VAR_ACCESS_CONTROL_VIEW 434
408 #define VAR_VIEW_FIRST 435
409 #define VAR_SERVE_EXPIRED 436
410 #define VAR_FAKE_DSA 437
411 #define VAR_LOG_IDENTITY 438
394412
395413 /* Value type. */
396414 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
401419
402420 char* str;
403421
404 #line 406 "util/configparser.h" /* yacc.c:1909 */
422 #line 424 "util/configparser.h" /* yacc.c:1909 */
405423 };
406424
407425 typedef union YYSTYPE YYSTYPE;
105105 %token VAR_PREFETCH_KEY VAR_SO_SNDBUF VAR_SO_REUSEPORT VAR_HARDEN_BELOW_NXDOMAIN
106106 %token VAR_IGNORE_CD_FLAG VAR_LOG_QUERIES VAR_TCP_UPSTREAM VAR_SSL_UPSTREAM
107107 %token VAR_SSL_SERVICE_KEY VAR_SSL_SERVICE_PEM VAR_SSL_PORT VAR_FORWARD_FIRST
108 %token VAR_STUB_SSL_UPSTREAM VAR_FORWARD_SSL_UPSTREAM
108109 %token VAR_STUB_FIRST VAR_MINIMAL_RESPONSES VAR_RRSET_ROUNDROBIN
109110 %token VAR_MAX_UDP_SIZE VAR_DELAY_CLOSE
110111 %token VAR_UNBLOCK_LAN_ZONES VAR_INSECURE_LAN_ZONES
124125 %token VAR_RATELIMIT VAR_RATELIMIT_SLABS VAR_RATELIMIT_SIZE
125126 %token VAR_RATELIMIT_FOR_DOMAIN VAR_RATELIMIT_BELOW_DOMAIN VAR_RATELIMIT_FACTOR
126127 %token VAR_CAPS_WHITELIST VAR_CACHE_MAX_NEGATIVE_TTL VAR_PERMIT_SMALL_HOLDDOWN
127 %token VAR_QNAME_MINIMISATION VAR_IP_FREEBIND VAR_DEFINE_TAG VAR_LOCAL_ZONE_TAG
128 %token VAR_ACCESS_CONTROL_TAG VAR_LOCAL_ZONE_OVERRIDE
129 %token VAR_ACCESS_CONTROL_TAG_ACTION VAR_ACCESS_CONTROL_TAG_DATA
128 %token VAR_QNAME_MINIMISATION VAR_QNAME_MINIMISATION_STRICT VAR_IP_FREEBIND
129 %token VAR_DEFINE_TAG VAR_LOCAL_ZONE_TAG VAR_ACCESS_CONTROL_TAG
130 %token VAR_LOCAL_ZONE_OVERRIDE VAR_ACCESS_CONTROL_TAG_ACTION
131 %token VAR_ACCESS_CONTROL_TAG_DATA VAR_VIEW VAR_ACCESS_CONTROL_VIEW
132 %token VAR_VIEW_FIRST VAR_SERVE_EXPIRED VAR_FAKE_DSA
133 %token VAR_LOG_IDENTITY
130134
131135 %%
132136 toplevelvars: /* empty */ | toplevelvars toplevelvar ;
133137 toplevelvar: serverstart contents_server | stubstart contents_stub |
134138 forwardstart contents_forward | pythonstart contents_py |
135 rcstart contents_rc | dtstart contents_dt
139 rcstart contents_rc | dtstart contents_dt | viewstart
140 contents_view
136141 ;
137142
138143 /* server: declaration */
198203 server_ip_freebind | server_define_tag | server_local_zone_tag |
199204 server_disable_dnssec_lame_check | server_access_control_tag |
200205 server_local_zone_override | server_access_control_tag_action |
201 server_access_control_tag_data
206 server_access_control_tag_data | server_access_control_view |
207 server_qname_minimisation_strict | server_serve_expired |
208 server_fake_dsa | server_log_identity
202209 ;
203210 stubstart: VAR_STUB_ZONE
204211 {
214221 ;
215222 contents_stub: contents_stub content_stub
216223 | ;
217 content_stub: stub_name | stub_host | stub_addr | stub_prime | stub_first
224 content_stub: stub_name | stub_host | stub_addr | stub_prime | stub_first |
225 stub_ssl_upstream
218226 ;
219227 forwardstart: VAR_FORWARD_ZONE
220228 {
230238 ;
231239 contents_forward: contents_forward content_forward
232240 | ;
233 content_forward: forward_name | forward_host | forward_addr | forward_first
241 content_forward: forward_name | forward_host | forward_addr | forward_first |
242 forward_ssl_upstream
243 ;
244 viewstart: VAR_VIEW
245 {
246 struct config_view* s;
247 OUTYY(("\nP(view:)\n"));
248 s = (struct config_view*)calloc(1, sizeof(struct config_view));
249 if(s) {
250 s->next = cfg_parser->cfg->views;
251 if(s->next && !s->next->name)
252 yyerror("view without name");
253 cfg_parser->cfg->views = s;
254 } else
255 yyerror("out of memory");
256 }
257 ;
258 contents_view: contents_view content_view
259 | ;
260 content_view: view_name | view_local_zone | view_local_data | view_first
234261 ;
235262 server_num_threads: VAR_NUM_THREADS STRING_ARG
236263 {
11591186 free($2);
11601187 }
11611188 ;
1189 server_serve_expired: VAR_SERVE_EXPIRED STRING_ARG
1190 {
1191 OUTYY(("P(server_serve_expired:%s)\n", $2));
1192 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1193 yyerror("expected yes or no.");
1194 else cfg_parser->cfg->serve_expired = (strcmp($2, "yes")==0);
1195 free($2);
1196 }
1197 ;
1198 server_fake_dsa: VAR_FAKE_DSA STRING_ARG
1199 {
1200 OUTYY(("P(server_fake_dsa:%s)\n", $2));
1201 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1202 yyerror("expected yes or no.");
1203 else fake_dsa = (strcmp($2, "yes")==0);
1204 if(fake_dsa)
1205 log_warn("test option fake_dsa is enabled");
1206 free($2);
1207 }
1208 ;
11621209 server_val_log_level: VAR_VAL_LOG_LEVEL STRING_ARG
11631210 {
11641211 OUTYY(("P(server_val_log_level:%s)\n", $2));
14211468 }
14221469 }
14231470 ;
1471 server_access_control_view: VAR_ACCESS_CONTROL_VIEW STRING_ARG STRING_ARG
1472 {
1473 OUTYY(("P(server_access_control_view:%s %s)\n", $2, $3));
1474 if(!cfg_str2list_insert(&cfg_parser->cfg->acl_view,
1475 $2, $3)) {
1476 yyerror("out of memory");
1477 free($2);
1478 free($3);
1479 }
1480 }
1481 ;
14241482 server_ratelimit: VAR_RATELIMIT STRING_ARG
14251483 {
14261484 OUTYY(("P(server_ratelimit:%s)\n", $2));
14921550 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
14931551 yyerror("expected yes or no.");
14941552 else cfg_parser->cfg->qname_minimisation =
1553 (strcmp($2, "yes")==0);
1554 free($2);
1555 }
1556 ;
1557 server_qname_minimisation_strict: VAR_QNAME_MINIMISATION_STRICT STRING_ARG
1558 {
1559 OUTYY(("P(server_qname_minimisation_strict:%s)\n", $2));
1560 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1561 yyerror("expected yes or no.");
1562 else cfg_parser->cfg->qname_minimisation_strict =
14951563 (strcmp($2, "yes")==0);
14961564 free($2);
14971565 }
15291597 free($2);
15301598 }
15311599 ;
1600 stub_ssl_upstream: VAR_STUB_SSL_UPSTREAM STRING_ARG
1601 {
1602 OUTYY(("P(stub-ssl-upstream:%s)\n", $2));
1603 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1604 yyerror("expected yes or no.");
1605 else cfg_parser->cfg->stubs->ssl_upstream =
1606 (strcmp($2, "yes")==0);
1607 free($2);
1608 }
1609 ;
15321610 stub_prime: VAR_STUB_PRIME STRING_ARG
15331611 {
15341612 OUTYY(("P(stub-prime:%s)\n", $2));
15691647 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
15701648 yyerror("expected yes or no.");
15711649 else cfg_parser->cfg->forwards->isfirst=(strcmp($2, "yes")==0);
1650 free($2);
1651 }
1652 ;
1653 forward_ssl_upstream: VAR_FORWARD_SSL_UPSTREAM STRING_ARG
1654 {
1655 OUTYY(("P(forward-ssl-upstream:%s)\n", $2));
1656 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1657 yyerror("expected yes or no.");
1658 else cfg_parser->cfg->forwards->ssl_upstream =
1659 (strcmp($2, "yes")==0);
1660 free($2);
1661 }
1662 ;
1663 view_name: VAR_NAME STRING_ARG
1664 {
1665 OUTYY(("P(name:%s)\n", $2));
1666 if(cfg_parser->cfg->views->name)
1667 yyerror("view name override, there must be one "
1668 "name for one view");
1669 free(cfg_parser->cfg->views->name);
1670 cfg_parser->cfg->views->name = $2;
1671 }
1672 ;
1673 view_local_zone: VAR_LOCAL_ZONE STRING_ARG STRING_ARG
1674 {
1675 OUTYY(("P(view_local_zone:%s %s)\n", $2, $3));
1676 if(strcmp($3, "static")!=0 && strcmp($3, "deny")!=0 &&
1677 strcmp($3, "refuse")!=0 && strcmp($3, "redirect")!=0 &&
1678 strcmp($3, "transparent")!=0 && strcmp($3, "nodefault")!=0
1679 && strcmp($3, "typetransparent")!=0
1680 && strcmp($3, "always_transparent")!=0
1681 && strcmp($3, "always_refuse")!=0
1682 && strcmp($3, "always_nxdomain")!=0
1683 && strcmp($3, "inform")!=0 && strcmp($3, "inform_deny")!=0)
1684 yyerror("local-zone type: expected static, deny, "
1685 "refuse, redirect, transparent, "
1686 "typetransparent, inform, inform_deny, "
1687 "always_transparent, always_refuse, "
1688 "always_nxdomain or nodefault");
1689 else if(strcmp($3, "nodefault")==0) {
1690 if(!cfg_strlist_insert(&cfg_parser->cfg->views->
1691 local_zones_nodefault, $2))
1692 fatal_exit("out of memory adding local-zone");
1693 free($3);
1694 } else {
1695 if(!cfg_str2list_insert(
1696 &cfg_parser->cfg->views->local_zones,
1697 $2, $3))
1698 fatal_exit("out of memory adding local-zone");
1699 }
1700 }
1701 ;
1702 view_local_data: VAR_LOCAL_DATA STRING_ARG
1703 {
1704 OUTYY(("P(view_local_data:%s)\n", $2));
1705 if(!cfg_strlist_insert(&cfg_parser->cfg->views->local_data, $2)) {
1706 fatal_exit("out of memory adding local-data");
1707 free($2);
1708 }
1709 }
1710 ;
1711 view_first: VAR_VIEW_FIRST STRING_ARG
1712 {
1713 OUTYY(("P(view-first:%s)\n", $2));
1714 if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0)
1715 yyerror("expected yes or no.");
1716 else cfg_parser->cfg->views->isfirst=(strcmp($2, "yes")==0);
15721717 free($2);
15731718 }
15741719 ;
17871932 (strcmp($2, "yes")==0);
17881933 free($2);
17891934 }
1935 ;
1936 server_log_identity: VAR_LOG_IDENTITY STRING_ARG
1937 {
1938 OUTYY(("P(server_log_identity:%s)\n", $2));
1939 free(cfg_parser->cfg->log_identity);
1940 cfg_parser->cfg->log_identity = $2;
1941 }
1942 ;
17901943 %%
17911944
17921945 /* parse helper routines could be here */
4747 #include "util/regional.h"
4848 #include "util/net_help.h"
4949 #include "sldns/sbuffer.h"
50 #include "services/localzone.h"
5051
5152 /** return code that means the function ran out of memory. negative so it does
5253 * not conflict with DNS rcodes. */
533534 {
534535 int r;
535536 size_t i, setstart;
536 *num_rrs = 0;
537 /* we now allow this function to be called multiple times for the
538 * same section, incrementally updating num_rrs. The caller is
539 * responsible for initializing it (which is the case in the current
540 * implementation). */
541
537542 if(s != LDNS_SECTION_ADDITIONAL) {
538543 if(s == LDNS_SECTION_ANSWER && qtype == LDNS_RR_TYPE_ANY)
539544 dnssec = 1; /* include all types in ANY answer */
580585 insert_query(struct query_info* qinfo, struct compress_tree_node** tree,
581586 sldns_buffer* buffer, struct regional* region)
582587 {
588 uint8_t* qname = qinfo->local_alias ?
589 qinfo->local_alias->rrset->rk.dname : qinfo->qname;
590 size_t qname_len = qinfo->local_alias ?
591 qinfo->local_alias->rrset->rk.dname_len : qinfo->qname_len;
583592 if(sldns_buffer_remaining(buffer) <
584593 qinfo->qname_len+sizeof(uint16_t)*2)
585594 return RETVAL_TRUNC; /* buffer too small */
586595 /* the query is the first name inserted into the tree */
587 if(!compress_tree_store(qinfo->qname,
588 dname_count_labels(qinfo->qname),
596 if(!compress_tree_store(qname, dname_count_labels(qname),
589597 sldns_buffer_position(buffer), region, NULL, tree))
590598 return RETVAL_OUTMEM;
591 if(sldns_buffer_current(buffer) == qinfo->qname)
592 sldns_buffer_skip(buffer, (ssize_t)qinfo->qname_len);
593 else sldns_buffer_write(buffer, qinfo->qname, qinfo->qname_len);
599 if(sldns_buffer_current(buffer) == qname)
600 sldns_buffer_skip(buffer, (ssize_t)qname_len);
601 else sldns_buffer_write(buffer, qname, qname_len);
594602 sldns_buffer_write_u16(buffer, qinfo->qtype);
595603 sldns_buffer_write_u16(buffer, qinfo->qclass);
596604 return RETVAL_OK;
660668 /* roundrobin offset. using query id for random number. With ntohs
661669 * for different roundrobins for sequential id client senders. */
662670 rr_offset = RRSET_ROUNDROBIN?ntohs(id):0;
671
672 /* "prepend" any local alias records in the answer section if this
673 * response is supposed to be authoritative. Currently it should
674 * be a single CNAME record (sanity-checked in worker_handle_request())
675 * but it can be extended if and when we support more variations of
676 * aliases. */
677 if(qinfo->local_alias && (flags & BIT_AA)) {
678 struct reply_info arep;
679 time_t timezero = 0; /* to use the 'authoritative' TTL */
680 memset(&arep, 0, sizeof(arep));
681 arep.flags = rep->flags;
682 arep.an_numrrsets = 1;
683 arep.rrset_count = 1;
684 arep.rrsets = &qinfo->local_alias->rrset;
685 if((r=insert_section(&arep, 1, &ancount, buffer, 0,
686 timezero, region, &tree, LDNS_SECTION_ANSWER,
687 qinfo->qtype, dnssec, rr_offset)) != RETVAL_OK) {
688 if(r == RETVAL_TRUNC) {
689 /* create truncated message */
690 sldns_buffer_write_u16_at(buffer, 6, ancount);
691 LDNS_TC_SET(sldns_buffer_begin(buffer));
692 sldns_buffer_flip(buffer);
693 return 1;
694 }
695 return 0;
696 }
697 }
663698
664699 /* insert answer section */
665700 if((r=insert_section(rep, rep->an_numrrsets, &ancount, buffer,
781816 }
782817 if(secure && (dnssec || (qflags&BIT_AD)))
783818 flags |= BIT_AD;
819 /* restore AA bit if we have a local alias and the response can be
820 * authoritative. Also clear AD bit if set as the local data is the
821 * primary answer. */
822 if(qinf->local_alias &&
823 (FLAGS_GET_RCODE(rep->flags) == LDNS_RCODE_NOERROR ||
824 FLAGS_GET_RCODE(rep->flags) == LDNS_RCODE_NXDOMAIN)) {
825 flags |= BIT_AA;
826 flags &= ~BIT_AD;
827 }
784828 log_assert(flags & BIT_QR); /* QR bit must be on in our replies */
785829 if(udpsize < LDNS_HEADER_SIZE)
786830 return 0;
806850 qinfo_query_encode(sldns_buffer* pkt, struct query_info* qinfo)
807851 {
808852 uint16_t flags = 0; /* QUERY, NOERROR */
853 const uint8_t* qname = qinfo->local_alias ?
854 qinfo->local_alias->rrset->rk.dname : qinfo->qname;
855 size_t qname_len = qinfo->local_alias ?
856 qinfo->local_alias->rrset->rk.dname_len : qinfo->qname_len;
809857 sldns_buffer_clear(pkt);
810858 log_assert(sldns_buffer_remaining(pkt) >= 12+255+4/*max query*/);
811859 sldns_buffer_skip(pkt, 2); /* id done later */
812860 sldns_buffer_write_u16(pkt, flags);
813861 sldns_buffer_write_u16(pkt, 1); /* query count */
814862 sldns_buffer_write(pkt, "\000\000\000\000\000\000", 6); /* counts */
815 sldns_buffer_write(pkt, qinfo->qname, qinfo->qname_len);
863 sldns_buffer_write(pkt, qname, qname_len);
816864 sldns_buffer_write_u16(pkt, qinfo->qtype);
817865 sldns_buffer_write_u16(pkt, qinfo->qclass);
818866 sldns_buffer_flip(pkt);
837885 sldns_buffer_write(buf, &flags, sizeof(uint16_t));
838886 sldns_buffer_write(buf, &flags, sizeof(uint16_t));
839887 if(qinfo) {
840 if(sldns_buffer_current(buf) == qinfo->qname)
841 sldns_buffer_skip(buf, (ssize_t)qinfo->qname_len);
842 else sldns_buffer_write(buf, qinfo->qname, qinfo->qname_len);
888 const uint8_t* qname = qinfo->local_alias ?
889 qinfo->local_alias->rrset->rk.dname : qinfo->qname;
890 size_t qname_len = qinfo->local_alias ?
891 qinfo->local_alias->rrset->rk.dname_len :
892 qinfo->qname_len;
893 if(sldns_buffer_current(buf) == qname)
894 sldns_buffer_skip(buf, (ssize_t)qname_len);
895 else sldns_buffer_write(buf, qname, qname_len);
843896 sldns_buffer_write_u16(buf, qinfo->qtype);
844897 sldns_buffer_write_u16(buf, qinfo->qclass);
845898 }
10711071
10721072 return 0;
10731073 }
1074
1075 void
1076 log_edns_opt_list(enum verbosity_value level, const char* info_str,
1077 struct edns_option* list)
1078 {
1079 if(verbosity >= level && list) {
1080 char str[128], *s;
1081 size_t slen;
1082 verbose(level, "%s", info_str);
1083 while(list) {
1084 s = str;
1085 slen = sizeof(str);
1086 (void)sldns_wire2str_edns_option_print(&s, &slen, list->opt_code,
1087 list->opt_data, list->opt_len);
1088 verbose(level, " %s", str);
1089 list = list->next;
1090 }
1091 }
1092 }
321321 */
322322 void msgparse_bucket_remove(struct msg_parse* msg, struct rrset_parse* rrset);
323323
324 /**
325 * Log the edns options in the edns option list.
326 * @param level: the verbosity level.
327 * @param info_str: the informational string to be printed before the options.
328 * @param list: the edns option list.
329 */
330 void log_edns_opt_list(enum verbosity_value level, const char* info_str,
331 struct edns_option* list);
332
324333 #endif /* UTIL_DATA_MSGPARSE_H */
5151 #include "util/data/msgencode.h"
5252 #include "sldns/sbuffer.h"
5353 #include "sldns/wire2str.h"
54 #include "util/module.h"
55 #include "util/fptr_wlist.h"
5456
5557 /** MAX TTL default for messages and rrsets */
5658 time_t MAX_TTL = 3600 * 24 * 10; /* ten days */
7577 qinf->qname_len = msg->qname_len;
7678 qinf->qtype = msg->qtype;
7779 qinf->qclass = msg->qclass;
80 qinf->local_alias = NULL;
7881 return 1;
7982 }
8083
450453 int ret;
451454
452455 qinf->qname = NULL;
456 qinf->local_alias = NULL;
453457 *rep = NULL;
454458 if(!(msg = regional_alloc(region, sizeof(*msg)))) {
455459 return LDNS_RCODE_SERVFAIL;
541545 return 0; /* need qtype, qclass */
542546 m->qtype = sldns_buffer_read_u16(query);
543547 m->qclass = sldns_buffer_read_u16(query);
548 m->local_alias = NULL;
544549 return 1;
545550 }
546551
870875 opt->next = NULL;
871876 opt->opt_code = code;
872877 opt->opt_len = len;
873 opt->opt_data = regional_alloc_init(region, data, len);
874 if(!opt->opt_data)
875 return 0;
878 opt->opt_data = NULL;
879 if(len > 0) {
880 opt->opt_data = regional_alloc_init(region, data, len);
881 if(!opt->opt_data)
882 return 0;
883 }
876884
877885 /* append at end of list */
878886 prevp = &edns->opt_list;
882890 return 1;
883891 }
884892
885 int edns_opt_inplace_reply(struct edns_data* edns, struct regional* region)
886 {
887 (void)region;
888 /* remove all edns options from the reply, because only the
889 * options that we understand should be in the reply
890 * (sec 6.1.2 RFC 6891) */
891 edns->opt_list = NULL;
893 int edns_opt_list_append(struct edns_option** list, uint16_t code, size_t len,
894 uint8_t* data, struct regional* region)
895 {
896 struct edns_option** prevp;
897 struct edns_option* opt;
898
899 /* allocate new element */
900 opt = (struct edns_option*)regional_alloc(region, sizeof(*opt));
901 if(!opt)
902 return 0;
903 opt->next = NULL;
904 opt->opt_code = code;
905 opt->opt_len = len;
906 opt->opt_data = NULL;
907 if(len > 0) {
908 opt->opt_data = regional_alloc_init(region, data, len);
909 if(!opt->opt_data)
910 return 0;
911 }
912
913 /* append at end of list */
914 prevp = list;
915 while(*prevp != NULL) {
916 prevp = &((*prevp)->next);
917 }
918 *prevp = opt;
919 return 1;
920 }
921
922 int edns_opt_list_remove(struct edns_option** list, uint16_t code)
923 {
924 /* The list should already be allocated in a region. Freeing the
925 * allocated space in a region is not possible. We just unlink the
926 * required elements and they will be freed together with the region. */
927
928 struct edns_option* prev;
929 struct edns_option* curr;
930 if(!list || !(*list)) return 0;
931
932 /* Unlink and repoint if the element(s) are first in list */
933 while(list && *list && (*list)->opt_code == code) {
934 *list = (*list)->next;
935 }
936
937 if(!list || !(*list)) return 1;
938 /* Unlink elements and reattach the list */
939 prev = *list;
940 curr = (*list)->next;
941 while(curr != NULL) {
942 if(curr->opt_code == code) {
943 prev->next = curr->next;
944 curr = curr->next;
945 } else {
946 prev = curr;
947 curr = curr->next;
948 }
949 }
950 return 1;
951 }
952
953 static int inplace_cb_reply_call_generic(
954 struct inplace_cb_reply* callback_list, enum inplace_cb_list_type type,
955 struct query_info* qinfo, struct module_qstate* qstate,
956 struct reply_info* rep, int rcode, struct edns_data* edns,
957 struct regional* region)
958 {
959 struct inplace_cb_reply* cb;
960 struct edns_option* opt_list_out = NULL;
961 if(qstate)
962 opt_list_out = qstate->edns_opts_front_out;
963 for(cb=callback_list; cb; cb=cb->next) {
964 fptr_ok(fptr_whitelist_inplace_cb_reply_generic(cb->cb, type));
965 (void)(*cb->cb)(qinfo, qstate, rep, rcode, edns, &opt_list_out, region,
966 cb->cb_arg);
967 }
968 edns->opt_list = opt_list_out;
969 return 1;
970 }
971
972 int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo,
973 struct module_qstate* qstate, struct reply_info* rep, int rcode,
974 struct edns_data* edns, struct regional* region)
975 {
976 return inplace_cb_reply_call_generic(
977 env->inplace_cb_lists[inplace_cb_reply], inplace_cb_reply, qinfo,
978 qstate, rep, rcode, edns, region);
979 }
980
981 int inplace_cb_reply_cache_call(struct module_env* env,
982 struct query_info* qinfo, struct module_qstate* qstate,
983 struct reply_info* rep, int rcode, struct edns_data* edns,
984 struct regional* region)
985 {
986 return inplace_cb_reply_call_generic(
987 env->inplace_cb_lists[inplace_cb_reply_cache], inplace_cb_reply_cache,
988 qinfo, qstate, rep, rcode, edns, region);
989 }
990
991 int inplace_cb_reply_local_call(struct module_env* env,
992 struct query_info* qinfo, struct module_qstate* qstate,
993 struct reply_info* rep, int rcode, struct edns_data* edns,
994 struct regional* region)
995 {
996 return inplace_cb_reply_call_generic(
997 env->inplace_cb_lists[inplace_cb_reply_local], inplace_cb_reply_local,
998 qinfo, qstate, rep, rcode, edns, region);
999 }
1000
1001 int inplace_cb_reply_servfail_call(struct module_env* env,
1002 struct query_info* qinfo, struct module_qstate* qstate,
1003 struct reply_info* rep, int rcode, struct edns_data* edns,
1004 struct regional* region)
1005 {
1006 /* We are going to servfail. Remove any potential edns options. */
1007 if(qstate)
1008 qstate->edns_opts_front_out = NULL;
1009 return inplace_cb_reply_call_generic(
1010 env->inplace_cb_lists[inplace_cb_reply_servfail],
1011 inplace_cb_reply_servfail, qinfo, qstate, rep, rcode, edns, region);
1012 }
1013
1014 int inplace_cb_query_call(struct module_env* env, struct query_info* qinfo,
1015 uint16_t flags, struct sockaddr_storage* addr, socklen_t addrlen,
1016 uint8_t* zone, size_t zonelen, struct module_qstate* qstate,
1017 struct regional* region)
1018 {
1019 struct inplace_cb_query* cb = env->inplace_cb_lists[inplace_cb_query];
1020 for(; cb; cb=cb->next) {
1021 fptr_ok(fptr_whitelist_inplace_cb_query(cb->cb));
1022 (void)(*cb->cb)(qinfo, flags, qstate, addr, addrlen, zone, zonelen,
1023 region, cb->cb_arg);
1024 }
8921025 return 1;
8931026 }
8941027
9991132 return result;
10001133 }
10011134
1002 struct edns_option* edns_opt_find(struct edns_option* list, uint16_t code)
1135 struct edns_option* edns_opt_list_find(struct edns_option* list, uint16_t code)
10031136 {
10041137 struct edns_option* p;
10051138 for(p=list; p; p=p->next) {
4848 struct iovec;
4949 struct regional;
5050 struct edns_data;
51 struct edns_option;
52 struct inplace_cb_reply;
53 struct inplace_cb_query;
54 struct module_qstate;
55 struct module_env;
5156 struct msg_parse;
5257 struct rrset_parse;
58 struct local_rrset;
5359
5460 /** calculate the prefetch TTL as 90% of original. Calculation
5561 * without numerical overflow (uin32_t) */
7278 uint16_t qtype;
7379 /** qclass, host byte order */
7480 uint16_t qclass;
81 /**
82 * Alias local answer(s) for the qname. If 'qname' is an alias defined
83 * in a local zone, this field will be set to the corresponding local
84 * RRset when the alias is determined.
85 * In the initial implementation this can only be a single CNAME RR
86 * (or NULL), but it could possibly be extended to be a DNAME or a
87 * chain of aliases.
88 * Users of this structure are responsible to initialize this field
89 * to be NULL; otherwise other part of query handling code may be
90 * confused.
91 * Users also have to be careful about the lifetime of data. On return
92 * from local zone lookup, it may point to data derived from
93 * configuration that may be dynamically invalidated or data allocated
94 * in an ephemeral regional allocator. A deep copy of the data may
95 * have to be generated if it has to be kept during iterative
96 * resolution. */
97 struct local_rrset* local_alias;
7598 };
7699
77100 /**
438461
439462 /**
440463 * Append edns option to edns data structure
464 * @param edns: the edns data structure to append the edns option to.
465 * @param region: region to allocate the new edns option.
466 * @param code: the edns option's code.
467 * @param len: the edns option's length.
468 * @param data: the edns option's data.
469 * @return false on failure.
441470 */
442471 int edns_opt_append(struct edns_data* edns, struct regional* region,
443472 uint16_t code, size_t len, uint8_t* data);
473
474 /**
475 * Append edns option to edns option list
476 * @param list: the edns option list to append the edns option to.
477 * @param code: the edns option's code.
478 * @param len: the edns option's length.
479 * @param data: the edns option's data.
480 * @param region: region to allocate the new edns option.
481 * @return false on failure.
482 */
483 int edns_opt_list_append(struct edns_option** list, uint16_t code, size_t len,
484 uint8_t* data, struct regional* region);
485
486 /**
487 * Remove any option found on the edns option list that matches the code.
488 * @param list: the list of edns options.
489 * @param code: the opt code to remove.
490 * @return true when at least one edns option was removed, false otherwise.
491 */
492 int edns_opt_list_remove(struct edns_option** list, uint16_t code);
444493
445494 /**
446495 * Find edns option in edns list
448497 * @param code: opt code to find.
449498 * @return NULL or the edns_option element.
450499 */
451 struct edns_option* edns_opt_find(struct edns_option* list, uint16_t code);
452
453 /**
454 * Transform edns data structure from query structure into reply structure.
455 * In place transform, for errors and cache replies.
456 * @param edns: on input contains the edns from the query. On output contains
457 * the edns for the answer. Add new options to the opt_list to put them
458 * in the answer (allocated in the region, with edns_opt_append).
459 * @param region: to allocate stuff in.
460 * @return false on failure (servfail to client, or for some error encodings,
461 * no EDNS options in the answer).
462 */
463 int edns_opt_inplace_reply(struct edns_data* edns, struct regional* region);
500 struct edns_option* edns_opt_list_find(struct edns_option* list, uint16_t code);
501
502 /**
503 * Call the registered functions in the inplace_cb_reply linked list.
504 * This function is going to get called while answering with a resolved query.
505 * @param env: module environment.
506 * @param qinfo: query info.
507 * @param qstate: module qstate.
508 * @param rep: Reply info. Could be NULL.
509 * @param rcode: return code.
510 * @param edns: edns data of the reply.
511 * @param region: region to store data.
512 * @return false on failure (a callback function returned an error).
513 */
514 int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo,
515 struct module_qstate* qstate, struct reply_info* rep, int rcode,
516 struct edns_data* edns, struct regional* region);
517
518 /**
519 * Call the registered functions in the inplace_cb_reply_cache linked list.
520 * This function is going to get called while answering from cache.
521 * @param env: module environment.
522 * @param qinfo: query info.
523 * @param qstate: module qstate. NULL when replying from cache.
524 * @param rep: Reply info.
525 * @param rcode: return code.
526 * @param edns: edns data of the reply. Edns input can be found here.
527 * @param region: region to store data.
528 * @return false on failure (a callback function returned an error).
529 */
530 int inplace_cb_reply_cache_call(struct module_env* env,
531 struct query_info* qinfo, struct module_qstate* qstate,
532 struct reply_info* rep, int rcode, struct edns_data* edns,
533 struct regional* region);
534
535 /**
536 * Call the registered functions in the inplace_cb_reply_local linked list.
537 * This function is going to get called while answering with local data.
538 * @param env: module environment.
539 * @param qinfo: query info.
540 * @param qstate: module qstate. NULL when replying from cache.
541 * @param rep: Reply info.
542 * @param rcode: return code.
543 * @param edns: edns data of the reply. Edns input can be found here.
544 * @param region: region to store data.
545 * @return false on failure (a callback function returned an error).
546 */
547 int inplace_cb_reply_local_call(struct module_env* env,
548 struct query_info* qinfo, struct module_qstate* qstate,
549 struct reply_info* rep, int rcode, struct edns_data* edns,
550 struct regional* region);
551
552 /**
553 * Call the registered functions in the inplace_cb_reply linked list.
554 * This function is going to get called while answering with a servfail.
555 * @param env: module environment.
556 * @param qinfo: query info.
557 * @param qstate: module qstate. Contains the edns option lists. Could be NULL.
558 * @param rep: Reply info. NULL when servfail.
559 * @param rcode: return code. LDNS_RCODE_SERVFAIL.
560 * @param edns: edns data of the reply. Edns input can be found here if qstate
561 * is NULL.
562 * @param region: region to store data.
563 * @return false on failure (a callback function returned an error).
564 */
565 int inplace_cb_reply_servfail_call(struct module_env* env,
566 struct query_info* qinfo, struct module_qstate* qstate,
567 struct reply_info* rep, int rcode, struct edns_data* edns,
568 struct regional* region);
569
570 /**
571 * Call the registered functions in the inplace_cb_query linked list.
572 * This function is going to get called just before sending a query to a
573 * nameserver.
574 * @param env: module environment.
575 * @param qinfo: query info.
576 * @param flags: flags of the query.
577 * @param addr: to which server to send the query.
578 * @param addrlen: length of addr.
579 * @param zone: name of the zone of the delegation point. wireformat dname.
580 * This is the delegation point name for which the server is deemed
581 * authoritative.
582 * @param zonelen: length of zone.
583 * @param qstate: module qstate.
584 * @param region: region to store data.
585 * @return false on failure (a callback function returned an error).
586 */
587 int inplace_cb_query_call(struct module_env* env, struct query_info* qinfo,
588 uint16_t flags, struct sockaddr_storage* addr, socklen_t addrlen,
589 uint8_t* zone, size_t zonelen, struct module_qstate* qstate,
590 struct regional* region);
464591
465592 /**
466593 * Copy edns option list allocated to the new region
5050 #include "services/localzone.h"
5151 #include "services/cache/infra.h"
5252 #include "services/cache/rrset.h"
53 #include "services/view.h"
5354 #include "dns64/dns64.h"
5455 #include "iterator/iterator.h"
5556 #include "iterator/iter_fwd.h"
202203 else if(fptr == &val_neg_zone_compare) return 1;
203204 else if(fptr == &probetree_cmp) return 1;
204205 else if(fptr == &replay_var_compare) return 1;
206 else if(fptr == &view_cmp) return 1;
205207 return 0;
206208 }
207209
264266 /** whitelist env->send_query callbacks */
265267 int
266268 fptr_whitelist_modenv_send_query(struct outbound_entry* (*fptr)(
267 uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
268 uint16_t flags, int dnssec, int want_dnssec, int nocaps,
269 struct edns_option* opt_list, struct sockaddr_storage* addr,
270 socklen_t addrlen, uint8_t* zone, size_t zonelen,
271 struct module_qstate* q))
269 struct query_info* qinfo, uint16_t flags, int dnssec, int want_dnssec,
270 int nocaps, struct sockaddr_storage* addr, socklen_t addrlen,
271 uint8_t* zone, size_t zonelen, int ssl_upstream, struct module_qstate* q))
272272 {
273273 if(fptr == &worker_send_query) return 1;
274274 else if(fptr == &libworker_send_query) return 1;
431431 else if(fptr == &remote_get_opt_ssl) return 1;
432432 return 0;
433433 }
434
435 int fptr_whitelist_inplace_cb_reply_generic(inplace_cb_reply_func_t* fptr,
436 enum inplace_cb_list_type type)
437 {
438 #ifndef WITH_PYTHONMODULE
439 (void)fptr;
440 #endif
441 if(type == inplace_cb_reply) {
442 #ifdef WITH_PYTHONMODULE
443 if(fptr == &python_inplace_cb_reply_generic) return 1;
444 #endif
445 } else if(type == inplace_cb_reply_cache) {
446 #ifdef WITH_PYTHONMODULE
447 if(fptr == &python_inplace_cb_reply_generic) return 1;
448 #endif
449 } else if(type == inplace_cb_reply_local) {
450 #ifdef WITH_PYTHONMODULE
451 if(fptr == &python_inplace_cb_reply_generic) return 1;
452 #endif
453 } else if(type == inplace_cb_reply_servfail) {
454 #ifdef WITH_PYTHONMODULE
455 if(fptr == &python_inplace_cb_reply_generic) return 1;
456 #endif
457 }
458 return 0;
459 }
460
461 int fptr_whitelist_inplace_cb_query(inplace_cb_query_func_t* ATTR_UNUSED(fptr))
462 {
463 return 0;
464 }
209209 * @return false if not in whitelist.
210210 */
211211 int fptr_whitelist_modenv_send_query(struct outbound_entry* (*fptr)(
212 uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
213 uint16_t flags, int dnssec, int want_dnssec, int nocaps,
214 struct edns_option*, struct sockaddr_storage* addr, socklen_t addrlen,
215 uint8_t* zone, size_t zonelen,
216 struct module_qstate* q));
212 struct query_info* qinfo, uint16_t flags, int dnssec, int want_dnssec,
213 int nocaps, struct sockaddr_storage* addr, socklen_t addrlen,
214 uint8_t* zone, size_t zonelen, int ssl_upstream, struct module_qstate* q));
217215
218216 /**
219217 * Check function pointer whitelist for module_env detach_subs callback values.
333331 * @return false if not in whitelist.
334332 */
335333 int fptr_whitelist_print_func(void (*fptr)(char*,void*));
334
335 /**
336 * Check function pointer whitelist for inplace_cb_reply,
337 * inplace_cb_reply_cache, inplace_cb_reply_local and inplace_cb_reply_servfail
338 * func values.
339 * @param fptr: function pointer to check.
340 * @param type: the type of the callback function.
341 * @return false if not in whitelist.
342 */
343 int fptr_whitelist_inplace_cb_reply_generic(inplace_cb_reply_func_t* fptr,
344 enum inplace_cb_list_type type);
345
346 /**
347 * Check function pointer whitelist for inplace_cb_query func values.
348 * @param fptr: function pointer to check.
349 * @return false if not in whitelist.
350 */
351 int fptr_whitelist_inplace_cb_query(inplace_cb_query_func_t* fptr);
336352
337353 /** Due to module breakage by fptr wlist, these test app declarations
338354 * are presented here */
39613961 4743,
39623962 4744,
39633963 4745,
3964 4746,
39643965 4747,
39653966 4749,
39663967 4750,
39673968 4751,
39683969 4752,
39693970 4753,
3971 4754,
3972 4755,
39703973 4784,
39713974 4785,
39723975 4789,
44974500 6626,
44984501 6627,
44994502 6628,
4503 6629,
45004504 6633,
45014505 6634,
45024506 6635,
48814885 9024,
48824886 9025,
48834887 9026,
4888 9060,
48844889 9080,
48854890 9084,
48864891 9085,
52075212 18463,
52085213 18634,
52095214 18635,
5215 18668,
52105216 18769,
52115217 18881,
52125218 18888,
52145220 19007,
52155221 19191,
52165222 19194,
5223 19220,
52175224 19283,
52185225 19315,
52195226 19398,
53775384 34249,
53785385 34378,
53795386 34379,
5387 34567,
53805388 34962,
53815389 34963,
53825390 34964,
3838
3939 #include "config.h"
4040 #include "util/module.h"
41 #include "sldns/wire2str.h"
4142
4243 const char*
4344 strextstate(enum module_ext_state s)
6869 }
6970 return "bad_event_value";
7071 }
72
73 int
74 edns_known_options_init(struct module_env* env)
75 {
76 env->edns_known_options_num = 0;
77 env->edns_known_options = (struct edns_known_option*)calloc(
78 MAX_KNOWN_EDNS_OPTS, sizeof(struct edns_known_option));
79 if(!env->edns_known_options) return 0;
80 return 1;
81 }
82
83 void
84 edns_known_options_delete(struct module_env* env)
85 {
86 free(env->edns_known_options);
87 env->edns_known_options = NULL;
88 env->edns_known_options_num = 0;
89 }
90
91 int
92 edns_register_option(uint16_t opt_code, int bypass_cache_stage,
93 int no_aggregation, struct module_env* env)
94 {
95 size_t i;
96 if(env->worker) {
97 log_err("invalid edns registration: "
98 "trying to register option after module init phase");
99 return 0;
100 }
101
102 /**
103 * Checking if we are full first is faster but it does not provide
104 * the option to change the flags when the array is full.
105 * It only impacts unbound initialization, leave it for now.
106 */
107 /* Check if the option is already registered. */
108 for(i=0; i<env->edns_known_options_num; i++)
109 if(env->edns_known_options[i].opt_code == opt_code)
110 break;
111 /* If it is not yet registered check if we have space to add a new one. */
112 if(i == env->edns_known_options_num) {
113 if(env->edns_known_options_num >= MAX_KNOWN_EDNS_OPTS) {
114 log_err("invalid edns registration: maximum options reached");
115 return 0;
116 }
117 env->edns_known_options_num++;
118 }
119 env->edns_known_options[i].opt_code = opt_code;
120 env->edns_known_options[i].bypass_cache_stage = bypass_cache_stage;
121 env->edns_known_options[i].no_aggregation = no_aggregation;
122 return 1;
123 }
124
125 static int
126 inplace_cb_reply_register_generic(inplace_cb_reply_func_t* cb,
127 enum inplace_cb_list_type type, void* cb_arg, struct module_env* env)
128 {
129 struct inplace_cb_reply* callback;
130 struct inplace_cb_reply** prevp;
131 if(env->worker) {
132 log_err("invalid edns callback registration: "
133 "trying to register callback after module init phase");
134 return 0;
135 }
136
137 callback = (struct inplace_cb_reply*)calloc(1, sizeof(*callback));
138 if(callback == NULL) {
139 log_err("out of memory during edns callback registration.");
140 return 0;
141 }
142 callback->next = NULL;
143 callback->cb = cb;
144 callback->cb_arg = cb_arg;
145
146 prevp = (struct inplace_cb_reply**) &env->inplace_cb_lists[type];
147 /* append at end of list */
148 while(*prevp != NULL)
149 prevp = &((*prevp)->next);
150 *prevp = callback;
151 return 1;
152 }
153
154 int
155 inplace_cb_reply_register(inplace_cb_reply_func_t* cb, void* cb_arg,
156 struct module_env* env)
157 {
158 return inplace_cb_reply_register_generic(cb, inplace_cb_reply, cb_arg,
159 env);
160 }
161
162 int
163 inplace_cb_reply_cache_register(inplace_cb_reply_func_t* cb, void* cb_arg,
164 struct module_env* env)
165 {
166 return inplace_cb_reply_register_generic(cb, inplace_cb_reply_cache,
167 cb_arg, env);
168 }
169
170 int
171 inplace_cb_reply_local_register(inplace_cb_reply_func_t* cb, void* cb_arg,
172 struct module_env* env)
173 {
174 return inplace_cb_reply_register_generic(cb, inplace_cb_reply_local,
175 cb_arg, env);
176 }
177
178 int
179 inplace_cb_reply_servfail_register(inplace_cb_reply_func_t* cb, void* cb_arg,
180 struct module_env* env)
181 {
182 return inplace_cb_reply_register_generic(cb, inplace_cb_reply_servfail,
183 cb_arg, env);
184 }
185
186 static void
187 inplace_cb_reply_delete_generic(struct module_env* env,
188 enum inplace_cb_list_type type)
189 {
190 struct inplace_cb_reply* curr = env->inplace_cb_lists[type];
191 struct inplace_cb_reply* tmp;
192 /* delete list */
193 while(curr) {
194 tmp = curr->next;
195 free(curr);
196 curr = tmp;
197 }
198 /* update head pointer */
199 env->inplace_cb_lists[type] = NULL;
200 }
201
202 void inplace_cb_reply_delete(struct module_env* env)
203 {
204 inplace_cb_reply_delete_generic(env, inplace_cb_reply);
205 }
206
207 void inplace_cb_reply_cache_delete(struct module_env* env)
208 {
209 inplace_cb_reply_delete_generic(env, inplace_cb_reply_cache);
210 }
211
212 void inplace_cb_reply_servfail_delete(struct module_env* env)
213 {
214 inplace_cb_reply_delete_generic(env, inplace_cb_reply_servfail);
215 }
216
217 int
218 inplace_cb_query_register(inplace_cb_query_func_t* cb, void* cb_arg,
219 struct module_env* env)
220 {
221 struct inplace_cb_query* callback;
222 struct inplace_cb_query** prevp;
223 if(env->worker) {
224 log_err("invalid edns callback registration: "
225 "trying to register callback after module init phase");
226 return 0;
227 }
228
229 callback = (struct inplace_cb_query*)calloc(1, sizeof(*callback));
230 if(callback == NULL) {
231 log_err("out of memory during edns callback registration.");
232 return 0;
233 }
234 callback->next = NULL;
235 callback->cb = cb;
236 callback->cb_arg = cb_arg;
237
238 prevp = (struct inplace_cb_query**)
239 &env->inplace_cb_lists[inplace_cb_query];
240 /* append at end of list */
241 while(*prevp != NULL)
242 prevp = &((*prevp)->next);
243 *prevp = callback;
244 return 1;
245 }
246
247 void
248 inplace_cb_query_delete(struct module_env* env)
249 {
250 struct inplace_cb_query* curr = env->inplace_cb_lists[inplace_cb_query];
251 struct inplace_cb_query* tmp;
252 /* delete list */
253 while(curr) {
254 tmp = curr->next;
255 free(curr);
256 curr = tmp;
257 }
258 /* update head pointer */
259 env->inplace_cb_lists[inplace_cb_query] = NULL;
260 }
261
262 void
263 inplace_cb_lists_delete(struct module_env* env)
264 {
265 inplace_cb_reply_delete(env);
266 inplace_cb_reply_cache_delete(env);
267 inplace_cb_reply_servfail_delete(env);
268 inplace_cb_query_delete(env);
269 }
270
271 struct edns_known_option*
272 edns_option_is_known(uint16_t opt_code, struct module_env* env)
273 {
274 size_t i;
275 for(i=0; i<env->edns_known_options_num; i++)
276 if(env->edns_known_options[i].opt_code == opt_code)
277 return env->edns_known_options + i;
278 return NULL;
279 }
280
281 int
282 edns_bypass_cache_stage(struct edns_option* list, struct module_env* env)
283 {
284 size_t i;
285 for(; list; list=list->next)
286 for(i=0; i<env->edns_known_options_num; i++)
287 if(env->edns_known_options[i].opt_code == list->opt_code &&
288 env->edns_known_options[i].bypass_cache_stage == 1)
289 return 1;
290 return 0;
291 }
292
293 int
294 edns_unique_mesh_state(struct edns_option* list, struct module_env* env)
295 {
296 size_t i;
297 for(; list; list=list->next)
298 for(i=0; i<env->edns_known_options_num; i++)
299 if(env->edns_known_options[i].opt_code == list->opt_code &&
300 env->edns_known_options[i].no_aggregation == 1)
301 return 1;
302 return 0;
303 }
304
305 void
306 log_edns_known_options(enum verbosity_value level, struct module_env* env)
307 {
308 size_t i;
309 char str[32], *s;
310 size_t slen;
311 if(env->edns_known_options_num > 0 && verbosity >= level) {
312 verbose(level, "EDNS known options:");
313 verbose(level, " Code: Bypass_cache_stage: Aggregate_mesh:");
314 for(i=0; i<env->edns_known_options_num; i++) {
315 s = str;
316 slen = sizeof(str);
317 (void)sldns_wire2str_edns_option_code_print(&s, &slen,
318 env->edns_known_options[i].opt_code);
319 verbose(level, " %-8.8s %-19s %-15s", str,
320 env->edns_known_options[i].bypass_cache_stage?"YES":"NO",
321 env->edns_known_options[i].no_aggregation?"NO":"YES");
322 }
323 }
324 }
177177 /** Maximum number of modules in operation */
178178 #define MAX_MODULE 5
179179
180 /** Maximum number of known edns options */
181 #define MAX_KNOWN_EDNS_OPTS 256
182
183 enum inplace_cb_list_type {
184 /* Inplace callbacks for when a resolved reply is ready to be sent to the
185 * front.*/
186 inplace_cb_reply = 0,
187 /* Inplace callbacks for when a reply is given from the cache. */
188 inplace_cb_reply_cache,
189 /* Inplace callbacks for when a reply is given with local data
190 * (or Chaos reply). */
191 inplace_cb_reply_local,
192 /* Inplace callbacks for when the reply is servfail. */
193 inplace_cb_reply_servfail,
194 /* Inplace callbacks for when a query is ready to be sent to the back.*/
195 inplace_cb_query,
196 /* Total number of types. Used for array initialization.
197 * Should always be last. */
198 inplace_cb_types_total
199 };
200
201
202 /** Known edns option. Can be populated during modules' init. */
203 struct edns_known_option {
204 /** type of this edns option */
205 uint16_t opt_code;
206 /** whether the option needs to bypass the cache stage */
207 int bypass_cache_stage;
208 /** whether the option needs mesh aggregation */
209 int no_aggregation;
210 };
211
212 /**
213 * Inplace callback function called before replying.
214 * Called as func(edns, qstate, opt_list_out, qinfo, reply_info, rcode,
215 * region, python_callback)
216 * Where:
217 * qinfo: the query info.
218 * qstate: the module state. NULL when calling before the query reaches the
219 * mesh states.
220 * rep: reply_info. Could be NULL.
221 * rcode: the return code.
222 * edns: the edns_data of the reply. When qstate is NULL, it is also used as
223 * the edns input.
224 * opt_list_out: the edns options list for the reply.
225 * region: region to store data.
226 * python_callback: only used for registering a python callback function.
227 */
228 typedef int inplace_cb_reply_func_t(struct query_info* qinfo,
229 struct module_qstate* qstate, struct reply_info* rep, int rcode,
230 struct edns_data* edns, struct edns_option** opt_list_out,
231 struct regional* region, void* python_callback);
232
233 /**
234 * Inplace callback list of registered routines to be called before replying
235 * with a resolved query.
236 */
237 struct inplace_cb_reply {
238 /** next in list */
239 struct inplace_cb_reply* next;
240 /**
241 * Inplace callback routine for cache stage response.
242 * called as cb(qinfo, qstate, qinfo, reply_info, rcode, edns,
243 * opt_list_out, region, python_callback);
244 * python_callback is only used for registering a python callback function.
245 */
246 inplace_cb_reply_func_t* cb;
247 void* cb_arg;
248 };
249
250 /**
251 * Inplace callback function called before sending the query to a nameserver.
252 * Called as func(qinfo, flags, qstate, addr, addrlen, zone, zonelen, region,
253 * python_callback)
254 * Where:
255 * qinfo: query info.
256 * flags: flags of the query.
257 * qstate: query state.
258 * addr: to which server to send the query.
259 * addrlen: length of addr.
260 * zone: name of the zone of the delegation point. wireformat dname.
261 * This is the delegation point name for which the server is deemed
262 * authoritative.
263 * zonelen: length of zone.
264 * region: region to store data.
265 * python_callback: only used for registering a python callback function.
266 */
267 typedef int inplace_cb_query_func_t(struct query_info* qinfo, uint16_t flags,
268 struct module_qstate* qstate, struct sockaddr_storage* addr,
269 socklen_t addrlen, uint8_t* zone, size_t zonelen, struct regional* region,
270 void* python_callback);
271
272 /**
273 * Inplace callback list of registered routines to be called before quering a
274 * nameserver.
275 */
276 struct inplace_cb_query {
277 /** next in list */
278 struct inplace_cb_query* next;
279 /**
280 * Inplace callback routine for cache stage response.
281 * called as cb(qinfo, flags, qstate, addr, addrlen, zone, zonelen,
282 * region, python_callback);
283 * python_callback is only used for registering a python callback function.
284 */
285 inplace_cb_query_func_t* cb;
286 void* cb_arg;
287 };
288
180289 /**
181290 * Module environment.
182291 * Services and data provided to the module.
201310 * will cause operate() to be called with event timeout or reply.
202311 * The time until a timeout is calculated from roundtrip timing,
203312 * several UDP retries are attempted.
204 * @param qname: query name. (host order)
205 * @param qnamelen: length in bytes of qname, including trailing 0.
206 * @param qtype: query type. (host order)
207 * @param qclass: query class. (host order)
313 * @param qinfo: query info.
208314 * @param flags: host order flags word, with opcode and CD bit.
209315 * @param dnssec: if set, EDNS record will have bits set.
210316 * If EDNS_DO bit is set, DO bit is set in EDNS records.
213319 * EDNS, the answer is likely to be useless for this domain.
214320 * @param nocaps: do not use caps_for_id, use the qname as given.
215321 * (ignored if caps_for_id is disabled).
216 * @param opt_list: set these EDNS options on the outgoing packet.
217 * or NULL if none (the list is deep-copied).
218322 * @param addr: where to.
219323 * @param addrlen: length of addr.
220324 * @param zone: delegation point name.
221325 * @param zonelen: length of zone name.
326 * @param ssl_upstream: use SSL for upstream queries.
222327 * @param q: wich query state to reactivate upon return.
223328 * @return: false on failure (memory or socket related). no query was
224329 * sent. Or returns an outbound entry with qsent and qstate set.
225330 * This outbound_entry will be used on later module invocations
226331 * that involve this query (timeout, error or reply).
227332 */
228 struct outbound_entry* (*send_query)(uint8_t* qname, size_t qnamelen,
229 uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec,
230 int want_dnssec, int nocaps, struct edns_option* opt_list,
333 struct outbound_entry* (*send_query)(struct query_info* qinfo,
334 uint16_t flags, int dnssec, int want_dnssec, int nocaps,
231335 struct sockaddr_storage* addr, socklen_t addrlen,
232 uint8_t* zone, size_t zonelen, struct module_qstate* q);
336 uint8_t* zone, size_t zonelen, int ssl_upstream,
337 struct module_qstate* q);
233338
234339 /**
235340 * Detach-subqueries.
334439 struct iter_hints* hints;
335440 /** module specific data. indexed by module id. */
336441 void* modinfo[MAX_MODULE];
442
443 /* Shared linked list of inplace callback functions */
444 void* inplace_cb_lists[inplace_cb_types_total];
445
446 /**
447 * Shared array of known edns options (size MAX_KNOWN_EDNS_OPTS).
448 * Filled by edns literate modules during init.
449 */
450 struct edns_known_option* edns_known_options;
451 /* Number of known edns options */
452 size_t edns_known_options_num;
337453 };
338454
339455 /**
432548 struct mesh_state* mesh_info;
433549 /** how many seconds before expiry is this prefetched (0 if not) */
434550 time_t prefetch_leeway;
551
552 /** incoming edns options from the front end */
553 struct edns_option* edns_opts_front_in;
554 /** outgoing edns options to the back end */
555 struct edns_option* edns_opts_back_out;
556 /** incoming edns options from the back end */
557 struct edns_option* edns_opts_back_in;
558 /** outgoing edns options to the front end */
559 struct edns_option* edns_opts_front_out;
560 /** whether modules should answer from the cache */
561 int no_cache_lookup;
562 /** whether modules should store answer in the cache */
563 int no_cache_store;
435564 };
436565
437566 /**
521650 */
522651 const char* strmodulevent(enum module_ev e);
523652
653 /**
654 * Initialize the edns known options by allocating the required space.
655 * @param env: the module environment.
656 * @return false on failure (no memory).
657 */
658 int edns_known_options_init(struct module_env* env);
659
660 /**
661 * Free the allocated space for the known edns options.
662 * @param env: the module environment.
663 */
664 void edns_known_options_delete(struct module_env* env);
665
666 /**
667 * Register a known edns option. Overwrite the flags if it is already
668 * registered. Used before creating workers to register known edns options.
669 * @param opt_code: the edns option code.
670 * @param bypass_cache_stage: whether the option interacts with the cache.
671 * @param no_aggregation: whether the option implies more specific
672 * aggregation.
673 * @param env: the module environment.
674 * @return true on success, false on failure (registering more options than
675 * allowed or trying to register after the environment is copied to the
676 * threads.)
677 */
678 int edns_register_option(uint16_t opt_code, int bypass_cache_stage,
679 int no_aggregation, struct module_env* env);
680
681 /**
682 * Register an inplace callback function called before replying with a resolved
683 * query.
684 * @param cb: pointer to the callback function.
685 * @param cb_arg: optional argument for the callback function.
686 * @param env: the module environment.
687 * @return true on success, false on failure (out of memory or trying to
688 * register after the environment is copied to the threads.)
689 */
690 int inplace_cb_reply_register(inplace_cb_reply_func_t* cb, void* cb_arg,
691 struct module_env* env);
692
693 /**
694 * Register an inplace callback function called before replying from the cache.
695 * @param cb: pointer to the callback function.
696 * @param cb_arg: optional argument for the callback function.
697 * @param env: the module environment.
698 * @return true on success, false on failure (out of memory or trying to
699 * register after the environment is copied to the threads.)
700 */
701 int inplace_cb_reply_cache_register(inplace_cb_reply_func_t* cb, void* cb_arg,
702 struct module_env* env);
703
704 /**
705 * Register an inplace callback function called before replying with local
706 * data or Chaos reply.
707 * @param cb: pointer to the callback function.
708 * @param cb_arg: optional argument for the callback function.
709 * @param env: the module environment.
710 * @return true on success, false on failure (out of memory or trying to
711 * register after the environment is copied to the threads.)
712 */
713 int inplace_cb_reply_local_register(inplace_cb_reply_func_t* cb, void* cb_arg,
714 struct module_env* env);
715
716 /**
717 * Register an inplace callback function called before replying with servfail.
718 * @param cb: pointer to the callback function.
719 * @param cb_arg: optional argument for the callback function.
720 * @param env: the module environment.
721 * @return true on success, false on failure (out of memory or trying to
722 * register after the environment is copied to the threads.)
723 */
724 int inplace_cb_reply_servfail_register(inplace_cb_reply_func_t* cb,
725 void* cb_arg, struct module_env* env);
726
727 /**
728 * Delete the inplace_cb_reply callback linked list.
729 * @param env: the module environment.
730 */
731 void inplace_cb_reply_delete(struct module_env* env);
732
733 /**
734 * Delete the inplace_cb_reply_cache callback linked list.
735 * @param env: the module environment.
736 */
737 void inplace_cb_reply_cache_delete(struct module_env* env);
738
739 /**
740 * Delete the inplace_cb_reply_servfail callback linked list.
741 * @param env: the module environment.
742 */
743 void inplace_cb_reply_servfail_delete(struct module_env* env);
744
745 /**
746 * Register an inplace callback function called before quering a nameserver.
747 * @param cb: pointer to the callback function.
748 * @param cb_arg: optional argument for the callback function.
749 * @param env: the module environment.
750 * @return true on success, false on failure (out of memory or trying to
751 * register after the environment is copied to the threads.)
752 */
753 int inplace_cb_query_register(inplace_cb_query_func_t* cb, void* cb_arg,
754 struct module_env* env);
755
756 /**
757 * Delete the inplace_cb_query callback linked list.
758 * @param env: the module environment.
759 */
760 void inplace_cb_query_delete(struct module_env* env);
761
762 /**
763 * Delete all the inplace callback linked lists.
764 * @param env: the module environment.
765 */
766 void inplace_cb_lists_delete(struct module_env* env);
767
768 /**
769 * Check if an edns option is known.
770 * @param opt_code: the edns option code.
771 * @param env: the module environment.
772 * @return pointer to registered option if the edns option is known,
773 * NULL otherwise.
774 */
775 struct edns_known_option* edns_option_is_known(uint16_t opt_code,
776 struct module_env* env);
777
778 /**
779 * Check if an edns option needs to bypass the reply from cache stage.
780 * @param list: the edns options.
781 * @param env: the module environment.
782 * @return true if an edns option needs to bypass the cache stage,
783 * false otherwise.
784 */
785 int edns_bypass_cache_stage(struct edns_option* list,
786 struct module_env* env);
787
788 /**
789 * Check if an edns option needs a unique mesh state.
790 * @param list: the edns options.
791 * @param env: the module environment.
792 * @return true if an edns option needs a unique mesh state,
793 * false otherwise.
794 */
795 int edns_unique_mesh_state(struct edns_option* list, struct module_env* env);
796
797 /**
798 * Log the known edns options.
799 * @param level: the desired verbosity level.
800 * @param env: the module environment.
801 */
802 void log_edns_known_options(enum verbosity_value level,
803 struct module_env* env);
804
524805 #endif /* UTIL_MODULE_H */
23272327 qinfo.qname_len = tp->namelen;
23282328 qinfo.qtype = LDNS_RR_TYPE_DNSKEY;
23292329 qinfo.qclass = tp->dclass;
2330 qinfo.local_alias = NULL;
23302331 log_query_info(VERB_ALGO, "autotrust probe", &qinfo);
23312332 verbose(VERB_ALGO, "retry probe set in %d seconds",
23322333 (int)tp->autr->next_probe_time - (int)*env->now);
10061006 qinfo.qname = qname;
10071007 qinfo.qtype = LDNS_RR_TYPE_DLV;
10081008 qinfo.qclass = qclass;
1009 qinfo.local_alias = NULL;
10091010 if(!nsec_proves_nodata(nsec, &qinfo, &wc) &&
10101011 !val_nsec_proves_name_error(nsec, qname)) {
10111012 /* the NSEC is not a denial for the DLV */
342342 } else {
343343 /* See if the next owner name covers a wildcard
344344 * empty non-terminal. */
345 while (dname_strict_subdomain_c(nm, nsec->rk.dname)) {
345 while (dname_canonical_compare(nsec->rk.dname, nm) < 0) {
346346 /* wildcard does not apply if qname below
347347 * the name that exists under the '*' */
348348 if (dname_subdomain_c(qinfo->qname, nm))
11791179 nsec3_has_type(rrset, rr, LDNS_RR_TYPE_NS) &&
11801180 !nsec3_has_type(rrset, rr, LDNS_RR_TYPE_SOA)) {
11811181 verbose(VERB_ALGO, "nsec3 nodata proof: matching "
1182 "wilcard is a delegation, bogus");
1182 "wildcard is a delegation, bogus");
11831183 return sec_status_bogus;
11841184 }
11851185 /* everything is peachy keen, except for optout spans */
7171 #include <openssl/engine.h>
7272 #endif
7373
74 /** fake DSA support for unit tests */
75 int fake_dsa = 0;
76
7477 /* return size of digest if supported, or 0 otherwise */
7578 size_t
7679 nsec3_hash_algo_size_supported(int id)
191194 case LDNS_RSAMD5:
192195 /* RFC 6725 deprecates RSAMD5 */
193196 return 0;
194 #ifdef USE_DSA
195197 case LDNS_DSA:
196198 case LDNS_DSA_NSEC3:
199 #ifdef USE_DSA
200 return 1;
201 #else
202 if(fake_dsa) return 1;
203 return 0;
197204 #endif
198205 case LDNS_RSASHA1:
199206 case LDNS_RSASHA1_NSEC3:
263270 dsasig = DSA_SIG_new();
264271 if(!dsasig) return 0;
265272
273 #ifdef HAVE_DSA_SIG_SET0
274 if(!DSA_SIG_set0(dsasig, R, S)) return 0;
275 #else
266276 dsasig->r = R;
267277 dsasig->s = S;
278 #endif
268279 *sig = NULL;
269280 newlen = i2d_DSA_SIG(dsasig, sig);
270281 if(newlen < 0) {
405416 "EVP_PKEY_assign_DSA failed");
406417 return 0;
407418 }
419 #ifdef HAVE_EVP_DSS1
408420 *digest_type = EVP_dss1();
421 #else
422 *digest_type = EVP_sha1();
423 #endif
409424
410425 break;
411426 #endif /* USE_DSA */
544559 EVP_MD_CTX* ctx;
545560 int res, dofree = 0, docrypto_free = 0;
546561 EVP_PKEY *evp_key = NULL;
562
563 #ifndef USE_DSA
564 if((algo == LDNS_DSA || algo == LDNS_DSA_NSEC3) && fake_dsa)
565 return sec_status_secure;
566 #endif
547567
548568 if(!setup_key_digest(algo, &evp_key, &digest_type, key, keylen)) {
549569 verbose(VERB_QUERY, "verify: failed to setup key");
12901290 */
12911291 if(MIN_TTL > (time_t)origttl && d->ttl > MIN_TTL) {
12921292 verbose(VERB_QUERY, "rrset TTL larger than original and minimum"
1293 " TTL, adjusting TTL downwards to mimimum ttl");
1293 " TTL, adjusting TTL downwards to minimum ttl");
12941294 d->ttl = MIN_TTL;
12951295 }
12961296 else if(MIN_TTL <= origttl && d->ttl > (time_t)origttl) {
218218 {
219219 size_t i;
220220
221 if(subtype == VAL_CLASS_POSITIVE || subtype == VAL_CLASS_ANY) {
221 if(subtype == VAL_CLASS_POSITIVE) {
222222 /* check for the answer rrset */
223223 for(i=skip; i<rep->an_numrrsets; i++) {
224224 if(query_dname_compare(qinf->qname,
270270 signer_name, signer_len, &matchcount);
271271 }
272272 }
273 } else if(subtype == VAL_CLASS_ANY) {
274 /* check for one of the answer rrset that has signatures,
275 * or potentially a DNAME is in use with a different qname */
276 for(i=skip; i<rep->an_numrrsets; i++) {
277 if(query_dname_compare(qinf->qname,
278 rep->rrsets[i]->rk.dname) == 0) {
279 val_find_rrset_signer(rep->rrsets[i],
280 signer_name, signer_len);
281 if(*signer_name)
282 return;
283 }
284 }
285 /* no answer RRSIGs with qname, try a DNAME */
286 if(skip < rep->an_numrrsets &&
287 ntohs(rep->rrsets[skip]->rk.type) ==
288 LDNS_RR_TYPE_DNAME) {
289 val_find_rrset_signer(rep->rrsets[skip],
290 signer_name, signer_len);
291 if(*signer_name)
292 return;
293 }
294 *signer_name = NULL;
295 *signer_len = 0;
273296 } else if(subtype == VAL_CLASS_REFERRAL) {
274297 /* find keys for the item at skip */
275298 if(skip < rep->rrset_count) {
11141137 qinfo.qname_len = nmlen;
11151138 qinfo.qtype = LDNS_RR_TYPE_DS;
11161139 qinfo.qclass = c;
1140 qinfo.local_alias = NULL;
11171141 /* do not add SOA to reply message, it is going to be used internal */
11181142 msg = val_neg_getmsg(env->neg_cache, &qinfo, region, env->rrset_cache,
11191143 env->scratch_buffer, *env->now, 0, topname);
180180 log_err("validator: could not apply configuration settings.");
181181 return 0;
182182 }
183
183184 return 1;
184185 }
185186
376377 ask.qname_len = namelen;
377378 ask.qtype = qtype;
378379 ask.qclass = qclass;
380 ask.local_alias = NULL;
379381 log_query_info(VERB_ALGO, "generate request", &ask);
380382 fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
381383 /* enable valrec flag to avoid recursion to the same validation
20862088 }
20872089
20882090 /* store results in cache */
2089 if(qstate->query_flags&BIT_RD) {
2091 if(!qstate->no_cache_store && qstate->query_flags&BIT_RD) {
20902092 /* if secure, this will override cache anyway, no need
20912093 * to check if from parentNS */
20922094 if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
22792281 (void)outbound;
22802282 if(event == module_event_new ||
22812283 (event == module_event_pass && vq == NULL)) {
2284
22822285 /* pass request to next module, to get it */
22832286 verbose(VERB_ALGO, "validator: pass to next module");
22842287 qstate->ext_state[id] = module_wait_module;
22872290 if(event == module_event_moddone) {
22882291 /* check if validation is needed */
22892292 verbose(VERB_ALGO, "validator: nextmodule returned");
2293
22902294 if(!needs_validation(qstate, qstate->return_rcode,
22912295 qstate->return_msg)) {
22922296 /* no need to validate this */