diff --git a/.gitignore b/.gitignore index f4527fd812ebea125cd1e252419e24e6946e77f4..22fedf0d76152c127c7ebb91421399c88fd13651 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,11 @@ *.lo *.o /.libs/ +/.source /Makefile /autom4te.cache/ /config.h +/config.h.in~ /config.log /config.status /dnstap/dnstap_config.h @@ -18,6 +20,7 @@ /doc/unbound.conf.5 /libtool /libunbound.la +/_unbound.la /smallapp/unbound-control-setup.sh /unbound /unbound-anchor @@ -39,4 +42,14 @@ /contrib/libunbound.pc /contrib/unbound.service /contrib/unbound.socket - +/dnstap/dnstap.pb-c.c +/dnstap/dnstap.pb-c.h +/libunbound/python/libunbound_wrap.c +/libunbound/python/unbound.py +/pythonmod/interface.h +/pythonmod/unboundmodule.py +/testdata/result.* +/testdata/.done-* +/testdata/.perfstats.txt +/doc/html +/doc/xml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..45a7cb1535012caa3424cc6228e83cfef4ab7a73 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +sudo: false +language: c +compiler: + - gcc +addons: + apt: + packages: + - libssl-dev + - libevent-dev + - libexpat-dev + - clang +script: + - ./configure --enable-debug --disable-flto + - make + - make test + - (cd testdata/clang-analysis.tdir; bash clang-analysis.test) diff --git a/Makefile.in b/Makefile.in index 1f035725dd285b9177b7b21350211d253b89c022..1a2e2c5481697e6962181193a852f4931d5ba549 100644 --- a/Makefile.in +++ b/Makefile.in @@ -126,7 +126,7 @@ validator/val_sigcrypt.c validator/val_utils.c dns64/dns64.c \ edns-subnet/edns-subnet.c edns-subnet/subnetmod.c \ edns-subnet/addrtree.c edns-subnet/subnet-whitelist.c \ cachedb/cachedb.c cachedb/redis.c respip/respip.c $(CHECKLOCK_SRC) \ -$(DNSTAP_SRC) $(DNSCRYPT_SRC) $(IPSECMOD_SRC) +$(DNSTAP_SRC) $(DNSCRYPT_SRC) $(IPSECMOD_SRC) $(IPSET_SRC) COMMON_OBJ_WITHOUT_NETCALL=dns.lo infra.lo rrset.lo dname.lo msgencode.lo \ as112.lo msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ @@ -139,7 +139,7 @@ autotrust.lo val_anchor.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo cachedb.lo redis.lo authzone.lo \ $(SUBNET_OBJ) $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) $(DNSTAP_OBJ) $(DNSCRYPT_OBJ) \ -$(IPSECMOD_OBJ) respip.lo +$(IPSECMOD_OBJ) $(IPSET_OBJ) respip.lo COMMON_OBJ_WITHOUT_UB_EVENT=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo COMMON_OBJ=$(COMMON_OBJ_WITHOUT_UB_EVENT) ub_event.lo @@ -148,7 +148,7 @@ COMMON_OBJ_ALL_SYMBOLS=@COMMON_OBJ_ALL_SYMBOLS@ COMPAT_SRC=compat/ctime_r.c compat/fake-rfc2553.c compat/gmtime_r.c \ compat/inet_aton.c compat/inet_ntop.c compat/inet_pton.c compat/malloc.c \ compat/memcmp.c compat/memmove.c compat/snprintf.c compat/strlcat.c \ -compat/strlcpy.c compat/strptime.c compat/getentropy_linux.c \ +compat/strlcpy.c compat/strptime.c compat/getentropy_freebsd.c compat/getentropy_linux.c \ compat/getentropy_osx.c compat/getentropy_solaris.c compat/getentropy_win.c \ compat/explicit_bzero.c compat/arc4random.c compat/arc4random_uniform.c \ compat/arc4_lock.c compat/sha512.c compat/reallocarray.c compat/isblank.c \ @@ -160,6 +160,7 @@ SLDNS_SRC=sldns/keyraw.c sldns/sbuffer.c sldns/wire2str.c sldns/parse.c \ sldns/parseutil.c sldns/rrdef.c sldns/str2wire.c SLDNS_OBJ=keyraw.lo sbuffer.lo wire2str.lo parse.lo parseutil.lo rrdef.lo \ str2wire.lo +SLDNS_ALLOCCHECK_EXTRA_OBJ=@SLDNS_ALLOCCHECK_EXTRA_OBJ@ UNITTEST_SRC=testcode/unitanchor.c testcode/unitdname.c \ testcode/unitlruhash.c testcode/unitmain.c testcode/unitmsgparse.c \ testcode/unitneg.c testcode/unitregional.c testcode/unitslabhash.c \ @@ -187,11 +188,11 @@ CONTROL_OBJ_LINK=$(CONTROL_OBJ) worker_cb.lo $(COMMON_OBJ_ALL_SYMBOLS) \ $(SLDNS_OBJ) $(COMPAT_OBJ) @WIN_CONTROL_OBJ_LINK@ HOST_SRC=smallapp/unbound-host.c HOST_OBJ=unbound-host.lo -HOST_OBJ_LINK=$(HOST_OBJ) $(SLDNS_OBJ) $(COMPAT_OBJ_WITHOUT_CTIMEARC4) @WIN_HOST_OBJ_LINK@ +HOST_OBJ_LINK=$(HOST_OBJ) $(SLDNS_OBJ) $(COMPAT_OBJ_WITHOUT_CTIMEARC4) $(SLDNS_ALLOCCHECK_EXTRA_OBJ) @WIN_HOST_OBJ_LINK@ UBANCHOR_SRC=smallapp/unbound-anchor.c UBANCHOR_OBJ=unbound-anchor.lo UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) parseutil.lo \ -$(COMPAT_OBJ_WITHOUT_CTIME) @WIN_UBANCHOR_OBJ_LINK@ +$(COMPAT_OBJ_WITHOUT_CTIME) $(SLDNS_ALLOCCHECK_EXTRA_OBJ) @WIN_UBANCHOR_OBJ_LINK@ TESTBOUND_SRC=testcode/testbound.c testcode/testpkts.c \ daemon/worker.c daemon/acl_list.c \ daemon/daemon.c daemon/stats.c \ @@ -217,7 +218,7 @@ MEMSTATS_OBJ_LINK=$(MEMSTATS_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) \ $(SLDNS_OBJ) ASYNCLOOK_SRC=testcode/asynclook.c ASYNCLOOK_OBJ=asynclook.lo -ASYNCLOOK_OBJ_LINK=$(ASYNCLOOK_OBJ) log.lo locks.lo $(COMPAT_OBJ) +ASYNCLOOK_OBJ_LINK=$(ASYNCLOOK_OBJ) log.lo locks.lo $(COMPAT_OBJ) @ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ@ STREAMTCP_SRC=testcode/streamtcp.c STREAMTCP_OBJ=streamtcp.lo STREAMTCP_OBJ_LINK=$(STREAMTCP_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) \ @@ -229,6 +230,8 @@ DELAYER_SRC=testcode/delayer.c DELAYER_OBJ=delayer.lo DELAYER_OBJ_LINK=$(DELAYER_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) \ $(SLDNS_OBJ) +IPSET_SRC=@IPSET_SRC@ +IPSET_OBJ=@IPSET_OBJ@ LIBUNBOUND_SRC=libunbound/context.c libunbound/libunbound.c \ libunbound/libworker.c LIBUNBOUND_OBJ=context.lo libunbound.lo libworker.lo ub_event_pluggable.lo @@ -256,8 +259,9 @@ ALL_SRC=$(COMMON_SRC) $(UNITTEST_SRC) $(DAEMON_SRC) \ $(MEMSTATS_SRC) $(CHECKCONF_SRC) $(LIBUNBOUND_SRC) $(HOST_SRC) \ $(ASYNCLOOK_SRC) $(STREAMTCP_SRC) $(PERF_SRC) $(DELAYER_SRC) \ $(CONTROL_SRC) $(UBANCHOR_SRC) $(PETAL_SRC) \ - $(PYTHONMOD_SRC) $(PYUNBOUND_SRC) $(WIN_DAEMON_THE_SRC)\ + $(PYTHONMOD_SRC) $(PYUNBOUND_SRC) $(WIN_DAEMON_THE_SRC) \ $(SVCINST_SRC) $(SVCUNINST_SRC) $(ANCHORUPD_SRC) $(SLDNS_SRC) + ALL_OBJ=$(COMMON_OBJ) $(UNITTEST_OBJ) $(DAEMON_OBJ) \ $(TESTBOUND_OBJ) $(LOCKVERIFY_OBJ) $(PKTVIEW_OBJ) \ $(MEMSTATS_OBJ) $(CHECKCONF_OBJ) $(LIBUNBOUND_OBJ) $(HOST_OBJ) \ @@ -452,14 +456,19 @@ clean: rm -f _unbound.la libunbound/python/libunbound_wrap.c libunbound/python/unbound.py pythonmod/interface.h pythonmod/unboundmodule.py rm -rf autom4te.cache .libs build doc/html doc/xml -realclean: clean - rm -f config.status config.log config.h.in config.h - rm -f configure config.sub config.guess ltmain.sh aclocal.m4 libtool - rm -f util/configlexer.c util/configparser.c util/configparser.h - rm -f doc/example.conf doc/libunbound.3 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound-control.8 doc/unbound.8 doc/unbound.conf.5 +distclean: clean + rm -f config.status config.log config.h + rm -f doc/example.conf doc/libunbound.3 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound-control.8 doc/unbound.8 doc/unbound.conf.5 doc/unbound-host.1 + rm -f smallapp/unbound-control-setup.sh dnstap/dnstap_config.h dnscrypt/dnscrypt_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service rm -f $(TEST_BIN) rm -f Makefile +maintainer-clean: distclean + rm -f util/configlexer.c util/configparser.c util/configparser.h + +realclean: maintainer-clean + rm -f configure config.h.in config.sub config.guess ltmain.sh aclocal.m4 libtool + .SUFFIXES: .lint .c.lint: $(LINT) $(LINTFLAGS) -I. -I$(srcdir) $< @@ -635,15 +644,17 @@ depend: # Dependencies dns.lo dns.o: $(srcdir)/services/cache/dns.c config.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ - $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/validator/val_utils.h $(srcdir)/sldns/pkthdr.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h $(srcdir)/validator/val_nsec.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/sldns/pkthdr.h $(srcdir)/services/cache/dns.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h infra.lo infra.o: $(srcdir)/services/cache/infra.c config.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lookup3.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/iterator/iterator.h \ $(srcdir)/services/outbound_list.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ @@ -670,11 +681,11 @@ msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h $(srcdir)/util/d msgreply.lo msgreply.o: $(srcdir)/util/data/msgreply.c config.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/util/module.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h \ + $(srcdir)/util/module.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h packed_rrset.lo packed_rrset.o: $(srcdir)/util/data/packed_rrset.c config.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h \ @@ -688,11 +699,11 @@ iterator.lo iterator.o: $(srcdir)/iterator/iterator.c config.h $(srcdir)/iterato $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_scrub.h $(srcdir)/iterator/iter_priv.h \ $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h \ - $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/data/msgencode.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/random.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/parseutil.h \ - $(srcdir)/sldns/sbuffer.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/services/authzone.h \ + $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/random.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/sbuffer.h iter_delegpt.lo iter_delegpt.o: $(srcdir)/iterator/iter_delegpt.c config.h $(srcdir)/iterator/iter_delegpt.h \ $(srcdir)/util/log.h $(srcdir)/services/cache/dns.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/regional.h \ @@ -734,18 +745,19 @@ iter_utils.lo iter_utils.o: $(srcdir)/iterator/iter_utils.c config.h $(srcdir)/i $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/iterator/iter_donotq.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_priv.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/validator/val_anchor.h \ - $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_utils.h \ - $(srcdir)/validator/val_sigcrypt.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h $(srcdir)/util/random.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ + $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/str2wire.h listen_dnsport.lo listen_dnsport.o: $(srcdir)/services/listen_dnsport.c config.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \ - $(srcdir)/sldns/sbuffer.h $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/sldns/sbuffer.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/services/modstack.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h $(srcdir)/services/localzone.h \ @@ -755,15 +767,16 @@ localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h $(srcdir)/serv $(srcdir)/sldns/rrdef.h $(srcdir)/services/view.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/data/msgencode.h $(srcdir)/util/net_help.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/as112.h + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/as112.h mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ - $(srcdir)/util/data/msgencode.h $(srcdir)/util/timehist.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h $(srcdir)/util/edns.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/dns.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/regional.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/timehist.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h $(srcdir)/util/edns.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/sldns/wire2str.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/services/view.h $(srcdir)/util/data/dname.h $(srcdir)/respip/respip.h \ $(srcdir)/services/listen_dnsport.h @@ -771,11 +784,13 @@ modstack.lo modstack.o: $(srcdir)/services/modstack.c config.h $(srcdir)/service $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h $(srcdir)/iterator/iterator.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h \ - $(srcdir)/respip/respip.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/services/view.h $(PYTHONMOD_HEADER) $(srcdir)/ipsecmod/ipsecmod.h + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/respip/respip.h $(srcdir)/services/localzone.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(PYTHONMOD_HEADER) $(srcdir)/ipsecmod/ipsecmod.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/edns-subnet/addrtree.h $(srcdir)/edns-subnet/edns-subnet.h \ + $(srcdir)/ipset/ipset.h view.lo view.o: $(srcdir)/services/view.c config.h $(srcdir)/services/view.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \ @@ -784,32 +799,33 @@ view.lo view.o: $(srcdir)/services/view.c config.h $(srcdir)/services/view.h $(s outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h outside_network.lo outside_network.o: $(srcdir)/services/outside_network.c config.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/iterator/iterator.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/listen_dnsport.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rtt.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgencode.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/dnstap/dnstap.h \ alloc.lo alloc.o: $(srcdir)/util/alloc.c config.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/regional.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h config_file.lo config_file.o: $(srcdir)/util/config_file.c config.h $(srcdir)/util/log.h \ $(srcdir)/util/configyyrename.h $(srcdir)/util/config_file.h util/configparser.h \ $(srcdir)/util/net_help.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/regional.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/modstack.h $(srcdir)/util/data/dname.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/util/iana_ports.inc configlexer.lo configlexer.o: util/configlexer.c config.h $(srcdir)/util/configyyrename.h \ @@ -821,7 +837,7 @@ shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/ut $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h \ $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/services/mesh.h \ $(srcdir)/util/rbtree.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ @@ -830,21 +846,21 @@ shm_main.lo shm_main.o: $(srcdir)/util/shm_side/shm_main.c config.h $(srcdir)/ut $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h authzone.lo authzone.o: $(srcdir)/services/authzone.c config.h $(srcdir)/services/authzone.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/random.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/services/outside_network.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/services/modstack.h $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h \ + $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/util/random.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/services/outside_network.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h \ $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/keyraw.h \ $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_secalgo.h fptr_wlist.lo fptr_wlist.o: $(srcdir)/util/fptr_wlist.c config.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ $(srcdir)/services/outside_network.h $(srcdir)/services/localzone.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h $(srcdir)/services/authzone.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h \ @@ -855,26 +871,23 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/util/fptr_wlist.c config.h $(srcdir)/util/ $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h \ $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/unbound-event.h \ $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h $(srcdir)/respip/respip.h \ - $(PYTHONMOD_HEADER) $(srcdir)/ipsecmod/ipsecmod.h + $(PYTHONMOD_HEADER) $(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/edns-subnet/subnetmod.h $(srcdir)/util/net_help.h \ + $(srcdir)/edns-subnet/addrtree.h $(srcdir)/edns-subnet/edns-subnet.h $(srcdir)/ipset/ipset.h locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h -mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/log.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h module.lo module.o: $(srcdir)/util/module.c config.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/ub_event.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/tcp_conn_limit.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ - $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/dnstap/dnstap.h \ - $(srcdir)/services/listen_dnsport.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/ub_event.h $(srcdir)/util/net_help.h $(srcdir)/util/tcp_conn_limit.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/services/listen_dnsport.h \ net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/module.h \ @@ -885,10 +898,10 @@ net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h $(srcdir)/util/net_he random.lo random.o: $(srcdir)/util/random.c config.h $(srcdir)/util/random.h $(srcdir)/util/log.h rbtree.lo rbtree.o: $(srcdir)/util/rbtree.c config.h $(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h regional.lo regional.o: $(srcdir)/util/regional.c config.h $(srcdir)/util/log.h $(srcdir)/util/regional.h rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h $(srcdir)/iterator/iterator.h \ $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ @@ -896,19 +909,19 @@ rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h $(srcdir)/itera $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h edns.lo edns.o: $(srcdir)/util/edns.c config.h $(srcdir)/util/edns.h $(srcdir)/util/config_file.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/regional.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h dnstree.lo dnstree.o: $(srcdir)/util/storage/dnstree.c config.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/net_help.h lookup3.lo lookup3.o: $(srcdir)/util/storage/lookup3.c config.h $(srcdir)/util/storage/lookup3.h lruhash.lo lruhash.o: $(srcdir)/util/storage/lruhash.c config.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h slabhash.lo slabhash.o: $(srcdir)/util/storage/slabhash.c config.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h tcp_conn_limit.lo tcp_conn_limit.o: $(srcdir)/util/tcp_conn_limit.c config.h $(srcdir)/util/regional.h \ @@ -920,20 +933,22 @@ tcp_conn_limit.lo tcp_conn_limit.o: $(srcdir)/util/tcp_conn_limit.c config.h $(s timehist.lo timehist.o: $(srcdir)/util/timehist.c config.h $(srcdir)/util/timehist.h $(srcdir)/util/log.h tube.lo tube.o: $(srcdir)/util/tube.c config.h $(srcdir)/util/tube.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h $(srcdir)/util/ub_event.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/ub_event.h ub_event.lo ub_event.o: $(srcdir)/util/ub_event.c config.h $(srcdir)/util/ub_event.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/tube.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/tube.h \ + ub_event_pluggable.lo ub_event_pluggable.o: $(srcdir)/util/ub_event_pluggable.c config.h $(srcdir)/util/ub_event.h \ $(srcdir)/libunbound/unbound-event.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/modstack.h \ + winsock_event.lo winsock_event.o: $(srcdir)/util/winsock_event.c config.h autotrust.lo autotrust.o: $(srcdir)/validator/autotrust.c config.h $(srcdir)/validator/autotrust.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ @@ -942,9 +957,9 @@ autotrust.lo autotrust.o: $(srcdir)/validator/autotrust.c config.h $(srcdir)/val $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/services/mesh.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/services/modstack.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/validator/val_kcache.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h \ - $(srcdir)/sldns/keyraw.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/services/modstack.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/validator/val_kcache.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/keyraw.h \ val_anchor.lo val_anchor.o: $(srcdir)/validator/val_anchor.c config.h $(srcdir)/validator/val_anchor.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_sigcrypt.h \ @@ -962,7 +977,7 @@ validator.lo validator.o: $(srcdir)/validator/validator.c config.h $(srcdir)/val $(srcdir)/validator/autotrust.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ $(srcdir)/services/modstack.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h val_kcache.lo val_kcache.o: $(srcdir)/validator/val_kcache.c config.h $(srcdir)/validator/val_kcache.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ @@ -1022,9 +1037,9 @@ dns64.lo dns64.o: $(srcdir)/dns64/dns64.c config.h $(srcdir)/dns64/dns64.h $(src $(srcdir)/sldns/rrdef.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/data/dname.h \ - $(srcdir)/sldns/str2wire.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/data/dname.h $(srcdir)/sldns/str2wire.h edns-subnet.lo edns-subnet.o: $(srcdir)/edns-subnet/edns-subnet.c config.h subnetmod.lo subnetmod.o: $(srcdir)/edns-subnet/subnetmod.c config.h addrtree.lo addrtree.o: $(srcdir)/edns-subnet/addrtree.c config.h $(srcdir)/util/log.h \ @@ -1040,31 +1055,34 @@ respip.lo respip.o: $(srcdir)/respip/respip.c config.h $(srcdir)/services/localz $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/services/view.h \ $(srcdir)/services/cache/dns.h $(srcdir)/sldns/str2wire.h $(srcdir)/util/config_file.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/respip/respip.h checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/testcode/checklocks.h dnstap.lo dnstap.o: $(srcdir)/dnstap/dnstap.c config.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/locks.h $(srcdir)/dnstap/dnstap.h \ dnstap/dnstap.pb-c.h dnstap.pb-c.lo dnstap.pb-c.o: dnstap/dnstap.pb-c.c dnstap/dnstap.pb-c.h \ -ipsecmod.lo ipsecmod.o: $(srcdir)/ipsecmod/ipsecmod.c config.h $(srcdir)/ipsecmod/ipsecmod.h \ - $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/rbtree.h $(srcdir)/ipsecmod/ipsecmod-whitelist.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/config_file.h $(srcdir)/services/cache/dns.h $(srcdir)/sldns/wire2str.h +dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/storage/lookup3.h +ipsecmod.lo ipsecmod.o: $(srcdir)/ipsecmod/ipsecmod.c config.h ipsecmod-whitelist.lo ipsecmod-whitelist.o: $(srcdir)/ipsecmod/ipsecmod-whitelist.c config.h \ $(srcdir)/ipsecmod/ipsecmod.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/rbtree.h \ $(srcdir)/ipsecmod/ipsecmod-whitelist.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/regional.h \ $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/sldns/str2wire.h +ipset.lo ipset.o: $(srcdir)/ipset/ipset.c config.h $(srcdir)/ipset/ipset.h $(srcdir)/util/module.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/testcode/unitmain.h \ $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h @@ -1075,14 +1093,13 @@ unitlruhash.lo unitlruhash.o: $(srcdir)/testcode/unitlruhash.c config.h $(srcdir $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ - $(srcdir)/util/log.h \ - $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/util/rtt.h $(srcdir)/util/timehist.h $(srcdir)/iterator/iterator.h \ $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/sldns/pkthdr.h $(srcdir)/libunbound/unbound.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/random.h $(srcdir)/respip/respip.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/random.h $(srcdir)/respip/respip.h \ $(srcdir)/services/localzone.h $(srcdir)/services/view.h unitmsgparse.lo unitmsgparse.o: $(srcdir)/testcode/unitmsgparse.c config.h $(srcdir)/util/log.h \ $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h \ @@ -1117,11 +1134,12 @@ unitldns.lo unitldns.o: $(srcdir)/testcode/unitldns.c config.h $(srcdir)/util/lo unitecs.lo unitecs.o: $(srcdir)/testcode/unitecs.c config.h unitauth.lo unitauth.o: $(srcdir)/testcode/unitauth.c config.h $(srcdir)/services/authzone.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h \ - $(srcdir)/testcode/unitmain.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/sbuffer.h + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/services/modstack.h $(srcdir)/testcode/unitmain.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/services/cache/dns.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/sbuffer.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \ @@ -1132,24 +1150,24 @@ cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h \ $(srcdir)/daemon/cachedump.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h \ - $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h \ - $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/sldns/wire2str.h \ - $(srcdir)/sldns/str2wire.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/alloc.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/util/module.h \ + $(srcdir)/dnstap/dnstap.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h \ + $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h \ $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h \ $(srcdir)/util/config_file.h $(srcdir)/util/shm_side/shm_main.h $(srcdir)/util/storage/lookup3.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/tcp_conn_limit.h $(srcdir)/services/listen_dnsport.h \ @@ -1161,51 +1179,53 @@ remote.lo remote.o: $(srcdir)/daemon/remote.c config.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ - $(srcdir)/services/modstack.h $(srcdir)/daemon/cachedump.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \ - $(srcdir)/services/view.h $(srcdir)/services/authzone.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ - $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h \ - $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_anchor.h \ - $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ - $(srcdir)/iterator/iter_hints.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/services/outside_network.h \ - $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ + $(srcdir)/libunbound/unbound.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ + $(srcdir)/daemon/cachedump.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h \ + $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h $(srcdir)/services/view.h $(srcdir)/services/authzone.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/iterator/iter_delegpt.h \ + $(srcdir)/services/outside_network.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/sldns/wire2str.h stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ - $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/outside_network.h $(srcdir)/services/listen_dnsport.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h \ - $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/util/rtt.h $(srcdir)/services/authzone.h $(srcdir)/validator/val_kcache.h \ - $(srcdir)/validator/val_neg.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/util/config_file.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h \ + $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ + $(srcdir)/services/authzone.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_neg.h \ unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h $(srcdir)/util/log.h $(srcdir)/daemon/daemon.h \ $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/remote.h \ $(srcdir)/util/config_file.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/ub_event.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ - $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ + $(srcdir)/libunbound/unbound.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ + $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h \ $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h \ @@ -1218,16 +1238,15 @@ worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(sr $(srcdir)/libunbound/libworker.h $(srcdir)/sldns/wire2str.h $(srcdir)/util/shm_side/shm_main.h testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/testcode/testpkts.h \ $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h \ - $(srcdir)/daemon/remote.h \ - $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/util/log.h \ - $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/util/rtt.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h $(srcdir)/daemon/remote.h \ + $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/daemon/daemon.h \ + $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/services/listen_dnsport.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcode/testpkts.h \ $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h @@ -1235,10 +1254,11 @@ worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(sr $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ - $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ + $(srcdir)/libunbound/unbound.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ + $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h \ $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h \ @@ -1260,9 +1280,9 @@ daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ $(srcdir)/daemon/worker.h \ $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h \ $(srcdir)/util/config_file.h $(srcdir)/util/shm_side/shm_main.h $(srcdir)/util/storage/lookup3.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/tcp_conn_limit.h $(srcdir)/services/listen_dnsport.h \ @@ -1273,36 +1293,38 @@ stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(s $(srcdir)/libunbound/unbound.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ - $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ - $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/outside_network.h $(srcdir)/services/listen_dnsport.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h \ - $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/util/rtt.h $(srcdir)/services/authzone.h $(srcdir)/validator/val_kcache.h \ - $(srcdir)/validator/val_neg.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/util/config_file.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h \ + $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ + $(srcdir)/services/authzone.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_neg.h \ replay.lo replay.o: $(srcdir)/testcode/replay.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/testcode/testpkts.h $(srcdir)/util/rbtree.h \ - $(srcdir)/testcode/fake_event.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h \ + $(srcdir)/testcode/testpkts.h $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/rrdef.h fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/testcode/fake_event.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/config_file.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h \ - $(srcdir)/util/rbtree.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ - $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/config_file.h $(srcdir)/services/listen_dnsport.h \ + $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ + $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h lock_verify.lo lock_verify.o: $(srcdir)/testcode/lock_verify.c config.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ - $(srcdir)/services/modstack.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h pktview.lo pktview.o: $(srcdir)/testcode/pktview.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/testcode/unitmain.h $(srcdir)/testcode/readhex.h $(srcdir)/sldns/sbuffer.h \ @@ -1311,10 +1333,10 @@ readhex.lo readhex.o: $(srcdir)/testcode/readhex.c config.h $(srcdir)/testcode/r $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h memstats.lo memstats.o: $(srcdir)/testcode/memstats.c config.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ - $(srcdir)/services/modstack.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h unbound-checkconf.lo unbound-checkconf.o: $(srcdir)/smallapp/unbound-checkconf.c config.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ @@ -1323,16 +1345,16 @@ unbound-checkconf.lo unbound-checkconf.o: $(srcdir)/smallapp/unbound-checkconf.c $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/services/localzone.h \ $(srcdir)/services/view.h $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h \ - $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/services/modstack.h \ - $(srcdir)/respip/respip.h $(srcdir)/sldns/sbuffer.h $(PYTHONMOD_HEADER) + $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/dnscrypt/cert.h \ + $(srcdir)/services/modstack.h $(srcdir)/respip/respip.h $(srcdir)/sldns/sbuffer.h worker_cb.lo worker_cb.o: $(srcdir)/smallapp/worker_cb.c config.h $(srcdir)/libunbound/context.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/unbound-event.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h context.lo context.o: $(srcdir)/libunbound/context.c config.h $(srcdir)/libunbound/context.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/unbound-event.h $(srcdir)/util/data/packed_rrset.h \ @@ -1341,8 +1363,8 @@ context.lo context.o: $(srcdir)/libunbound/context.c config.h $(srcdir)/libunbou $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/services/view.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h \ - $(srcdir)/sldns/sbuffer.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/services/authzone.h \ + $(srcdir)/services/mesh.h $(srcdir)/sldns/sbuffer.h libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/unbound-event.h config.h $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1352,7 +1374,7 @@ libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbou $(srcdir)/util/random.h $(srcdir)/util/net_help.h $(srcdir)/util/tube.h $(srcdir)/util/ub_event.h \ $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/services/cache/rrset.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h \ $(srcdir)/sldns/sbuffer.h libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h \ @@ -1361,14 +1383,15 @@ libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h \ $(srcdir)/services/modstack.h $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/unbound-event.h \ $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/services/outside_network.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h $(srcdir)/services/view.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/services/authzone.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/regional.h \ - $(srcdir)/util/random.h $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h \ - $(srcdir)/iterator/iter_hints.h $(srcdir)/sldns/str2wire.h + $(srcdir)/dnscrypt/cert.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/services/view.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/services/authzone.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/sldns/str2wire.h unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h \ @@ -1402,18 +1425,17 @@ pythonmod_utils.lo pythonmod_utils.o: $(srcdir)/pythonmod/pythonmod_utils.c conf $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/net_help.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/regional.h \ - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/sldns/sbuffer.h \ - + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/net_help.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/regional.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/sldns/sbuffer.h win_svc.lo win_svc.o: $(srcdir)/winrc/win_svc.c config.h $(srcdir)/winrc/win_svc.h $(srcdir)/winrc/w_inst.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h \ $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ - $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ + $(srcdir)/dnscrypt/cert.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/util/config_file.h $(srcdir)/util/ub_event.h $(srcdir)/util/net_help.h w_inst.lo w_inst.o: $(srcdir)/winrc/w_inst.c config.h $(srcdir)/winrc/w_inst.h $(srcdir)/winrc/win_svc.h unbound-service-install.lo unbound-service-install.o: $(srcdir)/winrc/unbound-service-install.c config.h \ @@ -1429,7 +1451,7 @@ sbuffer.lo sbuffer.o: $(srcdir)/sldns/sbuffer.c config.h $(srcdir)/sldns/sbuffer wire2str.lo wire2str.o: $(srcdir)/sldns/wire2str.c config.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/sldns/keyraw.h \ - + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h parse.lo parse.o: $(srcdir)/sldns/parse.c config.h $(srcdir)/sldns/parse.h $(srcdir)/sldns/parseutil.h \ $(srcdir)/sldns/sbuffer.h parseutil.lo parseutil.o: $(srcdir)/sldns/parseutil.c config.h $(srcdir)/sldns/parseutil.h @@ -1449,9 +1471,10 @@ snprintf.lo snprintf.o: $(srcdir)/compat/snprintf.c config.h strlcat.lo strlcat.o: $(srcdir)/compat/strlcat.c config.h strlcpy.lo strlcpy.o: $(srcdir)/compat/strlcpy.c config.h strptime.lo strptime.o: $(srcdir)/compat/strptime.c config.h +getentropy_freebsd.lo getentropy_freebsd.o: $(srcdir)/compat/getentropy_freebsd.c getentropy_linux.lo getentropy_linux.o: $(srcdir)/compat/getentropy_linux.c config.h \ -getentropy_osx.lo getentropy_osx.o: $(srcdir)/compat/getentropy_osx.c config.h +getentropy_osx.lo getentropy_osx.o: $(srcdir)/compat/getentropy_osx.c getentropy_solaris.lo getentropy_solaris.o: $(srcdir)/compat/getentropy_solaris.c config.h \ getentropy_win.lo getentropy_win.o: $(srcdir)/compat/getentropy_win.c diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ee6e4f4885a80ee092f193909e4a134223812844 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# Unbound + +[![Travis Build Status](https://travis-ci.org/NLnetLabs/unbound.svg?branch=master)](https://travis-ci.org/NLnetLabs/unbound) +[![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) +[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) + +Unbound is a validating, recursive, caching DNS resolver. It is designed to be +fast and lean and incorporates modern features based on open standards. If you +have any feedback, we would love to hear from you. Don’t hesitate to +[create an issue on Github](https://github.com/NLnetLabs/unbound/issues/new) +or post a message on the [Unbound mailing list](https://nlnetlabs.nl/mailman/listinfo/unbound-users). +You can lean more about Unbound by reading our +[documentation](https://nlnetlabs.nl/documentation/unbound/). + +## Compiling + +Make sure you have the C toolchain, OpenSSL and its include files, and libexpat +installed. Unbound can be compiled and installed using: + +``` +./configure && make && make install +``` + +You can use libevent if you want. libevent is useful when using many (10000) +outgoing ports. By default max 256 ports are opened at the same time and the +builtin alternative is equally capable and a little faster. + +Use the `--with-libevent=dir` configure option to compile Unbound with libevent +support. + +## Unbound configuration + +All of Unbound's configuration options are described in the man pages, which +will be installed and are available on the Unbound +[documentation page](https://nlnetlabs.nl/documentation/unbound/). + +An example configuration file is located in +[doc/example.conf](https://github.com/NLnetLabs/unbound/blob/master/doc/example.conf.in). diff --git a/aclocal.m4 b/aclocal.m4 index dd1b8658c7b8eb63af903ac6aadc383d774fc17b..181e25817a7e32fcd5eb945371c62369ad125f2f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -736,7 +736,6 @@ _LT_CONFIG_SAVE_COMMANDS([ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. @@ -2873,9 +2872,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # before this can be enabled. hardcode_into_libs=yes - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -2884,7 +2880,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -2896,6 +2892,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -3555,7 +3563,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -4433,7 +4441,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4945,6 +4953,9 @@ m4_if([$1], [CXX], [ ;; esac ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -5007,6 +5018,9 @@ dnl Note also adjust exclude_expsyms for C++ above. openbsd* | bitrig*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -5261,7 +5275,7 @@ _LT_EOF fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -5782,6 +5796,7 @@ _LT_EOF if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi + _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -5803,7 +5818,7 @@ _LT_EOF esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -9044,9 +9059,9 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 11 (pkg-config-0.29.1) - +dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +dnl serial 11 (pkg-config-0.29.1) +dnl dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl @@ -9320,77 +9335,9 @@ AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR -dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, -dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], -dnl [DESCRIPTION], [DEFAULT]) -dnl ------------------------------------------ -dnl -dnl Prepare a "--with-" configure option using the lowercase -dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and -dnl PKG_CHECK_MODULES in a single macro. -AC_DEFUN([PKG_WITH_MODULES], -[ -m4_pushdef([with_arg], m4_tolower([$1])) - -m4_pushdef([description], - [m4_default([$5], [build with ]with_arg[ support])]) - -m4_pushdef([def_arg], [m4_default([$6], [auto])]) -m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) -m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) - -m4_case(def_arg, - [yes],[m4_pushdef([with_without], [--without-]with_arg)], - [m4_pushdef([with_without],[--with-]with_arg)]) - -AC_ARG_WITH(with_arg, - AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, - [AS_TR_SH([with_]with_arg)=def_arg]) - -AS_CASE([$AS_TR_SH([with_]with_arg)], - [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], - [auto],[PKG_CHECK_MODULES([$1],[$2], - [m4_n([def_action_if_found]) $3], - [m4_n([def_action_if_not_found]) $4])]) - -m4_popdef([with_arg]) -m4_popdef([description]) -m4_popdef([def_arg]) - -])dnl PKG_WITH_MODULES - -dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, -dnl [DESCRIPTION], [DEFAULT]) -dnl ----------------------------------------------- -dnl -dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES -dnl check._[VARIABLE-PREFIX] is exported as make variable. -AC_DEFUN([PKG_HAVE_WITH_MODULES], -[ -PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) - -AM_CONDITIONAL([HAVE_][$1], - [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) -])dnl PKG_HAVE_WITH_MODULES - -dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, -dnl [DESCRIPTION], [DEFAULT]) -dnl ------------------------------------------------------ -dnl -dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after -dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make -dnl and preprocessor variable. -AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], -[ -PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) - -AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], - [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) -])dnl PKG_HAVE_DEFINE_WITH_MODULES - # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9421,7 +9368,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/cachedb/cachedb.c b/cachedb/cachedb.c index 5a179a2bb419b2524819eab68e9ef46d6b26dbd2..d5cd8dc553b8c6c2a8db277675a5a00e891507d4 100644 --- a/cachedb/cachedb.c +++ b/cachedb/cachedb.c @@ -72,6 +72,19 @@ # define be64toh(x) OSSwapBigToHostInt64(x) #endif +/* Some compilers do not define __BYTE_ORDER__, like IBM XLC on AIX */ +#ifndef be64toh +#if defined(__sun) || defined(_AIX) +# if __BIG_ENDIAN__ +# define be64toh(n) (n) +# define htobe64(n) (n) +# else +# define be64toh(n) (((uint64_t)htonl((n) & 0xFFFFFFFF) << 32) | htonl((n) >> 32)) +# define htobe64(n) (((uint64_t)htonl((n) & 0xFFFFFFFF) << 32) | htonl((n) >> 32)) +# endif +#endif +#endif /* be64toh */ + /** the unit test testframe for cachedb, its module state contains * a cache for a couple queries (in memory). */ struct testframe_moddata { @@ -231,6 +244,8 @@ cachedb_init(struct module_env* env, int id) env->modinfo[id] = (void*)cachedb_env; if(!cachedb_apply_cfg(cachedb_env, env->cfg)) { log_err("cachedb: could not apply configuration settings."); + free(cachedb_env); + env->modinfo[id] = NULL; return 0; } /* see if a backend is selected */ @@ -239,6 +254,8 @@ cachedb_init(struct module_env* env, int id) if(!(*cachedb_env->backend->init)(env, cachedb_env)) { log_err("cachedb: could not init %s backend", cachedb_env->backend->name); + free(cachedb_env); + env->modinfo[id] = NULL; return 0; } cachedb_env->enabled = 1; @@ -336,7 +353,11 @@ calc_hash(struct module_qstate* qstate, char* buf, size_t len) /* hash the buffer */ secalgo_hash_sha256(clear, clen, hash); +#ifdef HAVE_EXPLICIT_BZERO + explicit_bzero(clear, clen); +#else memset(clear, 0, clen); +#endif /* hex encode output for portability (some online dbs need * no nulls, no control characters, and so on) */ diff --git a/compat/getentropy_freebsd.c b/compat/getentropy_freebsd.c new file mode 100644 index 0000000000000000000000000000000000000000..30cd68e97d6a32c3555f57784f05b9d7a16b28fe --- /dev/null +++ b/compat/getentropy_freebsd.c @@ -0,0 +1,62 @@ +/* $OpenBSD: getentropy_freebsd.c,v 1.3 2016/08/07 03:27:21 tb Exp $ */ + +/* + * Copyright (c) 2014 Pawel Jakub Dawidek + * Copyright (c) 2014 Brent Cook + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Emulation of getentropy(2) as documented at: + * http://man.openbsd.org/getentropy.2 + */ + +#include +#include + +#include +#include + +/* + * Derived from lib/libc/gen/arc4random.c from FreeBSD. + */ +static size_t +getentropy_sysctl(u_char *buf, size_t size) +{ + int mib[2]; + size_t len, done; + + mib[0] = CTL_KERN; + mib[1] = KERN_ARND; + done = 0; + + do { + len = size; + if (sysctl(mib, 2, buf, &len, NULL, 0) == -1) + return (done); + done += len; + buf += len; + size -= len; + } while (size > 0); + + return (done); +} + +int +getentropy(void *buf, size_t len) +{ + if (len <= 256 && getentropy_sysctl(buf, len) == len) + return (0); + + errno = EIO; + return (-1); +} diff --git a/compat/getentropy_linux.c b/compat/getentropy_linux.c index b86c0fba2a1f9205c282d66e6ca07c9b25f8cdd2..82cdb78b80474b9e77351f37bc6c4d276ec5d82b 100644 --- a/compat/getentropy_linux.c +++ b/compat/getentropy_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_linux.c,v 1.20 2014/07/12 15:43:49 beck Exp $ */ +/* $OpenBSD: getentropy_linux.c,v 1.46 2018/11/20 08:04:28 deraadt Exp $ */ /* * Copyright (c) 2014 Theo de Raadt @@ -15,20 +15,23 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Emulation of getentropy(2) as documented at: + * http://man.openbsd.org/getentropy.2 */ -#include "config.h" +#include "config.h" /* -#define _POSIX_C_SOURCE 199309L -#define _GNU_SOURCE 1 +#define _POSIX_C_SOURCE 199309L +#define _GNU_SOURCE 1 */ #include #include #include #include #include -#ifdef HAVE_SYS_SYSCTL_H -#include +#ifdef SYS__sysctl +#include #endif #include #include @@ -39,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -46,16 +50,18 @@ #include #include #include - -#if defined(HAVE_SSL) +#ifndef HAVE_NETTLE #include -#elif defined(HAVE_NETTLE) +#else #include +#define SHA512_CTX struct sha512_ctx +#define SHA512_Init(x) sha512_init(x) +#define SHA512_Update(x, b, s) sha512_update(x, s, b) +#define SHA512_Final(r, c) sha512_digest(c, SHA512_DIGEST_SIZE, r) #endif #include #include -#include #ifdef HAVE_GETAUXVAL #include #endif @@ -75,29 +81,13 @@ HD(b); \ } while (0) -#if defined(HAVE_SSL) -#define CRYPTO_SHA512_CTX SHA512_CTX -#define CRYPTO_SHA512_INIT(x) SHA512_Init(x) -#define CRYPTO_SHA512_FINAL(r, c) SHA512_Final(r, c) #define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l))) #define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x))) #define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*))) -#elif defined(HAVE_NETTLE) -#define CRYPTO_SHA512_CTX struct sha512_ctx -#define CRYPTO_SHA512_INIT(x) sha512_init(x) -#define CRYPTO_SHA512_FINAL(r, c) sha512_digest(c, SHA512_DIGEST_SIZE, r) -#define HR(x, l) (sha512_update(&ctx, (l), (uint8_t *)(x))) -#define HD(x) (sha512_update(&ctx, sizeof (x), (uint8_t *)&(x))) -#define HF(x) (sha512_update(&ctx, sizeof (void*), (uint8_t *)&(x))) -#endif int getentropy(void *buf, size_t len); -#ifdef CAN_REFERENCE_MAIN -extern int main(int, char *argv[]); -#endif -static int gotdata(char *buf, size_t len); -#if defined(SYS_getrandom) && defined(__NR_getrandom) +#if defined(SYS_getrandom) && defined(GRND_NONBLOCK) static int getentropy_getrandom(void *buf, size_t len); #endif static int getentropy_urandom(void *buf, size_t len); @@ -105,6 +95,7 @@ static int getentropy_urandom(void *buf, size_t len); static int getentropy_sysctl(void *buf, size_t len); #endif static int getentropy_fallback(void *buf, size_t len); +static int getentropy_phdr(struct dl_phdr_info *info, size_t size, void *data); int getentropy(void *buf, size_t len) @@ -113,18 +104,21 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } -#if defined(SYS_getrandom) && defined(__NR_getrandom) +#if defined(SYS_getrandom) && defined(GRND_NONBLOCK) /* - * Try descriptor-less getrandom() + * Try descriptor-less getrandom(), in non-blocking mode. + * + * The design of Linux getrandom is broken. It has an + * uninitialized phase coupled with blocking behaviour, which + * is unacceptable from within a library at boot time without + * possible recovery. See http://bugs.python.org/issue26839#msg267745 */ ret = getentropy_getrandom(buf, len); if (ret != -1) return (ret); - if (errno != ENOSYS) - return (-1); #endif /* @@ -178,7 +172,7 @@ getentropy(void *buf, size_t len) * - Do the best under the circumstances.... * * This code path exists to bring light to the issue that Linux - * does not provide a failsafe API for entropy collection. + * still does not provide a failsafe API for entropy collection. * * We hope this demonstrates that Linux should either retain their * sysctl ABI, or consider providing a new failsafe API which @@ -196,23 +190,7 @@ getentropy(void *buf, size_t len) return (ret); } -/* - * Basic sanity checking; wish we could do better. - */ -static int -gotdata(char *buf, size_t len) -{ - char any_set = 0; - size_t i; - - for (i = 0; i < len; ++i) - any_set |= buf[i]; - if (any_set == 0) - return -1; - return 0; -} - -#if defined(SYS_getrandom) && defined(__NR_getrandom) +#if defined(SYS_getrandom) && defined(GRND_NONBLOCK) static int getentropy_getrandom(void *buf, size_t len) { @@ -221,7 +199,7 @@ getentropy_getrandom(void *buf, size_t len) if (len > 256) return (-1); do { - ret = syscall(SYS_getrandom, buf, len, 0); + ret = syscall(SYS_getrandom, buf, len, GRND_NONBLOCK); } while (ret == -1 && errno == EINTR); if (ret != (int)len) @@ -269,7 +247,7 @@ start: } for (i = 0; i < len; ) { size_t wanted = len - i; - ssize_t ret = read(fd, (char*)buf + i, wanted); + ssize_t ret = read(fd, (char *)buf + i, wanted); if (ret == -1) { if (errno == EAGAIN || errno == EINTR) @@ -280,13 +258,11 @@ start: i += ret; } close(fd); - if (gotdata(buf, len) == 0) { - errno = save_errno; - return 0; /* satisfied */ - } + errno = save_errno; + return (0); /* satisfied */ nodevrandom: errno = EIO; - return -1; + return (-1); } #ifdef SYS__sysctl @@ -311,17 +287,15 @@ getentropy_sysctl(void *buf, size_t len) goto sysctlfailed; i += chunk; } - if (gotdata(buf, len) == 0) { - errno = save_errno; - return (0); /* satisfied */ - } + errno = save_errno; + return (0); /* satisfied */ sysctlfailed: errno = EIO; - return -1; + return (-1); } #endif /* SYS__sysctl */ -static int cl[] = { +static const int cl[] = { CLOCK_REALTIME, #ifdef CLOCK_MONOTONIC CLOCK_MONOTONIC, @@ -346,6 +320,15 @@ static int cl[] = { #endif }; +static int +getentropy_phdr(struct dl_phdr_info *info, size_t ATTR_UNUSED(size), void *data) +{ + SHA512_CTX *ctx = data; + + SHA512_Update(ctx, &info->dlpi_addr, sizeof (info->dlpi_addr)); + return (0); +} + static int getentropy_fallback(void *buf, size_t len) { @@ -357,7 +340,7 @@ getentropy_fallback(void *buf, size_t len) struct rusage ru; sigset_t sigset; struct stat st; - CRYPTO_SHA512_CTX ctx; + SHA512_CTX ctx; static pid_t lastpid; pid_t pid; size_t i, ii, m; @@ -374,7 +357,7 @@ getentropy_fallback(void *buf, size_t len) } for (i = 0; i < len; ) { int j; - CRYPTO_SHA512_INIT(&ctx); + SHA512_Init(&ctx); for (j = 0; j < repeat; j++) { HX((e = gettimeofday(&tv, NULL)) == -1, tv); if (e != -1) { @@ -382,6 +365,8 @@ getentropy_fallback(void *buf, size_t len) cnt += (int)tv.tv_usec; } + dl_iterate_phdr(getentropy_phdr, &ctx); + for (ii = 0; ii < sizeof(cl)/sizeof(cl[0]); ii++) HX(clock_gettime(cl[ii], &ts) == -1, ts); @@ -401,9 +386,6 @@ getentropy_fallback(void *buf, size_t len) HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1, sigset); -#ifdef CAN_REFERENCE_MAIN - HF(main); /* an addr in program */ -#endif HF(getentropy); /* an addr in this library */ HF(printf); /* an addr in libc */ p = (char *)&p; @@ -528,33 +510,30 @@ getentropy_fallback(void *buf, size_t len) HD(cnt); } #ifdef HAVE_GETAUXVAL -# ifdef AT_RANDOM +#ifdef AT_RANDOM /* Not as random as you think but we take what we are given */ p = (char *) getauxval(AT_RANDOM); if (p) HR(p, 16); -# endif -# ifdef AT_SYSINFO_EHDR +#endif +#ifdef AT_SYSINFO_EHDR p = (char *) getauxval(AT_SYSINFO_EHDR); if (p) HR(p, pgs); -# endif -# ifdef AT_BASE +#endif +#ifdef AT_BASE p = (char *) getauxval(AT_BASE); if (p) HD(p); -# endif -#endif /* HAVE_GETAUXVAL */ +#endif +#endif - CRYPTO_SHA512_FINAL(results, &ctx); - memcpy((char*)buf + i, results, min(sizeof(results), len - i)); + SHA512_Final(results, &ctx); + memcpy((char *)buf + i, results, min(sizeof(results), len - i)); i += min(sizeof(results), len - i); } - memset(results, 0, sizeof results); - if (gotdata(buf, len) == 0) { - errno = save_errno; - return 0; /* satisfied */ - } - errno = EIO; - return -1; + explicit_bzero(&ctx, sizeof ctx); + explicit_bzero(results, sizeof results); + errno = save_errno; + return (0); /* satisfied */ } diff --git a/compat/getentropy_osx.c b/compat/getentropy_osx.c index d5a64ab363abcd0031678e484e0e31769aa54bcd..26dcc824dee72bcef9f3c01aaa4b09b95e5eed53 100644 --- a/compat/getentropy_osx.c +++ b/compat/getentropy_osx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_osx.c,v 1.3 2014/07/12 14:48:00 deraadt Exp $ */ +/* $OpenBSD: getentropy_osx.c,v 1.12 2018/11/20 08:04:28 deraadt Exp $ */ /* * Copyright (c) 2014 Theo de Raadt @@ -15,9 +15,12 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Emulation of getentropy(2) as documented at: + * http://man.openbsd.org/getentropy.2 */ -#include "config.h" +#include #include #include #include @@ -43,14 +46,18 @@ #include #include #include +#if TARGET_OS_OSX #include #include +#endif #include #include +#if TARGET_OS_OSX #include #include #include #include +#endif #include #define SHA512_Update(a, b, c) (CC_SHA512_Update((a), (b), (c))) #define SHA512_Init(xxx) (CC_SHA512_Init((xxx))) @@ -75,10 +82,6 @@ int getentropy(void *buf, size_t len); -#ifdef CAN_REFERENCE_MAIN -extern int main(int, char *argv[]); -#endif -static int gotdata(char *buf, size_t len); static int getentropy_urandom(void *buf, size_t len); static int getentropy_fallback(void *buf, size_t len); @@ -89,7 +92,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } /* @@ -138,22 +141,6 @@ getentropy(void *buf, size_t len) return (ret); } -/* - * Basic sanity checking; wish we could do better. - */ -static int -gotdata(char *buf, size_t len) -{ - char any_set = 0; - size_t i; - - for (i = 0; i < len; ++i) - any_set |= buf[i]; - if (any_set == 0) - return -1; - return 0; -} - static int getentropy_urandom(void *buf, size_t len) { @@ -188,7 +175,7 @@ start: } for (i = 0; i < len; ) { size_t wanted = len - i; - ssize_t ret = read(fd, (char*)buf + i, wanted); + ssize_t ret = read(fd, (char *)buf + i, wanted); if (ret == -1) { if (errno == EAGAIN || errno == EINTR) @@ -199,18 +186,18 @@ start: i += ret; } close(fd); - if (gotdata(buf, len) == 0) { - errno = save_errno; - return 0; /* satisfied */ - } + errno = save_errno; + return (0); /* satisfied */ nodevrandom: errno = EIO; - return -1; + return (-1); } +#if TARGET_OS_OSX static int tcpmib[] = { CTL_NET, AF_INET, IPPROTO_TCP, TCPCTL_STATS }; static int udpmib[] = { CTL_NET, AF_INET, IPPROTO_UDP, UDPCTL_STATS }; static int ipmib[] = { CTL_NET, AF_INET, IPPROTO_IP, IPCTL_STATS }; +#endif static int kmib[] = { CTL_KERN, KERN_USRSTACK }; static int hwmib[] = { CTL_HW, HW_USERMEM }; @@ -230,9 +217,11 @@ getentropy_fallback(void *buf, size_t len) pid_t pid; size_t i, ii, m; char *p; +#if TARGET_OS_OSX struct tcpstat tcpstat; struct udpstat udpstat; struct ipstat ipstat; +#endif u_int64_t mach_time; unsigned int idata; void *addr; @@ -267,6 +256,7 @@ getentropy_fallback(void *buf, size_t len) HX(sysctl(hwmib, sizeof(hwmib) / sizeof(hwmib[0]), &idata, &ii, NULL, 0) == -1, idata); +#if TARGET_OS_OSX ii = sizeof(tcpstat); HX(sysctl(tcpmib, sizeof(tcpmib) / sizeof(tcpmib[0]), &tcpstat, &ii, NULL, 0) == -1, tcpstat); @@ -278,6 +268,7 @@ getentropy_fallback(void *buf, size_t len) ii = sizeof(ipstat); HX(sysctl(ipmib, sizeof(ipmib) / sizeof(ipmib[0]), &ipstat, &ii, NULL, 0) == -1, ipstat); +#endif HX((pid = getpid()) == -1, pid); HX((pid = getsid(pid)) == -1, pid); @@ -295,9 +286,6 @@ getentropy_fallback(void *buf, size_t len) HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1, sigset); -#ifdef CAN_REFERENCE_MAIN - HF(main); /* an addr in program */ -#endif HF(getentropy); /* an addr in this library */ HF(printf); /* an addr in libc */ p = (char *)&p; @@ -419,14 +407,11 @@ getentropy_fallback(void *buf, size_t len) } SHA512_Final(results, &ctx); - memcpy((char*)buf + i, results, min(sizeof(results), len - i)); + memcpy((char *)buf + i, results, min(sizeof(results), len - i)); i += min(sizeof(results), len - i); } - memset(results, 0, sizeof results); - if (gotdata(buf, len) == 0) { - errno = save_errno; - return 0; /* satisfied */ - } - errno = EIO; - return -1; + explicit_bzero(&ctx, sizeof ctx); + explicit_bzero(results, sizeof results); + errno = save_errno; + return (0); /* satisfied */ } diff --git a/compat/getentropy_solaris.c b/compat/getentropy_solaris.c index 810098a8d8e4fca35a6009be01c52af1e8631bb1..0a03046d468144c55fbd99b36ba4081e8b8bf758 100644 --- a/compat/getentropy_solaris.c +++ b/compat/getentropy_solaris.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_solaris.c,v 1.3 2014/07/12 14:46:31 deraadt Exp $ */ +/* $OpenBSD: getentropy_solaris.c,v 1.13 2018/11/20 08:04:28 deraadt Exp $ */ /* * Copyright (c) 2014 Theo de Raadt @@ -15,9 +15,12 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Emulation of getentropy(2) as documented at: + * http://man.openbsd.org/getentropy.2 */ -#include "config.h" +#include "config.h" #include #include #include @@ -34,6 +37,7 @@ #include #endif #include +#include #include #include #include @@ -67,17 +71,14 @@ #define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l))) #define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x))) -#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*))) +#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*))) int getentropy(void *buf, size_t len); -#ifdef CAN_REFERENCE_MAIN -extern int main(int, char *argv[]); -#endif -static int gotdata(char *buf, size_t len); static int getentropy_urandom(void *buf, size_t len, const char *path, int devfscheck); static int getentropy_fallback(void *buf, size_t len); +static int getentropy_phdr(struct dl_phdr_info *info, size_t size, void *data); int getentropy(void *buf, size_t len) @@ -86,7 +87,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } /* @@ -153,22 +154,6 @@ getentropy(void *buf, size_t len) return (ret); } -/* - * Basic sanity checking; wish we could do better. - */ -static int -gotdata(char *buf, size_t len) -{ - char any_set = 0; - size_t i; - - for (i = 0; i < len; ++i) - any_set |= buf[i]; - if (any_set == 0) - return -1; - return 0; -} - static int getentropy_urandom(void *buf, size_t len, const char *path, int devfscheck) { @@ -204,7 +189,7 @@ start: } for (i = 0; i < len; ) { size_t wanted = len - i; - ssize_t ret = read(fd, (char*)buf + i, wanted); + ssize_t ret = read(fd, (char *)buf + i, wanted); if (ret == -1) { if (errno == EAGAIN || errno == EINTR) @@ -215,13 +200,11 @@ start: i += ret; } close(fd); - if (gotdata(buf, len) == 0) { - errno = save_errno; - return 0; /* satisfied */ - } + errno = save_errno; + return (0); /* satisfied */ nodevrandom: errno = EIO; - return -1; + return (-1); } static const int cl[] = { @@ -249,6 +232,15 @@ static const int cl[] = { #endif }; +static int +getentropy_phdr(struct dl_phdr_info *info, size_t size, void *data) +{ + SHA512_CTX *ctx = data; + + SHA512_Update(ctx, &info->dlpi_addr, sizeof (info->dlpi_addr)); + return (0); +} + static int getentropy_fallback(void *buf, size_t len) { @@ -286,6 +278,8 @@ getentropy_fallback(void *buf, size_t len) cnt += (int)tv.tv_usec; } + dl_iterate_phdr(getentropy_phdr, &ctx); + for (ii = 0; ii < sizeof(cl)/sizeof(cl[0]); ii++) HX(clock_gettime(cl[ii], &ts) == -1, ts); @@ -306,9 +300,6 @@ getentropy_fallback(void *buf, size_t len) HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1, sigset); -#ifdef CAN_REFERENCE_MAIN - HF(main); /* an addr in program */ -#endif HF(getentropy); /* an addr in this library */ HF(printf); /* an addr in libc */ p = (char *)&p; @@ -428,14 +419,11 @@ getentropy_fallback(void *buf, size_t len) HD(cnt); } SHA512_Final(results, &ctx); - memcpy((char*)buf + i, results, min(sizeof(results), len - i)); + memcpy((char *)buf + i, results, min(sizeof(results), len - i)); i += min(sizeof(results), len - i); } - memset(results, 0, sizeof results); - if (gotdata(buf, len) == 0) { - errno = save_errno; - return 0; /* satisfied */ - } - errno = EIO; - return -1; + explicit_bzero(&ctx, sizeof ctx); + explicit_bzero(results, sizeof results); + errno = save_errno; + return (0); /* satisfied */ } diff --git a/compat/getentropy_win.c b/compat/getentropy_win.c index 71fb955e7f9053ac56d0ffda4d5372e8691ec37b..2abeb27bc6247c99bfbb8f90086c8b360dde13e0 100644 --- a/compat/getentropy_win.c +++ b/compat/getentropy_win.c @@ -1,4 +1,4 @@ -/* $OpenBSD$ */ +/* $OpenBSD: getentropy_win.c,v 1.5 2016/08/07 03:27:21 tb Exp $ */ /* * Copyright (c) 2014, Theo de Raadt @@ -15,6 +15,9 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Emulation of getentropy(2) as documented at: + * http://man.openbsd.org/getentropy.2 */ #include @@ -37,7 +40,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, diff --git a/compat/malloc.c b/compat/malloc.c index 559aa100dd2b058bef545f756d8c224d5f4d7668..d8097b13e02414cada8b21bf09aec57a5b32ce79 100644 --- a/compat/malloc.c +++ b/compat/malloc.c @@ -5,7 +5,12 @@ #undef malloc #include +#ifndef USE_WINSOCK void *malloc (); +#else +/* provide a prototype */ +void *malloc (size_t n); +#endif /* Allocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ diff --git a/compat/snprintf.c b/compat/snprintf.c index 97cd7061f5c9feb2a2e5b6e7be2f73e2e9647cc6..bab873e30793a68f012f392aa8457fe2d243c5c6 100644 --- a/compat/snprintf.c +++ b/compat/snprintf.c @@ -658,7 +658,7 @@ int vsnprintf(char* str, size_t size, const char* format, va_list arg) * are not their own functions. */ /* printout designation: - * conversion specifier: x, d, u, s, c, n, m, p + * conversion specifier: x, d, u, s, c, m, p * flags: # not supported * 0 zeropad (on the left) * - left adjust (right by default) @@ -798,7 +798,10 @@ int vsnprintf(char* str, size_t size, const char* format, va_list arg) minw, minus); break; case 'n': - *va_arg(arg, int*) = ret; + /* unsupported to harden against format string + * exploitation, + * handled like an unknown format specifier. */ + /* *va_arg(arg, int*) = ret; */ break; case 'm': print_str(&at, &left, &ret, strerror(errno), diff --git a/config.guess b/config.guess index 7ea49fadcd8b4de01b0415ddc09ca1be323d6ede..f50dcdb6de2af0a2e33f44704da3ec1286e5f291 100755 --- a/config.guess +++ b/config.guess @@ -1,8 +1,8 @@ -#!/usr/bin/sh +#! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2016-10-02' +timestamp='2018-02-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2016-10-02' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -27,7 +27,7 @@ timestamp='2016-10-02' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -39,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; + ,,) echo "int x;" > "$dummy.c" ; for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; @@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu - eval $set_cc_for_build - cat <<-EOF > $dummy.c + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc @@ -149,13 +149,20 @@ Linux|GNU|GNU/*) LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -169,30 +176,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) - arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -208,10 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # Determine ABI tags. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -219,46 +226,55 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}${abi}" + echo "$machine-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) - echo ${UNAME_MACHINE}-unknown-sortix + echo "$UNAME_MACHINE"-unknown-sortix exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -310,28 +326,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -343,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -370,19 +377,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} + echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build + eval "$set_cc_for_build" SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. @@ -395,13 +402,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in SUN_ARCH=x86_64 fi fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in @@ -410,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -439,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} + echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} + echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} + echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} + echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} + echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -485,23 +492,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} + echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -527,17 +534,17 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - echo m88k-dg-dgux${UNAME_RELEASE} + echo m88k-dg-dgux"$UNAME_RELEASE" else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - echo i586-dg-dgux${UNAME_RELEASE} + echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -554,7 +561,7 @@ EOF echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id @@ -566,14 +573,14 @@ EOF if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -584,7 +591,7 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else @@ -598,7 +605,7 @@ EOF exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc @@ -607,18 +614,18 @@ EOF IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -633,28 +640,28 @@ EOF echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in + case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in + case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include @@ -687,13 +694,13 @@ EOF exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = hppa2.0w ] + if [ "$HP_ARCH" = hppa2.0w ] then - eval $set_cc_for_build + eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -712,15 +719,15 @@ EOF HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -745,11 +752,11 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -758,7 +765,7 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -766,9 +773,9 @@ EOF exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + echo "$UNAME_MACHINE"-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -793,127 +800,109 @@ EOF echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in + case "$UNAME_PROCESSOR" in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 + echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 + echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 + echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case "$UNAME_MACHINE" in x86) - echo i586-pc-interix${UNAME_RELEASE} + echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} + echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} + echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin + echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix + echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -927,63 +916,63 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el @@ -997,70 +986,74 @@ EOF #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-${LIBC} + echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} + echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} + echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} + echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} + echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} + echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} + echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + if objdump -f /bin/sh | grep -q elf32-x86-64; then + echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 + else + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + fi exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1074,34 +1067,34 @@ EOF # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx + echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable + echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp + echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) @@ -1111,12 +1104,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1126,9 +1119,9 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) @@ -1148,9 +1141,9 @@ EOF exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1170,9 +1163,9 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; @@ -1181,28 +1174,28 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} + echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1213,7 +1206,7 @@ EOF *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi @@ -1233,23 +1226,23 @@ EOF exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos + echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} + echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv"$UNAME_RELEASE" else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1268,49 +1261,56 @@ EOF echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} + echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} + echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} + echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} + echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} + echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} + echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux${UNAME_RELEASE} + echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} + echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build + eval "$set_cc_for_build" if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub @@ -1321,7 +1321,7 @@ EOF # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` @@ -1329,19 +1329,25 @@ EOF UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1350,7 +1356,7 @@ EOF echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 @@ -1361,7 +1367,7 @@ EOF else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-unknown-plan9 + echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1382,14 +1388,14 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in + case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1398,32 +1404,44 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos + echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros + echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx + echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; esac +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 </dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/config.h.in b/config.h.in index 545536d63126104512363ba4bd3a5cda06e118cb..8c2aa3b94aee54eee21e3dfc112c5843b50199d3 100644 --- a/config.h.in +++ b/config.h.in @@ -15,6 +15,9 @@ /* Do sha512 definitions in config.h */ #undef COMPAT_SHA512 +/* Command line arguments used with configure */ +#undef CONFCMDLINE + /* Pathname to the Unbound configuration file */ #undef CONFIGFILE @@ -69,6 +72,9 @@ /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA +/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */ +#undef HAVE_CRYPTO_THREADID_SET_CALLBACK + /* Define to 1 if you have the `ctime_r' function. */ #undef HAVE_CTIME_R @@ -83,6 +89,10 @@ if you don't. */ #undef HAVE_DECL_ARC4RANDOM_UNIFORM +/* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if + you don't. */ +#undef HAVE_DECL_EVSIGNAL_ASSIGN + /* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you don't. */ #undef HAVE_DECL_INET_NTOP @@ -163,6 +173,9 @@ /* Define to 1 if you have the `ERR_load_crypto_strings' function. */ #undef HAVE_ERR_LOAD_CRYPTO_STRINGS +/* Define to 1 if you have the `event_assign' function. */ +#undef HAVE_EVENT_ASSIGN + /* Define to 1 if you have the `event_base_free' function. */ #undef HAVE_EVENT_BASE_FREE @@ -403,7 +416,7 @@ /* Define to 1 if you have the `RAND_cleanup' function. */ #undef HAVE_RAND_CLEANUP -/* Define to 1 if you have the `reallocarray' function. */ +/* If we have reallocarray(3) */ #undef HAVE_REALLOCARRAY /* Define to 1 if you have the `recvmsg' function. */ @@ -607,6 +620,9 @@ /* Define to 1 if you have the `_beginthreadex' function. */ #undef HAVE__BEGINTHREADEX +/* If HMAC_Init_ex() returns void */ +#undef HMAC_INIT_EX_RETURNS_VOID + /* if lex has yylex_destroy */ #undef LEX_HAS_YYLEX_DESTROY @@ -699,6 +715,9 @@ /* Shared data */ #undef SHARE_DIR +/* The size of `size_t', as computed by sizeof. */ +#undef SIZEOF_SIZE_T + /* The size of `time_t', as computed by sizeof. */ #undef SIZEOF_TIME_T @@ -717,6 +736,9 @@ /* Use win32 resources and API */ #undef UB_ON_WINDOWS +/* the SYSLOG_FACILITY to use, default LOG_DAEMON */ +#undef UB_SYSLOG_FACILITY + /* default username */ #undef UB_USERNAME @@ -765,6 +787,9 @@ /* Define to 1 to use ipsecmod support. */ #undef USE_IPSECMOD +/* Define to 1 to use ipset support */ +#undef USE_IPSET + /* Define if you want to use internal select based events */ #undef USE_MINI_EVENT @@ -962,8 +987,14 @@ +#ifndef _OPENBSD_SOURCE +#define _OPENBSD_SOURCE 1 +#endif + #ifndef UNBOUND_DEBUG +# ifndef NDEBUG # define NDEBUG +# endif #endif /** Use small-ldns codebase */ @@ -1196,6 +1227,10 @@ struct tm; char *strptime(const char *s, const char *format, struct tm *tm); #endif +#if !HAVE_DECL_REALLOCARRAY +void *reallocarray(void *ptr, size_t nmemb, size_t size); +#endif + #ifdef HAVE_LIBRESSL # if !HAVE_DECL_STRLCPY size_t strlcpy(char *dst, const char *src, size_t siz); @@ -1209,9 +1244,6 @@ uint32_t arc4random(void); # if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM) uint32_t arc4random_uniform(uint32_t upper_bound); # endif -# if !HAVE_DECL_REALLOCARRAY -void *reallocarray(void *ptr, size_t nmemb, size_t size); -# endif #endif /* HAVE_LIBRESSL */ #ifndef HAVE_ARC4RANDOM int getentropy(void* buf, size_t len); diff --git a/config.sub b/config.sub index ba15a57a5cf34976f8733b3f43b9dd4b2e910c7b..1d8e98bcee23a0421e4fafe9a6c9ac75180cff25 100755 --- a/config.sub +++ b/config.sub @@ -1,8 +1,8 @@ -#!/usr/bin/sh +#! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2016-09-05' +timestamp='2018-02-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2016-09-05' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -33,7 +33,7 @@ timestamp='2016-09-05' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -67,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -94,7 +94,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -112,7 +112,7 @@ esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ @@ -120,16 +120,16 @@ case $maybe_os in kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` + basic_machine=`echo "$1" | sed 's/-[^-]*$//'` + if [ "$basic_machine" != "$1" ] + then os=`echo "$1" | sed 's/.*-/-/'` else os=; fi ;; esac @@ -178,44 +178,44 @@ case $os in ;; -sco6) os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 @@ -227,10 +227,7 @@ case $os in os=-lynxos ;; -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` ;; -psos*) os=-psos @@ -263,7 +260,7 @@ case $basic_machine in | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ - | i370 | i860 | i960 | ia64 \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ @@ -299,8 +296,9 @@ case $basic_machine in | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ - | pdp10 | pdp11 | pj | pjl \ + | pdp10 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ @@ -314,7 +312,7 @@ case $basic_machine in | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ - | we32k \ + | wasm32 \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown @@ -335,7 +333,7 @@ case $basic_machine in basic_machine=$basic_machine-unknown os=-none ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) ;; ms1) basic_machine=mt-unknown @@ -364,7 +362,7 @@ case $basic_machine in ;; # Object if more than one company name word. *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. @@ -387,7 +385,7 @@ case $basic_machine in | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ @@ -428,6 +426,7 @@ case $basic_machine in | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ @@ -444,6 +443,7 @@ case $basic_machine in | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -457,7 +457,7 @@ case $basic_machine in # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) - basic_machine=i386-unknown + basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) @@ -491,7 +491,7 @@ case $basic_machine in basic_machine=x86_64-pc ;; amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl @@ -536,7 +536,7 @@ case $basic_machine in os=-linux ;; blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) @@ -544,13 +544,13 @@ case $basic_machine in os=-cnk ;; c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray @@ -639,7 +639,7 @@ case $basic_machine in basic_machine=rs6000-bull os=-bosx ;; - dpx2* | dpx2*-bull) + dpx2*) basic_machine=m68k-bull os=-sysv3 ;; @@ -648,7 +648,7 @@ case $basic_machine in os=$os"spe" ;; e500v[12]-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=$os"spe" ;; ebmon29k) @@ -740,9 +740,6 @@ case $basic_machine in hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; - hppa-next) - os=-nextstep3 - ;; hppaosf) basic_machine=hppa1.1-hp os=-osf @@ -755,26 +752,26 @@ case $basic_machine in basic_machine=i370-ibm ;; i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; - i386-vsta | vsta) + vsta) basic_machine=i386-unknown os=-vsta ;; @@ -793,19 +790,16 @@ case $basic_machine in os=-sysv ;; leon-*|leon[3-9]-*) - basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; - m88k-omron*) - basic_machine=m88k-omron - ;; magnum | m3230) basic_machine=mips-mips os=-sysv @@ -837,10 +831,10 @@ case $basic_machine in os=-mint ;; mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k @@ -859,7 +853,7 @@ case $basic_machine in os=-msdos ;; ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc @@ -901,7 +895,7 @@ case $basic_machine in basic_machine=v70-nec os=-sysv ;; - next | m*-next ) + next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) @@ -946,6 +940,12 @@ case $basic_machine in nsr-tandem) basic_machine=nsr-tandem ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -978,7 +978,7 @@ case $basic_machine in os=-linux ;; parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) @@ -994,7 +994,7 @@ case $basic_machine in basic_machine=i386-pc ;; pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc @@ -1009,16 +1009,16 @@ case $basic_machine in basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould @@ -1028,23 +1028,23 @@ case $basic_machine in ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm @@ -1098,17 +1098,10 @@ case $basic_machine in sequent) basic_machine=i386-sequent ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; sh5el) basic_machine=sh5le-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) + simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -1127,7 +1120,7 @@ case $basic_machine in os=-sysv4 ;; strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun @@ -1249,6 +1242,9 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + x64) + basic_machine=x86_64-pc + ;; xbox) basic_machine=i686-pc os=-mingw32 @@ -1257,20 +1253,12 @@ case $basic_machine in basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; none) basic_machine=none-none os=-none @@ -1299,10 +1287,6 @@ case $basic_machine in vax) basic_machine=vax-dec ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; pdp11) basic_machine=pdp11-dec ;; @@ -1312,9 +1296,6 @@ case $basic_machine in sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; cydra) basic_machine=cydra-cydrome ;; @@ -1334,7 +1315,7 @@ case $basic_machine in # Make sure to match an already-canonicalized machine name. ;; *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac @@ -1342,10 +1323,10 @@ esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1356,8 +1337,8 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases that might get confused + # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux @@ -1368,18 +1349,19 @@ case $os in -solaris) os=-solaris2 ;; - -svr4*) - os=-sysv4 - ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; - # First accept the basic system types. + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; + # Now accept the basic system types. # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. + # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ @@ -1389,25 +1371,26 @@ case $os in | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix*) + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1424,12 +1407,12 @@ case $os in -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) - os=`echo $os | sed -e 's|mac|macos|'` + os=`echo "$os" | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc @@ -1438,10 +1421,10 @@ case $os in os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition @@ -1452,12 +1435,6 @@ case $os in -wince*) os=-wince ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; -utek*) os=-bsd ;; @@ -1482,7 +1459,7 @@ case $os in -nova*) os=-rtmk-nova ;; - -ns2 ) + -ns2) os=-nextstep2 ;; -nsk*) @@ -1504,7 +1481,7 @@ case $os in -oss*) os=-sysv3 ;; - -svr4) + -svr4*) os=-sysv4 ;; -svr3) @@ -1519,24 +1496,28 @@ case $os in -ose*) os=-ose ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; - -aros*) - os=-aros - ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; -nacl*) ;; -ios) @@ -1546,7 +1527,7 @@ case $os in *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac @@ -1636,12 +1617,12 @@ case $basic_machine in sparc-* | *-sun) os=-sunos4.1.1 ;; + pru-*) + os=-elf + ;; *-be) os=-beos ;; - *-haiku) - os=-haiku - ;; *-ibm) os=-aix ;; @@ -1681,7 +1662,7 @@ case $basic_machine in m88k-omron*) os=-luna ;; - *-next ) + *-next) os=-nextstep ;; *-sequent) @@ -1696,9 +1677,6 @@ case $basic_machine in i370-*) os=-mvs ;; - *-next) - os=-nextstep3 - ;; *-gould) os=-sysv ;; @@ -1808,15 +1786,15 @@ case $basic_machine in vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$basic_machine$os" exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/configure b/configure index 6d8611192abf0603546bd177e2894323d58ce2a7..d140a1f538eea99194002407a87d4359b756f484 100755 --- a/configure +++ b/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.9.0. +# Generated by GNU Autoconf 2.69 for unbound 1.9.6. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -275,10 +275,11 @@ fi $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: unbound-bugs@nlnetlabs.nl about your system, including -$0: any error possibly output before this message. Then -$0: install a modern shell, or manually run the script -$0: under such a shell if you do have one." +$0: unbound-bugs@nlnetlabs.nl or +$0: https://github.com/NLnetLabs/unbound/issues about your +$0: system, including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." fi exit 1 fi @@ -590,9 +591,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.9.0' -PACKAGE_STRING='unbound 1.9.0' -PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl' +PACKAGE_VERSION='1.9.6' +PACKAGE_STRING='unbound 1.9.6' +PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues' PACKAGE_URL='' # Factoring default headers for most tests. @@ -638,6 +639,8 @@ INSTALLTARGET ALLTARGET SOURCEFILE SOURCEDETERMINE +IPSET_OBJ +IPSET_SRC IPSECMOD_HEADER IPSECMOD_OBJ DNSCRYPT_OBJ @@ -664,12 +667,6 @@ WIN_DAEMON_SRC WINAPPS WINDRES CHECKLOCK_OBJ -USE_SYSTEMD_FALSE -USE_SYSTEMD_TRUE -SYSTEMD_DAEMON_LIBS -SYSTEMD_DAEMON_CFLAGS -SYSTEMD_LIBS -SYSTEMD_CFLAGS staticexe PC_LIBEVENT_DEPENDENCY UNBOUND_EVENT_UNINSTALL @@ -694,9 +691,6 @@ swig SWIG_LIB SWIG PC_PY_DEPENDENCY -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG PY_MAJOR_VERSION PYTHON_SITE_PKG PYTHON_LDFLAGS @@ -708,8 +702,19 @@ PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC ax_pthread_config +ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ +SLDNS_ALLOCCHECK_EXTRA_OBJ +USE_SYSTEMD_FALSE +USE_SYSTEMD_TRUE +SYSTEMD_DAEMON_LIBS +SYSTEMD_DAEMON_CFLAGS +SYSTEMD_LIBS +SYSTEMD_CFLAGS RUNTIME_PATH LIBOBJS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG LT_SYS_LIBRARY_PATH OTOOL64 OTOOL @@ -796,6 +801,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -841,11 +847,13 @@ with_sysroot enable_libtool_lock enable_rpath enable_largefile +enable_systemd enable_alloc_checks enable_alloc_lite enable_alloc_nonregional with_pthreads with_solaris_threads +with_syslog_facility with_pyunbound with_pythonmodule enable_swig_version_check @@ -867,7 +875,7 @@ with_libevent with_libexpat with_libhiredis enable_static_exe -enable_systemd +enable_fully_static enable_lock_checks enable_allsymbols enable_dnstap @@ -878,6 +886,8 @@ enable_dnscrypt with_libsodium enable_cachedb enable_ipsecmod +enable_ipset +with_libmnl with_libunbound_only ' ac_precious_vars='build_alias @@ -892,14 +902,14 @@ CPP YACC YFLAGS LT_SYS_LIBRARY_PATH -PYTHON_VERSION PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR SYSTEMD_CFLAGS SYSTEMD_LIBS SYSTEMD_DAEMON_CFLAGS -SYSTEMD_DAEMON_LIBS' +SYSTEMD_DAEMON_LIBS +PYTHON_VERSION' # Initialize some variables set by options. @@ -938,6 +948,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1190,6 +1201,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1327,7 +1347,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1440,7 +1460,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.9.0 to adapt to many kinds of systems. +\`configure' configures unbound 1.9.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1480,6 +1500,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1505,7 +1526,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.9.0:";; + short | recursive ) echo "Configuration of unbound 1.9.6:";; esac cat <<\_ACEOF @@ -1527,6 +1548,7 @@ Optional Features: --disable-libtool-lock avoid locking (might break parallel builds) --disable-rpath disable hardcoded rpath (default=enabled) --disable-largefile omit support for large files + --enable-systemd compile with systemd support --enable-alloc-checks enable to memory allocation statistics, for debug purposes --enable-alloc-lite enable for lightweight alloc assertions, for debug @@ -1552,8 +1574,8 @@ Optional Features: --enable-tfo-client Enable TCP Fast Open for client mode --enable-tfo-server Enable TCP Fast Open for server mode --enable-static-exe enable to compile executables statically against - (event) libs, for debug purposes - --enable-systemd compile with systemd support + (event) uninstalled libs, for debug purposes + --enable-fully-static enable to compile fully static --enable-lock-checks enable to check lock and unlock calls, for debug purposes --enable-allsymbols export all symbols from libunbound and link binaries @@ -1565,6 +1587,7 @@ Optional Features: storage --enable-ipsecmod Enable ipsecmod module that facilitates opportunistic IPsec + --enable-ipset enable ipset module Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1598,6 +1621,8 @@ Optional Packages: --with-pthreads use pthreads library, or --without-pthreads to disable threading support. --with-solaris-threads use solaris native thread library. + --with-syslog-facility=LOCAL0 - LOCAL7 + set SYSLOG_FACILITY, default DAEMON --with-pyunbound build PyUnbound, or --without-pyunbound to skip it. (default=no) --with-pythonmodule build Python module, or --without-pythonmodule to @@ -1619,6 +1644,7 @@ Optional Packages: --with-protobuf-c=path Path where protobuf-c is installed, for dnstap --with-libfstrm=path Path where libfstrm is installed, for dnstap --with-libsodium=path Path where libsodium is installed, for dnscrypt + --with-libmnl=path specify explicit path for libmnl. --with-libunbound-only do not build daemon and tool programs Some influential environment variables: @@ -1638,10 +1664,6 @@ Some influential environment variables: default value of `-d' given by some make applications. LT_SYS_LIBRARY_PATH User-defined run-time library search path. - PYTHON_VERSION - The installed Python version to use, for example '2.3'. This - string will be appended to the Python interpreter canonical - name. PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path @@ -1655,11 +1677,15 @@ Some influential environment variables: C compiler flags for SYSTEMD_DAEMON, overriding pkg-config SYSTEMD_DAEMON_LIBS linker flags for SYSTEMD_DAEMON, overriding pkg-config + PYTHON_VERSION + The installed Python version to use, for example '2.3'. This + string will be appended to the Python interpreter canonical + name. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF ac_status=$? fi @@ -1722,7 +1748,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.9.0 +unbound configure 1.9.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1881,9 +1907,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ---------------------------------------- ## -## Report this to unbound-bugs@nlnetlabs.nl ## -## ---------------------------------------- ##" +( $as_echo "## --------------------------------------------------------------------------------------- ## +## Report this to unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues ## +## --------------------------------------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -2431,7 +2457,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.9.0, which was +It was created by unbound $as_me 1.9.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2783,11 +2809,11 @@ UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=9 -UNBOUND_VERSION_MICRO=0 +UNBOUND_VERSION_MICRO=6 LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=0 +LIBUNBOUND_REVISION=6 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2854,7 +2880,13 @@ LIBUNBOUND_AGE=1 # 1.8.1 had 8:1:0 # 1.8.2 had 8:2:0 # 1.8.3 had 8:3:0 -# 1.8.4 had 9:0:1 # add ub_ctx_set_tls +# 1.9.0 had 9:0:1 # add ub_ctx_set_tls +# 1.9.1 had 9:1:1 +# 1.9.2 had 9:2:1 +# 1.9.3 had 9:3:1 +# 1.9.4 had 9:4:1 +# 1.9.5 had 9:5:1 +# 1.9.6 had 9:6:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -2878,6 +2910,14 @@ LIBUNBOUND_AGE=1 + +cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`" + +cat >>confdefs.h <<_ACEOF +#define CONFCMDLINE "$cmdln" +_ACEOF + + CFLAGS="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8021,7 +8061,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -11486,6 +11526,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie openbsd* | bitrig*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs=no + ;; esac ld_shlibs=yes @@ -11740,7 +11783,7 @@ _LT_EOF fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -12410,6 +12453,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi + link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -12431,7 +12475,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -13526,9 +13570,6 @@ fi # before this can be enabled. hardcode_into_libs=yes - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -13537,7 +13578,7 @@ fi # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -13549,6 +13590,18 @@ fi dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -14558,6 +14611,127 @@ CC=$lt_save_CC + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + # Checks for header files. for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h do : @@ -14922,6 +15096,39 @@ cat >>confdefs.h <<_ACEOF _ACEOF +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 +$as_echo_n "checking size of size_t... " >&6; } +if ${ac_cv_sizeof_size_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_size_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (size_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_size_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 +$as_echo "$ac_cv_sizeof_size_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF + + # add option to disable the evil rpath @@ -15461,7 +15668,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -15507,7 +15714,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -15531,7 +15738,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -15576,7 +15783,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -15600,7 +15807,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -15970,7 +16177,7 @@ done # check if we can use SO_REUSEPORT -if echo "$host" | grep -i -e linux -e dragonfly >/dev/null; then +if echo "$host" | $GREP -i -e linux -e dragonfly >/dev/null; then $as_echo "#define REUSEPORT_DEFAULT 1" >>confdefs.h @@ -15980,30 +16187,225 @@ $as_echo "#define REUSEPORT_DEFAULT 0" >>confdefs.h fi -# set memory allocation checking if requested -# Check whether --enable-alloc-checks was given. -if test "${enable_alloc_checks+set}" = set; then : - enableval=$enable_alloc_checks; +# Include systemd.m4 - begin +# macros for configuring systemd +# Copyright 2015, Sami Kerola, CloudFlare. +# BSD licensed. +# Check whether --enable-systemd was given. +if test "${enable_systemd+set}" = set; then : + enableval=$enable_systemd; +else + enable_systemd=no fi -# Check whether --enable-alloc-lite was given. -if test "${enable_alloc_lite+set}" = set; then : - enableval=$enable_alloc_lite; -fi +have_systemd=no +if test "x$enable_systemd" != xno; then : -# Check whether --enable-alloc-nonregional was given. -if test "${enable_alloc_nonregional+set}" = set; then : - enableval=$enable_alloc_nonregional; -fi -if test x_$enable_alloc_nonregional = x_yes; then -$as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 +$as_echo_n "checking for SYSTEMD... " >&6; } +if test -n "$SYSTEMD_CFLAGS"; then + pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SYSTEMD_LIBS"; then + pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried fi -if test x_$enable_alloc_checks = x_yes; then -$as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1` + else + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SYSTEMD_PKG_ERRORS" >&5 + + have_systemd=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_systemd=no +else + SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS + SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_systemd=yes +fi + if test "x$have_systemd" != "xyes"; then : + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5 +$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; } + +if test -n "$SYSTEMD_DAEMON_CFLAGS"; then + pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SYSTEMD_DAEMON_LIBS"; then + pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` + else + SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5 + + have_systemd_daemon=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_systemd_daemon=no +else + SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS + SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_systemd_daemon=yes +fi + if test "x$have_systemd_daemon" = "xyes"; then : + have_systemd=yes +fi + +fi + case $enable_systemd:$have_systemd in #( + yes:no) : + as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #( + *:yes) : + +$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h + + LIBS="$LIBS $SYSTEMD_LIBS" + + ;; #( + *) : + ;; +esac + + +fi + if test "x$have_systemd" = xyes; then + USE_SYSTEMD_TRUE= + USE_SYSTEMD_FALSE='#' +else + USE_SYSTEMD_TRUE='#' + USE_SYSTEMD_FALSE= +fi + + +# Include systemd.m4 - end + +# set memory allocation checking if requested +# Check whether --enable-alloc-checks was given. +if test "${enable_alloc_checks+set}" = set; then : + enableval=$enable_alloc_checks; +fi + +# Check whether --enable-alloc-lite was given. +if test "${enable_alloc_lite+set}" = set; then : + enableval=$enable_alloc_lite; +fi + +# Check whether --enable-alloc-nonregional was given. +if test "${enable_alloc_nonregional+set}" = set; then : + enableval=$enable_alloc_nonregional; +fi + +if test x_$enable_alloc_nonregional = x_yes; then + +$as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h + +fi +if test x_$enable_alloc_checks = x_yes; then + +$as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h + + SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo" + + ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo" else if test x_$enable_alloc_lite = x_yes; then @@ -16768,6 +17170,26 @@ fi fi # end of non-mingw check of thread libraries +# Check for SYSLOG_FACILITY + +# Check whether --with-syslog-facility was given. +if test "${with_syslog_facility+set}" = set; then : + withval=$with_syslog_facility; UNBOUND_SYSLOG_FACILITY="$withval" +fi + +case "${UNBOUND_SYSLOG_FACILITY}" in + + LOCAL[0-7]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;; + + *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;; + +esac + +cat >>confdefs.h <<_ACEOF +#define UB_SYSLOG_FACILITY ${UNBOUND_SYSLOG_FACILITY} +_ACEOF + + # Check for PyUnbound # Check whether --with-pyunbound was given. @@ -17015,126 +17437,6 @@ $as_echo "#define HAVE_PYTHON 1" >>confdefs.h CPPFLAGS="$PYTHON_CPPFLAGS" fi ub_have_python=yes - - - - - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi -fi if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5 ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5 @@ -17964,16 +18266,6 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default" -if test "x$ac_cv_have_decl_reallocarray" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_REALLOCARRAY $ac_have_decl -_ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -17993,7 +18285,7 @@ fi done -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 EVP_DigestVerify SSL_CTX_set_tlsext_ticket_key_cb EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex +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 EVP_DigestVerify SSL_CTX_set_tlsext_ticket_key_cb EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -18114,6 +18406,63 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl _ACEOF + +if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then +# check function return type. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the return type of HMAC_Init_ex" >&5 +$as_echo_n "checking the return type of HMAC_Init_ex... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_OPENSSL_ERR_H +#include +#endif + +#ifdef HAVE_OPENSSL_RAND_H +#include +#endif + +#ifdef HAVE_OPENSSL_CONF_H +#include +#endif + +#ifdef HAVE_OPENSSL_ENGINE_H +#include +#endif +#include +#include + +int +main () +{ + + HMAC_CTX* hmac_ctx = NULL; + void* hmac_key = NULL; + const EVP_MD* digest = NULL; + int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL); + (void)x; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5 +$as_echo "int" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: void" >&5 +$as_echo "void" >&6; } + +$as_echo "#define HMAC_INIT_EX_RETURNS_VOID 1" >>confdefs.h + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + fi @@ -19010,6 +19359,35 @@ _ACEOF fi done # only in libev. (tested on 4.00) + for ac_func in event_assign +do : + ac_fn_c_check_func "$LINENO" "event_assign" "ac_cv_func_event_assign" +if test "x$ac_cv_func_event_assign" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_EVENT_ASSIGN 1 +_ACEOF + +fi +done + # in libevent, for thread-safety + ac_fn_c_check_decl "$LINENO" "evsignal_assign" "ac_cv_have_decl_evsignal_assign" "$ac_includes_default +#ifdef HAVE_EVENT_H +# include +#else +# include \"event2/event.h\" +#endif + +" +if test "x$ac_cv_have_decl_evsignal_assign" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_EVSIGNAL_ASSIGN $ac_have_decl +_ACEOF + PC_LIBEVENT_DEPENDENCY="libevent" if test -n "$BAK_LDFLAGS_SET"; then @@ -19068,290 +19446,118 @@ ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" " if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then : ac_have_decl=1 else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_XML_STOPPARSER $ac_have_decl -_ACEOF - - -# hiredis (redis C client for cachedb) - -# Check whether --with-libhiredis was given. -if test "${with_libhiredis+set}" = set; then : - withval=$with_libhiredis; -else - withval="no" -fi - -found_libhiredis="no" -if test x_$withval = x_yes -o x_$withval != x_no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5 -$as_echo_n "checking for libhiredis... " >&6; } - if test x_$withval = x_ -o x_$withval = x_yes; then - withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr" - fi - for dir in $withval ; do - if test -f "$dir/include/hiredis/hiredis.h"; then - found_libhiredis="yes" - if test "$dir" != "/usr"; then - CPPFLAGS="$CPPFLAGS -I$dir/include" - LDFLAGS="$LDFLAGS -L$dir/lib" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5 -$as_echo "found in $dir" >&6; } - -$as_echo "#define USE_REDIS 1" >>confdefs.h - - LIBS="$LIBS -lhiredis" - break; - fi - done - if test x_$found_libhiredis != x_yes; then - as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5 - fi - for ac_header in hiredis/hiredis.h -do : - ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default -" -if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_HIREDIS_HIREDIS_H 1 -_ACEOF - -fi - -done - - ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default - #include - -" -if test "x$ac_cv_have_decl_redisConnect" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_REDISCONNECT $ac_have_decl -_ACEOF - -fi - -# set static linking if requested - -staticexe="" -# Check whether --enable-static-exe was given. -if test "${enable_static_exe+set}" = set; then : - enableval=$enable_static_exe; -fi - -if test x_$enable_static_exe = x_yes; then - staticexe="-static" - if test "$on_mingw" = yes; then - staticexe="-all-static" - # for static compile, include gdi32 and zlib here. - if echo $LIBS | grep 'lgdi32' >/dev/null; then - : - else - LIBS="$LIBS -lgdi32" - fi - LIBS="$LIBS -lz" - fi -fi - -# Include systemd.m4 - begin -# macros for configuring systemd -# Copyright 2015, Sami Kerola, CloudFlare. -# BSD licensed. -# Check whether --enable-systemd was given. -if test "${enable_systemd+set}" = set; then : - enableval=$enable_systemd; -else - enable_systemd=no -fi - -have_systemd=no -if test "x$enable_systemd" != xno; then : - - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried + ac_have_decl=0 fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_XML_STOPPARSER $ac_have_decl +_ACEOF -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +# hiredis (redis C client for cachedb) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes +# Check whether --with-libhiredis was given. +if test "${with_libhiredis+set}" = set; then : + withval=$with_libhiredis; else - _pkg_short_errors_supported=no + withval="no" fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - have_systemd=no -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_systemd=no -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_systemd=yes -fi - if test "x$have_systemd" != "xyes"; then : +found_libhiredis="no" +if test x_$withval = x_yes -o x_$withval != x_no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhiredis" >&5 +$as_echo_n "checking for libhiredis... " >&6; } + if test x_$withval = x_ -o x_$withval = x_yes; then + withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr" + fi + for dir in $withval ; do + if test -f "$dir/include/hiredis/hiredis.h"; then + found_libhiredis="yes" + if test "$dir" != "/usr"; then + CPPFLAGS="$CPPFLAGS -I$dir/include" + LDFLAGS="$LDFLAGS -L$dir/lib" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5 +$as_echo "found in $dir" >&6; } +$as_echo "#define USE_REDIS 1" >>confdefs.h -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5 -$as_echo_n "checking for SYSTEMD_DAEMON... " >&6; } + LIBS="$LIBS -lhiredis" + break; + fi + done + if test x_$found_libhiredis != x_yes; then + as_fn_error $? "Could not find libhiredis, hiredis.h" "$LINENO" 5 + fi + for ac_header in hiredis/hiredis.h +do : + ac_fn_c_check_header_compile "$LINENO" "hiredis/hiredis.h" "ac_cv_header_hiredis_hiredis_h" "$ac_includes_default +" +if test "x$ac_cv_header_hiredis_hiredis_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_HIREDIS_HIREDIS_H 1 +_ACEOF -if test -n "$SYSTEMD_DAEMON_CFLAGS"; then - pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_DAEMON_LIBS"; then - pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes fi - else - pkg_failed=untried -fi - +done -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_fn_c_check_decl "$LINENO" "redisConnect" "ac_cv_have_decl_redisConnect" "$ac_includes_default + #include -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes +" +if test "x$ac_cv_have_decl_redisConnect" = xyes; then : + ac_have_decl=1 else - _pkg_short_errors_supported=no + ac_have_decl=0 fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - else - SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5 - have_systemd_daemon=no -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_systemd_daemon=no -else - SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS - SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_systemd_daemon=yes -fi - if test "x$have_systemd_daemon" = "xyes"; then : - have_systemd=yes -fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_REDISCONNECT $ac_have_decl +_ACEOF fi - case $enable_systemd:$have_systemd in #( - yes:no) : - as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #( - *:yes) : - -$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h - - LIBS="$LIBS $SYSTEMD_LIBS" - - ;; #( - *) : - ;; -esac +# set static linking for uninstalled libraries if requested +staticexe="" +# Check whether --enable-static-exe was given. +if test "${enable_static_exe+set}" = set; then : + enableval=$enable_static_exe; fi - if test "x$have_systemd" = xyes; then - USE_SYSTEMD_TRUE= - USE_SYSTEMD_FALSE='#' -else - USE_SYSTEMD_TRUE='#' - USE_SYSTEMD_FALSE= + +if test x_$enable_static_exe = x_yes; then + staticexe="-static" + if test "$on_mingw" = yes; then + staticexe="-all-static" + # for static compile, include gdi32 and zlib here. + if echo $LIBS | grep 'lgdi32' >/dev/null; then + : + else + LIBS="$LIBS -lgdi32" + fi + LIBS="$LIBS -lz" + fi fi +# set full static linking if requested +# Check whether --enable-fully-static was given. +if test "${enable_fully_static+set}" = set; then : + enableval=$enable_fully_static; +fi -# Include systemd.m4 - end +if test x_$enable_fully_static = x_yes; then + staticexe="-all-static" + if test "$on_mingw" = yes; then + # for static compile, include gdi32 and zlib here. + if echo $LIBS | grep 'lgdi32' >/dev/null; then + : + else + LIBS="$LIBS -lgdi32" + fi + LIBS="$LIBS -lz" + fi +fi # set lock checking if requested # Check whether --enable-lock_checks was given. @@ -20112,19 +20318,54 @@ fi LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS" -ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray" -if test "x$ac_cv_func_reallocarray" = xyes; then : - $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for reallocarray" >&5 +$as_echo_n "checking for reallocarray... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default + +#ifndef _OPENBSD_SOURCE +#define _OPENBSD_SOURCE 1 +#endif +#include +int main(void) { + void* p = reallocarray(NULL, 10, 100); + free(p); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h + else - case " $LIBOBJS " in + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + case " $LIBOBJS " in *" reallocarray.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext" ;; esac + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default" +if test "x$ac_cv_have_decl_reallocarray" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_REALLOCARRAY $ac_have_decl +_ACEOF if test "$USE_NSS" = "no"; then ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random" @@ -20292,6 +20533,14 @@ if test "$ac_res" != no; then : fi + ;; + *freebsd*|*FreeBSD) + case " $LIBOBJS " in + *" getentropy_freebsd.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getentropy_freebsd.$ac_objext" + ;; +esac + ;; *linux*|Linux|*) case " $LIBOBJS " in @@ -20993,6 +21242,59 @@ $as_echo "#define USE_IPSECMOD 1" >>confdefs.h ;; esac +# check for ipset if requested +# Check whether --enable-ipset was given. +if test "${enable_ipset+set}" = set; then : + enableval=$enable_ipset; +fi + +case "$enable_ipset" in + yes) + +$as_echo "#define USE_IPSET 1" >>confdefs.h + + IPSET_SRC="ipset/ipset.c" + + IPSET_OBJ="ipset.lo" + + + # mnl + +# Check whether --with-libmnl was given. +if test "${with_libmnl+set}" = set; then : + withval=$with_libmnl; +else + withval="yes" +fi + + found_libmnl="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5 +$as_echo_n "checking for libmnl... " >&6; } + if test x_$withval = x_ -o x_$withval = x_yes; then + withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr" + fi + for dir in $withval ; do + if test -f "$dir/include/libmnl/libmnl.h"; then + found_libmnl="yes" + if test "$dir" != "/usr"; then + CPPFLAGS="$CPPFLAGS -I$dir/include" + LDFLAGS="$LDFLAGS -L$dir/lib" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5 +$as_echo "found in $dir" >&6; } + LIBS="$LIBS -lmnl" + break; + fi + done + if test x_$found_libmnl != x_yes; then + as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5 + fi + ;; + no|*) + # nothing + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; } # on openBSD, the implicit rule make $< work. @@ -21148,7 +21450,7 @@ _ACEOF -version=1.9.0 +version=1.9.6 date=`date +'%b %e, %Y'` @@ -21667,7 +21969,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.9.0, which was +This file was extended by unbound $as_me 1.9.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21727,13 +22029,13 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.9.0 +unbound config.status 1.9.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -22725,7 +23027,6 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. diff --git a/configure.ac b/configure.ac index e071dc398989bb6ec7ee6166a1c11341fb550543..5276d441620e0d530d94e8bc74277cd418ae779a 100644 --- a/configure.ac +++ b/configure.ac @@ -11,14 +11,14 @@ sinclude(dnscrypt/dnscrypt.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[9]) -m4_define([VERSION_MICRO],[0]) -AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound) +m4_define([VERSION_MICRO],[6]) +AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=9 -LIBUNBOUND_REVISION=0 +LIBUNBOUND_REVISION=6 LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -85,7 +85,13 @@ LIBUNBOUND_AGE=1 # 1.8.1 had 8:1:0 # 1.8.2 had 8:2:0 # 1.8.3 had 8:3:0 -# 1.8.4 had 9:0:1 # add ub_ctx_set_tls +# 1.9.0 had 9:0:1 # add ub_ctx_set_tls +# 1.9.1 had 9:1:1 +# 1.9.2 had 9:2:1 +# 1.9.3 had 9:3:1 +# 1.9.4 had 9:4:1 +# 1.9.5 had 9:5:1 +# 1.9.6 had 9:6:1 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -109,6 +115,10 @@ AC_SUBST(LIBUNBOUND_CURRENT) AC_SUBST(LIBUNBOUND_REVISION) AC_SUBST(LIBUNBOUND_AGE) + +cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`" +AC_DEFINE_UNQUOTED(CONFCMDLINE, ["$cmdln"], [Command line arguments used with configure]) + CFLAGS="$CFLAGS" AC_AIX if test "$ac_cv_header_minix_config_h" = "yes"; then @@ -382,6 +392,8 @@ AC_CHECK_PROG(doxygen, doxygen, doxygen) AC_CHECK_TOOL(STRIP, strip) ACX_LIBTOOL_C_ONLY +PKG_PROG_PKG_CONFIG + # Checks for header files. AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h sys/endian.h libkern/OSByteOrder.h sys/ipc.h sys/shm.h],,, [AC_INCLUDES_DEFAULT]) @@ -420,6 +432,7 @@ AC_INCLUDES_DEFAULT # endif #endif ]) +AC_CHECK_SIZEOF(size_t) # add option to disable the evil rpath ACX_ARG_RPATH @@ -465,12 +478,16 @@ ACX_MKDIR_ONE_ARG AC_CHECK_FUNCS([strptime],[AC_CHECK_STRPTIME_WORKS],[AC_LIBOBJ([strptime])]) # check if we can use SO_REUSEPORT -if echo "$host" | grep -i -e linux -e dragonfly >/dev/null; then +if echo "$host" | $GREP -i -e linux -e dragonfly >/dev/null; then AC_DEFINE(REUSEPORT_DEFAULT, 1, [if REUSEPORT is enabled by default]) else AC_DEFINE(REUSEPORT_DEFAULT, 0, [if REUSEPORT is enabled by default]) fi +# Include systemd.m4 - begin +sinclude(systemd.m4) +# Include systemd.m4 - end + # set memory allocation checking if requested AC_ARG_ENABLE(alloc-checks, AC_HELP_STRING([--enable-alloc-checks], [ enable to memory allocation statistics, for debug purposes ]), @@ -486,6 +503,10 @@ if test x_$enable_alloc_nonregional = x_yes; then fi if test x_$enable_alloc_checks = x_yes; then AC_DEFINE(UNBOUND_ALLOC_STATS, 1, [use statistics for allocs and frees, for debug use]) + SLDNS_ALLOCCHECK_EXTRA_OBJ="alloc.lo log.lo" + AC_SUBST(SLDNS_ALLOCCHECK_EXTRA_OBJ) + ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ="alloc.lo" + AC_SUBST(ASYNCLOOK_ALLOCCHECK_EXTRA_OBJ) else if test x_$enable_alloc_lite = x_yes; then AC_DEFINE(UNBOUND_ALLOC_LITE, 1, [use to enable lightweight alloc assertions, for debug use]) @@ -589,6 +610,18 @@ fi fi # end of non-mingw check of thread libraries +# Check for SYSLOG_FACILITY +AC_ARG_WITH(syslog-facility, AC_HELP_STRING([--with-syslog-facility=LOCAL0 - LOCAL7], [ set SYSLOG_FACILITY, default DAEMON ]), + [ UNBOUND_SYSLOG_FACILITY="$withval" ], []) +case "${UNBOUND_SYSLOG_FACILITY}" in + + LOCAL[[0-7]]) UNBOUND_SYSLOG_FACILITY="LOG_${UNBOUND_SYSLOG_FACILITY}" ;; + + *) UNBOUND_SYSLOG_FACILITY="LOG_DAEMON" ;; + +esac +AC_DEFINE_UNQUOTED(UB_SYSLOG_FACILITY,${UNBOUND_SYSLOG_FACILITY},[the SYSLOG_FACILITY to use, default LOG_DAEMON]) + # Check for PyUnbound AC_ARG_WITH(pyunbound, AC_HELP_STRING([--with-pyunbound], @@ -641,7 +674,6 @@ if test x_$ub_test_python != x_no; then CPPFLAGS="$PYTHON_CPPFLAGS" fi ub_have_python=yes - PKG_PROG_PKG_CONFIG PKG_CHECK_EXISTS(["python${PY_MAJOR_VERSION}"], [PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"], [PC_PY_DEPENDENCY="python"]) @@ -776,12 +808,12 @@ if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/ AC_DEFINE([HAVE_LIBRESSL], [1], [Define if we have LibreSSL]) # libressl provides these compat functions, but they may also be # declared by the OS in libc. See if they have been declared. - AC_CHECK_DECLS([strlcpy,strlcat,arc4random,arc4random_uniform,reallocarray]) + AC_CHECK_DECLS([strlcpy,strlcat,arc4random,arc4random_uniform]) else AC_MSG_RESULT([no]) fi AC_CHECK_HEADERS([openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h],,, [AC_INCLUDES_DEFAULT]) -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 EVP_DigestVerify SSL_CTX_set_tlsext_ticket_key_cb EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex]) +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 EVP_DigestVerify SSL_CTX_set_tlsext_ticket_key_cb EVP_aes_256_cbc EVP_EncryptInit_ex HMAC_Init_ex CRYPTO_THREADID_set_callback]) # these check_funcs need -lssl BAKLIBS="$LIBS" @@ -809,6 +841,42 @@ AC_INCLUDES_DEFAULT #include #include ]) + +if test "$ac_cv_func_HMAC_Init_ex" = "yes"; then +# check function return type. +AC_MSG_CHECKING(the return type of HMAC_Init_ex) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +#ifdef HAVE_OPENSSL_ERR_H +#include +#endif + +#ifdef HAVE_OPENSSL_RAND_H +#include +#endif + +#ifdef HAVE_OPENSSL_CONF_H +#include +#endif + +#ifdef HAVE_OPENSSL_ENGINE_H +#include +#endif +#include +#include +], [ + HMAC_CTX* hmac_ctx = NULL; + void* hmac_key = NULL; + const EVP_MD* digest = NULL; + int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL); + (void)x; +])], [ + AC_MSG_RESULT(int) +], [ + AC_MSG_RESULT(void) + AC_DEFINE([HMAC_INIT_EX_RETURNS_VOID], 1, [If HMAC_Init_ex() returns void]) +]) +fi + fi AC_SUBST(SSLLIB) @@ -1197,6 +1265,14 @@ large outgoing port ranges. ]) AC_CHECK_FUNCS([event_base_get_method]) # only in libevent 1.4.3 and later AC_CHECK_FUNCS([ev_loop]) # only in libev. (tested on 3.51) AC_CHECK_FUNCS([ev_default_loop]) # only in libev. (tested on 4.00) + AC_CHECK_FUNCS([event_assign]) # in libevent, for thread-safety + AC_CHECK_DECLS([evsignal_assign], [], [], [AC_INCLUDES_DEFAULT +#ifdef HAVE_EVENT_H +# include +#else +# include "event2/event.h" +#endif + ]) PC_LIBEVENT_DEPENDENCY="libevent" AC_SUBST(PC_LIBEVENT_DEPENDENCY) if test -n "$BAK_LDFLAGS_SET"; then @@ -1265,11 +1341,11 @@ if test x_$withval = x_yes -o x_$withval != x_no; then ]) fi -# set static linking if requested +# set static linking for uninstalled libraries if requested AC_SUBST(staticexe) staticexe="" AC_ARG_ENABLE(static-exe, AC_HELP_STRING([--enable-static-exe], - [ enable to compile executables statically against (event) libs, for debug purposes ]), + [ enable to compile executables statically against (event) uninstalled libs, for debug purposes ]), , ) if test x_$enable_static_exe = x_yes; then staticexe="-static" @@ -1285,9 +1361,22 @@ if test x_$enable_static_exe = x_yes; then fi fi -# Include systemd.m4 - begin -sinclude(systemd.m4) -# Include systemd.m4 - end +# set full static linking if requested +AC_ARG_ENABLE(fully-static, AC_HELP_STRING([--enable-fully-static], + [ enable to compile fully static ]), + , ) +if test x_$enable_fully_static = x_yes; then + staticexe="-all-static" + if test "$on_mingw" = yes; then + # for static compile, include gdi32 and zlib here. + if echo $LIBS | grep 'lgdi32' >/dev/null; then + : + else + LIBS="$LIBS -lgdi32" + fi + LIBS="$LIBS -lz" + fi +fi # set lock checking if requested AC_ARG_ENABLE(lock_checks, AC_HELP_STRING([--enable-lock-checks], @@ -1436,7 +1525,25 @@ AC_REPLACE_FUNCS(explicit_bzero) dnl without CTIME, ARC4-functions and without reallocarray. LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS" AC_SUBST(LIBOBJ_WITHOUT_CTIMEARC4) -AC_REPLACE_FUNCS(reallocarray) +AC_MSG_CHECKING([for reallocarray]) +AC_LINK_IFELSE([AC_LANG_SOURCE(AC_INCLUDES_DEFAULT +[[ +#ifndef _OPENBSD_SOURCE +#define _OPENBSD_SOURCE 1 +#endif +#include +int main(void) { + void* p = reallocarray(NULL, 10, 100); + free(p); + return 0; +} +]])], [AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_REALLOCARRAY, 1, [If we have reallocarray(3)]) +], [ + AC_MSG_RESULT(no) + AC_LIBOBJ(reallocarray) +]) +AC_CHECK_DECLS([reallocarray]) if test "$USE_NSS" = "no"; then AC_REPLACE_FUNCS(arc4random) AC_REPLACE_FUNCS(arc4random_uniform) @@ -1463,6 +1570,9 @@ if test "$USE_NSS" = "no"; then fi AC_SEARCH_LIBS([clock_gettime], [rt]) ;; + *freebsd*|*FreeBSD) + AC_LIBOBJ(getentropy_freebsd) + ;; *linux*|Linux|*) AC_LIBOBJ(getentropy_linux) AC_CHECK_FUNCS([SHA512_Update],,[ @@ -1575,6 +1685,47 @@ case "$enable_ipsecmod" in ;; esac +# check for ipset if requested +AC_ARG_ENABLE(ipset, AC_HELP_STRING([--enable-ipset], [enable ipset module])) +case "$enable_ipset" in + yes) + AC_DEFINE([USE_IPSET], [1], [Define to 1 to use ipset support]) + IPSET_SRC="ipset/ipset.c" + AC_SUBST(IPSET_SRC) + IPSET_OBJ="ipset.lo" + AC_SUBST(IPSET_OBJ) + + # mnl + AC_ARG_WITH(libmnl, AC_HELP_STRING([--with-libmnl=path], + [specify explicit path for libmnl.]), + [ ],[ withval="yes" ]) + found_libmnl="no" + AC_MSG_CHECKING(for libmnl) + if test x_$withval = x_ -o x_$withval = x_yes; then + withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr" + fi + for dir in $withval ; do + if test -f "$dir/include/libmnl/libmnl.h"; then + found_libmnl="yes" + dnl assume /usr is in default path. + if test "$dir" != "/usr"; then + CPPFLAGS="$CPPFLAGS -I$dir/include" + LDFLAGS="$LDFLAGS -L$dir/lib" + fi + AC_MSG_RESULT(found in $dir) + LIBS="$LIBS -lmnl" + break; + fi + done + if test x_$found_libmnl != x_yes; then + AC_ERROR([Could not find libmnl, libmnl.h]) + fi + ;; + no|*) + # nothing + ;; +esac + AC_MSG_CHECKING([if ${MAKE:-make} supports $< with implicit rule in scope]) # on openBSD, the implicit rule make $< work. # on Solaris, it does not work ($? is changed sources, $^ lists dependencies). @@ -1649,8 +1800,14 @@ AHX_CONFIG_EXT_FLAGS dnl includes [ +#ifndef _OPENBSD_SOURCE +#define _OPENBSD_SOURCE 1 +#endif + #ifndef UNBOUND_DEBUG +# ifndef NDEBUG # define NDEBUG +# endif #endif /** Use small-ldns codebase */ @@ -1784,6 +1941,10 @@ struct tm; char *strptime(const char *s, const char *format, struct tm *tm); #endif +#if !HAVE_DECL_REALLOCARRAY +void *reallocarray(void *ptr, size_t nmemb, size_t size); +#endif + #ifdef HAVE_LIBRESSL # if !HAVE_DECL_STRLCPY size_t strlcpy(char *dst, const char *src, size_t siz); @@ -1797,9 +1958,6 @@ uint32_t arc4random(void); # if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM) uint32_t arc4random_uniform(uint32_t upper_bound); # endif -# if !HAVE_DECL_REALLOCARRAY -void *reallocarray(void *ptr, size_t nmemb, size_t size); -# endif #endif /* HAVE_LIBRESSL */ #ifndef HAVE_ARC4RANDOM int getentropy(void* buf, size_t len); diff --git a/contrib/README b/contrib/README index 262ccc7db42d4b1d1b1cb822a88c1aabb51a5829..f12e52f2554babfb5124b0a8f9d6e01e93bf7668 100644 --- a/contrib/README +++ b/contrib/README @@ -40,3 +40,12 @@ distribution but may be helpful. redis backend) redis Python modules. * unbound-fuzzme.patch: adds unbound-fuzzme program that parses a packet from stdin. Used with fuzzers, patch from Jacob Hoffman-Andrews. +* unbound-fuzzers.tar.bz2: three programs for fuzzing, that are 1:1 + replacements for unbound-fuzzme.c that gets created after applying + the contrib/unbound-fuzzme.patch. They are contributed by + Eric Sesterhenn from X41 D-Sec. +* drop-tld.diff: adds option drop-tld: yesno that drops 2 label queries, + to stop random floods. Apply with patch -p1 < contrib/drop-tld.diff and + compile. From Saksham Manchanda (Secure64). Please note that we think + this will drop DNSKEY and DS lookups for tlds and hence break DNSSEC + lookups for downstream clients. diff --git a/contrib/create_unbound_ad_servers.sh b/contrib/create_unbound_ad_servers.sh index d31f078b3d39652a06d7b02f37f32fb9570d3ad1..49fdbffedfaff2b3e3266424c1b6397183f90f91 100644 --- a/contrib/create_unbound_ad_servers.sh +++ b/contrib/create_unbound_ad_servers.sh @@ -9,12 +9,13 @@ # Variables dst_dir="/etc/opt/csw/unbound" work_dir="/tmp" -list_addr="http://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=1&startdate%5Bday%5D=&startdate%5Bmonth%5D=&startdate%5Byear%5D=" +list_addr="https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=1&startdate%5Bday%5D=&startdate%5Bmonth%5D=&startdate%5Byear%5D=" # OS commands CAT=`which cat` ECHO=`which echo` WGET=`which wget` +TR=`which tr` # Check Wget installed if [ ! -f $WGET ]; then @@ -22,8 +23,10 @@ if [ ! -f $WGET ]; then exit 1 fi +# remove special characters with tr to protect unbound.conf $WGET -O $work_dir/yoyo_ad_servers "$list_addr" && \ $CAT $work_dir/yoyo_ad_servers | \ +$TR -d '";$\\' | \ while read line ; \ do \ $ECHO "local-zone: \"$line\" redirect" ;\ @@ -36,4 +39,4 @@ echo "Done." # the unbound_ad_servers file: # # include: $dst_dir/unbound_ad_servers -# \ No newline at end of file +# diff --git a/contrib/drop-tld.diff b/contrib/drop-tld.diff new file mode 100644 index 0000000000000000000000000000000000000000..173825b3722bca383c78474c297d806b1386330e --- /dev/null +++ b/contrib/drop-tld.diff @@ -0,0 +1,82 @@ +diff --git a/daemon/worker.c b/daemon/worker.c +index 263fcdd..f787b70 100644 +--- a/daemon/worker.c ++++ b/daemon/worker.c +@@ -1213,6 +1213,15 @@ worker_handle_request(struct comm_point* c, void* arg, int error, + addr_to_str(&repinfo->addr, repinfo->addrlen, ip, sizeof(ip)); + log_query_in(ip, qinfo.qname, qinfo.qtype, qinfo.qclass); + } ++ ++ if(worker->env.cfg->drop_tld) { ++ int lab = dname_count_labels(qinfo.qname); ++ if (lab == 2) { ++ comm_point_drop_reply(repinfo); ++ verbose(VERB_ALGO, "Dropping one label query."); ++ return 0; ++ } ++ } + if(qinfo.qtype == LDNS_RR_TYPE_AXFR || + qinfo.qtype == LDNS_RR_TYPE_IXFR) { + verbose(VERB_ALGO, "worker request: refused zone transfer."); +diff --git a/util/config_file.h b/util/config_file.h +index b3ef930..2791541 100644 +--- a/util/config_file.h ++++ b/util/config_file.h +@@ -274,6 +274,8 @@ struct config_file { + int prefetch_key; + /** deny queries of type ANY with an empty answer */ + int deny_any; ++ /** Drop TLD queries from clients **/ ++ int drop_tld; + + /** chrootdir, if not "" or chroot will be done */ + char* chrootdir; +diff --git a/util/configlexer.lex b/util/configlexer.lex +index a86ddf5..9bbedbb 100644 +--- a/util/configlexer.lex ++++ b/util/configlexer.lex +@@ -299,6 +299,7 @@ private-domain{COLON} { YDVAR(1, VAR_PRIVATE_DOMAIN) } + prefetch-key{COLON} { YDVAR(1, VAR_PREFETCH_KEY) } + prefetch{COLON} { YDVAR(1, VAR_PREFETCH) } + deny-any{COLON} { YDVAR(1, VAR_DENY_ANY) } ++drop-tld{COLON} { YDVAR(1, VAR_DROP_TLD) } + stub-zone{COLON} { YDVAR(0, VAR_STUB_ZONE) } + name{COLON} { YDVAR(1, VAR_NAME) } + stub-addr{COLON} { YDVAR(1, VAR_STUB_ADDR) } +diff --git a/util/configparser.y b/util/configparser.y +index 10227a2..567d68e 100644 +--- a/util/configparser.y ++++ b/util/configparser.y +@@ -164,6 +164,7 @@ extern struct config_parser_state* cfg_parser; + %token VAR_FAST_SERVER_PERMIL VAR_FAST_SERVER_NUM + %token VAR_ALLOW_NOTIFY VAR_TLS_WIN_CERT VAR_TCP_CONNECTION_LIMIT + %token VAR_FORWARD_NO_CACHE VAR_STUB_NO_CACHE VAR_LOG_SERVFAIL VAR_DENY_ANY ++%token VAR_DROP_TLD + %token VAR_UNKNOWN_SERVER_TIME_LIMIT VAR_LOG_TAG_QUERYREPLY + %token VAR_STREAM_WAIT_SIZE VAR_TLS_CIPHERS VAR_TLS_CIPHERSUITES + %token VAR_TLS_SESSION_TICKET_KEYS +@@ -266,6 +267,7 @@ content_server: server_num_threads | server_verbosity | server_port | + server_tls_cert_bundle | server_tls_additional_port | server_low_rtt | + server_fast_server_permil | server_fast_server_num | server_tls_win_cert | + server_tcp_connection_limit | server_log_servfail | server_deny_any | ++ server_drop_tld | + server_unknown_server_time_limit | server_log_tag_queryreply | + server_stream_wait_size | server_tls_ciphers | + server_tls_ciphersuites | server_tls_session_ticket_keys +@@ -1466,6 +1468,16 @@ server_deny_any: VAR_DENY_ANY STRING_ARG + free($2); + } + ; ++ ++server_drop_tld: VAR_DROP_TLD STRING_ARG ++ { ++ OUTYY(("P(server_drop_tld:%s)\n", $2)); ++ if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0) ++ yyerror("expected yes or no."); ++ else cfg_parser->cfg->drop_tld = (strcmp($2, "yes")==0); ++ free($2); ++ } ++ ; + server_unwanted_reply_threshold: VAR_UNWANTED_REPLY_THRESHOLD STRING_ARG + { + OUTYY(("P(server_unwanted_reply_threshold:%s)\n", $2)); diff --git a/contrib/fastrpz.patch b/contrib/fastrpz.patch index 0291ea3d81a4dd07de809bbfecbcd59b1241a855..c38ac22b984f78e9e60404222039610c3b0e7500 100644 --- a/contrib/fastrpz.patch +++ b/contrib/fastrpz.patch @@ -1,11 +1,11 @@ Description: based on the included patch contrib/fastrpz.patch Author: fastrpz@farsightsecurity.com --- -Index: unboundfastrpz/Makefile.in -=================================================================== ---- unboundfastrpz/Makefile.in (revision 5073) -+++ unboundfastrpz/Makefile.in (working copy) -@@ -23,6 +23,8 @@ +diff --git a/Makefile.in b/Makefile.in +index 721c01b6..56bfb560 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -23,6 +23,8 @@ CHECKLOCK_SRC=testcode/checklocks.c CHECKLOCK_OBJ=@CHECKLOCK_OBJ@ DNSTAP_SRC=@DNSTAP_SRC@ DNSTAP_OBJ=@DNSTAP_OBJ@ @@ -14,25 +14,25 @@ Index: unboundfastrpz/Makefile.in DNSCRYPT_SRC=@DNSCRYPT_SRC@ DNSCRYPT_OBJ=@DNSCRYPT_OBJ@ WITH_PYTHONMODULE=@WITH_PYTHONMODULE@ -@@ -126,7 +128,7 @@ +@@ -126,7 +128,7 @@ validator/val_sigcrypt.c validator/val_utils.c dns64/dns64.c \ edns-subnet/edns-subnet.c edns-subnet/subnetmod.c \ edns-subnet/addrtree.c edns-subnet/subnet-whitelist.c \ cachedb/cachedb.c cachedb/redis.c respip/respip.c $(CHECKLOCK_SRC) \ --$(DNSTAP_SRC) $(DNSCRYPT_SRC) $(IPSECMOD_SRC) -+$(DNSTAP_SRC) $(FASTRPZ_SRC) $(DNSCRYPT_SRC) $(IPSECMOD_SRC) +-$(DNSTAP_SRC) $(DNSCRYPT_SRC) $(IPSECMOD_SRC) $(IPSET_SRC) ++$(DNSTAP_SRC) $(FASTRPZ_SRC) $(DNSCRYPT_SRC) $(IPSECMOD_SRC) $(IPSET_SRC) COMMON_OBJ_WITHOUT_NETCALL=dns.lo infra.lo rrset.lo dname.lo msgencode.lo \ as112.lo msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ -@@ -139,7 +141,7 @@ +@@ -139,7 +141,7 @@ autotrust.lo val_anchor.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo cachedb.lo redis.lo authzone.lo \ $(SUBNET_OBJ) $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) $(DNSTAP_OBJ) $(DNSCRYPT_OBJ) \ --$(IPSECMOD_OBJ) respip.lo -+$(FASTRPZ_OBJ) $(IPSECMOD_OBJ) respip.lo +-$(IPSECMOD_OBJ) $(IPSET_OBJ) respip.lo ++$(FASTRPZ_OBJ) $(IPSECMOD_OBJ) $(IPSET_OBJ) respip.lo COMMON_OBJ_WITHOUT_UB_EVENT=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo COMMON_OBJ=$(COMMON_OBJ_WITHOUT_UB_EVENT) ub_event.lo -@@ -405,6 +407,11 @@ +@@ -409,6 +411,11 @@ dnscrypt.lo dnscrypt.o: $(srcdir)/dnscrypt/dnscrypt.c config.h \ $(srcdir)/util/config_file.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h @@ -44,11 +44,11 @@ Index: unboundfastrpz/Makefile.in # Python Module pythonmod.lo pythonmod.o: $(srcdir)/pythonmod/pythonmod.c config.h \ pythonmod/interface.h \ -Index: unboundfastrpz/config.h.in -=================================================================== ---- unboundfastrpz/config.h.in (revision 5073) -+++ unboundfastrpz/config.h.in (working copy) -@@ -1293,4 +1293,11 @@ +diff --git a/config.h.in b/config.h.in +index 8c2aa3b9..efaf6450 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -1325,4 +1325,11 @@ void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file, /** the version of unbound-control that this software implements */ #define UNBOUND_CONTROL_VERSION 1 @@ -61,11 +61,11 @@ Index: unboundfastrpz/config.h.in +#undef FASTRPZ_LIB_OPEN +/** turn on fastrpz response policy zones */ +#undef ENABLE_FASTRPZ -Index: unboundfastrpz/configure.ac -=================================================================== ---- unboundfastrpz/configure.ac (revision 5073) -+++ unboundfastrpz/configure.ac (working copy) -@@ -6,6 +6,7 @@ +diff --git a/configure.ac b/configure.ac +index 5276d441..9d74592e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -6,6 +6,7 @@ sinclude(ax_pthread.m4) sinclude(acx_python.m4) sinclude(ac_pkg_swig.m4) sinclude(dnstap/dnstap.m4) @@ -73,7 +73,7 @@ Index: unboundfastrpz/configure.ac sinclude(dnscrypt/dnscrypt.m4) # must be numbers. ac_defun because of later processing -@@ -1575,6 +1576,9 @@ +@@ -1726,6 +1727,9 @@ case "$enable_ipset" in ;; esac @@ -83,10 +83,10 @@ Index: unboundfastrpz/configure.ac AC_MSG_CHECKING([if ${MAKE:-make} supports $< with implicit rule in scope]) # on openBSD, the implicit rule make $< work. # on Solaris, it does not work ($? is changed sources, $^ lists dependencies). -Index: unboundfastrpz/daemon/daemon.c -=================================================================== ---- unboundfastrpz/daemon/daemon.c (revision 5073) -+++ unboundfastrpz/daemon/daemon.c (working copy) +diff --git a/daemon/daemon.c b/daemon/daemon.c +index 0b1200a2..5857c18b 100644 +--- a/daemon/daemon.c ++++ b/daemon/daemon.c @@ -91,6 +91,9 @@ #include "sldns/keyraw.h" #include "respip/respip.h" @@ -97,36 +97,36 @@ Index: unboundfastrpz/daemon/daemon.c #ifdef HAVE_SYSTEMD #include -@@ -462,6 +465,14 @@ +@@ -458,6 +461,14 @@ daemon_create_workers(struct daemon* daemon) + dt_apply_cfg(daemon->dtenv, daemon->cfg); + #else fatal_exit("dnstap enabled in config but not built with dnstap support"); - #endif - } ++#endif ++ } + if(daemon->cfg->rpz_enable) { +#ifdef ENABLE_FASTRPZ + rpz_init(&daemon->rpz_clist, &daemon->rpz_client, daemon->cfg); +#else + fatal_exit("fastrpz enabled in config" + " but not built with fastrpz"); -+#endif -+ } + #endif + } for(i=0; inum; i++) { - if(!(daemon->workers[i] = worker_create(daemon, i, - shufport+numport*i/daemon->num, -@@ -719,6 +730,9 @@ +@@ -724,6 +735,9 @@ daemon_cleanup(struct daemon* daemon) + #ifdef USE_DNSCRYPT dnsc_delete(daemon->dnscenv); daemon->dnscenv = NULL; - #endif ++#endif +#ifdef ENABLE_FASTRPZ + rpz_delete(&daemon->rpz_clist, &daemon->rpz_client); -+#endif + #endif daemon->cfg = NULL; } - -Index: unboundfastrpz/daemon/daemon.h -=================================================================== ---- unboundfastrpz/daemon/daemon.h (revision 5073) -+++ unboundfastrpz/daemon/daemon.h (working copy) -@@ -136,6 +136,11 @@ +diff --git a/daemon/daemon.h b/daemon/daemon.h +index 5749dbef..64ce230f 100644 +--- a/daemon/daemon.h ++++ b/daemon/daemon.h +@@ -136,6 +136,11 @@ struct daemon { /** the dnscrypt environment */ struct dnsc_env* dnscenv; #endif @@ -138,10 +138,10 @@ Index: unboundfastrpz/daemon/daemon.h }; /** -Index: unboundfastrpz/daemon/worker.c -=================================================================== ---- unboundfastrpz/daemon/worker.c (revision 5073) -+++ unboundfastrpz/daemon/worker.c (working copy) +diff --git a/daemon/worker.c b/daemon/worker.c +index e2ce0e87..f031c656 100644 +--- a/daemon/worker.c ++++ b/daemon/worker.c @@ -75,6 +75,9 @@ #include "libunbound/context.h" #include "libunbound/libworker.h" @@ -152,7 +152,7 @@ Index: unboundfastrpz/daemon/worker.c #include "sldns/wire2str.h" #include "util/shm_side/shm_main.h" #include "dnscrypt/dnscrypt.h" -@@ -533,8 +536,27 @@ +@@ -533,8 +536,27 @@ answer_norec_from_cache(struct worker* worker, struct query_info* qinfo, /* not secure */ secure = 0; break; @@ -180,7 +180,7 @@ Index: unboundfastrpz/daemon/worker.c /* return this delegation from the cache */ edns_bak = *edns; edns->edns_version = EDNS_ADVERTISED_VERSION; -@@ -702,6 +724,23 @@ +@@ -699,6 +721,23 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo, secure = 0; } } else secure = 0; @@ -204,7 +204,7 @@ Index: unboundfastrpz/daemon/worker.c edns_bak = *edns; edns->edns_version = EDNS_ADVERTISED_VERSION; -@@ -1407,6 +1446,15 @@ +@@ -1410,6 +1449,15 @@ worker_handle_request(struct comm_point* c, void* arg, int error, log_addr(VERB_ALGO, "refused nonrec (cache snoop) query from", &repinfo->addr, repinfo->addrlen); goto send_reply; @@ -220,7 +220,7 @@ Index: unboundfastrpz/daemon/worker.c } /* If we've found a local alias, replace the qname with the alias -@@ -1455,12 +1503,21 @@ +@@ -1458,12 +1506,21 @@ lookup_cache: h = query_info_hash(lookup_qinfo, sldns_buffer_read_u16_at(c->buffer, 2)); if((e=slabhash_lookup(worker->env.msg_cache, h, lookup_qinfo, 0))) { /* answer from cache - we have acquired a readlock on it */ @@ -244,7 +244,7 @@ Index: unboundfastrpz/daemon/worker.c /* prefetch it if the prefetch TTL expired. * Note that if there is more than one pass * its qname must be that used for cache -@@ -1514,11 +1571,19 @@ +@@ -1518,11 +1575,19 @@ lookup_cache: lock_rw_unlock(&e->lock); } if(!LDNS_RD_WIRE(sldns_buffer_begin(c->buffer))) { @@ -266,11 +266,11 @@ Index: unboundfastrpz/daemon/worker.c goto send_reply; } verbose(VERB_ALGO, "answer norec from cache -- " -Index: unboundfastrpz/doc/unbound.conf.5.in -=================================================================== ---- unboundfastrpz/doc/unbound.conf.5.in (revision 5073) -+++ unboundfastrpz/doc/unbound.conf.5.in (working copy) -@@ -1781,6 +1781,81 @@ +diff --git a/doc/unbound.conf.5.in b/doc/unbound.conf.5.in +index 4bdfcd56..69e70627 100644 +--- a/doc/unbound.conf.5.in ++++ b/doc/unbound.conf.5.in +@@ -1801,6 +1801,81 @@ List domain for which the AAAA records are ignored and the A record is used by dns64 processing instead. Can be entered multiple times, list a new domain for which it applies, one per line. Applies also to names underneath the name given. @@ -352,10 +352,11 @@ Index: unboundfastrpz/doc/unbound.conf.5.in .SS "DNSCrypt Options" .LP The -Index: unboundfastrpz/fastrpz/librpz.h -=================================================================== ---- unboundfastrpz/fastrpz/librpz.h (nonexistent) -+++ unboundfastrpz/fastrpz/librpz.h (working copy) +diff --git a/fastrpz/librpz.h b/fastrpz/librpz.h +new file mode 100644 +index 00000000..645279d1 +--- /dev/null ++++ b/fastrpz/librpz.h @@ -0,0 +1,957 @@ +/* + * Define the interface from a DNS resolver to the Response Policy Zone @@ -1314,10 +1315,11 @@ Index: unboundfastrpz/fastrpz/librpz.h +#endif /* LIBRPZ_LIB_OPEN */ + +#endif /* LIBRPZ_H */ -Index: unboundfastrpz/fastrpz/rpz.c -=================================================================== ---- unboundfastrpz/fastrpz/rpz.c (nonexistent) -+++ unboundfastrpz/fastrpz/rpz.c (working copy) +diff --git a/fastrpz/rpz.c b/fastrpz/rpz.c +new file mode 100644 +index 00000000..c5ab7801 +--- /dev/null ++++ b/fastrpz/rpz.c @@ -0,0 +1,1352 @@ +/* + * fastrpz/rpz.c - interface to the fastrpz response policy zone library @@ -2671,10 +2673,11 @@ Index: unboundfastrpz/fastrpz/rpz.c +} + +#endif /* ENABLE_FASTRPZ */ -Index: unboundfastrpz/fastrpz/rpz.h -=================================================================== ---- unboundfastrpz/fastrpz/rpz.h (nonexistent) -+++ unboundfastrpz/fastrpz/rpz.h (working copy) +diff --git a/fastrpz/rpz.h b/fastrpz/rpz.h +new file mode 100644 +index 00000000..5d7e31c5 +--- /dev/null ++++ b/fastrpz/rpz.h @@ -0,0 +1,138 @@ +/* + * fastrpz/rpz.h - interface to the fastrpz response policy zone library @@ -2814,10 +2817,11 @@ Index: unboundfastrpz/fastrpz/rpz.h + +#endif /* ENABLE_FASTRPZ */ +#endif /* UNBOUND_FASTRPZ_RPZ_H */ -Index: unboundfastrpz/fastrpz/rpz.m4 -=================================================================== ---- unboundfastrpz/fastrpz/rpz.m4 (nonexistent) -+++ unboundfastrpz/fastrpz/rpz.m4 (working copy) +diff --git a/fastrpz/rpz.m4 b/fastrpz/rpz.m4 +new file mode 100644 +index 00000000..21235355 +--- /dev/null ++++ b/fastrpz/rpz.m4 @@ -0,0 +1,64 @@ +# fastrpz/rpz.m4 + @@ -2883,10 +2887,10 @@ Index: unboundfastrpz/fastrpz/rpz.m4 + AC_MSG_WARN([[dlopen and librpz.so needed for fastrpz]]) + fi +]) -Index: unboundfastrpz/iterator/iterator.c -=================================================================== ---- unboundfastrpz/iterator/iterator.c (revision 5073) -+++ unboundfastrpz/iterator/iterator.c (working copy) +diff --git a/iterator/iterator.c b/iterator/iterator.c +index 1e0113a8..2fcbf547 100644 +--- a/iterator/iterator.c ++++ b/iterator/iterator.c @@ -68,6 +68,9 @@ #include "sldns/str2wire.h" #include "sldns/parseutil.h" @@ -2897,7 +2901,7 @@ Index: unboundfastrpz/iterator/iterator.c /* in msec */ int UNKNOWN_SERVER_NICENESS = 376; -@@ -551,6 +554,23 @@ +@@ -555,6 +558,23 @@ handle_cname_response(struct module_qstate* qstate, struct iter_qstate* iq, if(ntohs(r->rk.type) == LDNS_RR_TYPE_CNAME && query_dname_compare(*mname, r->rk.dname) == 0 && !iter_find_rrset_in_prepend_answer(iq, r)) { @@ -2921,7 +2925,7 @@ Index: unboundfastrpz/iterator/iterator.c /* Add this relevant CNAME rrset to the prepend list.*/ if(!iter_add_prepend_answer(qstate, iq, r)) return 0; -@@ -559,6 +579,9 @@ +@@ -563,6 +583,9 @@ handle_cname_response(struct module_qstate* qstate, struct iter_qstate* iq, /* Other rrsets in the section are ignored. */ } @@ -2931,7 +2935,7 @@ Index: unboundfastrpz/iterator/iterator.c /* add authority rrsets to authority prepend, for wildcarded CNAMEs */ for(i=msg->rep->an_numrrsets; irep->an_numrrsets + msg->rep->ns_numrrsets; i++) { -@@ -1195,6 +1218,7 @@ +@@ -1199,6 +1222,7 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq, uint8_t* delname; size_t delnamelen; struct dns_msg* msg = NULL; @@ -2939,7 +2943,7 @@ Index: unboundfastrpz/iterator/iterator.c log_query_info(VERB_DETAIL, "resolving", &qstate->qinfo); /* check effort */ -@@ -1281,8 +1305,7 @@ +@@ -1285,8 +1309,7 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq, } if(msg) { /* handle positive cache response */ @@ -2949,7 +2953,7 @@ Index: unboundfastrpz/iterator/iterator.c if(verbosity >= VERB_ALGO) { log_dns_msg("msg from cache lookup", &msg->qinfo, msg->rep); -@@ -1290,7 +1313,22 @@ +@@ -1294,7 +1317,22 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq, (int)msg->rep->ttl, (int)msg->rep->prefetch_ttl); } @@ -2972,7 +2976,7 @@ Index: unboundfastrpz/iterator/iterator.c if(type == RESPONSE_TYPE_CNAME) { uint8_t* sname = 0; size_t slen = 0; -@@ -2694,6 +2732,62 @@ +@@ -2718,6 +2756,62 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, sock_list_insert(&qstate->reply_origin, &qstate->reply->addr, qstate->reply->addrlen, qstate->region); @@ -3035,7 +3039,7 @@ Index: unboundfastrpz/iterator/iterator.c if(iq->minimisation_state != DONOT_MINIMISE_STATE && !(iq->chase_flags & BIT_RD)) { if(FLAGS_GET_RCODE(iq->response->rep->flags) != -@@ -3440,6 +3534,10 @@ +@@ -3471,12 +3565,44 @@ processFinished(struct module_qstate* qstate, struct iter_qstate* iq, * but only if we did recursion. The nonrecursion referral * from cache does not need to be stored in the msg cache. */ if(!qstate->no_cache_store && qstate->query_flags&BIT_RD) { @@ -3046,7 +3050,6 @@ Index: unboundfastrpz/iterator/iterator.c iter_dns_store(qstate->env, &qstate->qinfo, iq->response->rep, 0, qstate->prefetch_leeway, iq->dp&&iq->dp->has_parent_side_NS, -@@ -3446,6 +3544,34 @@ qstate->region, qstate->query_flags); } } @@ -3081,11 +3084,11 @@ Index: unboundfastrpz/iterator/iterator.c qstate->return_rcode = LDNS_RCODE_NOERROR; qstate->return_msg = iq->response; return 0; -Index: unboundfastrpz/iterator/iterator.h -=================================================================== ---- unboundfastrpz/iterator/iterator.h (revision 5073) -+++ unboundfastrpz/iterator/iterator.h (working copy) -@@ -386,6 +386,16 @@ +diff --git a/iterator/iterator.h b/iterator/iterator.h +index a2f1b570..e1e4a738 100644 +--- a/iterator/iterator.h ++++ b/iterator/iterator.h +@@ -386,6 +386,16 @@ struct iter_qstate { */ int minimise_count; @@ -3102,11 +3105,11 @@ Index: unboundfastrpz/iterator/iterator.h /** * Count number of time-outs. Used to prevent resolving failures when * the QNAME minimisation QTYPE is blocked. */ -Index: unboundfastrpz/services/cache/dns.c -=================================================================== ---- unboundfastrpz/services/cache/dns.c (revision 5073) -+++ unboundfastrpz/services/cache/dns.c (working copy) -@@ -939,6 +939,14 @@ +diff --git a/services/cache/dns.c b/services/cache/dns.c +index aa4efec7..5dd3412e 100644 +--- a/services/cache/dns.c ++++ b/services/cache/dns.c +@@ -945,6 +945,14 @@ dns_cache_store(struct module_env* env, struct query_info* msgqinf, struct regional* region, uint32_t flags) { struct reply_info* rep = NULL; @@ -3121,10 +3124,10 @@ Index: unboundfastrpz/services/cache/dns.c /* alloc, malloc properly (not in region, like msg is) */ rep = reply_info_copy(msgrep, env->alloc, NULL); if(!rep) -Index: unboundfastrpz/services/mesh.c -=================================================================== ---- unboundfastrpz/services/mesh.c (revision 5073) -+++ unboundfastrpz/services/mesh.c (working copy) +diff --git a/services/mesh.c b/services/mesh.c +index d4f814d5..624a9d95 100644 +--- a/services/mesh.c ++++ b/services/mesh.c @@ -60,6 +60,9 @@ #include "sldns/wire2str.h" #include "services/localzone.h" @@ -3135,7 +3138,7 @@ Index: unboundfastrpz/services/mesh.c #include "respip/respip.h" #include "services/listen_dnsport.h" -@@ -1072,6 +1075,13 @@ +@@ -1076,6 +1079,13 @@ mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep, else secure = 0; if(!rep && rcode == LDNS_RCODE_NOERROR) rcode = LDNS_RCODE_SERVFAIL; @@ -3149,7 +3152,7 @@ Index: unboundfastrpz/services/mesh.c /* send the reply */ /* We don't reuse the encoded answer if either the previous or current * response has a local alias. We could compare the alias records -@@ -1247,6 +1257,7 @@ +@@ -1255,6 +1265,7 @@ struct mesh_state* mesh_area_find(struct mesh_area* mesh, key.s.is_valrec = valrec; key.s.qinfo = *qinfo; key.s.query_flags = qflags; @@ -3157,7 +3160,7 @@ Index: unboundfastrpz/services/mesh.c /* We are searching for a similar mesh state when we DO want to * aggregate the state. Thus unique is set to NULL. (default when we * desire aggregation).*/ -@@ -1293,6 +1304,10 @@ +@@ -1301,6 +1312,10 @@ int mesh_state_add_reply(struct mesh_state* s, struct edns_data* edns, if(!r) return 0; r->query_reply = *rep; @@ -3168,11 +3171,11 @@ Index: unboundfastrpz/services/mesh.c r->edns = *edns; if(edns->opt_list) { r->edns.opt_list = edns_opt_copy_region(edns->opt_list, -Index: unboundfastrpz/util/config_file.c -=================================================================== ---- unboundfastrpz/util/config_file.c (revision 5073) -+++ unboundfastrpz/util/config_file.c (working copy) -@@ -1418,6 +1418,8 @@ +diff --git a/util/config_file.c b/util/config_file.c +index 119b2223..ce43a234 100644 +--- a/util/config_file.c ++++ b/util/config_file.c +@@ -1434,6 +1434,8 @@ config_delete(struct config_file* cfg) free(cfg->dnstap_socket_path); free(cfg->dnstap_identity); free(cfg->dnstap_version); @@ -3180,12 +3183,12 @@ Index: unboundfastrpz/util/config_file.c + free(cfg->rpz_cstr); config_deldblstrlist(cfg->ratelimit_for_domain); config_deldblstrlist(cfg->ratelimit_below_domain); - #ifdef USE_IPSECMOD -Index: unboundfastrpz/util/config_file.h -=================================================================== ---- unboundfastrpz/util/config_file.h (revision 5073) -+++ unboundfastrpz/util/config_file.h (working copy) -@@ -490,6 +490,11 @@ + config_delstrlist(cfg->python_script); +diff --git a/util/config_file.h b/util/config_file.h +index b3ef930a..56173b80 100644 +--- a/util/config_file.h ++++ b/util/config_file.h +@@ -494,6 +494,11 @@ struct config_file { /** true to disable DNSSEC lameness check in iterator */ int disable_dnssec_lame_check; @@ -3197,11 +3200,11 @@ Index: unboundfastrpz/util/config_file.h /** ratelimit for ip addresses. 0 is off, otherwise qps (unless overridden) */ int ip_ratelimit; /** number of slabs for ip_ratelimit cache */ -Index: unboundfastrpz/util/configlexer.lex -=================================================================== ---- unboundfastrpz/util/configlexer.lex (revision 5073) -+++ unboundfastrpz/util/configlexer.lex (working copy) -@@ -439,6 +439,10 @@ +diff --git a/util/configlexer.lex b/util/configlexer.lex +index a86ddf55..b56bcfb4 100644 +--- a/util/configlexer.lex ++++ b/util/configlexer.lex +@@ -438,6 +438,10 @@ dnstap-log-forwarder-query-messages{COLON} { YDVAR(1, VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES) } dnstap-log-forwarder-response-messages{COLON} { YDVAR(1, VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES) } @@ -3212,11 +3215,11 @@ Index: unboundfastrpz/util/configlexer.lex disable-dnssec-lame-check{COLON} { YDVAR(1, VAR_DISABLE_DNSSEC_LAME_CHECK) } ip-ratelimit{COLON} { YDVAR(1, VAR_IP_RATELIMIT) } ratelimit{COLON} { YDVAR(1, VAR_RATELIMIT) } -Index: unboundfastrpz/util/configparser.y -=================================================================== ---- unboundfastrpz/util/configparser.y (revision 5073) -+++ unboundfastrpz/util/configparser.y (working copy) -@@ -125,6 +125,7 @@ +diff --git a/util/configparser.y b/util/configparser.y +index 10227a2f..cdbcf7cd 100644 +--- a/util/configparser.y ++++ b/util/configparser.y +@@ -125,6 +125,7 @@ extern struct config_parser_state* cfg_parser; %token VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES %token VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES %token VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES @@ -3224,7 +3227,7 @@ Index: unboundfastrpz/util/configparser.y %token VAR_RESPONSE_IP_TAG VAR_RESPONSE_IP VAR_RESPONSE_IP_DATA %token VAR_HARDEN_ALGO_DOWNGRADE VAR_IP_TRANSPARENT %token VAR_DISABLE_DNSSEC_LAME_CHECK -@@ -170,7 +171,7 @@ +@@ -171,7 +172,7 @@ extern struct config_parser_state* cfg_parser; %% toplevelvars: /* empty */ | toplevelvars toplevelvar ; @@ -3233,7 +3236,7 @@ Index: unboundfastrpz/util/configparser.y forwardstart contents_forward | pythonstart contents_py | rcstart contents_rc | dtstart contents_dt | viewstart contents_view | dnscstart contents_dnsc | cachedbstart contents_cachedb | -@@ -2708,6 +2709,50 @@ +@@ -2726,6 +2727,50 @@ dt_dnstap_log_forwarder_response_messages: VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MES free($2); } ; @@ -3261,8 +3264,8 @@ Index: unboundfastrpz/util/configparser.y + + OUTYY(("P(rpz_zone:%s)\n", $2)); + old_cstr = cfg_parser->cfg->rpz_cstr; -+ (void)asprintf(&new_cstr, "%s\nzone %s", old_cstr?old_cstr:"", $2); -+ if(!new_cstr) ++ if(asprintf(&new_cstr, "%s\nzone %s", old_cstr?old_cstr:"", $2) == -1) {new_cstr = NULL; yyerror("out of memory");} ++ else if(!new_cstr) + yyerror("out of memory"); + free(old_cstr); + cfg_parser->cfg->rpz_cstr = new_cstr; @@ -3274,8 +3277,8 @@ Index: unboundfastrpz/util/configparser.y + + OUTYY(("P(rpz_option:%s)\n", $2)); + old_cstr = cfg_parser->cfg->rpz_cstr; -+ (void)asprintf(&new_cstr, "%s\n%s", old_cstr ? old_cstr : "", $2); -+ if(!new_cstr) ++ if(asprintf(&new_cstr, "%s\n%s", old_cstr ? old_cstr : "", $2) == -1) {new_cstr = NULL; yyerror("out of memory");} ++ else if(!new_cstr) + yyerror("out of memory"); + free(old_cstr); + cfg_parser->cfg->rpz_cstr = new_cstr; @@ -3284,11 +3287,11 @@ Index: unboundfastrpz/util/configparser.y pythonstart: VAR_PYTHON { OUTYY(("\nP(python:)\n")); -Index: unboundfastrpz/util/data/msgencode.c -=================================================================== ---- unboundfastrpz/util/data/msgencode.c (revision 5073) -+++ unboundfastrpz/util/data/msgencode.c (working copy) -@@ -590,6 +590,35 @@ +diff --git a/util/data/msgencode.c b/util/data/msgencode.c +index a51a4b9b..475dfce9 100644 +--- a/util/data/msgencode.c ++++ b/util/data/msgencode.c +@@ -590,6 +590,35 @@ insert_section(struct reply_info* rep, size_t num_rrsets, uint16_t* num_rrs, return RETVAL_OK; } @@ -3324,10 +3327,10 @@ Index: unboundfastrpz/util/data/msgencode.c /** store query section in wireformat buffer, return RETVAL */ static int insert_query(struct query_info* qinfo, struct compress_tree_node** tree, -@@ -753,6 +782,19 @@ - return 0; +@@ -777,6 +806,19 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep, + } + sldns_buffer_write_u16_at(buffer, 10, arcount); } - sldns_buffer_write_u16_at(buffer, 10, arcount); +#ifdef ENABLE_FASTRPZ + } else if(rep->security == sec_status_rpz_rewritten) { + /* Insert the RPZ SOA for rpz even with MINIMAL_RESPONSES */ @@ -3344,11 +3347,11 @@ Index: unboundfastrpz/util/data/msgencode.c } sldns_buffer_flip(buffer); return 1; -Index: unboundfastrpz/util/data/packed_rrset.c -=================================================================== ---- unboundfastrpz/util/data/packed_rrset.c (revision 5073) -+++ unboundfastrpz/util/data/packed_rrset.c (working copy) -@@ -255,6 +255,10 @@ +diff --git a/util/data/packed_rrset.c b/util/data/packed_rrset.c +index 7b9d5494..e44b2ce5 100644 +--- a/util/data/packed_rrset.c ++++ b/util/data/packed_rrset.c +@@ -255,6 +255,10 @@ sec_status_to_string(enum sec_status s) case sec_status_insecure: return "sec_status_insecure"; case sec_status_secure_sentinel_fail: return "sec_status_secure_sentinel_fail"; case sec_status_secure: return "sec_status_secure"; @@ -3359,11 +3362,11 @@ Index: unboundfastrpz/util/data/packed_rrset.c } return "unknown_sec_status_value"; } -Index: unboundfastrpz/util/data/packed_rrset.h -=================================================================== ---- unboundfastrpz/util/data/packed_rrset.h (revision 5073) -+++ unboundfastrpz/util/data/packed_rrset.h (working copy) -@@ -193,7 +193,15 @@ +diff --git a/util/data/packed_rrset.h b/util/data/packed_rrset.h +index 3a5335dd..20113217 100644 +--- a/util/data/packed_rrset.h ++++ b/util/data/packed_rrset.h +@@ -193,7 +193,15 @@ enum sec_status { sec_status_secure_sentinel_fail, /** SECURE means that the object (RRset or message) validated * according to local policy. */ @@ -3380,10 +3383,10 @@ Index: unboundfastrpz/util/data/packed_rrset.h }; /** -Index: unboundfastrpz/util/netevent.c -=================================================================== ---- unboundfastrpz/util/netevent.c (revision 5073) -+++ unboundfastrpz/util/netevent.c (working copy) +diff --git a/util/netevent.c b/util/netevent.c +index 980bb8be..d537d288 100644 +--- a/util/netevent.c ++++ b/util/netevent.c @@ -57,6 +57,9 @@ #ifdef HAVE_OPENSSL_ERR_H #include @@ -3394,7 +3397,7 @@ Index: unboundfastrpz/util/netevent.c /* -------- Start of local definitions -------- */ /** if CMSG_ALIGN is not defined on this platform, a workaround */ -@@ -590,6 +593,9 @@ +@@ -590,6 +593,9 @@ comm_point_udp_ancil_callback(int fd, short event, void* arg) struct cmsghdr* cmsg; #endif /* S_SPLINT_S */ @@ -3404,7 +3407,7 @@ Index: unboundfastrpz/util/netevent.c rep.c = (struct comm_point*)arg; log_assert(rep.c->type == comm_udp); -@@ -679,6 +685,9 @@ +@@ -679,6 +685,9 @@ comm_point_udp_callback(int fd, short event, void* arg) int i; struct sldns_buffer *buffer; @@ -3414,7 +3417,7 @@ Index: unboundfastrpz/util/netevent.c rep.c = (struct comm_point*)arg; log_assert(rep.c->type == comm_udp); -@@ -722,6 +731,9 @@ +@@ -722,6 +731,9 @@ comm_point_udp_callback(int fd, short event, void* arg) (void)comm_point_send_udp_msg(rep.c, buffer, (struct sockaddr*)&rep.addr, rep.addrlen); } @@ -3424,7 +3427,7 @@ Index: unboundfastrpz/util/netevent.c if(!rep.c || rep.c->fd != fd) /* commpoint closed to -1 or reused for another UDP port. Note rep.c cannot be reused with TCP fd. */ break; -@@ -3108,6 +3120,9 @@ +@@ -3184,6 +3196,9 @@ comm_point_send_reply(struct comm_reply *repinfo) repinfo->c->tcp_timeout_msec); } } @@ -3434,9 +3437,9 @@ Index: unboundfastrpz/util/netevent.c } void -@@ -3117,6 +3132,9 @@ +@@ -3193,6 +3208,9 @@ comm_point_drop_reply(struct comm_reply* repinfo) return; - log_assert(repinfo && repinfo->c); + log_assert(repinfo->c); log_assert(repinfo->c->type != comm_tcp_accept); +#ifdef ENABLE_FASTRPZ + rpz_end(repinfo); @@ -3444,21 +3447,21 @@ Index: unboundfastrpz/util/netevent.c if(repinfo->c->type == comm_udp) return; if(repinfo->c->tcp_req_info) -@@ -3138,6 +3156,9 @@ +@@ -3214,6 +3232,9 @@ comm_point_start_listening(struct comm_point* c, int newfd, int msec) { - verbose(VERB_ALGO, "comm point start listening %d", - c->fd==-1?newfd:c->fd); + verbose(VERB_ALGO, "comm point start listening %d (%d msec)", + c->fd==-1?newfd:c->fd, msec); +#ifdef ENABLE_FASTRPZ + rpz_end(&c->repinfo); +#endif if(c->type == comm_tcp_accept && !c->tcp_free) { /* no use to start listening no free slots. */ return; -Index: unboundfastrpz/util/netevent.h -=================================================================== ---- unboundfastrpz/util/netevent.h (revision 5073) -+++ unboundfastrpz/util/netevent.h (working copy) -@@ -120,6 +120,10 @@ +diff --git a/util/netevent.h b/util/netevent.h +index d80c72b3..0233292f 100644 +--- a/util/netevent.h ++++ b/util/netevent.h +@@ -120,6 +120,10 @@ struct comm_reply { /** return type 0 (none), 4(IP4), 6(IP6) */ int srctype; /* DnsCrypt context */ @@ -3469,11 +3472,11 @@ Index: unboundfastrpz/util/netevent.h #ifdef USE_DNSCRYPT uint8_t client_nonce[crypto_box_HALF_NONCEBYTES]; uint8_t nmkey[crypto_box_BEFORENMBYTES]; -Index: unboundfastrpz/validator/validator.c -=================================================================== ---- unboundfastrpz/validator/validator.c (revision 5073) -+++ unboundfastrpz/validator/validator.c (working copy) -@@ -2755,6 +2755,12 @@ +diff --git a/validator/validator.c b/validator/validator.c +index 4c560a8e..71de3760 100644 +--- a/validator/validator.c ++++ b/validator/validator.c +@@ -2755,6 +2755,12 @@ ds_response_to_ke(struct module_qstate* qstate, struct val_qstate* vq, default: /* NSEC proof did not work, try next */ break; @@ -3486,7 +3489,7 @@ Index: unboundfastrpz/validator/validator.c } sec = nsec3_prove_nods(qstate->env, ve, -@@ -2788,6 +2794,12 @@ +@@ -2788,6 +2794,12 @@ ds_response_to_ke(struct module_qstate* qstate, struct val_qstate* vq, default: /* NSEC3 proof did not work */ break; diff --git a/contrib/libunbound.so.conf b/contrib/libunbound.so.conf index 3b78fca7f378b583f1311fdf4ae4f15d96860f51..7cf26fee492e38ba486cb94945885f05ae63ca53 100644 --- a/contrib/libunbound.so.conf +++ b/contrib/libunbound.so.conf @@ -14,6 +14,7 @@ int ub_ctx_set_option(ub_ctx*, string, string); int ub_ctx_get_option(ub_ctx*, string, +string*); int ub_ctx_config(ub_ctx*, string); int ub_ctx_set_fwd(ub_ctx*, string); +int ub_ctx_set_tls(ub_ctx*, bool(int)); int ub_ctx_set_stub(ub_ctx*, string, string, bool(int)); int ub_ctx_resolvconf(ub_ctx*, string); int ub_ctx_hosts(ub_ctx*, string); diff --git a/contrib/unbound-fuzzers.tar.bz2 b/contrib/unbound-fuzzers.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..562aa15d825fceb99b92d840f7f5c13abaca01b1 Binary files /dev/null and b/contrib/unbound-fuzzers.tar.bz2 differ diff --git a/contrib/unbound.init b/contrib/unbound.init index 747f94e932ddf72d136ee0e03f1e08e0cf42bb2f..c5bb52bb4d6926078df70eb99107a9f51b526474 100644 --- a/contrib/unbound.init +++ b/contrib/unbound.init @@ -39,13 +39,13 @@ start() { # setup root jail if [ -s /etc/localtime ]; then [ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ; - if [ ! -e ${rootdir}/etc/localtime ] || /usr/bin/cmp -s /etc/localtime ${rootdir}/etc/localtime; then + if [ ! -e ${rootdir}/etc/localtime ] || ! /usr/bin/cmp -s /etc/localtime ${rootdir}/etc/localtime; then cp -fp /etc/localtime ${rootdir}/etc/localtime fi; fi; if [ -s /etc/resolv.conf ]; then [ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ; - if [ ! -e ${rootdir}/etc/resolv.conf ] || /usr/bin/cmp -s /etc/resolv.conf ${rootdir}/etc/resolv.conf; then + if [ ! -e ${rootdir}/etc/resolv.conf ] || ! /usr/bin/cmp -s /etc/resolv.conf ${rootdir}/etc/resolv.conf; then cp -fp /etc/resolv.conf ${rootdir}/etc/resolv.conf fi; fi; @@ -54,10 +54,10 @@ start() { [ -e ${rootdir}/dev/log ] || touch ${rootdir}/dev/log mount --bind -n /dev/log ${rootdir}/dev/log >/dev/null 2>&1; fi; - if ! egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/random' /proc/mounts; then + if ! egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/urandom' /proc/mounts; then [ -d ${rootdir}/dev ] || mkdir -p ${rootdir}/dev ; - [ -e ${rootdir}/dev/random ] || touch ${rootdir}/dev/random - mount --bind -n /dev/random ${rootdir}/dev/random >/dev/null 2>&1; + [ -e ${rootdir}/dev/urandom ] || touch ${rootdir}/dev/urandom + mount --bind -n /dev/urandom ${rootdir}/dev/urandom >/dev/null 2>&1; fi; # if not running, start it up here @@ -78,8 +78,8 @@ stop() { if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/log' /proc/mounts; then umount ${rootdir}/dev/log >/dev/null 2>&1 fi; - if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/random' /proc/mounts; then - umount ${rootdir}/dev/random >/dev/null 2>&1 + if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/urandom' /proc/mounts; then + umount ${rootdir}/dev/urandom >/dev/null 2>&1 fi; return $retval } diff --git a/contrib/unbound.init_fedora b/contrib/unbound.init_fedora index 9f7e4422b21eb990f9829be34e39d033881a7e3d..989440341989e693250cf5e501a8e74b64af4fdb 100644 --- a/contrib/unbound.init_fedora +++ b/contrib/unbound.init_fedora @@ -42,7 +42,7 @@ start() { cp -fp /etc/localtime ${rootdir}/etc/localtime fi; mount --bind -n /dev/log ${rootdir}/dev/log >/dev/null 2>&1; - mount --bind -n /dev/random ${rootdir}/dev/random >/dev/null 2>&1; + mount --bind -n /dev/urandom ${rootdir}/dev/urandom >/dev/null 2>&1; mount --bind -n /var/run/unbound ${rootdir}/var/run/unbound >/dev/null 2>&1; # if not running, start it up here @@ -58,7 +58,7 @@ stop() { killproc -p $pidfile unbound retval=$? [ $retval -eq 0 ] && rm -f $lockfile - for mountfile in /dev/log /dev/random /etc/localtime /etc/resolv.conf /var/run/unbound + for mountfile in /dev/log /dev/urandom /etc/localtime /etc/resolv.conf /var/run/unbound do if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}''${mountfile}'' /proc/mounts; then umount ${rootdir}$mountfile >/dev/null 2>&1 diff --git a/contrib/unbound.service.in b/contrib/unbound.service.in index 95976dd9425a536c4d8032cf12e1a36ca9704d77..6eb2d0c3fe40af61302bd072e49d25cb538fbde3 100644 --- a/contrib/unbound.service.in +++ b/contrib/unbound.service.in @@ -9,11 +9,11 @@ Wants=nss-lookup.target WantedBy=multi-user.target [Service] -ExecReload=/bin/kill -HUP $MAINPID -ExecStart=@UNBOUND_SBIN_DIR@/unbound +ExecReload=+/bin/kill -HUP $MAINPID +ExecStart=@UNBOUND_SBIN_DIR@/unbound -d NotifyAccess=main Type=notify -CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_SYS_RESOURCE +CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_SYS_RESOURCE CAP_NET_RAW MemoryDenyWriteExecute=true NoNewPrivileges=true PrivateDevices=true @@ -21,11 +21,18 @@ PrivateTmp=true ProtectHome=true ProtectControlGroups=true ProtectKernelModules=true -ProtectKernelTunables=true ProtectSystem=strict -ReadWritePaths=@UNBOUND_SYSCONF_DIR@ @UNBOUND_LOCALSTATE_DIR@ /run @UNBOUND_RUN_DIR@ +ReadWritePaths=/run @UNBOUND_RUN_DIR@ @UNBOUND_CHROOT_DIR@ +TemporaryFileSystem=@UNBOUND_CHROOT_DIR@/dev:ro +TemporaryFileSystem=@UNBOUND_CHROOT_DIR@/run:ro +BindReadOnlyPaths=-/run/systemd/notify:@UNBOUND_CHROOT_DIR@/run/systemd/notify +BindPaths=-@UNBOUND_PIDFILE@:@UNBOUND_CHROOT_DIR@@UNBOUND_PIDFILE@ +BindReadOnlyPaths=-/dev/urandom:@UNBOUND_CHROOT_DIR@/dev/urandom +BindPaths=-/dev/log:@UNBOUND_CHROOT_DIR@/dev/log RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX RestrictRealtime=true SystemCallArchitectures=native SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module mount @obsolete @resources - +RestrictNamespaces=yes +LockPersonality=yes +RestrictSUIDSGID=yes diff --git a/daemon/daemon.c b/daemon/daemon.c index e14edb99df05ae8f73491aa19cad59956ba87974..0b1200a2e00acd2dd1d9fcb6f85397ee2497a013 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -221,7 +221,9 @@ daemon_init(void) (void)sldns_key_EVP_load_gost_id(); # endif # if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_CRYPTO) +# ifndef S_SPLINT_S OpenSSL_add_all_algorithms(); +# endif # else OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS @@ -248,8 +250,6 @@ daemon_init(void) /* init timezone info while we are not chrooted yet */ tzset(); #endif - /* open /dev/random if needed */ - ub_systemseed((unsigned)time(NULL)^(unsigned)getpid()^0xe67); daemon->need_to_exit = 0; modstack_init(&daemon->mods); if(!(daemon->env = (struct module_env*)calloc(1, @@ -427,9 +427,7 @@ daemon_create_workers(struct daemon* daemon) int* shufport; log_assert(daemon && daemon->cfg); if(!daemon->rand) { - unsigned int seed = (unsigned int)time(NULL) ^ - (unsigned int)getpid() ^ 0x438; - daemon->rand = ub_initstate(seed, NULL); + daemon->rand = ub_initstate(NULL); if(!daemon->rand) fatal_exit("could not init random generator"); hash_set_raninit((uint32_t)ub_random(daemon->rand)); @@ -575,6 +573,9 @@ void daemon_fork(struct daemon* daemon) { int have_view_respip_cfg = 0; +#ifdef HAVE_SYSTEMD + int ret; +#endif log_assert(daemon); if(!(daemon->views = views_create())) @@ -660,7 +661,12 @@ daemon_fork(struct daemon* daemon) /* Start resolver service on main thread. */ #ifdef HAVE_SYSTEMD - sd_notify(0, "READY=1"); + ret = sd_notify(0, "READY=1"); + if(ret <= 0 && getenv("NOTIFY_SOCKET")) + fatal_exit("sd_notify failed %s: %s. Make sure that unbound has " + "access/permission to use the socket presented by systemd.", + getenv("NOTIFY_SOCKET"), + (ret==0?"no $NOTIFY_SOCKET": strerror(-ret))); #endif log_info("start of service (%s).", PACKAGE_STRING); worker_work(daemon->workers[0]); @@ -770,7 +776,7 @@ daemon_delete(struct daemon* daemon) # endif # ifdef HAVE_OPENSSL_CONFIG EVP_cleanup(); -# if OPENSSL_VERSION_NUMBER < 0x10100000 +# if (OPENSSL_VERSION_NUMBER < 0x10100000) && !defined(OPENSSL_NO_ENGINE) ENGINE_cleanup(); # endif CONF_modules_free(); diff --git a/daemon/remote.c b/daemon/remote.c index 48efba7409c8bce401715a9e92324afc470b41c4..25547f5705d95c1e35abc601ca5c6d3c473ae46c 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -499,7 +499,7 @@ int remote_accept_callback(struct comm_point* c, void* arg, int err, goto close_exit; } SSL_set_accept_state(n->ssl); - (void)SSL_set_mode(n->ssl, SSL_MODE_AUTO_RETRY); + (void)SSL_set_mode(n->ssl, (long)SSL_MODE_AUTO_RETRY); if(!SSL_set_fd(n->ssl, newfd)) { log_crypto_err("could not SSL_set_fd"); SSL_free(n->ssl); @@ -674,19 +674,19 @@ static void send_ok(RES* ssl) /** do the stop command */ static void -do_stop(RES* ssl, struct daemon_remote* rc) +do_stop(RES* ssl, struct worker* worker) { - rc->worker->need_to_exit = 1; - comm_base_exit(rc->worker->base); + worker->need_to_exit = 1; + comm_base_exit(worker->base); send_ok(ssl); } /** do the reload command */ static void -do_reload(RES* ssl, struct daemon_remote* rc) +do_reload(RES* ssl, struct worker* worker) { - rc->worker->need_to_exit = 0; - comm_base_exit(rc->worker->base); + worker->need_to_exit = 0; + comm_base_exit(worker->base); send_ok(ssl); } @@ -1070,9 +1070,9 @@ print_ext(RES* ssl, struct ub_stats_info* s) /** do the stats command */ static void -do_stats(RES* ssl, struct daemon_remote* rc, int reset) +do_stats(RES* ssl, struct worker* worker, int reset) { - struct daemon* daemon = rc->worker->daemon; + struct daemon* daemon = worker->daemon; struct ub_stats_info total; struct ub_stats_info s; int i; @@ -1080,7 +1080,7 @@ do_stats(RES* ssl, struct daemon_remote* rc, int reset) log_assert(daemon->num > 0); /* gather all thread statistics in one place */ for(i=0; inum; i++) { - server_stats_obtain(rc->worker, daemon->workers[i], &s, reset); + server_stats_obtain(worker, daemon->workers[i], &s, reset); if(!print_thread_stats(ssl, i, &s)) return; if(i == 0) @@ -1091,10 +1091,10 @@ do_stats(RES* ssl, struct daemon_remote* rc, int reset) total.mesh_time_median /= (double)daemon->num; if(!print_stats(ssl, "total", &total)) return; - if(!print_uptime(ssl, rc->worker, reset)) + if(!print_uptime(ssl, worker, reset)) return; if(daemon->cfg->stat_extended) { - if(!print_mem(ssl, rc->worker, daemon, &total)) + if(!print_mem(ssl, worker, daemon, &total)) return; if(!print_hist(ssl, &total)) return; @@ -1987,7 +1987,7 @@ parse_delegpt(RES* ssl, char* args, uint8_t* nm, int allow_names) return NULL; } } else { -#ifndef HAVE_SSL_SET1_HOST +#if ! defined(HAVE_SSL_SET1_HOST) && ! defined(HAVE_X509_VERIFY_PARAM_SET1_HOST) if(auth_name) log_err("no name verification functionality in " "ssl library, ignored name for %s", todo); @@ -2851,16 +2851,16 @@ execute_cmd(struct daemon_remote* rc, RES* ssl, char* cmd, char* p = skipwhite(cmd); /* compare command */ if(cmdcmp(p, "stop", 4)) { - do_stop(ssl, rc); + do_stop(ssl, worker); return; } else if(cmdcmp(p, "reload", 6)) { - do_reload(ssl, rc); + do_reload(ssl, worker); return; } else if(cmdcmp(p, "stats_noreset", 13)) { - do_stats(ssl, rc, 0); + do_stats(ssl, worker, 0); return; } else if(cmdcmp(p, "stats", 5)) { - do_stats(ssl, rc, 1); + do_stats(ssl, worker, 1); return; } else if(cmdcmp(p, "status", 6)) { do_status(ssl, worker); @@ -3125,7 +3125,7 @@ remote_handshake_later(struct daemon_remote* rc, struct rc_state* s, } else { if(r == 0) log_err("remote control connection closed prematurely"); - log_addr(1, "failed connection from", + log_addr(VERB_OPS, "failed connection from", &s->c->repinfo.addr, s->c->repinfo.addrlen); log_crypto_err("remote control failed ssl"); clean_point(rc, s); diff --git a/daemon/stats.c b/daemon/stats.c index 504b0efccc4a4ade3b0d54e5a6e9332e293bd051..a01fb6d342caa4456e7a3ce3f95622bfbfb27e5a 100644 --- a/daemon/stats.c +++ b/daemon/stats.c @@ -77,7 +77,7 @@ stats_timeval_add(long long* d_sec, long long* d_usec, long long add_sec, long l #ifndef S_SPLINT_S (*d_sec) += add_sec; (*d_usec) += add_usec; - if((*d_usec) > 1000000) { + if((*d_usec) >= 1000000) { (*d_usec) -= 1000000; (*d_sec)++; } diff --git a/daemon/unbound.c b/daemon/unbound.c index 4a508c13878b9458ac6e887f34ed4dbea02f6e46..beffb57005fa0bb0af170628be3697bb32916ab7 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -88,31 +88,20 @@ # include "nss.h" #endif -/** print usage. */ -static void usage(void) +/** print build options. */ +static void +print_build_options(void) { const char** m; const char *evnm="event", *evsys="", *evmethod=""; time_t t; struct timeval now; struct ub_event_base* base; - printf("usage: unbound [options]\n"); - printf(" start unbound daemon DNS resolver.\n"); - printf("-h this help\n"); - printf("-c file config file to read instead of %s\n", CONFIGFILE); - printf(" file format is described in unbound.conf(5).\n"); - printf("-d do not fork into the background.\n"); - printf("-p do not create a pidfile.\n"); - printf("-v verbose (more times to increase verbosity)\n"); -#ifdef UB_ON_WINDOWS - printf("-w opt windows option: \n"); - printf(" install, remove - manage the services entry\n"); - printf(" service - used to start from services control panel\n"); -#endif - printf("Version %s\n", PACKAGE_VERSION); + printf("Version %s\n\n", PACKAGE_VERSION); + printf("Configure line: %s\n", CONFCMDLINE); base = ub_default_event_base(0,&t,&now); ub_get_event_sys(base, &evnm, &evsys, &evmethod); - printf("linked libs: %s %s (it uses %s), %s\n", + printf("Linked libs: %s %s (it uses %s), %s\n", evnm, evsys, evmethod, #ifdef HAVE_SSL # ifdef SSLEAY_VERSION @@ -126,16 +115,42 @@ static void usage(void) "nettle" #endif ); - printf("linked modules:"); + printf("Linked modules:"); for(m = module_list_avail(); *m; m++) printf(" %s", *m); printf("\n"); #ifdef USE_DNSCRYPT printf("DNSCrypt feature available\n"); #endif +#ifdef USE_TCP_FASTOPEN + printf("TCP Fastopen feature available\n"); +#endif + ub_event_base_free(base); + printf("\nBSD licensed, see LICENSE in source package for details.\n"); + printf("Report bugs to %s\n", PACKAGE_BUGREPORT); +} + +/** print usage. */ +static void +usage(void) +{ + printf("usage: unbound [options]\n"); + printf(" start unbound daemon DNS resolver.\n"); + printf("-h this help.\n"); + printf("-c file config file to read instead of %s\n", CONFIGFILE); + printf(" file format is described in unbound.conf(5).\n"); + printf("-d do not fork into the background.\n"); + printf("-p do not create a pidfile.\n"); + printf("-v verbose (more times to increase verbosity).\n"); + printf("-V show version number and build options.\n"); +#ifdef UB_ON_WINDOWS + printf("-w opt windows option: \n"); + printf(" install, remove - manage the services entry\n"); + printf(" service - used to start from services control panel\n"); +#endif + printf("\nVersion %s\n", PACKAGE_VERSION); printf("BSD licensed, see LICENSE in source package for details.\n"); printf("Report bugs to %s\n", PACKAGE_BUGREPORT); - ub_event_base_free(base); } #ifndef unbound_testbound @@ -443,7 +458,8 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode, } } #endif - if(cfg->tls_session_ticket_keys.first) { + if(cfg->tls_session_ticket_keys.first && + cfg->tls_session_ticket_keys.first->str[0] != 0) { if(!listen_sslctx_setup_ticket_keys(daemon->listen_sslctx, cfg->tls_session_ticket_keys.first)) { fatal_exit("could not set session ticket SSL_CTX"); } @@ -719,7 +735,7 @@ main(int argc, char* argv[]) log_ident_default = strrchr(argv[0],'/')?strrchr(argv[0],'/')+1:argv[0]; log_ident_set(log_ident_default); /* parse the options */ - while( (c=getopt(argc, argv, "c:dhpvw:")) != -1) { + while( (c=getopt(argc, argv, "c:dhpvw:V")) != -1) { switch(c) { case 'c': cfgfile = optarg; @@ -740,6 +756,9 @@ main(int argc, char* argv[]) case 'w': winopt = optarg; break; + case 'V': + print_build_options(); + return 0; case '?': case 'h': default: @@ -768,7 +787,7 @@ main(int argc, char* argv[]) log_init(NULL, 0, NULL); /* close logfile */ #ifndef unbound_testbound if(log_get_lock()) { - lock_quick_destroy((lock_quick_type*)log_get_lock()); + lock_basic_destroy((lock_basic_type*)log_get_lock()); } #endif return 0; diff --git a/daemon/worker.c b/daemon/worker.c index c9504dd207be1e5958dcbc451acd0a72c23ad28a..e2ce0e87009be6f9596d13810938e872a7a60e48 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -660,10 +660,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo, if(!reply_check_cname_chain(qinfo, rep)) { /* cname chain invalid, redo iterator steps */ verbose(VERB_ALGO, "Cache reply: cname chain broken"); - bail_out: - rrset_array_unlock_touch(worker->env.rrset_cache, - worker->scratchpad, rep->ref, rep->rrset_count); - return 0; + goto bail_out; } } /* check security status of the cached answer */ @@ -724,8 +721,6 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo, if(encode_rep != rep) secure = 0; /* if rewritten, it can't be considered "secure" */ if(!encode_rep || *alias_rrset) { - sldns_buffer_clear(repinfo->c->buffer); - sldns_buffer_flip(repinfo->c->buffer); if(!encode_rep) *need_drop = 1; else { @@ -758,20 +753,28 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo, } /* go and return this buffer to the client */ return 1; + +bail_out: + rrset_array_unlock_touch(worker->env.rrset_cache, + worker->scratchpad, rep->ref, rep->rrset_count); + return 0; } -/** Reply to client and perform prefetch to keep cache up to date. - * If the buffer for the reply is empty, it indicates that only prefetch is - * necessary and the reply should be suppressed (because it's dropped or - * being deferred). */ +/** Reply to client and perform prefetch to keep cache up to date. */ static void reply_and_prefetch(struct worker* worker, struct query_info* qinfo, - uint16_t flags, struct comm_reply* repinfo, time_t leeway) + uint16_t flags, struct comm_reply* repinfo, time_t leeway, int noreply) { /* first send answer to client to keep its latency * as small as a cachereply */ - if(sldns_buffer_limit(repinfo->c->buffer) != 0) + if(!noreply) { + if(repinfo->c->tcp_req_info) { + sldns_buffer_copy( + repinfo->c->tcp_req_info->spool_buffer, + repinfo->c->buffer); + } comm_point_send_reply(repinfo); + } server_stats_prefetch(&worker->stats, worker); /* create the prefetch in the mesh as a normal lookup without @@ -1092,7 +1095,7 @@ worker_handle_request(struct comm_point* c, void* arg, int error, struct respip_client_info* cinfo = NULL, cinfo_tmp; memset(&qinfo, 0, sizeof(qinfo)); - if(error != NETEVENT_NOERROR) { + if(error != NETEVENT_NOERROR || !repinfo) { /* some bad tcp query DNS formats give these error calls */ verbose(VERB_ALGO, "handle request called with err=%d", error); return 0; @@ -1171,7 +1174,7 @@ worker_handle_request(struct comm_point* c, void* arg, int error, /* check if this query should be dropped based on source ip rate limiting */ if(!infra_ip_ratelimit_inc(worker->env.infra_cache, repinfo, - *worker->env.now)) { + *worker->env.now, c->buffer)) { /* See if we are passed through with slip factor */ if(worker->env.cfg->ip_ratelimit_factor != 0 && ub_random_max(worker->env.rnd, @@ -1476,7 +1479,8 @@ lookup_cache: lock_rw_unlock(&e->lock); reply_and_prefetch(worker, lookup_qinfo, sldns_buffer_read_u16_at(c->buffer, 2), - repinfo, leeway); + repinfo, leeway, + (partial_rep || need_drop)); if(!partial_rep) { rc = 0; regional_free_all(worker->scratchpad); @@ -1558,9 +1562,19 @@ send_reply_rc: #endif if(worker->env.cfg->log_replies) { - struct timeval tv = {0, 0}; - log_reply_info(0, &qinfo, &repinfo->addr, repinfo->addrlen, - tv, 1, c->buffer); + struct timeval tv; + memset(&tv, 0, sizeof(tv)); + if(qinfo.local_alias && qinfo.local_alias->rrset && + qinfo.local_alias->rrset->rk.dname) { + /* log original qname, before the local alias was + * used to resolve that CNAME to something else */ + qinfo.qname = qinfo.local_alias->rrset->rk.dname; + log_reply_info(NO_VERBOSE, &qinfo, &repinfo->addr, repinfo->addrlen, + tv, 1, c->buffer); + } else { + log_reply_info(NO_VERBOSE, &qinfo, &repinfo->addr, repinfo->addrlen, + tv, 1, c->buffer); + } } #ifdef USE_DNSCRYPT if(!dnsc_handle_uncurved_request(repinfo)) { @@ -1667,11 +1681,7 @@ worker_create(struct daemon* daemon, int id, int* ports, int n) return NULL; } /* create random state here to avoid locking trouble in RAND_bytes */ - seed = (unsigned int)time(NULL) ^ (unsigned int)getpid() ^ - (((unsigned int)worker->thread_num)<<17); - /* shift thread_num so it does not match out pid bits */ - if(!(worker->rndstate = ub_initstate(seed, daemon->rand))) { - explicit_bzero(&seed, sizeof(seed)); + if(!(worker->rndstate = ub_initstate(daemon->rand))) { log_err("could not init random numbers."); tube_delete(worker->cmd); free(worker->ports); diff --git a/debian/changelog b/debian/changelog index 1383af54fd2022326a9a04b37d998cb815c25829..48aa51d49e7b63ee331c146529daa8c8e78f90e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +unbound (1.9.6-0+deb10u1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * + + -- Markus Koschany Sat, 06 Feb 2021 21:46:46 +0100 + unbound (1.9.0-2+deb10u2) buster-security; urgency=high * Apply NLnet Labs patch for CVE-2020-12662, CVE-2020-12663 diff --git a/debian/patches/CVE-2020-28935.patch b/debian/patches/CVE-2020-28935.patch new file mode 100644 index 0000000000000000000000000000000000000000..9e446aa01ed9a59ceef472ce957e1ed59185d53c --- /dev/null +++ b/debian/patches/CVE-2020-28935.patch @@ -0,0 +1,51 @@ +From: Markus Koschany +Date: Wed, 3 Feb 2021 15:56:00 +0100 +Subject: CVE-2020-28935 + +Bug-Debian: https://bugs.debian.org/977165 +Origin: https://github.com/NLnetLabs/unbound/commit/ad387832979b6ce4c93f64fe706301cd7d034e87 +--- + daemon/unbound.c | 26 ++++++++++++++++++++------ + 1 file changed, 20 insertions(+), 6 deletions(-) + +--- a/daemon/unbound.c ++++ b/daemon/unbound.c +@@ -344,18 +344,32 @@ readpid (const char* file) + static void + writepid (const char* pidfile, pid_t pid) + { +- FILE* f; ++ int fd; ++ char pidbuf[32]; ++ size_t count = 0; ++ snprintf(pidbuf, sizeof(pidbuf), "%lu\n", (unsigned long)pid); + +- if ((f = fopen(pidfile, "w")) == NULL ) { ++ if((fd = open(pidfile, O_WRONLY | O_CREAT | O_TRUNC ++#ifdef O_NOFOLLOW ++ | O_NOFOLLOW ++#endif ++ , 0644)) == -1) { + log_err("cannot open pidfile %s: %s", + pidfile, strerror(errno)); + return; + } +- if(fprintf(f, "%lu\n", (unsigned long)pid) < 0) { +- log_err("cannot write to pidfile %s: %s", +- pidfile, strerror(errno)); ++ while(count < strlen(pidbuf)) { ++ ssize_t r = write(fd, pidbuf+count, strlen(pidbuf)-count); ++ if(r == -1) { ++ if(errno == EAGAIN || errno == EINTR) ++ continue; ++ log_err("cannot write to pidfile %s: %s", ++ pidfile, strerror(errno)); ++ break; ++ } ++ count += r; + } +- fclose(f); ++ close(fd); + } + + /** diff --git a/debian/patches/debian-changes b/debian/patches/debian-changes new file mode 100644 index 0000000000000000000000000000000000000000..3c4598a6dcf6cd7e4c33c04d7f3d28bb396086a0 --- /dev/null +++ b/debian/patches/debian-changes @@ -0,0 +1,968 @@ +From: Debian DNS Team +Date: Sat, 6 Feb 2021 22:03:45 +0100 +Subject: Collected Debian patches for unbound + +The unbound package is maintained in Git rather than maintaining patches as +separate files. They are therefore all included in this single Debian patch. + +For full commit history and separated commits, see the packaging Git +repository. +--- + iterator/iter_delegpt.c | 51 +++++++++------- + iterator/iter_delegpt.h | 28 ++++++--- + iterator/iter_scrub.c | 24 ++++++-- + iterator/iter_utils.c | 4 +- + iterator/iterator.c | 153 ++++++++++++++++++++++++++++++++++++++---------- + iterator/iterator.h | 12 +++- + services/cache/dns.c | 10 ++-- + util/data/dname.c | 30 ++++++++++ + util/data/msgparse.c | 6 +- + 9 files changed, 246 insertions(+), 72 deletions(-) + +diff --git a/iterator/iter_delegpt.c b/iterator/iter_delegpt.c +index f88b3e1..9a672b0 100644 +--- a/iterator/iter_delegpt.c ++++ b/iterator/iter_delegpt.c +@@ -84,7 +84,7 @@ struct delegpt* delegpt_copy(struct delegpt* dp, struct regional* region) + } + for(a = dp->target_list; a; a = a->next_target) { + if(!delegpt_add_addr(copy, region, &a->addr, a->addrlen, +- a->bogus, a->lame, a->tls_auth_name)) ++ a->bogus, a->lame, a->tls_auth_name, NULL)) + return NULL; + } + return copy; +@@ -161,7 +161,7 @@ delegpt_find_addr(struct delegpt* dp, struct sockaddr_storage* addr, + int + delegpt_add_target(struct delegpt* dp, struct regional* region, + uint8_t* name, size_t namelen, struct sockaddr_storage* addr, +- socklen_t addrlen, uint8_t bogus, uint8_t lame) ++ socklen_t addrlen, uint8_t bogus, uint8_t lame, int* additions) + { + struct delegpt_ns* ns = delegpt_find_ns(dp, name, namelen); + log_assert(!dp->dp_type_mlc); +@@ -176,13 +176,14 @@ delegpt_add_target(struct delegpt* dp, struct regional* region, + if(ns->got4 && ns->got6) + ns->resolved = 1; + } +- return delegpt_add_addr(dp, region, addr, addrlen, bogus, lame, NULL); ++ return delegpt_add_addr(dp, region, addr, addrlen, bogus, lame, NULL, ++ additions); + } + + int + delegpt_add_addr(struct delegpt* dp, struct regional* region, + struct sockaddr_storage* addr, socklen_t addrlen, uint8_t bogus, +- uint8_t lame, char* tls_auth_name) ++ uint8_t lame, char* tls_auth_name, int* additions) + { + struct delegpt_addr* a; + log_assert(!dp->dp_type_mlc); +@@ -194,6 +195,8 @@ delegpt_add_addr(struct delegpt* dp, struct regional* region, + a->lame = 0; + return 1; + } ++ if(additions) ++ *additions = 1; + + a = (struct delegpt_addr*)regional_alloc(region, + sizeof(struct delegpt_addr)); +@@ -382,10 +385,10 @@ delegpt_from_message(struct dns_msg* msg, struct regional* region) + continue; + + if(ntohs(s->rk.type) == LDNS_RR_TYPE_A) { +- if(!delegpt_add_rrset_A(dp, region, s, 0)) ++ if(!delegpt_add_rrset_A(dp, region, s, 0, NULL)) + return NULL; + } else if(ntohs(s->rk.type) == LDNS_RR_TYPE_AAAA) { +- if(!delegpt_add_rrset_AAAA(dp, region, s, 0)) ++ if(!delegpt_add_rrset_AAAA(dp, region, s, 0, NULL)) + return NULL; + } + } +@@ -416,7 +419,7 @@ delegpt_rrset_add_ns(struct delegpt* dp, struct regional* region, + + int + delegpt_add_rrset_A(struct delegpt* dp, struct regional* region, +- struct ub_packed_rrset_key* ak, uint8_t lame) ++ struct ub_packed_rrset_key* ak, uint8_t lame, int* additions) + { + struct packed_rrset_data* d=(struct packed_rrset_data*)ak->entry.data; + size_t i; +@@ -432,7 +435,7 @@ delegpt_add_rrset_A(struct delegpt* dp, struct regional* region, + memmove(&sa.sin_addr, d->rr_data[i]+2, INET_SIZE); + if(!delegpt_add_target(dp, region, ak->rk.dname, + ak->rk.dname_len, (struct sockaddr_storage*)&sa, +- len, (d->security==sec_status_bogus), lame)) ++ len, (d->security==sec_status_bogus), lame, additions)) + return 0; + } + return 1; +@@ -440,7 +443,7 @@ delegpt_add_rrset_A(struct delegpt* dp, struct regional* region, + + int + delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* region, +- struct ub_packed_rrset_key* ak, uint8_t lame) ++ struct ub_packed_rrset_key* ak, uint8_t lame, int* additions) + { + struct packed_rrset_data* d=(struct packed_rrset_data*)ak->entry.data; + size_t i; +@@ -456,7 +459,7 @@ delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* region, + memmove(&sa.sin6_addr, d->rr_data[i]+2, INET6_SIZE); + if(!delegpt_add_target(dp, region, ak->rk.dname, + ak->rk.dname_len, (struct sockaddr_storage*)&sa, +- len, (d->security==sec_status_bogus), lame)) ++ len, (d->security==sec_status_bogus), lame, additions)) + return 0; + } + return 1; +@@ -464,20 +467,33 @@ delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* region, + + int + delegpt_add_rrset(struct delegpt* dp, struct regional* region, +- struct ub_packed_rrset_key* rrset, uint8_t lame) ++ struct ub_packed_rrset_key* rrset, uint8_t lame, int* additions) + { + if(!rrset) + return 1; + if(ntohs(rrset->rk.type) == LDNS_RR_TYPE_NS) + return delegpt_rrset_add_ns(dp, region, rrset, lame); + else if(ntohs(rrset->rk.type) == LDNS_RR_TYPE_A) +- return delegpt_add_rrset_A(dp, region, rrset, lame); ++ return delegpt_add_rrset_A(dp, region, rrset, lame, additions); + else if(ntohs(rrset->rk.type) == LDNS_RR_TYPE_AAAA) +- return delegpt_add_rrset_AAAA(dp, region, rrset, lame); ++ return delegpt_add_rrset_AAAA(dp, region, rrset, lame, ++ additions); + log_warn("Unknown rrset type added to delegpt"); + return 1; + } + ++void delegpt_mark_neg(struct delegpt_ns* ns, uint16_t qtype) ++{ ++ if(ns) { ++ if(qtype == LDNS_RR_TYPE_A) ++ ns->got4 = 2; ++ else if(qtype == LDNS_RR_TYPE_AAAA) ++ ns->got6 = 2; ++ if(ns->got4 && ns->got6) ++ ns->resolved = 1; ++ } ++} ++ + void delegpt_add_neg_msg(struct delegpt* dp, struct msgreply_entry* msg) + { + struct reply_info* rep = (struct reply_info*)msg->entry.data; +@@ -487,14 +503,7 @@ void delegpt_add_neg_msg(struct delegpt* dp, struct msgreply_entry* msg) + if(FLAGS_GET_RCODE(rep->flags) != 0 || rep->an_numrrsets == 0) { + struct delegpt_ns* ns = delegpt_find_ns(dp, msg->key.qname, + msg->key.qname_len); +- if(ns) { +- if(msg->key.qtype == LDNS_RR_TYPE_A) +- ns->got4 = 1; +- else if(msg->key.qtype == LDNS_RR_TYPE_AAAA) +- ns->got6 = 1; +- if(ns->got4 && ns->got6) +- ns->resolved = 1; +- } ++ delegpt_mark_neg(ns, msg->key.qtype); + } + } + +diff --git a/iterator/iter_delegpt.h b/iterator/iter_delegpt.h +index 6c08826..138eb6e 100644 +--- a/iterator/iter_delegpt.h ++++ b/iterator/iter_delegpt.h +@@ -106,9 +106,10 @@ struct delegpt_ns { + * and marked true if got4 and got6 are both true. + */ + int resolved; +- /** if the ipv4 address is in the delegpt */ ++ /** if the ipv4 address is in the delegpt, 0=not, 1=yes 2=negative, ++ * negative means it was done, but no content. */ + uint8_t got4; +- /** if the ipv6 address is in the delegpt */ ++ /** if the ipv6 address is in the delegpt, 0=not, 1=yes 2=negative */ + uint8_t got6; + /** + * If the name is parent-side only and thus dispreferred. +@@ -215,11 +216,12 @@ int delegpt_rrset_add_ns(struct delegpt* dp, struct regional* regional, + * @param addrlen: the length of addr. + * @param bogus: security status for the address, pass true if bogus. + * @param lame: address is lame. ++ * @param additions: will be set to 1 if a new address is added + * @return false on error. + */ + int delegpt_add_target(struct delegpt* dp, struct regional* regional, + uint8_t* name, size_t namelen, struct sockaddr_storage* addr, +- socklen_t addrlen, uint8_t bogus, uint8_t lame); ++ socklen_t addrlen, uint8_t bogus, uint8_t lame, int* additions); + + /** + * Add A RRset to delegpt. +@@ -227,10 +229,11 @@ int delegpt_add_target(struct delegpt* dp, struct regional* regional, + * @param regional: where to allocate the info. + * @param rrset: RRset A to add. + * @param lame: rrset is lame, disprefer it. ++ * @param additions: will be set to 1 if a new address is added + * @return 0 on alloc error. + */ + int delegpt_add_rrset_A(struct delegpt* dp, struct regional* regional, +- struct ub_packed_rrset_key* rrset, uint8_t lame); ++ struct ub_packed_rrset_key* rrset, uint8_t lame, int* additions); + + /** + * Add AAAA RRset to delegpt. +@@ -238,10 +241,11 @@ int delegpt_add_rrset_A(struct delegpt* dp, struct regional* regional, + * @param regional: where to allocate the info. + * @param rrset: RRset AAAA to add. + * @param lame: rrset is lame, disprefer it. ++ * @param additions: will be set to 1 if a new address is added + * @return 0 on alloc error. + */ + int delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* regional, +- struct ub_packed_rrset_key* rrset, uint8_t lame); ++ struct ub_packed_rrset_key* rrset, uint8_t lame, int* additions); + + /** + * Add any RRset to delegpt. +@@ -250,10 +254,11 @@ int delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* regional, + * @param regional: where to allocate the info. + * @param rrset: RRset to add, NS, A, AAAA. + * @param lame: rrset is lame, disprefer it. ++ * @param additions: will be set to 1 if a new address is added + * @return 0 on alloc error. + */ + int delegpt_add_rrset(struct delegpt* dp, struct regional* regional, +- struct ub_packed_rrset_key* rrset, uint8_t lame); ++ struct ub_packed_rrset_key* rrset, uint8_t lame, int* additions); + + /** + * Add address to the delegation point. No servername is associated or checked. +@@ -264,11 +269,12 @@ int delegpt_add_rrset(struct delegpt* dp, struct regional* regional, + * @param bogus: if address is bogus. + * @param lame: if address is lame. + * @param tls_auth_name: TLS authentication name (or NULL). ++ * @param additions: will be set to 1 if a new address is added + * @return false on error. + */ + int delegpt_add_addr(struct delegpt* dp, struct regional* regional, + struct sockaddr_storage* addr, socklen_t addrlen, +- uint8_t bogus, uint8_t lame, char* tls_auth_name); ++ uint8_t bogus, uint8_t lame, char* tls_auth_name, int* additions); + + /** + * Find NS record in name list of delegation point. +@@ -341,6 +347,14 @@ size_t delegpt_count_targets(struct delegpt* dp); + struct delegpt* delegpt_from_message(struct dns_msg* msg, + struct regional* regional); + ++/** ++ * Mark negative return in delegation point for specific nameserver. ++ * sets the got4 or got6 to negative, updates the ns->resolved. ++ * @param ns: the nameserver in the delegpt. ++ * @param qtype: A or AAAA (host order). ++ */ ++void delegpt_mark_neg(struct delegpt_ns* ns, uint16_t qtype); ++ + /** + * Add negative message to delegation point. + * @param dp: delegation point. +diff --git a/iterator/iter_scrub.c b/iterator/iter_scrub.c +index cceec3d..aae934d 100644 +--- a/iterator/iter_scrub.c ++++ b/iterator/iter_scrub.c +@@ -185,8 +185,9 @@ mark_additional_rrset(sldns_buffer* pkt, struct msg_parse* msg, + /** Get target name of a CNAME */ + static int + parse_get_cname_target(struct rrset_parse* rrset, uint8_t** sname, +- size_t* snamelen) ++ size_t* snamelen, sldns_buffer* pkt) + { ++ size_t oldpos, dlen; + if(rrset->rr_count != 1) { + struct rr_parse* sig; + verbose(VERB_ALGO, "Found CNAME rrset with " +@@ -204,6 +205,19 @@ parse_get_cname_target(struct rrset_parse* rrset, uint8_t** sname, + *sname = rrset->rr_first->ttl_data + sizeof(uint32_t) + + sizeof(uint16_t); /* skip ttl, rdatalen */ + *snamelen = rrset->rr_first->size - sizeof(uint16_t); ++ ++ if(rrset->rr_first->outside_packet) { ++ if(!dname_valid(*sname, *snamelen)) ++ return 0; ++ return 1; ++ } ++ oldpos = sldns_buffer_position(pkt); ++ sldns_buffer_set_position(pkt, (size_t)(*sname - sldns_buffer_begin(pkt))); ++ dlen = pkt_dname_len(pkt); ++ sldns_buffer_set_position(pkt, oldpos); ++ if(dlen == 0) ++ return 0; /* parse fail on the rdata name */ ++ *snamelen = dlen; + return 1; + } + +@@ -215,7 +229,7 @@ synth_cname(uint8_t* qname, size_t qnamelen, struct rrset_parse* dname_rrset, + /* we already know that sname is a strict subdomain of DNAME owner */ + uint8_t* dtarg = NULL; + size_t dtarglen; +- if(!parse_get_cname_target(dname_rrset, &dtarg, &dtarglen)) ++ if(!parse_get_cname_target(dname_rrset, &dtarg, &dtarglen, pkt)) + return 0; + if(qnamelen <= dname_rrset->dname_len) + return 0; +@@ -388,7 +402,7 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, + /* check next cname */ + uint8_t* t = NULL; + size_t tlen = 0; +- if(!parse_get_cname_target(nx, &t, &tlen)) ++ if(!parse_get_cname_target(nx, &t, &tlen, pkt)) + return 0; + if(dname_pkt_compare(pkt, alias, t) == 0) { + /* it's OK and better capitalized */ +@@ -439,7 +453,7 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, + size_t tlen = 0; + if(synth_cname(sname, snamelen, nx, alias, + &aliaslen, pkt) && +- parse_get_cname_target(rrset, &t, &tlen) && ++ parse_get_cname_target(rrset, &t, &tlen, pkt) && + dname_pkt_compare(pkt, alias, t) == 0) { + /* the synthesized CNAME equals the + * current CNAME. This CNAME is the +@@ -460,7 +474,7 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, + } + + /* move to next name in CNAME chain */ +- if(!parse_get_cname_target(rrset, &sname, &snamelen)) ++ if(!parse_get_cname_target(rrset, &sname, &snamelen, pkt)) + return 0; + prev = rrset; + rrset = rrset->rrset_all_next; +diff --git a/iterator/iter_utils.c b/iterator/iter_utils.c +index 2ab55ce..3c14de8 100644 +--- a/iterator/iter_utils.c ++++ b/iterator/iter_utils.c +@@ -1142,7 +1142,7 @@ int iter_lookup_parent_glue_from_cache(struct module_env* env, + log_rrset_key(VERB_ALGO, "found parent-side", akey); + ns->done_pside4 = 1; + /* a negative-cache-element has no addresses it adds */ +- if(!delegpt_add_rrset_A(dp, region, akey, 1)) ++ if(!delegpt_add_rrset_A(dp, region, akey, 1, NULL)) + log_err("malloc failure in lookup_parent_glue"); + lock_rw_unlock(&akey->entry.lock); + } +@@ -1154,7 +1154,7 @@ int iter_lookup_parent_glue_from_cache(struct module_env* env, + log_rrset_key(VERB_ALGO, "found parent-side", akey); + ns->done_pside6 = 1; + /* a negative-cache-element has no addresses it adds */ +- if(!delegpt_add_rrset_AAAA(dp, region, akey, 1)) ++ if(!delegpt_add_rrset_AAAA(dp, region, akey, 1, NULL)) + log_err("malloc failure in lookup_parent_glue"); + lock_rw_unlock(&akey->entry.lock); + } +diff --git a/iterator/iterator.c b/iterator/iterator.c +index 1e0113a..9d36660 100644 +--- a/iterator/iterator.c ++++ b/iterator/iterator.c +@@ -72,6 +72,8 @@ + /* in msec */ + int UNKNOWN_SERVER_NICENESS = 376; + ++static void target_count_increase_nx(struct iter_qstate* iq, int num); ++ + int + iter_init(struct module_env* env, int id) + { +@@ -150,6 +152,7 @@ iter_new(struct module_qstate* qstate, int id) + iq->sent_count = 0; + iq->ratelimit_ok = 0; + iq->target_count = NULL; ++ iq->dp_target_count = 0; + iq->wait_priming_stub = 0; + iq->refetch_glue = 0; + iq->dnssec_expected = 0; +@@ -221,6 +224,7 @@ final_state(struct iter_qstate* iq) + static void + error_supers(struct module_qstate* qstate, int id, struct module_qstate* super) + { ++ struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id]; + struct iter_qstate* super_iq = (struct iter_qstate*)super->minfo[id]; + + if(qstate->qinfo.qtype == LDNS_RR_TYPE_A || +@@ -246,7 +250,11 @@ error_supers(struct module_qstate* qstate, int id, struct module_qstate* super) + super->region, super_iq->dp)) + log_err("out of memory adding missing"); + } ++ delegpt_mark_neg(dpns, qstate->qinfo.qtype); + dpns->resolved = 1; /* mark as failed */ ++ if((dpns->got4 == 2 || !ie->supports_ipv4) && ++ (dpns->got6 == 2 || !ie->supports_ipv6)) ++ target_count_increase_nx(super_iq, 1); + } + if(qstate->qinfo.qtype == LDNS_RR_TYPE_NS) { + /* prime failed to get delegation */ +@@ -621,7 +629,7 @@ static void + target_count_create(struct iter_qstate* iq) + { + if(!iq->target_count) { +- iq->target_count = (int*)calloc(2, sizeof(int)); ++ iq->target_count = (int*)calloc(3, sizeof(int)); + /* if calloc fails we simply do not track this number */ + if(iq->target_count) + iq->target_count[0] = 1; +@@ -634,6 +642,15 @@ target_count_increase(struct iter_qstate* iq, int num) + target_count_create(iq); + if(iq->target_count) + iq->target_count[1] += num; ++ iq->dp_target_count++; ++} ++ ++static void ++target_count_increase_nx(struct iter_qstate* iq, int num) ++{ ++ target_count_create(iq); ++ if(iq->target_count) ++ iq->target_count[2] += num; + } + + /** +@@ -656,13 +673,15 @@ target_count_increase(struct iter_qstate* iq, int num) + * @param subq_ret: if newly allocated, the subquerystate, or NULL if it does + * not need initialisation. + * @param v: if true, validation is done on the subquery. ++ * @param detached: true if this qstate should not attach to the subquery + * @return false on error (malloc). + */ + static int + generate_sub_request(uint8_t* qname, size_t qnamelen, uint16_t qtype, + uint16_t qclass, struct module_qstate* qstate, int id, + struct iter_qstate* iq, enum iter_state initial_state, +- enum iter_state finalstate, struct module_qstate** subq_ret, int v) ++ enum iter_state finalstate, struct module_qstate** subq_ret, int v, ++ int detached) + { + struct module_qstate* subq = NULL; + struct iter_qstate* subiq = NULL; +@@ -689,11 +708,23 @@ generate_sub_request(uint8_t* qname, size_t qnamelen, uint16_t qtype, + valrec = 1; + } + +- /* attach subquery, lookup existing or make a new one */ +- fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub)); +- if(!(*qstate->env->attach_sub)(qstate, &qinf, qflags, prime, valrec, +- &subq)) { +- return 0; ++ if(detached) { ++ struct mesh_state* sub = NULL; ++ fptr_ok(fptr_whitelist_modenv_add_sub( ++ qstate->env->add_sub)); ++ if(!(*qstate->env->add_sub)(qstate, &qinf, ++ qflags, prime, valrec, &subq, &sub)){ ++ return 0; ++ } ++ } ++ else { ++ /* attach subquery, lookup existing or make a new one */ ++ fptr_ok(fptr_whitelist_modenv_attach_sub( ++ qstate->env->attach_sub)); ++ if(!(*qstate->env->attach_sub)(qstate, &qinf, qflags, prime, ++ valrec, &subq)) { ++ return 0; ++ } + } + *subq_ret = subq; + if(subq) { +@@ -716,6 +747,7 @@ generate_sub_request(uint8_t* qname, size_t qnamelen, uint16_t qtype, + subiq->target_count = iq->target_count; + if(iq->target_count) + iq->target_count[0] ++; /* extra reference */ ++ subiq->dp_target_count = 0; + subiq->num_current_queries = 0; + subiq->depth = iq->depth+1; + outbound_list_init(&subiq->outlist); +@@ -759,7 +791,7 @@ prime_root(struct module_qstate* qstate, struct iter_qstate* iq, int id, + * the normal INIT state logic (which would cause an infloop). */ + if(!generate_sub_request((uint8_t*)"\000", 1, LDNS_RR_TYPE_NS, + qclass, qstate, id, iq, QUERYTARGETS_STATE, PRIME_RESP_STATE, +- &subq, 0)) { ++ &subq, 0, 0)) { + verbose(VERB_ALGO, "could not prime root"); + return 0; + } +@@ -850,7 +882,7 @@ prime_stub(struct module_qstate* qstate, struct iter_qstate* iq, int id, + * redundant INIT state processing. */ + if(!generate_sub_request(stub_dp->name, stub_dp->namelen, + LDNS_RR_TYPE_NS, qclass, qstate, id, iq, +- QUERYTARGETS_STATE, PRIME_RESP_STATE, &subq, 0)) { ++ QUERYTARGETS_STATE, PRIME_RESP_STATE, &subq, 0, 0)) { + verbose(VERB_ALGO, "could not prime stub"); + errinf(qstate, "could not generate lookup for stub prime"); + (void)error_response(qstate, id, LDNS_RCODE_SERVFAIL); +@@ -1025,7 +1057,7 @@ generate_a_aaaa_check(struct module_qstate* qstate, struct iter_qstate* iq, + if(!generate_sub_request(s->rk.dname, s->rk.dname_len, + ntohs(s->rk.type), ntohs(s->rk.rrset_class), + qstate, id, iq, +- INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1)) { ++ INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1, 0)) { + verbose(VERB_ALGO, "could not generate addr check"); + return; + } +@@ -1069,7 +1101,7 @@ generate_ns_check(struct module_qstate* qstate, struct iter_qstate* iq, int id) + iq->dp->name, LDNS_RR_TYPE_NS, iq->qchase.qclass); + if(!generate_sub_request(iq->dp->name, iq->dp->namelen, + LDNS_RR_TYPE_NS, iq->qchase.qclass, qstate, id, iq, +- INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1)) { ++ INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1, 0)) { + verbose(VERB_ALGO, "could not generate ns check"); + return; + } +@@ -1126,7 +1158,7 @@ generate_dnskey_prefetch(struct module_qstate* qstate, + iq->dp->name, LDNS_RR_TYPE_DNSKEY, iq->qchase.qclass); + if(!generate_sub_request(iq->dp->name, iq->dp->namelen, + LDNS_RR_TYPE_DNSKEY, iq->qchase.qclass, qstate, id, iq, +- INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0)) { ++ INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0, 0)) { + /* we'll be slower, but it'll work */ + verbose(VERB_ALGO, "could not generate dnskey prefetch"); + return; +@@ -1315,6 +1347,7 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq, + iq->refetch_glue = 0; + iq->query_restart_count++; + iq->sent_count = 0; ++ iq->dp_target_count = 0; + sock_list_insert(&qstate->reply_origin, NULL, 0, qstate->region); + if(qstate->env->cfg->qname_minimisation) + iq->minimisation_state = INIT_MINIMISE_STATE; +@@ -1693,7 +1726,7 @@ generate_parentside_target_query(struct module_qstate* qstate, + { + struct module_qstate* subq; + if(!generate_sub_request(name, namelen, qtype, qclass, qstate, +- id, iq, INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0)) ++ id, iq, INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0, 0)) + return 0; + if(subq) { + struct iter_qstate* subiq = +@@ -1744,7 +1777,7 @@ generate_target_query(struct module_qstate* qstate, struct iter_qstate* iq, + { + struct module_qstate* subq; + if(!generate_sub_request(name, namelen, qtype, qclass, qstate, +- id, iq, INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0)) ++ id, iq, INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0, 0)) + return 0; + log_nametypeclass(VERB_QUERY, "new target", name, qtype, qclass); + return 1; +@@ -1783,6 +1816,14 @@ query_for_targets(struct module_qstate* qstate, struct iter_qstate* iq, + "number of glue fetches %d", s, iq->target_count[1]); + return 0; + } ++ if(iq->dp_target_count > MAX_DP_TARGET_COUNT) { ++ char s[LDNS_MAX_DOMAINLEN+1]; ++ dname_str(qstate->qinfo.qname, s); ++ verbose(VERB_QUERY, "request %s has exceeded the maximum " ++ "number of glue fetches %d to a single delegation point", ++ s, iq->dp_target_count); ++ return 0; ++ } + + iter_mark_cycle_targets(qstate, iq->dp); + missing = (int)delegpt_count_missing_targets(iq->dp); +@@ -1896,7 +1937,7 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq, + for(a = p->target_list; a; a=a->next_target) { + (void)delegpt_add_addr(iq->dp, qstate->region, + &a->addr, a->addrlen, a->bogus, +- a->lame, a->tls_auth_name); ++ a->lame, a->tls_auth_name, NULL); + } + } + iq->dp->has_parent_side_NS = 1; +@@ -1913,6 +1954,7 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq, + iq->refetch_glue = 1; + iq->query_restart_count++; + iq->sent_count = 0; ++ iq->dp_target_count = 0; + if(qstate->env->cfg->qname_minimisation) + iq->minimisation_state = INIT_MINIMISE_STATE; + return next_state(iq, INIT_REQUEST_STATE); +@@ -2078,7 +2120,7 @@ processDSNSFind(struct module_qstate* qstate, struct iter_qstate* iq, int id) + iq->dsns_point, LDNS_RR_TYPE_NS, iq->qchase.qclass); + if(!generate_sub_request(iq->dsns_point, iq->dsns_point_len, + LDNS_RR_TYPE_NS, iq->qchase.qclass, qstate, id, iq, +- INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0)) { ++ INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0, 0)) { + errinf_dname(qstate, "for DS query parent-child nameserver search, could not generate NS lookup for", iq->dsns_point); + return error_response_cache(qstate, id, LDNS_RCODE_SERVFAIL); + } +@@ -2136,6 +2178,13 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, + errinf(qstate, "exceeded the maximum number of sends"); + return error_response(qstate, id, LDNS_RCODE_SERVFAIL); + } ++ if(iq->target_count && iq->target_count[2] > MAX_TARGET_NX) { ++ verbose(VERB_QUERY, "request has exceeded the maximum " ++ " number of nxdomain nameserver lookups with %d", ++ iq->target_count[2]); ++ errinf(qstate, "exceeded the maximum nameserver nxdomains"); ++ return error_response(qstate, id, LDNS_RCODE_SERVFAIL); ++ } + + /* Make sure we have a delegation point, otherwise priming failed + * or another failure occurred */ +@@ -2240,12 +2289,41 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, + iq->qinfo_out.qtype, iq->qinfo_out.qclass, + qstate->query_flags, qstate->region, + qstate->env->scratch, 0); +- if(msg && msg->rep->an_numrrsets == 0 +- && FLAGS_GET_RCODE(msg->rep->flags) == ++ if(msg && FLAGS_GET_RCODE(msg->rep->flags) == + LDNS_RCODE_NOERROR) + /* no need to send query if it is already +- * cached as NOERROR/NODATA */ ++ * cached as NOERROR */ + return 1; ++ if(msg && FLAGS_GET_RCODE(msg->rep->flags) == ++ LDNS_RCODE_NXDOMAIN && ++ qstate->env->need_to_validate && ++ qstate->env->cfg->harden_below_nxdomain) { ++ if(msg->rep->security == sec_status_secure) { ++ iq->response = msg; ++ return final_state(iq); ++ } ++ if(msg->rep->security == sec_status_unchecked) { ++ struct module_qstate* subq = NULL; ++ if(!generate_sub_request( ++ iq->qinfo_out.qname, ++ iq->qinfo_out.qname_len, ++ iq->qinfo_out.qtype, ++ iq->qinfo_out.qclass, ++ qstate, id, iq, ++ INIT_REQUEST_STATE, ++ FINISHED_STATE, &subq, 1, 1)) ++ verbose(VERB_ALGO, ++ "could not validate NXDOMAIN " ++ "response"); ++ } ++ } ++ if(msg && FLAGS_GET_RCODE(msg->rep->flags) == ++ LDNS_RCODE_NXDOMAIN) { ++ /* return and add a label in the next ++ * minimisation iteration. ++ */ ++ return 1; ++ } + } + } + if(iq->minimisation_state == SKIP_MINIMISE_STATE) { +@@ -2321,6 +2399,8 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, + * generated query will immediately be discarded due to depth and + * that servfail is cached, which is not good as opportunism goes. */ + if(iq->depth < ie->max_dependency_depth ++ && iq->num_target_queries == 0 ++ && (!iq->target_count || iq->target_count[2]==0) + && iq->sent_count < TARGET_FETCH_STOP) { + tf_policy = ie->target_fetch_policy[iq->depth]; + } +@@ -2366,6 +2446,7 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, + iq->num_current_queries++; /* RespState decrements it*/ + iq->referral_count++; /* make sure we don't loop */ + iq->sent_count = 0; ++ iq->dp_target_count = 0; + iq->state = QUERY_RESP_STATE; + return 1; + } +@@ -2453,6 +2534,7 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, + iq->num_current_queries++; /* RespState decrements it*/ + iq->referral_count++; /* make sure we don't loop */ + iq->sent_count = 0; ++ iq->dp_target_count = 0; + iq->state = QUERY_RESP_STATE; + return 1; + } +@@ -2747,7 +2829,8 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, + /* Make subrequest to validate intermediate + * NXDOMAIN if harden-below-nxdomain is + * enabled. */ +- if(qstate->env->cfg->harden_below_nxdomain) { ++ if(qstate->env->cfg->harden_below_nxdomain && ++ qstate->env->need_to_validate) { + struct module_qstate* subq = NULL; + log_query_info(VERB_QUERY, + "schedule NXDOMAIN validation:", +@@ -2759,16 +2842,10 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, + iq->response->qinfo.qclass, + qstate, id, iq, + INIT_REQUEST_STATE, +- FINISHED_STATE, &subq, 1)) ++ FINISHED_STATE, &subq, 1, 1)) + verbose(VERB_ALGO, + "could not validate NXDOMAIN " + "response"); +- outbound_list_clear(&iq->outlist); +- iq->num_current_queries = 0; +- fptr_ok(fptr_whitelist_modenv_detach_subs( +- qstate->env->detach_subs)); +- (*qstate->env->detach_subs)(qstate); +- iq->num_target_queries = 0; + } + } + return next_state(iq, QUERYTARGETS_STATE); +@@ -2852,6 +2929,7 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, + /* Count this as a referral. */ + iq->referral_count++; + iq->sent_count = 0; ++ iq->dp_target_count = 0; + /* see if the next dp is a trust anchor, or a DS was sent + * along, indicating dnssec is expected for next zone */ + iq->dnssec_expected = iter_indicates_dnssec(qstate->env, +@@ -2928,6 +3006,7 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, + iq->dsns_point = NULL; + iq->auth_zone_response = 0; + iq->sent_count = 0; ++ iq->dp_target_count = 0; + if(iq->minimisation_state != MINIMISE_STATE) + /* Only count as query restart when it is not an extra + * query as result of qname minimisation. */ +@@ -3120,7 +3199,7 @@ processPrimeResponse(struct module_qstate* qstate, int id) + if(!generate_sub_request(qstate->qinfo.qname, + qstate->qinfo.qname_len, qstate->qinfo.qtype, + qstate->qinfo.qclass, qstate, id, iq, +- INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1)) { ++ INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1, 0)) { + verbose(VERB_ALGO, "could not generate prime check"); + } + generate_a_aaaa_check(qstate, iq, id); +@@ -3148,6 +3227,7 @@ static void + processTargetResponse(struct module_qstate* qstate, int id, + struct module_qstate* forq) + { ++ struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id]; + struct iter_qstate* iq = (struct iter_qstate*)qstate->minfo[id]; + struct iter_qstate* foriq = (struct iter_qstate*)forq->minfo[id]; + struct ub_packed_rrset_key* rrset; +@@ -3185,7 +3265,7 @@ processTargetResponse(struct module_qstate* qstate, int id, + log_rrset_key(VERB_ALGO, "add parentside glue to dp", + iq->pside_glue); + if(!delegpt_add_rrset(foriq->dp, forq->region, +- iq->pside_glue, 1)) ++ iq->pside_glue, 1, NULL)) + log_err("out of memory adding pside glue"); + } + +@@ -3196,6 +3276,7 @@ processTargetResponse(struct module_qstate* qstate, int id, + * response type was ANSWER. */ + rrset = reply_find_answer_rrset(&iq->qchase, qstate->return_msg->rep); + if(rrset) { ++ int additions = 0; + /* if CNAMEs have been followed - add new NS to delegpt. */ + /* BTW. RFC 1918 says NS should not have got CNAMEs. Robust. */ + if(!delegpt_find_ns(foriq->dp, rrset->rk.dname, +@@ -3207,13 +3288,23 @@ processTargetResponse(struct module_qstate* qstate, int id, + } + /* if dpns->lame then set the address(es) lame too */ + if(!delegpt_add_rrset(foriq->dp, forq->region, rrset, +- dpns->lame)) ++ dpns->lame, &additions)) + log_err("out of memory adding targets"); ++ if(!additions) { ++ /* no new addresses, increase the nxns counter, like ++ * this could be a list of wildcards with no new ++ * addresses */ ++ target_count_increase_nx(foriq, 1); ++ } + verbose(VERB_ALGO, "added target response"); + delegpt_log(VERB_ALGO, foriq->dp); + } else { + verbose(VERB_ALGO, "iterator TargetResponse failed"); ++ delegpt_mark_neg(dpns, qstate->qinfo.qtype); + dpns->resolved = 1; /* fail the target */ ++ if((dpns->got4 == 2 || !ie->supports_ipv4) && ++ (dpns->got6 == 2 || !ie->supports_ipv6)) ++ target_count_increase_nx(foriq, 1); + } + } + +@@ -3387,7 +3478,7 @@ processCollectClass(struct module_qstate* qstate, int id) + qstate->qinfo.qname_len, qstate->qinfo.qtype, + c, qstate, id, iq, INIT_REQUEST_STATE, + FINISHED_STATE, &subq, +- (int)!(qstate->query_flags&BIT_CD))) { ++ (int)!(qstate->query_flags&BIT_CD), 0)) { + errinf(qstate, "could not generate class ANY" + " lookup query"); + return error_response(qstate, id, +diff --git a/iterator/iterator.h b/iterator/iterator.h +index a2f1b57..53dcab3 100644 +--- a/iterator/iterator.h ++++ b/iterator/iterator.h +@@ -55,6 +55,11 @@ struct rbtree_type; + + /** max number of targets spawned for a query and its subqueries */ + #define MAX_TARGET_COUNT 64 ++/** max number of target lookups per qstate, per delegation point */ ++#define MAX_DP_TARGET_COUNT 16 ++/** max number of nxdomains allowed for target lookups for a query and ++ * its subqueries */ ++#define MAX_TARGET_NX 5 + /** max number of query restarts. Determines max number of CNAME chain. */ + #define MAX_RESTART_COUNT 8 + /** max number of referrals. Makes sure resolver does not run away */ +@@ -305,9 +310,14 @@ struct iter_qstate { + int sent_count; + + /** number of target queries spawned in [1], for this query and its +- * subqueries, the malloced-array is shared, [0] refcount. */ ++ * subqueries, the malloced-array is shared, [0] refcount. ++ * in [2] the number of nxdomains is counted. */ + int* target_count; + ++ /** number of target lookups per delegation point. Reset to 0 after ++ * receiving referral answer. Not shared with subqueries. */ ++ int dp_target_count; ++ + /** if true, already tested for ratelimiting and passed the test */ + int ratelimit_ok; + +diff --git a/services/cache/dns.c b/services/cache/dns.c +index aa4efec..affe837 100644 +--- a/services/cache/dns.c ++++ b/services/cache/dns.c +@@ -272,7 +272,7 @@ find_add_addrs(struct module_env* env, uint16_t qclass, + akey = rrset_cache_lookup(env->rrset_cache, ns->name, + ns->namelen, LDNS_RR_TYPE_A, qclass, 0, now, 0); + if(akey) { +- if(!delegpt_add_rrset_A(dp, region, akey, 0)) { ++ if(!delegpt_add_rrset_A(dp, region, akey, 0, NULL)) { + lock_rw_unlock(&akey->entry.lock); + return 0; + } +@@ -292,7 +292,7 @@ find_add_addrs(struct module_env* env, uint16_t qclass, + akey = rrset_cache_lookup(env->rrset_cache, ns->name, + ns->namelen, LDNS_RR_TYPE_AAAA, qclass, 0, now, 0); + if(akey) { +- if(!delegpt_add_rrset_AAAA(dp, region, akey, 0)) { ++ if(!delegpt_add_rrset_AAAA(dp, region, akey, 0, NULL)) { + lock_rw_unlock(&akey->entry.lock); + return 0; + } +@@ -326,7 +326,8 @@ cache_fill_missing(struct module_env* env, uint16_t qclass, + akey = rrset_cache_lookup(env->rrset_cache, ns->name, + ns->namelen, LDNS_RR_TYPE_A, qclass, 0, now, 0); + if(akey) { +- if(!delegpt_add_rrset_A(dp, region, akey, ns->lame)) { ++ if(!delegpt_add_rrset_A(dp, region, akey, ns->lame, ++ NULL)) { + lock_rw_unlock(&akey->entry.lock); + return 0; + } +@@ -346,7 +347,8 @@ cache_fill_missing(struct module_env* env, uint16_t qclass, + akey = rrset_cache_lookup(env->rrset_cache, ns->name, + ns->namelen, LDNS_RR_TYPE_AAAA, qclass, 0, now, 0); + if(akey) { +- if(!delegpt_add_rrset_AAAA(dp, region, akey, ns->lame)) { ++ if(!delegpt_add_rrset_AAAA(dp, region, akey, ns->lame, ++ NULL)) { + lock_rw_unlock(&akey->entry.lock); + return 0; + } +diff --git a/util/data/dname.c b/util/data/dname.c +index 9f25e1e..27ff07d 100644 +--- a/util/data/dname.c ++++ b/util/data/dname.c +@@ -233,17 +233,28 @@ int + dname_pkt_compare(sldns_buffer* pkt, uint8_t* d1, uint8_t* d2) + { + uint8_t len1, len2; ++ int count1 = 0, count2 = 0; + log_assert(pkt && d1 && d2); + len1 = *d1++; + len2 = *d2++; + while( len1 != 0 || len2 != 0 ) { + /* resolve ptrs */ + if(LABEL_IS_PTR(len1)) { ++ if((size_t)PTR_OFFSET(len1, *d1) ++ >= sldns_buffer_limit(pkt)) ++ return -1; ++ if(count1++ > MAX_COMPRESS_PTRS) ++ return -1; + d1 = sldns_buffer_at(pkt, PTR_OFFSET(len1, *d1)); + len1 = *d1++; + continue; + } + if(LABEL_IS_PTR(len2)) { ++ if((size_t)PTR_OFFSET(len2, *d2) ++ >= sldns_buffer_limit(pkt)) ++ return 1; ++ if(count2++ > MAX_COMPRESS_PTRS) ++ return 1; + d2 = sldns_buffer_at(pkt, PTR_OFFSET(len2, *d2)); + len2 = *d2++; + continue; +@@ -302,12 +313,18 @@ dname_pkt_hash(sldns_buffer* pkt, uint8_t* dname, hashvalue_type h) + uint8_t labuf[LDNS_MAX_LABELLEN+1]; + uint8_t lablen; + int i; ++ int count = 0; + + /* preserve case of query, make hash label by label */ + lablen = *dname++; + while(lablen) { + if(LABEL_IS_PTR(lablen)) { + /* follow pointer */ ++ if((size_t)PTR_OFFSET(lablen, *dname) ++ >= sldns_buffer_limit(pkt)) ++ return h; ++ if(count++ > MAX_COMPRESS_PTRS) ++ return h; + dname = sldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); + lablen = *dname++; + continue; +@@ -341,6 +358,9 @@ void dname_pkt_copy(sldns_buffer* pkt, uint8_t* to, uint8_t* dname) + return; + } + /* follow pointer */ ++ if((size_t)PTR_OFFSET(lablen, *dname) ++ >= sldns_buffer_limit(pkt)) ++ return; + dname = sldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); + lablen = *dname++; + continue; +@@ -369,6 +389,7 @@ void dname_pkt_copy(sldns_buffer* pkt, uint8_t* to, uint8_t* dname) + void dname_print(FILE* out, struct sldns_buffer* pkt, uint8_t* dname) + { + uint8_t lablen; ++ int count = 0; + if(!out) out = stdout; + if(!dname) return; + +@@ -382,6 +403,15 @@ void dname_print(FILE* out, struct sldns_buffer* pkt, uint8_t* dname) + fputs("??compressionptr??", out); + return; + } ++ if((size_t)PTR_OFFSET(lablen, *dname) ++ >= sldns_buffer_limit(pkt)) { ++ fputs("??compressionptr??", out); ++ return; ++ } ++ if(count++ > MAX_COMPRESS_PTRS) { ++ fputs("??compressionptr??", out); ++ return; ++ } + dname = sldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); + lablen = *dname++; + continue; +diff --git a/util/data/msgparse.c b/util/data/msgparse.c +index fb31237..7c32618 100644 +--- a/util/data/msgparse.c ++++ b/util/data/msgparse.c +@@ -55,7 +55,11 @@ smart_compare(sldns_buffer* pkt, uint8_t* dnow, + { + if(LABEL_IS_PTR(*dnow)) { + /* ptr points to a previous dname */ +- uint8_t* p = sldns_buffer_at(pkt, PTR_OFFSET(dnow[0], dnow[1])); ++ uint8_t* p; ++ if((size_t)PTR_OFFSET(dnow[0], dnow[1]) ++ >= sldns_buffer_limit(pkt)) ++ return -1; ++ p = sldns_buffer_at(pkt, PTR_OFFSET(dnow[0], dnow[1])); + if( p == dprfirst || p == dprlast ) + return 0; + /* prev dname is also a ptr, both ptrs are the same. */ diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000000000000000000000000000000000000..03fa14dc77d1b64d25f41a36dd46b0b858c33f37 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +debian-changes +CVE-2020-28935.patch diff --git a/debian/source/options b/debian/source/options deleted file mode 100644 index 7423a2df3dbfe7b87c8f4ccb7de206b49dc9d66e..0000000000000000000000000000000000000000 --- a/debian/source/options +++ /dev/null @@ -1 +0,0 @@ -single-debian-patch diff --git a/dns64/dns64.c b/dns64/dns64.c index f2834da2bfc43d6fa048e30158831a5aa71dfc5d..1a569059aff42f398bcc616e216796ccd7353523 100644 --- a/dns64/dns64.c +++ b/dns64/dns64.c @@ -191,16 +191,19 @@ uitoa(unsigned n, char* s) * * \param ipv6 IPv6 address represented as a 128-bit array in big-endian * order. + * \param ipv6_len length of the ipv6 byte array. * \param offset Index of the MSB of the IPv4 address embedded in the IPv6 * address. */ static uint32_t -extract_ipv4(const uint8_t ipv6[16], const int offset) +extract_ipv4(const uint8_t ipv6[], size_t ipv6_len, const int offset) { - uint32_t ipv4 = (uint32_t)ipv6[offset/8+0] << (24 + (offset%8)) - | (uint32_t)ipv6[offset/8+1] << (16 + (offset%8)) - | (uint32_t)ipv6[offset/8+2] << ( 8 + (offset%8)) - | (uint32_t)ipv6[offset/8+3] << ( 0 + (offset%8)); + uint32_t ipv4; + log_assert(ipv6_len == 16); (void)ipv6_len; + ipv4 = (uint32_t)ipv6[offset/8+0] << (24 + (offset%8)) + | (uint32_t)ipv6[offset/8+1] << (16 + (offset%8)) + | (uint32_t)ipv6[offset/8+2] << ( 8 + (offset%8)) + | (uint32_t)ipv6[offset/8+3] << ( 0 + (offset%8)); if (offset/8+4 < 16) ipv4 |= (uint32_t)ipv6[offset/8+4] >> (8 - offset%8); return ipv4; @@ -214,22 +217,26 @@ extract_ipv4(const uint8_t ipv6[16], const int offset) * \param ipv4 IPv4 address represented as an unsigned 32-bit number. * \param ptr The result will be written here. Must be large enough, be * careful! + * \param nm_len length of the ptr buffer. * * \return The number of characters written. */ static size_t -ipv4_to_ptr(uint32_t ipv4, char ptr[MAX_PTR_QNAME_IPV4]) +ipv4_to_ptr(uint32_t ipv4, char ptr[], size_t nm_len) { static const char IPV4_PTR_SUFFIX[] = "\07in-addr\04arpa"; int i; char* c = ptr; + log_assert(nm_len == MAX_PTR_QNAME_IPV4); for (i = 0; i < 4; ++i) { *c = uitoa((unsigned int)(ipv4 % 256), c + 1); c += *c + 1; + log_assert(c < ptr+nm_len); ipv4 /= 256; } + log_assert(c + sizeof(IPV4_PTR_SUFFIX) <= ptr+nm_len); memmove(c, IPV4_PTR_SUFFIX, sizeof(IPV4_PTR_SUFFIX)); return c + sizeof(IPV4_PTR_SUFFIX) - ptr; @@ -241,13 +248,15 @@ ipv4_to_ptr(uint32_t ipv4, char ptr[MAX_PTR_QNAME_IPV4]) * * \param ptr The domain name. (e.g. "\011[...]\010\012\016\012\03ip6\04arpa") * \param ipv6 The result will be written here, in network byte order. + * \param ipv6_len length of the ipv6 byte array. * * \return 1 on success, 0 on failure. */ static int -ptr_to_ipv6(const char* ptr, uint8_t ipv6[16]) +ptr_to_ipv6(const char* ptr, uint8_t ipv6[], size_t ipv6_len) { int i; + log_assert(ipv6_len == 16); (void)ipv6_len; for (i = 0; i < 64; i++) { int x; @@ -275,14 +284,20 @@ ptr_to_ipv6(const char* ptr, uint8_t ipv6[16]) * Synthesize an IPv6 address based on an IPv4 address and the DNS64 prefix. * * \param prefix_addr DNS64 prefix address. + * \param prefix_addr_len length of the prefix_addr buffer. * \param prefix_net CIDR length of the DNS64 prefix. Must be between 0 and 96. * \param a IPv4 address. + * \param a_len length of the a buffer. * \param aaaa IPv6 address. The result will be written here. + * \param aaaa_len length of the aaaa buffer. */ static void -synthesize_aaaa(const uint8_t prefix_addr[16], int prefix_net, - const uint8_t a[4], uint8_t aaaa[16]) +synthesize_aaaa(const uint8_t prefix_addr[], size_t prefix_addr_len, + int prefix_net, const uint8_t a[], size_t a_len, uint8_t aaaa[], + size_t aaaa_len) { + log_assert(prefix_addr_len == 16 && a_len == 4 && aaaa_len == 16); + (void)prefix_addr_len; (void)a_len; (void)aaaa_len; memcpy(aaaa, prefix_addr, 16); aaaa[prefix_net/8+0] |= a[0] >> (0+prefix_net%8); aaaa[prefix_net/8+1] |= a[0] << (8-prefix_net%8); @@ -447,7 +462,8 @@ handle_ipv6_ptr(struct module_qstate* qstate, int id) /* Convert the PTR query string to an IPv6 address. */ memset(&sin6, 0, sizeof(sin6)); sin6.sin6_family = AF_INET6; - if (!ptr_to_ipv6((char*)qstate->qinfo.qname, sin6.sin6_addr.s6_addr)) + if (!ptr_to_ipv6((char*)qstate->qinfo.qname, sin6.sin6_addr.s6_addr, + sizeof(sin6.sin6_addr.s6_addr))) return module_wait_module; /* Let other module handle this. */ /* @@ -470,7 +486,8 @@ handle_ipv6_ptr(struct module_qstate* qstate, int id) if (!(qinfo.qname = regional_alloc(qstate->region, MAX_PTR_QNAME_IPV4))) return module_error; qinfo.qname_len = ipv4_to_ptr(extract_ipv4(sin6.sin6_addr.s6_addr, - dns64_env->prefix_net), (char*)qinfo.qname); + sizeof(sin6.sin6_addr.s6_addr), dns64_env->prefix_net), + (char*)qinfo.qname, MAX_PTR_QNAME_IPV4); /* Create the new sub-query. */ fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub)); @@ -740,8 +757,10 @@ dns64_synth_aaaa_data(const struct ub_packed_rrset_key* fk, dd->rr_data[i][1] = 16; synthesize_aaaa( ((struct sockaddr_in6*)&dns64_env->prefix_addr)->sin6_addr.s6_addr, + sizeof(((struct sockaddr_in6*)&dns64_env->prefix_addr)->sin6_addr.s6_addr), dns64_env->prefix_net, &fd->rr_data[i][2], - &dd->rr_data[i][2] ); + fd->rr_len[i]-2, &dd->rr_data[i][2], + dd->rr_len[i]-2); dd->rr_ttl[i] = fd->rr_ttl[i]; } @@ -928,6 +947,12 @@ dns64_inform_super(struct module_qstate* qstate, int id, if(!super_dq) { super_dq = (struct dns64_qstate*)regional_alloc(super->region, sizeof(*super_dq)); + if(!super_dq) { + log_err("out of memory"); + super->return_rcode = LDNS_RCODE_SERVFAIL; + super->return_msg = NULL; + return; + } super->minfo[id] = super_dq; memset(super_dq, 0, sizeof(*super_dq)); super_dq->started_no_cache_store = super->no_cache_store; diff --git a/dnscrypt/dnscrypt.c b/dnscrypt/dnscrypt.c index 0787dec23ddbbe312fdd8f22d0144f8efe29452e..843735018b23f1b4a9e1c52f8e275ba61a9da4b8 100644 --- a/dnscrypt/dnscrypt.c +++ b/dnscrypt/dnscrypt.c @@ -316,15 +316,15 @@ dnscrypt_server_uncurve(struct dnsc_env* env, #else return -1; #endif - } else { - if (crypto_box_beforenm(nmkey, - query_header->publickey, - cert->keypair->crypt_secretkey) != 0) { - return -1; - } - } - // Cache the shared secret we just computed. - dnsc_shared_secret_cache_insert(env->shared_secrets_cache, + } else { + if (crypto_box_beforenm(nmkey, + query_header->publickey, + cert->keypair->crypt_secretkey) != 0) { + return -1; + } + } + // Cache the shared secret we just computed. + dnsc_shared_secret_cache_insert(env->shared_secrets_cache, key, hash, nmkey); @@ -442,20 +442,7 @@ dnscrypt_hrtime(void) static void add_server_nonce(uint8_t *nonce) { - uint64_t ts; - uint64_t tsn; - uint32_t suffix; - ts = dnscrypt_hrtime(); - // TODO? dnscrypt-wrapper does some logic with context->nonce_ts_last - // unclear if we really need it, so skipping it for now. - tsn = (ts << 10) | (randombytes_random() & 0x3ff); -#if (BYTE_ORDER == LITTLE_ENDIAN) - tsn = - (((uint64_t)htonl((uint32_t)tsn)) << 32) | htonl((uint32_t)(tsn >> 32)); -#endif - memcpy(nonce + crypto_box_HALF_NONCEBYTES, &tsn, 8); - suffix = randombytes_random(); - memcpy(nonce + crypto_box_HALF_NONCEBYTES + 8, &suffix, 4); + randombytes_buf(nonce + crypto_box_HALF_NONCEBYTES, 8/*tsn*/+4/*suffix*/); } /** @@ -732,6 +719,11 @@ dnsc_load_local_data(struct dnsc_env* dnscenv, struct config_file *cfg) ); continue; } + if((unsigned)strlen(dnscenv->provider_name) >= (unsigned)0xffff0000) { + /* guard against integer overflow in rrlen calculation */ + verbose(VERB_OPS, "cert #%" PRIu32 " is too long", serial); + continue; + } rrlen = strlen(dnscenv->provider_name) + strlen(ttl_class_type) + 4 * sizeof(struct SignedCert) + // worst case scenario @@ -746,9 +738,9 @@ dnsc_load_local_data(struct dnsc_env* dnscenv, struct config_file *cfg) for(j=0; jlocal_data, strdup(rr)); free(rr); } @@ -877,7 +869,7 @@ sodium_misuse_handler(void) fatal_exit( "dnscrypt: libsodium could not be initialized, this typically" " happens when no good source of entropy is found. If you run" - " unbound in a chroot, make sure /dev/random is available. See" + " unbound in a chroot, make sure /dev/urandom is available. See" " https://www.unbound.net/documentation/unbound.conf.html"); } diff --git a/doc/Changelog b/doc/Changelog index 2c029484f612b2cc3b1c54804dd139208ec9592d..1fca26b643fdfa7e1877f78fa0704987caf6e886 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,596 @@ -5 February 2019: Wouter - - Fix tls-ciphers spelling in example.conf +6 December 2019: Wouter + - Fix ipsecmod compile. + - Fix Makefile.in for ipset module compile, from Adi Prasaja. + +5 December 2019: Wouter + - unbound-fuzzers.tar.bz2: three programs for fuzzing, that are 1:1 + replacements for unbound-fuzzme.c that gets created after applying + the contrib/unbound-fuzzme.patch. They are contributed by + Eric Sesterhenn from X41 D-Sec. + - tag for 1.9.6rc1. + +4 December 2019: Wouter + - Fix lock type for memory purify log lock deletion. + - Fix testbound for alloccheck runs, memory purify and lock checks. + - update contrib/fastrpz.patch to apply more cleanly. + - Fix Make Test Fails when Configured With --enable-alloc-nonregional, + reported by X41 D-Sec. + +3 December 2019: Wouter + - Merge pull request #124 from rmetrich: Changed log lock + from 'quick' to 'basic' because this is an I/O lock. + - Fix text around serial arithmatic used for RRSIG times to refer + to correct RFC number. + - Fix Assert Causing DoS in synth_cname(), + reported by X41 D-Sec. + - Fix similar code in auth_zone synth cname to add the extra checks. + - Fix Assert Causing DoS in dname_pkt_copy(), + reported by X41 D-Sec. + - Fix OOB Read in sldns_wire2str_dname_scan(), + reported by X41 D-Sec. + - Fix Out of Bounds Write in sldns_str2wire_str_buf(), + reported by X41 D-Sec. + - Fix Out of Bounds Write in sldns_b64_pton(), + fixed by check in sldns_str2wire_int16_data_buf(), + reported by X41 D-Sec. + - Fix Insufficient Handling of Compressed Names in dname_pkt_copy(), + reported by X41 D-Sec. + - Fix Out of Bound Write Compressed Names in rdata_copy(), + reported by X41 D-Sec. + - Fix Hang in sldns_wire2str_pkt_scan(), + reported by X41 D-Sec. + This further lowers the max to 256. + - Fix snprintf() supports the n-specifier, + reported by X41 D-Sec. + - Fix Bad Indentation, in dnscrypt.c, + reported by X41 D-Sec. + - Fix Client NONCE Generation used for Server NONCE, + reported by X41 D-Sec. + - Fix compile error in dnscrypt. + - Fix _vfixed not Used, removed from sbuffer code, + reported by X41 D-Sec. + - Fix Hardcoded Constant, reported by X41 D-Sec. + - make depend + +2 December 2019: Wouter + - Merge pull request #122 from he32: In tcp_callback_writer(), + don't disable time-out when changing to read. + +22 November 2019: George + - Fix compiler warnings. + +22 November 2019: Wouter + - Fix dname loop maximum, reported by Eric Sesterhenn from X41 D-Sec. + - Add make distclean that removes everything configure produced, + and make maintainer-clean that removes bison and flex output. + +20 November 2019: Wouter + - Fix Out of Bounds Read in rrinternal_get_owner(), + reported by X41 D-Sec. + - Fix Race Condition in autr_tp_create(), + reported by X41 D-Sec. + - Fix Shared Memory World Writeable, + reported by X41 D-Sec. + - Adjust unbound-control to make stats_shm a read only operation. + - Fix Weak Entropy Used For Nettle, + reported by X41 D-Sec. + - Fix Randomness Error not Handled Properly, + reported by X41 D-Sec. + - Fix Out-of-Bounds Read in dname_valid(), + reported by X41 D-Sec. + - Fix Config Injection in create_unbound_ad_servers.sh, + reported by X41 D-Sec. + - Fix Local Memory Leak in cachedb_init(), + reported by X41 D-Sec. + - Fix Integer Underflow in Regional Allocator, + reported by X41 D-Sec. + - Upgrade compat/getentropy_linux.c to version 1.46 from OpenBSD. + - Synchronize compat/getentropy_win.c with version 1.5 from + OpenBSD, no changes but makes the file, comments, identical. + - Upgrade compat/getentropy_solaris.c to version 1.13 from OpenBSD. + - Upgrade compat/getentropy_osx.c to version 1.12 from OpenBSD. + - Changes to compat/getentropy files for, + no link to openssl if using nettle, and hence config.h for + HAVE_NETTLE variable. + compat definition of MAP_ANON, for older systems. + ifdef stdint.h inclusion for older systems. + ifdef sha2.h inclusion for older systems. + - Fixed Compat Code Diverging from Upstream, reported by X41 D-Sec. + - Fix compile with --enable-alloc-checks, reported by X41 D-Sec. + - Fix Terminating Quotes not Written, reported by X41 D-Sec. + - Fix Useless memset() in validator, reported by X41 D-Sec. + - Fix Unrequired Checks, reported by X41 D-Sec. + - Fix Enum Name not Used, reported by X41 D-Sec. + - Fix NULL Pointer Dereference via Control Port, + reported by X41 D-Sec. + - Fix Bad Randomness in Seed, reported by X41 D-Sec. + - Fix python examples/calc.py for eval, reported by X41 D-Sec. + - Fix comments for doxygen in dns64. + +19 November 2019: Wouter + - Fix CVE-2019-18934, shell execution in ipsecmod. + - 1.9.5 is 1.9.4 with bugfix, trunk is 1.9.6 in development. + - Fix authzone printout buffer length check. + - Fixes to please lint checks. + - Fix Integer Overflow in Regional Allocator, + reported by X41 D-Sec. + - Fix Unchecked NULL Pointer in dns64_inform_super() + and ipsecmod_new(), reported by X41 D-Sec. + - Fix Out-of-bounds Read in rr_comment_dnskey(), + reported by X41 D-Sec. + - Fix Integer Overflows in Size Calculations, + reported by X41 D-Sec. + - Fix Integer Overflow to Buffer Overflow in + sldns_str2wire_dname_buf_origin(), reported by X41 D-Sec. + - Fix Out of Bounds Read in sldns_str2wire_dname(), + reported by X41 D-Sec. + - Fix Out of Bounds Write in sldns_bget_token_par(), + reported by X41 D-Sec. + +18 November 2019: Wouter + - In unbound-host use separate variable for get_option to please + code checkers. + - update to bison output of 3.4.1 in code repository. + - Provide a prototype for compat malloc to remove compile warning. + - Portable grep usage for reuseport configure test. + - Check return type of HMAC_Init_ex for openssl 0.9.8. + - gitignore .source tempfile used for compatible make. + +13 November 2019: Wouter + - iana portlist updated. + - contrib/fastrpz.patch updated to apply for current code. + - fixes for splint cleanliness, long vs int in SSL set_mode. + +11 November 2019: Wouter + - Fix #109: check number of arguments for stdin-pipes in + unbound-control and fail if too many arguments. + - Merge #102 from jrtc27: Add getentropy emulation for FreeBSD. + +24 October 2019: Wouter + - Fix #99: Memory leak in ub_ctx (event_base will never be freed). + +23 October 2019: George + - Add new configure option `--enable-fully-static` to enable full static + build if requested; in relation to #91. + +23 October 2019: Wouter + - Merge #97: manpage: Add missing word on unbound.conf, + from Erethon. + +22 October 2019: Wouter + - drop-tld.diff: adds option drop-tld: yesno that drops 2 label + queries, to stop random floods. Apply with + patch -p1 < contrib/drop-tld.diff and compile. + From Saksham Manchanda (Secure64). Please note that we think this + will drop DNSKEY and DS lookups for tlds and hence break DNSSEC + lookups for downstream clients. + +7 October 2019: Wouter + - Add doxygen comments to unbound-anchor source address code, in #86. + +3 October 2019: Wouter + - Merge #90 from vcunat: fix build with nettle-3.5. + - Merge 1.9.4 release with fix for vulnerability CVE-2019-16866. + - Continue with development of 1.9.5. + - Merge #86 from psquarejho: Added -b source address option to + smallapp/unbound-anchor.c, from Lukas Wunner. + +26 September 2019: Wouter + - Merge #87 from hardfalcon: Fix contrib/unbound.service.in, + Drop CAP_KILL, use + prefix for ExecReload= instead. + +25 September 2019: Wouter + - The unbound.conf includes are sorted ascending, for include + statements with a '*' from glob. + +23 September 2019: Wouter + - Merge #85 for #84 from sam-lunt: Add kill capability to systemd + service file to fix that systemctl reload fails. + +20 September 2019: Wouter + - Merge #82 from hardfalcon: Downgrade CAP_NET_ADMIN to CAP_NET_RAW + in unbound.service. + - Merge #81 from Maryse47: Consistently use /dev/urandom instead + of /dev/random in scripts and docs. + - Merge #83 from Maryse47: contrib/unbound.service.in: do not fork + into the background. + +19 September 2019: Wouter + - Fix #78: Memory leak in outside_network.c. + - Merge pull request #76 from Maryse47: Improvements and fixes for + systemd unbound.service. + - oss-fuzz badge on README.md. + - Fix fix for #78 to also free service callback struct. + - Fix for oss-fuzz build warning. + - Fix wrong response ttl for prepended short CNAME ttls, this would + create a wrong zero_ttl response count with serve-expired enabled. + - Merge #80 from stasic: Improve wording in man page. + +11 September 2019: Wouter + - Use explicit bzero for wiping clear buffer of hash in cachedb, + reported by Eric Sesterhenn from X41 D-Sec. + +9 September 2019: Wouter + - Fix #72: configure --with-syslog-facility=LOCAL0-7 with default + LOG_DAEMON (as before) can set the syslog facility that the server + uses to log messages. + +4 September 2019: Wouter + - Fix #71: fix openssl error squelch commit compilation error. + +3 September 2019: Wouter + - squelch DNS over TLS errors 'ssl handshake failed crypto error' + on low verbosity, they show on verbosity 3 (query details), because + there is a high volume and the operator cannot do anything for the + remote failure. Specifically filters the high volume errors. + +2 September 2019: Wouter + - ipset module #28: log that an address is added, when verbosity high. + - ipset: refactor long routine into three smaller ones. + - updated Makefile dependencies. + +23 August 2019: Wouter + - Fix contrib/fastrpz.patch asprintf return value checks. + +22 August 2019: Wouter + - Fix that pkg-config is setup before --enable-systemd needs it. + - 1.9.3rc2 release candidate tag. And this became the 1.9.3 release. + Master is 1.9.4 in development. + +21 August 2019: Wouter + - Fix log_dns_msg to log irrespective of minimal responses config. + +19 August 2019: Ralph + - Document limitation of pidfile removal outside of chroot directory. + +16 August 2019: Wouter + - Fix unittest valgrind false positive uninitialised value report, + where if gcc 9.1.1 uses -O2 (but not -O1) then valgrind 3.15.0 + issues an uninitialised value for the token buffer at the str2wire.c + rrinternal_get_owner() strcmp with the '@' value. Rewritten to use + straight character comparisons removes the false positive. Also + valgrinds --expensive-definedness-checks=yes can stop this false + positive. + - Please doxygen's parser for "@" occurrence in doxygen comment. + - Fixup contrib/fastrpz.patch + - Remove warning about unknown cast-function-type warning pragma. + +15 August 2019: Wouter + - iana portlist updated. + - Fix autotrust temp file uniqueness windows compile. + - avoid warning about upcast on 32bit systems for autotrust. + - escape commandline contents for -V. + - Fix character buffer size in ub_ctx_hosts. + - 1.9.3rc1 release candidate tag. + - Option -V prints if TCP fastopen is available. + +14 August 2019: George + - Fix #59, when compiled with systemd support check that we can properly + communicate with systemd through the `NOTIFY_SOCKET`. + +14 August 2019: Wouter + - Generate configlexer with newer flex. + - Fix warning for unused variable for compilation without systemd. + +12 August 2019: George + - Introduce `-V` option to print the version number and build options. + Previously reported build options like linked libs and linked modules + are now moved from `-h` to `-V` as well for consistency. + - PACKAGE_BUGREPORT now also includes link to GitHub issues. + +1 August 2019: Wouter + - For #52 #53, second context does not close logfile override. + - Fix #52 #53, fix for example fail program. + - Fix to return after failed auth zone http chunk write. + - Fix to remove unused test for task_probe existance. + - Fix to timeval_add for remaining second in microseconds. + - Check repinfo in worker_handle_request, if null, drop it. + +29 July 2019: Wouter + - Add verbose log message when auth zone file is written, at level 4. + - Add hex print of trust anchor pointer to trust anchor file temp + name to make it unique, for libunbound created multiple contexts. + +23 July 2019: Wouter + - Fix question section mismatch in local zone redirect. + +19 July 2019: Wouter + - Fix #49: Set no renegotiation on the SSL context to stop client + session renegotiation. + +12 July 2019: Wouter + - Fix #48: Unbound returns additional records on NODATA response, + if minimal-responses is enabled, also the additional for negative + responses is removed. + +9 July 2019: Ralph + - Fix in respip addrtree selection. Absence of addr_tree_init_parents() + call made it impossible to go up the tree when the matching netmask is + too specific. + +5 July 2019: Ralph + - Fix for possible assertion failure when answering respip CNAME from + cache. + +25 June 2019: Wouter + - For #45, check that 127.0.0.1 and ::1 are not used in unbound.conf + when do-not-query-localhost is turned on, or at default on, + unbound-checkconf prints a warning if it is found in forward-addr or + stub-addr statements. + +24 June 2019: Wouter + - Fix memleak in unit test, reported from the clang 8.0 static analyzer. + +18 June 2019: Wouter + - PR #28: IPSet module, by Kevin Chou. Created a module to support + the ipset that could add the domain's ip to a list easily. + Needs libmnl, and --enable-ipset and config it, doc/README.ipset.md. + - Fix to omit RRSIGs from addition to the ipset. + - Fix to make unbound-control with ipset, remove unused variable, + use unsigned type because of comparison, and assign null instead + of compare with it. Remade lex and yacc output. + - make depend + - Added documentation to the ipset files (for doxygen output). + - Merge PR #6: Python module: support multiple instances + - Merge PR #5: Python module: define constant MODULE_RESTART_NEXT + - Merge PR #4: Python module: assign something useful to the + per-query data store 'qdata' + - Fix python dict reference and double free in config. + +17 June 2019: Wouter + - Master contains version 1.9.3 in development. + - Fix #39: In libunbound, leftover logfile is close()d unpredictably. + - Fix for #24: Fix abort due to scan of auth zone masters using old + address from previous scan. + +12 June 2019: Wouter + - Fix another spoolbuf storage code point, in prefetch. + - 1.9.2rc3 release candidate tag. Which became the 1.9.2 release + on 17 June 2019. + +11 June 2019: Wouter + - Fix that fixes the Fix that spoolbuf is not used to store tcp + pipelined response between mesh send and callback end, this fixes + error cases that did not use the correct spoolbuf. + - 1.9.2rc2 release candidate tag. + +6 June 2019: Wouter + - 1.9.2rc1 release candidate tag. + +4 June 2019: Wouter + - iana portlist updated. + +29 May 2019: Wouter + - Fix to guard _OPENBSD_SOURCE from redefinition. + +28 May 2019: Wouter + - Fix to define _OPENBSD_SOURCE to get reallocarray on NetBSD. + - gitignore config.h.in~. + +27 May 2019: Wouter + - Fix double file close in tcp pipelined response code. + +24 May 2019: Wouter + - Fix that spoolbuf is not used to store tcp pipelined response + between mesh send and callback end. + +20 May 2019: Wouter + - Note that so-reuseport at extreme load is better turned off, + otherwise queries are not distributed evenly, on Linux 4.4.x. + +16 May 2019: Wouter + - Fix #31: swig 4.0 and python module. + +13 May 2019: Wouter + - Squelch log messages from tcp send about connection reset by peer. + They can be enabled with verbosity at higher values for diagnosing + network connectivity issues. + - Attempt to fix malformed tcp response. + +9 May 2019: Wouter + - Revert fix for oss-fuzz, error is in that build script that + unconditionally includes .o files detected by configure, also + when the machine architecture uses different LIBOBJS files. + +8 May 2019: Wouter + - Attempt to fix build failure in oss-fuzz because of reallocarray. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14648. + Does not omit compile flags from commandline. + +7 May 2019: Wouter + - Fix edns-subnet locks, in error cases the lock was not unlocked. + - Fix doxygen output error on readme markdown vignettes. + +6 May 2019: Wouter + - Fix #29: Solaris 11.3 and missing symbols be64toh, htobe64. + - Fix #30: AddressSanitizer finding in lookup3.c. This sets the + hash function to use a slower but better auditable code that does + not read beyond array boundaries. This makes code better security + checkable, and is better for security. It is fixed to be slower, + but not read outside of the array. + +2 May 2019: Wouter + - contrib/fastrpz.patch updated for code changes, and with git diff. + - Fix .gitignore, add pythonmod and dnstap generated files. + And unit test generated files, and generated doc files. + +1 May 2019: Wouter + - Update makedist for git. + - Nicer travis output for clang analysis. + - PR #16: XoT support, AXFR over TLS, turn it on with + master: # in unbound.conf. This uses TLS to + download the AXFR (or IXFR). + +25 April 2019: Wouter + - Fix wrong query name in local zone redirect answers with a CNAME, + the copy of the local alias is in unpacked form. + +18 April 2019: Ralph + - Scrub RRs from answer section when reusing NXDOMAIN message for + subdomain answers. + - For harden-below-nxdomain: do not consider a name to be non-exitent + when message contains a CNAME record. + +18 April 2019: Wouter + - travis build file. + +16 April 2019: Wouter + - Better braces in if statement in TCP fastopen code. + - iana portlist updated. + +15 April 2019: Wouter + - Fix tls write event for read state change to re-call SSL_write and + not resume the TLS handshake. + +11 April 2019: George + - Update python documentation for init_standard(). + - Typos. + +11 April 2019: Wouter + - Fix that auth zone uses correct network type for sockets for + SOA serial probes. This fixes that probes fail because earlier + probe addresses are unreachable. + - Fix that auth zone fails over to next master for timeout in tcp. + - Squelch SSL read and write connection reset by peer and broken pipe + messages. Verbosity 2 and higher enables them. + +8 April 2019: Wouter + - Fix to use event_assign with libevent for thread-safety. + - verbose information about auth zone lookup process, also lookup + start, timeout and fail. + - Fix #17: Add python module example from Jan Janak, that is a + plugin for the Unbound DNS resolver to resolve DNS records in + multicast DNS [RFC 6762] via Avahi. The plugin communicates + with Avahi via DBus. The comment section at the beginning of + the file contains detailed documentation. + - Fix to wipe ssl ticket keys from memory with explicit_bzero, + if available. + +5 April 2019: Wouter + - Fix to reinit event structure for accepted TCP (and TLS) sockets. + +4 April 2019: Wouter + - Fix spelling error in log output for event method. + +3 April 2019: Wouter + - Move goto label in answer_from_cache to the end of the function + where it is more visible. + - Fix auth-zone NSEC3 response for wildcard nodata answers, + include the closest encloser in the answer. + +2 April 2019: Wouter + - Fix auth-zone NSEC3 response for empty nonterminals with exact + match nsec3 records. + - Fix for out of bounds integers, thanks to OSTIF audit. It is in + allocation debug code. + - Fix for auth zone nsec3 ent fix for wildcard nodata. + +25 March 2019: Wouter + - Fix that tls-session-ticket-keys: "" on its own in unbound.conf + disables the tls session ticker key calls into the OpenSSL API. + - Fix crash if tls-servic-pem not filled in when necessary. + +21 March 2019: Wouter + - Fix #4240: Fix whitespace cleanup in example.conf. + +19 March 2019: Wouter + - add type CAA to libpyunbound (accessing libunbound from python). + +18 March 2019: Wouter + - Add log message, at verbosity 4, that says the query is encrypted + with TLS, if that is enabled for the query. + - Fix #4239: set NOTIMPL when deny-any is enabled, for RFC8482. + +7 March 2019: Wouter + - Fix for #4233: guard use of NDEBUG, so that it can be passed in + CFLAGS into configure. + +5 March 2019: Wouter + - Tag release 1.9.1rc1. Which became 1.9.1 on 12 March 2019. Trunk + has 1.9.2 in development. + +1 March 2019: Wouter + - output forwarder log in ssl_req_order test. + +28 February 2019: Wouter + - Remove memory leak on pythonmod python2 script file init. + - Remove swig gcc8 python function cast warnings, they are ignored. + - Print correct module that failed when module-config is wrong. + +27 February 2019: Wouter + - Fix #4229: Unbound man pages lack information, about access-control + order and local zone tags, and elements in views. + - Fix #14: contrib/unbound.init: Fix wrong comparison judgment + before copying. + - Fix for python module on Windows, fix fopen. + +25 February 2019: Wouter + - Fix #4227: pair event del and add for libevent for tcp_req_info. + +21 February 2019: Wouter + - Fix the error for unknown module in module-config is understandable, + and explains it was not compiled in and where to see the list. + - In example.conf explain where to put cachedb module in module-config. + - In man page and example config explain that most modules have to + be listed at the start of module-config. + +20 February 2019: Wouter + - Fix pythonmod include and sockaddr_un ifdefs for compile on + Windows, and for libunbound. + +18 February 2019: Wouter + - Print query name with ip_ratelimit exceeded log lines. + - Spaces instead of tabs in that log message. + - Print query name and IP address when domain rate limit exceeded. + +14 February 2019: Wouter + - Fix capsforid canonical sort qsort callback. + +11 February 2019: Wouter + - Note default for module-config in man page. + - Fix recursion lame test for qname minimisation asked queries, + that were not present in the set of prepared answers. + - Fix #13: Remove left-over requirements on OpenSSL >= 1.1.0 for + cert name matching, from man page. + - make depend, with newer gcc, nicer layout. + +7 February 2019: Wouter + - Fix #4206: OpenSSL 1.0.2 hostname verification for FreeBSD 11.2. + - Fix that qname minimisation does not skip a label when missing + nameserver targets need to be fetched. + - Fix #4225: clients seem to erroneously receive no answer with + DNS-over-TLS and qname-minimisation. + +4 February 2019: Wouter + - Fix that log-replies prints the correct name for local-alias + names, for names that have a CNAME in local-data configuration. + It logs the original query name, not the target of the CNAME. + - Add local-zone type inform_redirect, which logs like type inform, + and redirects like type redirect. + - Perform canonical sort for 0x20 capsforid compare of replies, + this sorts rrsets in the authority and additional section before + comparison, so that out of order rrsets do not cause failure. + +31 January 2019: Wouter + - Set ub_ctx_set_tls call signature in ltrace config file for + libunbound in contrib/libunbound.so.conf. + - improve documentation for tls-service-key and forward-first. + - #10: fixed pkg-config operations, PKG_PROG_PKG_CONFIG moved out of + conditional section, fixes systemd builds, from Enrico Scholz. + - #9: For openssl 1.0.2 use the CRYPTO_THREADID locking callbacks, + still supports the set_id_callback previous API. And for 1.1.0 + no locking callbacks are needed. + - #8: Fix OpenSSL without ENGINE support compilation. + - Wipe TLS session key data from memory on exit. + +30 January 2019: Ralph + - Fix case in which query timeout can result in marking delegation + as edns_lame_known. + +29 January 2019: Wouter + - Fix spelling of tls-ciphers in example.conf.in. + - Fix #4224: auth_xfr_notify.rpl test broken due to typo + - Fix locking for libunbound context setup with broken port config. 28 January 2019: Wouter - ub_ctx_set_tls call for libunbound that enables DoT for the machines @@ -8,7 +599,9 @@ - List example config for root zone copy locally hosted with auth-zone as suggested from draft-ietf-dnsop-7706-bis-02. But with updated B root address. - - set version to 1.9.0 for release. + - set version to 1.9.0 for release. And this was released with the + spelling for tls-ciphers fix as 1.9.0 on Feb 5. Trunk has 1.9.1 in + development. 25 January 2019: Wouter - Fix that tcp for auth zone and outgoing does not remove and diff --git a/doc/README b/doc/README index 0afef47bee24b3d8beacb6d1e8d1b54e54ecf833..3346245754912542e091a75f80a2a71592de4957 100644 --- a/doc/README +++ b/doc/README @@ -1,4 +1,4 @@ -README for Unbound 1.9.0 +README for Unbound 1.9.6 Copyright 2007 NLnet Labs http://unbound.net @@ -99,7 +99,7 @@ o If you are not receiving the correct source IP address on replies (e.g. the config file is an alternative. The interface-automatic option uses non portable socket options, Linux and FreeBSD should work fine. o The warning 'openssl has no entropy, seeding with time', with chroot - enabled, may be solved with a symbolic link to /dev/random from . + enabled, may be solved with a symbolic link to /dev/urandom from . o On Solaris 5.10 some libtool packages from repositories do not work with gcc, showing errors gcc: unrecognized option `-KPIC' To solve this do ./configure libtool=./libtool [your options...]. diff --git a/doc/README.ipset.md b/doc/README.ipset.md new file mode 100644 index 0000000000000000000000000000000000000000..4bd993e67ad1b2c79548fb005e46f889551df712 --- /dev/null +++ b/doc/README.ipset.md @@ -0,0 +1,65 @@ +## Created a module to support the ipset that could add the domain's ip to a list easily. + +### Purposes: +* In my case, I can't access the facebook, twitter, youtube and thousands web site for some reason. VPN is a solution. But the internet too slow whether all traffics pass through the vpn. +So, I set up a transparent proxy to proxy the traffic which has been blocked only. +At the final step, I need to install a dns service which would work with ipset well to launch the system. +I did some research for this. Unfortunately, Unbound, My favorite dns service doesn't support ipset yet. So, I decided to implement it by my self and contribute the patch. It's good for me and the community. +``` +# unbound.conf +server: + ... + local-zone: "facebook.com" ipset + local-zone: "twitter.com" ipset + local-zone: "instagram.com" ipset + more social website + +ipset: + name-v4: "gfwlist" +``` +``` +# iptables +iptables -A PREROUTING -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-ports 10800 +iptables -A OUTPUT -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-ports 10800 +``` + +* This patch could work with iptables rules to batch block the IPs. +``` +# unbound.conf +server: + ... + local-zone: "facebook.com" ipset + local-zone: "twitter.com" ipset + local-zone: "instagram.com" ipset + more social website + +ipset: + name-v4: "blacklist" + name-v6: "blacklist6" +``` +``` +# iptables +iptables -A INPUT -m set --set blacklist src -j DROP +ip6tables -A INPUT -m set --set blacklist6 src -j DROP +``` + +### Notes: +* To enable this module the root privileges is required. +* Please create a set with ipset command first. eg. **ipset -N blacklist iphash** + +### How to use: +``` +./configure --enable-ipset +make && make install +``` + +### Configuration: +``` +# unbound.conf +server: + ... + local-zone: "example.com" ipset + +ipset: + name-v4: "blacklist" +``` diff --git a/doc/TODO b/doc/TODO index bfeef4aa47bf60370ff5a7da72b86e647ae915e3..a2690451a2bbb9fc784d9f541cb5ec73dc31c394 100644 --- a/doc/TODO +++ b/doc/TODO @@ -29,7 +29,7 @@ o support OPT record placement on recv anywhere in the additional section. o add local-file: config with authority features. o (option) to make local-data answers be secure for libunbound (default=no) o (option) to make chroot: copy all needed files into jail (or make jail) - perhaps also print reminder to link /dev/random and sysloghack. + perhaps also print reminder to link /dev/urandom and sysloghack. o overhaul outside-network servicedquery to merge with udpwait and tcpwait, to make timers in servicedquery independent of udpwait queues. o check into rebinding ports for efficiency, configure time test. diff --git a/doc/example.conf.in b/doc/example.conf.in index bbfaf66ddaed8ac2dc9a67d3f6347dc2d16d59fc..0a8c179f971dfcf1994203fb703f892dec0b1720 100644 --- a/doc/example.conf.in +++ b/doc/example.conf.in @@ -1,7 +1,7 @@ # # Example configuration file. # -# See unbound.conf(5) man page, version 1.9.0. +# See unbound.conf(5) man page, version 1.9.6. # # this is a comment. @@ -103,6 +103,7 @@ server: # so-sndbuf: 0 # use SO_REUSEPORT to distribute queries over threads. + # at extreme load it could be better to turn it off to distribute even. # so-reuseport: yes # use IP_TRANSPARENT so the interface: addresses can be non-local @@ -285,7 +286,7 @@ server: # The pid file can be absolute and outside of the chroot, it is # written just prior to performing the chroot and dropping permissions. # - # Additionally, unbound may need to access /dev/random (for entropy). + # Additionally, unbound may need to access /dev/urandom (for entropy). # How to do this is specific to your OS. # # If you give "" no chroot is performed. The path must not end in a /. @@ -475,6 +476,9 @@ server: # module configuration of the server. A string with identifiers # separated by spaces. Syntax: "[dns64] [validator] iterator" + # most modules have to be listed at the beginning of the line, + # except cachedb(just before iterator), and python (at the beginning, + # or, just before the iterator). # module-config: "validator iterator" # File with trusted keys, kept uptodate using RFC5011 probes, @@ -489,7 +493,7 @@ server: # trust anchor signaling sends a RFC8145 key tag query after priming. # trust-anchor-signaling: yes - + # Root key trust anchor sentinel (draft-ietf-dnsop-kskroll-sentinel) # root-key-sentinel: yes @@ -650,6 +654,9 @@ server: # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa. + # Add example.com into ipset + # local-zone: "example.com" ipset + # If unbound is running service for the local host then it is useful # to perform lan-wide lookups to the upstream, and unblock the # long list of local-zones above. If this unbound is a dns server @@ -673,6 +680,7 @@ server: # o typetransparent resolves normally for other types and other names # o inform acts like transparent, but logs client IP address # o inform_deny drops queries and logs client IP address + # o inform_redirect redirects queries and logs client IP address # o always_transparent, always_refuse, always_nxdomain, resolve in # that way but ignore local data for that name # o noview breaks out of that view towards global local-zones. @@ -717,7 +725,7 @@ server: # cipher setting for TLSv1.2 # tls-ciphers: "DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256" - # cipher setting for TLSv1.3 + # cipher setting for TLSv1.3 # tls-ciphersuites: "TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256" # Add the secret file for TLS Session Ticket. @@ -789,7 +797,7 @@ server: # fast-server-permil: 0 # the number of servers that will be used in the fast server selection. # fast-server-num: 3 - + # Specific options for ipsecmod. unbound needs to be configured with # --enable-ipsecmod for these to take effect. # @@ -822,6 +830,8 @@ server: # Python config section. To enable: # o use --with-pythonmodule to configure before compiling. # o list python in the module-config string (above) to enable. +# It can be at the start, it gets validated results, or just before +# the iterator and process before DNSSEC validation. # o and give a python-script to run. python: # Script file to load @@ -906,24 +916,24 @@ remote-control: # notifies. # auth-zone: # name: "." -# master: 199.9.14.201 # b.root-servers.net -# master: 192.33.4.12 # c.root-servers.net -# master: 199.7.91.13 # d.root-servers.net -# master: 192.5.5.241 # f.root-servers.net -# master: 192.112.36.4 # g.root-servers.net -# master: 193.0.14.129 # k.root-servers.net -# master: 192.0.47.132 # xfr.cjr.dns.icann.org -# master: 192.0.32.132 # xfr.lax.dns.icann.org -# master: 2001:500:200::b # b.root-servers.net -# master: 2001:500:2::c # c.root-servers.net -# master: 2001:500:2d::d # d.root-servers.net -# master: 2001:500:2f::f # f.root-servers.net -# master: 2001:500:12::d0d # g.root-servers.net -# master: 2001:7fd::1 # k.root-servers.net -# master: 2620:0:2830:202::132 # xfr.cjr.dns.icann.org -# master: 2620:0:2d0:202::132 # xfr.lax.dns.icann.org -# fallback-enabled: yes -# for-downstream: no +# master: 199.9.14.201 # b.root-servers.net +# master: 192.33.4.12 # c.root-servers.net +# master: 199.7.91.13 # d.root-servers.net +# master: 192.5.5.241 # f.root-servers.net +# master: 192.112.36.4 # g.root-servers.net +# master: 193.0.14.129 # k.root-servers.net +# master: 192.0.47.132 # xfr.cjr.dns.icann.org +# master: 192.0.32.132 # xfr.lax.dns.icann.org +# master: 2001:500:200::b # b.root-servers.net +# master: 2001:500:2::c # c.root-servers.net +# master: 2001:500:2d::d # d.root-servers.net +# master: 2001:500:2f::f # f.root-servers.net +# master: 2001:500:12::d0d # g.root-servers.net +# master: 2001:7fd::1 # k.root-servers.net +# master: 2620:0:2830:202::132 # xfr.cjr.dns.icann.org +# master: 2620:0:2d0:202::132 # xfr.lax.dns.icann.org +# fallback-enabled: yes +# for-downstream: no # for-upstream: yes # auth-zone: # name: "example.org" @@ -972,7 +982,7 @@ remote-control: # Enable external backend DB as auxiliary cache. Specify the backend name # (default is "testframe", which has no use other than for debugging and # testing) and backend-specific options. The 'cachedb' module must be -# included in module-config. +# included in module-config, just before the iterator module. # cachedb: # backend: "testframe" # # secret seed string to calculate hashed keys @@ -985,3 +995,14 @@ remote-control: # redis-server-port: 6379 # # timeout (in ms) for communication with the redis server # redis-timeout: 100 + +# IPSet +# Add specify domain into set via ipset. +# Note: To enable ipset needs run unbound as root user. +# ipset: +# # set name for ip v4 addresses +# name-v4: "list-v4" +# # set name for ip v6 addresses +# name-v6: "list-v6" +# + diff --git a/doc/libunbound.3.in b/doc/libunbound.3.in index 6115a977a501cd8a8a9bfa7c0e84843b7dbe2305..19ef40236897cd349e734ad56edc9abb446ade6d 100644 --- a/doc/libunbound.3.in +++ b/doc/libunbound.3.in @@ -1,4 +1,4 @@ -.TH "libunbound" "3" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "libunbound" "3" "dec 12, 2019" "NLnet Labs" "unbound 1.9.6" .\" .\" libunbound.3 -- unbound library functions manual .\" @@ -44,7 +44,7 @@ .B ub_ctx_zone_remove, .B ub_ctx_data_add, .B ub_ctx_data_remove -\- Unbound DNS validating resolver 1.9.0 functions. +\- Unbound DNS validating resolver 1.9.6 functions. .SH "SYNOPSIS" .B #include .LP diff --git a/doc/unbound-anchor.8.in b/doc/unbound-anchor.8.in index 226297f34dcedef9eb53007ae1bba6636b2a1363..dc1c10cf5034459986ee1f348d13a996f4a2fe26 100644 --- a/doc/unbound-anchor.8.in +++ b/doc/unbound-anchor.8.in @@ -1,4 +1,4 @@ -.TH "unbound-anchor" "8" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "unbound-anchor" "8" "dec 12, 2019" "NLnet Labs" "unbound 1.9.6" .\" .\" unbound-anchor.8 -- unbound anchor maintenance utility manual .\" @@ -69,6 +69,10 @@ The server name, it connects to https://name. Specify without https:// prefix. The default is "data.iana.org". It connects to the port specified with \-P. You can pass an IPv4 address or IPv6 address (no brackets) if you want. .TP +.B \-b \fIaddress +The source address to bind to for domain resolution and contacting the server +on https. May be either an IPv4 address or IPv6 address (no brackets). +.TP .B \-x \fIpath The pathname to the root\-anchors.xml file on the server. (forms URL with \-u). The default is /root\-anchors/root\-anchors.xml. diff --git a/doc/unbound-checkconf.8.in b/doc/unbound-checkconf.8.in index 9e5df52c98a1214376ec671339467b03a1419d72..30d53f4bec13d7bbcde79f055791a11388f4c099 100644 --- a/doc/unbound-checkconf.8.in +++ b/doc/unbound-checkconf.8.in @@ -1,4 +1,4 @@ -.TH "unbound-checkconf" "8" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "unbound-checkconf" "8" "dec 12, 2019" "NLnet Labs" "unbound 1.9.6" .\" .\" unbound-checkconf.8 -- unbound configuration checker manual .\" diff --git a/doc/unbound-control.8.in b/doc/unbound-control.8.in index f7558e5a9ed2b7fdbbf902a20f1b23efcce1bb3b..754fdf987aace3c750111320097b8dc2e6fcd172 100644 --- a/doc/unbound-control.8.in +++ b/doc/unbound-control.8.in @@ -1,4 +1,4 @@ -.TH "unbound-control" "8" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "unbound-control" "8" "dec 12, 2019" "NLnet Labs" "unbound 1.9.6" .\" .\" unbound-control.8 -- unbound remote control manual .\" diff --git a/doc/unbound-host.1.in b/doc/unbound-host.1.in index 1c24aa601d0949a478580cc08fcd69fe3709b353..ac8be5bff5f5f8818dc9d28cc5a04b94efeff0ba 100644 --- a/doc/unbound-host.1.in +++ b/doc/unbound-host.1.in @@ -1,4 +1,4 @@ -.TH "unbound\-host" "1" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "unbound\-host" "1" "dec 12, 2019" "NLnet Labs" "unbound 1.9.6" .\" .\" unbound-host.1 -- unbound DNS lookup utility .\" diff --git a/doc/unbound.8.in b/doc/unbound.8.in index 999ac24fcacf411a0dec81f6228524340578e77f..145620b73c9d7e8a5fe314368d7b02e9d24f65dc 100644 --- a/doc/unbound.8.in +++ b/doc/unbound.8.in @@ -1,4 +1,4 @@ -.TH "unbound" "8" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "unbound" "8" "dec 12, 2019" "NLnet Labs" "unbound 1.9.6" .\" .\" unbound.8 -- unbound manual .\" @@ -9,7 +9,7 @@ .\" .SH "NAME" .B unbound -\- Unbound DNS validating resolver 1.9.0. +\- Unbound DNS validating resolver 1.9.6. .SH "SYNOPSIS" .B unbound .RB [ \-h ] @@ -54,7 +54,7 @@ resolvers are using the same port number (53). The available options are: .TP .B \-h -Show the version and commandline option help. +Show the version number and commandline option help, and exit. .TP .B \-c\fI cfgfile Set the config file with settings for unbound to read instead of reading the @@ -76,6 +76,9 @@ concurrently. .B \-v Increase verbosity. If given multiple times, more information is logged. This is in addition to the verbosity (if any) from the config file. +.TP +.B \-V +Show the version number and build options, and exit. .SH "SEE ALSO" \fIunbound.conf\fR(5), \fIunbound\-checkconf\fR(8), diff --git a/doc/unbound.conf.5.in b/doc/unbound.conf.5.in index 2710100da9bfb63004163143b7a556ede86b4bf7..d6352bcd983a81515db0cdaec440896e3be7e7a8 100644 --- a/doc/unbound.conf.5.in +++ b/doc/unbound.conf.5.in @@ -1,4 +1,4 @@ -.TH "unbound.conf" "5" "Feb 5, 2019" "NLnet Labs" "unbound 1.9.0" +.TH "unbound.conf" "5" "dec 12, 2019" "NLnet Labs" "unbound 1.9.6" .\" .\" unbound.conf.5 -- unbound.conf manual .\" @@ -50,7 +50,7 @@ server: username: unbound # make sure unbound can access entropy from inside the chroot. # e.g. on linux the use these commands (on BSD, devfs(8) is used): - # mount \-\-bind \-n /dev/random /etc/unbound/dev/random + # mount \-\-bind \-n /dev/urandom /etc/unbound/dev/urandom # and mount \-\-bind \-n /dev/log /etc/unbound/dev/log chroot: "/etc/unbound" # logfile: "/etc/unbound/unbound.log" #uncomment to use logfile. @@ -300,6 +300,8 @@ it may also work. You can enable it (on any platform and kernel), it then attempts to open the port and passes the option if it was available at compile time, if that works it is used, if it fails, it continues silently (unless verbosity 3) without the option. +At extreme load it could be better to turn it off to distribute the queries +evenly, reported for Linux systems (4.4.x). .TP .B ip\-transparent: \fI If yes, then use IP_TRANSPARENT socket option on sockets where unbound @@ -458,14 +460,15 @@ Alternate syntax for \fBtls\-upstream\fR. If both are present in the config file the last is used. .TP .B tls\-service\-key: \fI -If enabled, the server provides TLS service on its TCP sockets. The clients -have to use tls\-upstream: yes. The file is the private key for the TLS -session. The public certificate is in the tls\-service\-pem file. Default -is "", turned off. Requires a restart (a reload is not enough) if changed, -because the private key is read while root permissions are held and before -chroot (if any). Normal DNS TCP service is not provided and gives errors, -this service is best run with a different \fBport:\fR config or \fI@port\fR -suffixes in the \fBinterface\fR config. +If enabled, the server provides TLS service on the TCP ports marked +implicitly or explicitly for TLS service with tls\-port. The file must +contain the private key for the TLS session, the public certificate is in +the tls\-service\-pem file and it must also be specified if tls\-service\-key +is specified. The default is "", turned off. Enabling or disabling +this service requires a restart (a reload is not enough), because the +key is read while root permissions are held and before chroot (if any). +The ports enabled implicitly or explicitly via \fBtls\-port:\fR do not provide +normal DNS TCP service. .TP .B ssl\-service\-key: \fI Alternate syntax for \fBtls\-service\-key\fR. @@ -545,6 +548,7 @@ classless network block. The action can be \fIdeny\fR, \fIrefuse\fR, \fIallow\fR, \fIallow_setrd\fR, \fIallow_snoop\fR, \fIdeny_non_local\fR or \fIrefuse_non_local\fR. The most specific netblock match is used, if none match \fIdeny\fR is used. +The order of the access\-control statements therefore does not matter. .IP The action \fIdeny\fR stops queries from hosts from that netblock. .IP @@ -625,9 +629,11 @@ In the last case the path is adjusted to remove the unused portion. The pidfile can be either a relative path to the working directory, or an absolute path relative to the original root. It is written just prior to chroot and dropping permissions. This allows the pidfile to be -/var/run/unbound.pid and the chroot to be /var/unbound, for example. +/var/run/unbound.pid and the chroot to be /var/unbound, for example. Note that +Unbound is not able to remove the pidfile after termination when it is located +outside of the chroot directory. .IP -Additionally, unbound may need to access /dev/random (for entropy) +Additionally, unbound may need to access /dev/urandom (for entropy) from inside the chroot. .IP If given a chroot is done to the given directory. By default chroot is @@ -769,7 +775,7 @@ wise to send these, and could be necessary for operation if TSIG or EDNS payload is very large. .TP .B harden\-glue: \fI -Will trust glue only if it is within the servers authority. Default is on. +Will trust glue only if it is within the servers authority. Default is yes. .TP .B harden\-dnssec\-stripped: \fI Require DNSSEC data for trust\-anchored zones, if such data is absent, @@ -779,7 +785,7 @@ this behaves like there is no trust anchor. You could turn this off if you are sometimes behind an intrusive firewall (of some sort) that removes DNSSEC data from packets, or a zone changes from signed to unsigned to badly signed often. If turned off you run the risk of a -downgrade attack that disables security for a zone. Default is on. +downgrade attack that disables security for a zone. Default is yes. .TP .B harden\-below\-nxdomain: \fI From RFC 8020 (with title "NXDOMAIN: There Really Is Nothing Underneath"), @@ -789,7 +795,7 @@ noerror for empty nonterminals, hence this is possible. Very old software might return nxdomain for empty nonterminals (that usually happen for reverse IP address lookups), and thus may be incompatible with this. To try to avoid this only DNSSEC-secure nxdomains are used, because the old software does not -have DNSSEC. Default is on. +have DNSSEC. Default is yes. The nxdomain must be secure, this means nsec3 with optout is insufficient. .TP .B harden\-referral\-path: \fI @@ -826,7 +832,7 @@ Can be given multiple times, for different domains. .TP .B qname\-minimisation: \fI Send minimum amount of information to upstream servers to enhance privacy. -Only sent minimum required labels of the QNAME and set QTYPE to A when +Only send minimum required labels of the QNAME and set QTYPE to A when possible. Best effort approach; full QNAME and original QTYPE will be sent when upstream replies with a RCODE other than NOERROR, except when receiving NXDOMAIN from a DNSSEC signed zone. Default is yes. @@ -929,6 +935,12 @@ Setting this to "iterator" will result in a non\-validating server. Setting this to "validator iterator" will turn on DNSSEC validation. The ordering of the modules is important. You must also set trust\-anchors for validation to be useful. +The default is "validator iterator". When the server is built with +EDNS client subnet support the default is "subnetcache validator iterator". +Most modules that need to be listed here have to be listed at the beginning +of the line. The cachedb module has to be listed just before the iterator. +The python module can be listed in different places, it then processes the +output of the module it is just before. .TP .B trust\-anchor\-file: \fI File with trusted keys for validation. Both DS and DNSKEY entries can appear @@ -937,7 +949,7 @@ Default is "", or no trust anchor file. .TP .B auto\-trust\-anchor\-file: \fI File with trust anchor for one zone, which is tracked with RFC5011 probes. -The probes are several times per month, thus the machine must be online +The probes are run several times per month, thus the machine must be online frequently. The initial file can be one with contents as described in \fBtrust\-anchor\-file\fR. The file is written to when the anchor is updated, so the unbound user must have write permission. Write permission to the file, @@ -962,10 +974,10 @@ It is possible to use wildcards with this statement, the wildcard is expanded on start and on reload. .TP .B trust\-anchor\-signaling: \fI -Send RFC8145 key tag query after trust anchor priming. Default is on. +Send RFC8145 key tag query after trust anchor priming. Default is yes. .TP .B root\-key\-sentinel: \fI -Root key trust anchor sentinel. Default is on. +Root key trust anchor sentinel. Default is yes. .TP .B dlv\-anchor\-file: \fI This option was used during early days DNSSEC deployment when no parent-side @@ -1140,7 +1152,7 @@ address space are not validated. This is usually required whenever Configure a local zone. The type determines the answer to give if there is no match from local\-data. The types are deny, refuse, static, transparent, redirect, nodefault, typetransparent, inform, inform_deny, -always_transparent, always_refuse, always_nxdomain, noview, +inform_redirect, always_transparent, always_refuse, always_nxdomain, noview, and are explained below. After that the default settings are listed. Use local\-data: to enter data into the local zone. Answers for local zones are authoritative DNS answers. By default the zones are class IN. @@ -1201,6 +1213,10 @@ looking up infected names are logged, eg. to run antivirus on them. The query is dropped, like 'deny', and logged, like 'inform'. Ie. find infected machines without answering the queries. .TP 10 +\h'5'\fIinform_redirect\fR +The query is redirected, like 'redirect', and logged, like 'inform'. +Ie. answer queries with fixed data and also log the machines that ask. +.TP 10 \h'5'\fIalways_transparent\fR Like transparent, but ignores local data and resolves normally. .TP 10 @@ -1356,7 +1372,8 @@ TTL can be inserted like this: "2001:DB8::4 7200 www.example.com" Assign tags to localzones. Tagged localzones will only be applied when the used access-control element has a matching tag. Tags must be defined in \fIdefine\-tags\fR. Enclose list of tags in quotes ("") and put spaces between -tags. +tags. When there are multiple tags it checks if the intersection of the +list of tags for the query and local\-zone\-tag is non-empty. .TP 5 .B local\-zone\-override: \fI Override the localzone type for queries from addresses matching netblock. @@ -1614,13 +1631,11 @@ the '@' and '#', the '@' comes first. At high verbosity it logs the TLS certificate, with TLS enabled. If you leave out the '#' and auth name from the forward\-addr, any name is accepted. The cert must also match a CA from the tls\-cert\-bundle. -The cert name match code needs OpenSSL 1.1.0 or later to be enabled. .TP .B forward\-first: \fI -If enabled, a query is attempted without the forward clause if it fails. -The data could not be retrieved and would have caused SERVFAIL because -the servers are unreachable, instead it is tried without this clause. -The default is no. +If a forwarded query is met with a SERVFAIL error, and this option is +enabled, unbound will fall back to normal recursive resolution for this +query as if no query forwarding had been specified. The default is "no". .TP .B forward\-tls\-upstream: \fI Enabled or disable whether the queries to this forwarder use TLS for transport. @@ -1664,6 +1679,7 @@ Name of the authority zone. .B master: \fI Where to download a copy of the zone from, with AXFR and IXFR. Multiple masters can be specified. They are all tried if one fails. +With the "ip#name" notation a AXFR over TLS can be used. .TP .B url: \fI Where to download a zonefile for the zone. With http or https. An example @@ -1715,7 +1731,9 @@ data (eg. from the master servers). There may be multiple .B view: clauses. Each with a \fBname:\fR and zero or more \fBlocal\-zone\fR and -\fBlocal\-data\fR elements. View can be mapped to requests by specifying the +\fBlocal\-data\fR elements. Views can also contain view\-first, +response\-ip, response\-ip\-data and local\-data\-ptr elements. +View can be mapped to requests by specifying the view name in an \fBaccess\-control\-view\fR element. Options from matching views will override global options. Global options will be used if no matching view is found, or when the matching view does not have the option specified. @@ -1752,7 +1770,8 @@ clause gives the settings for the \fIpython\fR(1) script module. This module acts like the iterator and validator modules do, on queries and answers. To enable the script module it has to be compiled into the daemon, and the word "python" has to be put in the \fBmodule\-config:\fR option -(usually first, or between the validator and iterator). +(usually first, or between the validator and iterator). Multiple instances of +the python module are supported by adding the word "python" more than once. .LP If the \fBchroot:\fR option is enabled, you should make sure Python's library directory structure is bind mounted in the new root environment, see @@ -1761,7 +1780,8 @@ absolute path relative to the new root, or as a relative path to the working directory. .TP .B python\-script: \fI\fR -The script file to load. +The script file to load. Repeat this option for every python module instance +added to the \fBmodule\-config:\fR option. .SS "DNS64 Module Options" .LP The dns64 module must be configured in the \fBmodule\-config:\fR "dns64 diff --git a/doc/unbound.doxygen b/doc/unbound.doxygen index 24f4203a83edb010c62bff0a9491ae71535f8422..45f49b36722eb8588693531dc42e733f05ccf598 100644 --- a/doc/unbound.doxygen +++ b/doc/unbound.doxygen @@ -629,6 +629,7 @@ EXCLUDE = ./build \ libunbound/python/doc \ libunbound/python/examples \ ./ldns-src \ + README.md \ doc/control_proto_spec.txt \ doc/requirements.txt diff --git a/edns-subnet/subnetmod.c b/edns-subnet/subnetmod.c index 69e743ddc36456d4f6bd52bea11211462a672914..907f40d5859d4c6c2beda6d6e8516d41574799b8 100644 --- a/edns-subnet/subnetmod.c +++ b/edns-subnet/subnetmod.c @@ -334,33 +334,37 @@ update_cache(struct module_qstate *qstate, int id) /* Step 1, general qinfo lookup */ struct lruhash_entry *lru_entry = slabhash_lookup(subnet_msg_cache, h, &qstate->qinfo, 1); - int acquired_lock = (lru_entry != NULL); + int need_to_insert = (lru_entry == NULL); if (!lru_entry) { + void* data = calloc(1, + sizeof(struct subnet_msg_cache_data)); + if(!data) { + log_err("malloc failed"); + return; + } qinf = qstate->qinfo; qinf.qname = memdup(qstate->qinfo.qname, qstate->qinfo.qname_len); if(!qinf.qname) { + free(data); log_err("memdup failed"); return; } - mrep_entry = query_info_entrysetup(&qinf, NULL, h); + mrep_entry = query_info_entrysetup(&qinf, data, h); free(qinf.qname); /* if qname 'consumed', it is set to NULL */ if (!mrep_entry) { + free(data); log_err("query_info_entrysetup failed"); return; } lru_entry = &mrep_entry->entry; lock_rw_wrlock(&lru_entry->lock); - lru_entry->data = calloc(1, - sizeof(struct subnet_msg_cache_data)); - if (!lru_entry->data) { - log_err("malloc failed"); - return; - } } + /* lru_entry->lock is locked regardless of how we got here, + * either from the slabhash_lookup, or above in the new allocated */ /* Step 2, find the correct tree */ if (!(tree = get_tree(lru_entry->data, edns, sne, qstate->env->cfg))) { - if (acquired_lock) lock_rw_unlock(&lru_entry->lock); + lock_rw_unlock(&lru_entry->lock); log_err("Subnet cache insertion failed"); return; } @@ -368,7 +372,7 @@ update_cache(struct module_qstate *qstate, int id) rep = reply_info_copy(qstate->return_msg->rep, &sne->alloc, NULL); lock_quick_unlock(&sne->alloc.lock); if (!rep) { - if (acquired_lock) lock_rw_unlock(&lru_entry->lock); + lock_rw_unlock(&lru_entry->lock); log_err("Subnet cache insertion failed"); return; } @@ -385,10 +389,9 @@ update_cache(struct module_qstate *qstate, int id) edns->subnet_source_mask, sq->ecs_server_in.subnet_scope_mask, rep, rep->ttl, *qstate->env->now); - if (acquired_lock) { - lock_rw_unlock(&lru_entry->lock); - } else { - lock_rw_unlock(&lru_entry->lock); + + lock_rw_unlock(&lru_entry->lock); + if (need_to_insert) { slabhash_insert(subnet_msg_cache, h, lru_entry, lru_entry->data, NULL); } diff --git a/install-sh b/install-sh index ea4c8234c41ab9ff8d399f9fdf915494411ee1f5..59990a10492675f2e87d5e5df17b566d145d9aee 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ -#!/usr/bin/sh +#!/bin/sh # install - install a program, script, or datafile -scriptversion=2013-12-25.23; # UTC +scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -324,34 +324,41 @@ do # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) + # $RANDOM is not portable (e.g. dash); use it when possible to + # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + # As "mkdir -p" follows symlinks and we work in /tmp possibly; so + # create the $tmpdir first (and fail if unsuccessful) to make sure + # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi - rmdir "$tmpdir/d" "$tmpdir" + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; diff --git a/ipsecmod/ipsecmod.c b/ipsecmod/ipsecmod.c index c8400c6333ee7a3385ff729da17eeca513c4225d..a1f40a512b8a0c883567367c369d6689db814eed 100644 --- a/ipsecmod/ipsecmod.c +++ b/ipsecmod/ipsecmod.c @@ -103,11 +103,11 @@ ipsecmod_new(struct module_qstate* qstate, int id) { struct ipsecmod_qstate* iq = (struct ipsecmod_qstate*)regional_alloc( qstate->region, sizeof(struct ipsecmod_qstate)); - memset(iq, 0, sizeof(*iq)); qstate->minfo[id] = iq; if(!iq) return 0; /* Initialise it. */ + memset(iq, 0, sizeof(*iq)); iq->enabled = qstate->env->cfg->ipsecmod_enabled; iq->is_whitelisted = ipsecmod_domain_is_whitelisted( (struct ipsecmod_env*)qstate->env->modinfo[id], qstate->qinfo.qname, @@ -161,6 +161,71 @@ generate_request(struct module_qstate* qstate, int id, uint8_t* name, return 1; } +/** + * Check if the string passed is a valid domain name with safe characters to + * pass to a shell. + * This will only allow: + * - digits + * - alphas + * - hyphen (not at the start) + * - dot (not at the start, or the only character) + * - underscore + * @param s: pointer to the string. + * @param slen: string's length. + * @return true if s only contains safe characters; false otherwise. + */ +static int +domainname_has_safe_characters(char* s, size_t slen) { + size_t i; + for(i = 0; i < slen; i++) { + if(s[i] == '\0') return 1; + if((s[i] == '-' && i != 0) + || (s[i] == '.' && (i != 0 || s[1] == '\0')) + || (s[i] == '_') || (s[i] >= '0' && s[i] <= '9') + || (s[i] >= 'A' && s[i] <= 'Z') + || (s[i] >= 'a' && s[i] <= 'z')) { + continue; + } + return 0; + } + return 1; +} + +/** + * Check if the stringified IPSECKEY RDATA contains safe characters to pass to + * a shell. + * This is only relevant for checking the gateway when the gateway type is 3 + * (domainname). + * @param s: pointer to the string. + * @param slen: string's length. + * @return true if s contains only safe characters; false otherwise. + */ +static int +ipseckey_has_safe_characters(char* s, size_t slen) { + int precedence, gateway_type, algorithm; + char* gateway; + gateway = (char*)calloc(slen, sizeof(char)); + if(!gateway) { + log_err("ipsecmod: out of memory when calling the hook"); + return 0; + } + if(sscanf(s, "%d %d %d %s ", + &precedence, &gateway_type, &algorithm, gateway) != 4) { + free(gateway); + return 0; + } + if(gateway_type != 3) { + free(gateway); + return 1; + } + if(domainname_has_safe_characters(gateway, slen)) { + free(gateway); + return 1; + } + free(gateway); + return 0; +} + /** * Prepare the data and call the hook. * @@ -175,7 +240,7 @@ call_hook(struct module_qstate* qstate, struct ipsecmod_qstate* iq, { size_t slen, tempdata_len, tempstring_len, i; char str[65535], *s, *tempstring; - int w; + int w = 0, w_temp, qtype; struct ub_packed_rrset_key* rrset_key; struct packed_rrset_data* rrset_data; uint8_t *tempdata; @@ -192,9 +257,9 @@ call_hook(struct module_qstate* qstate, struct ipsecmod_qstate* iq, memset(s, 0, slen); /* Copy the hook into the buffer. */ - sldns_str_print(&s, &slen, "%s", qstate->env->cfg->ipsecmod_hook); + w += sldns_str_print(&s, &slen, "%s", qstate->env->cfg->ipsecmod_hook); /* Put space into the buffer. */ - sldns_str_print(&s, &slen, " "); + w += sldns_str_print(&s, &slen, " "); /* Copy the qname into the buffer. */ tempstring = sldns_wire2str_dname(qstate->qinfo.qname, qstate->qinfo.qname_len); @@ -202,68 +267,96 @@ call_hook(struct module_qstate* qstate, struct ipsecmod_qstate* iq, log_err("ipsecmod: out of memory when calling the hook"); return 0; } - sldns_str_print(&s, &slen, "\"%s\"", tempstring); + if(!domainname_has_safe_characters(tempstring, strlen(tempstring))) { + log_err("ipsecmod: qname has unsafe characters"); + free(tempstring); + return 0; + } + w += sldns_str_print(&s, &slen, "\"%s\"", tempstring); free(tempstring); /* Put space into the buffer. */ - sldns_str_print(&s, &slen, " "); + w += sldns_str_print(&s, &slen, " "); /* Copy the IPSECKEY TTL into the buffer. */ rrset_data = (struct packed_rrset_data*)iq->ipseckey_rrset->entry.data; - sldns_str_print(&s, &slen, "\"%ld\"", (long)rrset_data->ttl); + w += sldns_str_print(&s, &slen, "\"%ld\"", (long)rrset_data->ttl); /* Put space into the buffer. */ - sldns_str_print(&s, &slen, " "); - /* Copy the A/AAAA record(s) into the buffer. Start and end this section - * with a double quote. */ + w += sldns_str_print(&s, &slen, " "); rrset_key = reply_find_answer_rrset(&qstate->return_msg->qinfo, qstate->return_msg->rep); + /* Double check that the records are indeed A/AAAA. + * This should never happen as this function is only executed for A/AAAA + * queries but make sure we don't pass anything other than A/AAAA to the + * shell. */ + qtype = ntohs(rrset_key->rk.type); + if(qtype != LDNS_RR_TYPE_AAAA && qtype != LDNS_RR_TYPE_A) { + log_err("ipsecmod: Answer is not of A or AAAA type"); + return 0; + } rrset_data = (struct packed_rrset_data*)rrset_key->entry.data; - sldns_str_print(&s, &slen, "\""); + /* Copy the A/AAAA record(s) into the buffer. Start and end this section + * with a double quote. */ + w += sldns_str_print(&s, &slen, "\""); for(i=0; icount; i++) { if(i > 0) { /* Put space into the buffer. */ - sldns_str_print(&s, &slen, " "); + w += sldns_str_print(&s, &slen, " "); } /* Ignore the first two bytes, they are the rr_data len. */ - w = sldns_wire2str_rdata_buf(rrset_data->rr_data[i] + 2, + w_temp = sldns_wire2str_rdata_buf(rrset_data->rr_data[i] + 2, rrset_data->rr_len[i] - 2, s, slen, qstate->qinfo.qtype); - if(w < 0) { + if(w_temp < 0) { /* Error in printout. */ - return -1; - } else if((size_t)w >= slen) { + log_err("ipsecmod: Error in printing IP address"); + return 0; + } else if((size_t)w_temp >= slen) { s = NULL; /* We do not want str to point outside of buffer. */ slen = 0; - return -1; + log_err("ipsecmod: shell command too long"); + return 0; } else { - s += w; - slen -= w; + s += w_temp; + slen -= w_temp; + w += w_temp; } } - sldns_str_print(&s, &slen, "\""); + w += sldns_str_print(&s, &slen, "\""); /* Put space into the buffer. */ - sldns_str_print(&s, &slen, " "); + w += sldns_str_print(&s, &slen, " "); /* Copy the IPSECKEY record(s) into the buffer. Start and end this section * with a double quote. */ - sldns_str_print(&s, &slen, "\""); + w += sldns_str_print(&s, &slen, "\""); rrset_data = (struct packed_rrset_data*)iq->ipseckey_rrset->entry.data; for(i=0; icount; i++) { if(i > 0) { /* Put space into the buffer. */ - sldns_str_print(&s, &slen, " "); + w += sldns_str_print(&s, &slen, " "); } /* Ignore the first two bytes, they are the rr_data len. */ tempdata = rrset_data->rr_data[i] + 2; tempdata_len = rrset_data->rr_len[i] - 2; /* Save the buffer pointers. */ tempstring = s; tempstring_len = slen; - w = sldns_wire2str_ipseckey_scan(&tempdata, &tempdata_len, &s, &slen, - NULL, 0); + w_temp = sldns_wire2str_ipseckey_scan(&tempdata, &tempdata_len, &s, + &slen, NULL, 0, NULL); /* There was an error when parsing the IPSECKEY; reset the buffer * pointers to their previous values. */ - if(w == -1){ + if(w_temp == -1) { s = tempstring; slen = tempstring_len; + } else if(w_temp > 0) { + if(!ipseckey_has_safe_characters( + tempstring, tempstring_len - slen)) { + log_err("ipsecmod: ipseckey has unsafe characters"); + return 0; + } + w += w_temp; } } - sldns_str_print(&s, &slen, "\""); - verbose(VERB_ALGO, "ipsecmod: hook command: '%s'", str); + w += sldns_str_print(&s, &slen, "\""); + if(w >= (int)sizeof(str)) { + log_err("ipsecmod: shell command too long"); + return 0; + } + verbose(VERB_ALGO, "ipsecmod: shell command: '%s'", str); /* ipsecmod-hook should return 0 on success. */ if(system(str) != 0) return 0; diff --git a/ipset/ipset.c b/ipset/ipset.c new file mode 100755 index 0000000000000000000000000000000000000000..f6e2c4a9d8a6d947f056acd88f023624a22296bf --- /dev/null +++ b/ipset/ipset.c @@ -0,0 +1,383 @@ +/** + * \file + * This file implements the ipset module. It can handle packets by putting + * the A and AAAA addresses that are configured in unbound.conf as type + * ipset (local-zone statements) into a firewall rule IPSet. For firewall + * blacklist and whitelist usage. + */ +#include "config.h" +#include "ipset/ipset.h" +#include "util/regional.h" +#include "util/net_help.h" +#include "util/config_file.h" + +#include "services/cache/dns.h" + +#include "sldns/sbuffer.h" +#include "sldns/wire2str.h" +#include "sldns/parseutil.h" + +#include +#include +#include + +#define BUFF_LEN 256 + +/** + * Return an error + * @param qstate: our query state + * @param id: module id + * @param rcode: error code (DNS errcode). + * @return: 0 for use by caller, to make notation easy, like: + * return error_response(..). + */ +static int error_response(struct module_qstate* qstate, int id, int rcode) { + verbose(VERB_QUERY, "return error response %s", + sldns_lookup_by_id(sldns_rcodes, rcode)? + sldns_lookup_by_id(sldns_rcodes, rcode)->name:"??"); + qstate->return_rcode = rcode; + qstate->return_msg = NULL; + qstate->ext_state[id] = module_finished; + return 0; +} + +static struct mnl_socket * open_mnl_socket() { + struct mnl_socket *mnl; + + mnl = mnl_socket_open(NETLINK_NETFILTER); + if (!mnl) { + log_err("ipset: could not open netfilter."); + return NULL; + } + + if (mnl_socket_bind(mnl, 0, MNL_SOCKET_AUTOPID) < 0) { + mnl_socket_close(mnl); + log_err("ipset: could not bind netfilter."); + return NULL; + } + return mnl; +} + +static int add_to_ipset(struct mnl_socket *mnl, const char *setname, const void *ipaddr, int af) { + struct nlmsghdr *nlh; + struct nfgenmsg *nfg; + struct nlattr *nested[2]; + static char buffer[BUFF_LEN]; + + if (strlen(setname) >= IPSET_MAXNAMELEN) { + errno = ENAMETOOLONG; + return -1; + } + if (af != AF_INET && af != AF_INET6) { + errno = EAFNOSUPPORT; + return -1; + } + + nlh = mnl_nlmsg_put_header(buffer); + nlh->nlmsg_type = IPSET_CMD_ADD | (NFNL_SUBSYS_IPSET << 8); + nlh->nlmsg_flags = NLM_F_REQUEST|NLM_F_ACK|NLM_F_EXCL; + + nfg = mnl_nlmsg_put_extra_header(nlh, sizeof(struct nfgenmsg)); + nfg->nfgen_family = af; + nfg->version = NFNETLINK_V0; + nfg->res_id = htons(0); + + mnl_attr_put_u8(nlh, IPSET_ATTR_PROTOCOL, IPSET_PROTOCOL); + mnl_attr_put(nlh, IPSET_ATTR_SETNAME, strlen(setname) + 1, setname); + nested[0] = mnl_attr_nest_start(nlh, IPSET_ATTR_DATA); + nested[1] = mnl_attr_nest_start(nlh, IPSET_ATTR_IP); + mnl_attr_put(nlh, (af == AF_INET ? IPSET_ATTR_IPADDR_IPV4 : IPSET_ATTR_IPADDR_IPV6) + | NLA_F_NET_BYTEORDER, (af == AF_INET ? sizeof(struct in_addr) : sizeof(struct in6_addr)), ipaddr); + mnl_attr_nest_end(nlh, nested[1]); + mnl_attr_nest_end(nlh, nested[0]); + + if (mnl_socket_sendto(mnl, nlh, nlh->nlmsg_len) < 0) { + return -1; + } + return 0; +} + +static void +ipset_add_rrset_data(struct ipset_env *ie, struct mnl_socket *mnl, + struct packed_rrset_data *d, const char* setname, int af, + const char* dname) +{ + int ret; + size_t j, rr_len, rd_len; + uint8_t *rr_data; + + /* to d->count, not d->rrsig_count, because we do not want to add the RRSIGs, only the addresses */ + for (j = 0; j < d->count; j++) { + rr_len = d->rr_len[j]; + rr_data = d->rr_data[j]; + + rd_len = sldns_read_uint16(rr_data); + if(af == AF_INET && rd_len != INET_SIZE) + continue; + if(af == AF_INET6 && rd_len != INET6_SIZE) + continue; + if (rr_len - 2 >= rd_len) { + if(verbosity >= VERB_QUERY) { + char ip[128]; + if(inet_ntop(af, rr_data+2, ip, (socklen_t)sizeof(ip)) == 0) + snprintf(ip, sizeof(ip), "(inet_ntop_error)"); + verbose(VERB_QUERY, "ipset: add %s to %s for %s", ip, setname, dname); + } + ret = add_to_ipset(mnl, setname, rr_data + 2, af); + if (ret < 0) { + log_err("ipset: could not add %s into %s", dname, setname); + + mnl_socket_close(mnl); + ie->mnl = NULL; + break; + } + } + } +} + +static int +ipset_check_zones_for_rrset(struct module_env *env, struct ipset_env *ie, + struct mnl_socket *mnl, struct ub_packed_rrset_key *rrset, + const char *setname, int af) +{ + static char dname[BUFF_LEN]; + const char *s; + int dlen, plen; + + struct config_strlist *p; + struct packed_rrset_data *d; + + dlen = sldns_wire2str_dname_buf(rrset->rk.dname, rrset->rk.dname_len, dname, BUFF_LEN); + if (dlen == 0) { + log_err("bad domain name"); + return -1; + } + if (dname[dlen - 1] == '.') { + dlen--; + } + + for (p = env->cfg->local_zones_ipset; p; p = p->next) { + plen = strlen(p->str); + + if (dlen >= plen) { + s = dname + (dlen - plen); + + if (strncasecmp(p->str, s, plen) == 0) { + d = (struct packed_rrset_data*)rrset->entry.data; + ipset_add_rrset_data(ie, mnl, d, setname, + af, dname); + break; + } + } + } + return 0; +} + +static int ipset_update(struct module_env *env, struct dns_msg *return_msg, struct ipset_env *ie) { + struct mnl_socket *mnl; + + size_t i; + + const char *setname; + + struct ub_packed_rrset_key *rrset; + + int af; + + + mnl = (struct mnl_socket *)ie->mnl; + if (!mnl) { + // retry to create mnl socket + mnl = open_mnl_socket(); + if (!mnl) { + return -1; + } + + ie->mnl = mnl; + } + + for (i = 0; i < return_msg->rep->rrset_count; ++i) { + setname = NULL; + + rrset = return_msg->rep->rrsets[i]; + + if (rrset->rk.type == htons(LDNS_RR_TYPE_A)) { + af = AF_INET; + if ((ie->v4_enabled == 1)) { + setname = ie->name_v4; + } + } else { + af = AF_INET6; + if ((ie->v6_enabled == 1)) { + setname = ie->name_v6; + } + } + + if (setname) { + if(ipset_check_zones_for_rrset(env, ie, mnl, rrset, + setname, af) == -1) + return -1; + } + } + + return 0; +} + +int ipset_init(struct module_env* env, int id) { + struct ipset_env *ipset_env; + + ipset_env = (struct ipset_env *)calloc(1, sizeof(struct ipset_env)); + if (!ipset_env) { + log_err("malloc failure"); + return 0; + } + + env->modinfo[id] = (void *)ipset_env; + + ipset_env->mnl = NULL; + + ipset_env->name_v4 = env->cfg->ipset_name_v4; + ipset_env->name_v6 = env->cfg->ipset_name_v6; + + ipset_env->v4_enabled = !ipset_env->name_v4 || (strlen(ipset_env->name_v4) == 0) ? 0 : 1; + ipset_env->v6_enabled = !ipset_env->name_v6 || (strlen(ipset_env->name_v6) == 0) ? 0 : 1; + + if ((ipset_env->v4_enabled < 1) && (ipset_env->v6_enabled < 1)) { + log_err("ipset: set name no configuration?"); + return 0; + } + + return 1; +} + +void ipset_deinit(struct module_env *env, int id) { + struct mnl_socket *mnl; + struct ipset_env *ipset_env; + + if (!env || !env->modinfo[id]) { + return; + } + + ipset_env = (struct ipset_env *)env->modinfo[id]; + + mnl = (struct mnl_socket *)ipset_env->mnl; + if (mnl) { + mnl_socket_close(mnl); + ipset_env->mnl = NULL; + } + + free(ipset_env); + env->modinfo[id] = NULL; +} + +static int ipset_new(struct module_qstate* qstate, int id) { + struct ipset_qstate *iq = (struct ipset_qstate *)regional_alloc( + qstate->region, sizeof(struct ipset_qstate)); + qstate->minfo[id] = iq; + if (!iq) { + return 0; + } + + memset(iq, 0, sizeof(*iq)); + /* initialise it */ + /* TODO */ + + return 1; +} + +void ipset_operate(struct module_qstate *qstate, enum module_ev event, int id, + struct outbound_entry *outbound) { + struct ipset_env *ie = (struct ipset_env *)qstate->env->modinfo[id]; + struct ipset_qstate *iq = (struct ipset_qstate *)qstate->minfo[id]; + verbose(VERB_QUERY, "ipset[module %d] operate: extstate:%s event:%s", + id, strextstate(qstate->ext_state[id]), strmodulevent(event)); + if (iq) { + log_query_info(VERB_QUERY, "ipset operate: query", &qstate->qinfo); + } + + /* perform ipset state machine */ + if ((event == module_event_new || event == module_event_pass) && !iq) { + if (!ipset_new(qstate, id)) { + (void)error_response(qstate, id, LDNS_RCODE_SERVFAIL); + return; + } + iq = (struct ipset_qstate*)qstate->minfo[id]; + } + + if (iq && (event == module_event_pass || event == module_event_new)) { + qstate->ext_state[id] = module_wait_module; + return; + } + + if (iq && (event == module_event_moddone)) { + if (qstate->return_msg && qstate->return_msg->rep) { + ipset_update(qstate->env, qstate->return_msg, ie); + } + qstate->ext_state[id] = module_finished; + return; + } + + if (iq && outbound) { + /* ipset does not need to process responses at this time + * ignore it. + ipset_process_response(qstate, iq, ie, id, outbound, event); + */ + return; + } + + if (event == module_event_error) { + verbose(VERB_ALGO, "got called with event error, giving up"); + (void)error_response(qstate, id, LDNS_RCODE_SERVFAIL); + return; + } + + if (!iq && (event == module_event_moddone)) { + /* during priming, module done but we never started */ + qstate->ext_state[id] = module_finished; + return; + } + + log_err("bad event for ipset"); + (void)error_response(qstate, id, LDNS_RCODE_SERVFAIL); +} + +void ipset_inform_super(struct module_qstate *ATTR_UNUSED(qstate), + int ATTR_UNUSED(id), struct module_qstate *ATTR_UNUSED(super)) { + /* ipset does not use subordinate requests at this time */ + verbose(VERB_ALGO, "ipset inform_super was called"); +} + +void ipset_clear(struct module_qstate *qstate, int id) { + struct cachedb_qstate *iq; + if (!qstate) { + return; + } + iq = (struct cachedb_qstate *)qstate->minfo[id]; + if (iq) { + /* free contents of iq */ + /* TODO */ + } + qstate->minfo[id] = NULL; +} + +size_t ipset_get_mem(struct module_env *env, int id) { + struct ipset_env *ie = (struct ipset_env *)env->modinfo[id]; + if (!ie) { + return 0; + } + return sizeof(*ie); +} + +/** + * The ipset function block + */ +static struct module_func_block ipset_block = { + "ipset", + &ipset_init, &ipset_deinit, &ipset_operate, + &ipset_inform_super, &ipset_clear, &ipset_get_mem +}; + +struct module_func_block * ipset_get_funcblock(void) { + return &ipset_block; +} + diff --git a/ipset/ipset.h b/ipset/ipset.h new file mode 100755 index 0000000000000000000000000000000000000000..f60a8be8c8377da240452b2464298a83772dff44 --- /dev/null +++ b/ipset/ipset.h @@ -0,0 +1,79 @@ +/** + * ipset.h + * + * Author: Kevin Chou + * Email: k9982874@gmail.com + */ +#ifndef IPSET_H +#define IPSET_H +/** \file + * + * This file implements the ipset module. It can handle packets by putting + * the A and AAAA addresses that are configured in unbound.conf as type + * ipset (local-zone statements) into a firewall rule IPSet. For firewall + * blacklist and whitelist usage. + * + * To use the IPset module, install the libmnl-dev (or libmnl-devel) package + * and configure with --enable-ipset. And compile. Then enable the ipset + * module in unbound.conf with module-config: "ipset validator iterator" + * then create it with ipset -N blacklist iphash and then add + * local-zone: "example.com." ipset + * statements for the zones where you want the addresses of the names + * looked up added to the set. + * + * Set the name of the set with + * ipset: + * name-v4: "blacklist" + * name-v6: "blacklist6" + * in unbound.conf. The set can be used in this way: + * iptables -A INPUT -m set --set blacklist src -j DROP + * ip6tables -A INPUT -m set --set blacklist6 src -j DROP + */ + +#include "util/module.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct ipset_env { + void* mnl; + + int v4_enabled; + int v6_enabled; + + const char *name_v4; + const char *name_v6; +}; + +struct ipset_qstate { + int dummy; +}; + +/** Init the ipset module */ +int ipset_init(struct module_env* env, int id); +/** Deinit the ipset module */ +void ipset_deinit(struct module_env* env, int id); +/** Operate on an event on a query (in qstate). */ +void ipset_operate(struct module_qstate* qstate, enum module_ev event, + int id, struct outbound_entry* outbound); +/** Subordinate query done, inform this super request of its conclusion */ +void ipset_inform_super(struct module_qstate* qstate, int id, + struct module_qstate* super); +/** clear the ipset query-specific contents out of qstate */ +void ipset_clear(struct module_qstate* qstate, int id); +/** return memory estimate for ipset module */ +size_t ipset_get_mem(struct module_env* env, int id); + +/** + * Get the function block with pointers to the ipset functions + * @return the function block for "ipset". + */ +struct module_func_block* ipset_get_funcblock(void); + +#ifdef __cplusplus +} +#endif + +#endif /* IPSET_H */ + diff --git a/iterator/iter_delegpt.c b/iterator/iter_delegpt.c index 9a672b0af39de132c2500b2c3aed7d1dad930b9c..f88b3e115db38b216727c342b297d3395f6f0f11 100644 --- a/iterator/iter_delegpt.c +++ b/iterator/iter_delegpt.c @@ -84,7 +84,7 @@ struct delegpt* delegpt_copy(struct delegpt* dp, struct regional* region) } for(a = dp->target_list; a; a = a->next_target) { if(!delegpt_add_addr(copy, region, &a->addr, a->addrlen, - a->bogus, a->lame, a->tls_auth_name, NULL)) + a->bogus, a->lame, a->tls_auth_name)) return NULL; } return copy; @@ -161,7 +161,7 @@ delegpt_find_addr(struct delegpt* dp, struct sockaddr_storage* addr, int delegpt_add_target(struct delegpt* dp, struct regional* region, uint8_t* name, size_t namelen, struct sockaddr_storage* addr, - socklen_t addrlen, uint8_t bogus, uint8_t lame, int* additions) + socklen_t addrlen, uint8_t bogus, uint8_t lame) { struct delegpt_ns* ns = delegpt_find_ns(dp, name, namelen); log_assert(!dp->dp_type_mlc); @@ -176,14 +176,13 @@ delegpt_add_target(struct delegpt* dp, struct regional* region, if(ns->got4 && ns->got6) ns->resolved = 1; } - return delegpt_add_addr(dp, region, addr, addrlen, bogus, lame, NULL, - additions); + return delegpt_add_addr(dp, region, addr, addrlen, bogus, lame, NULL); } int delegpt_add_addr(struct delegpt* dp, struct regional* region, struct sockaddr_storage* addr, socklen_t addrlen, uint8_t bogus, - uint8_t lame, char* tls_auth_name, int* additions) + uint8_t lame, char* tls_auth_name) { struct delegpt_addr* a; log_assert(!dp->dp_type_mlc); @@ -195,8 +194,6 @@ delegpt_add_addr(struct delegpt* dp, struct regional* region, a->lame = 0; return 1; } - if(additions) - *additions = 1; a = (struct delegpt_addr*)regional_alloc(region, sizeof(struct delegpt_addr)); @@ -385,10 +382,10 @@ delegpt_from_message(struct dns_msg* msg, struct regional* region) continue; if(ntohs(s->rk.type) == LDNS_RR_TYPE_A) { - if(!delegpt_add_rrset_A(dp, region, s, 0, NULL)) + if(!delegpt_add_rrset_A(dp, region, s, 0)) return NULL; } else if(ntohs(s->rk.type) == LDNS_RR_TYPE_AAAA) { - if(!delegpt_add_rrset_AAAA(dp, region, s, 0, NULL)) + if(!delegpt_add_rrset_AAAA(dp, region, s, 0)) return NULL; } } @@ -419,7 +416,7 @@ delegpt_rrset_add_ns(struct delegpt* dp, struct regional* region, int delegpt_add_rrset_A(struct delegpt* dp, struct regional* region, - struct ub_packed_rrset_key* ak, uint8_t lame, int* additions) + struct ub_packed_rrset_key* ak, uint8_t lame) { struct packed_rrset_data* d=(struct packed_rrset_data*)ak->entry.data; size_t i; @@ -435,7 +432,7 @@ delegpt_add_rrset_A(struct delegpt* dp, struct regional* region, memmove(&sa.sin_addr, d->rr_data[i]+2, INET_SIZE); if(!delegpt_add_target(dp, region, ak->rk.dname, ak->rk.dname_len, (struct sockaddr_storage*)&sa, - len, (d->security==sec_status_bogus), lame, additions)) + len, (d->security==sec_status_bogus), lame)) return 0; } return 1; @@ -443,7 +440,7 @@ delegpt_add_rrset_A(struct delegpt* dp, struct regional* region, int delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* region, - struct ub_packed_rrset_key* ak, uint8_t lame, int* additions) + struct ub_packed_rrset_key* ak, uint8_t lame) { struct packed_rrset_data* d=(struct packed_rrset_data*)ak->entry.data; size_t i; @@ -459,7 +456,7 @@ delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* region, memmove(&sa.sin6_addr, d->rr_data[i]+2, INET6_SIZE); if(!delegpt_add_target(dp, region, ak->rk.dname, ak->rk.dname_len, (struct sockaddr_storage*)&sa, - len, (d->security==sec_status_bogus), lame, additions)) + len, (d->security==sec_status_bogus), lame)) return 0; } return 1; @@ -467,33 +464,20 @@ delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* region, int delegpt_add_rrset(struct delegpt* dp, struct regional* region, - struct ub_packed_rrset_key* rrset, uint8_t lame, int* additions) + struct ub_packed_rrset_key* rrset, uint8_t lame) { if(!rrset) return 1; if(ntohs(rrset->rk.type) == LDNS_RR_TYPE_NS) return delegpt_rrset_add_ns(dp, region, rrset, lame); else if(ntohs(rrset->rk.type) == LDNS_RR_TYPE_A) - return delegpt_add_rrset_A(dp, region, rrset, lame, additions); + return delegpt_add_rrset_A(dp, region, rrset, lame); else if(ntohs(rrset->rk.type) == LDNS_RR_TYPE_AAAA) - return delegpt_add_rrset_AAAA(dp, region, rrset, lame, - additions); + return delegpt_add_rrset_AAAA(dp, region, rrset, lame); log_warn("Unknown rrset type added to delegpt"); return 1; } -void delegpt_mark_neg(struct delegpt_ns* ns, uint16_t qtype) -{ - if(ns) { - if(qtype == LDNS_RR_TYPE_A) - ns->got4 = 2; - else if(qtype == LDNS_RR_TYPE_AAAA) - ns->got6 = 2; - if(ns->got4 && ns->got6) - ns->resolved = 1; - } -} - void delegpt_add_neg_msg(struct delegpt* dp, struct msgreply_entry* msg) { struct reply_info* rep = (struct reply_info*)msg->entry.data; @@ -503,7 +487,14 @@ void delegpt_add_neg_msg(struct delegpt* dp, struct msgreply_entry* msg) if(FLAGS_GET_RCODE(rep->flags) != 0 || rep->an_numrrsets == 0) { struct delegpt_ns* ns = delegpt_find_ns(dp, msg->key.qname, msg->key.qname_len); - delegpt_mark_neg(ns, msg->key.qtype); + if(ns) { + if(msg->key.qtype == LDNS_RR_TYPE_A) + ns->got4 = 1; + else if(msg->key.qtype == LDNS_RR_TYPE_AAAA) + ns->got6 = 1; + if(ns->got4 && ns->got6) + ns->resolved = 1; + } } } diff --git a/iterator/iter_delegpt.h b/iterator/iter_delegpt.h index 138eb6e1b60a40febe49dea7280890b586b7cec1..6c088264588f291ba9ae6e70e0008ebdbf517cdb 100644 --- a/iterator/iter_delegpt.h +++ b/iterator/iter_delegpt.h @@ -106,10 +106,9 @@ struct delegpt_ns { * and marked true if got4 and got6 are both true. */ int resolved; - /** if the ipv4 address is in the delegpt, 0=not, 1=yes 2=negative, - * negative means it was done, but no content. */ + /** if the ipv4 address is in the delegpt */ uint8_t got4; - /** if the ipv6 address is in the delegpt, 0=not, 1=yes 2=negative */ + /** if the ipv6 address is in the delegpt */ uint8_t got6; /** * If the name is parent-side only and thus dispreferred. @@ -216,12 +215,11 @@ int delegpt_rrset_add_ns(struct delegpt* dp, struct regional* regional, * @param addrlen: the length of addr. * @param bogus: security status for the address, pass true if bogus. * @param lame: address is lame. - * @param additions: will be set to 1 if a new address is added * @return false on error. */ int delegpt_add_target(struct delegpt* dp, struct regional* regional, uint8_t* name, size_t namelen, struct sockaddr_storage* addr, - socklen_t addrlen, uint8_t bogus, uint8_t lame, int* additions); + socklen_t addrlen, uint8_t bogus, uint8_t lame); /** * Add A RRset to delegpt. @@ -229,11 +227,10 @@ int delegpt_add_target(struct delegpt* dp, struct regional* regional, * @param regional: where to allocate the info. * @param rrset: RRset A to add. * @param lame: rrset is lame, disprefer it. - * @param additions: will be set to 1 if a new address is added * @return 0 on alloc error. */ int delegpt_add_rrset_A(struct delegpt* dp, struct regional* regional, - struct ub_packed_rrset_key* rrset, uint8_t lame, int* additions); + struct ub_packed_rrset_key* rrset, uint8_t lame); /** * Add AAAA RRset to delegpt. @@ -241,11 +238,10 @@ int delegpt_add_rrset_A(struct delegpt* dp, struct regional* regional, * @param regional: where to allocate the info. * @param rrset: RRset AAAA to add. * @param lame: rrset is lame, disprefer it. - * @param additions: will be set to 1 if a new address is added * @return 0 on alloc error. */ int delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* regional, - struct ub_packed_rrset_key* rrset, uint8_t lame, int* additions); + struct ub_packed_rrset_key* rrset, uint8_t lame); /** * Add any RRset to delegpt. @@ -254,11 +250,10 @@ int delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* regional, * @param regional: where to allocate the info. * @param rrset: RRset to add, NS, A, AAAA. * @param lame: rrset is lame, disprefer it. - * @param additions: will be set to 1 if a new address is added * @return 0 on alloc error. */ int delegpt_add_rrset(struct delegpt* dp, struct regional* regional, - struct ub_packed_rrset_key* rrset, uint8_t lame, int* additions); + struct ub_packed_rrset_key* rrset, uint8_t lame); /** * Add address to the delegation point. No servername is associated or checked. @@ -269,12 +264,11 @@ int delegpt_add_rrset(struct delegpt* dp, struct regional* regional, * @param bogus: if address is bogus. * @param lame: if address is lame. * @param tls_auth_name: TLS authentication name (or NULL). - * @param additions: will be set to 1 if a new address is added * @return false on error. */ int delegpt_add_addr(struct delegpt* dp, struct regional* regional, struct sockaddr_storage* addr, socklen_t addrlen, - uint8_t bogus, uint8_t lame, char* tls_auth_name, int* additions); + uint8_t bogus, uint8_t lame, char* tls_auth_name); /** * Find NS record in name list of delegation point. @@ -347,14 +341,6 @@ size_t delegpt_count_targets(struct delegpt* dp); struct delegpt* delegpt_from_message(struct dns_msg* msg, struct regional* regional); -/** - * Mark negative return in delegation point for specific nameserver. - * sets the got4 or got6 to negative, updates the ns->resolved. - * @param ns: the nameserver in the delegpt. - * @param qtype: A or AAAA (host order). - */ -void delegpt_mark_neg(struct delegpt_ns* ns, uint16_t qtype); - /** * Add negative message to delegation point. * @param dp: delegation point. diff --git a/iterator/iter_fwd.c b/iterator/iter_fwd.c index 4eb0eb71860796bbe1ebd20b7bc2fbd50f11d675..ea3d70e07320f5b149ec2dac776cb30a1e3bfc92 100644 --- a/iterator/iter_fwd.c +++ b/iterator/iter_fwd.c @@ -239,7 +239,7 @@ read_fwds_addr(struct config_stub* s, struct delegpt* dp) s->name, p->str); return 0; } -#ifndef HAVE_SSL_SET1_HOST +#if ! defined(HAVE_SSL_SET1_HOST) && ! defined(HAVE_X509_VERIFY_PARAM_SET1_HOST) if(tls_auth_name) log_err("no name verification functionality in " "ssl library, ignored name for %s", p->str); diff --git a/iterator/iter_hints.c b/iterator/iter_hints.c index 0b35a9d9e24fd6baf921555c40de74fe73b967b0..60e518122ed14d1106ce9aed9889ed8d0bf5cb00 100644 --- a/iterator/iter_hints.c +++ b/iterator/iter_hints.c @@ -252,7 +252,7 @@ read_stubs_addr(struct config_stub* s, struct delegpt* dp) s->name, p->str); return 0; } -#ifndef HAVE_SSL_SET1_HOST +#if ! defined(HAVE_SSL_SET1_HOST) && ! defined(HAVE_X509_VERIFY_PARAM_SET1_HOST) if(auth_name) log_err("no name verification functionality in " "ssl library, ignored name for %s", p->str); diff --git a/iterator/iter_scrub.c b/iterator/iter_scrub.c index 891770bdcff659888f4e75d7275857bd4a736e3b..cceec3d5677a59c5c62f6cb2fd736ed71d07a575 100644 --- a/iterator/iter_scrub.c +++ b/iterator/iter_scrub.c @@ -185,9 +185,8 @@ mark_additional_rrset(sldns_buffer* pkt, struct msg_parse* msg, /** Get target name of a CNAME */ static int parse_get_cname_target(struct rrset_parse* rrset, uint8_t** sname, - size_t* snamelen, sldns_buffer* pkt) + size_t* snamelen) { - size_t oldpos, dlen; if(rrset->rr_count != 1) { struct rr_parse* sig; verbose(VERB_ALGO, "Found CNAME rrset with " @@ -205,19 +204,6 @@ parse_get_cname_target(struct rrset_parse* rrset, uint8_t** sname, *sname = rrset->rr_first->ttl_data + sizeof(uint32_t) + sizeof(uint16_t); /* skip ttl, rdatalen */ *snamelen = rrset->rr_first->size - sizeof(uint16_t); - - if(rrset->rr_first->outside_packet) { - if(!dname_valid(*sname, *snamelen)) - return 0; - return 1; - } - oldpos = sldns_buffer_position(pkt); - sldns_buffer_set_position(pkt, (size_t)(*sname - sldns_buffer_begin(pkt))); - dlen = pkt_dname_len(pkt); - sldns_buffer_set_position(pkt, oldpos); - if(dlen == 0) - return 0; /* parse fail on the rdata name */ - *snamelen = dlen; return 1; } @@ -229,8 +215,12 @@ synth_cname(uint8_t* qname, size_t qnamelen, struct rrset_parse* dname_rrset, /* we already know that sname is a strict subdomain of DNAME owner */ uint8_t* dtarg = NULL; size_t dtarglen; - if(!parse_get_cname_target(dname_rrset, &dtarg, &dtarglen, pkt)) + if(!parse_get_cname_target(dname_rrset, &dtarg, &dtarglen)) return 0; + if(qnamelen <= dname_rrset->dname_len) + return 0; + if(qnamelen == 0) + return 0; log_assert(qnamelen > dname_rrset->dname_len); /* DNAME from com. to net. with qname example.com. -> example.net. */ /* so: \3com\0 to \3net\0 and qname \7example\3com\0 */ @@ -398,7 +388,7 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, /* check next cname */ uint8_t* t = NULL; size_t tlen = 0; - if(!parse_get_cname_target(nx, &t, &tlen, pkt)) + if(!parse_get_cname_target(nx, &t, &tlen)) return 0; if(dname_pkt_compare(pkt, alias, t) == 0) { /* it's OK and better capitalized */ @@ -449,7 +439,7 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, size_t tlen = 0; if(synth_cname(sname, snamelen, nx, alias, &aliaslen, pkt) && - parse_get_cname_target(rrset, &t, &tlen, pkt) && + parse_get_cname_target(rrset, &t, &tlen) && dname_pkt_compare(pkt, alias, t) == 0) { /* the synthesized CNAME equals the * current CNAME. This CNAME is the @@ -470,7 +460,7 @@ scrub_normalize(sldns_buffer* pkt, struct msg_parse* msg, } /* move to next name in CNAME chain */ - if(!parse_get_cname_target(rrset, &sname, &snamelen, pkt)) + if(!parse_get_cname_target(rrset, &sname, &snamelen)) return 0; prev = rrset; rrset = rrset->rrset_all_next; diff --git a/iterator/iter_utils.c b/iterator/iter_utils.c index 488c1df195ca11fbc7c3eaf722067cb19605834c..2ab55ceb49771044eabd2c4f47f2965911831a51 100644 --- a/iterator/iter_utils.c +++ b/iterator/iter_utils.c @@ -882,10 +882,35 @@ rrset_equal(struct ub_packed_rrset_key* k1, struct ub_packed_rrset_key* k2) return 1; } +/** compare rrsets and sort canonically. Compares rrset name, type, class. + * return 0 if equal, +1 if x > y, and -1 if x < y. + */ +static int +rrset_canonical_sort_cmp(const void* x, const void* y) +{ + struct ub_packed_rrset_key* rrx = *(struct ub_packed_rrset_key**)x; + struct ub_packed_rrset_key* rry = *(struct ub_packed_rrset_key**)y; + int r = dname_canonical_compare(rrx->rk.dname, rry->rk.dname); + if(r != 0) + return r; + if(rrx->rk.type != rry->rk.type) { + if(ntohs(rrx->rk.type) > ntohs(rry->rk.type)) + return 1; + else return -1; + } + if(rrx->rk.rrset_class != rry->rk.rrset_class) { + if(ntohs(rrx->rk.rrset_class) > ntohs(rry->rk.rrset_class)) + return 1; + else return -1; + } + return 0; +} + int reply_equal(struct reply_info* p, struct reply_info* q, struct regional* region) { size_t i; + struct ub_packed_rrset_key** sorted_p, **sorted_q; if(p->flags != q->flags || p->qdcount != q->qdcount || /* do not check TTL, this may differ */ @@ -899,16 +924,43 @@ reply_equal(struct reply_info* p, struct reply_info* q, struct regional* region) p->ar_numrrsets != q->ar_numrrsets || p->rrset_count != q->rrset_count) return 0; + /* sort the rrsets in the authority and additional sections before + * compare, the query and answer sections are ordered in the sequence + * they should have (eg. one after the other for aliases). */ + sorted_p = (struct ub_packed_rrset_key**)regional_alloc_init( + region, p->rrsets, sizeof(*sorted_p)*p->rrset_count); + if(!sorted_p) return 0; + log_assert(p->an_numrrsets + p->ns_numrrsets + p->ar_numrrsets <= + p->rrset_count); + qsort(sorted_p + p->an_numrrsets, p->ns_numrrsets, + sizeof(*sorted_p), rrset_canonical_sort_cmp); + qsort(sorted_p + p->an_numrrsets + p->ns_numrrsets, p->ar_numrrsets, + sizeof(*sorted_p), rrset_canonical_sort_cmp); + + sorted_q = (struct ub_packed_rrset_key**)regional_alloc_init( + region, q->rrsets, sizeof(*sorted_q)*q->rrset_count); + if(!sorted_q) { + regional_free_all(region); + return 0; + } + log_assert(q->an_numrrsets + q->ns_numrrsets + q->ar_numrrsets <= + q->rrset_count); + qsort(sorted_q + q->an_numrrsets, q->ns_numrrsets, + sizeof(*sorted_q), rrset_canonical_sort_cmp); + qsort(sorted_q + q->an_numrrsets + q->ns_numrrsets, q->ar_numrrsets, + sizeof(*sorted_q), rrset_canonical_sort_cmp); + + /* compare the rrsets */ for(i=0; irrset_count; i++) { - if(!rrset_equal(p->rrsets[i], q->rrsets[i])) { - if(!rrset_canonical_equal(region, p->rrsets[i], - q->rrsets[i])) { + if(!rrset_equal(sorted_p[i], sorted_q[i])) { + if(!rrset_canonical_equal(region, sorted_p[i], + sorted_q[i])) { regional_free_all(region); return 0; } - regional_free_all(region); } } + regional_free_all(region); return 1; } @@ -1090,7 +1142,7 @@ int iter_lookup_parent_glue_from_cache(struct module_env* env, log_rrset_key(VERB_ALGO, "found parent-side", akey); ns->done_pside4 = 1; /* a negative-cache-element has no addresses it adds */ - if(!delegpt_add_rrset_A(dp, region, akey, 1, NULL)) + if(!delegpt_add_rrset_A(dp, region, akey, 1)) log_err("malloc failure in lookup_parent_glue"); lock_rw_unlock(&akey->entry.lock); } @@ -1102,7 +1154,7 @@ int iter_lookup_parent_glue_from_cache(struct module_env* env, log_rrset_key(VERB_ALGO, "found parent-side", akey); ns->done_pside6 = 1; /* a negative-cache-element has no addresses it adds */ - if(!delegpt_add_rrset_AAAA(dp, region, akey, 1, NULL)) + if(!delegpt_add_rrset_AAAA(dp, region, akey, 1)) log_err("malloc failure in lookup_parent_glue"); lock_rw_unlock(&akey->entry.lock); } @@ -1159,6 +1211,19 @@ iter_scrub_ds(struct dns_msg* msg, struct ub_packed_rrset_key* ns, uint8_t* z) } } +void +iter_scrub_nxdomain(struct dns_msg* msg) +{ + if(msg->rep->an_numrrsets == 0) + return; + + memmove(msg->rep->rrsets, msg->rep->rrsets+msg->rep->an_numrrsets, + sizeof(struct ub_packed_rrset_key*) * + (msg->rep->rrset_count-msg->rep->an_numrrsets)); + msg->rep->rrset_count -= msg->rep->an_numrrsets; + msg->rep->an_numrrsets = 0; +} + void iter_dec_attempts(struct delegpt* dp, int d) { struct delegpt_addr* a; diff --git a/iterator/iter_utils.h b/iterator/iter_utils.h index ccfb280224b3d6d4f7021cb8526d7deb5f688b07..f771930bba2bac0847be935b9858fb53252bb884 100644 --- a/iterator/iter_utils.h +++ b/iterator/iter_utils.h @@ -334,6 +334,13 @@ int iter_get_next_root(struct iter_hints* hints, struct iter_forwards* fwd, void iter_scrub_ds(struct dns_msg* msg, struct ub_packed_rrset_key* ns, uint8_t* z); +/** + * Prepare an NXDOMAIN message to be used for a subdomain answer by removing all + * RRs from the ANSWER section. + * @param msg: the response to scrub. + */ +void iter_scrub_nxdomain(struct dns_msg* msg); + /** * Remove query attempts from all available ips. For 0x20. * @param dp: delegpt. diff --git a/iterator/iterator.c b/iterator/iterator.c index 2c88b06f03327bd842e8d15a204bdde8d29e8bee..1e0113a8740ffd6e2b6d7d5cce93944981776e0b 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -72,8 +72,6 @@ /* in msec */ int UNKNOWN_SERVER_NICENESS = 376; -static void target_count_increase_nx(struct iter_qstate* iq, int num); - int iter_init(struct module_env* env, int id) { @@ -152,7 +150,6 @@ iter_new(struct module_qstate* qstate, int id) iq->sent_count = 0; iq->ratelimit_ok = 0; iq->target_count = NULL; - iq->dp_target_count = 0; iq->wait_priming_stub = 0; iq->refetch_glue = 0; iq->dnssec_expected = 0; @@ -224,7 +221,6 @@ final_state(struct iter_qstate* iq) static void error_supers(struct module_qstate* qstate, int id, struct module_qstate* super) { - struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id]; struct iter_qstate* super_iq = (struct iter_qstate*)super->minfo[id]; if(qstate->qinfo.qtype == LDNS_RR_TYPE_A || @@ -250,11 +246,7 @@ error_supers(struct module_qstate* qstate, int id, struct module_qstate* super) super->region, super_iq->dp)) log_err("out of memory adding missing"); } - delegpt_mark_neg(dpns, qstate->qinfo.qtype); dpns->resolved = 1; /* mark as failed */ - if((dpns->got4 == 2 || !ie->supports_ipv4) && - (dpns->got6 == 2 || !ie->supports_ipv6)) - target_count_increase_nx(super_iq, 1); } if(qstate->qinfo.qtype == LDNS_RR_TYPE_NS) { /* prime failed to get delegation */ @@ -417,6 +409,8 @@ iter_prepend(struct iter_qstate* iq, struct dns_msg* msg, num_an = 0; for(p = iq->an_prepend_list; p; p = p->next) { sets[num_an++] = p->rrset; + if(ub_packed_rrset_ttl(p->rrset) < msg->rep->ttl) + msg->rep->ttl = ub_packed_rrset_ttl(p->rrset); } memcpy(sets+num_an, msg->rep->rrsets, msg->rep->an_numrrsets * sizeof(struct ub_packed_rrset_key*)); @@ -429,6 +423,8 @@ iter_prepend(struct iter_qstate* iq, struct dns_msg* msg, msg->rep->ns_numrrsets, p->rrset)) continue; sets[msg->rep->an_numrrsets + num_an + num_ns++] = p->rrset; + if(ub_packed_rrset_ttl(p->rrset) < msg->rep->ttl) + msg->rep->ttl = ub_packed_rrset_ttl(p->rrset); } memcpy(sets + num_an + msg->rep->an_numrrsets + num_ns, msg->rep->rrsets + msg->rep->an_numrrsets, @@ -625,7 +621,7 @@ static void target_count_create(struct iter_qstate* iq) { if(!iq->target_count) { - iq->target_count = (int*)calloc(3, sizeof(int)); + iq->target_count = (int*)calloc(2, sizeof(int)); /* if calloc fails we simply do not track this number */ if(iq->target_count) iq->target_count[0] = 1; @@ -638,15 +634,6 @@ target_count_increase(struct iter_qstate* iq, int num) target_count_create(iq); if(iq->target_count) iq->target_count[1] += num; - iq->dp_target_count++; -} - -static void -target_count_increase_nx(struct iter_qstate* iq, int num) -{ - target_count_create(iq); - if(iq->target_count) - iq->target_count[2] += num; } /** @@ -669,15 +656,13 @@ target_count_increase_nx(struct iter_qstate* iq, int num) * @param subq_ret: if newly allocated, the subquerystate, or NULL if it does * not need initialisation. * @param v: if true, validation is done on the subquery. - * @param detached: true if this qstate should not attach to the subquery * @return false on error (malloc). */ static int generate_sub_request(uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, struct module_qstate* qstate, int id, struct iter_qstate* iq, enum iter_state initial_state, - enum iter_state finalstate, struct module_qstate** subq_ret, int v, - int detached) + enum iter_state finalstate, struct module_qstate** subq_ret, int v) { struct module_qstate* subq = NULL; struct iter_qstate* subiq = NULL; @@ -704,23 +689,11 @@ generate_sub_request(uint8_t* qname, size_t qnamelen, uint16_t qtype, valrec = 1; } - if(detached) { - struct mesh_state* sub = NULL; - fptr_ok(fptr_whitelist_modenv_add_sub( - qstate->env->add_sub)); - if(!(*qstate->env->add_sub)(qstate, &qinf, - qflags, prime, valrec, &subq, &sub)){ - return 0; - } - } - else { - /* attach subquery, lookup existing or make a new one */ - fptr_ok(fptr_whitelist_modenv_attach_sub( - qstate->env->attach_sub)); - if(!(*qstate->env->attach_sub)(qstate, &qinf, qflags, prime, - valrec, &subq)) { - return 0; - } + /* attach subquery, lookup existing or make a new one */ + fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub)); + if(!(*qstate->env->attach_sub)(qstate, &qinf, qflags, prime, valrec, + &subq)) { + return 0; } *subq_ret = subq; if(subq) { @@ -743,7 +716,6 @@ generate_sub_request(uint8_t* qname, size_t qnamelen, uint16_t qtype, subiq->target_count = iq->target_count; if(iq->target_count) iq->target_count[0] ++; /* extra reference */ - subiq->dp_target_count = 0; subiq->num_current_queries = 0; subiq->depth = iq->depth+1; outbound_list_init(&subiq->outlist); @@ -787,7 +759,7 @@ prime_root(struct module_qstate* qstate, struct iter_qstate* iq, int id, * the normal INIT state logic (which would cause an infloop). */ if(!generate_sub_request((uint8_t*)"\000", 1, LDNS_RR_TYPE_NS, qclass, qstate, id, iq, QUERYTARGETS_STATE, PRIME_RESP_STATE, - &subq, 0, 0)) { + &subq, 0)) { verbose(VERB_ALGO, "could not prime root"); return 0; } @@ -878,7 +850,7 @@ prime_stub(struct module_qstate* qstate, struct iter_qstate* iq, int id, * redundant INIT state processing. */ if(!generate_sub_request(stub_dp->name, stub_dp->namelen, LDNS_RR_TYPE_NS, qclass, qstate, id, iq, - QUERYTARGETS_STATE, PRIME_RESP_STATE, &subq, 0, 0)) { + QUERYTARGETS_STATE, PRIME_RESP_STATE, &subq, 0)) { verbose(VERB_ALGO, "could not prime stub"); errinf(qstate, "could not generate lookup for stub prime"); (void)error_response(qstate, id, LDNS_RCODE_SERVFAIL); @@ -1053,7 +1025,7 @@ generate_a_aaaa_check(struct module_qstate* qstate, struct iter_qstate* iq, if(!generate_sub_request(s->rk.dname, s->rk.dname_len, ntohs(s->rk.type), ntohs(s->rk.rrset_class), qstate, id, iq, - INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1, 0)) { + INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1)) { verbose(VERB_ALGO, "could not generate addr check"); return; } @@ -1097,7 +1069,7 @@ generate_ns_check(struct module_qstate* qstate, struct iter_qstate* iq, int id) iq->dp->name, LDNS_RR_TYPE_NS, iq->qchase.qclass); if(!generate_sub_request(iq->dp->name, iq->dp->namelen, LDNS_RR_TYPE_NS, iq->qchase.qclass, qstate, id, iq, - INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1, 0)) { + INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1)) { verbose(VERB_ALGO, "could not generate ns check"); return; } @@ -1154,7 +1126,7 @@ generate_dnskey_prefetch(struct module_qstate* qstate, iq->dp->name, LDNS_RR_TYPE_DNSKEY, iq->qchase.qclass); if(!generate_sub_request(iq->dp->name, iq->dp->namelen, LDNS_RR_TYPE_DNSKEY, iq->qchase.qclass, qstate, id, iq, - INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0, 0)) { + INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0)) { /* we'll be slower, but it'll work */ verbose(VERB_ALGO, "could not generate dnskey prefetch"); return; @@ -1343,7 +1315,6 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq, iq->refetch_glue = 0; iq->query_restart_count++; iq->sent_count = 0; - iq->dp_target_count = 0; sock_list_insert(&qstate->reply_origin, NULL, 0, qstate->region); if(qstate->env->cfg->qname_minimisation) iq->minimisation_state = INIT_MINIMISE_STATE; @@ -1481,7 +1452,8 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq, * now will also exceed the rate, keeping cache fresh */ (void)infra_ratelimit_inc(qstate->env->infra_cache, iq->dp->name, iq->dp->namelen, - *qstate->env->now); + *qstate->env->now, &qstate->qinfo, + qstate->reply); /* see if we are passed through with slip factor */ if(qstate->env->cfg->ratelimit_factor != 0 && ub_random_max(qstate->env->rnd, @@ -1721,7 +1693,7 @@ generate_parentside_target_query(struct module_qstate* qstate, { struct module_qstate* subq; if(!generate_sub_request(name, namelen, qtype, qclass, qstate, - id, iq, INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0, 0)) + id, iq, INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0)) return 0; if(subq) { struct iter_qstate* subiq = @@ -1772,7 +1744,7 @@ generate_target_query(struct module_qstate* qstate, struct iter_qstate* iq, { struct module_qstate* subq; if(!generate_sub_request(name, namelen, qtype, qclass, qstate, - id, iq, INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0, 0)) + id, iq, INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0)) return 0; log_nametypeclass(VERB_QUERY, "new target", name, qtype, qclass); return 1; @@ -1811,14 +1783,6 @@ query_for_targets(struct module_qstate* qstate, struct iter_qstate* iq, "number of glue fetches %d", s, iq->target_count[1]); return 0; } - if(iq->dp_target_count > MAX_DP_TARGET_COUNT) { - char s[LDNS_MAX_DOMAINLEN+1]; - dname_str(qstate->qinfo.qname, s); - verbose(VERB_QUERY, "request %s has exceeded the maximum " - "number of glue fetches %d to a single delegation point", - s, iq->dp_target_count); - return 0; - } iter_mark_cycle_targets(qstate, iq->dp); missing = (int)delegpt_count_missing_targets(iq->dp); @@ -1932,7 +1896,7 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq, for(a = p->target_list; a; a=a->next_target) { (void)delegpt_add_addr(iq->dp, qstate->region, &a->addr, a->addrlen, a->bogus, - a->lame, a->tls_auth_name, NULL); + a->lame, a->tls_auth_name); } } iq->dp->has_parent_side_NS = 1; @@ -1949,7 +1913,6 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq, iq->refetch_glue = 1; iq->query_restart_count++; iq->sent_count = 0; - iq->dp_target_count = 0; if(qstate->env->cfg->qname_minimisation) iq->minimisation_state = INIT_MINIMISE_STATE; return next_state(iq, INIT_REQUEST_STATE); @@ -2115,7 +2078,7 @@ processDSNSFind(struct module_qstate* qstate, struct iter_qstate* iq, int id) iq->dsns_point, LDNS_RR_TYPE_NS, iq->qchase.qclass); if(!generate_sub_request(iq->dsns_point, iq->dsns_point_len, LDNS_RR_TYPE_NS, iq->qchase.qclass, qstate, id, iq, - INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0, 0)) { + INIT_REQUEST_STATE, FINISHED_STATE, &subq, 0)) { errinf_dname(qstate, "for DS query parent-child nameserver search, could not generate NS lookup for", iq->dsns_point); return error_response_cache(qstate, id, LDNS_RCODE_SERVFAIL); } @@ -2147,6 +2110,8 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, struct delegpt_addr* target; struct outbound_entry* outq; int auth_fallback = 0; + uint8_t* qout_orig = NULL; + size_t qout_orig_len = 0; /* NOTE: a request will encounter this state for each target it * needs to send a query to. That is, at least one per referral, @@ -2171,13 +2136,6 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, errinf(qstate, "exceeded the maximum number of sends"); return error_response(qstate, id, LDNS_RCODE_SERVFAIL); } - if(iq->target_count && iq->target_count[2] > MAX_TARGET_NX) { - verbose(VERB_QUERY, "request has exceeded the maximum " - " number of nxdomain nameserver lookups with %d", - iq->target_count[2]); - errinf(qstate, "exceeded the maximum nameserver nxdomains"); - return error_response(qstate, id, LDNS_RCODE_SERVFAIL); - } /* Make sure we have a delegation point, otherwise priming failed * or another failure occurred */ @@ -2227,6 +2185,8 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, int labdiff = qchaselabs - dname_count_labels(iq->qinfo_out.qname); + qout_orig = iq->qinfo_out.qname; + qout_orig_len = iq->qinfo_out.qname_len; iq->qinfo_out.qname = iq->qchase.qname; iq->qinfo_out.qname_len = iq->qchase.qname_len; iq->minimise_count++; @@ -2280,41 +2240,12 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, iq->qinfo_out.qtype, iq->qinfo_out.qclass, qstate->query_flags, qstate->region, qstate->env->scratch, 0); - if(msg && FLAGS_GET_RCODE(msg->rep->flags) == + if(msg && msg->rep->an_numrrsets == 0 + && FLAGS_GET_RCODE(msg->rep->flags) == LDNS_RCODE_NOERROR) /* no need to send query if it is already - * cached as NOERROR */ + * cached as NOERROR/NODATA */ return 1; - if(msg && FLAGS_GET_RCODE(msg->rep->flags) == - LDNS_RCODE_NXDOMAIN && - qstate->env->need_to_validate && - qstate->env->cfg->harden_below_nxdomain) { - if(msg->rep->security == sec_status_secure) { - iq->response = msg; - return final_state(iq); - } - if(msg->rep->security == sec_status_unchecked) { - struct module_qstate* subq = NULL; - if(!generate_sub_request( - iq->qinfo_out.qname, - iq->qinfo_out.qname_len, - iq->qinfo_out.qtype, - iq->qinfo_out.qclass, - qstate, id, iq, - INIT_REQUEST_STATE, - FINISHED_STATE, &subq, 1, 1)) - verbose(VERB_ALGO, - "could not validate NXDOMAIN " - "response"); - } - } - if(msg && FLAGS_GET_RCODE(msg->rep->flags) == - LDNS_RCODE_NXDOMAIN) { - /* return and add a label in the next - * minimisation iteration. - */ - return 1; - } } } if(iq->minimisation_state == SKIP_MINIMISE_STATE) { @@ -2390,8 +2321,6 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, * generated query will immediately be discarded due to depth and * that servfail is cached, which is not good as opportunism goes. */ if(iq->depth < ie->max_dependency_depth - && iq->num_target_queries == 0 - && (!iq->target_count || iq->target_count[2]==0) && iq->sent_count < TARGET_FETCH_STOP) { tf_policy = ie->target_fetch_policy[iq->depth]; } @@ -2410,6 +2339,13 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, /* wait to get all targets, we want to try em */ verbose(VERB_ALGO, "wait for all targets for fallback"); qstate->ext_state[id] = module_wait_reply; + /* undo qname minimise step because we'll get back here + * to do it again */ + if(qout_orig && iq->minimise_count > 0) { + iq->minimise_count--; + iq->qinfo_out.qname = qout_orig; + iq->qinfo_out.qname_len = qout_orig_len; + } return 0; } /* did we do enough fallback queries already? */ @@ -2430,7 +2366,6 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, iq->num_current_queries++; /* RespState decrements it*/ iq->referral_count++; /* make sure we don't loop */ iq->sent_count = 0; - iq->dp_target_count = 0; iq->state = QUERY_RESP_STATE; return 1; } @@ -2518,7 +2453,6 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, iq->num_current_queries++; /* RespState decrements it*/ iq->referral_count++; /* make sure we don't loop */ iq->sent_count = 0; - iq->dp_target_count = 0; iq->state = QUERY_RESP_STATE; return 1; } @@ -2545,13 +2479,21 @@ processQueryTargets(struct module_qstate* qstate, struct iter_qstate* iq, iq->num_current_queries); qstate->ext_state[id] = module_wait_reply; } + /* undo qname minimise step because we'll get back here + * to do it again */ + if(qout_orig && iq->minimise_count > 0) { + iq->minimise_count--; + iq->qinfo_out.qname = qout_orig; + iq->qinfo_out.qname_len = qout_orig_len; + } return 0; } /* if not forwarding, check ratelimits per delegationpoint name */ if(!(iq->chase_flags & BIT_RD) && !iq->ratelimit_ok) { if(!infra_ratelimit_inc(qstate->env->infra_cache, iq->dp->name, - iq->dp->namelen, *qstate->env->now)) { + iq->dp->namelen, *qstate->env->now, &qstate->qinfo, + qstate->reply)) { lock_basic_lock(&ie->queries_ratelimit_lock); ie->num_queries_ratelimited++; lock_basic_unlock(&ie->queries_ratelimit_lock); @@ -2780,8 +2722,15 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, && !(iq->chase_flags & BIT_RD)) { if(FLAGS_GET_RCODE(iq->response->rep->flags) != LDNS_RCODE_NOERROR) { - if(qstate->env->cfg->qname_minimisation_strict) - return final_state(iq); + if(qstate->env->cfg->qname_minimisation_strict) { + if(FLAGS_GET_RCODE(iq->response->rep->flags) == + LDNS_RCODE_NXDOMAIN) { + iter_scrub_nxdomain(iq->response); + return final_state(iq); + } + return error_response(qstate, id, + LDNS_RCODE_SERVFAIL); + } /* Best effort qname-minimisation. * Stop minimising and send full query when * RCODE is not NOERROR. */ @@ -2798,8 +2747,7 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, /* Make subrequest to validate intermediate * NXDOMAIN if harden-below-nxdomain is * enabled. */ - if(qstate->env->cfg->harden_below_nxdomain && - qstate->env->need_to_validate) { + if(qstate->env->cfg->harden_below_nxdomain) { struct module_qstate* subq = NULL; log_query_info(VERB_QUERY, "schedule NXDOMAIN validation:", @@ -2811,10 +2759,16 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, iq->response->qinfo.qclass, qstate, id, iq, INIT_REQUEST_STATE, - FINISHED_STATE, &subq, 1, 1)) + FINISHED_STATE, &subq, 1)) verbose(VERB_ALGO, "could not validate NXDOMAIN " "response"); + outbound_list_clear(&iq->outlist); + iq->num_current_queries = 0; + fptr_ok(fptr_whitelist_modenv_detach_subs( + qstate->env->detach_subs)); + (*qstate->env->detach_subs)(qstate); + iq->num_target_queries = 0; } } return next_state(iq, QUERYTARGETS_STATE); @@ -2898,7 +2852,6 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, /* Count this as a referral. */ iq->referral_count++; iq->sent_count = 0; - iq->dp_target_count = 0; /* see if the next dp is a trust anchor, or a DS was sent * along, indicating dnssec is expected for next zone */ iq->dnssec_expected = iter_indicates_dnssec(qstate->env, @@ -2975,7 +2928,6 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq, iq->dsns_point = NULL; iq->auth_zone_response = 0; iq->sent_count = 0; - iq->dp_target_count = 0; if(iq->minimisation_state != MINIMISE_STATE) /* Only count as query restart when it is not an extra * query as result of qname minimisation. */ @@ -3168,7 +3120,7 @@ processPrimeResponse(struct module_qstate* qstate, int id) if(!generate_sub_request(qstate->qinfo.qname, qstate->qinfo.qname_len, qstate->qinfo.qtype, qstate->qinfo.qclass, qstate, id, iq, - INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1, 0)) { + INIT_REQUEST_STATE, FINISHED_STATE, &subq, 1)) { verbose(VERB_ALGO, "could not generate prime check"); } generate_a_aaaa_check(qstate, iq, id); @@ -3196,7 +3148,6 @@ static void processTargetResponse(struct module_qstate* qstate, int id, struct module_qstate* forq) { - struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id]; struct iter_qstate* iq = (struct iter_qstate*)qstate->minfo[id]; struct iter_qstate* foriq = (struct iter_qstate*)forq->minfo[id]; struct ub_packed_rrset_key* rrset; @@ -3234,7 +3185,7 @@ processTargetResponse(struct module_qstate* qstate, int id, log_rrset_key(VERB_ALGO, "add parentside glue to dp", iq->pside_glue); if(!delegpt_add_rrset(foriq->dp, forq->region, - iq->pside_glue, 1, NULL)) + iq->pside_glue, 1)) log_err("out of memory adding pside glue"); } @@ -3245,7 +3196,6 @@ processTargetResponse(struct module_qstate* qstate, int id, * response type was ANSWER. */ rrset = reply_find_answer_rrset(&iq->qchase, qstate->return_msg->rep); if(rrset) { - int additions = 0; /* if CNAMEs have been followed - add new NS to delegpt. */ /* BTW. RFC 1918 says NS should not have got CNAMEs. Robust. */ if(!delegpt_find_ns(foriq->dp, rrset->rk.dname, @@ -3257,23 +3207,13 @@ processTargetResponse(struct module_qstate* qstate, int id, } /* if dpns->lame then set the address(es) lame too */ if(!delegpt_add_rrset(foriq->dp, forq->region, rrset, - dpns->lame, &additions)) + dpns->lame)) log_err("out of memory adding targets"); - if(!additions) { - /* no new addresses, increase the nxns counter, like - * this could be a list of wildcards with no new - * addresses */ - target_count_increase_nx(foriq, 1); - } verbose(VERB_ALGO, "added target response"); delegpt_log(VERB_ALGO, foriq->dp); } else { verbose(VERB_ALGO, "iterator TargetResponse failed"); - delegpt_mark_neg(dpns, qstate->qinfo.qtype); dpns->resolved = 1; /* fail the target */ - if((dpns->got4 == 2 || !ie->supports_ipv4) && - (dpns->got6 == 2 || !ie->supports_ipv6)) - target_count_increase_nx(foriq, 1); } } @@ -3447,7 +3387,7 @@ processCollectClass(struct module_qstate* qstate, int id) qstate->qinfo.qname_len, qstate->qinfo.qtype, c, qstate, id, iq, INIT_REQUEST_STATE, FINISHED_STATE, &subq, - (int)!(qstate->query_flags&BIT_CD), 0)) { + (int)!(qstate->query_flags&BIT_CD))) { errinf(qstate, "could not generate class ANY" " lookup query"); return error_response(qstate, id, diff --git a/iterator/iterator.h b/iterator/iterator.h index 53dcab3b18b2b4e444b1aa067355c1d981ba4740..a2f1b5705e7076193098b876d4a5f508d45c34e0 100644 --- a/iterator/iterator.h +++ b/iterator/iterator.h @@ -55,11 +55,6 @@ struct rbtree_type; /** max number of targets spawned for a query and its subqueries */ #define MAX_TARGET_COUNT 64 -/** max number of target lookups per qstate, per delegation point */ -#define MAX_DP_TARGET_COUNT 16 -/** max number of nxdomains allowed for target lookups for a query and - * its subqueries */ -#define MAX_TARGET_NX 5 /** max number of query restarts. Determines max number of CNAME chain. */ #define MAX_RESTART_COUNT 8 /** max number of referrals. Makes sure resolver does not run away */ @@ -310,14 +305,9 @@ struct iter_qstate { int sent_count; /** number of target queries spawned in [1], for this query and its - * subqueries, the malloced-array is shared, [0] refcount. - * in [2] the number of nxdomains is counted. */ + * subqueries, the malloced-array is shared, [0] refcount. */ int* target_count; - /** number of target lookups per delegation point. Reset to 0 after - * receiving referral answer. Not shared with subqueries. */ - int dp_target_count; - /** if true, already tested for ratelimiting and passed the test */ int ratelimit_ok; diff --git a/libunbound/context.c b/libunbound/context.c index 20e3680ec3bca96079abdda2193ffa1973b87592..b8fe87d2e580d822706335be231d86ef4d976450 100644 --- a/libunbound/context.c +++ b/libunbound/context.c @@ -57,9 +57,16 @@ context_finalize(struct ub_ctx* ctx) { struct config_file* cfg = ctx->env->cfg; verbosity = cfg->verbosity; - if(ctx->logfile_override) + if(ctx_logfile_overridden && !ctx->logfile_override) { + log_file(NULL); /* clear that override */ + ctx_logfile_overridden = 0; + } + if(ctx->logfile_override) { + ctx_logfile_overridden = 1; log_file(ctx->log_out); - else log_init(cfg->logfile, cfg->use_syslog, NULL); + } else { + log_init(cfg->logfile, cfg->use_syslog, NULL); + } config_apply(cfg); if(!modstack_setup(&ctx->mods, cfg->module_conf, ctx->env)) return UB_INITFAIL; diff --git a/libunbound/context.h b/libunbound/context.h index 11147226a8cc687cc84b9f46a55d7e023f3b325b..78f8731e236ed4e9e301d17d3f364415cdab0ad0 100644 --- a/libunbound/context.h +++ b/libunbound/context.h @@ -52,6 +52,9 @@ struct tube; struct sldns_buffer; struct ub_event_base; +/** store that the logfile has a debug override */ +extern int ctx_logfile_overridden; + /** * The context structure * @@ -116,6 +119,9 @@ struct ub_ctx { /** event base for event oriented interface */ struct ub_event_base* event_base; + /** true if the event_base is a pluggable base that is malloced + * with a user event base inside, if so, clean up the pluggable alloc*/ + int event_base_malloced; /** libworker for event based interface */ struct libworker* event_worker; diff --git a/libunbound/libunbound.c b/libunbound/libunbound.c index 5f5a8a10265ca0adbbb8efc7bb8542f1c4218b49..3b30419b315e35b444086b32520d17d84952435a 100644 --- a/libunbound/libunbound.c +++ b/libunbound/libunbound.c @@ -79,18 +79,21 @@ #include #endif /* UB_ON_WINDOWS */ +/** store that the logfile has a debug override */ +int ctx_logfile_overridden = 0; + /** create context functionality, but no pipes */ static struct ub_ctx* ub_ctx_create_nopipe(void) { struct ub_ctx* ctx; - unsigned int seed; #ifdef USE_WINSOCK int r; WSADATA wsa_data; #endif checklock_start(); - log_init(NULL, 0, NULL); /* logs to stderr */ + if(!ctx_logfile_overridden) + log_init(NULL, 0, NULL); /* logs to stderr */ log_ident_set("libunbound"); #ifdef USE_WINSOCK if((r = WSAStartup(MAKEWORD(2,2), &wsa_data)) != 0) { @@ -99,7 +102,7 @@ static struct ub_ctx* ub_ctx_create_nopipe(void) return NULL; } #endif - verbosity = 0; /* errors only */ + verbosity = NO_VERBOSE; /* errors only */ checklock_start(); ctx = (struct ub_ctx*)calloc(1, sizeof(*ctx)); if(!ctx) { @@ -107,15 +110,12 @@ static struct ub_ctx* ub_ctx_create_nopipe(void) return NULL; } alloc_init(&ctx->superalloc, NULL, 0); - seed = (unsigned int)time(NULL) ^ (unsigned int)getpid(); - if(!(ctx->seed_rnd = ub_initstate(seed, NULL))) { - explicit_bzero(&seed, sizeof(seed)); + if(!(ctx->seed_rnd = ub_initstate(NULL))) { ub_randfree(ctx->seed_rnd); free(ctx); errno = ENOMEM; return NULL; } - explicit_bzero(&seed, sizeof(seed)); lock_basic_init(&ctx->qqpipe_lock); lock_basic_init(&ctx->rrpipe_lock); lock_basic_init(&ctx->cfglock); @@ -222,6 +222,7 @@ ub_ctx_create_event(struct event_base* eb) ub_ctx_delete(ctx); return NULL; } + ctx->event_base_malloced = 1; return ctx; } @@ -328,6 +329,12 @@ ub_ctx_delete(struct ub_ctx* ctx) ub_randfree(ctx->seed_rnd); alloc_clear(&ctx->superalloc); traverse_postorder(&ctx->queries, delq, NULL); + if(ctx_logfile_overridden) { + log_file(NULL); + ctx_logfile_overridden = 0; + } + if(ctx->event_base_malloced) + free(ctx->event_base); free(ctx); #ifdef USE_WINSOCK WSACleanup(); @@ -469,6 +476,7 @@ int ub_ctx_debugout(struct ub_ctx* ctx, void* out) { lock_basic_lock(&ctx->cfglock); log_file((FILE*)out); + ctx_logfile_overridden = 1; ctx->logfile_override = 1; ctx->log_out = out; lock_basic_unlock(&ctx->cfglock); @@ -1150,7 +1158,7 @@ int ub_ctx_hosts(struct ub_ctx* ctx, const char* fname) { FILE* in; - char buf[1024], ldata[1024]; + char buf[1024], ldata[2048]; char* parse, *addr, *name, *ins; lock_basic_lock(&ctx->cfglock); if(ctx->finalized) { diff --git a/libunbound/libworker.c b/libunbound/libworker.c index a886f9a8811370d788ee0d8b4ff1fc6b09749cd2..5c62017a0fc23c9a5279c7596dd392f103b4cc5e 100644 --- a/libunbound/libworker.c +++ b/libunbound/libworker.c @@ -122,7 +122,6 @@ libworker_delete_event(struct libworker* w) static struct libworker* libworker_setup(struct ub_ctx* ctx, int is_bg, struct ub_event_base* eb) { - unsigned int seed; struct libworker* w = (struct libworker*)calloc(1, sizeof(*w)); struct config_file* cfg = ctx->env->cfg; int* ports; @@ -177,17 +176,13 @@ libworker_setup(struct ub_ctx* ctx, int is_bg, struct ub_event_base* eb) } w->env->worker = (struct worker*)w; w->env->probe_timer = NULL; - seed = (unsigned int)time(NULL) ^ (unsigned int)getpid() ^ - (((unsigned int)w->thread_num)<<17); - seed ^= (unsigned int)w->env->alloc->next_id; if(!w->is_bg || w->is_bg_thread) { lock_basic_lock(&ctx->cfglock); } - if(!(w->env->rnd = ub_initstate(seed, ctx->seed_rnd))) { + if(!(w->env->rnd = ub_initstate(ctx->seed_rnd))) { if(!w->is_bg || w->is_bg_thread) { lock_basic_unlock(&ctx->cfglock); } - explicit_bzero(&seed, sizeof(seed)); libworker_delete(w); return NULL; } @@ -207,7 +202,6 @@ libworker_setup(struct ub_ctx* ctx, int is_bg, struct ub_event_base* eb) hash_set_raninit((uint32_t)ub_random(w->env->rnd)); } } - explicit_bzero(&seed, sizeof(seed)); if(eb) w->base = comm_base_create_event(eb); @@ -222,11 +216,10 @@ libworker_setup(struct ub_ctx* ctx, int is_bg, struct ub_event_base* eb) } numports = cfg_condense_ports(cfg, &ports); if(numports == 0) { - int locked = !w->is_bg || w->is_bg_thread; - libworker_delete(w); - if(locked) { + if(!w->is_bg || w->is_bg_thread) { lock_basic_unlock(&ctx->cfglock); } + libworker_delete(w); return NULL; } w->back = outside_network_create(w->base, cfg->msg_buffer_size, @@ -533,7 +526,7 @@ libworker_fillup_fg(struct ctx_query* q, int rcode, sldns_buffer* buf, } q->res->rcode = LDNS_RCODE_SERVFAIL; - q->msg_security = 0; + q->msg_security = sec_status_unchecked; q->msg = memdup(sldns_buffer_begin(buf), sldns_buffer_limit(buf)); q->msg_len = sldns_buffer_limit(buf); if(!q->msg) { diff --git a/libunbound/python/libunbound.i b/libunbound/python/libunbound.i index 84a536929421df9a3ba1d2adfb0c4e5bbe91429b..a23c45b9c70873f146e0a72f3771ade46e0ed9e7 100644 --- a/libunbound/python/libunbound.i +++ b/libunbound/python/libunbound.i @@ -33,12 +33,26 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ +%begin %{ +/* store state of warning output, restored at later pop */ +#pragma GCC diagnostic push +/* ignore gcc8 METH_NOARGS function cast warnings for swig function pointers */ +#pragma GCC diagnostic ignored "-Wcast-function-type" +%} %module unbound %{ +/* restore state of warning output, remove the functioncast ignore */ +#pragma GCC diagnostic pop #include + #ifdef HAVE_SYS_SOCKET_H #include + #endif + #ifdef HAVE_NETINET_IN_H #include + #endif + #ifdef HAVE_ARPA_INET_H #include + #endif #include "libunbound/unbound.h" %} @@ -108,7 +122,7 @@ %inline %{ void ub_ctx_free_dbg (struct ub_ctx* c) { - printf("******** UB_CTX free 0x%lX ************\n", (long unsigned int)c); + printf("******** UB_CTX free 0x%p ************\n", c); ub_ctx_delete(c); } @@ -228,6 +242,7 @@ RR_TYPE_MAILA = 254, /** any type (wildcard) */ RR_TYPE_ANY = 255, + RR_TYPE_CAA = 257, /* RFC 4431, 5074, DNSSEC Lookaside Validation */ RR_TYPE_DLV = 32769, @@ -648,7 +663,7 @@ Result: ['74.125.43.147', '74.125.43.99', '74.125.43.103', '74.125.43.104'] %inline %{ void ub_resolve_free_dbg (struct ub_result* r) { - printf("******** UB_RESOLVE free 0x%lX ************\n", (long unsigned int)r); + printf("******** UB_RESOLVE free 0x%p ************\n", r); ub_resolve_free(r); } %} @@ -809,8 +824,7 @@ Result: ['74.125.43.147', '74.125.43.99', '74.125.43.103', '74.125.43.104'] """ return self.rcode2str[self.rcode] - __swig_getmethods__["rcode_str"] = _get_rcode_str - if _newclass:rcode_str = _swig_property(_get_rcode_str) + rcode_str = property(_get_rcode_str) def _get_raw_data(self): """Result data, a list of network order DNS rdata items. @@ -819,15 +833,13 @@ Result: ['74.125.43.147', '74.125.43.99', '74.125.43.103', '74.125.43.104'] """ return self._ub_result_data(self) - __swig_getmethods__["rawdata"] = _get_raw_data rawdata = property(_get_raw_data, doc="Returns raw data, a list of rdata items. To decode RAW data use the :attr:`data` attribute which returns an instance of :class:`ub_data` containing the conversion functions.") def _get_data(self): if not self.havedata: return None return ub_data(self._ub_result_data(self)) - __swig_getmethods__["data"] = _get_data - __swig_getmethods__["packet"] = _packet + packet = property(_packet) data = property(_get_data, doc="Returns :class:`ub_data` instance containing various decoding functions or None") %} diff --git a/pythonmod/doc/examples/example0-1.py b/pythonmod/doc/examples/example0-1.py index 5ae48d16674aedc1e1e0c1dd9a997e0e9ea64ccf..7904f73a55e8a1cb1e5822e74cf6fff7c1ddfd71 100644 --- a/pythonmod/doc/examples/example0-1.py +++ b/pythonmod/doc/examples/example0-1.py @@ -1,8 +1,11 @@ - def init(id, cfg): log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, cfg.port, cfg.python_script)) return True +def init_standard(id, env): + log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, env.cfg.port, env.cfg.python_script)) + return True + def deinit(id): log_info("pythonmod: deinit called, module id is %d" % id) return True diff --git a/pythonmod/doc/examples/example0.rst b/pythonmod/doc/examples/example0.rst index 8fff41f33c7256ab1197302993c4b32b4080c722..693972a141a4f2a863abdb36a864257f78c5b9f5 100644 --- a/pythonmod/doc/examples/example0.rst +++ b/pythonmod/doc/examples/example0.rst @@ -54,6 +54,25 @@ Script file must contain four compulsory functions: return True +.. function:: init_standard(id, env) + + Initialize module internals, like database etc. + Called just once on module load. + + *Preferred* over the init() function above as this function's signature is the + same as the C counterpart and allows for extra functionality during init. + The previously accessible configuration options can now be found in env.cfg. + + :param id: module identifier (integer) + :param env: :class:`module_env` module environment + +:: + + def init_standard(id, env): + log_info("pythonmod: init called, module id is %d port: %d script: %s" % (id, env.cfg.port, env.cfg.python_script)) + return True + + .. function:: deinit(id) Deinitialize module internals. diff --git a/pythonmod/examples/avahi-resolver.py b/pythonmod/examples/avahi-resolver.py new file mode 100644 index 0000000000000000000000000000000000000000..b1d4e36fc887df06a6a1c80be490e22dd576be95 --- /dev/null +++ b/pythonmod/examples/avahi-resolver.py @@ -0,0 +1,567 @@ +#!/usr/bin/env python3 +# +# A plugin for the Unbound DNS resolver to resolve DNS records in +# multicast DNS [RFC 6762] via Avahi. +# +# Copyright (C) 2018-2019 Internet Real-Time Lab, Columbia University +# http://www.cs.columbia.edu/irt/ +# +# Written by Jan Janak +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation files +# (the "Software"), to deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, +# publish, distribute, sublicense, and/or sell copies of the Software, +# and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# +# Dependendies: +# Unbound with pythonmodule configured for Python 3 +# dnspython [http://www.dnspython.org] +# pydbus [https://github.com/LEW21/pydbus] +# +# To enable Python 3 support, configure Unbound as follows: +# PYTHON_VERSION=3 ./configure --with-pythonmodule +# +# The plugin in meant to be used as a fallback resolver that resolves +# records in multicast DNS if the upstream server cannot be reached or +# provides no answer (NXDOMAIN). +# +# mDNS requests for negative records, i.e., records for which Avahi +# returns no answer (NXDOMAIN), are expensive. Since there is no +# single authoritative server in mDNS, such requests terminate only +# via a timeout. The timeout is about a second (if MDNS_TIMEOUT is not +# configured), or the value configured via MDNS_TIMEOUT. The +# corresponding Unbound thread will be blocked for this amount of +# time. For this reason, it is important to configure an appropriate +# number of threads in unbound.conf and limit the RR types and names +# that will be resolved via Avahi via the environment variables +# described later. +# +# An example unbound.conf with the plugin enabled: +# +# | server: +# | module-config: "validator python iterator" +# | num-threads: 32 +# | cache-max-negative-ttl: 60 +# | cache-max-ttl: 60 +# +# +# The plugin can also be run interactively. Provide the name and +# record type to be resolved as command line arguments and the +# resolved record will be printed to standard output: +# +# $ ./avahi-resolver.py voip-phx4.phxnet.org A +# voip-phx4.phxnet.org. 120 IN A 10.4.3.2 +# +# +# The behavior of the plugin can be controlled via the following +# environment variables: +# +# DBUS_SYSTEM_BUS_ADDRESS +# +# The address of the system DBus bus, in the format expected by DBus, +# e.g., unix:path=/run/avahi/system-bus.sock +# +# +# DEBUG +# +# Set this environment variable to "yes", "true", "on", or "1" to +# enable debugging. In debugging mode, the plugin will output a lot +# more information about what it is doing either to the standard +# output (when run interactively) or to Unbound via log_info and +# log_error. +# +# By default debugging is disabled. +# +# +# MDNS_TTL +# +# Avahi does not provide the TTL value for the records it returns. +# This environment variable can be used to configure the TTL value for +# such records. +# +# The default value is 120 seconds. +# +# +# MDNS_TIMEOUT +# +# The maximum amount of time (in milliseconds) an Avahi request is +# allowed to run. This value sets the time it takes to resolve +# negative (non-existent) records in Avahi. If unset, the request +# terminates when Avahi sends the "AllForNow" signal, telling the +# client that more records are unlikely to arrive. This takes roughly +# about one second. You may need to configure a longer value here on +# slower networks, e.g., networks that relay mDNS packets such as +# MANETs. +# +# +# MDNS_GETONE +# +# If set to "true", "1", or "on", an Avahi request will terminate as +# soon as at least one record has been found. If there are multiple +# nodes in the mDNS network publishing the same record, only one (or +# subset) will be returned. +# +# If set to "false", "0", or "off", the plugin will gather records for +# MDNS_TIMEOUT and return all records found. This is only useful in +# networks where multiple nodes are known to publish different records +# under the same name and the client needs to be able to obtain them +# all. When configured this way, all Avahi requests will always take +# MDNS_TIMEOUT to complete! +# +# This option is set to true by default. +# +# +# MDNS_REJECT_TYPES +# +# A comma-separated list of record types that will NOT be resolved in +# mDNS via Avahi. Use this environment variable to prevent specific +# record types from being resolved via Avahi. For example, if your +# network does not support IPv6, you can put AAAA on this list. +# +# The default value is an empty list. +# +# Example: MDNS_REJECT_TYPES=aaaa,mx,soa +# +# +# MDNS_ACCEPT_TYPES +# +# If set, a record type will be resolved via Avahi if and only if it +# is present on this comma-separated list. In other words, this is a +# whitelist. +# +# The default value is an empty list which means all record types will +# be resolved via Avahi. +# +# Example: MDNS_ACCEPT_TYPES=a,ptr,txt,srv,aaaa,cname +# +# +# MDNS_REJECT_NAMES +# +# If the name being resolved matches the regular expression in this +# environment variable, the name will NOT be resolved via Avahi. In +# other words, this environment variable provides a blacklist. +# +# The default value is empty--no names will be reject. +# +# Example: MDNS_REJECT_NAMES=(^|\.)example\.com\.$ +# +# +# MDNS_ACCEPT_NAMES +# +# If set to a regular expression, a name will be resolved via Avahi if +# and only if it matches the regular expression. In other words, this +# variable provides a whitelist. +# +# The default value is empty--all names will be resolved via Avahi. +# +# Example: MDNS_ACCEPT_NAMES=^.*\.example\.com\.$ +# + +import os +import re +import array +import threading +import traceback +import dns.rdata +import dns.rdatatype +import dns.rdataclass +from queue import Queue +from gi.repository import GLib +from pydbus import SystemBus + + +IF_UNSPEC = -1 +PROTO_UNSPEC = -1 + +sysbus = None +avahi = None +trampoline = dict() +thread_local = threading.local() +dbus_thread = None +dbus_loop = None + + +def str2bool(v): + if v.lower() in ['false', 'no', '0', 'off', '']: + return False + return True + + +def dbg(msg): + if DEBUG != False: + log_info('avahi-resolver: %s' % msg) + + +# +# Although pydbus has an internal facility for handling signals, we +# cannot use that with Avahi. When responding from an internal cache, +# Avahi sends the first signal very quickly, before pydbus has had a +# chance to subscribe for the signal. This will result in lost signal +# and missed data: +# +# https://github.com/LEW21/pydbus/issues/87 +# +# As a workaround, we subscribe to all signals before creating a +# record browser and do our own signal matching and dispatching via +# the following function. +# +def signal_dispatcher(connection, sender, path, interface, name, args): + o = trampoline.get(path, None) + if o is None: + return + + if name == 'ItemNew': o.itemNew(*args) + elif name == 'ItemRemove': o.itemRemove(*args) + elif name == 'AllForNow': o.allForNow(*args) + elif name == 'Failure': o.failure(*args) + + +class RecordBrowser: + def __init__(self, callback, name, type_, timeout=None, getone=True): + self.callback = callback + self.records = [] + self.error = None + self.getone = getone + + self.timer = None if timeout is None else GLib.timeout_add(timeout, self.timedOut) + + self.browser_path = avahi.RecordBrowserNew(IF_UNSPEC, PROTO_UNSPEC, name, dns.rdataclass.IN, type_, 0) + trampoline[self.browser_path] = self + self.browser = sysbus.get('.Avahi', self.browser_path) + self.dbg('Created RecordBrowser(name=%s, type=%s, getone=%s, timeout=%s)' + % (name, dns.rdatatype.to_text(type_), getone, timeout)) + + def dbg(self, msg): + dbg('[%s] %s' % (self.browser_path, msg)) + + def _done(self): + del trampoline[self.browser_path] + self.dbg('Freeing') + self.browser.Free() + + if self.timer is not None: + self.dbg('Removing timer') + GLib.source_remove(self.timer) + + self.callback(self.records, self.error) + + def itemNew(self, interface, protocol, name, class_, type_, rdata, flags): + self.dbg('Got signal ItemNew') + self.records.append((name, class_, type_, rdata)) + if self.getone: + self._done() + + def itemRemove(self, interface, protocol, name, class_, type_, rdata, flags): + self.dbg('Got signal ItemRemove') + self.records.remove((name, class_, type_, rdata)) + + def failure(self, error): + self.dbg('Got signal Failure') + self.error = Exception(error) + self._done() + + def allForNow(self): + self.dbg('Got signal AllForNow') + if self.timer is None: + self._done() + + def timedOut(self): + self.dbg('Timed out') + self._done() + return False + + +# +# This function runs the main event loop for DBus (GLib). This +# function must be run in a dedicated worker thread. +# +def dbus_main(): + global sysbus, avahi, dbus_loop + + dbg('Connecting to system DBus') + sysbus = SystemBus() + + dbg('Subscribing to .Avahi.RecordBrowser signals') + sysbus.con.signal_subscribe('org.freedesktop.Avahi', + 'org.freedesktop.Avahi.RecordBrowser', + None, None, None, 0, signal_dispatcher) + + avahi = sysbus.get('.Avahi', '/') + + dbg("Connected to Avahi Daemon: %s (API %s) [%s]" + % (avahi.GetVersionString(), avahi.GetAPIVersion(), avahi.GetHostNameFqdn())) + + dbg('Starting DBus main loop') + dbus_loop = GLib.MainLoop() + dbus_loop.run() + + +# +# This function must be run in the DBus worker thread. It creates a +# new RecordBrowser instance and once it has finished doing it thing, +# it will send the result back to the original thread via the queue. +# +def start_resolver(queue, *args, **kwargs): + try: + RecordBrowser(lambda *v: queue.put_nowait(v), *args, **kwargs) + except Exception as e: + queue.put_nowait((None, e)) + + return False + + +# +# To resolve a request, we setup a queue, post a task to the DBus +# worker thread, and wait for the result (or error) to arrive over the +# queue. If the worker thread reports an error, raise the error as an +# exception. +# +def resolve(*args, **kwargs): + try: + queue = thread_local.queue + except AttributeError: + dbg('Creating new per-thread queue') + queue = Queue() + thread_local.queue = queue + + GLib.idle_add(lambda: start_resolver(queue, *args, **kwargs)) + + records, error = queue.get() + queue.task_done() + + if error is not None: + raise error + + return records + + +def parse_type_list(lst): + return list(map(dns.rdatatype.from_text, [v.strip() for v in lst.split(',') if len(v)])) + + +def init(*args, **kwargs): + global dbus_thread, DEBUG + global MDNS_TTL, MDNS_GETONE, MDNS_TIMEOUT + global MDNS_REJECT_TYPES, MDNS_ACCEPT_TYPES + global MDNS_REJECT_NAMES, MDNS_ACCEPT_NAMES + + DEBUG = str2bool(os.environ.get('DEBUG', str(False))) + + MDNS_TTL = int(os.environ.get('MDNS_TTL', 120)) + dbg("TTL for records from Avahi: %d" % MDNS_TTL) + + MDNS_REJECT_TYPES = parse_type_list(os.environ.get('MDNS_REJECT_TYPES', '')) + if MDNS_REJECT_TYPES: + dbg('Types NOT resolved via Avahi: %s' % MDNS_REJECT_TYPES) + + MDNS_ACCEPT_TYPES = parse_type_list(os.environ.get('MDNS_ACCEPT_TYPES', '')) + if MDNS_ACCEPT_TYPES: + dbg('ONLY resolving the following types via Avahi: %s' % MDNS_ACCEPT_TYPES) + + v = os.environ.get('MDNS_REJECT_NAMES', None) + MDNS_REJECT_NAMES = re.compile(v, flags=re.I | re.S) if v is not None else None + if MDNS_REJECT_NAMES is not None: + dbg('Names NOT resolved via Avahi: %s' % MDNS_REJECT_NAMES.pattern) + + v = os.environ.get('MDNS_ACCEPT_NAMES', None) + MDNS_ACCEPT_NAMES = re.compile(v, flags=re.I | re.S) if v is not None else None + if MDNS_ACCEPT_NAMES is not None: + dbg('ONLY resolving the following names via Avahi: %s' % MDNS_ACCEPT_NAMES.pattern) + + v = os.environ.get('MDNS_TIMEOUT', None) + MDNS_TIMEOUT = int(v) if v is not None else None + if MDNS_TIMEOUT is not None: + dbg('Avahi request timeout: %s' % MDNS_TIMEOUT) + + MDNS_GETONE = str2bool(os.environ.get('MDNS_GETONE', str(True))) + dbg('Terminate Avahi requests on first record: %s' % MDNS_GETONE) + + dbus_thread = threading.Thread(target=dbus_main) + dbus_thread.daemon = True + dbus_thread.start() + + +def deinit(*args, **kwargs): + dbus_loop.quit() + dbus_thread.join() + return True + + +def inform_super(id, qstate, superqstate, qdata): + return True + + +def get_rcode(msg): + if not msg: + return RCODE_SERVFAIL + + return msg.rep.flags & 0xf + + +def rr2text(rec, ttl): + name, class_, type_, rdata = rec + wire = array.array('B', rdata).tostring() + return '%s. %d %s %s %s' % ( + name, + ttl, + dns.rdataclass.to_text(class_), + dns.rdatatype.to_text(type_), + dns.rdata.from_wire(class_, type_, wire, 0, len(wire), None)) + + +def operate(id, event, qstate, qdata): + qi = qstate.qinfo + name = qi.qname_str + type_ = qi.qtype + type_str = dns.rdatatype.to_text(type_) + class_ = qi.qclass + class_str = dns.rdataclass.to_text(class_) + rc = get_rcode(qstate.return_msg) + + if event == MODULE_EVENT_NEW or event == MODULE_EVENT_PASS: + qstate.ext_state[id] = MODULE_WAIT_MODULE + return True + + if event != MODULE_EVENT_MODDONE: + log_err("avahi-resolver: Unexpected event %d" % event) + qstate.ext_state[id] = MODULE_ERROR + return True + + qstate.ext_state[id] = MODULE_FINISHED + + # Only resolve via Avahi if we got NXDOMAIn from the upstream DNS + # server, or if we could not reach the upstream DNS server. If we + # got some records for the name from the upstream DNS server + # already, do not resolve the record in Avahi. + if rc != RCODE_NXDOMAIN and rc != RCODE_SERVFAIL: + return True + + dbg("Got request for '%s %s %s'" % (name, class_str, type_str)) + + # Avahi only supports the IN class + if class_ != RR_CLASS_IN: + dbg('Rejected, Avahi only supports the IN class') + return True + + # Avahi does not support meta queries (e.g., ANY) + if dns.rdatatype.is_metatype(type_): + dbg('Rejected, Avahi does not support the type %s' % type_str) + return True + + # If we have a type blacklist and the requested type is on the + # list, reject it. + if MDNS_REJECT_TYPES and type_ in MDNS_REJECT_TYPES: + dbg('Rejected, type %s is on the blacklist' % type_str) + return True + + # If we have a type whitelist and if the requested type is not on + # the list, reject it. + if MDNS_ACCEPT_TYPES and type_ not in MDNS_ACCEPT_TYPES: + dbg('Rejected, type %s is not on the whitelist' % type_str) + return True + + # If we have a name blacklist and if the requested name matches + # the blacklist, reject it. + if MDNS_REJECT_NAMES is not None: + if MDNS_REJECT_NAMES.search(name): + dbg('Rejected, name %s is on the blacklist' % name) + return True + + # If we have a name whitelist and if the requested name does not + # match the whitelist, reject it. + if MDNS_ACCEPT_NAMES is not None: + if not MDNS_ACCEPT_NAMES.search(name): + dbg('Rejected, name %s is not on the whitelist' % name) + return True + + dbg("Resolving '%s %s %s' via Avahi" % (name, class_str, type_str)) + + recs = resolve(name, type_, getone=MDNS_GETONE, timeout=MDNS_TIMEOUT) + + if not recs: + dbg('Result: Not found (NXDOMAIN)') + qstate.return_rcode = RCODE_NXDOMAIN + return True + + m = DNSMessage(name, type_, class_, PKT_QR | PKT_RD | PKT_RA) + for r in recs: + s = rr2text(r, MDNS_TTL) + dbg('Result: %s' % s) + m.answer.append(s) + + if not m.set_return_msg(qstate): + raise Exception("Error in set_return_msg") + + if not storeQueryInCache(qstate, qstate.return_msg.qinfo, qstate.return_msg.rep, 0): + raise Exception("Error in storeQueryInCache") + + qstate.return_msg.rep.security = 2 + qstate.return_rcode = RCODE_NOERROR + return True + + +# +# It does not appear to be sufficient to check __name__ to determine +# whether we are being run in interactive mode. As a workaround, try +# to import module unboundmodule and if that fails, assume we're being +# run in interactive mode. +# +try: + import unboundmodule + embedded = True +except ImportError: + embedded = False + +if __name__ == '__main__' and not embedded: + import sys + + def log_info(msg): + print(msg) + + def log_err(msg): + print('ERROR: %s' % msg, file=sys.stderr) + + if len(sys.argv) != 3: + print('Usage: %s ' % sys.argv[0]) + sys.exit(2) + + name = sys.argv[1] + type_str = sys.argv[2] + + try: + type_ = dns.rdatatype.from_text(type_str) + except dns.rdatatype.UnknownRdatatype: + log_err('Unsupported DNS record type "%s"' % type_str) + sys.exit(2) + + if dns.rdatatype.is_metatype(type_): + log_err('Meta record type "%s" cannot be resolved via Avahi' % type_str) + sys.exit(2) + + init() + try: + recs = resolve(name, type_, getone=MDNS_GETONE, timeout=MDNS_TIMEOUT) + if not len(recs): + print('%s not found (NXDOMAIN)' % name) + sys.exit(1) + + for r in recs: + print(rr2text(r, MDNS_TTL)) + finally: + deinit() diff --git a/pythonmod/examples/calc.py b/pythonmod/examples/calc.py index 3230e37e3eea685b998ccde621682362252287f0..8c15f50b9d75c38317bc8ee8cbf47fddebc08e1a 100644 --- a/pythonmod/examples/calc.py +++ b/pythonmod/examples/calc.py @@ -45,9 +45,13 @@ def operate(id, event, qstate, qdata): if (event == MODULE_EVENT_NEW) or (event == MODULE_EVENT_PASS): - if qstate.qinfo.qname_str.endswith("._calc_.cz."): + if qstate.qinfo.qname_str.endswith("._calc_.cz.") and not ("__" in qstate.qinfo.qname_str): try: - res = eval(''.join(qstate.qinfo.qname_list[0:-3])) + # the second and third argument to eval attempt to restrict + # functions and variables available to stop code execution + # but it may not be safe either. This is why __ substrings + # are excluded from evaluation. + res = eval(''.join(qstate.qinfo.qname_list[0:-3]),{"__builtins__":None},{}) except: res = "exception" diff --git a/pythonmod/examples/edns.py b/pythonmod/examples/edns.py index 37ce9e27923d62fa6163a8019b3dfb4116a19619..ca1bb8da710d6bab3c306eae55e51bf326fcb499 100644 --- a/pythonmod/examples/edns.py +++ b/pythonmod/examples/edns.py @@ -78,7 +78,7 @@ def init_standard(id, env): extra functionality during init. ..note:: This function is preferred by unbound over the old init function. ..note:: The previously accessible configuration options can now be found in - env.cgf. + env.cfg. """ log_info("python: inited script {}".format(env.cfg.python_script)) diff --git a/pythonmod/examples/inplace_callbacks.py b/pythonmod/examples/inplace_callbacks.py index 776add8c29adf84b7f71734b4d6c22447a3a8c61..768c2d0138c543a9bcb47b196ddb01db1f606938 100644 --- a/pythonmod/examples/inplace_callbacks.py +++ b/pythonmod/examples/inplace_callbacks.py @@ -275,7 +275,7 @@ def init_standard(id, env): ..note:: This function is preferred by unbound over the old init function. ..note:: The previously accessible configuration options can now be found in - env.cgf. + env.cfg. """ log_info("python: inited script {}".format(env.cfg.python_script)) diff --git a/pythonmod/interface.i b/pythonmod/interface.i index 5f2559bacffa80e3c78033fac5cbef696a56326a..c02ebaf951d0b131ca82b24da9b2cac17117002e 100644 --- a/pythonmod/interface.i +++ b/pythonmod/interface.i @@ -1,19 +1,40 @@ /* * interface.i: unbound python module */ +%begin %{ +/* store state of warning output, restored at later pop */ +#pragma GCC diagnostic push +/* ignore warnings for pragma below, where for older GCC it can produce a + warning if the cast-function-type warning is absent. */ +#pragma GCC diagnostic ignored "-Wpragmas" +/* ignore gcc8 METH_NOARGS function cast warnings for swig function pointers */ +#pragma GCC diagnostic ignored "-Wcast-function-type" +%} %module unboundmodule %{ +/* restore state of warning output, remove the functioncast ignore */ +#pragma GCC diagnostic pop /** * \file * This is the interface between the unbound server and a python module * called to perform operations on queries. */ #include + #ifdef HAVE_SYS_SOCKET_H #include + #endif + #ifdef HAVE_NETINET_IN_H #include + #endif + #ifdef HAVE_ARPA_INET_H #include + #endif + #ifdef HAVE_NETDB_H #include + #endif + #ifdef HAVE_SYS_UN_H #include + #endif #include #include "config.h" #include "util/log.h" @@ -178,22 +199,17 @@ struct query_info { %extend query_info { %pythoncode %{ def _get_qtype_str(self): return sldns_wire2str_type(self.qtype) - __swig_getmethods__["qtype_str"] = _get_qtype_str - if _newclass:qtype_str = _swig_property(_get_qtype_str) + qtype_str = property(_get_qtype_str) def _get_qclass_str(self): return sldns_wire2str_class(self.qclass) - __swig_getmethods__["qclass_str"] = _get_qclass_str - if _newclass:qclass_str = _swig_property(_get_qclass_str) + qclass_str = property(_get_qclass_str) - __swig_getmethods__["qname"] = _unboundmodule._get_qname - if _newclass:qname = _swig_property(_unboundmodule._get_qname) + qname = property(_unboundmodule._get_qname) - __swig_getmethods__["qname_list"] = _unboundmodule._get_qname_components - if _newclass:qname_list = _swig_property(_unboundmodule._get_qname_components) + qname_list = property(_unboundmodule._get_qname_components) def _get_qname_str(self): return dnameAsStr(self.qname) - __swig_getmethods__["qname_str"] = _get_qname_str - if _newclass:qname_str = _swig_property(_get_qname_str) + qname_str = property(_get_qname_str) %} } @@ -233,22 +249,17 @@ uint16_t ntohs(uint16_t netshort); %extend packed_rrset_key { %pythoncode %{ def _get_type_str(self): return sldns_wire2str_type(_unboundmodule.ntohs(self.type)) - __swig_getmethods__["type_str"] = _get_type_str - if _newclass:type_str = _swig_property(_get_type_str) + type_str = property(_get_type_str) def _get_class_str(self): return sldns_wire2str_class(_unboundmodule.ntohs(self.rrset_class)) - __swig_getmethods__["rrset_class_str"] = _get_class_str - if _newclass:rrset_class_str = _swig_property(_get_class_str) + rrset_class_str = property(_get_class_str) - __swig_getmethods__["dname"] = _unboundmodule._get_dname - if _newclass:dname = _swig_property(_unboundmodule._get_dname) + dname = property(_unboundmodule._get_dname) - __swig_getmethods__["dname_list"] = _unboundmodule._get_dname_components - if _newclass:dname_list = _swig_property(_unboundmodule._get_dname_components) + dname_list = property(_unboundmodule._get_dname_components) def _get_dname_str(self): return dnameAsStr(self.dname) - __swig_getmethods__["dname_str"] = _get_dname_str - if _newclass:dname_str = _swig_property(_get_dname_str) + dname_str = property(_get_dname_str) %} } @@ -346,14 +357,11 @@ struct packed_rrset_data { %extend packed_rrset_data { %pythoncode %{ def _get_data_rr_len(self): return RRSetData_RRLen(self) - __swig_getmethods__["rr_len"] = _get_data_rr_len - if _newclass:rr_len = _swig_property(_get_data_rr_len) + rr_len = property(_get_data_rr_len) def _get_data_rr_ttl(self): return RRSetData_RRTTL(self) - __swig_getmethods__["rr_ttl"] =_get_data_rr_ttl - if _newclass:rr_len = _swig_property(_get_data_rr_ttl) + rr_ttl = property(_get_data_rr_ttl) def _get_data_rr_data(self): return RRSetData_RRData(self) - __swig_getmethods__["rr_data"] = _get_data_rr_data - if _newclass:rr_len = _swig_property(_get_data_rr_data) + rr_data = property(_get_data_rr_data) %} } @@ -425,12 +433,10 @@ struct dns_msg { %extend reply_info { %pythoncode %{ def _rrset_ref_get(self): return ReplyInfo_Ref(self) - __swig_getmethods__["ref"] = _rrset_ref_get - if _newclass:ref = _swig_property(_rrset_ref_get) + ref = property(_rrset_ref_get) def _rrset_rrsets_get(self): return ReplyInfo_RRSet(self) - __swig_getmethods__["rrsets"] = _rrset_rrsets_get - if _newclass:rrsets = _swig_property(_rrset_rrsets_get) + rrsets = property(_rrset_rrsets_get) %} } @@ -449,7 +455,9 @@ struct sockaddr_storage {}; switch (ss->ss_family) { case AF_INET: return sizeof(struct sockaddr_in); case AF_INET6: return sizeof(struct sockaddr_in6); +#ifdef HAVE_SYS_UN_H case AF_UNIX: return sizeof(struct sockaddr_un); +#endif default: return 0; } @@ -515,10 +523,12 @@ struct sockaddr_storage {}; return PyBytes_FromStringAndSize((const char *)raw, sizeof(*raw)); } +#ifdef HAVE_SYS_UN_H if (ss->ss_family == AF_UNIX) { const struct sockaddr_un *sa = (struct sockaddr_un *)ss; return PyBytes_FromString(sa->sun_path); } +#endif return Py_None; } @@ -567,28 +577,22 @@ struct sockaddr_storage {}; %extend sockaddr_storage { %pythoncode %{ def _family_get(self): return _sockaddr_storage_family(self) - __swig_getmethods__["family"] = _family_get - if _newclass: family = _swig_property(_family_get) + family = property(_family_get) def _addr_get(self): return _sockaddr_storage_addr(self) - __swig_getmethods__["addr"] = _addr_get - if _newclass: addr = _swig_property(_addr_get) + addr = property(_addr_get) def _raw_addr_get(self): return _sockaddr_storage_raw_addr(self) - __swig_getmethods__["raw_addr"] = _raw_addr_get - if _newclass: raw_addr = _swig_property(_raw_addr_get) + raw_addr = property(_raw_addr_get) def _port_get(self): return _sockaddr_storage_port(self) - __swig_getmethods__["port"] = _port_get - if _newclass: port = _swig_property(_port_get) + port = property(_port_get) def _flowinfo_get(self): return _sockaddr_storage_flowinfo(self) - __swig_getmethods__["flowinfo"] = _flowinfo_get - if _newclass: flowinfo = _swig_property(_flowinfo_get) + flowinfo = property(_flowinfo_get) def _scope_id_get(self): return _sockaddr_storage_scope_id(self) - __swig_getmethods__["scope_id"] = _scope_id_get - if _newclass: scope_id = _swig_property(_scope_id_get) + scope_id = property(_scope_id_get) %} } @@ -612,16 +616,13 @@ struct comm_reply { %extend comm_reply { %pythoncode %{ def _addr_get(self): return _sockaddr_storage_addr(self._addr) - __swig_getmethods__["addr"] = _addr_get - if _newclass:addr = _swig_property(_addr_get) + addr = property(_addr_get) def _port_get(self): return _sockaddr_storage_port(self._addr) - __swig_getmethods__["port"] = _port_get - if _newclass:port = _swig_property(_port_get) + port = property(_port_get) def _family_get(self): return _sockaddr_storage_family(self._addr) - __swig_getmethods__["family"] = _family_get - if _newclass:family = _swig_property(_family_get) + family = property(_family_get) %} } @@ -656,12 +657,10 @@ struct edns_option { %extend edns_option { %pythoncode %{ def _opt_code_get(self): return _edns_option_opt_code_get(self) - __swig_getmethods__["code"] = _opt_code_get - if _newclass: opt_code = _swig_property(_opt_code_get) + code = property(_opt_code_get) def _opt_data_get(self): return _edns_option_opt_data_get(self) - __swig_getmethods__["data"] = _opt_data_get - if _newclass: opt_data = _swig_property(_opt_data_get) + data = property(_opt_data_get) %} } @@ -688,11 +687,9 @@ struct edns_data { %extend edns_data { %pythoncode %{ def _opt_list_iter(self): return EdnsOptsListIter(self.opt_list) - __swig_getmethods__["opt_list_iter"] = _opt_list_iter - if _newclass:opt_list_iter = _swig_property(_opt_list_iter) + opt_list_iter = property(_opt_list_iter) def _opt_list(self): return _edns_data_opt_list_get(self) - __swig_getmethods__["opt_list"] = _opt_list - if _newclass:opt_list = _swig_property(_opt_list) + opt_list = property(_opt_list) %} } @@ -893,34 +890,25 @@ struct module_qstate { _unboundmodule._ext_state_set(self, id, state) def __ext_state_get(self): return ExtState(self) - __swig_getmethods__["ext_state"] = __ext_state_get - if _newclass:ext_state = _swig_property(__ext_state_get)#, __ext_state_set) + ext_state = property(__ext_state_get) #, __ext_state_set def _edns_opts_front_in_iter(self): return EdnsOptsListIter(self.edns_opts_front_in) - __swig_getmethods__["edns_opts_front_in_iter"] = _edns_opts_front_in_iter - if _newclass:edns_opts_front_in_iter = _swig_property(_edns_opts_front_in_iter) + edns_opts_front_in_iter = property(_edns_opts_front_in_iter) def _edns_opts_back_out_iter(self): return EdnsOptsListIter(self.edns_opts_back_out) - __swig_getmethods__["edns_opts_back_out_iter"] = _edns_opts_back_out_iter - if _newclass:edns_opts_back_out_iter = _swig_property(_edns_opts_back_out_iter) + edns_opts_back_out_iter = property(_edns_opts_back_out_iter) def _edns_opts_back_in_iter(self): return EdnsOptsListIter(self.edns_opts_back_in) - __swig_getmethods__["edns_opts_back_in_iter"] = _edns_opts_back_in_iter - if _newclass:edns_opts_back_in_iter = _swig_property(_edns_opts_back_in_iter) + edns_opts_back_in_iter = property(_edns_opts_back_in_iter) def _edns_opts_front_out_iter(self): return EdnsOptsListIter(self.edns_opts_front_out) - __swig_getmethods__["edns_opts_front_out_iter"] = _edns_opts_front_out_iter - if _newclass:edns_opts_front_out_iter = _swig_property(_edns_opts_front_out_iter) + edns_opts_front_out_iter = property(_edns_opts_front_out_iter) def _edns_opts_front_in(self): return _edns_opts_front_in_get(self) - __swig_getmethods__["edns_opts_front_in"] = _edns_opts_front_in - if _newclass:edns_opts_front_in = _swig_property(_edns_opts_front_in) + edns_opts_front_in = property(_edns_opts_front_in) def _edns_opts_back_out(self): return _edns_opts_back_out_get(self) - __swig_getmethods__["edns_opts_back_out"] = _edns_opts_back_out - if _newclass:edns_opts_back_out = _swig_property(_edns_opts_back_out) + edns_opts_back_out = property(_edns_opts_back_out) def _edns_opts_back_in(self): return _edns_opts_back_in_get(self) - __swig_getmethods__["edns_opts_back_in"] = _edns_opts_back_in - if _newclass:edns_opts_back_in = _swig_property(_edns_opts_back_in) + edns_opts_back_in = property(_edns_opts_back_in) def _edns_opts_front_out(self): return _edns_opts_front_out_get(self) - __swig_getmethods__["edns_opts_front_out"] = _edns_opts_front_out - if _newclass:edns_opts_front_out = _swig_property(_edns_opts_front_out) + edns_opts_front_out = property(_edns_opts_front_out) %} } @@ -1026,7 +1014,7 @@ struct config_file { char* control_key_file; char* control_cert_file; int do_daemonize; - char* python_script; + struct config_strlist* python_script; }; /* ************************************************************************************ * @@ -1090,35 +1078,28 @@ struct delegpt { %extend delegpt { %pythoncode %{ - __swig_getmethods__["dname"] = _unboundmodule._get_dp_dname - if _newclass:dname = _swig_property(_unboundmodule._get_dp_dname) + dname = property(_unboundmodule._get_dp_dname) - __swig_getmethods__["dname_list"] = _unboundmodule._get_dp_dname_components - if _newclass:dname_list = _swig_property(_unboundmodule._get_dp_dname_components) + dname_list = property(_unboundmodule._get_dp_dname_components) def _get_dname_str(self): return dnameAsStr(self.dname) - __swig_getmethods__["dname_str"] = _get_dname_str - if _newclass:dname_str = _swig_property(_get_dname_str) + dname_str = property(_get_dname_str) %} } %extend delegpt_ns { %pythoncode %{ - __swig_getmethods__["dname"] = _unboundmodule._get_dpns_dname - if _newclass:dname = _swig_property(_unboundmodule._get_dpns_dname) + dname = property(_unboundmodule._get_dpns_dname) - __swig_getmethods__["dname_list"] = _unboundmodule._get_dpns_dname_components - if _newclass:dname_list = _swig_property(_unboundmodule._get_dpns_dname_components) + dname_list = property(_unboundmodule._get_dpns_dname_components) def _get_dname_str(self): return dnameAsStr(self.dname) - __swig_getmethods__["dname_str"] = _get_dname_str - if _newclass:dname_str = _swig_property(_get_dname_str) + dname_str = property(_get_dname_str) %} } %extend delegpt_addr { %pythoncode %{ def _addr_get(self): return _delegpt_addr_addr_get(self) - __swig_getmethods__["addr"] = _addr_get - if _newclass:addr = _swig_property(_addr_get) + addr = property(_addr_get) %} } @@ -1128,6 +1109,7 @@ struct delegpt { %rename ("MODULE_STATE_INITIAL") "module_state_initial"; %rename ("MODULE_WAIT_REPLY") "module_wait_reply"; %rename ("MODULE_WAIT_MODULE") "module_wait_module"; +%rename ("MODULE_RESTART_NEXT") "module_restart_next"; %rename ("MODULE_WAIT_SUBQUERY") "module_wait_subquery"; %rename ("MODULE_ERROR") "module_error"; %rename ("MODULE_FINISHED") "module_finished"; @@ -1136,6 +1118,7 @@ enum module_ext_state { module_state_initial = 0, module_wait_reply, module_wait_module, + module_restart_next, module_wait_subquery, module_error, module_finished diff --git a/pythonmod/pythonmod.c b/pythonmod/pythonmod.c index a668ecc23cc70da904078e116dc6198315f3e3fb..9006429efff5290529d5dc155a088aed01bdb192 100644 --- a/pythonmod/pythonmod.c +++ b/pythonmod/pythonmod.c @@ -64,6 +64,15 @@ typedef struct PyThreadState PyThreadState; typedef void* PyGILState_STATE; #endif +/** + * counter for python module instances + * incremented by pythonmod_init(...) + */ +int py_mod_count = 0; + +/** Python main thread */ +PyThreadState* mainthr; + /** * Global state for the module. */ @@ -72,8 +81,6 @@ struct pythonmod_env { /** Python script filename. */ const char* fname; - /** Python main thread */ - PyThreadState* mainthr; /** Python module. */ PyObject* module; @@ -242,11 +249,17 @@ cleanup: int pythonmod_init(struct module_env* env, int id) { + int py_mod_idx = py_mod_count++; + /* Initialize module */ FILE* script_py = NULL; PyObject* py_init_arg, *res; PyGILState_STATE gil; - int init_standard = 1; + int init_standard = 1, i = 0; +#if PY_MAJOR_VERSION < 3 + PyObject* PyFileObject = NULL; +#endif + struct config_strlist* cfg_item = env->cfg->python_script; struct pythonmod_env* pe = (struct pythonmod_env*)calloc(1, sizeof(struct pythonmod_env)); if (!pe) @@ -258,14 +271,21 @@ int pythonmod_init(struct module_env* env, int id) env->modinfo[id] = (void*) pe; /* Initialize module */ - pe->fname = env->cfg->python_script; + pe->fname=NULL; i = 0; + while (cfg_item!=NULL) { + if (py_mod_idx==i++) { + pe->fname=cfg_item->str; + break; + } + cfg_item = cfg_item->next; + } if(pe->fname==NULL || pe->fname[0]==0) { - log_err("pythonmod: no script given."); + log_err("pythonmod[%d]: no script given.", py_mod_idx); return 0; } /* Initialize Python libraries */ - if (!Py_IsInitialized()) + if (py_mod_count==1 && !Py_IsInitialized()) { #if PY_MAJOR_VERSION >= 3 wchar_t progname[8]; @@ -281,33 +301,43 @@ int pythonmod_init(struct module_env* env, int id) Py_Initialize(); PyEval_InitThreads(); SWIG_init(); - pe->mainthr = PyEval_SaveThread(); + mainthr = PyEval_SaveThread(); } gil = PyGILState_Ensure(); - /* Initialize Python */ - PyRun_SimpleString("import sys \n"); - PyRun_SimpleString("sys.path.append('.') \n"); - if(env->cfg->directory && env->cfg->directory[0]) { - char wdir[1524]; - snprintf(wdir, sizeof(wdir), "sys.path.append('%s') \n", - env->cfg->directory); - PyRun_SimpleString(wdir); - } - PyRun_SimpleString("sys.path.append('"RUN_DIR"') \n"); - PyRun_SimpleString("sys.path.append('"SHARE_DIR"') \n"); - PyRun_SimpleString("import distutils.sysconfig \n"); - PyRun_SimpleString("sys.path.append(distutils.sysconfig.get_python_lib(1,0)) \n"); - if (PyRun_SimpleString("from unboundmodule import *\n") < 0) - { - log_err("pythonmod: cannot initialize core module: unboundmodule.py"); - PyGILState_Release(gil); - return 0; + if (py_mod_count==1) { + /* Initialize Python */ + PyRun_SimpleString("import sys \n"); + PyRun_SimpleString("sys.path.append('.') \n"); + if(env->cfg->directory && env->cfg->directory[0]) { + char wdir[1524]; + snprintf(wdir, sizeof(wdir), "sys.path.append('%s') \n", + env->cfg->directory); + PyRun_SimpleString(wdir); + } + PyRun_SimpleString("sys.path.append('"RUN_DIR"') \n"); + PyRun_SimpleString("sys.path.append('"SHARE_DIR"') \n"); + PyRun_SimpleString("import distutils.sysconfig \n"); + PyRun_SimpleString("sys.path.append(distutils.sysconfig.get_python_lib(1,0)) \n"); + if (PyRun_SimpleString("from unboundmodule import *\n") < 0) + { + log_err("pythonmod: cannot initialize core module: unboundmodule.py"); + PyGILState_Release(gil); + return 0; + } } /* Check Python file load */ - if ((script_py = fopen(pe->fname, "r")) == NULL) + /* uses python to open the file, this works on other platforms, + * eg. Windows, to open the file in the correct mode for python */ +#if PY_MAJOR_VERSION < 3 + PyFileObject = PyFile_FromString((char*)pe->fname, "r"); + script_py = PyFile_AsFile(PyFileObject); +#else + script_py = _Py_fopen(pe->fname, "r"); +#endif + if (script_py == NULL) { log_err("pythonmod: can't open file %s for reading", pe->fname); PyGILState_Release(gil); @@ -317,8 +347,8 @@ int pythonmod_init(struct module_env* env, int id) /* Load file */ pe->module = PyImport_AddModule("__main__"); pe->dict = PyModule_GetDict(pe->module); - pe->data = Py_None; - Py_INCREF(pe->data); + pe->data = PyDict_New(); + Py_XINCREF(pe->data); PyModule_AddObject(pe->module, "mod_env", pe->data); /* TODO: deallocation of pe->... if an error occurs */ @@ -341,9 +371,14 @@ int pythonmod_init(struct module_env* env, int id) (void)PyParser_SimpleParseFile(script_py, pe->fname, Py_file_input); log_py_err(); PyGILState_Release(gil); + fclose(script_py); return 0; } +#if PY_MAJOR_VERSION < 3 + Py_XDECREF(PyFileObject); +#else fclose(script_py); +#endif if ((pe->func_init = PyDict_GetItemString(pe->dict, "init_standard")) == NULL) { @@ -425,9 +460,11 @@ void pythonmod_deinit(struct module_env* env, int id) Py_XDECREF(pe->data); PyGILState_Release(gil); - PyEval_RestoreThread(pe->mainthr); - Py_Finalize(); - pe->mainthr = NULL; + if(--py_mod_count==0) { + PyEval_RestoreThread(mainthr); + Py_Finalize(); + mainthr = NULL; + } } pe->fname = NULL; free(pe); @@ -485,8 +522,7 @@ void pythonmod_operate(struct module_qstate* qstate, enum module_ev event, pq = qstate->minfo[id] = malloc(sizeof(struct pythonmod_qstate)); /* Initialize per query data */ - pq->data = Py_None; - Py_INCREF(pq->data); + pq->data = PyDict_New(); } /* Call operate */ @@ -517,8 +553,7 @@ void pythonmod_clear(struct module_qstate* qstate, int id) return; pq = (struct pythonmod_qstate*)qstate->minfo[id]; - verbose(VERB_ALGO, "pythonmod: clear, id: %d, pq:%lX", id, - (unsigned long int)pq); + verbose(VERB_ALGO, "pythonmod: clear, id: %d, pq:%p", id, pq); if(pq != NULL) { PyGILState_STATE gil = PyGILState_Ensure(); @@ -534,8 +569,7 @@ void pythonmod_clear(struct module_qstate* qstate, int id) size_t pythonmod_get_mem(struct module_env* env, int id) { struct pythonmod_env* pe = (struct pythonmod_env*)env->modinfo[id]; - verbose(VERB_ALGO, "pythonmod: get_mem, id: %d, pe:%lX", id, - (unsigned long int)pe); + verbose(VERB_ALGO, "pythonmod: get_mem, id: %d, pe:%p", id, pe); if(!pe) return 0; return sizeof(*pe); diff --git a/respip/respip.c b/respip/respip.c index bcb31f89224dd0bef4cf8539569bb9fac6dcb7c5..632a9df64756fd42a3b03d094f8439ebe7cc7861 100644 --- a/respip/respip.c +++ b/respip/respip.c @@ -183,6 +183,8 @@ respip_action_cfg(struct respip_set* set, const char* ipstr, action = respip_inform; else if(strcmp(actnstr, "inform_deny") == 0) action = respip_inform_deny; + else if(strcmp(actnstr, "inform_redirect") == 0) + action = respip_inform_redirect; else if(strcmp(actnstr, "always_transparent") == 0) action = respip_always_transparent; else if(strcmp(actnstr, "always_refuse") == 0) @@ -245,7 +247,8 @@ respip_enter_rr(struct regional* region, struct resp_addr* raddr, struct packed_rrset_data* pd; struct sockaddr* sa; int ret; - if(raddr->action != respip_redirect) { + if(raddr->action != respip_redirect + && raddr->action != respip_inform_redirect) { log_err("cannot parse response-ip-data %s: response-ip " "action for %s is not redirect", rrstr, netblock); return 0; @@ -358,6 +361,7 @@ respip_set_apply_cfg(struct respip_set* set, char* const* tagname, int num_tags, free(pd); pd = np; } + addr_tree_init_parents(&set->ip_tree); return 1; } @@ -475,10 +479,16 @@ copy_rrset(const struct ub_packed_rrset_key* key, struct regional* region) if(!ck->rk.dname) return NULL; + if((unsigned)data->count >= 0xffff00U) + return NULL; /* guard against integer overflow in dsize */ dsize = sizeof(struct packed_rrset_data) + data->count * (sizeof(size_t)+sizeof(uint8_t*)+sizeof(time_t)); - for(i=0; icount; i++) + for(i=0; icount; i++) { + if((unsigned)dsize >= 0x0fffffffU || + (unsigned)data->rr_len[i] >= 0x0fffffffU) + return NULL; /* guard against integer overflow */ dsize += data->rr_len[i]; + } d = regional_alloc(region, dsize); if(!d) return NULL; @@ -750,7 +760,8 @@ respip_nodata_answer(uint16_t qtype, enum respip_action action, *new_repp = new_rep; return 1; } else if(action == respip_static || action == respip_redirect || - action == respip_always_nxdomain) { + action == respip_always_nxdomain || + action == respip_inform_redirect) { /* Since we don't know about other types of the owner name, * we generally return NOERROR/NODATA unless an NXDOMAIN action * is explicitly specified. */ @@ -1177,5 +1188,5 @@ respip_inform_print(struct respip_addr_info* respip_addr, uint8_t* qname, respip, sizeof(respip)); snprintf(txt, sizeof(txt), "%s/%d inform %s@%u", respip, respip_addr->net, srcip, port); - log_nametypeclass(0, txt, qname, qtype, qclass); + log_nametypeclass(NO_VERBOSE, txt, qname, qtype, qclass); } diff --git a/services/authzone.c b/services/authzone.c index a87c2274fb9eccacade2c42c3019f142b866e390..7d806d9d59d06d9400c8b901669f7b040dbd1864 100644 --- a/services/authzone.c +++ b/services/authzone.c @@ -1636,7 +1636,7 @@ auth_rr_to_string(uint8_t* nm, size_t nmlen, uint16_t tp, uint16_t cl, if(i >= data->count) tp = LDNS_RR_TYPE_RRSIG; dat = nm; datlen = nmlen; - w += sldns_wire2str_dname_scan(&dat, &datlen, &s, &slen, NULL, 0); + w += sldns_wire2str_dname_scan(&dat, &datlen, &s, &slen, NULL, 0, NULL); w += sldns_str_print(&s, &slen, "\t"); w += sldns_str_print(&s, &slen, "%lu\t", (unsigned long)data->rr_ttl[i]); w += sldns_wire2str_class_print(&s, &slen, cl); @@ -1645,7 +1645,7 @@ auth_rr_to_string(uint8_t* nm, size_t nmlen, uint16_t tp, uint16_t cl, w += sldns_str_print(&s, &slen, "\t"); datlen = data->rr_len[i]-2; dat = data->rr_data[i]+2; - w += sldns_wire2str_rdata_scan(&dat, &datlen, &s, &slen, tp, NULL, 0); + w += sldns_wire2str_rdata_scan(&dat, &datlen, &s, &slen, tp, NULL, 0, NULL); if(tp == LDNS_RR_TYPE_DNSKEY) { w += sldns_str_print(&s, &slen, " ;{id = %u}", @@ -1654,8 +1654,8 @@ auth_rr_to_string(uint8_t* nm, size_t nmlen, uint16_t tp, uint16_t cl, } w += sldns_str_print(&s, &slen, "\n"); - if(w > (int)buflen) { - log_nametypeclass(0, "RR too long to print", nm, tp, cl); + if(w >= (int)buflen) { + log_nametypeclass(NO_VERBOSE, "RR too long to print", nm, tp, cl); return 0; } return 1; @@ -2042,11 +2042,13 @@ auth_xfer_delete(struct auth_xfer* xfr) if(xfr->task_probe) { auth_free_masters(xfr->task_probe->masters); comm_point_delete(xfr->task_probe->cp); + comm_timer_delete(xfr->task_probe->timer); free(xfr->task_probe); } if(xfr->task_transfer) { auth_free_masters(xfr->task_transfer->masters); comm_point_delete(xfr->task_transfer->cp); + comm_timer_delete(xfr->task_transfer->timer); if(xfr->task_transfer->chunks_first) { auth_chunks_delete(xfr->task_transfer); } @@ -2378,6 +2380,10 @@ create_synth_cname(uint8_t* qname, size_t qname_len, struct regional* region, return 0; /* rdatalen in DNAME rdata is malformed */ if(dname_valid(dtarg, dtarglen) != dtarglen) return 0; /* DNAME RR has malformed rdata */ + if(qname_len == 0) + return 0; /* too short */ + if(qname_len <= node->namelen) + return 0; /* qname too short for dname removal */ /* synthesize a CNAME */ newlen = synth_cname_buf(qname, qname_len, node->namelen, @@ -2746,6 +2752,7 @@ az_nsec3_insert(struct auth_zone* z, struct regional* region, * that is an exact match that should exist for it. * If that does not exist, a higher exact match + nxproof is enabled * (for some sort of opt-out empty nonterminal cases). + * nodataproof: search for exact match and include that instead. * ceproof: include ce proof NSEC3 (omitted for wildcard replies). * nxproof: include denial of the qname. * wcproof: include denial of wildcard (wildcard.ce). @@ -2753,7 +2760,8 @@ az_nsec3_insert(struct auth_zone* z, struct regional* region, static int az_add_nsec3_proof(struct auth_zone* z, struct regional* region, struct dns_msg* msg, uint8_t* cenm, size_t cenmlen, uint8_t* qname, - size_t qname_len, int ceproof, int nxproof, int wcproof) + size_t qname_len, int nodataproof, int ceproof, int nxproof, + int wcproof) { int algo; size_t iter, saltlen; @@ -2764,6 +2772,19 @@ az_add_nsec3_proof(struct auth_zone* z, struct regional* region, /* find parameters of nsec3 proof */ if(!az_nsec3_param(z, &algo, &iter, &salt, &saltlen)) return 1; /* no nsec3 */ + if(nodataproof) { + /* see if the node has a hash of itself for the nodata + * proof nsec3, this has to be an exact match nsec3. */ + struct auth_data* match; + match = az_nsec3_find_exact(z, qname, qname_len, algo, + iter, salt, saltlen); + if(match) { + if(!az_nsec3_insert(z, region, msg, match)) + return 0; + /* only nodata NSEC3 needed, no CE or others. */ + return 1; + } + } /* find ce that has an NSEC3 */ if(ceproof) { node = az_nsec3_find_ce(z, &cenm, &cenmlen, &no_exact_ce, @@ -2916,7 +2937,7 @@ az_generate_notype_answer(struct auth_zone* z, struct regional* region, /* DNSSEC denial NSEC3 */ if(!az_add_nsec3_proof(z, region, msg, node->name, node->namelen, msg->qinfo.qname, - msg->qinfo.qname_len, 1, 0, 0)) + msg->qinfo.qname_len, 1, 1, 0, 0)) return 0; } return 1; @@ -2943,7 +2964,7 @@ az_generate_referral_answer(struct auth_zone* z, struct regional* region, } else { if(!az_add_nsec3_proof(z, region, msg, ce->name, ce->namelen, msg->qinfo.qname, - msg->qinfo.qname_len, 1, 0, 0)) + msg->qinfo.qname_len, 1, 1, 0, 0)) return 0; } } @@ -2982,6 +3003,7 @@ az_generate_wildcard_answer(struct auth_zone* z, struct query_info* qinfo, struct auth_data* wildcard, struct auth_data* node) { struct auth_rrset* rrset, *nsec; + int insert_ce = 0; if((rrset=az_domain_rrset(wildcard, qinfo->qtype)) != NULL) { /* wildcard has type, add it */ if(!msg_add_rrset_an(z, region, msg, wildcard, rrset)) @@ -3008,6 +3030,10 @@ az_generate_wildcard_answer(struct auth_zone* z, struct query_info* qinfo, /* call other notype routine for dnssec notype denials */ if(!az_generate_notype_answer(z, region, msg, wildcard)) return 0; + /* because the notype, there is no positive data with an + * RRSIG that indicates the wildcard position. Thus the + * wildcard qname denial needs to have a CE nsec3. */ + insert_ce = 1; } /* ce and node for dnssec denial of wildcard original name */ @@ -3019,7 +3045,7 @@ az_generate_wildcard_answer(struct auth_zone* z, struct query_info* qinfo, dname_remove_label(&wildup, &wilduplen); if(!az_add_nsec3_proof(z, region, msg, wildup, wilduplen, msg->qinfo.qname, - msg->qinfo.qname_len, 0, 1, 0)) + msg->qinfo.qname_len, 0, insert_ce, 1, 0)) return 0; } @@ -3045,7 +3071,7 @@ az_generate_nxdomain_answer(struct auth_zone* z, struct regional* region, } else if(ce) { if(!az_add_nsec3_proof(z, region, msg, ce->name, ce->namelen, msg->qinfo.qname, - msg->qinfo.qname_len, 1, 1, 1)) + msg->qinfo.qname_len, 0, 1, 1, 1)) return 0; } return 1; @@ -3676,6 +3702,7 @@ static void xfr_transfer_start_lookups(struct auth_xfer* xfr) { /* delete all the looked up addresses in the list */ + xfr->task_transfer->scan_addr = NULL; xfr_masterlist_free_addrs(xfr->task_transfer->masters); /* start lookup at the first master */ @@ -3706,6 +3733,7 @@ static void xfr_probe_start_lookups(struct auth_xfer* xfr) { /* delete all the looked up addresses in the list */ + xfr->task_probe->scan_addr = NULL; xfr_masterlist_free_addrs(xfr->task_probe->masters); /* start lookup at the first master */ @@ -4843,6 +4871,11 @@ xfr_write_after_update(struct auth_xfer* xfr, struct module_env* env) if(cfg->chrootdir && cfg->chrootdir[0] && strncmp(zfilename, cfg->chrootdir, strlen(cfg->chrootdir)) == 0) zfilename += strlen(cfg->chrootdir); + if(verbosity >= VERB_ALGO) { + char nm[255+1]; + dname_str(z->name, nm); + verbose(VERB_ALGO, "write zonefile %s for %s", zfilename, nm); + } /* write to tempfile first */ if((size_t)strlen(zfilename) + 16 > sizeof(tmpfile)) { @@ -4858,6 +4891,7 @@ xfr_write_after_update(struct auth_xfer* xfr, struct module_env* env) if(!auth_zone_write_chunks(xfr, tmpfile)) { unlink(tmpfile); lock_rw_unlock(&z->lock); + return; } } else if(!auth_zone_write_file(z, tmpfile)) { unlink(tmpfile); @@ -4953,6 +4987,9 @@ xfr_process_chunk_list(struct auth_xfer* xfr, struct module_env* env, static void xfr_transfer_disown(struct auth_xfer* xfr) { + /* remove timer (from this worker's event base) */ + comm_timer_delete(xfr->task_transfer->timer); + xfr->task_transfer->timer = NULL; /* remove the commpoint */ comm_point_delete(xfr->task_transfer->cp); xfr->task_transfer->cp = NULL; @@ -5034,6 +5071,9 @@ xfr_transfer_init_fetch(struct auth_xfer* xfr, struct module_env* env) struct sockaddr_storage addr; socklen_t addrlen = 0; struct auth_master* master = xfr->task_transfer->master; + char *auth_name = NULL; + struct timeval t; + int timeout; if(!master) return 0; if(master->allow_notify) return 0; /* only for notify */ @@ -5042,7 +5082,7 @@ xfr_transfer_init_fetch(struct auth_xfer* xfr, struct module_env* env) addrlen = xfr->task_transfer->scan_addr->addrlen; memmove(&addr, &xfr->task_transfer->scan_addr->addr, addrlen); } else { - if(!extstrtoaddr(master->host, &addr, &addrlen)) { + if(!authextstrtoaddr(master->host, &addr, &addrlen, &auth_name)) { /* the ones that are not in addr format are supposed * to be looked up. The lookup has failed however, * so skip them */ @@ -5059,25 +5099,46 @@ xfr_transfer_init_fetch(struct auth_xfer* xfr, struct module_env* env) comm_point_delete(xfr->task_transfer->cp); xfr->task_transfer->cp = NULL; } + if(!xfr->task_transfer->timer) { + xfr->task_transfer->timer = comm_timer_create(env->worker_base, + auth_xfer_transfer_timer_callback, xfr); + if(!xfr->task_transfer->timer) { + log_err("malloc failure"); + return 0; + } + } + timeout = AUTH_TRANSFER_TIMEOUT; +#ifndef S_SPLINT_S + t.tv_sec = timeout/1000; + t.tv_usec = (timeout%1000)*1000; +#endif if(master->http) { /* perform http fetch */ /* store http port number into sockaddr, * unless someone used unbound's host@port notation */ + xfr->task_transfer->on_ixfr = 0; if(strchr(master->host, '@') == NULL) sockaddr_store_port(&addr, addrlen, master->port); xfr->task_transfer->cp = outnet_comm_point_for_http( env->outnet, auth_xfer_transfer_http_callback, xfr, - &addr, addrlen, AUTH_TRANSFER_TIMEOUT, master->ssl, - master->host, master->file); + &addr, addrlen, -1, master->ssl, master->host, + master->file); if(!xfr->task_transfer->cp) { - char zname[255+1]; + char zname[255+1], as[256]; dname_str(xfr->name, zname); + addr_to_str(&addr, addrlen, as, sizeof(as)); verbose(VERB_ALGO, "cannot create http cp " - "connection for %s to %s", zname, - master->host); + "connection for %s to %s", zname, as); return 0; } + comm_timer_set(xfr->task_transfer->timer, &t); + if(verbosity >= VERB_ALGO) { + char zname[255+1], as[256]; + dname_str(xfr->name, zname); + addr_to_str(&addr, addrlen, as, sizeof(as)); + verbose(VERB_ALGO, "auth zone %s transfer next HTTP fetch from %s started", zname, as); + } return 1; } @@ -5091,14 +5152,24 @@ xfr_transfer_init_fetch(struct auth_xfer* xfr, struct module_env* env) /* connect on fd */ xfr->task_transfer->cp = outnet_comm_point_for_tcp(env->outnet, auth_xfer_transfer_tcp_callback, xfr, &addr, addrlen, - env->scratch_buffer, AUTH_TRANSFER_TIMEOUT); + env->scratch_buffer, -1, + auth_name != NULL, auth_name); if(!xfr->task_transfer->cp) { - char zname[255+1]; - dname_str(xfr->name, zname); + char zname[255+1], as[256]; + dname_str(xfr->name, zname); + addr_to_str(&addr, addrlen, as, sizeof(as)); verbose(VERB_ALGO, "cannot create tcp cp connection for " - "xfr %s to %s", zname, master->host); + "xfr %s to %s", zname, as); return 0; } + comm_timer_set(xfr->task_transfer->timer, &t); + if(verbosity >= VERB_ALGO) { + char zname[255+1], as[256]; + dname_str(xfr->name, zname); + addr_to_str(&addr, addrlen, as, sizeof(as)); + verbose(VERB_ALGO, "auth zone %s transfer next %s fetch from %s started", zname, + (xfr->task_transfer->on_ixfr?"IXFR":"AXFR"), as); + } return 1; } @@ -5116,6 +5187,11 @@ xfr_transfer_nexttarget_or_end(struct auth_xfer* xfr, struct module_env* env) * and we may then get an instant cache response, * and that calls the callback just like a full * lookup and lookup failures also call callback */ + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s transfer next target lookup", zname); + } lock_basic_unlock(&xfr->lock); return; } @@ -5134,6 +5210,11 @@ xfr_transfer_nexttarget_or_end(struct auth_xfer* xfr, struct module_env* env) /* failed to fetch, next master */ xfr_transfer_nextmaster(xfr); } + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s transfer failed, wait", zname); + } /* we failed to fetch the zone, move to wait task * use the shorter retry timeout */ @@ -5231,8 +5312,26 @@ void auth_xfer_transfer_lookup_callback(void* arg, int rcode, sldns_buffer* buf, if(answer) { xfr_master_add_addrs(xfr->task_transfer-> lookup_target, answer, wanted_qtype); + } else { + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s host %s type %s transfer lookup has nodata", zname, xfr->task_transfer->lookup_target->host, (xfr->task_transfer->lookup_aaaa?"AAAA":"A")); + } + } + } else { + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s host %s type %s transfer lookup has no answer", zname, xfr->task_transfer->lookup_target->host, (xfr->task_transfer->lookup_aaaa?"AAAA":"A")); } } + } else { + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s host %s type %s transfer lookup failed", zname, xfr->task_transfer->lookup_target->host, (xfr->task_transfer->lookup_aaaa?"AAAA":"A")); + } } if(xfr->task_transfer->lookup_target->list && xfr->task_transfer->lookup_target == xfr_transfer_current_master(xfr)) @@ -5616,6 +5715,46 @@ process_list_end_transfer(struct auth_xfer* xfr, struct module_env* env) xfr_transfer_nexttarget_or_end(xfr, env); } +/** callback for the task_transfer timer */ +void +auth_xfer_transfer_timer_callback(void* arg) +{ + struct auth_xfer* xfr = (struct auth_xfer*)arg; + struct module_env* env; + int gonextonfail = 1; + log_assert(xfr->task_transfer); + lock_basic_lock(&xfr->lock); + env = xfr->task_transfer->env; + if(env->outnet->want_to_quit) { + lock_basic_unlock(&xfr->lock); + return; /* stop on quit */ + } + + verbose(VERB_ALGO, "xfr stopped, connection timeout to %s", + xfr->task_transfer->master->host); + + /* see if IXFR caused the failure, if so, try AXFR */ + if(xfr->task_transfer->on_ixfr) { + xfr->task_transfer->ixfr_possible_timeout_count++; + if(xfr->task_transfer->ixfr_possible_timeout_count >= + NUM_TIMEOUTS_FALLBACK_IXFR) { + verbose(VERB_ALGO, "xfr to %s, fallback " + "from IXFR to AXFR (because of timeouts)", + xfr->task_transfer->master->host); + xfr->task_transfer->ixfr_fail = 1; + gonextonfail = 0; + } + } + + /* delete transferred data from list */ + auth_chunks_delete(xfr->task_transfer); + comm_point_delete(xfr->task_transfer->cp); + xfr->task_transfer->cp = NULL; + if(gonextonfail) + xfr_transfer_nextmaster(xfr); + xfr_transfer_nexttarget_or_end(xfr, env); +} + /** callback for task_transfer tcp connections */ int auth_xfer_transfer_tcp_callback(struct comm_point* c, void* arg, int err, @@ -5632,6 +5771,8 @@ auth_xfer_transfer_tcp_callback(struct comm_point* c, void* arg, int err, lock_basic_unlock(&xfr->lock); return 0; /* stop on quit */ } + /* stop the timer */ + comm_timer_disable(xfr->task_transfer->timer); if(err != NETEVENT_NOERROR) { /* connection failed, closed, or timeout */ @@ -5712,6 +5853,8 @@ auth_xfer_transfer_http_callback(struct comm_point* c, void* arg, int err, return 0; /* stop on quit */ } verbose(VERB_ALGO, "auth zone transfer http callback"); + /* stop the timer */ + comm_timer_disable(xfr->task_transfer->timer); if(err != NETEVENT_NOERROR && err != NETEVENT_DONE) { /* connection failed, closed, or timeout */ @@ -5809,6 +5952,7 @@ xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env, struct timeval t; /* pick master */ struct auth_master* master = xfr_probe_current_master(xfr); + char *auth_name = NULL; if(!master) return 0; if(master->allow_notify) return 0; /* only for notify */ if(master->http) return 0; /* only masters get SOA UDP probe, @@ -5819,7 +5963,7 @@ xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env, addrlen = xfr->task_probe->scan_addr->addrlen; memmove(&addr, &xfr->task_probe->scan_addr->addr, addrlen); } else { - if(!extstrtoaddr(master->host, &addr, &addrlen)) { + if(!authextstrtoaddr(master->host, &addr, &addrlen, &auth_name)) { /* the ones that are not in addr format are supposed * to be looked up. The lookup has failed however, * so skip them */ @@ -5829,6 +5973,18 @@ xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env, zname, master->host); return 0; } + if (auth_name != NULL) { + if (addr.ss_family == AF_INET + && (int)ntohs(((struct sockaddr_in *)&addr)->sin_port) + == env->cfg->ssl_port) + ((struct sockaddr_in *)&addr)->sin_port + = htons((uint16_t)env->cfg->port); + else if (addr.ss_family == AF_INET6 + && (int)ntohs(((struct sockaddr_in6 *)&addr)->sin6_port) + == env->cfg->ssl_port) + ((struct sockaddr_in6 *)&addr)->sin6_port + = htons((uint16_t)env->cfg->port); + } } /* create packet */ @@ -5838,14 +5994,26 @@ xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env, xfr->task_probe->id = (uint16_t)(ub_random(env->rnd)&0xffff); xfr_create_soa_probe_packet(xfr, env->scratch_buffer, xfr->task_probe->id); + /* we need to remove the cp if we have a different ip4/ip6 type now */ + if(xfr->task_probe->cp && + ((xfr->task_probe->cp_is_ip6 && !addr_is_ip6(&addr, addrlen)) || + (!xfr->task_probe->cp_is_ip6 && addr_is_ip6(&addr, addrlen))) + ) { + comm_point_delete(xfr->task_probe->cp); + xfr->task_probe->cp = NULL; + } if(!xfr->task_probe->cp) { + if(addr_is_ip6(&addr, addrlen)) + xfr->task_probe->cp_is_ip6 = 1; + else xfr->task_probe->cp_is_ip6 = 0; xfr->task_probe->cp = outnet_comm_point_for_udp(env->outnet, auth_xfer_probe_udp_callback, xfr, &addr, addrlen); if(!xfr->task_probe->cp) { - char zname[255+1]; + char zname[255+1], as[256]; dname_str(xfr->name, zname); + addr_to_str(&addr, addrlen, as, sizeof(as)); verbose(VERB_ALGO, "cannot create udp cp for " - "probe %s to %s", zname, master->host); + "probe %s to %s", zname, as); return 0; } } @@ -5861,12 +6029,20 @@ xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env, /* send udp packet */ if(!comm_point_send_udp_msg(xfr->task_probe->cp, env->scratch_buffer, (struct sockaddr*)&addr, addrlen)) { - char zname[255+1]; + char zname[255+1], as[256]; dname_str(xfr->name, zname); + addr_to_str(&addr, addrlen, as, sizeof(as)); verbose(VERB_ALGO, "failed to send soa probe for %s to %s", - zname, master->host); + zname, as); return 0; } + if(verbosity >= VERB_ALGO) { + char zname[255+1], as[256]; + dname_str(xfr->name, zname); + addr_to_str(&addr, addrlen, as, sizeof(as)); + verbose(VERB_ALGO, "auth zone %s soa probe sent to %s", zname, + as); + } xfr->task_probe->timeout = timeout; #ifndef S_SPLINT_S t.tv_sec = timeout/1000; @@ -5891,6 +6067,11 @@ auth_xfer_probe_timer_callback(void* arg) return; /* stop on quit */ } + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s soa probe timeout", zname); + } if(xfr->task_probe->timeout <= AUTH_PROBE_TIMEOUT_STOP) { /* try again with bigger timeout */ if(xfr_probe_send_probe(xfr, env, xfr->task_probe->timeout*2)) { @@ -6078,6 +6259,11 @@ xfr_probe_send_or_end(struct auth_xfer* xfr, struct module_env* env) * and we may then get an instant cache response, * and that calls the callback just like a full * lookup and lookup failures also call callback */ + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s probe next target lookup", zname); + } lock_basic_unlock(&xfr->lock); return; } @@ -6086,9 +6272,19 @@ xfr_probe_send_or_end(struct auth_xfer* xfr, struct module_env* env) /* probe of list has ended. Create or refresh the list of of * allow_notify addrs */ probe_copy_masters_for_allow_notify(xfr); + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s probe: notify addrs updated", zname); + } if(xfr->task_probe->only_lookup) { /* only wanted lookups for copy, stop probe and start wait */ xfr->task_probe->only_lookup = 0; + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s probe: finished only_lookup", zname); + } xfr_probe_disown(xfr); if(xfr->task_nextprobe->worker == NULL) xfr_set_timeout(xfr, env, 0, 0); @@ -6110,13 +6306,22 @@ xfr_probe_send_or_end(struct auth_xfer* xfr, struct module_env* env) /* done with probe sequence, wait */ if(xfr->task_probe->have_new_lease) { /* if zone not updated, start the wait timer again */ - verbose(VERB_ALGO, "auth_zone unchanged, new lease, wait"); + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth_zone %s unchanged, new lease, wait", zname); + } xfr_probe_disown(xfr); if(xfr->have_zone) xfr->lease_time = *env->now; if(xfr->task_nextprobe->worker == NULL) xfr_set_timeout(xfr, env, 0, 0); } else { + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s soa probe failed, wait to retry", zname); + } /* we failed to send this as well, move to the wait task, * use the shorter retry timeout */ xfr_probe_disown(xfr); @@ -6161,8 +6366,26 @@ void auth_xfer_probe_lookup_callback(void* arg, int rcode, sldns_buffer* buf, if(answer) { xfr_master_add_addrs(xfr->task_probe-> lookup_target, answer, wanted_qtype); + } else { + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s host %s type %s probe lookup has nodata", zname, xfr->task_probe->lookup_target->host, (xfr->task_probe->lookup_aaaa?"AAAA":"A")); + } + } + } else { + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s host %s type %s probe lookup has no address", zname, xfr->task_probe->lookup_target->host, (xfr->task_probe->lookup_aaaa?"AAAA":"A")); } } + } else { + if(verbosity >= VERB_ALGO) { + char zname[255+1]; + dname_str(xfr->name, zname); + verbose(VERB_ALGO, "auth zone %s host %s type %s probe lookup failed", zname, xfr->task_probe->lookup_target->host, (xfr->task_probe->lookup_aaaa?"AAAA":"A")); + } } if(xfr->task_probe->lookup_target->list && xfr->task_probe->lookup_target == xfr_probe_current_master(xfr)) @@ -6350,7 +6573,7 @@ xfr_set_timeout(struct auth_xfer* xfr, struct module_env* env, /* don't lookup_only, if lookup timeout is 0 anyway, * or if we don't have masters to lookup */ tv.tv_sec = 0; - if(xfr->task_probe && xfr->task_probe->worker == NULL) + if(xfr->task_probe->worker == NULL) xfr->task_probe->only_lookup = 1; } if(verbosity >= VERB_ALGO) { diff --git a/services/authzone.h b/services/authzone.h index 4706803a86b305d33b8ed094bf6c763289712c97..a695bd029b5623f8a397d0d05dc7fa715377d7b7 100644 --- a/services/authzone.h +++ b/services/authzone.h @@ -327,6 +327,8 @@ struct auth_probe { /** the SOA probe udp event. * on the workers event base. */ struct comm_point* cp; + /** is the cp for ip6 or ip4 */ + int cp_is_ip6; /** timeout for packets. * on the workers event base. */ struct comm_timer* timer; @@ -398,6 +400,9 @@ struct auth_transfer { /** the transfer (TCP) to the master. * on the workers event base. */ struct comm_point* cp; + /** timeout for the transfer. + * on the workers event base. */ + struct comm_timer* timer; }; /** list of addresses */ @@ -647,6 +652,8 @@ int auth_xfer_transfer_http_callback(struct comm_point* c, void* arg, int err, struct comm_reply* repinfo); /** xfer probe timeout callback, part of task_probe */ void auth_xfer_probe_timer_callback(void* arg); +/** xfer transfer timeout callback, part of task_transfer */ +void auth_xfer_transfer_timer_callback(void* arg); /** mesh callback for task_probe on lookup of host names */ void auth_xfer_probe_lookup_callback(void* arg, int rcode, struct sldns_buffer* buf, enum sec_status sec, char* why_bogus, diff --git a/services/cache/dns.c b/services/cache/dns.c index 5ac4e000b22521803466bb7ac5ca72ac61ee926b..aa4efec73f412001f832fb27559a7b10122deedf 100644 --- a/services/cache/dns.c +++ b/services/cache/dns.c @@ -40,6 +40,7 @@ */ #include "config.h" #include "iterator/iter_delegpt.h" +#include "iterator/iter_utils.h" #include "validator/val_nsec.h" #include "validator/val_utils.h" #include "services/cache/dns.h" @@ -271,7 +272,7 @@ find_add_addrs(struct module_env* env, uint16_t qclass, akey = rrset_cache_lookup(env->rrset_cache, ns->name, ns->namelen, LDNS_RR_TYPE_A, qclass, 0, now, 0); if(akey) { - if(!delegpt_add_rrset_A(dp, region, akey, 0, NULL)) { + if(!delegpt_add_rrset_A(dp, region, akey, 0)) { lock_rw_unlock(&akey->entry.lock); return 0; } @@ -291,7 +292,7 @@ find_add_addrs(struct module_env* env, uint16_t qclass, akey = rrset_cache_lookup(env->rrset_cache, ns->name, ns->namelen, LDNS_RR_TYPE_AAAA, qclass, 0, now, 0); if(akey) { - if(!delegpt_add_rrset_AAAA(dp, region, akey, 0, NULL)) { + if(!delegpt_add_rrset_AAAA(dp, region, akey, 0)) { lock_rw_unlock(&akey->entry.lock); return 0; } @@ -325,8 +326,7 @@ cache_fill_missing(struct module_env* env, uint16_t qclass, akey = rrset_cache_lookup(env->rrset_cache, ns->name, ns->namelen, LDNS_RR_TYPE_A, qclass, 0, now, 0); if(akey) { - if(!delegpt_add_rrset_A(dp, region, akey, ns->lame, - NULL)) { + if(!delegpt_add_rrset_A(dp, region, akey, ns->lame)) { lock_rw_unlock(&akey->entry.lock); return 0; } @@ -346,8 +346,7 @@ cache_fill_missing(struct module_env* env, uint16_t qclass, akey = rrset_cache_lookup(env->rrset_cache, ns->name, ns->namelen, LDNS_RR_TYPE_AAAA, qclass, 0, now, 0); if(akey) { - if(!delegpt_add_rrset_AAAA(dp, region, akey, ns->lame, - NULL)) { + if(!delegpt_add_rrset_AAAA(dp, region, akey, ns->lame)) { lock_rw_unlock(&akey->entry.lock); return 0; } @@ -730,6 +729,8 @@ fill_any(struct module_env* env, if(!msg) { return NULL; } + /* set NOTIMPL for RFC 8482 */ + msg->rep->flags |= LDNS_RCODE_NOTIMPL; msg->rep->security = sec_status_indeterminate; return msg; } @@ -914,12 +915,15 @@ dns_cache_lookup(struct module_env* env, struct dns_msg* msg; if(FLAGS_GET_RCODE(data->flags) == LDNS_RCODE_NXDOMAIN && data->security == sec_status_secure + && (data->an_numrrsets == 0 || + ntohs(data->rrsets[0]->rk.type) != LDNS_RR_TYPE_CNAME) && (msg=tomsg(env, &k, data, region, now, scratch))){ lock_rw_unlock(&e->lock); msg->qinfo.qname=qname; msg->qinfo.qname_len=qnamelen; /* check that DNSSEC really works out */ msg->rep->security = sec_status_unchecked; + iter_scrub_nxdomain(msg); return msg; } lock_rw_unlock(&e->lock); diff --git a/services/cache/infra.c b/services/cache/infra.c index 07c41928d67e50ac42254843ae20e8481b7839f3..c2484a9f1aa88c35f227a1ff90c4c7798cdf0293 100644 --- a/services/cache/infra.c +++ b/services/cache/infra.c @@ -41,6 +41,8 @@ #include "config.h" #include "sldns/rrdef.h" #include "sldns/str2wire.h" +#include "sldns/sbuffer.h" +#include "sldns/wire2str.h" #include "services/cache/infra.h" #include "util/storage/slabhash.h" #include "util/storage/lookup3.h" @@ -907,7 +909,8 @@ int infra_rate_max(void* data, time_t now) } int infra_ratelimit_inc(struct infra_cache* infra, uint8_t* name, - size_t namelen, time_t timenow) + size_t namelen, time_t timenow, struct query_info* qinfo, + struct comm_reply* replylist) { int lim, max; struct lruhash_entry* entry; @@ -930,9 +933,19 @@ int infra_ratelimit_inc(struct infra_cache* infra, uint8_t* name, lock_rw_unlock(&entry->lock); if(premax < lim && max >= lim) { - char buf[257]; + char buf[257], qnm[257], ts[12], cs[12], ip[128]; dname_str(name, buf); - verbose(VERB_OPS, "ratelimit exceeded %s %d", buf, lim); + dname_str(qinfo->qname, qnm); + sldns_wire2str_type_buf(qinfo->qtype, ts, sizeof(ts)); + sldns_wire2str_class_buf(qinfo->qclass, cs, sizeof(cs)); + ip[0]=0; + if(replylist) { + addr_to_str((struct sockaddr_storage *)&replylist->addr, + replylist->addrlen, ip, sizeof(ip)); + verbose(VERB_OPS, "ratelimit exceeded %s %d query %s %s %s from %s", buf, lim, qnm, cs, ts, ip); + } else { + verbose(VERB_OPS, "ratelimit exceeded %s %d query %s %s %s", buf, lim, qnm, cs, ts); + } } return (max < lim); } @@ -991,7 +1004,7 @@ infra_get_mem(struct infra_cache* infra) } int infra_ip_ratelimit_inc(struct infra_cache* infra, - struct comm_reply* repinfo, time_t timenow) + struct comm_reply* repinfo, time_t timenow, struct sldns_buffer* buffer) { int max; struct lruhash_entry* entry; @@ -1010,11 +1023,28 @@ int infra_ip_ratelimit_inc(struct infra_cache* infra, lock_rw_unlock(&entry->lock); if(premax < infra_ip_ratelimit && max >= infra_ip_ratelimit) { - char client_ip[128]; + char client_ip[128], qnm[LDNS_MAX_DOMAINLEN+1+12+12]; addr_to_str((struct sockaddr_storage *)&repinfo->addr, repinfo->addrlen, client_ip, sizeof(client_ip)); - verbose(VERB_OPS, "ip_ratelimit exceeded %s %d", - client_ip, infra_ip_ratelimit); + qnm[0]=0; + if(sldns_buffer_limit(buffer)>LDNS_HEADER_SIZE && + LDNS_QDCOUNT(sldns_buffer_begin(buffer))!=0) { + (void)sldns_wire2str_rrquestion_buf( + sldns_buffer_at(buffer, LDNS_HEADER_SIZE), + sldns_buffer_limit(buffer)-LDNS_HEADER_SIZE, + qnm, sizeof(qnm)); + if(strlen(qnm)>0 && qnm[strlen(qnm)-1]=='\n') + qnm[strlen(qnm)-1] = 0; /*remove newline*/ + if(strchr(qnm, '\t')) + *strchr(qnm, '\t') = ' '; + if(strchr(qnm, '\t')) + *strchr(qnm, '\t') = ' '; + verbose(VERB_OPS, "ip_ratelimit exceeded %s %d %s", + client_ip, infra_ip_ratelimit, qnm); + } else { + verbose(VERB_OPS, "ip_ratelimit exceeded %s %d (no query name)", + client_ip, infra_ip_ratelimit); + } } return (max <= infra_ip_ratelimit); } diff --git a/services/cache/infra.h b/services/cache/infra.h index 10db796bfcddd5a10d96856dbf029b56d241de4b..e33f2a6c04ee264aedcd5191b2ff74ece5832cfa 100644 --- a/services/cache/infra.h +++ b/services/cache/infra.h @@ -366,12 +366,15 @@ long long infra_get_host_rto(struct infra_cache* infra, * @param name: zone name * @param namelen: zone name length * @param timenow: what time it is now. + * @param qinfo: for logging, query name. + * @param replylist: for logging, querier's address (if any). * @return 1 if it could be incremented. 0 if the increment overshot the * ratelimit or if in the previous second the ratelimit was exceeded. * Failures like alloc failures are not returned (probably as 1). */ int infra_ratelimit_inc(struct infra_cache* infra, uint8_t* name, - size_t namelen, time_t timenow); + size_t namelen, time_t timenow, struct query_info* qinfo, + struct comm_reply* replylist); /** * Decrement the query rate counter for a delegation point. @@ -410,10 +413,12 @@ int infra_find_ratelimit(struct infra_cache* infra, uint8_t* name, * @param infra: infra cache * @param repinfo: information about client * @param timenow: what time it is now. + * @param buffer: with query for logging. * @return 1 if it could be incremented. 0 if the increment overshot the * ratelimit and the query should be dropped. */ int infra_ip_ratelimit_inc(struct infra_cache* infra, - struct comm_reply* repinfo, time_t timenow); + struct comm_reply* repinfo, time_t timenow, + struct sldns_buffer* buffer); /** * Get memory used by the infra cache. diff --git a/services/listen_dnsport.c b/services/listen_dnsport.c index f86a83d967364ab04377cd7d7331d76aaa857787..7e2afd843be8d8f5a6242754b31de93407ea64d6 100644 --- a/services/listen_dnsport.c +++ b/services/listen_dnsport.c @@ -851,13 +851,16 @@ create_tcp_accept_sock(struct addrinfo *addr, int v6only, int* noproto, #ifdef ENOPROTOOPT /* squelch ENOPROTOOPT: freebsd server mode with kernel support disabled, except when verbosity enabled for debugging */ - if(errno != ENOPROTOOPT || verbosity >= 3) + if(errno != ENOPROTOOPT || verbosity >= 3) { #endif if(errno == EPERM) { log_warn("Setting TCP Fast Open as server failed: %s ; this could likely be because sysctl net.inet.tcp.fastopen.enabled, net.inet.tcp.fastopen.server_enable, or net.ipv4.tcp_fastopen is disabled", strerror(errno)); } else { log_err("Setting TCP Fast Open as server failed: %s", strerror(errno)); } +#ifdef ENOPROTOOPT + } +#endif } #endif return s; @@ -1636,10 +1639,12 @@ tcp_req_info_setup_listen(struct tcp_req_info* req) if(wr) { req->cp->tcp_is_reading = 0; + comm_point_stop_listening(req->cp); comm_point_start_listening(req->cp, -1, req->cp->tcp_timeout_msec); } else if(rd) { req->cp->tcp_is_reading = 1; + comm_point_stop_listening(req->cp); comm_point_start_listening(req->cp, -1, req->cp->tcp_timeout_msec); /* and also read it (from SSL stack buffers), so @@ -1647,6 +1652,7 @@ tcp_req_info_setup_listen(struct tcp_req_info* req) * the TLS frame is sitting in the buffers. */ req->read_again = 1; } else { + comm_point_stop_listening(req->cp); comm_point_start_listening(req->cp, -1, req->cp->tcp_timeout_msec); comm_point_listen_for_rw(req->cp, 0, 0); @@ -1746,6 +1752,7 @@ tcp_req_info_handle_readdone(struct tcp_req_info* req) req->is_drop = 0; req->is_reply = 0; req->in_worker_handle = 1; + sldns_buffer_set_limit(req->spool_buffer, 0); /* handle the current request */ /* this calls the worker handle request routine that could give * a cache response, or localdata response, or drop the reply, @@ -1759,6 +1766,7 @@ tcp_req_info_handle_readdone(struct tcp_req_info* req) * clear to write to */ send_it: c->tcp_is_reading = 0; + comm_point_stop_listening(c); comm_point_start_listening(c, -1, c->tcp_timeout_msec); return; } @@ -1767,13 +1775,7 @@ tcp_req_info_handle_readdone(struct tcp_req_info* req) * If mesh failed to add a new entry and called commpoint_drop_reply. * Then the mesh state has been cleared. */ if(req->is_drop) { - /* we can now call drop_reply without recursing into ourselves - * whilst in the callback */ - /* we have to close the stream because there is no reply, - * no servfail to send, but the query needs an action, for - * a stream that is close the connection */ - sldns_buffer_clear(c->buffer); - comm_point_drop_reply(&c->repinfo); + /* the reply has been dropped, stream has been closed. */ return; } /* If mesh failed(mallocfail) and called commpoint_send_reply with @@ -1857,7 +1859,14 @@ void tcp_req_info_send_reply(struct tcp_req_info* req) { if(req->in_worker_handle) { - /* It is in the right buffer to answer straight away */ + /* reply from mesh is in the spool_buffer */ + /* copy now, so that the spool buffer is free for other tasks + * before the callback is done */ + sldns_buffer_clear(req->cp->buffer); + sldns_buffer_write(req->cp->buffer, + sldns_buffer_begin(req->spool_buffer), + sldns_buffer_limit(req->spool_buffer)); + sldns_buffer_flip(req->cp->buffer); req->is_reply = 1; return; } diff --git a/services/localzone.c b/services/localzone.c index 902a29f21d4870ae6266b5e499651508a2a30513..492bb83042c1f9f49d4fb0d5f1c6ebe4f68d28fb 100644 --- a/services/localzone.c +++ b/services/localzone.c @@ -464,7 +464,8 @@ lz_enter_rr_into_zone(struct local_zone* z, const char* rrstr) return 0; } log_assert(z->dclass == rrclass); - if(z->type == local_zone_redirect && + if((z->type == local_zone_redirect || + z->type == local_zone_inform_redirect) && query_dname_compare(z->name, nm) != 0) { log_err("local-data in redirect zone must reside at top of zone" ", not at %s", rrstr); @@ -481,7 +482,8 @@ lz_enter_rr_into_zone(struct local_zone* z, const char* rrstr) /* Reject it if we would end up having CNAME and other data (including * another CNAME) for a redirect zone. */ - if(z->type == local_zone_redirect && node->rrsets) { + if((z->type == local_zone_redirect || + z->type == local_zone_inform_redirect) && node->rrsets) { const char* othertype = NULL; if (rrtype == LDNS_RR_TYPE_CNAME) othertype = "other"; @@ -1119,7 +1121,7 @@ local_zone_out(struct local_zone* z) struct local_rrset* p; RBTREE_FOR(d, struct local_data*, &z->data) { for(p = d->rrsets; p; p = p->next) { - log_nametypeclass(0, "rrset", d->name, + log_nametypeclass(NO_VERBOSE, "rrset", d->name, ntohs(p->rrset->rk.type), ntohs(p->rrset->rk.rrset_class)); } @@ -1136,7 +1138,7 @@ void local_zones_print(struct local_zones* zones) lock_rw_rdlock(&z->lock); snprintf(buf, sizeof(buf), "%s zone", local_zone_type2str(z->type)); - log_nametypeclass(0, buf, z->name, 0, z->dclass); + log_nametypeclass(NO_VERBOSE, buf, z->name, 0, z->dclass); local_zone_out(z); lock_rw_unlock(&z->lock); } @@ -1323,7 +1325,8 @@ local_data_answer(struct local_zone* z, struct module_env* env, key.name = qinfo->qname; key.namelen = qinfo->qname_len; key.namelabs = labs; - if(lz_type == local_zone_redirect) { + if(lz_type == local_zone_redirect || + lz_type == local_zone_inform_redirect) { key.name = z->name; key.namelen = z->namelen; key.namelabs = z->namelabs; @@ -1355,7 +1358,8 @@ local_data_answer(struct local_zone* z, struct module_env* env, return 0; /* Special case for alias matching. See local_data_answer(). */ - if(lz_type == local_zone_redirect && + if((lz_type == local_zone_redirect || + lz_type == local_zone_inform_redirect) && qinfo->qtype != LDNS_RR_TYPE_CNAME && lr->rrset->rk.type == htons(LDNS_RR_TYPE_CNAME)) { qinfo->local_alias = @@ -1370,7 +1374,8 @@ local_data_answer(struct local_zone* z, struct module_env* env, qinfo->local_alias->rrset->rk.dname_len = qinfo->qname_len; return 1; } - if(lz_type == local_zone_redirect) { + if(lz_type == local_zone_redirect || + lz_type == local_zone_inform_redirect) { /* convert rrset name to query name; like a wildcard */ struct ub_packed_rrset_key r = *lr->rrset; r.rk.dname = qinfo->qname; @@ -1442,6 +1447,7 @@ lz_zone_answer(struct local_zone* z, struct module_env* env, return 1; } else if(lz_type == local_zone_static || lz_type == local_zone_redirect || + lz_type == local_zone_inform_redirect || lz_type == local_zone_always_nxdomain) { /* for static, reply nodata or nxdomain * for redirect, reply nodata */ @@ -1450,7 +1456,8 @@ lz_zone_answer(struct local_zone* z, struct module_env* env, * or using closest match for NSEC. * or using closest match for returning delegation downwards */ - int rcode = (ld || lz_type == local_zone_redirect)? + int rcode = (ld || lz_type == local_zone_redirect || + lz_type == local_zone_inform_redirect)? LDNS_RCODE_NOERROR:LDNS_RCODE_NXDOMAIN; if(z->soa) return local_encode(qinfo, env, edns, repinfo, buf, temp, @@ -1493,7 +1500,7 @@ lz_inform_print(struct local_zone* z, struct query_info* qinfo, addr_to_str(&repinfo->addr, repinfo->addrlen, ip, sizeof(ip)); snprintf(txt, sizeof(txt), "%s %s %s@%u", zname, local_zone_type2str(z->type), ip, (unsigned)port); - log_nametypeclass(0, txt, qinfo->qname, qinfo->qtype, qinfo->qclass); + log_nametypeclass(NO_VERBOSE, txt, qinfo->qname, qinfo->qtype, qinfo->qclass); } static enum localzone_type @@ -1624,7 +1631,9 @@ local_zones_answer(struct local_zones* zones, struct module_env* env, } } if((env->cfg->log_local_actions || - lzt == local_zone_inform || lzt == local_zone_inform_deny) + lzt == local_zone_inform || + lzt == local_zone_inform_deny || + lzt == local_zone_inform_redirect) && repinfo) lz_inform_print(z, qinfo, repinfo); @@ -1656,6 +1665,7 @@ const char* local_zone_type2str(enum localzone_type t) case local_zone_nodefault: return "nodefault"; case local_zone_inform: return "inform"; case local_zone_inform_deny: return "inform_deny"; + case local_zone_inform_redirect: return "inform_redirect"; case local_zone_always_transparent: return "always_transparent"; case local_zone_always_refuse: return "always_refuse"; case local_zone_always_nxdomain: return "always_nxdomain"; @@ -1682,6 +1692,8 @@ int local_zone_str2type(const char* type, enum localzone_type* t) *t = local_zone_inform; else if(strcmp(type, "inform_deny") == 0) *t = local_zone_inform_deny; + else if(strcmp(type, "inform_redirect") == 0) + *t = local_zone_inform_redirect; else if(strcmp(type, "always_transparent") == 0) *t = local_zone_always_transparent; else if(strcmp(type, "always_refuse") == 0) diff --git a/services/localzone.h b/services/localzone.h index dd7aa584c4618f24faeaea282c29e5c6275c0cad..1d6caeff2c7401dad5d8162ba76742974d63ec4d 100644 --- a/services/localzone.h +++ b/services/localzone.h @@ -83,6 +83,8 @@ enum localzone_type { local_zone_inform, /** log client address, and block (drop) */ local_zone_inform_deny, + /** log client address, and direct */ + local_zone_inform_redirect, /** resolve normally, even when there is local data */ local_zone_always_transparent, /** answer with error, even when there is local data */ @@ -491,6 +493,8 @@ enum respip_action { respip_inform = local_zone_inform, /** log query source and don't answer query */ respip_inform_deny = local_zone_inform_deny, + /** log query source and redirect */ + respip_inform_redirect = local_zone_inform_redirect, /** resolve normally, even when there is response-ip data */ respip_always_transparent = local_zone_always_transparent, /** answer with 'refused' response */ diff --git a/services/mesh.c b/services/mesh.c index bee0f76a4ad6fc6c81b90986ae70e83761ea78d6..d4f814d5a925f809a40a6dc191870c56a34a7008 100644 --- a/services/mesh.c +++ b/services/mesh.c @@ -85,7 +85,7 @@ timeval_add(struct timeval* d, const struct timeval* add) #ifndef S_SPLINT_S d->tv_sec += add->tv_sec; d->tv_usec += add->tv_usec; - if(d->tv_usec > 1000000 ) { + if(d->tv_usec >= 1000000 ) { d->tv_usec -= 1000000; d->tv_sec++; } @@ -354,6 +354,10 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo, int was_detached = 0; int was_noreply = 0; int added = 0; + struct sldns_buffer* r_buffer = rep->c->buffer; + if(rep->c->tcp_req_info) { + r_buffer = rep->c->tcp_req_info->spool_buffer; + } if(!unique) s = mesh_area_find(mesh, cinfo, qinfo, qflags&(BIT_RD|BIT_CD), 0, 0); /* does this create a new reply state? */ @@ -389,7 +393,7 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo, if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL, NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch)) edns->opt_list = NULL; - error_encode(rep->c->buffer, LDNS_RCODE_SERVFAIL, + error_encode(r_buffer, LDNS_RCODE_SERVFAIL, qinfo, qid, qflags, edns); comm_point_send_reply(rep); return; @@ -405,7 +409,7 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo, if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL, NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch)) edns->opt_list = NULL; - error_encode(rep->c->buffer, LDNS_RCODE_SERVFAIL, + error_encode(r_buffer, LDNS_RCODE_SERVFAIL, qinfo, qid, qflags, edns); comm_point_send_reply(rep); return; @@ -434,7 +438,7 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo, if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, &s->s, NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch)) edns->opt_list = NULL; - error_encode(rep->c->buffer, LDNS_RCODE_SERVFAIL, + error_encode(r_buffer, LDNS_RCODE_SERVFAIL, qinfo, qid, qflags, edns); comm_point_send_reply(rep); if(added) @@ -1153,7 +1157,7 @@ mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep, } /* Log reply sent */ if(m->s.env->cfg->log_replies) { - log_reply_info(0, &m->s.qinfo, &r->query_reply.addr, + log_reply_info(NO_VERBOSE, &m->s.qinfo, &r->query_reply.addr, r->query_reply.addrlen, duration, 0, r_buffer); } } @@ -1192,12 +1196,16 @@ void mesh_query_done(struct mesh_state* mstate) comm_point_drop_reply(&r->query_reply); else { struct sldns_buffer* r_buffer = r->query_reply.c->buffer; - if(r->query_reply.c->tcp_req_info) + if(r->query_reply.c->tcp_req_info) { r_buffer = r->query_reply.c->tcp_req_info->spool_buffer; + prev_buffer = NULL; + } mesh_send_reply(mstate, mstate->s.return_rcode, rep, r, r_buffer, prev, prev_buffer); - if(r->query_reply.c->tcp_req_info) + if(r->query_reply.c->tcp_req_info) { tcp_req_info_remove_mesh_state(r->query_reply.c->tcp_req_info, mstate); + r_buffer = NULL; + } prev = r; prev_buffer = r_buffer; } @@ -1332,30 +1340,24 @@ int mesh_state_add_reply(struct mesh_state* s, struct edns_data* edns, log_assert(!qinfo->local_alias->next && dsrc->count == 1 && qinfo->local_alias->rrset->rk.type == htons(LDNS_RR_TYPE_CNAME)); - /* Technically, we should make a local copy for the owner - * name of the RRset, but in the case of the first (and - * currently only) local alias RRset, the owner name should - * point to the qname of the corresponding query, which should - * be valid throughout the lifetime of this mesh_reply. So - * we can skip copying. */ - log_assert(qinfo->local_alias->rrset->rk.dname == - sldns_buffer_at(rep->c->buffer, LDNS_HEADER_SIZE)); - - d = regional_alloc_init(s->s.region, dsrc, - sizeof(struct packed_rrset_data) - + sizeof(size_t) + sizeof(uint8_t*) + sizeof(time_t)); + /* we should make a local copy for the owner name of + * the RRset */ + r->local_alias->rrset->rk.dname_len = + qinfo->local_alias->rrset->rk.dname_len; + r->local_alias->rrset->rk.dname = regional_alloc_init( + s->s.region, qinfo->local_alias->rrset->rk.dname, + qinfo->local_alias->rrset->rk.dname_len); + if(!r->local_alias->rrset->rk.dname) + return 0; + + /* the rrset is not packed, like in the cache, but it is + * individualy allocated with an allocator from localzone. */ + d = regional_alloc_zero(s->s.region, sizeof(*d)); if(!d) return 0; r->local_alias->rrset->entry.data = d; - d->rr_len = (size_t*)((uint8_t*)d + - sizeof(struct packed_rrset_data)); - d->rr_data = (uint8_t**)&(d->rr_len[1]); - d->rr_ttl = (time_t*)&(d->rr_data[1]); - d->rr_len[0] = dsrc->rr_len[0]; - d->rr_ttl[0] = dsrc->rr_ttl[0]; - d->rr_data[0] = regional_alloc_init(s->s.region, - dsrc->rr_data[0], d->rr_len[0]); - if(!d->rr_data[0]) + if(!rrset_insert_rr(s->s.region, d, dsrc->rr_data[0], + dsrc->rr_len[0], dsrc->rr_ttl[0], "CNAME local alias")) return 0; } else r->local_alias = NULL; @@ -1409,7 +1411,7 @@ mesh_continue(struct mesh_area* mesh, struct mesh_state* mstate, /* module is looping. Stop it. */ log_err("internal error: looping module (%s) stopped", mesh->mods.mod[mstate->s.curmod]->name); - log_query_info(0, "pass error for qstate", + log_query_info(NO_VERBOSE, "pass error for qstate", &mstate->s.qinfo); s = module_error; } diff --git a/services/modstack.c b/services/modstack.c index 136245a96838610dce9537ec2c5064b590ee1161..68e5928146dd5a6d71255e55982b667f8a775bb6 100644 --- a/services/modstack.c +++ b/services/modstack.c @@ -60,6 +60,9 @@ #ifdef CLIENT_SUBNET #include "edns-subnet/subnetmod.h" #endif +#ifdef USE_IPSET +#include "ipset/ipset.h" +#endif /** count number of modules (words) in the string */ static int @@ -113,8 +116,14 @@ modstack_config(struct module_stack* stack, const char* module_conf) for(i=0; inum; i++) { stack->mod[i] = module_factory(&module_conf); if(!stack->mod[i]) { - log_err("Unknown value for next module: '%s'", - module_conf); + char md[256]; + snprintf(md, sizeof(md), "%s", module_conf); + if(strchr(md, ' ')) *(strchr(md, ' ')) = 0; + if(strchr(md, '\t')) *(strchr(md, '\t')) = 0; + log_err("Unknown value in module-config, module: '%s'." + " This module is not present (not compiled in)," + " See the list of linked modules with unbound -h", + md); return 0; } } @@ -139,6 +148,9 @@ module_list_avail(void) #endif #ifdef CLIENT_SUBNET "subnetcache", +#endif +#ifdef USE_IPSET + "ipset", #endif "respip", "validator", @@ -167,6 +179,9 @@ module_funcs_avail(void) #endif #ifdef CLIENT_SUBNET &subnetmod_get_funcblock, +#endif +#ifdef USE_IPSET + &ipset_get_funcblock, #endif &respip_get_funcblock, &val_get_funcblock, diff --git a/services/outside_network.c b/services/outside_network.c index 8ed5de375852406a9b7cae0f0334c1fba541e743..f865f13c1390c7ca9b58559f7d0761c069695423 100644 --- a/services/outside_network.c +++ b/services/outside_network.c @@ -364,6 +364,8 @@ outnet_tcp_take_into_use(struct waiting_tcp* w, uint8_t* pkt, size_t pkt_len) comm_point_close(pend->c); return 0; } + verbose(VERB_ALGO, "the query is using TLS encryption, for %s", + (w->tls_auth_name?w->tls_auth_name:"an unauthenticated connection")); #ifdef USE_WINSOCK comm_point_tcp_win_bio_cb(pend->c, pend->c->ssl); #endif @@ -404,6 +406,8 @@ outnet_tcp_take_into_use(struct waiting_tcp* w, uint8_t* pkt, size_t pkt_len) } SSL_set_verify(pend->c->ssl, SSL_VERIFY_PEER, NULL); } +#else + verbose(VERB_ALGO, "the query has an auth_name, but libssl has no call to perform TLS authentication"); #endif /* HAVE_SSL_SET1_HOST */ } w->pkt = NULL; @@ -1964,7 +1968,6 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error, struct serviced_query* sq = (struct serviced_query*)arg; struct outside_network* outnet = sq->outnet; struct timeval now = *sq->outnet->now_tv; - int fallback_tcp = 0; sq->pending = NULL; /* removed after callback */ if(error == NETEVENT_TIMEOUT) { @@ -1996,14 +1999,8 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error, } return 0; } - if(rto >= RTT_MAX_TIMEOUT) { - /* fallback_tcp = 1; */ - /* UDP does not work, fallback to TCP below */ - } else { - serviced_callbacks(sq, NETEVENT_TIMEOUT, c, rep); - return 0; - } - } else if(error != NETEVENT_NOERROR) { + } + if(error != NETEVENT_NOERROR) { /* udp returns error (due to no ID or interface available) */ serviced_callbacks(sq, error, c, rep); return 0; @@ -2016,9 +2013,8 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error, sq->zone, sq->zonelen, sq->qbuf, sq->qbuflen, &sq->last_sent_time, sq->outnet->now_tv, c->buffer); #endif - if(!fallback_tcp) { - if( (sq->status == serviced_query_UDP_EDNS - ||sq->status == serviced_query_UDP_EDNS_FRAG) + if( (sq->status == serviced_query_UDP_EDNS + ||sq->status == serviced_query_UDP_EDNS_FRAG) && (LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer)) == LDNS_RCODE_FORMERR || LDNS_RCODE_WIRE( sldns_buffer_begin(c->buffer)) == LDNS_RCODE_NOTIMPL @@ -2032,7 +2028,7 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error, serviced_callbacks(sq, NETEVENT_CLOSED, c, rep); } return 0; - } else if(sq->status == serviced_query_UDP_EDNS && + } else if(sq->status == serviced_query_UDP_EDNS && !sq->edns_lame_known) { /* now we know that edns queries received answers store that */ log_addr(VERB_ALGO, "serviced query: EDNS works for", @@ -2042,7 +2038,7 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error, log_err("Out of memory caching edns works"); } sq->edns_lame_known = 1; - } else if(sq->status == serviced_query_UDP_EDNS_fallback && + } else if(sq->status == serviced_query_UDP_EDNS_fallback && !sq->edns_lame_known && (LDNS_RCODE_WIRE( sldns_buffer_begin(c->buffer)) == LDNS_RCODE_NOERROR || LDNS_RCODE_WIRE(sldns_buffer_begin(c->buffer)) == @@ -2060,12 +2056,12 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error, } } else { log_addr(VERB_ALGO, "serviced query: EDNS fails, but " - "not stored because need DNSSEC for", &sq->addr, + "not stored because need DNSSEC for", &sq->addr, sq->addrlen); } sq->status = serviced_query_UDP; - } - if(now.tv_sec > sq->last_sent_time.tv_sec || + } + if(now.tv_sec > sq->last_sent_time.tv_sec || (now.tv_sec == sq->last_sent_time.tv_sec && now.tv_usec > sq->last_sent_time.tv_usec)) { /* convert from microseconds to milliseconds */ @@ -2081,11 +2077,10 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error, sq->last_rtt, (time_t)now.tv_sec)) log_err("out of memory noting rtt."); } - } - } /* end of if_!fallback_tcp */ + } /* perform TC flag check and TCP fallback after updating our * cache entries for EDNS status and RTT times */ - if(LDNS_TC_WIRE(sldns_buffer_begin(c->buffer)) || fallback_tcp) { + if(LDNS_TC_WIRE(sldns_buffer_begin(c->buffer))) { /* fallback to TCP */ /* this discards partial UDP contents */ if(sq->status == serviced_query_UDP_EDNS || @@ -2139,18 +2134,14 @@ outnet_serviced_query(struct outside_network* outnet, if(outnet->do_udp && !(tcp_upstream || ssl_upstream)) { if(!serviced_udp_send(sq, buff)) { (void)rbtree_delete(outnet->serviced, sq); - free(sq->qbuf); - free(sq->zone); - free(sq); + serviced_node_del(&sq->node, NULL); free(cb); return NULL; } } else { if(!serviced_tcp_send(sq, buff)) { (void)rbtree_delete(outnet->serviced, sq); - free(sq->qbuf); - free(sq->zone); - free(sq); + serviced_node_del(&sq->node, NULL); free(cb); return NULL; } @@ -2286,11 +2277,60 @@ outnet_comm_point_for_udp(struct outside_network* outnet, return cp; } +/** setup SSL for comm point */ +static int +setup_comm_ssl(struct comm_point* cp, struct outside_network* outnet, + int fd, char* host) +{ + cp->ssl = outgoing_ssl_fd(outnet->sslctx, fd); + if(!cp->ssl) { + log_err("cannot create SSL object"); + return 0; + } +#ifdef USE_WINSOCK + comm_point_tcp_win_bio_cb(cp, cp->ssl); +#endif + cp->ssl_shake_state = comm_ssl_shake_write; + /* https verification */ +#ifdef HAVE_SSL_SET1_HOST + if((SSL_CTX_get_verify_mode(outnet->sslctx)&SSL_VERIFY_PEER)) { + /* because we set SSL_VERIFY_PEER, in netevent in + * ssl_handshake, it'll check if the certificate + * verification has succeeded */ + /* SSL_VERIFY_PEER is set on the sslctx */ + /* and the certificates to verify with are loaded into + * it with SSL_load_verify_locations or + * SSL_CTX_set_default_verify_paths */ + /* setting the hostname makes openssl verify the + * host name in the x509 certificate in the + * SSL connection*/ + if(!SSL_set1_host(cp->ssl, host)) { + log_err("SSL_set1_host failed"); + return 0; + } + } +#elif defined(HAVE_X509_VERIFY_PARAM_SET1_HOST) + /* openssl 1.0.2 has this function that can be used for + * set1_host like verification */ + if((SSL_CTX_get_verify_mode(outnet->sslctx)&SSL_VERIFY_PEER)) { + X509_VERIFY_PARAM* param = SSL_get0_param(cp->ssl); + X509_VERIFY_PARAM_set_hostflags(param, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS); + if(!X509_VERIFY_PARAM_set1_host(param, host, strlen(host))) { + log_err("X509_VERIFY_PARAM_set1_host failed"); + return 0; + } + } +#else + (void)host; +#endif /* HAVE_SSL_SET1_HOST */ + return 1; +} + struct comm_point* outnet_comm_point_for_tcp(struct outside_network* outnet, comm_point_callback_type* cb, void* cb_arg, struct sockaddr_storage* to_addr, socklen_t to_addrlen, - sldns_buffer* query, int timeout) + sldns_buffer* query, int timeout, int ssl, char* host) { struct comm_point* cp; int fd = outnet_get_tcp_fd(to_addr, to_addrlen, outnet->tcp_mss); @@ -2310,6 +2350,16 @@ outnet_comm_point_for_tcp(struct outside_network* outnet, } cp->repinfo.addrlen = to_addrlen; memcpy(&cp->repinfo.addr, to_addr, to_addrlen); + + /* setup for SSL (if needed) */ + if(ssl) { + if(!setup_comm_ssl(cp, outnet, fd, host)) { + log_err("cannot setup XoT"); + comm_point_delete(cp); + return NULL; + } + } + /* set timeout on TCP connection */ comm_point_start_listening(cp, fd, timeout); /* copy scratch buffer to cp->buffer */ @@ -2366,48 +2416,11 @@ outnet_comm_point_for_http(struct outside_network* outnet, /* setup for SSL (if needed) */ if(ssl) { - cp->ssl = outgoing_ssl_fd(outnet->sslctx, fd); - if(!cp->ssl) { + if(!setup_comm_ssl(cp, outnet, fd, host)) { log_err("cannot setup https"); comm_point_delete(cp); return NULL; } -#ifdef USE_WINSOCK - comm_point_tcp_win_bio_cb(cp, cp->ssl); -#endif - cp->ssl_shake_state = comm_ssl_shake_write; - /* https verification */ -#ifdef HAVE_SSL_SET1_HOST - if((SSL_CTX_get_verify_mode(outnet->sslctx)&SSL_VERIFY_PEER)) { - /* because we set SSL_VERIFY_PEER, in netevent in - * ssl_handshake, it'll check if the certificate - * verification has succeeded */ - /* SSL_VERIFY_PEER is set on the sslctx */ - /* and the certificates to verify with are loaded into - * it with SSL_load_verify_locations or - * SSL_CTX_set_default_verify_paths */ - /* setting the hostname makes openssl verify the - * host name in the x509 certificate in the - * SSL connection*/ - if(!SSL_set1_host(cp->ssl, host)) { - log_err("SSL_set1_host failed"); - comm_point_delete(cp); - return NULL; - } - } -#elif defined(HAVE_X509_VERIFY_PARAM_SET1_HOST) - /* openssl 1.0.2 has this function that can be used for - * set1_host like verification */ - if((SSL_CTX_get_verify_mode(outnet->sslctx)&SSL_VERIFY_PEER)) { - X509_VERIFY_PARAM* param = SSL_get0_param(cp->ssl); - X509_VERIFY_PARAM_set_hostflags(param, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS); - if(!X509_VERIFY_PARAM_set1_host(param, host, strlen(host))) { - log_err("X509_VERIFY_PARAM_set1_host failed"); - comm_point_delete(cp); - return NULL; - } - } -#endif /* HAVE_SSL_SET1_HOST */ } /* set timeout on TCP connection */ diff --git a/services/outside_network.h b/services/outside_network.h index 48ef03edba7cec2771248c544ca6485908038c47..3456a3da38b0b67941d70da8d05551680fff7006 100644 --- a/services/outside_network.h +++ b/services/outside_network.h @@ -570,12 +570,14 @@ struct comm_point* outnet_comm_point_for_udp(struct outside_network* outnet, * @param timeout: timeout for the TCP connection. * timeout in milliseconds, or -1 for no (change to the) timeout. * So seconds*1000. + * @param ssl: set to true for TLS. + * @param host: hostname for host name verification of TLS (or NULL if no TLS). * @return tcp_out commpoint, or NULL. */ struct comm_point* outnet_comm_point_for_tcp(struct outside_network* outnet, comm_point_callback_type* cb, void* cb_arg, struct sockaddr_storage* to_addr, socklen_t to_addrlen, - struct sldns_buffer* query, int timeout); + struct sldns_buffer* query, int timeout, int ssl, char* host); /** * Create http commpoint suitable for communication to the destination. diff --git a/sldns/parse.c b/sldns/parse.c index b62c405977561e75d75b7b00691970b0f98cca69..b30264e88e794ad993eb1ae1bc4d0cfceff159b3 100644 --- a/sldns/parse.c +++ b/sldns/parse.c @@ -325,8 +325,14 @@ sldns_bget_token_par(sldns_buffer *b, char *token, const char *delim, if (c == '\n' && p != 0) { /* in parentheses */ /* do not write ' ' if we want to skip spaces */ - if(!(skipw && (strchr(skipw, c)||strchr(skipw, ' ')))) + if(!(skipw && (strchr(skipw, c)||strchr(skipw, ' ')))) { + /* check for space for the space character */ + if (limit > 0 && (i >= limit || (size_t)(t-token) >= limit)) { + *t = '\0'; + return -1; + } *t++ = ' '; + } lc = c; continue; } diff --git a/sldns/rrdef.c b/sldns/rrdef.c index b365a4a8ec3a77c7715a4967dfab5eb119e30003..0af015f4b3b5e4824ca4868aa864ab1db6644b19 100644 --- a/sldns/rrdef.c +++ b/sldns/rrdef.c @@ -236,7 +236,7 @@ static const sldns_rdf_type type_caa_wireformat[] = { */ static sldns_rr_descriptor rdata_field_descriptors[] = { /* 0 */ - { 0, NULL, 0, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, + {(enum sldns_enum_rr_type)0, NULL, 0, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, /* 1 */ {LDNS_RR_TYPE_A, "A", 1, 1, type_a_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, /* 2 */ @@ -344,7 +344,7 @@ static sldns_rr_descriptor rdata_field_descriptors[] = { /* 53 */ {LDNS_RR_TYPE_SMIMEA, "SMIMEA", 4, 4, type_tlsa_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, /* 54 */ -{LDNS_RR_TYPE_NULL, "TYPE54", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE54", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, /* 55 * Hip ends with 0 or more Rendezvous Servers represented as dname's. * Hence the LDNS_RDF_TYPE_DNAME _variable field and the _maximum field @@ -358,8 +358,8 @@ static sldns_rr_descriptor rdata_field_descriptors[] = { /* 57 */ {LDNS_RR_TYPE_RKEY, "RKEY", 4, 4, type_key_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, #else -{LDNS_RR_TYPE_NULL, "TYPE56", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE57", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE56", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE57", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, #endif /* 58 */ {LDNS_RR_TYPE_TALINK, "TALINK", 2, 2, type_talink_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 2 }, @@ -372,54 +372,54 @@ static sldns_rr_descriptor rdata_field_descriptors[] = { {LDNS_RR_TYPE_OPENPGPKEY, "OPENPGPKEY", 1, 1, type_openpgpkey_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, /* 62 */ {LDNS_RR_TYPE_CSYNC, "CSYNC", 3, 3, type_csync_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE63", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE64", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE65", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE66", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE67", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE68", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE69", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE70", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE71", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE72", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE73", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE74", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE75", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE76", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE77", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE78", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE79", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE80", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE81", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE82", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE83", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE84", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE85", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE86", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE87", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE88", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE89", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE90", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE91", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE92", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE93", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE94", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE95", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE96", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE97", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE98", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE63", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE64", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE65", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE66", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE67", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE68", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE69", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE70", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE71", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE72", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE73", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE74", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE75", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE76", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE77", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE78", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE79", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE80", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE81", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE82", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE83", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE84", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE85", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE86", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE87", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE88", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE89", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE90", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE91", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE92", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE93", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE94", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE95", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE96", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE97", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE98", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, /* 99 */ {LDNS_RR_TYPE_SPF, "SPF", 1, 0, NULL, LDNS_RDF_TYPE_STR, LDNS_RR_NO_COMPRESS, 0 }, /* UINFO [IANA-Reserved] */ -{LDNS_RR_TYPE_NULL, "TYPE100", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE100", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, /* UID [IANA-Reserved] */ -{LDNS_RR_TYPE_NULL, "TYPE101", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE101", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, /* GID [IANA-Reserved] */ -{LDNS_RR_TYPE_NULL, "TYPE102", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE102", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, /* UNSPEC [IANA-Reserved] */ -{LDNS_RR_TYPE_NULL, "TYPE103", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE103", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, /* 104 */ {LDNS_RR_TYPE_NID, "NID", 2, 2, type_nid_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, @@ -435,145 +435,145 @@ static sldns_rr_descriptor rdata_field_descriptors[] = { /* 109 */ {LDNS_RR_TYPE_EUI64, "EUI64", 1, 1, type_eui64_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE110", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE111", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE112", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE113", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE114", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE115", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE116", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE117", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE118", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE119", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE120", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE121", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE122", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE123", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE124", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE125", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE126", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE127", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE128", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE129", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE130", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE131", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE132", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE133", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE134", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE135", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE136", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE137", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE138", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE139", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE140", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE141", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE142", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE143", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE144", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE145", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE146", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE147", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE148", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE149", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE150", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE151", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE152", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE153", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE154", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE155", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE156", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE157", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE158", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE159", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE160", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE161", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE162", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE163", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE164", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE165", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE166", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE167", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE168", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE169", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE170", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE171", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE172", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE173", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE174", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE175", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE176", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE177", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE178", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE179", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE180", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE181", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE182", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE183", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE184", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE185", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE186", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE187", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE188", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE189", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE190", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE191", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE192", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE193", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE194", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE195", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE196", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE197", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE198", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE199", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE200", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE201", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE202", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE203", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE204", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE205", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE206", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE207", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE208", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE209", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE210", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE211", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE212", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE213", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE214", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE215", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE216", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE217", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE218", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE219", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE220", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE221", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE222", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE223", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE224", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE225", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE226", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE227", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE228", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE229", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE230", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE231", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE232", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE233", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE234", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE235", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE236", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE237", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE238", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE239", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE240", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE241", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE242", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE243", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE244", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE245", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE246", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE247", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, -{LDNS_RR_TYPE_NULL, "TYPE248", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE110", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE111", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE112", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE113", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE114", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE115", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE116", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE117", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE118", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE119", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE120", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE121", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE122", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE123", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE124", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE125", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE126", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE127", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE128", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE129", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE130", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE131", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE132", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE133", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE134", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE135", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE136", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE137", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE138", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE139", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE140", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE141", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE142", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE143", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE144", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE145", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE146", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE147", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE148", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE149", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE150", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE151", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE152", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE153", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE154", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE155", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE156", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE157", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE158", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE159", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE160", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE161", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE162", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE163", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE164", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE165", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE166", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE167", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE168", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE169", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE170", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE171", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE172", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE173", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE174", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE175", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE176", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE177", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE178", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE179", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE180", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE181", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE182", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE183", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE184", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE185", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE186", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE187", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE188", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE189", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE190", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE191", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE192", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE193", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE194", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE195", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE196", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE197", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE198", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE199", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE200", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE201", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE202", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE203", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE204", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE205", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE206", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE207", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE208", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE209", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE210", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE211", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE212", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE213", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE214", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE215", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE216", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE217", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE218", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE219", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE220", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE221", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE222", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE223", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE224", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE225", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE226", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE227", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE228", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE229", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE230", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE231", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE232", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE233", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE234", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE235", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE236", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE237", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE238", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE239", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE240", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE241", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE242", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE243", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE244", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE245", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE246", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE247", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE248", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, /* LDNS_RDF_TYPE_INT16_DATA takes two fields (length and data) as one. * So, unlike RFC 2930 spec, we have 7 min/max rdf's i.s.o. 8/9. @@ -605,7 +605,7 @@ static sldns_rr_descriptor rdata_field_descriptors[] = { /* 258 */ {LDNS_RR_TYPE_AVC, "AVC", 1, 0, NULL, LDNS_RDF_TYPE_STR, LDNS_RR_NO_COMPRESS, 0 }, #else -{LDNS_RR_TYPE_NULL, "TYPE258", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE258", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, #endif /* split in array, no longer contiguous */ @@ -614,7 +614,7 @@ static sldns_rr_descriptor rdata_field_descriptors[] = { /* 32768 */ {LDNS_RR_TYPE_TA, "TA", 4, 4, type_ds_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, #else -{LDNS_RR_TYPE_NULL, "TYPE32768", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +{(enum sldns_enum_rr_type)0, "TYPE32768", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, #endif /* 32769 */ {LDNS_RR_TYPE_DLV, "DLV", 4, 4, type_ds_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 } @@ -710,18 +710,18 @@ sldns_get_rr_type_by_name(const char *name) /* special cases for query types */ if (strlen(name) == 4 && strncasecmp(name, "IXFR", 4) == 0) { - return 251; + return LDNS_RR_TYPE_IXFR; } else if (strlen(name) == 4 && strncasecmp(name, "AXFR", 4) == 0) { - return 252; + return LDNS_RR_TYPE_AXFR; } else if (strlen(name) == 5 && strncasecmp(name, "MAILB", 5) == 0) { - return 253; + return LDNS_RR_TYPE_MAILB; } else if (strlen(name) == 5 && strncasecmp(name, "MAILA", 5) == 0) { - return 254; + return LDNS_RR_TYPE_MAILA; } else if (strlen(name) == 3 && strncasecmp(name, "ANY", 3) == 0) { - return 255; + return LDNS_RR_TYPE_ANY; } - return 0; + return (enum sldns_enum_rr_type)0; } sldns_rr_class diff --git a/sldns/sbuffer.c b/sldns/sbuffer.c index 4ac83977eecbad6783995608ea1aed56dae5de59..f0f1fbd91e3f05c110e327b053f44d633969ad43 100644 --- a/sldns/sbuffer.c +++ b/sldns/sbuffer.c @@ -33,7 +33,6 @@ sldns_buffer_new(size_t capacity) buffer->_position = 0; buffer->_limit = buffer->_capacity = capacity; buffer->_fixed = 0; - buffer->_vfixed = 0; buffer->_status_err = 0; sldns_buffer_invariant(buffer); @@ -49,7 +48,6 @@ sldns_buffer_new_frm_data(sldns_buffer *buffer, void *data, size_t size) buffer->_position = 0; buffer->_limit = buffer->_capacity = size; buffer->_fixed = 0; - buffer->_vfixed = 0; if (!buffer->_fixed && buffer->_data) free(buffer->_data); buffer->_data = malloc(size); @@ -70,17 +68,6 @@ sldns_buffer_init_frm_data(sldns_buffer *buffer, void *data, size_t size) buffer->_data = data; buffer->_capacity = buffer->_limit = size; buffer->_fixed = 1; - buffer->_vfixed = 0; -} - -void -sldns_buffer_init_vfixed_frm_data(sldns_buffer *buffer, void *data, size_t size) -{ - memset(buffer, 0, sizeof(*buffer)); - buffer->_data = data; - buffer->_capacity = buffer->_limit = size; - buffer->_fixed = 1; - buffer->_vfixed = 1; } int @@ -141,19 +128,6 @@ sldns_buffer_printf(sldns_buffer *buffer, const char *format, ...) if (written == -1) { buffer->_status_err = 1; return -1; - } else if (!buffer->_vfixed && (size_t) written >= remaining) { - if (!sldns_buffer_reserve(buffer, (size_t) written + 1)) { - buffer->_status_err = 1; - return -1; - } - va_start(args, format); - written = vsnprintf((char *) sldns_buffer_current(buffer), - sldns_buffer_remaining(buffer), format, args); - va_end(args); - if (written == -1) { - buffer->_status_err = 1; - return -1; - } } buffer->_position += written; } @@ -173,13 +147,6 @@ sldns_buffer_free(sldns_buffer *buffer) free(buffer); } -void * -sldns_buffer_export(sldns_buffer *buffer) -{ - buffer->_fixed = 1; - return buffer->_data; -} - void sldns_buffer_copy(sldns_buffer* result, sldns_buffer* from) { diff --git a/sldns/sbuffer.h b/sldns/sbuffer.h index 2241640ddb122b6cb5f2da6f7c9f0a6adf430d6d..5dbe988cd1b8640929ba3d0d9c35386ccf5072cb 100644 --- a/sldns/sbuffer.h +++ b/sldns/sbuffer.h @@ -130,17 +130,6 @@ struct sldns_buffer /** If the buffer is fixed it cannot be resized */ unsigned _fixed : 1; - /** If the buffer is vfixed, no more than capacity bytes will be - * written to _data, however the _position counter will be updated - * with the amount that would have been written in consecutive - * writes. This allows for a modus operandi in which a sequence is - * written on a fixed capacity buffer (perhaps with _data on stack). - * When everything could be written, then the _data is immediately - * usable, if not, then a buffer could be allocated sized precisely - * to fit the data for a second attempt. - */ - unsigned _vfixed : 1; - /** The current state of the buffer. If writing to the buffer fails * for any reason, this value is changed. This way, you can perform * multiple writes in sequence and check for success afterwards. */ @@ -158,9 +147,9 @@ INLINE void sldns_buffer_invariant(sldns_buffer *buffer) { assert(buffer != NULL); - assert(buffer->_position <= buffer->_limit || buffer->_vfixed); + assert(buffer->_position <= buffer->_limit); assert(buffer->_limit <= buffer->_capacity); - assert(buffer->_data != NULL || (buffer->_vfixed && buffer->_capacity == 0 && buffer->_limit == 0)); + assert(buffer->_data != NULL); } #endif @@ -192,19 +181,6 @@ void sldns_buffer_new_frm_data(sldns_buffer *buffer, void *data, size_t size); */ void sldns_buffer_init_frm_data(sldns_buffer *buffer, void *data, size_t size); -/** - * Setup a buffer with the data pointed to. No data copied, no memory allocs. - * The buffer is "virtually" fixed. Writes beyond size (the capacity) will - * only update position, but no data will be written beyond capacity. This - * allows to determine how big the buffer should have been to contain all the - * written data, by looking at the position with sldns_buffer_position(), - * similarly to the return value of POSIX's snprintf. - * \param[in] buffer pointer to the buffer to put the data in - * \param[in] data the data to encapsulate in the buffer - * \param[in] size the size of the data - */ -void sldns_buffer_init_vfixed_frm_data(sldns_buffer *buffer, void *data, size_t size); - /** * clears the buffer and make it ready for writing. The buffer's limit * is set to the capacity and the position is set to 0. @@ -268,7 +244,7 @@ sldns_buffer_position(sldns_buffer *buffer) INLINE void sldns_buffer_set_position(sldns_buffer *buffer, size_t mark) { - assert(mark <= buffer->_limit || buffer->_vfixed); + assert(mark <= buffer->_limit); buffer->_position = mark; } @@ -282,7 +258,7 @@ sldns_buffer_set_position(sldns_buffer *buffer, size_t mark) INLINE void sldns_buffer_skip(sldns_buffer *buffer, ssize_t count) { - assert(buffer->_position + count <= buffer->_limit || buffer->_vfixed); + assert(buffer->_position + count <= buffer->_limit); buffer->_position += count; } @@ -354,7 +330,7 @@ int sldns_buffer_reserve(sldns_buffer *buffer, size_t amount); INLINE uint8_t * sldns_buffer_at(const sldns_buffer *buffer, size_t at) { - assert(at <= buffer->_limit || buffer->_vfixed); + assert(at <= buffer->_limit); return buffer->_data + at; } @@ -404,7 +380,7 @@ INLINE size_t sldns_buffer_remaining_at(sldns_buffer *buffer, size_t at) { sldns_buffer_invariant(buffer); - assert(at <= buffer->_limit || buffer->_vfixed); + assert(at <= buffer->_limit); return at < buffer->_limit ? buffer->_limit - at : 0; } @@ -457,15 +433,7 @@ sldns_buffer_available(sldns_buffer *buffer, size_t count) INLINE void sldns_buffer_write_at(sldns_buffer *buffer, size_t at, const void *data, size_t count) { - if (!buffer->_vfixed) - assert(sldns_buffer_available_at(buffer, at, count)); - else if (sldns_buffer_remaining_at(buffer, at) == 0) - return; - else if (count > sldns_buffer_remaining_at(buffer, at)) { - memcpy(buffer->_data + at, data, - sldns_buffer_remaining_at(buffer, at)); - return; - } + assert(sldns_buffer_available_at(buffer, at, count)); memcpy(buffer->_data + at, data, count); } @@ -480,15 +448,7 @@ sldns_buffer_write_at(sldns_buffer *buffer, size_t at, const void *data, size_t INLINE void sldns_buffer_set_at(sldns_buffer *buffer, size_t at, int c, size_t count) { - if (!buffer->_vfixed) - assert(sldns_buffer_available_at(buffer, at, count)); - else if (sldns_buffer_remaining_at(buffer, at) == 0) - return; - else if (count > sldns_buffer_remaining_at(buffer, at)) { - memset(buffer->_data + at, c, - sldns_buffer_remaining_at(buffer, at)); - return; - } + assert(sldns_buffer_available_at(buffer, at, count)); memset(buffer->_data + at, c, count); } @@ -538,7 +498,6 @@ sldns_buffer_write_string(sldns_buffer *buffer, const char *str) INLINE void sldns_buffer_write_u8_at(sldns_buffer *buffer, size_t at, uint8_t data) { - if (buffer->_vfixed && at + sizeof(data) > buffer->_limit) return; assert(sldns_buffer_available_at(buffer, at, sizeof(data))); buffer->_data[at] = data; } @@ -564,7 +523,6 @@ sldns_buffer_write_u8(sldns_buffer *buffer, uint8_t data) INLINE void sldns_buffer_write_u16_at(sldns_buffer *buffer, size_t at, uint16_t data) { - if (buffer->_vfixed && at + sizeof(data) > buffer->_limit) return; assert(sldns_buffer_available_at(buffer, at, sizeof(data))); sldns_write_uint16(buffer->_data + at, data); } @@ -590,7 +548,6 @@ sldns_buffer_write_u16(sldns_buffer *buffer, uint16_t data) INLINE void sldns_buffer_write_u32_at(sldns_buffer *buffer, size_t at, uint32_t data) { - if (buffer->_vfixed && at + sizeof(data) > buffer->_limit) return; assert(sldns_buffer_available_at(buffer, at, sizeof(data))); sldns_write_uint32(buffer->_data + at, data); } @@ -604,7 +561,6 @@ sldns_buffer_write_u32_at(sldns_buffer *buffer, size_t at, uint32_t data) INLINE void sldns_buffer_write_u48_at(sldns_buffer *buffer, size_t at, uint64_t data) { - if (buffer->_vfixed && at + 6 > buffer->_limit) return; assert(sldns_buffer_available_at(buffer, at, 6)); sldns_write_uint48(buffer->_data + at, data); } @@ -780,14 +736,6 @@ int sldns_buffer_printf(sldns_buffer *buffer, const char *format, ...) */ void sldns_buffer_free(sldns_buffer *buffer); -/** - * Makes the buffer fixed and returns a pointer to the data. The - * caller is responsible for free'ing the result. - * \param[in] *buffer the buffer to be exported - * \return void - */ -void *sldns_buffer_export(sldns_buffer *buffer); - /** * Copy contents of the from buffer to the result buffer and then flips * the result buffer. Data will be silently truncated if the result buffer is diff --git a/sldns/str2wire.c b/sldns/str2wire.c index 1a51bb695607a634b0f66f850c9f95b851240918..358e45345e654b2dbd0b1b5a56e5ebb9ac36ce56 100644 --- a/sldns/str2wire.c +++ b/sldns/str2wire.c @@ -150,6 +150,10 @@ int sldns_str2wire_dname_buf_origin(const char* str, uint8_t* buf, size_t* len, if(s) return s; if(rel && origin && dlen > 0) { + if((unsigned)dlen >= 0x00ffffffU || + (unsigned)origin_len >= 0x00ffffffU) + /* guard against integer overflow in addition */ + return RET_ERR(LDNS_WIREPARSE_ERR_GENERAL, *len); if(dlen + origin_len - 1 > LDNS_MAX_DOMAINLEN) return RET_ERR(LDNS_WIREPARSE_ERR_DOMAINNAME_OVERFLOW, LDNS_MAX_DOMAINLEN); @@ -168,7 +172,9 @@ uint8_t* sldns_str2wire_dname(const char* str, size_t* len) uint8_t dname[LDNS_MAX_DOMAINLEN+1]; *len = sizeof(dname); if(sldns_str2wire_dname_buf(str, dname, len) == 0) { - uint8_t* r = (uint8_t*)malloc(*len); + uint8_t* r; + if(*len > sizeof(dname)) return NULL; + r = (uint8_t*)malloc(*len); if(r) return memcpy(r, dname, *len); } *len = 0; @@ -187,7 +193,10 @@ rrinternal_get_owner(sldns_buffer* strbuf, uint8_t* rr, size_t* len, sldns_buffer_position(strbuf)); } - if(strcmp(token, "@") == 0) { + if(token_len < 2) /* make sure there is space to read "@" or "" */ + return RET_ERR(LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL, + sldns_buffer_position(strbuf)); + if(token[0]=='@' && token[1]=='\0') { uint8_t* tocopy; if (origin) { *dname_len = origin_len; @@ -1094,7 +1103,7 @@ int sldns_str2wire_str_buf(const char* str, uint8_t* rd, size_t* len) while(sldns_parse_char(&ch, &s)) { if(sl >= 255) return RET_ERR(LDNS_WIREPARSE_ERR_INVALID_STR, s-str); - if(*len < sl+1) + if(*len < sl+2) return RET_ERR(LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL, s-str); rd[++sl] = ch; @@ -2095,6 +2104,8 @@ int sldns_str2wire_int16_data_buf(const char* str, uint8_t* rd, size_t* len) char* s; int n; n = strtol(str, &s, 10); + if(n < 0) /* negative number not allowed */ + return LDNS_WIREPARSE_ERR_SYNTAX; if(*len < ((size_t)n)+2) return LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL; if(n > 65535) diff --git a/sldns/wire2str.c b/sldns/wire2str.c index 01ec84b3c50696b21135c866d5fc1c18f257e94d..d0d1632d407df3e57f28805cedba3ab73e8ab5f6 100644 --- a/sldns/wire2str.c +++ b/sldns/wire2str.c @@ -22,6 +22,7 @@ #include "sldns/parseutil.h" #include "sldns/sbuffer.h" #include "sldns/keyraw.h" +#include "util/data/dname.h" #ifdef HAVE_TIME_H #include #endif @@ -252,13 +253,13 @@ int sldns_wire2str_pkt_buf(uint8_t* d, size_t dlen, char* s, size_t slen) int sldns_wire2str_rr_buf(uint8_t* d, size_t dlen, char* s, size_t slen) { /* use arguments as temporary variables */ - return sldns_wire2str_rr_scan(&d, &dlen, &s, &slen, NULL, 0); + return sldns_wire2str_rr_scan(&d, &dlen, &s, &slen, NULL, 0, NULL); } int sldns_wire2str_rrquestion_buf(uint8_t* d, size_t dlen, char* s, size_t slen) { /* use arguments as temporary variables */ - return sldns_wire2str_rrquestion_scan(&d, &dlen, &s, &slen, NULL, 0); + return sldns_wire2str_rrquestion_scan(&d, &dlen, &s, &slen, NULL, 0, NULL); } int sldns_wire2str_rdata_buf(uint8_t* rdata, size_t rdata_len, char* str, @@ -266,13 +267,13 @@ int sldns_wire2str_rdata_buf(uint8_t* rdata, size_t rdata_len, char* str, { /* use arguments as temporary variables */ return sldns_wire2str_rdata_scan(&rdata, &rdata_len, &str, &str_len, - rrtype, NULL, 0); + rrtype, NULL, 0, NULL); } int sldns_wire2str_rr_unknown_buf(uint8_t* d, size_t dlen, char* s, size_t slen) { /* use arguments as temporary variables */ - return sldns_wire2str_rr_unknown_scan(&d, &dlen, &s, &slen, NULL, 0); + return sldns_wire2str_rr_unknown_scan(&d, &dlen, &s, &slen, NULL, 0, NULL); } int sldns_wire2str_rr_comment_buf(uint8_t* rr, size_t rrlen, size_t dname_len, @@ -310,7 +311,7 @@ int sldns_wire2str_opcode_buf(int opcode, char* s, size_t slen) int sldns_wire2str_dname_buf(uint8_t* d, size_t dlen, char* s, size_t slen) { /* use arguments as temporary variables */ - return sldns_wire2str_dname_scan(&d, &dlen, &s, &slen, NULL, 0); + return sldns_wire2str_dname_scan(&d, &dlen, &s, &slen, NULL, 0, NULL); } int sldns_str_vprint(char** str, size_t* slen, const char* format, va_list args) @@ -365,7 +366,7 @@ static int print_remainder_hex(const char* pref, uint8_t** d, size_t* dlen, int sldns_wire2str_pkt_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen) { - int w = 0; + int w = 0, comprloop = 0; unsigned qdcount, ancount, nscount, arcount, i; uint8_t* pkt = *d; size_t pktlen = *dlen; @@ -382,25 +383,25 @@ int sldns_wire2str_pkt_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen) w += sldns_str_print(s, slen, ";; QUESTION SECTION:\n"); for(i=0; i 4) + maxcompr = 4; /* just don't want to spend time, any more */ + } if(*dlen == 0) return sldns_str_print(s, slen, "ErrorMissingDname"); if(*pos == 0) { (*d)++; (*dlen)--; return sldns_str_print(s, slen, "."); } - while(*pos) { + while((!pkt || pos < pkt+pktlen) && *pos) { /* read label length */ uint8_t labellen = *pos++; if(in_buf) { (*d)++; (*dlen)--; } @@ -810,9 +820,12 @@ int sldns_wire2str_dname_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen, if(!pkt || target >= pktlen) return w + sldns_str_print(s, slen, "ErrorComprPtrOutOfBounds"); - if(counter++ > maxcompr) + if(counter++ > maxcompr) { + if(comprloop && *comprloop < 10) + (*comprloop)++; return w + sldns_str_print(s, slen, "ErrorComprPtrLooped"); + } in_buf = 0; pos = pkt+target; continue; @@ -928,14 +941,14 @@ int sldns_wire2str_ttl_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen) } int sldns_wire2str_rdf_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen, - int rdftype, uint8_t* pkt, size_t pktlen) + int rdftype, uint8_t* pkt, size_t pktlen, int* comprloop) { if(*dlen == 0) return 0; switch(rdftype) { case LDNS_RDF_TYPE_NONE: return 0; case LDNS_RDF_TYPE_DNAME: - return sldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen); + return sldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen, comprloop); case LDNS_RDF_TYPE_INT8: return sldns_wire2str_int8_scan(d, dlen, s, slen); case LDNS_RDF_TYPE_INT16: @@ -987,7 +1000,7 @@ int sldns_wire2str_rdf_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen, return sldns_wire2str_atma_scan(d, dlen, s, slen); case LDNS_RDF_TYPE_IPSECKEY: return sldns_wire2str_ipseckey_scan(d, dlen, s, slen, pkt, - pktlen); + pktlen, comprloop); case LDNS_RDF_TYPE_HIP: return sldns_wire2str_hip_scan(d, dlen, s, slen); case LDNS_RDF_TYPE_INT16_DATA: @@ -1529,7 +1542,7 @@ int sldns_wire2str_atma_scan(uint8_t** d, size_t* dl, char** s, size_t* sl) /* internal scan routine that can modify arguments on failure */ static int sldns_wire2str_ipseckey_scan_internal(uint8_t** d, size_t* dl, - char** s, size_t* sl, uint8_t* pkt, size_t pktlen) + char** s, size_t* sl, uint8_t* pkt, size_t pktlen, int* comprloop) { /* http://www.ietf.org/internet-drafts/draft-ietf-ipseckey-rr-12.txt*/ uint8_t precedence, gateway_type, algorithm; @@ -1557,7 +1570,7 @@ static int sldns_wire2str_ipseckey_scan_internal(uint8_t** d, size_t* dl, w += sldns_wire2str_aaaa_scan(d, dl, s, sl); break; case 3: /* dname */ - w += sldns_wire2str_dname_scan(d, dl, s, sl, pkt, pktlen); + w += sldns_wire2str_dname_scan(d, dl, s, sl, pkt, pktlen, comprloop); break; default: /* unknown */ return -1; @@ -1571,12 +1584,12 @@ static int sldns_wire2str_ipseckey_scan_internal(uint8_t** d, size_t* dl, } int sldns_wire2str_ipseckey_scan(uint8_t** d, size_t* dl, char** s, size_t* sl, - uint8_t* pkt, size_t pktlen) + uint8_t* pkt, size_t pktlen, int* comprloop) { uint8_t* od = *d; char* os = *s; size_t odl = *dl, osl = *sl; - int w=sldns_wire2str_ipseckey_scan_internal(d, dl, s, sl, pkt, pktlen); + int w=sldns_wire2str_ipseckey_scan_internal(d, dl, s, sl, pkt, pktlen, comprloop); if(w == -1) { *d = od; *s = os; diff --git a/sldns/wire2str.h b/sldns/wire2str.h index a64f5807269ce65010197c3e1680cb444dcd4235..0167fe7c1e2d2fdc23b67a38fe54c29e2183a638 100644 --- a/sldns/wire2str.h +++ b/sldns/wire2str.h @@ -156,10 +156,11 @@ int sldns_wire2str_pkt_scan(uint8_t** data, size_t* data_len, char** str, * @param str_len: length of string buffer. * @param pkt: packet for decompression, if NULL no decompression. * @param pktlen: length of packet buffer. + * @param comprloop: if pkt, bool detects compression loops. * @return number of characters (except null) needed to print. */ int sldns_wire2str_rr_scan(uint8_t** data, size_t* data_len, char** str, - size_t* str_len, uint8_t* pkt, size_t pktlen); + size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop); /** * Scan wireformat question rr to string, with user buffers. @@ -170,10 +171,11 @@ int sldns_wire2str_rr_scan(uint8_t** data, size_t* data_len, char** str, * @param str_len: length of string buffer. * @param pkt: packet for decompression, if NULL no decompression. * @param pktlen: length of packet buffer. + * @param comprloop: if pkt, bool detects compression loops. * @return number of characters (except null) needed to print. */ int sldns_wire2str_rrquestion_scan(uint8_t** data, size_t* data_len, char** str, - size_t* str_len, uint8_t* pkt, size_t pktlen); + size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop); /** * Scan wireformat RR to string in unknown RR format, with user buffers. @@ -184,10 +186,11 @@ int sldns_wire2str_rrquestion_scan(uint8_t** data, size_t* data_len, char** str, * @param str_len: length of string buffer. * @param pkt: packet for decompression, if NULL no decompression. * @param pktlen: length of packet buffer. + * @param comprloop: if pkt, bool detects compression loops. * @return number of characters (except null) needed to print. */ int sldns_wire2str_rr_unknown_scan(uint8_t** data, size_t* data_len, char** str, - size_t* str_len, uint8_t* pkt, size_t pktlen); + size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop); /** * Print to string the RR-information comment in default format, @@ -228,10 +231,12 @@ int sldns_wire2str_header_scan(uint8_t** data, size_t* data_len, char** str, * @param rrtype: RR type of Rdata, host format. * @param pkt: packet for decompression, if NULL no decompression. * @param pktlen: length of packet buffer. + * @param comprloop: if pkt, bool detects compression loops. * @return number of characters (except null) needed to print. */ int sldns_wire2str_rdata_scan(uint8_t** data, size_t* data_len, char** str, - size_t* str_len, uint16_t rrtype, uint8_t* pkt, size_t pktlen); + size_t* str_len, uint16_t rrtype, uint8_t* pkt, size_t pktlen, + int* comprloop); /** * Scan wireformat rdata to string in unknown format, with user buffers. @@ -254,10 +259,17 @@ int sldns_wire2str_rdata_unknown_scan(uint8_t** data, size_t* data_len, * @param str_len: length of string buffer. * @param pkt: packet for decompression, if NULL no decompression. * @param pktlen: length of packet buffer. + * @param comprloop: inout bool, that is set true if compression loop failure + * happens. Pass in 0, if passsed in as true, a lower bound is set + * on compression loops to stop arbitrary long packet parse times. + * This is meant so you can set it to 0 at the start of a list of dnames, + * and then scan all of them in sequence, if a loop happens, it becomes + * true and then it becomes more strict for the next dnames in the list. + * You can leave it at NULL if there is no pkt (pkt is NULL too). * @return number of characters (except null) needed to print. */ int sldns_wire2str_dname_scan(uint8_t** data, size_t* data_len, char** str, - size_t* str_len, uint8_t* pkt, size_t pktlen); + size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop); /** * Scan wireformat rr type to string, with user buffers. @@ -492,11 +504,13 @@ int sldns_wire2str_dname_buf(uint8_t* dname, size_t dname_len, char* str, * @param rdftype: the type of the rdata field, enum sldns_rdf_type. * @param pkt: packet for decompression, if NULL no decompression. * @param pktlen: length of packet buffer. + * @param comprloop: if pkt, bool detects compression loops. * @return number of characters (except null) needed to print. * Can return -1 on failure. */ int sldns_wire2str_rdf_scan(uint8_t** data, size_t* data_len, char** str, - size_t* str_len, int rdftype, uint8_t* pkt, size_t pktlen); + size_t* str_len, int rdftype, uint8_t* pkt, size_t pktlen, + int* comprloop); /** * Scan wireformat int8 field to string, with user buffers. @@ -793,11 +807,12 @@ int sldns_wire2str_atma_scan(uint8_t** data, size_t* data_len, char** str, * @param str_len: length of string buffer. * @param pkt: packet for decompression, if NULL no decompression. * @param pktlen: length of packet buffer. + * @param comprloop: if pkt, bool detects compression loops. * @return number of characters (except null) needed to print. * Can return -1 on failure. */ int sldns_wire2str_ipseckey_scan(uint8_t** data, size_t* data_len, char** str, - size_t* str_len, uint8_t* pkt, size_t pktlen); + size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop); /** * Scan wireformat HIP (algo, HIT, pubkey) field to string, with user buffers. diff --git a/smallapp/unbound-anchor.c b/smallapp/unbound-anchor.c index fbd8f130f554241f4c202bd597f3f842c608db36..b8bd1b850c1a02f7ec83b1b8240d817dd80bd4dd 100644 --- a/smallapp/unbound-anchor.c +++ b/smallapp/unbound-anchor.c @@ -190,6 +190,7 @@ usage(void) printf("-x path pathname to xml in url, default %s\n", XMLNAME); printf("-s path pathname to p7s in url, default %s\n", P7SNAME); printf("-n name signer's subject emailAddress, default %s\n", P7SIGNER); + printf("-b address source address to bind to\n"); printf("-4 work using IPv4 only\n"); printf("-6 work using IPv6 only\n"); printf("-f resolv.conf use given resolv.conf\n"); @@ -277,7 +278,7 @@ ub_ctx_error_exit(struct ub_ctx* ctx, const char* str, const char* str2) */ static struct ub_ctx* create_unbound_context(const char* res_conf, const char* root_hints, - const char* debugconf, int ip4only, int ip6only) + const char* debugconf, const char* srcaddr, int ip4only, int ip6only) { int r; struct ub_ctx* ctx = ub_ctx_create(); @@ -301,6 +302,10 @@ create_unbound_context(const char* res_conf, const char* root_hints, r = ub_ctx_set_option(ctx, "root-hints:", root_hints); if(r) ub_ctx_error_exit(ctx, root_hints, ub_strerror(r)); } + if(srcaddr) { + r = ub_ctx_set_option(ctx, "outgoing-interface:", srcaddr); + if(r) ub_ctx_error_exit(ctx, srcaddr, ub_strerror(r)); + } if(ip4only) { r = ub_ctx_set_option(ctx, "do-ip6:", "no"); if(r) ub_ctx_error_exit(ctx, "ip4only", ub_strerror(r)); @@ -350,7 +355,7 @@ read_cert_bio(BIO* bio) exit(0); } while(!BIO_eof(bio)) { - X509* x = PEM_read_bio_X509(bio, NULL, 0, NULL); + X509* x = PEM_read_bio_X509(bio, NULL, NULL, NULL); if(x == NULL) { if(verb) { printf("failed to read X509\n"); @@ -391,7 +396,7 @@ read_cert_file(const char* file) return NULL; } while(!feof(in)) { - X509* x = PEM_read_X509(in, NULL, 0, NULL); + X509* x = PEM_read_X509(in, NULL, NULL, NULL); if(x == NULL) { if(verb) { printf("failed to read X509 file\n"); @@ -620,6 +625,7 @@ parse_ip_addr(const char* str, int port) * @param res_conf: resolv.conf (if any). * @param root_hints: root hints (if any). * @param debugconf: unbound.conf for debugging options. + * @param srcaddr: source address option (if any). * @param ip4only: use only ip4 for resolve and only lookup A * @param ip6only: use only ip6 for resolve and only lookup AAAA * default is to lookup A and AAAA using ip4 and ip6. @@ -627,7 +633,8 @@ parse_ip_addr(const char* str, int port) */ static struct ip_list* resolve_name(const char* host, int port, const char* res_conf, - const char* root_hints, const char* debugconf, int ip4only, int ip6only) + const char* root_hints, const char* debugconf, + const char* srcaddr, int ip4only, int ip6only) { struct ub_ctx* ctx; struct ip_list* list = NULL; @@ -638,7 +645,7 @@ resolve_name(const char* host, int port, const char* res_conf, /* create resolver context */ ctx = create_unbound_context(res_conf, root_hints, debugconf, - ip4only, ip6only); + srcaddr, ip4only, ip6only); /* try resolution of A */ if(!ip6only) { @@ -728,7 +735,7 @@ print_sock_err(const char* msg) /** connect to IP address */ static int -connect_to_ip(struct ip_list* ip) +connect_to_ip(struct ip_list* ip, struct ip_list* src) { int fd; verb_addr("connect to", ip); @@ -738,6 +745,11 @@ connect_to_ip(struct ip_list* ip) print_sock_err("socket"); return -1; } + if(src && bind(fd, (struct sockaddr*)&src->addr, src->len) < 0) { + print_sock_err("bind"); + fd_close(fd); + return -1; + } if(connect(fd, (struct sockaddr*)&ip->addr, ip->len) < 0) { print_sock_err("connect"); fd_close(fd); @@ -770,7 +782,7 @@ TLS_initiate(SSL_CTX* sslctx, int fd) return NULL; } SSL_set_connect_state(ssl); - (void)SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); + (void)SSL_set_mode(ssl, (long)SSL_MODE_AUTO_RETRY); if(!SSL_set_fd(ssl, fd)) { if(verb) printf("SSL_set_fd error\n"); SSL_free(ssl); @@ -931,7 +943,7 @@ read_data_chunk(SSL* ssl, size_t len) size_t got = 0; int r; char* data; - if(len >= 0xfffffff0) + if((unsigned)len >= (unsigned)0xfffffff0) return NULL; /* to protect against integer overflow in malloc*/ data = malloc(len+1); if(!data) { @@ -1110,7 +1122,8 @@ read_http_result(SSL* ssl) /** https to an IP addr, return BIO with pathname or NULL */ static BIO* -https_to_ip(struct ip_list* ip, const char* pathname, const char* urlname) +https_to_ip(struct ip_list* ip, const char* pathname, const char* urlname, + struct ip_list* src) { int fd; SSL* ssl; @@ -1119,7 +1132,7 @@ https_to_ip(struct ip_list* ip, const char* pathname, const char* urlname) if(!sslctx) { return NULL; } - fd = connect_to_ip(ip); + fd = connect_to_ip(ip, src); if(fd == -1) { SSL_CTX_free(sslctx); return NULL; @@ -1147,10 +1160,12 @@ https_to_ip(struct ip_list* ip, const char* pathname, const char* urlname) * @param ip_list: list of IP addresses to use to fetch from. * @param pathname: pathname of file on server to GET. * @param urlname: name to pass as the virtual host for this request. + * @param src: if nonNULL, source address to bind to. * @return a memory BIO with the file in it. */ static BIO* -https(struct ip_list* ip_list, const char* pathname, const char* urlname) +https(struct ip_list* ip_list, const char* pathname, const char* urlname, + struct ip_list* src) { struct ip_list* ip; BIO* bio = NULL; @@ -1158,7 +1173,7 @@ https(struct ip_list* ip_list, const char* pathname, const char* urlname) wipe_ip_usage(ip_list); while( (ip = pick_random_ip(ip_list)) ) { ip->used = 1; - bio = https_to_ip(ip, pathname, urlname); + bio = https_to_ip(ip, pathname, urlname, src); if(bio) break; } if(!bio) { @@ -1913,18 +1928,26 @@ static int do_certupdate(const char* root_anchor_file, const char* root_cert_file, const char* urlname, const char* xmlname, const char* p7sname, const char* p7signer, const char* res_conf, const char* root_hints, - const char* debugconf, int ip4only, int ip6only, int port) + const char* debugconf, const char* srcaddr, int ip4only, int ip6only, + int port) + { STACK_OF(X509)* cert; BIO *xml, *p7s; struct ip_list* ip_list = NULL; + struct ip_list* src = NULL; /* read pem file or provide builtin */ cert = read_cert_or_builtin(root_cert_file); /* lookup A, AAAA for the urlname (or parse urlname if IP address) */ ip_list = resolve_name(urlname, port, res_conf, root_hints, debugconf, - ip4only, ip6only); + srcaddr, ip4only, ip6only); + + if(srcaddr && !(src = parse_ip_addr(srcaddr, 0))) { + if(verb) printf("cannot parse source address: %s\n", srcaddr); + exit(0); + } #ifdef USE_WINSOCK if(1) { /* libunbound finished, startup WSA for the https connection */ @@ -1940,8 +1963,8 @@ do_certupdate(const char* root_anchor_file, const char* root_cert_file, #endif /* fetch the necessary files over HTTPS */ - xml = https(ip_list, xmlname, urlname); - p7s = https(ip_list, p7sname, urlname); + xml = https(ip_list, xmlname, urlname, src); + p7s = https(ip_list, p7sname, urlname, src); /* verify and update the root anchor */ verify_and_update_anchor(root_anchor_file, xml, p7s, cert, p7signer); @@ -2192,14 +2215,14 @@ probe_date_allows_certupdate(const char* root_anchor_file) static struct ub_result * fetch_root_key(const char* root_anchor_file, const char* res_conf, - const char* root_hints, const char* debugconf, + const char* root_hints, const char* debugconf, const char* srcaddr, int ip4only, int ip6only) { struct ub_ctx* ctx; struct ub_result* dnskey; ctx = create_unbound_context(res_conf, root_hints, debugconf, - ip4only, ip6only); + srcaddr, ip4only, ip6only); add_5011_probe_root(ctx, root_anchor_file); dnskey = prime_root_key(ctx); ub_ctx_delete(ctx); @@ -2211,8 +2234,8 @@ static int do_root_update_work(const char* root_anchor_file, const char* root_cert_file, const char* urlname, const char* xmlname, const char* p7sname, const char* p7signer, const char* res_conf, const char* root_hints, - const char* debugconf, int ip4only, int ip6only, int force, - int res_conf_fallback, int port) + const char* debugconf, const char* srcaddr, int ip4only, int ip6only, + int force, int res_conf_fallback, int port) { struct ub_result* dnskey; int used_builtin = 0; @@ -2226,7 +2249,7 @@ do_root_update_work(const char* root_anchor_file, const char* root_cert_file, /* make unbound context with 5011-probe for root anchor, * and probe . DNSKEY */ dnskey = fetch_root_key(root_anchor_file, res_conf, - root_hints, debugconf, ip4only, ip6only); + root_hints, debugconf, srcaddr, ip4only, ip6only); rcode = dnskey->rcode; if (res_conf_fallback && res_conf && !dnskey->secure) { @@ -2234,7 +2257,7 @@ do_root_update_work(const char* root_anchor_file, const char* root_cert_file, ub_resolve_free(dnskey); /* try direct query without res_conf */ dnskey = fetch_root_key(root_anchor_file, NULL, - root_hints, debugconf, ip4only, ip6only); + root_hints, debugconf, srcaddr, ip4only, ip6only); if (rcode != 0 && dnskey->rcode == 0) { res_conf = NULL; rcode = 0; @@ -2255,7 +2278,7 @@ do_root_update_work(const char* root_anchor_file, const char* root_cert_file, probe_date_allows_certupdate(root_anchor_file)) || force) { if(do_certupdate(root_anchor_file, root_cert_file, urlname, xmlname, p7sname, p7signer, res_conf, root_hints, - debugconf, ip4only, ip6only, port)) + debugconf, srcaddr, ip4only, ip6only, port)) return 1; return used_builtin; } @@ -2281,10 +2304,11 @@ int main(int argc, char* argv[]) const char* res_conf = NULL; const char* root_hints = NULL; const char* debugconf = NULL; + const char* srcaddr = NULL; int dolist=0, ip4only=0, ip6only=0, force=0, port = HTTPS_PORT; int res_conf_fallback = 0; /* parse the options */ - while( (c=getopt(argc, argv, "46C:FRP:a:c:f:hln:r:s:u:vx:")) != -1) { + while( (c=getopt(argc, argv, "46C:FRP:a:b:c:f:hln:r:s:u:vx:")) != -1) { switch(c) { case 'l': dolist = 1; @@ -2298,6 +2322,9 @@ int main(int argc, char* argv[]) case 'a': root_anchor_file = optarg; break; + case 'b': + srcaddr = optarg; + break; case 'c': root_cert_file = optarg; break; @@ -2352,7 +2379,9 @@ int main(int argc, char* argv[]) ERR_load_SSL_strings(); #endif #if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_CRYPTO) +# ifndef S_SPLINT_S OpenSSL_add_all_algorithms(); +# endif #else OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS @@ -2368,5 +2397,5 @@ int main(int argc, char* argv[]) return do_root_update_work(root_anchor_file, root_cert_file, urlname, xmlname, p7sname, p7signer, res_conf, root_hints, debugconf, - ip4only, ip6only, force, res_conf_fallback, port); + srcaddr, ip4only, ip6only, force, res_conf_fallback, port); } diff --git a/smallapp/unbound-checkconf.c b/smallapp/unbound-checkconf.c index eddd3e172821e30cb91286164cf0dbc30446a5e8..1a66609cdd14d69818d569a90008740c489b170c 100644 --- a/smallapp/unbound-checkconf.c +++ b/smallapp/unbound-checkconf.c @@ -146,6 +146,42 @@ check_mod(struct config_file* cfg, struct module_func_block* fb) edns_known_options_delete(&env); } +/** true if addr is a localhost address, 127.0.0.1 or ::1 (with maybe "@port" + * after it) */ +static int +str_addr_is_localhost(const char* a) +{ + if(strncmp(a, "127.", 4) == 0) return 1; + if(strncmp(a, "::1", 3) == 0) return 1; + return 0; +} + +/** check do-not-query-localhost */ +static void +donotquerylocalhostcheck(struct config_file* cfg) +{ + if(cfg->donotquery_localhost) { + struct config_stub* p; + struct config_strlist* s; + for(p=cfg->forwards; p; p=p->next) { + for(s=p->addrs; s; s=s->next) { + if(str_addr_is_localhost(s->str)) { + fprintf(stderr, "unbound-checkconf: warning: forward-addr: '%s' is specified for forward-zone: '%s', but do-not-query-localhost: yes means that the address will not be used for lookups.\n", + s->str, p->name); + } + } + } + for(p=cfg->stubs; p; p=p->next) { + for(s=p->addrs; s; s=s->next) { + if(str_addr_is_localhost(s->str)) { + fprintf(stderr, "unbound-checkconf: warning: stub-addr: '%s' is specified for stub-zone: '%s', but do-not-query-localhost: yes means that the address will not be used for lookups.\n", + s->str, p->name); + } + } + } + } +} + /** check localzones */ static void localzonechecks(struct config_file* cfg) @@ -573,6 +609,10 @@ morechecks(struct config_file* cfg) && strcmp(cfg->module_conf, "python ipsecmod validator iterator") != 0 && strcmp(cfg->module_conf, "ipsecmod python validator iterator") != 0 && strcmp(cfg->module_conf, "ipsecmod validator python iterator") != 0 +#endif +#ifdef USE_IPSET + && strcmp(cfg->module_conf, "validator ipset iterator") != 0 + && strcmp(cfg->module_conf, "ipset iterator") != 0 #endif ) { fatal_exit("module conf '%s' is not known to work", @@ -602,6 +642,7 @@ morechecks(struct config_file* cfg) cfg->control_cert_file); } + donotquerylocalhostcheck(cfg); localzonechecks(cfg); view_and_respipchecks(cfg); #ifdef CLIENT_SUBNET diff --git a/smallapp/unbound-control.c b/smallapp/unbound-control.c index 3ea6aa033c08416705c6ea4fef07e715224e9ee7..ed8bad1e9719d58050fdd03aea7bcccc4aa93f1f 100644 --- a/smallapp/unbound-control.c +++ b/smallapp/unbound-control.c @@ -423,19 +423,19 @@ static void print_stats_shm(const char* cfgfile) if(!config_read(cfg, cfgfile, NULL)) fatal_exit("could not read config file"); /* get shm segments */ - id_ctl = shmget(cfg->shm_key, sizeof(int), SHM_R|SHM_W); + id_ctl = shmget(cfg->shm_key, sizeof(int), SHM_R); if(id_ctl == -1) { fatal_exit("shmget(%d): %s", cfg->shm_key, strerror(errno)); } - id_arr = shmget(cfg->shm_key+1, sizeof(int), SHM_R|SHM_W); + id_arr = shmget(cfg->shm_key+1, sizeof(int), SHM_R); if(id_arr == -1) { fatal_exit("shmget(%d): %s", cfg->shm_key+1, strerror(errno)); } - shm_stat = (struct ub_shm_stat_info*)shmat(id_ctl, NULL, 0); + shm_stat = (struct ub_shm_stat_info*)shmat(id_ctl, NULL, SHM_RDONLY); if(shm_stat == (void*)-1) { fatal_exit("shmat(%d): %s", id_ctl, strerror(errno)); } - stats = (struct ub_stats_info*)shmat(id_arr, NULL, 0); + stats = (struct ub_stats_info*)shmat(id_arr, NULL, SHM_RDONLY); if(stats == (void*)-1) { fatal_exit("shmat(%d): %s", id_arr, strerror(errno)); } @@ -499,6 +499,12 @@ setup_ctx(struct config_file* cfg) if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3) != SSL_OP_NO_SSLv3) ssl_err("could not set SSL_OP_NO_SSLv3"); +#if defined(SSL_OP_NO_RENEGOTIATION) + /* disable client renegotiation */ + if((SSL_CTX_set_options(ctx, SSL_OP_NO_RENEGOTIATION) & + SSL_OP_NO_RENEGOTIATION) != SSL_OP_NO_RENEGOTIATION) + ssl_err("could not set SSL_OP_NO_RENEGOTIATION"); +#endif if(!SSL_CTX_use_certificate_chain_file(ctx,c_cert)) ssl_path_err("Error setting up SSL_CTX client cert", c_cert); if (!SSL_CTX_use_PrivateKey_file(ctx,c_key,SSL_FILETYPE_PEM)) @@ -609,7 +615,7 @@ setup_ssl(SSL_CTX* ctx, int fd) if(!ssl) ssl_err("could not SSL_new"); SSL_set_connect_state(ssl); - (void)SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); + (void)SSL_set_mode(ssl, (long)SSL_MODE_AUTO_RETRY); if(!SSL_set_fd(ssl, fd)) ssl_err("could not SSL_set_fd"); while(1) { @@ -684,6 +690,27 @@ remote_write(SSL* ssl, int fd, const char* buf, size_t len) } } +/** check args, to see if too many args. Because when a file is sent it + * would wait for the terminal, and we can check for too many arguments, + * eg. user put arguments on the commandline. */ +static void +check_args_for_listcmd(int argc, char* argv[]) +{ + if(argc >= 1 && (strcmp(argv[0], "local_zones") == 0 || + strcmp(argv[0], "local_zones_remove") == 0 || + strcmp(argv[0], "local_datas") == 0 || + strcmp(argv[0], "local_datas_remove") == 0) && + argc >= 2) { + fatal_exit("too many arguments for command '%s', " + "content is piped in from stdin", argv[0]); + } + if(argc >= 1 && strcmp(argv[0], "view_local_datas") == 0 && + argc >= 3) { + fatal_exit("too many arguments for command '%s', " + "content is piped in from stdin", argv[0]); + } +} + /** send stdin to server */ static void send_file(SSL* ssl, int fd, FILE* in, char* buf, size_t sz) @@ -847,6 +874,7 @@ int main(int argc, char* argv[]) print_stats_shm(cfgfile); return 0; } + check_args_for_listcmd(argc, argv); #ifdef USE_WINSOCK if((r = WSAStartup(MAKEWORD(2,2), &wsa_data)) != 0) @@ -860,7 +888,9 @@ int main(int argc, char* argv[]) ERR_load_SSL_strings(); #endif #if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_CRYPTO) +# ifndef S_SPLINT_S OpenSSL_add_all_algorithms(); +# endif #else OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS diff --git a/smallapp/unbound-host.c b/smallapp/unbound-host.c index f02511fe56138dc4045539fc146bf4fb4db5ac87..1ae2d8521a2da1051a9f4058a76c9a7c4e62ac36 100644 --- a/smallapp/unbound-host.c +++ b/smallapp/unbound-host.c @@ -426,6 +426,7 @@ int main(int argc, char* argv[]) int c; char* qclass = NULL; char* qtype = NULL; + char* use_syslog = NULL; struct ub_ctx* ctx = NULL; int debuglevel = 0; @@ -486,11 +487,11 @@ int main(int argc, char* argv[]) } if(debuglevel != 0) /* set after possible -C options */ check_ub_res(ub_ctx_debuglevel(ctx, debuglevel)); - if(ub_ctx_get_option(ctx, "use-syslog", &optarg) == 0) { - if(strcmp(optarg, "yes") == 0) /* disable use-syslog */ + if(ub_ctx_get_option(ctx, "use-syslog", &use_syslog) == 0) { + if(strcmp(use_syslog, "yes") == 0) /* disable use-syslog */ check_ub_res(ub_ctx_set_option(ctx, "use-syslog:", "no")); - free(optarg); + free(use_syslog); } argc -= optind; argv += optind; @@ -505,7 +506,9 @@ int main(int argc, char* argv[]) ERR_load_SSL_strings(); #endif #if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_CRYPTO) +# ifndef S_SPLINT_S OpenSSL_add_all_algorithms(); +# endif #else OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS diff --git a/testcode/asynclook.c b/testcode/asynclook.c index f82c6dcab71c7cd3b017b1f6c1bc9f3b716d66eb..660f72a7df8cb0e1091626b3585c2345d5872f0e 100644 --- a/testcode/asynclook.c +++ b/testcode/asynclook.c @@ -482,7 +482,9 @@ int main(int argc, char** argv) ERR_load_SSL_strings(); #endif #if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_CRYPTO) +# ifndef S_SPLINT_S OpenSSL_add_all_algorithms(); +# endif #else OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS diff --git a/testcode/delayer.c b/testcode/delayer.c index 4abcfc235dcdcf569e76249393b9f0a9e6d9fb45..ebf883926cba60e82fb0da04aebb00ea17301e19 100644 --- a/testcode/delayer.c +++ b/testcode/delayer.c @@ -174,7 +174,7 @@ dl_tv_add(struct timeval* t1, const struct timeval* t2) #ifndef S_SPLINT_S t1->tv_sec += t2->tv_sec; t1->tv_usec += t2->tv_usec; - while(t1->tv_usec > 1000000) { + while(t1->tv_usec >= 1000000) { t1->tv_usec -= 1000000; t1->tv_sec++; } @@ -1042,7 +1042,7 @@ service(const char* bind_str, int bindport, const char* serv_str, } i=0; if(bindport == 0) { - bindport = 1024 + arc4random()%64000; + bindport = 1024 + ((int)arc4random())%64000; i = 100; } while(1) { @@ -1058,7 +1058,7 @@ service(const char* bind_str, int bindport, const char* serv_str, #endif if(i--==0) fatal_exit("cannot bind any port"); - bindport = 1024 + arc4random()%64000; + bindport = 1024 + ((int)arc4random())%64000; } else break; } fd_set_nonblock(s); diff --git a/testcode/fake_event.c b/testcode/fake_event.c index 4fb9bc8ed683f01e2eedffdaa4210a490fcc5083..d6e904a4d3cb9f6733fa279f5635991caad8501c 100644 --- a/testcode/fake_event.c +++ b/testcode/fake_event.c @@ -100,7 +100,7 @@ timeval_add(struct timeval* d, const struct timeval* add) #ifndef S_SPLINT_S d->tv_sec += add->tv_sec; d->tv_usec += add->tv_usec; - if(d->tv_usec > 1000000) { + if(d->tv_usec >= 1000000) { d->tv_usec -= 1000000; d->tv_sec++; } @@ -1629,7 +1629,8 @@ struct comm_point* outnet_comm_point_for_udp(struct outside_network* outnet, struct comm_point* outnet_comm_point_for_tcp(struct outside_network* outnet, comm_point_callback_type* cb, void* cb_arg, struct sockaddr_storage* to_addr, socklen_t to_addrlen, - struct sldns_buffer* query, int timeout) + struct sldns_buffer* query, int timeout, int ATTR_UNUSED(ssl), + char* ATTR_UNUSED(host)) { struct replay_runtime* runtime = (struct replay_runtime*) outnet->base; diff --git a/testcode/memstats.c b/testcode/memstats.c index dc29058ad774783587018ee16f129559931a3036..a253b00ac506da8a32432a9a01185efc83e9ec09 100644 --- a/testcode/memstats.c +++ b/testcode/memstats.c @@ -106,9 +106,16 @@ get_codeline(rbtree_type* tree, char* key, char* func) cl = calloc(1, sizeof(*cl)); if(!cl) return 0; cl->codeline = strdup(key); - if(!cl->codeline) return 0; + if(!cl->codeline) { + free(cl); + return 0; + } cl->func = strdup(func); - if(!cl->func) return 0; + if(!cl->func) { + free(cl->codeline); + free(cl); + return 0; + } cl->alloc = 0; cl->node.key = cl->codeline; (void)rbtree_insert(tree, &cl->node); diff --git a/testcode/mini_tdir.sh b/testcode/mini_tdir.sh index 96745515e3e4a31be6dfaedc08bc1718a993da04..5f02b0862ee2b848a2548752128a820e9d09e27c 100755 --- a/testcode/mini_tdir.sh +++ b/testcode/mini_tdir.sh @@ -119,7 +119,11 @@ fi # Copy echo "minitdir copy $1 to $dir" mkdir $dir +if cp --help 2>&1 | grep -- "-a" >/dev/null; then cp -a $name.tdir/* $dir/ +else +cp -R $name.tdir/* $dir/ +fi cd $dir # EXE diff --git a/testcode/perf.c b/testcode/perf.c index d6d2b05298e8254aac7cb435e97a41a2c3ea4cd8..5b170ca57379d60a7fe9377624a99648af752a58 100644 --- a/testcode/perf.c +++ b/testcode/perf.c @@ -177,7 +177,7 @@ perf_tv_add(struct timeval* t1, struct timeval* t2) #ifndef S_SPLINT_S t1->tv_sec += t2->tv_sec; t1->tv_usec += t2->tv_usec; - while(t1->tv_usec > 1000000) { + while(t1->tv_usec >= 1000000) { t1->tv_usec -= 1000000; t1->tv_sec++; } diff --git a/testcode/petal.c b/testcode/petal.c index a733017a470bbfec606ba5177faabfce410a0bf7..dcc31fdc5d99aa56816469ea70cd8070249c4ba7 100644 --- a/testcode/petal.c +++ b/testcode/petal.c @@ -301,7 +301,7 @@ setup_ssl(int s, SSL_CTX* ctx) SSL* ssl = SSL_new(ctx); if(!ssl) return NULL; SSL_set_accept_state(ssl); - (void)SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); + (void)SSL_set_mode(ssl, (long)SSL_MODE_AUTO_RETRY); if(!SSL_set_fd(ssl, s)) { SSL_free(ssl); return NULL; @@ -657,7 +657,9 @@ int main(int argc, char* argv[]) ERR_load_SSL_strings(); #endif #if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_CRYPTO) +# ifndef S_SPLINT_S OpenSSL_add_all_algorithms(); +# endif #else OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS diff --git a/testcode/streamtcp.c b/testcode/streamtcp.c index 668d6360bb9a435793a57163367fd94d556cdf68..65ea8d4bcae96317a190db032e625010dcaca8dd 100644 --- a/testcode/streamtcp.c +++ b/testcode/streamtcp.c @@ -314,7 +314,7 @@ static int get_random(void) if (RAND_bytes((unsigned char*)&r, (int)sizeof(r)) == 1) { return r; } - return arc4random(); + return (int)arc4random(); } /** send the TCP queries and print answers */ @@ -485,7 +485,9 @@ int main(int argc, char** argv) ERR_load_SSL_strings(); #endif #if OPENSSL_VERSION_NUMBER < 0x10100000 || !defined(HAVE_OPENSSL_INIT_CRYPTO) +# ifndef S_SPLINT_S OpenSSL_add_all_algorithms(); +# endif #else OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS diff --git a/testcode/testbound.c b/testcode/testbound.c index 246bc6735b450aac4fb19f3816289b1e1dd23224..4405231c0862661900c1ae6aa14b983291f63c75 100644 --- a/testcode/testbound.c +++ b/testcode/testbound.c @@ -65,6 +65,23 @@ /** config files (removed at exit) */ static struct config_strlist* cfgfiles = NULL; +#ifdef UNBOUND_ALLOC_STATS +# define strdup(s) unbound_stat_strdup_log(s, __FILE__, __LINE__, __func__) +char* unbound_stat_strdup_log(char* s, const char* file, int line, + const char* func); +char* unbound_stat_strdup_log(char* s, const char* file, int line, + const char* func) { + char* result; + size_t len; + if(!s) return NULL; + len = strlen(s); + log_info("%s:%d %s strdup(%u)", file, line, func, (unsigned)len+1); + result = unbound_stat_malloc(len+1); + memmove(result, s, len+1); + return result; +} +#endif /* UNBOUND_ALLOC_STATS */ + /** give commandline usage for testbound. */ static void testbound_usage(void) @@ -358,7 +375,7 @@ main(int argc, char* argv[]) testbound_selftest(); checklock_stop(); if(log_get_lock()) { - lock_quick_destroy((lock_quick_type*)log_get_lock()); + lock_basic_destroy((lock_basic_type*)log_get_lock()); } exit(0); case '1': @@ -463,8 +480,14 @@ main(int argc, char* argv[]) free(pass_argv[c]); if(res == 0) { log_info("Testbound Exit Success\n"); + /* remove configfile from here, the atexit() is for when + * there is a crash to remove the tmpdir file. + * This one removes the file while alloc and log locks are + * still valid, and can be logged (for memory calculation), + * it leaves the ptr NULL so the atexit does nothing. */ + remove_configfile(); if(log_get_lock()) { - lock_quick_destroy((lock_quick_type*)log_get_lock()); + lock_basic_destroy((lock_basic_type*)log_get_lock()); } #ifdef HAVE_PTHREAD /* dlopen frees its thread state (dlopen of gost engine) */ diff --git a/testcode/testpkts.c b/testcode/testpkts.c index 6c90567aa321a772410f139ca4657edcd6f387e6..82c1439677c01295511334ce3b46ff982bcf9f68 100644 --- a/testcode/testpkts.c +++ b/testcode/testpkts.c @@ -704,6 +704,7 @@ static sldns_rr_type get_qtype(uint8_t* pkt, size_t pktlen) uint8_t* d; size_t dl, sl=0; char* snull = NULL; + int comprloop = 0; if(pktlen < LDNS_HEADER_SIZE) return 0; if(LDNS_QDCOUNT(pkt) == 0) @@ -711,7 +712,7 @@ static sldns_rr_type get_qtype(uint8_t* pkt, size_t pktlen) /* skip over dname with dname-scan routine */ d = pkt+LDNS_HEADER_SIZE; dl = pktlen-LDNS_HEADER_SIZE; - (void)sldns_wire2str_dname_scan(&d, &dl, &snull, &sl, pkt, pktlen); + (void)sldns_wire2str_dname_scan(&d, &dl, &snull, &sl, pkt, pktlen, &comprloop); if(dl < 2) return 0; return sldns_read_uint16(d); @@ -723,6 +724,7 @@ static size_t get_qname_len(uint8_t* pkt, size_t pktlen) uint8_t* d; size_t dl, sl=0; char* snull = NULL; + int comprloop = 0; if(pktlen < LDNS_HEADER_SIZE) return 0; if(LDNS_QDCOUNT(pkt) == 0) @@ -730,7 +732,7 @@ static size_t get_qname_len(uint8_t* pkt, size_t pktlen) /* skip over dname with dname-scan routine */ d = pkt+LDNS_HEADER_SIZE; dl = pktlen-LDNS_HEADER_SIZE; - (void)sldns_wire2str_dname_scan(&d, &dl, &snull, &sl, pkt, pktlen); + (void)sldns_wire2str_dname_scan(&d, &dl, &snull, &sl, pkt, pktlen, &comprloop); return pktlen-dl-LDNS_HEADER_SIZE; } @@ -767,6 +769,7 @@ static uint32_t get_serial(uint8_t* p, size_t plen) size_t walk_len = plen, sl=0; char* snull = NULL; uint16_t i; + int comprloop = 0; if(walk_len < LDNS_HEADER_SIZE) return 0; @@ -776,10 +779,10 @@ static uint32_t get_serial(uint8_t* p, size_t plen) /* skip other records with wire2str_scan */ for(i=0; i < LDNS_QDCOUNT(p); i++) (void)sldns_wire2str_rrquestion_scan(&walk, &walk_len, - &snull, &sl, p, plen); + &snull, &sl, p, plen, &comprloop); for(i=0; i < LDNS_ANCOUNT(p); i++) (void)sldns_wire2str_rr_scan(&walk, &walk_len, &snull, &sl, - p, plen); + p, plen, &comprloop); /* walk through authority section */ for(i=0; i < LDNS_NSCOUNT(p); i++) { @@ -787,7 +790,7 @@ static uint32_t get_serial(uint8_t* p, size_t plen) uint8_t* dstart = walk; size_t dlen = walk_len; (void)sldns_wire2str_dname_scan(&dstart, &dlen, &snull, &sl, - p, plen); + p, plen, &comprloop); if(dlen >= 2 && sldns_read_uint16(dstart) == LDNS_RR_TYPE_SOA) { /* skip type, class, TTL, rdatalen */ if(dlen < 10) @@ -798,9 +801,9 @@ static uint32_t get_serial(uint8_t* p, size_t plen) dlen -= 10; /* check third rdf */ (void)sldns_wire2str_dname_scan(&dstart, &dlen, &snull, - &sl, p, plen); + &sl, p, plen, &comprloop); (void)sldns_wire2str_dname_scan(&dstart, &dlen, &snull, - &sl, p, plen); + &sl, p, plen, &comprloop); if(dlen < 4) return 0; verbose(3, "found serial %u in msg. ", @@ -809,7 +812,7 @@ static uint32_t get_serial(uint8_t* p, size_t plen) } /* move to next RR */ (void)sldns_wire2str_rr_scan(&walk, &walk_len, &snull, &sl, - p, plen); + p, plen, &comprloop); } return 0; } @@ -823,6 +826,7 @@ pkt_find_edns_opt(uint8_t** p, size_t* plen) size_t wlen = *plen, sl=0; char* snull = NULL; uint16_t i; + int comprloop = 0; if(wlen < LDNS_HEADER_SIZE) return 0; @@ -832,11 +836,11 @@ pkt_find_edns_opt(uint8_t** p, size_t* plen) /* skip other records with wire2str_scan */ for(i=0; i < LDNS_QDCOUNT(*p); i++) (void)sldns_wire2str_rrquestion_scan(&w, &wlen, &snull, &sl, - *p, *plen); + *p, *plen, &comprloop); for(i=0; i < LDNS_ANCOUNT(*p); i++) - (void)sldns_wire2str_rr_scan(&w, &wlen, &snull, &sl, *p, *plen); + (void)sldns_wire2str_rr_scan(&w, &wlen, &snull, &sl, *p, *plen, &comprloop); for(i=0; i < LDNS_NSCOUNT(*p); i++) - (void)sldns_wire2str_rr_scan(&w, &wlen, &snull, &sl, *p, *plen); + (void)sldns_wire2str_rr_scan(&w, &wlen, &snull, &sl, *p, *plen, &comprloop); /* walk through additional section */ for(i=0; i < LDNS_ARCOUNT(*p); i++) { @@ -844,14 +848,14 @@ pkt_find_edns_opt(uint8_t** p, size_t* plen) uint8_t* dstart = w; size_t dlen = wlen; (void)sldns_wire2str_dname_scan(&dstart, &dlen, &snull, &sl, - *p, *plen); + *p, *plen, &comprloop); if(dlen >= 2 && sldns_read_uint16(dstart) == LDNS_RR_TYPE_OPT) { *p = dstart+2; *plen = dlen-2; return 1; } /* move to next RR */ - (void)sldns_wire2str_rr_scan(&w, &wlen, &snull, &sl, *p, *plen); + (void)sldns_wire2str_rr_scan(&w, &wlen, &snull, &sl, *p, *plen, &comprloop); } return 0; } @@ -889,25 +893,26 @@ zerottls(uint8_t* pkt, size_t pktlen) char* snull = NULL; uint16_t i; uint16_t num = LDNS_ANCOUNT(pkt)+LDNS_NSCOUNT(pkt)+LDNS_ARCOUNT(pkt); + int comprloop = 0; if(walk_len < LDNS_HEADER_SIZE) return; walk += LDNS_HEADER_SIZE; walk_len -= LDNS_HEADER_SIZE; for(i=0; i < LDNS_QDCOUNT(pkt); i++) (void)sldns_wire2str_rrquestion_scan(&walk, &walk_len, - &snull, &sl, pkt, pktlen); + &snull, &sl, pkt, pktlen, &comprloop); for(i=0; i < num; i++) { /* wipe TTL */ uint8_t* dstart = walk; size_t dlen = walk_len; (void)sldns_wire2str_dname_scan(&dstart, &dlen, &snull, &sl, - pkt, pktlen); + pkt, pktlen, &comprloop); if(dlen < 8) return; sldns_write_uint32(dstart+4, 0); /* go to next RR */ (void)sldns_wire2str_rr_scan(&walk, &walk_len, &snull, &sl, - pkt, pktlen); + pkt, pktlen, &comprloop); } } @@ -1347,10 +1352,11 @@ static int equal_dname(uint8_t* q, size_t qlen, uint8_t* p, size_t plen) char qs[512], ps[512]; size_t qslen = sizeof(qs), pslen = sizeof(ps); char* qss = qs, *pss = ps; + int comprloop = 0; if(!qn || !pn) return 0; - (void)sldns_wire2str_dname_scan(&qn, &qlen, &qss, &qslen, q, qlen); - (void)sldns_wire2str_dname_scan(&pn, &plen, &pss, &pslen, p, plen); + (void)sldns_wire2str_dname_scan(&qn, &qlen, &qss, &qslen, q, qlen, &comprloop); + (void)sldns_wire2str_dname_scan(&pn, &plen, &pss, &pslen, p, plen, &comprloop); return (strcmp(qs, ps) == 0); } @@ -1364,11 +1370,12 @@ static int subdomain_dname(uint8_t* q, size_t qlen, uint8_t* p, size_t plen) char qs[5120], ps[5120]; size_t qslen = sizeof(qs), pslen = sizeof(ps); char* qss = qs, *pss = ps; + int comprloop = 0; if(!qn || !pn) return 0; /* decompresses domain names */ - (void)sldns_wire2str_dname_scan(&qn, &qlen, &qss, &qslen, q, qlen); - (void)sldns_wire2str_dname_scan(&pn, &plen, &pss, &pslen, p, plen); + (void)sldns_wire2str_dname_scan(&qn, &qlen, &qss, &qslen, q, qlen, &comprloop); + (void)sldns_wire2str_dname_scan(&pn, &plen, &pss, &pslen, p, plen, &comprloop); /* same: false, (strict subdomain check)??? */ if(strcmp(qs, ps) == 0) return 1; diff --git a/testcode/unitmain.c b/testcode/unitmain.c index e28be8c833afc371093efbd9ee174ba764b3163c..e8e7a44c7cb60e31035aaa006845157220e3b192 100644 --- a/testcode/unitmain.c +++ b/testcode/unitmain.c @@ -538,10 +538,8 @@ rnd_test(void) struct ub_randstate* r; int num = 1000, i; long int a[1000]; - unsigned int seed = (unsigned)time(NULL); unit_show_feature("ub_random"); - printf("ub_random seed is %u\n", seed); - unit_assert( (r = ub_initstate(seed, NULL)) ); + unit_assert( (r = ub_initstate(NULL)) ); for(i=0; i= 0); @@ -907,7 +905,7 @@ main(int argc, char* argv[]) ecs_test(); #endif /* CLIENT_SUBNET */ if(log_get_lock()) { - lock_quick_destroy((lock_quick_type*)log_get_lock()); + lock_basic_destroy((lock_basic_type*)log_get_lock()); } checklock_stop(); printf("%d checks ok.\n", testcount); diff --git a/testcode/unitmsgparse.c b/testcode/unitmsgparse.c index c0b38bac76e4f0f42f5cf470f24a838707a1d702..6f1edc6e9d6e559966cc5d7640c50be16ad2849e 100644 --- a/testcode/unitmsgparse.c +++ b/testcode/unitmsgparse.c @@ -179,7 +179,7 @@ perf_encode(struct query_info* qi, struct reply_info* rep, uint16_t id, /* encode a couple times */ for(i=0; ibits & EDNS_DO) ); + r2, 65535, (int)(edns->bits & EDNS_DO), 0); unit_assert(ret != 0); /* udp packets should fit */ attach_edns_record(out, edns); regional_free_all(r2); @@ -342,7 +342,7 @@ testpkt(sldns_buffer* pkt, struct alloc_cache* alloc, sldns_buffer* out, } else if(!check_formerr_gone) { const size_t lim = 512; ret = reply_info_encode(&qi, rep, id, flags, out, timenow, - region, 65535, (int)(edns.bits & EDNS_DO) ); + region, 65535, (int)(edns.bits & EDNS_DO), 0); unit_assert(ret != 0); /* udp packets should fit */ attach_edns_record(out, &edns); if(vbmp) printf("inlen %u outlen %u\n", @@ -357,7 +357,7 @@ testpkt(sldns_buffer* pkt, struct alloc_cache* alloc, sldns_buffer* out, ret = reply_info_encode(&qi, rep, id, flags, out, timenow, region, lim - calc_edns_field_size(&edns), - (int)(edns.bits & EDNS_DO)); + (int)(edns.bits & EDNS_DO), 0); unit_assert(ret != 0); /* should fit, but with TC */ attach_edns_record(out, &edns); if( LDNS_QDCOUNT(sldns_buffer_begin(out)) != diff --git a/testcode/unitregional.c b/testcode/unitregional.c index 49c8147c944c6f3a4ae97a263411edb0963e2b62..d21e2caa366e6d311fb89882609d6947204c081d 100644 --- a/testcode/unitregional.c +++ b/testcode/unitregional.c @@ -50,7 +50,9 @@ corner_cases(struct regional* r) size_t s; /* shadow count of allocated memory */ void* a; size_t minsize = sizeof(uint64_t); +#ifndef UNBOUND_ALLOC_NONREGIONAL size_t mysize; +#endif char* str; unit_assert(r); /* alloc cases: @@ -75,6 +77,7 @@ corner_cases(struct regional* r) s+=0; unit_assert(r->available == r->first_size - s); +#ifndef UNBOUND_ALLOC_NONREGIONAL a = regional_alloc(r, 1); unit_assert(a); memset(a, 0x42, 1); @@ -171,6 +174,7 @@ corner_cases(struct regional* r) memset(a, 0x42, mysize); unit_assert(a); unit_assert(r->available == 8); +#endif /* UNBOUND_ALLOC_NONREGIONAL */ /* test if really copied over */ str = "test12345"; diff --git a/testdata/auth_nsec3_ent.rpl b/testdata/auth_nsec3_ent.rpl new file mode 100644 index 0000000000000000000000000000000000000000..5730c8d52326dbff69be8919c3234c1dcab53449 --- /dev/null +++ b/testdata/auth_nsec3_ent.rpl @@ -0,0 +1,224 @@ +; config options +server: + target-fetch-policy: "0 0 0 0 0" + +auth-zone: + name: "unbound-auth-test.nlnetlabs.nl." + ## zonefile (or none). + ## zonefile: "example.com.zone" + ## master by IP address or hostname + ## can list multiple masters, each on one line. + ## master: + ## url for http fetch + ## url: + ## queries from downstream clients get authoritative answers. + ## for-downstream: yes + for-downstream: yes + ## queries are used to fetch authoritative answers from this zone, + ## instead of unbound itself sending queries there. + ## for-upstream: yes + for-upstream: yes + ## on failures with for-upstream, fallback to sending queries to + ## the authority servers + ## fallback-enabled: no + + ## this line generates zonefile: \n"/tmp/xxx.example.com"\n + zonefile: +TEMPFILE_NAME unbound-auth-test.nlnetlabs.nl + ## this is the inline file /tmp/xxx.unbound-auth-test.nlnetlabs.nl + ## the tempfiles are deleted when the testrun is over. +TEMPFILE_CONTENTS unbound-auth-test.nlnetlabs.nl +;; Zone: unbound-auth-test.nlnetlabs.nl. +; +unbound-auth-test.nlnetlabs.nl. 3600 IN SOA ns.nlnetlabs.nl. ralph.nlnetlabs.nl. 1554201247 14400 3600 604800 3600 +unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG SOA 13 3 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. NLFcC2oet+HC+1dhT4D/2JJFIcMiRtTM81KwvT7u8ybF3iDE4bnyrILvQk8DsizpYKwk+D3J3tMC3TV5+//qFw== +; +unbound-auth-test.nlnetlabs.nl. 3600 IN NS ns.nlnetlabs.nl. +unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG NS 13 3 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. Gm0UF77ljiInG4/HZ6Tkzx7z9N45WwwmbBt9KxeN3z1BkdBLiy10Du71ZBFLP71b+USs1rv5SJQ0hteZFbl8sg== +unbound-auth-test.nlnetlabs.nl. 3600 IN DNSKEY 256 3 13 S3Da9HqpFj0pEbI8WXOdkvN3vgZ6qxNSz4XyKkmWWAG28kq5T+/lWp36DUDvnMI9wJNuixzUHtgZ6oZoAaVrPg== ;{id = 15486 (zsk), size = 256b} +unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG DNSKEY 13 3 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. 1cLFaDb6kP8KnRJujW1ieHUdS5Tgdv59TCZ+FloCRJMJBwQAow6UKAIY7HHlTb8IHTajyUrjlxX/dN8S/5VwuA== +unbound-auth-test.nlnetlabs.nl. 3600 IN NSEC3PARAM 1 0 1 - +unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG NSEC3PARAM 13 3 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. GWgtJArNpfJ4ifoinUBUVRTlkk0CMemdozhMKY13dk3EQMP0jb4g49PcTAgEP2dBUs9efttQVQQpmFPyTGfN1w== +tvdhfml24jp7cott1qijj9812qu9ibh3.unbound-auth-test.nlnetlabs.nl. 3600 IN NSEC3 1 0 1 - 41pcah2j3fr8k99gj5pveh4igrjfc871 NS SOA RRSIG DNSKEY NSEC3PARAM ;{ flags: -, from: unbound-auth-test.nlnetlabs.nl. to: b.b.unbound-auth-test.nlnetlabs.nl.} +tvdhfml24jp7cott1qijj9812qu9ibh3.unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG NSEC3 13 4 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. DzwQTaZj4j29eHXEKllIFcq4yNWA7VMqkh8+gCrBO+GEek9+hGxL6ANsU0Hv6glyBmPDeYUZcy4xy0EEj1R4hQ== +; +;; Empty nonterminal: b.unbound-auth-test.nlnetlabs.nl. +apejmh1fqds9gir0nnsf4d5gtno10tg1.unbound-auth-test.nlnetlabs.nl. 3600 IN NSEC3 1 0 1 - dbs0aj50410urbvt3ghfr644n7h06gs5 ;{ flags: -, from: b.unbound-auth-test.nlnetlabs.nl. to: c.b.unbound-auth-test.nlnetlabs.nl.} +apejmh1fqds9gir0nnsf4d5gtno10tg1.unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG NSEC3 13 4 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. m9B0W8xDZF6ml/m8OujrZZBiF1O0wAeKciK/5FMT/hCjHR0hMrbXBPg/ZntpVJD/Pko2HcBvWKu87U721yTHyQ== +; +;; Empty nonterminal: a.b.unbound-auth-test.nlnetlabs.nl. +toqivctpt4pdcp5g19neqt19fvtgbgeu.unbound-auth-test.nlnetlabs.nl. 3600 IN NSEC3 1 0 1 - tvdhfml24jp7cott1qijj9812qu9ibh3 ;{ flags: -, from: a.b.unbound-auth-test.nlnetlabs.nl. to: unbound-auth-test.nlnetlabs.nl.} +toqivctpt4pdcp5g19neqt19fvtgbgeu.unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG NSEC3 13 4 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. Jr1oPPs+DGBVV13n4gG4AGVFsleItluLbtCIyQDcYZEA+e5JMkrLzfW3rXqXaUSUauR4iEu5FmTfs4GTsumdUw== +; +*.a.b.unbound-auth-test.nlnetlabs.nl. 3600 IN TXT "*.a.b" +*.a.b.unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG TXT 13 5 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. NrMUaNzZp88lXit/HLL/iDBHspDSfoM//K+/0VwUYRZjmVJQQHCHtHBGgR4NgrLi3ffvCAWq2LNGxDm+YMSl3g== +jrtu61ssgd18lfjglqrbbs5b2vmbh6cl.unbound-auth-test.nlnetlabs.nl. 3600 IN NSEC3 1 0 1 - k8r2bchsbehs5dbu5d6ivjfnmjb3jc8s TXT RRSIG ;{ flags: -, from: *.a.b.unbound-auth-test.nlnetlabs.nl. to: *.c.b.unbound-auth-test.nlnetlabs.nl.} +jrtu61ssgd18lfjglqrbbs5b2vmbh6cl.unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG NSEC3 13 4 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. kLIhE9+iz1OybJwXbtRJZst+Mk5u4OAtpZGWSwJUfqD6dXAk+h6msKAR18jpPeL7cCjXjIAKIv3x4oYRkl+uKw== +; +;; Empty nonterminal: b.b.unbound-auth-test.nlnetlabs.nl. +41pcah2j3fr8k99gj5pveh4igrjfc871.unbound-auth-test.nlnetlabs.nl. 3600 IN NSEC3 1 0 1 - apejmh1fqds9gir0nnsf4d5gtno10tg1 ;{ flags: -, from: b.b.unbound-auth-test.nlnetlabs.nl. to: b.unbound-auth-test.nlnetlabs.nl.} +41pcah2j3fr8k99gj5pveh4igrjfc871.unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG NSEC3 13 4 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. XlIjnuF313w0GXn6vymrAcsyuxZSaN6IShFjxQ5T2HUFePHBNvtRkL+TtMQZNlR8nTR3+MWcON0cOZIGjVCCjg== +; +*.b.b.unbound-auth-test.nlnetlabs.nl. 3600 IN TXT "*.b.b" +*.b.b.unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG TXT 13 5 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. FkS3ceWpoHyOKaa8OtywIl148Bwo0vkzBd263vqYe0puhuRa6IvNEk5ERdwfWt9eNEq+6IlizPT/dYxA2fXYXA== +ft7dasbom0copm9e2ak9k151dj08kjfs.unbound-auth-test.nlnetlabs.nl. 3600 IN NSEC3 1 0 1 - jrtu61ssgd18lfjglqrbbs5b2vmbh6cl TXT RRSIG ;{ flags: -, from: *.b.b.unbound-auth-test.nlnetlabs.nl. to: *.a.b.unbound-auth-test.nlnetlabs.nl.} +ft7dasbom0copm9e2ak9k151dj08kjfs.unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG NSEC3 13 4 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. 5QhLGohTRLQSGC8vstzDjqcwfrbOnLUG2OelSjvsZFy1smsWUxJBCQXQdx1+JX7xamZHlZESQtS+cELuZUqpvA== +; +;; Empty nonterminal: c.b.unbound-auth-test.nlnetlabs.nl. +dbs0aj50410urbvt3ghfr644n7h06gs5.unbound-auth-test.nlnetlabs.nl. 3600 IN NSEC3 1 0 1 - ft7dasbom0copm9e2ak9k151dj08kjfs ;{ flags: -, from: c.b.unbound-auth-test.nlnetlabs.nl. to: *.b.b.unbound-auth-test.nlnetlabs.nl.} +dbs0aj50410urbvt3ghfr644n7h06gs5.unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG NSEC3 13 4 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. hjk1foJWW68JK3O1Ktf0ZogoXVrMDw3mHVBBYTrpaBKX1gWR5icmJiOCYZWYx3z88PUnGkfH+kx4oDUjioqN+Q== +; +*.c.b.unbound-auth-test.nlnetlabs.nl. 3600 IN TXT "*.c.b" +*.c.b.unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG TXT 13 5 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. b7rFR5tlx5Y5SQqNdYBtfD6DrkNx9h79GCmnZfWrUzRz+A256k2v08IPRJDK+WxEHuYHjfNnVWxjRr9M1OW2Iw== +k8r2bchsbehs5dbu5d6ivjfnmjb3jc8s.unbound-auth-test.nlnetlabs.nl. 3600 IN NSEC3 1 0 1 - toqivctpt4pdcp5g19neqt19fvtgbgeu TXT RRSIG ;{ flags: -, from: *.c.b.unbound-auth-test.nlnetlabs.nl. to: a.b.unbound-auth-test.nlnetlabs.nl.} +k8r2bchsbehs5dbu5d6ivjfnmjb3jc8s.unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG NSEC3 13 4 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. 34BS1ajedCNdfXgUfxTyiAK1ichfFLshhJ3TnfplrUps0UsZaQLEG+EIlP4wTBtro2c6V8YCSmOuxuce4gYoDw== +; +TEMPFILE_END + +stub-zone: + name: "." + stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET. +CONFIG_END + +SCENARIO_BEGIN Test authority zone with NSEC3 empty nonterminal +; with exact match NSEC3 in existence (eg. not a CE-proof) + +; K.ROOT-SERVERS.NET. +RANGE_BEGIN 0 100 + ADDRESS 193.0.14.129 +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR NOERROR +SECTION QUESTION +. IN NS +SECTION ANSWER +. IN NS K.ROOT-SERVERS.NET. +SECTION ADDITIONAL +K.ROOT-SERVERS.NET. IN A 193.0.14.129 +ENTRY_END + +ENTRY_BEGIN +MATCH opcode subdomain +ADJUST copy_id copy_query +REPLY QR NOERROR +SECTION QUESTION +com. IN NS +SECTION AUTHORITY +com. IN NS a.gtld-servers.net. +SECTION ADDITIONAL +a.gtld-servers.net. IN A 192.5.6.30 +ENTRY_END +RANGE_END + +; a.gtld-servers.net. +RANGE_BEGIN 0 100 + ADDRESS 192.5.6.30 +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR NOERROR +SECTION QUESTION +com. IN NS +SECTION ANSWER +com. IN NS a.gtld-servers.net. +SECTION ADDITIONAL +a.gtld-servers.net. IN A 192.5.6.30 +ENTRY_END + +ENTRY_BEGIN +MATCH opcode subdomain +ADJUST copy_id copy_query +REPLY QR NOERROR +SECTION QUESTION +example.com. IN NS +SECTION AUTHORITY +example.com. IN NS ns.example.com. +SECTION ADDITIONAL +ns.example.com. IN A 1.2.3.44 +ENTRY_END +RANGE_END + +; ns.example.net. +RANGE_BEGIN 0 100 + ADDRESS 1.2.3.44 +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR NOERROR +SECTION QUESTION +example.net. IN NS +SECTION ANSWER +example.net. IN NS ns.example.net. +SECTION ADDITIONAL +ns.example.net. IN A 1.2.3.44 +ENTRY_END + +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR NOERROR +SECTION QUESTION +ns.example.net. IN A +SECTION ANSWER +ns.example.net. IN A 1.2.3.44 +SECTION AUTHORITY +example.net. IN NS ns.example.net. +ENTRY_END + +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR NOERROR +SECTION QUESTION +ns.example.net. IN AAAA +SECTION AUTHORITY +example.net. IN NS ns.example.net. +SECTION ADDITIONAL +www.example.net. IN A 1.2.3.44 +ENTRY_END + +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR NOERROR +SECTION QUESTION +example.com. IN NS +SECTION ANSWER +example.com. IN NS ns.example.net. +ENTRY_END + +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR NOERROR +SECTION QUESTION +www.example.com. IN A +SECTION ANSWER +www.example.com. IN A 10.20.30.40 +ENTRY_END +RANGE_END + +STEP 1 QUERY +ENTRY_BEGIN +REPLY RD DO +SECTION QUESTION +a.b.unbound-auth-test.nlnetlabs.nl. IN TXT +ENTRY_END + +; recursion happens here. +STEP 20 CHECK_ANSWER +ENTRY_BEGIN +MATCH all +REPLY QR AA RD RA DO NOERROR +SECTION QUESTION +a.b.unbound-auth-test.nlnetlabs.nl. IN TXT +SECTION ANSWER +SECTION AUTHORITY +unbound-auth-test.nlnetlabs.nl. 3600 IN SOA ns.nlnetlabs.nl. ralph.nlnetlabs.nl. 1554201247 14400 3600 604800 3600 +unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG SOA 13 3 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. NLFcC2oet+HC+1dhT4D/2JJFIcMiRtTM81KwvT7u8ybF3iDE4bnyrILv Qk8DsizpYKwk+D3J3tMC3TV5+//qFw== +toqivctpt4pdcp5g19neqt19fvtgbgeu.unbound-auth-test.nlnetlabs.nl. 3600 IN NSEC3 1 0 1 - TVDHFML24JP7COTT1QIJJ9812QU9IBH3 +toqivctpt4pdcp5g19neqt19fvtgbgeu.unbound-auth-test.nlnetlabs.nl. 3600 IN RRSIG NSEC3 13 4 3600 20190430103407 20190402103407 15486 unbound-auth-test.nlnetlabs.nl. Jr1oPPs+DGBVV13n4gG4AGVFsleItluLbtCIyQDcYZEA+e5JMkrLzfW3 rXqXaUSUauR4iEu5FmTfs4GTsumdUw== +ENTRY_END + +SCENARIO_END diff --git a/testdata/auth_nsec3_wild.rpl b/testdata/auth_nsec3_wild.rpl index acfe63bae8ce3d456dcd737ffbd685427733d8cb..1aeeebacc088eefe0c98b6207ca369b990d7654f 100644 --- a/testdata/auth_nsec3_wild.rpl +++ b/testdata/auth_nsec3_wild.rpl @@ -200,4 +200,31 @@ i6pi4e3o98e7vtkpjfhqn7g77d3mjcnv.test-ns-signed.dev.internet.nl. 3600 IN NSEC3 1 i6pi4e3o98e7vtkpjfhqn7g77d3mjcnv.test-ns-signed.dev.internet.nl. 3600 IN RRSIG NSEC3 8 5 3600 20190205132351 20190108132351 32784 test-ns-signed.dev.internet.nl. xLysIqn3r3rdHE3GvwVjZwUyuFClhkhgrQdwyc66RuHKE3MfSuhVr9cHTCJzhipF5TwQTbUpLOr74r99bzdiIY8Xkgjy2M0nc76v1ObSGJdPPjGTevbhDOnavUURwOR/q0NqqO2iPrgFjOVMZ+8uwRJtCty2iAVZfVG+qDzs8hU= ENTRY_END +; Check that the reply for a wildcard nodata answer contains the NSEC3s. +; qname denial NSEC3, closest encloser NSEC3, and type bitmap NSEC3. +STEP 30 QUERY +ENTRY_BEGIN +REPLY RD DO +SECTION QUESTION +something.a.b.test-ns-signed.dev.internet.nl. IN AAAA +ENTRY_END + +STEP 40 CHECK_ANSWER +ENTRY_BEGIN +MATCH all +REPLY QR AA RD RA DO NOERROR +SECTION QUESTION +something.a.b.test-ns-signed.dev.internet.nl. IN AAAA +SECTION ANSWER +SECTION AUTHORITY +test-ns-signed.dev.internet.nl. 3600 IN SOA ns.nlnetlabs.nl. ralph.nlnetlabs.nl. 4 14400 3600 604800 3600 +test-ns-signed.dev.internet.nl. 3600 IN RRSIG SOA 8 4 3600 20190205132351 20190108132351 32784 test-ns-signed.dev.internet.nl. ybb0Hc7NC+QOFEEv4cX2+Umlk+miiOAHmeP2Uwvg6lqfxkk+3g7yWBEKMinXjLKz0odWZ6fki6M/3yBPQX8SV0OCRY5gYvAHAjbxAIHozIM+5iwOkRQhNF1DRgQ3BLjL93f6T5e5Z4y1812iOpu4GYswXW/UTOZACXz2UiaCPAg= ;{id = 32784} +7ag3p2pfrvq09dpn63cvga8ub1rnrrg1.test-ns-signed.dev.internet.nl. 3600 IN NSEC3 1 0 1 - 93stp7o7i5n9gb83uu7vv6h8qltk14ig TXT RRSIG +7ag3p2pfrvq09dpn63cvga8ub1rnrrg1.test-ns-signed.dev.internet.nl. 3600 IN RRSIG NSEC3 8 5 3600 20190205132351 20190108132351 32784 test-ns-signed.dev.internet.nl. gtxoiTa3FRUqoRLvkWSxmWQ+DfijVd26gpKH3+GmGIcNB/sr/Cf8kERRwVVHvgzYIcvdJcys5b2LUXnZJwcdAlx7efZPWgNZzWxJrw6ES25LCWJOrp31isWn9FlAZGIbnpyEXxD2apBSmtyPnKbTgU6lHHS9jrsYHu4G8Zouv3k= ;{id = 32784} +fee0c2kfhi6bnljce6vehaenqq3pbupu.test-ns-signed.dev.internet.nl. 3600 IN NSEC3 1 0 1 - i6pi4e3o98e7vtkpjfhqn7g77d3mjcnv +fee0c2kfhi6bnljce6vehaenqq3pbupu.test-ns-signed.dev.internet.nl. 3600 IN RRSIG NSEC3 8 5 3600 20190205132351 20190108132351 32784 test-ns-signed.dev.internet.nl. WIb3ISP1nlafbyWoWa4z7sG5IS+V86PyvEMHdD/64hgsFkrCu483XK7VNnBz28SL/631JXA1R19O+UxeWhTUyctp8QSt6cEZcMPY8b7yG97rNFNvhSw75rSXXt+JwgIYHPHQV5oqPtVmEpQM5SfJd+hs+Nn1bJcWB3UaESNNAMQ= ;{id = 32784} +i6pi4e3o98e7vtkpjfhqn7g77d3mjcnv.test-ns-signed.dev.internet.nl. 3600 IN NSEC3 1 0 1 - kl94uofq16t2vlq0bmampf6e4o9k5hbi A AAAA RRSIG +i6pi4e3o98e7vtkpjfhqn7g77d3mjcnv.test-ns-signed.dev.internet.nl. 3600 IN RRSIG NSEC3 8 5 3600 20190205132351 20190108132351 32784 test-ns-signed.dev.internet.nl. xLysIqn3r3rdHE3GvwVjZwUyuFClhkhgrQdwyc66RuHKE3MfSuhVr9cHTCJzhipF5TwQTbUpLOr74r99bzdiIY8Xkgjy2M0nc76v1ObSGJdPPjGTevbhDOnavUURwOR/q0NqqO2iPrgFjOVMZ+8uwRJtCty2iAVZfVG+qDzs8hU= ;{id = 32784} +ENTRY_END + SCENARIO_END diff --git a/testdata/auth_xfr_notify.rpl b/testdata/auth_xfr_notify.rpl index 3603a223fbbc1a429dfec8e14e92a8357d235bb8..d7af5ae50ae303d15d68da2cb811cc78d2911d3f 100644 --- a/testdata/auth_xfr_notify.rpl +++ b/testdata/auth_xfr_notify.rpl @@ -195,7 +195,7 @@ ENTRY_END RANGE_END ; lookups for notify hostnames. -STEP 1 TIME_PASSES ELAPSED 0 +STEP 1 TIME_PASSES ELAPSE 0 ; now the query STEP 2 QUERY diff --git a/testdata/fwd_minimal.rpl b/testdata/fwd_minimal.rpl new file mode 100644 index 0000000000000000000000000000000000000000..e85d7124b1d8ce0386db36b16a54c9f94b893758 --- /dev/null +++ b/testdata/fwd_minimal.rpl @@ -0,0 +1,125 @@ +; This is a comment. +; config options go here. +server: + ; the snoop is to elicit a referral and check the additional + ; is fine for that, not removed by minimal-responses. + access-control: 127.0.0.1 allow_snoop + minimal-responses: yes +forward-zone: name: "." forward-addr: 216.0.0.1 +CONFIG_END + +SCENARIO_BEGIN Test minimal-responses +RANGE_BEGIN 0 100 + ENTRY_BEGIN + MATCH opcode qtype qname + ADJUST copy_id + REPLY QR RD RA NOERROR + SECTION QUESTION +www.example.com. IN A + SECTION ANSWER +www.example.com. IN A 10.20.30.40 + SECTION AUTHORITY +example.com. IN NS ns.example.com. + SECTION ADDITIONAL +ns.example.com. IN A 10.20.30.50 +txt.example.com. IN TXT "foo" + ENTRY_END + + ENTRY_BEGIN + MATCH opcode qtype qname + ADJUST copy_id + REPLY QR RD RA NOERROR + SECTION QUESTION +a.example.com. IN A + SECTION ANSWER + SECTION AUTHORITY +example.com. IN SOA host.example.com. ns.example.com. 1 2 3 4 5 +example.com. IN NS ns.example.com. + SECTION ADDITIONAL +ns.example.com. IN A 10.20.30.50 +txt.example.com. IN TXT "foo" + ENTRY_END + + ENTRY_BEGIN + MATCH opcode qtype qname + ADJUST copy_id + REPLY QR RD RA NXDOMAIN + SECTION QUESTION +b.example.com. IN A + SECTION ANSWER + SECTION AUTHORITY +example.com. IN SOA host.example.com. ns.example.com. 1 2 3 4 5 + SECTION ADDITIONAL +ns.example.com. IN A 10.20.30.50 +txt.example.com. IN TXT "foo" + ENTRY_END +RANGE_END + +STEP 1 QUERY +ENTRY_BEGIN +REPLY RD +SECTION QUESTION +www.example.com. IN A +ENTRY_END +STEP 4 CHECK_ANSWER +ENTRY_BEGIN +MATCH opcode qname qtype all +REPLY QR RD RA +SECTION QUESTION +www.example.com. IN A +SECTION ANSWER +www.example.com. IN A 10.20.30.40 +ENTRY_END + +STEP 11 QUERY +ENTRY_BEGIN +REPLY RD +SECTION QUESTION +a.example.com. IN A +ENTRY_END +STEP 14 CHECK_ANSWER +ENTRY_BEGIN +MATCH opcode qname qtype all +REPLY QR RD RA +SECTION QUESTION +a.example.com. IN A +SECTION AUTHORITY +example.com. IN SOA host.example.com. ns.example.com. 1 2 3 4 5 +ENTRY_END + +STEP 21 QUERY +ENTRY_BEGIN +REPLY RD +SECTION QUESTION +b.example.com. IN A +ENTRY_END +STEP 24 CHECK_ANSWER +ENTRY_BEGIN +MATCH opcode qname qtype all +REPLY QR RD RA NXDOMAIN +SECTION QUESTION +b.example.com. IN A +SECTION AUTHORITY +example.com. IN SOA host.example.com. ns.example.com. 1 2 3 4 5 +ENTRY_END + +; get a referral, the additional is not removed. +STEP 31 QUERY +ENTRY_BEGIN +REPLY +SECTION QUESTION +c.example.com. IN A +ENTRY_END +STEP 34 CHECK_ANSWER +ENTRY_BEGIN +MATCH opcode qname qtype all +REPLY QR RA NOERROR +SECTION QUESTION +c.example.com. IN A +SECTION AUTHORITY +example.com. IN NS ns.example.com. + SECTION ADDITIONAL +ns.example.com. IN A 10.20.30.50 +ENTRY_END + +SCENARIO_END diff --git a/testdata/iter_ranoaa_lame.rpl b/testdata/iter_ranoaa_lame.rpl index efb38a5907eca33607a015b840794c34d4881245..4808b25a9a162d0736df223623125bde138681d4 100644 --- a/testdata/iter_ranoaa_lame.rpl +++ b/testdata/iter_ranoaa_lame.rpl @@ -153,6 +153,16 @@ SECTION AUTHORITY example.net. IN NS ns.example.net. ENTRY_END +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR NOERROR +SECTION QUESTION +ns.example.com. IN A +SECTION ANSWER +ns.example.com. IN A 1.2.3.55 +ENTRY_END + ENTRY_BEGIN MATCH opcode qtype qname ADJUST copy_id diff --git a/testdata/iter_reclame_two.rpl b/testdata/iter_reclame_two.rpl index f30edd941472fa428b526493a05a0fdb2d3c4d7e..de4ef4165550925910a595b96026c0fd40af5561 100644 --- a/testdata/iter_reclame_two.rpl +++ b/testdata/iter_reclame_two.rpl @@ -105,6 +105,26 @@ lame.example.com. IN AAAA SECTION ANSWER ENTRY_END +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR RA NOERROR +SECTION QUESTION +ns.example.com. IN A +SECTION ANSWER +ns.example.com. IN A 1.2.3.4 +ENTRY_END + +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR RA NOERROR +SECTION QUESTION +lame.example.com. IN A +SECTION ANSWER +lame.example.com. IN A 1.2.3.5 +ENTRY_END + ENTRY_BEGIN MATCH opcode qtype qname ADJUST copy_id diff --git a/testdata/ssl_req_order.tdir/ssl_req_order.post b/testdata/ssl_req_order.tdir/ssl_req_order.post index bba50e309196ab6eb6d4a98ac46d4bed553da9d8..45067e10f47984add1026c7a9acf6ed08009bd08 100644 --- a/testdata/ssl_req_order.tdir/ssl_req_order.post +++ b/testdata/ssl_req_order.tdir/ssl_req_order.post @@ -9,3 +9,4 @@ kill_pid $FWD_PID kill_pid $UNBOUND_PID cat unbound.log +cat fwd.log diff --git a/util/alloc.c b/util/alloc.c index 908b1f42361f2bce89c68980a5572f4241802772..7e9618931ca6ab8a6ed58319f7f9c3bb7aea8c3e 100644 --- a/util/alloc.c +++ b/util/alloc.c @@ -376,6 +376,7 @@ void *unbound_stat_malloc(size_t size) { void* res; if(size == 0) size = 1; + log_assert(size <= SIZE_MAX-16); res = malloc(size+16); if(!res) return NULL; unbound_mem_alloc += size; @@ -398,6 +399,7 @@ void *unbound_stat_calloc(size_t nmemb, size_t size) if(nmemb != 0 && INT_MAX/nmemb < size) return NULL; /* integer overflow check */ s = (nmemb*size==0)?(size_t)1:nmemb*size; + log_assert(s <= SIZE_MAX-16); res = calloc(1, s+16); if(!res) return NULL; log_info("stat %p=calloc(%u, %u)", res+16, (unsigned)nmemb, (unsigned)size); @@ -447,6 +449,7 @@ void *unbound_stat_realloc(void *ptr, size_t size) /* nothing changes */ return ptr; } + log_assert(size <= SIZE_MAX-16); res = malloc(size+16); if(!res) return NULL; unbound_mem_alloc += size; @@ -521,7 +524,9 @@ void *unbound_stat_malloc_lite(size_t size, const char* file, int line, const char* func) { /* [prefix .. len .. actual data .. suffix] */ - void* res = malloc(size+lite_pad*2+sizeof(size_t)); + void* res; + log_assert(size <= SIZE_MAX-(lite_pad*2+sizeof(size_t))); + res = malloc(size+lite_pad*2+sizeof(size_t)); if(!res) return NULL; memmove(res, lite_pre, lite_pad); memmove(res+lite_pad, &size, sizeof(size_t)); @@ -538,6 +543,7 @@ void *unbound_stat_calloc_lite(size_t nmemb, size_t size, const char* file, if(nmemb != 0 && INT_MAX/nmemb < size) return NULL; /* integer overflow check */ req = nmemb * size; + log_assert(req <= SIZE_MAX-(lite_pad*2+sizeof(size_t))); res = malloc(req+lite_pad*2+sizeof(size_t)); if(!res) return NULL; memmove(res, lite_pre, lite_pad); diff --git a/util/config_file.c b/util/config_file.c index 9b60254d7b4e8467a5c11d401726298b8f093333..119b222384430ca694289b04ca08dc2af129c62f 100644 --- a/util/config_file.c +++ b/util/config_file.c @@ -255,6 +255,9 @@ config_create(void) cfg->neg_cache_size = 1 * 1024 * 1024; cfg->local_zones = NULL; cfg->local_zones_nodefault = NULL; +#ifdef USE_IPSET + cfg->local_zones_ipset = NULL; +#endif cfg->local_zones_disable_default = 0; cfg->local_data = NULL; cfg->local_zone_overrides = NULL; @@ -326,10 +329,14 @@ config_create(void) #ifdef USE_CACHEDB cfg->cachedb_backend = NULL; cfg->cachedb_secret = NULL; +#endif +#ifdef USE_IPSET + cfg->ipset_name_v4 = NULL; + cfg->ipset_name_v6 = NULL; #endif return cfg; error_exit: - config_delete(cfg); + config_delete(cfg); return NULL; } @@ -602,7 +609,7 @@ int config_set_option(struct config_file* cfg, const char* opt, else S_STR("control-key-file:", control_key_file) else S_STR("control-cert-file:", control_cert_file) else S_STR("module-config:", module_conf) - else S_STR("python-script:", python_script) + else S_STRLIST("python-script:", python_script) else S_YNO("disable-dnssec-lame-check:", disable_dnssec_lame_check) #ifdef CLIENT_SUBNET /* Can't set max subnet prefix here, since that value is used when @@ -1054,7 +1061,7 @@ config_get_option(struct config_file* cfg, const char* opt, else O_YNO(opt, "unblock-lan-zones", unblock_lan_zones) else O_YNO(opt, "insecure-lan-zones", insecure_lan_zones) else O_DEC(opt, "max-udp-size", max_udp_size) - else O_STR(opt, "python-script", python_script) + else O_LST(opt, "python-script", python_script) else O_YNO(opt, "disable-dnssec-lame-check", disable_dnssec_lame_check) else O_DEC(opt, "ip-ratelimit", ip_ratelimit) else O_DEC(opt, "ratelimit", ratelimit) @@ -1091,6 +1098,10 @@ config_get_option(struct config_file* cfg, const char* opt, #ifdef USE_CACHEDB else O_STR(opt, "backend", cachedb_backend) else O_STR(opt, "secret-seed", cachedb_secret) +#endif +#ifdef USE_IPSET + else O_STR(opt, "name-v4", ipset_name_v4) + else O_STR(opt, "name-v6", ipset_name_v6) #endif /* not here: * outgoing-permit, outgoing-avoid - have list of ports @@ -1310,6 +1321,9 @@ config_delview(struct config_view* p) free(p->name); config_deldblstrlist(p->local_zones); config_delstrlist(p->local_zones_nodefault); +#ifdef USE_IPSET + config_delstrlist(p->local_zones_ipset); +#endif config_delstrlist(p->local_data); free(p); } @@ -1384,7 +1398,6 @@ config_delete(struct config_file* cfg) free(cfg->version); free(cfg->module_conf); free(cfg->outgoing_avail_ports); - free(cfg->python_script); config_delstrlist(cfg->caps_whitelist); config_delstrlist(cfg->private_address); config_delstrlist(cfg->private_domain); @@ -1400,6 +1413,9 @@ config_delete(struct config_file* cfg) free(cfg->val_nsec3_key_iterations); config_deldblstrlist(cfg->local_zones); config_delstrlist(cfg->local_zones_nodefault); +#ifdef USE_IPSET + config_delstrlist(cfg->local_zones_ipset); +#endif config_delstrlist(cfg->local_data); config_deltrplstrlist(cfg->local_zone_overrides); config_del_strarray(cfg->tagname, cfg->num_tags); @@ -1420,6 +1436,7 @@ config_delete(struct config_file* cfg) free(cfg->dnstap_version); config_deldblstrlist(cfg->ratelimit_for_domain); config_deldblstrlist(cfg->ratelimit_below_domain); + config_delstrlist(cfg->python_script); #ifdef USE_IPSECMOD free(cfg->ipsecmod_hook); config_delstrlist(cfg->ipsecmod_whitelist); @@ -1427,6 +1444,10 @@ config_delete(struct config_file* cfg) #ifdef USE_CACHEDB free(cfg->cachedb_backend); free(cfg->cachedb_secret); +#endif +#ifdef USE_IPSET + free(cfg->ipset_name_v4); + free(cfg->ipset_name_v6); #endif free(cfg); } @@ -1630,6 +1651,31 @@ cfg_strlist_insert(struct config_strlist** head, char* item) return 1; } +int +cfg_strlist_append_ex(struct config_strlist** head, char* item) +{ + struct config_strlist *s; + if(!item || !head) + return 0; + s = (struct config_strlist*)calloc(1, sizeof(struct config_strlist)); + if(!s) + return 0; + s->str = item; + s->next = NULL; + + if (*head==NULL) { + *head = s; + } else { + struct config_strlist *last = *head; + while (last->next!=NULL) { + last = last->next; + } + last->next = s; + } + + return 1; +} + int cfg_str2list_insert(struct config_str2list** head, char* item, char* i2) { @@ -2107,6 +2153,11 @@ cfg_parse_local_zone(struct config_file* cfg, const char* val) if(strcmp(type, "nodefault")==0) { return cfg_strlist_insert(&cfg->local_zones_nodefault, strdup(name)); +#ifdef USE_IPSET + } else if(strcmp(type, "ipset")==0) { + return cfg_strlist_insert(&cfg->local_zones_ipset, + strdup(name)); +#endif } else { return cfg_str2list_insert(&cfg->local_zones, strdup(buf), strdup(type)); @@ -2381,3 +2432,4 @@ int options_remote_is_address(struct config_file* cfg) if(cfg->control_ifs.first->str[0] == 0) return 1; return (cfg->control_ifs.first->str[0] != '/'); } + diff --git a/util/config_file.h b/util/config_file.h index 3cffdbff93868b7d8cfecb97020f9116dcacaed4..b3ef930a0f161cd6c3727acc533ac44b74f35b86 100644 --- a/util/config_file.h +++ b/util/config_file.h @@ -384,6 +384,10 @@ struct config_file { struct config_str2list* local_zones; /** local zones nodefault list */ struct config_strlist* local_zones_nodefault; +#ifdef USE_IPSET + /** local zones ipset list */ + struct config_strlist* local_zones_ipset; +#endif /** do not add any default local zone */ int local_zones_disable_default; /** local data RRs configured */ @@ -433,7 +437,7 @@ struct config_file { char* control_cert_file; /** Python script file */ - char* python_script; + struct config_strlist* python_script; /** Use systemd socket activation. */ int use_systemd; @@ -574,6 +578,12 @@ struct config_file { /** timeout (in ms) for communication with the redis server */ int redis_timeout; #endif +#endif + + /* ipset module */ +#ifdef USE_IPSET + char* ipset_name_v4; + char* ipset_name_v6; #endif }; @@ -647,6 +657,10 @@ struct config_view { struct config_strlist* local_data; /** local zones nodefault list */ struct config_strlist* local_zones_nodefault; +#ifdef USE_IPSET + /** local zones ipset list */ + struct config_strlist* local_zones_ipset; +#endif /** Fallback to global local_zones when there is no match in the view * view specific tree. 1 for yes, 0 for no */ int isfirst; @@ -820,6 +834,14 @@ char* config_collate_cat(struct config_strlist* list); */ int cfg_strlist_append(struct config_strlist_head* list, char* item); +/** + * Searches the end of a string list and appends the given text. + * @param head: pointer to strlist head variable. + * @param item: new item. malloced by caller. if NULL the insertion fails. + * @return true on success. + */ +int cfg_strlist_append_ex(struct config_strlist** head, char* item); + /** * Find string in strlist. * @param head: pointer to strlist head variable. @@ -1181,3 +1203,4 @@ void w_config_adjust_directory(struct config_file* cfg); extern int fake_dsa, fake_sha1; #endif /* UTIL_CONFIG_FILE_H */ + diff --git a/util/configlexer.c b/util/configlexer.c index 5d93eb71f090e613501df2fc48158d869cb3a379..61525741f66bf95682df5323587bcb29379102b7 100644 --- a/util/configlexer.c +++ b/util/configlexer.c @@ -10,7 +10,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -85,10 +85,16 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + #endif /* ! C99 */ #endif /* ! FLEXINT_H */ +/* begin standard C++ headers. */ + /* TODO: this is always defined, so inline it */ #define yyconst const @@ -101,32 +107,26 @@ typedef unsigned int flex_uint32_t; /* Returned upon end-of-file. */ #define YY_NULL 0 -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * - /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START - /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ) - +#define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -163,7 +163,7 @@ extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - + #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) @@ -172,7 +172,7 @@ extern FILE *yyin, *yyout; do \ { \ /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ + int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ @@ -180,7 +180,6 @@ extern FILE *yyin, *yyout; YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) - #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE @@ -223,7 +222,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -262,7 +261,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) - /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ @@ -283,62 +281,56 @@ static int yy_start = 0; /* start state number */ */ static int yy_did_buffer_switch_on_eof; -void yyrestart (FILE *input_file ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); -void yy_delete_buffer (YY_BUFFER_STATE b ); -void yy_flush_buffer (YY_BUFFER_STATE b ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); -void yypop_buffer_state (void ); - -static void yyensure_buffer_stack (void ); -static void yy_load_buffer_state (void ); -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state ( void ); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) +static void yyensure_buffer_stack ( void ); +static void yy_load_buffer_state ( void ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); -void *yyalloc (yy_size_t ); -void *yyrealloc (void *,yy_size_t ); -void yyfree (void * ); +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); #define yy_new_buffer yy_create_buffer - #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } - #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } - #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ - -typedef unsigned char YY_CHAR; +typedef flex_uint8_t YY_CHAR; FILE *yyin = NULL, *yyout = NULL; typedef int yy_state_type; extern int yylineno; - int yylineno = 1; extern char *yytext; @@ -347,10 +339,10 @@ extern char *yytext; #endif #define yytext_ptr yytext -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yynoreturn yy_fatal_error (yyconst char* msg ); +static yy_state_type yy_get_previous_state ( void ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); +static int yy_get_next_buffer ( void ); +static void yynoreturn yy_fatal_error ( const char* msg ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. @@ -362,9 +354,8 @@ static void yynoreturn yy_fatal_error (yyconst char* msg ); (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 291 -#define YY_END_OF_BUFFER 292 +#define YY_NUM_RULES 294 +#define YY_END_OF_BUFFER 295 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -372,331 +363,332 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[2905] = +static const flex_int16_t yy_accept[2913] = { 0, - 1, 1, 273, 273, 277, 277, 281, 281, 285, 285, - 1, 1, 292, 289, 1, 271, 271, 290, 2, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 290, 273, 274, 274, 275, 290, 277, 278, 278, - 279, 290, 284, 281, 282, 282, 283, 290, 285, 286, - 286, 287, 290, 288, 272, 2, 276, 288, 290, 289, - 0, 1, 2, 2, 2, 2, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 273, - 0, 277, 0, 284, 0, 281, 285, 0, 288, 0, - 2, 2, 288, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 288, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 114, - 289, 289, 289, 289, 289, 289, 289, 288, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 96, 289, 289, 289, 289, 289, 289, 8, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 119, 289, 288, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 288, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 54, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 214, 289, 14, 15, 289, 18, - 17, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 113, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 198, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 3, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - - 289, 288, 289, 289, 289, 289, 289, 289, 289, 264, - 289, 289, 263, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 280, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 57, 289, 238, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 58, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 187, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 20, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 138, 289, 289, - 280, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 94, 289, 289, 289, 289, 289, 289, 289, 246, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 159, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 137, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 93, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - - 31, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 32, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 55, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 112, 289, 289, 289, 289, 289, - 111, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 56, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 160, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 45, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 229, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 49, 289, 50, 289, 289, 289, 289, 289, 97, 289, - 98, 289, 289, 289, 289, 95, 289, 289, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 7, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 207, 289, 289, 289, 289, 140, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 46, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 179, 289, 178, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 16, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 59, 289, 289, 289, 289, 289, 289, - 289, 289, 186, 289, 289, 289, 289, 289, 289, 100, - 289, 99, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 170, 289, 289, 289, 289, 289, 289, 289, - - 289, 120, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 78, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 82, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 53, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 173, 174, 289, 289, 289, 240, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 6, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 244, 289, 289, 289, 265, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 41, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 43, 289, 289, 289, 289, 289, 289, 289, 289, 166, - 289, 289, 289, 115, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 191, 289, 167, 289, 289, 289, - - 204, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 44, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 117, 105, 289, - 106, 289, 289, 289, 104, 289, 289, 289, 289, 289, - 289, 289, 289, 135, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 228, 289, 289, 289, 289, - 289, 289, 289, 289, 168, 289, 289, 289, 289, 289, - 171, 289, 177, 289, 289, 289, 289, 289, 203, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 92, 289, 289, 289, 289, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 51, 289, 289, 289, 25, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 19, - 289, 289, 289, 289, 289, 289, 26, 35, 289, 145, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 67, - 69, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 248, 289, 289, 289, 215, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 107, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 134, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 259, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 139, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 197, 289, 289, 289, - 289, 289, 289, 289, 289, 268, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 156, 289, 289, 289, 289, - 289, 289, 289, 289, 101, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - - 289, 289, 289, 289, 151, 289, 161, 289, 289, 289, - 289, 289, 123, 289, 289, 289, 289, 289, 88, 289, - 289, 289, 289, 189, 289, 289, 289, 289, 289, 289, - 205, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 220, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 116, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 155, 289, 289, 289, 289, 289, - 70, 71, 289, 289, 289, 289, 289, 52, 289, 289, - 289, 289, 289, 77, 162, 289, 180, 289, 208, 289, - 289, 172, 241, 289, 289, 289, 289, 289, 63, 289, - - 164, 289, 289, 289, 289, 289, 9, 289, 289, 289, - 91, 289, 289, 289, 289, 233, 289, 289, 289, 188, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 154, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 141, 289, 247, 289, - 289, 289, 289, 219, 289, 289, 289, 289, 289, 289, - 289, 289, 199, 289, 289, 289, 289, 239, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 262, 289, 163, 289, 289, 289, 289, 289, - 289, 289, 62, 64, 289, 289, 289, 289, 289, 289, - 289, 90, 289, 289, 289, 289, 231, 289, 289, 289, - 243, 289, 289, 289, 289, 289, 289, 289, 193, 33, - 27, 29, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 34, 289, 28, 30, 289, 289, 289, 289, 289, - 289, 289, 289, 87, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - - 289, 195, 192, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 61, 289, 289, - 118, 289, 108, 289, 289, 289, 289, 289, 289, 289, - 289, 136, 13, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 257, 289, 260, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 12, 289, 289, 21, 289, - 289, 289, 237, 289, 289, 289, 245, 289, 65, 289, - 201, 289, 289, 194, 289, 289, 60, 289, 289, 289, - 289, 22, 289, 42, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 150, 149, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 196, 190, 289, - 206, 289, 289, 249, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 72, 289, - 289, 289, 232, 289, 289, 289, 289, 176, 289, 289, - 289, 289, 200, 289, 289, 289, 289, 289, 289, 289, - 289, 266, 267, 147, 66, 289, 289, 157, 289, 289, - 102, 103, 289, 289, 289, 289, 142, 289, 144, 289, - 181, 289, 289, 289, 289, 148, 289, 289, 209, 289, - 289, 289, 289, 289, 289, 289, 125, 289, 289, 289, - - 289, 289, 289, 289, 289, 289, 289, 289, 216, 289, - 289, 289, 23, 289, 242, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 182, 289, 289, 230, - 289, 261, 289, 175, 289, 289, 289, 289, 47, 289, - 289, 289, 289, 4, 289, 289, 124, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 212, 36, 37, 289, 289, 289, 289, - 289, 289, 289, 250, 289, 289, 289, 289, 289, 289, - 218, 289, 289, 289, 185, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 75, 289, 48, 236, 289, 213, - - 289, 289, 289, 289, 11, 289, 289, 289, 289, 289, - 289, 289, 183, 79, 289, 39, 289, 289, 289, 289, - 289, 289, 289, 289, 153, 289, 289, 289, 289, 289, - 127, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 217, 121, 289, 289, 109, 110, 289, 289, 289, 81, - 85, 80, 289, 73, 289, 289, 289, 289, 289, 10, - 289, 289, 289, 234, 289, 289, 270, 38, 289, 289, - 289, 289, 289, 152, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 86, 84, 289, 74, 258, 289, 289, 289, - - 289, 289, 289, 289, 169, 289, 289, 289, 184, 289, - 289, 289, 289, 289, 289, 289, 289, 143, 68, 289, - 289, 289, 289, 289, 251, 289, 289, 289, 289, 289, - 289, 289, 122, 289, 83, 128, 129, 132, 133, 130, - 131, 76, 289, 235, 289, 289, 146, 289, 289, 289, - 289, 289, 211, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 158, 40, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 89, 289, 210, 289, 227, 255, 289, 289, 289, 289, - - 289, 289, 289, 289, 289, 289, 5, 289, 202, 289, - 289, 256, 289, 289, 289, 289, 289, 289, 289, 289, - 24, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 126, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 165, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 252, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 269, 289, 289, 223, 289, 289, 289, 289, - 289, 253, 289, 289, 289, 289, 289, 289, 254, 289, - 289, 289, 221, 289, 224, 225, 289, 289, 289, 289, - - 289, 222, 226, 0 + 1, 1, 276, 276, 280, 280, 284, 284, 288, 288, + 1, 1, 295, 292, 1, 274, 274, 293, 2, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 293, 276, 277, 277, 278, 293, 280, 281, 281, + 282, 293, 287, 284, 285, 285, 286, 293, 288, 289, + 289, 290, 293, 291, 275, 2, 279, 291, 293, 292, + 0, 1, 2, 2, 2, 2, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 276, + 0, 280, 0, 287, 0, 284, 288, 0, 291, 0, + 2, 2, 291, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 291, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 114, + 292, 292, 292, 292, 292, 292, 292, 291, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 96, 292, 292, 292, 292, 292, 292, 8, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 119, 292, 291, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 269, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 291, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 54, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 214, 292, + 14, 15, 292, 18, 17, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 113, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 198, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 3, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 292, 292, 291, 292, 292, + 292, 292, 292, 292, 292, 264, 292, 292, 263, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 283, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 57, 292, 238, + 292, 292, 292, 292, 292, 292, 292, 292, 270, 271, + + 292, 292, 292, 292, 292, 58, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 187, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 20, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 138, 292, 292, 283, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 94, + + 292, 292, 292, 292, 292, 292, 292, 246, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 159, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 137, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 93, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 292, 292, 292, 31, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 32, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 55, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 112, 292, 292, 292, 292, 292, 111, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 56, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 160, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 45, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 229, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 49, 292, + 50, 292, 292, 292, 292, 292, 97, 292, 98, 292, + + 292, 292, 292, 95, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 7, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 207, 292, 292, 292, 292, 140, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 46, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 179, + 292, 178, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 16, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 59, 292, 292, 292, 292, 292, 292, 292, 292, + 186, 292, 292, 292, 292, 292, 292, 100, 292, 99, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 170, 292, 292, 292, 292, 292, 292, 292, 292, 120, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 78, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 82, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 53, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 173, 174, 292, 292, 292, 240, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 6, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 244, 292, 292, 292, 265, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 41, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 43, 292, + 292, 292, 292, 292, 292, 292, 292, 166, 292, 292, + 292, 115, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 191, 292, 167, 292, 292, 292, 204, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 44, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 117, 105, 292, 106, 292, + 292, 292, 104, 292, 292, 292, 292, 292, 292, 292, + 292, 135, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 228, 292, 292, 292, 292, 292, 292, + 292, 292, 168, 292, 292, 292, 292, 292, 171, 292, + 177, 292, 292, 292, 292, 292, 203, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 92, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 51, 292, 292, 292, 25, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 19, 292, 292, + 292, 292, 292, 292, 26, 35, 292, 145, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 67, 69, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 248, 292, 292, 292, 215, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 107, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 134, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 259, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 139, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 197, 292, 292, 292, 292, 292, + 292, 292, 292, 268, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 156, 292, 292, 292, 292, 292, 292, + 292, 292, 101, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 151, 292, 161, 292, 292, 292, 292, 292, + 123, 292, 292, 292, 292, 292, 88, 292, 292, 292, + 292, 189, 292, 292, 292, 292, 292, 292, 205, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 220, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 116, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 155, 292, 292, 292, 292, 292, 70, 71, + 292, 292, 292, 292, 292, 52, 292, 292, 292, 292, + 292, 77, 162, 292, 180, 292, 208, 292, 292, 172, + + 241, 292, 292, 292, 292, 292, 63, 292, 164, 292, + 292, 292, 292, 292, 9, 292, 292, 292, 91, 292, + 292, 292, 292, 233, 292, 292, 292, 188, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 154, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 141, 292, 247, 292, 292, 292, + 292, 219, 292, 292, 292, 292, 292, 292, 292, 292, + + 199, 292, 292, 292, 292, 239, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 262, 292, 163, 292, 292, 292, 292, 292, 292, 292, + 62, 64, 292, 292, 292, 292, 292, 292, 292, 90, + 292, 292, 292, 292, 231, 292, 292, 292, 243, 292, + 292, 292, 292, 292, 292, 292, 193, 33, 27, 29, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 34, + 292, 28, 30, 292, 292, 292, 292, 292, 292, 292, + 292, 87, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 292, 292, 292, 292, 292, 195, + 192, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 61, 292, 292, 118, 292, + 108, 292, 292, 292, 292, 292, 292, 292, 292, 136, + 13, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 257, 292, 260, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 12, 292, 292, 21, 292, 292, 292, + 237, 292, 292, 292, 245, 292, 65, 292, 201, 292, + 292, 194, 292, 292, 60, 292, 292, 292, 292, 22, + 292, 42, 292, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 292, 292, 150, 149, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 196, 190, 292, 206, 292, + 292, 249, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 72, 292, 292, 292, + 232, 292, 292, 292, 292, 176, 292, 292, 292, 292, + 200, 292, 292, 292, 292, 292, 292, 292, 292, 266, + 267, 147, 66, 292, 292, 157, 292, 292, 102, 103, + 292, 292, 292, 292, 142, 292, 144, 292, 181, 292, + 292, 292, 292, 148, 292, 292, 209, 292, 292, 292, + + 292, 292, 292, 292, 125, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 216, 292, 292, 292, + 23, 292, 242, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 182, 292, 292, 230, 292, 261, + 292, 175, 292, 292, 292, 292, 47, 292, 292, 292, + 292, 4, 292, 292, 124, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 212, 36, 37, 292, 292, 292, 292, 292, 292, + 292, 250, 292, 292, 292, 292, 292, 292, 218, 292, + 292, 292, 185, 292, 292, 292, 292, 292, 292, 292, + + 292, 292, 75, 292, 48, 236, 292, 213, 292, 292, + 292, 292, 11, 292, 292, 292, 292, 292, 292, 292, + 183, 79, 292, 39, 292, 292, 292, 292, 292, 292, + 292, 292, 153, 292, 292, 292, 292, 292, 127, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 217, 121, + 292, 292, 109, 110, 292, 292, 292, 81, 85, 80, + 292, 73, 292, 292, 292, 292, 292, 10, 292, 292, + 292, 234, 292, 292, 273, 38, 292, 292, 292, 292, + 292, 152, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + + 86, 84, 292, 74, 258, 292, 292, 292, 292, 292, + 292, 292, 169, 292, 292, 292, 184, 292, 292, 292, + 292, 292, 292, 292, 292, 143, 68, 292, 292, 292, + 292, 292, 251, 292, 292, 292, 292, 292, 292, 292, + 122, 292, 83, 128, 129, 132, 133, 130, 131, 76, + 292, 235, 292, 292, 146, 292, 292, 292, 292, 292, + 211, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 158, 40, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 89, 292, + + 210, 292, 227, 255, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 5, 292, 202, 292, 292, 256, + 292, 292, 292, 292, 292, 292, 292, 292, 24, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 126, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 165, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 252, 292, 292, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, + 272, 292, 292, 223, 292, 292, 292, 292, 292, 253, + 292, 292, 292, 292, 292, 292, 254, 292, 292, 292, + + 221, 292, 224, 225, 292, 292, 292, 292, 292, 222, + 226, 0 } ; -static yyconst YY_CHAR yy_ec[256] = +static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, @@ -728,7 +720,7 @@ static yyconst YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst YY_CHAR yy_meta[67] = +static const YY_CHAR yy_meta[67] = { 0, 1, 2, 3, 4, 5, 1, 6, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, @@ -739,15 +731,15 @@ static yyconst YY_CHAR yy_meta[67] = 1, 1, 1, 1, 1, 1 } ; -static yyconst flex_uint16_t yy_base[2919] = +static const flex_int16_t yy_base[2927] = { 0, 0, 0, 64, 67, 70, 72, 78, 84, 89, 92, - 131, 137, 352, 307, 96, 8293, 8293, 8293, 109, 171, + 131, 137, 352, 307, 96, 8310, 8310, 8310, 109, 171, 85, 142, 215, 83, 117, 152, 207, 50, 110, 75, 167, 231, 112, 275, 121, 259, 323, 243, 291, 320, - 170, 368, 289, 8293, 8293, 8293, 104, 288, 8293, 8293, - 8293, 147, 286, 289, 8293, 8293, 8293, 305, 239, 8293, - 8293, 8293, 160, 210, 8293, 372, 8293, 177, 382, 201, + 170, 368, 289, 8310, 8310, 8310, 104, 288, 8310, 8310, + 8310, 147, 286, 289, 8310, 8310, 8310, 305, 239, 8310, + 8310, 8310, 160, 210, 8310, 372, 8310, 177, 382, 201, 386, 115, 0, 390, 0, 0, 160, 162, 199, 204, 188, 169, 303, 222, 256, 248, 377, 369, 254, 226, 313, 271, 365, 382, 296, 327, 396, 392, 381, 423, @@ -772,624 +764,626 @@ static yyconst flex_uint16_t yy_base[2919] = 928, 173, 916, 936, 943, 932, 935, 949, 947, 945, 958, 953, 962, 963, 971, 978, 968, 979, 973, 966, 970, 980, 989, 990, 1000, 992, 1004, 994, 1013, 1005, - 1017, 1021, 1009, 1019, 1026, 1057, 1015, 1007, 1040, 1058, - - 1051, 1030, 1044, 1084, 668, 1065, 1080, 1067, 1053, 1089, - 784, 1094, 1090, 1093, 1105, 1103, 1104, 1092, 1107, 1078, - 1109, 1128, 1143, 1135, 1136, 1148, 1130, 1163, 1137, 1158, - 1150, 1149, 1186, 1234, 1145, 1167, 1176, 1181, 1173, 8293, - 1198, 1183, 1283, 1204, 1193, 1232, 1206, 1215, 1221, 1239, - 1229, 1222, 1203, 1225, 1249, 1231, 1284, 1220, 1267, 1273, - 1274, 1300, 1276, 1265, 1303, 1301, 1296, 1292, 1280, 1309, - 1322, 1312, 1342, 1323, 1329, 1330, 1333, 1335, 1348, 1349, - 1350, 1339, 1344, 1365, 1366, 1369, 1378, 1379, 1362, 1386, - 1382, 1402, 1380, 1393, 1408, 1411, 1403, 1418, 1409, 1426, - - 1420, 1436, 1407, 1417, 1425, 1430, 1427, 1450, 1460, 1429, - 1445, 1444, 1454, 1467, 1471, 1464, 1472, 1474, 1459, 1482, - 8293, 1484, 1487, 1496, 1486, 1497, 1493, 8293, 1498, 1499, - 1501, 1447, 1512, 1532, 1524, 1520, 1522, 1541, 1535, 1537, - 1557, 1536, 1549, 1531, 1544, 1562, 1564, 1558, 1567, 1563, - 1551, 1561, 1606, 1583, 1571, 1600, 1589, 1601, 1611, 1631, - 1628, 1618, 1621, 1642, 1661, 1630, 1657, 1645, 1634, 1664, - 1649, 1670, 1662, 1663, 1667, 1680, 1678, 1681, 1676, 1687, - 1695, 1690, 8293, 1702, 1712, 1592, 1703, 1704, 1701, 1707, - 1709, 1714, 1731, 1727, 1723, 1736, 1718, 1754, 1741, 1760, - - 1745, 1758, 1742, 1749, 1765, 1763, 1780, 1759, 1778, 1781, - 1774, 1777, 1784, 1782, 1795, 1803, 1779, 1807, 1808, 1793, - 1806, 1815, 1819, 1802, 1809, 1827, 1820, 1834, 1826, 1843, - 1829, 1837, 1845, 1846, 1854, 1841, 1868, 1856, 1858, 1873, - 1853, 1864, 1887, 1883, 1885, 1894, 1897, 1896, 1903, 1891, - 1886, 1909, 1914, 1906, 1912, 1917, 1913, 1918, 1926, 1919, - 1936, 1955, 1945, 1949, 1953, 1957, 1940, 1946, 1966, 1963, - 1970, 1971, 1972, 1986, 1975, 1978, 1987, 1976, 1973, 1985, - 2003, 1993, 2014, 1998, 2012, 2027, 2015, 1999, 2026, 2013, - 2029, 2018, 2030, 2034, 2041, 2042, 2051, 2043, 2040, 2050, - - 2056, 2046, 2053, 2054, 2067, 2089, 2074, 2073, 2076, 2077, - 2086, 2079, 2091, 2084, 2101, 2106, 2094, 2104, 2110, 2111, - 2115, 2113, 2131, 2123, 2124, 2132, 2137, 2150, 2141, 2151, - 2157, 2142, 2154, 2140, 2159, 2165, 2167, 2175, 2182, 2186, - 2177, 2184, 2181, 2183, 2178, 2195, 2218, 2198, 2194, 8293, - 2209, 2220, 2211, 2210, 2217, 2207, 2215, 2221, 2235, 2242, - 2234, 2226, 2230, 2275, 8293, 2248, 8293, 8293, 2247, 8293, - 8293, 2256, 2262, 2255, 2269, 2239, 2285, 2261, 2283, 2279, - 2288, 2290, 2335, 2298, 2295, 2300, 2304, 2330, 2305, 2331, - 2322, 2319, 2340, 2343, 2349, 2346, 2357, 2360, 2358, 2367, - - 2362, 2364, 2380, 2389, 2378, 2381, 2391, 2379, 2384, 2399, - 2405, 2398, 2401, 2434, 8293, 2408, 2417, 2419, 2422, 2436, - 2430, 2431, 2435, 2439, 2423, 2440, 2444, 2446, 2442, 2450, - 2448, 2457, 2460, 8293, 2467, 2471, 2477, 2472, 2485, 2484, - 2483, 2466, 2494, 2475, 2486, 2487, 2501, 2516, 8293, 2518, - 2526, 2508, 2528, 2509, 2511, 2514, 2515, 2524, 2539, 2536, - 2545, 2547, 2543, 2458, 2541, 2555, 2554, 2564, 2563, 2566, - 2574, 2583, 2568, 2575, 2577, 2590, 2589, 2581, 2593, 2594, - 2592, 2599, 2604, 2602, 2623, 2628, 2629, 2608, 2625, 2638, - 2611, 2641, 2639, 2644, 2630, 2640, 2649, 2631, 2646, 2659, - - 2656, 2662, 2664, 2678, 2680, 2663, 2667, 2688, 2665, 8293, - 2671, 2683, 8293, 2676, 2692, 2738, 2698, 2717, 2703, 2700, - 2704, 2724, 2719, 2723, 2730, 2725, 2758, 2746, 2763, 2756, - 2764, 2770, 2766, 2715, 2768, 2772, 2706, 2777, 2784, 1156, - 2793, 2781, 2773, 2783, 2830, 2800, 2808, 2802, 2806, 2814, - 2819, 2826, 2833, 2835, 2840, 2821, 2848, 8293, 2828, 2861, - 2851, 2853, 2842, 2863, 2865, 2873, 2876, 2871, 2877, 2880, - 2875, 2891, 2879, 2901, 2890, 2893, 2904, 2916, 2902, 2907, - 2906, 8293, 2903, 8293, 2922, 2918, 2920, 2927, 2926, 2933, - 2945, 2951, 2952, 2946, 2958, 2963, 2949, 8293, 2953, 2992, - - 2966, 2961, 2981, 2954, 2980, 2986, 2985, 3007, 2983, 3009, - 3002, 2990, 3001, 3010, 3004, 3013, 3016, 3012, 8293, 3008, - 3028, 3040, 3054, 3023, 3043, 3035, 3055, 3056, 3041, 3042, - 3045, 3060, 3051, 3071, 3079, 3070, 3072, 3084, 3081, 8293, - 3076, 3073, 3100, 3091, 3101, 3098, 3103, 3087, 3106, 3110, - 3104, 3099, 3123, 3119, 3124, 3127, 3114, 3140, 3143, 3128, - 3134, 3137, 410, 3139, 3144, 3133, 3156, 8293, 3150, 3158, - 61, 3159, 3163, 3170, 3183, 3180, 3168, 3167, 3164, 3197, - 3193, 3199, 3206, 3190, 3205, 3207, 3203, 3194, 3195, 3208, - 3217, 8293, 3227, 3228, 3225, 3222, 3235, 3231, 3260, 8293, - - 3255, 3248, 3250, 3245, 3258, 3263, 3262, 3268, 3272, 3288, - 3283, 3277, 8293, 3297, 3300, 3302, 3289, 3306, 3308, 3304, - 3299, 3310, 3303, 3316, 3327, 3337, 3333, 3329, 3326, 3332, - 3340, 3336, 3338, 3341, 3353, 8293, 3371, 3343, 3368, 3359, - 3377, 3369, 3392, 3364, 3380, 3384, 3389, 3420, 3386, 3391, - 3407, 3404, 3388, 3413, 3417, 3409, 3418, 3434, 3421, 3436, - 3448, 3438, 3441, 3445, 3447, 3452, 3462, 3455, 3482, 3488, - 3466, 3483, 3507, 3490, 1584, 3481, 8293, 3493, 3480, 3484, - 3503, 3501, 3477, 3508, 3517, 3524, 3518, 3519, 3528, 3535, - 3542, 3539, 3532, 3543, 3546, 3551, 3505, 3552, 3557, 3570, - - 8293, 3574, 3576, 3563, 3566, 3585, 3569, 3586, 3590, 3587, - 3579, 3584, 3595, 3601, 3604, 3603, 3610, 3611, 3622, 3608, - 8293, 3630, 3614, 3631, 3634, 3617, 3635, 3638, 3644, 3641, - 3637, 3648, 3652, 3656, 8293, 3679, 3681, 3672, 3683, 3671, - 3665, 3674, 3687, 3668, 8293, 3670, 3666, 3696, 3699, 3694, - 8293, 3707, 3704, 3693, 3710, 3705, 3711, 3708, 3721, 3678, - 3715, 3720, 3728, 3716, 3745, 8293, 3734, 3759, 3740, 3735, - 3749, 3751, 3748, 3755, 3783, 3767, 3760, 3784, 3777, 3778, - 3776, 3772, 3775, 3801, 3794, 3802, 3797, 8293, 3799, 3796, - 3809, 3818, 3826, 3820, 3816, 3836, 3825, 3823, 3834, 3840, - - 3841, 3832, 3844, 3853, 3861, 3852, 3863, 3857, 3859, 3867, - 3868, 3876, 3882, 3896, 3891, 3897, 8293, 3902, 3900, 3901, - 3887, 3893, 3906, 3908, 3911, 3916, 3914, 3925, 3899, 3926, - 3951, 3955, 3927, 3943, 3937, 3939, 3950, 3957, 3941, 3949, - 3961, 3966, 3968, 3954, 3970, 3948, 3984, 3996, 3982, 3983, - 3985, 3986, 3989, 3971, 3993, 3998, 4011, 4006, 4015, 4016, - 4020, 4009, 4025, 4026, 4038, 8293, 4032, 4031, 4035, 4047, - 4027, 4045, 4051, 4064, 4065, 4059, 4058, 4060, 4075, 4081, - 8293, 4070, 8293, 4072, 4084, 4097, 4099, 4085, 8293, 4100, - 8293, 4101, 4109, 4094, 4102, 8293, 4111, 4103, 4108, 4112, - - 4107, 4121, 4124, 4128, 4132, 4151, 4129, 4138, 4136, 4156, - 4140, 4144, 4159, 4160, 4158, 4168, 4170, 4165, 4155, 4183, - 4192, 4179, 4195, 8293, 4176, 4187, 4193, 4189, 4197, 4188, - 4217, 4221, 4210, 4219, 4220, 4223, 4222, 4231, 4236, 4248, - 4232, 4256, 8293, 4240, 4261, 4243, 4258, 8293, 4260, 4247, - 4272, 4275, 4263, 4266, 4267, 4283, 4279, 4285, 4281, 4311, - 4300, 4291, 4306, 4316, 4295, 4322, 4310, 4326, 4318, 4333, - 4335, 4327, 4323, 4337, 4338, 4346, 4348, 4340, 4344, 4363, - 4345, 4347, 4364, 4376, 4372, 4361, 4360, 4365, 4367, 4375, - 4371, 4373, 4406, 4391, 4394, 4395, 4396, 8293, 4405, 4399, - - 4410, 4423, 4412, 4416, 4401, 4402, 4422, 4433, 4428, 4444, - 4418, 8293, 4449, 8293, 4438, 4465, 4440, 4459, 4454, 4452, - 4471, 4472, 4460, 4458, 4479, 4483, 4475, 4462, 4498, 4489, - 4500, 4504, 4487, 4503, 4497, 4505, 4501, 4506, 4510, 4511, - 8293, 4516, 4524, 4521, 4536, 4545, 4550, 4556, 4549, 4546, - 4538, 4548, 4567, 8293, 4560, 4565, 4562, 4529, 4575, 4573, - 4595, 4590, 8293, 4577, 4585, 4600, 4593, 4605, 4615, 8293, - 4601, 8293, 4584, 4594, 4610, 4607, 4612, 4631, 4624, 4632, - 4629, 4620, 4636, 4635, 4633, 4637, 4630, 4641, 4666, 4645, - 4658, 4651, 8293, 4670, 4659, 4680, 4678, 4682, 4685, 4686, - - 4665, 8293, 4676, 4689, 4681, 4692, 4701, 4698, 4707, 4716, - 4712, 4714, 4710, 4713, 4735, 4730, 4718, 4732, 4744, 4743, - 4749, 8293, 4747, 4745, 4737, 4755, 4756, 4759, 4763, 4757, - 4753, 4740, 4760, 4784, 4782, 4780, 4779, 4793, 4788, 4776, - 4785, 4799, 4806, 4787, 4803, 4801, 4809, 4811, 4818, 4830, - 4839, 4841, 4823, 4842, 4845, 4826, 4827, 4851, 4856, 4857, - 4852, 8293, 4867, 4853, 4868, 4840, 4861, 4876, 4880, 4882, - 4887, 4866, 4869, 4890, 4877, 8293, 4910, 4888, 4909, 4907, - 4904, 4895, 4903, 4905, 4914, 4920, 4916, 4922, 4924, 4926, - 4939, 4954, 4936, 8293, 8293, 4955, 4932, 4949, 8293, 4951, - - 4943, 4966, 4965, 4947, 4962, 4972, 4971, 4970, 4985, 4974, - 4978, 8293, 4983, 4995, 4982, 5001, 5016, 5019, 5003, 5012, - 5009, 5004, 5006, 5014, 5029, 5020, 5022, 5033, 5042, 5030, - 5039, 5051, 8293, 5043, 5045, 5047, 8293, 5049, 5069, 5052, - 5074, 5040, 5076, 5077, 5084, 5065, 5085, 5075, 5082, 5096, - 5097, 5102, 5091, 5100, 5108, 5118, 5121, 8293, 5113, 5120, - 5110, 5128, 5134, 5156, 5143, 5144, 5115, 5145, 5142, 5158, - 8293, 5147, 5160, 5153, 5148, 5167, 5157, 5171, 5166, 8293, - 5170, 5169, 5184, 8293, 5187, 5175, 5195, 5199, 5181, 5209, - 5204, 5202, 5206, 5211, 8293, 5208, 8293, 5215, 5229, 5222, - - 8293, 5231, 5232, 5219, 5221, 5245, 5225, 5248, 5255, 5240, - 5252, 5246, 5247, 5258, 5271, 5268, 5251, 8293, 5282, 5259, - 5275, 5289, 5287, 5285, 5278, 5295, 5288, 8293, 8293, 5306, - 8293, 5304, 5292, 5302, 8293, 5298, 5316, 5325, 5315, 5335, - 5337, 5338, 5333, 8293, 5340, 5324, 5345, 5349, 5327, 5343, - 5357, 5365, 5352, 5366, 5380, 8293, 5363, 5375, 5353, 5370, - 5371, 5392, 5384, 5374, 8293, 5398, 5404, 5382, 5407, 5410, - 8293, 5411, 8293, 5405, 5415, 5416, 5427, 5421, 8293, 5433, - 5422, 5441, 5419, 5447, 5451, 5454, 5456, 5439, 5438, 5469, - 5465, 5460, 5463, 8293, 5472, 5462, 5475, 5481, 5478, 5474, - - 5500, 5499, 5505, 5498, 5510, 5501, 5511, 5515, 5508, 5536, - 5520, 5502, 5524, 5537, 5540, 8293, 5541, 5549, 5550, 8293, - 5543, 5538, 5551, 5530, 5544, 5566, 5570, 5547, 5575, 8293, - 5579, 5580, 5574, 5593, 5595, 5587, 8293, 8293, 5597, 8293, - 5599, 5581, 5613, 5611, 5585, 5606, 5609, 5625, 5635, 5620, - 5637, 5640, 5631, 5651, 5653, 5654, 5647, 5649, 5643, 8293, - 8293, 5659, 5668, 5664, 5660, 5674, 5670, 5661, 5658, 5684, - 5691, 5693, 5698, 5704, 8293, 5701, 5687, 5708, 8293, 5688, - 5717, 5700, 5709, 5721, 5711, 5725, 5733, 5738, 5728, 5732, - 5719, 5735, 5739, 5749, 5744, 5755, 5761, 8293, 5759, 5756, - - 5760, 5766, 5753, 5771, 5770, 5780, 5774, 8293, 5781, 5778, - 5800, 5786, 5797, 5801, 5808, 5810, 5812, 5805, 5802, 5824, - 5822, 5821, 5828, 8293, 5835, 5823, 5826, 5832, 5845, 5854, - 5837, 5857, 5847, 5863, 5851, 5864, 5868, 5875, 5862, 5870, - 5871, 5861, 8293, 5872, 5882, 5867, 5887, 5883, 5894, 5902, - 5907, 5911, 5897, 5903, 5898, 5915, 8293, 5899, 5910, 5921, - 5927, 5920, 5922, 5924, 5925, 8293, 5953, 5935, 5949, 5943, - 5938, 5958, 5952, 5967, 5951, 8293, 5960, 5968, 5970, 5965, - 5976, 5980, 5988, 5978, 8293, 6003, 6005, 5991, 5982, 5992, - 6016, 6007, 6009, 5996, 6011, 6019, 6017, 6018, 6020, 6033, - - 6036, 6030, 6057, 6051, 8293, 6038, 8293, 6052, 6063, 6067, - 6065, 6048, 8293, 6056, 6060, 6059, 6081, 6062, 8293, 6088, - 6086, 6089, 6093, 8293, 6103, 6107, 6090, 6097, 6080, 6113, - 8293, 6111, 6115, 6116, 6124, 6127, 6125, 6130, 6134, 6137, - 6132, 6128, 6152, 8293, 6154, 6157, 6150, 6151, 6159, 6143, - 6161, 6166, 6162, 8293, 6164, 6174, 6177, 6184, 6178, 6179, - 6195, 6208, 6201, 6192, 8293, 6196, 6209, 6213, 6221, 6215, - 8293, 8293, 6204, 6219, 6227, 6206, 6237, 8293, 6239, 6254, - 6240, 6250, 6242, 8293, 8293, 6253, 8293, 6244, 8293, 6241, - 6245, 8293, 8293, 6258, 6247, 6270, 6271, 6260, 8293, 6283, - - 8293, 6289, 6285, 6277, 6269, 6287, 8293, 6280, 6282, 6295, - 8293, 6296, 6306, 6290, 6300, 8293, 6311, 6309, 6307, 8293, - 6323, 6329, 6326, 6332, 6338, 6316, 6327, 6319, 6342, 6344, - 6345, 6348, 6349, 6350, 6343, 6355, 6372, 6377, 6367, 6368, - 6363, 6365, 6384, 6366, 6386, 6391, 6387, 6389, 6390, 6403, - 6376, 6404, 6399, 6400, 6402, 6412, 6406, 6414, 6422, 6413, - 6424, 6442, 6436, 6429, 6439, 8293, 6440, 6428, 6430, 6449, - 6446, 6463, 6469, 6475, 6478, 6481, 8293, 6483, 8293, 6485, - 6470, 6480, 6473, 8293, 6479, 6471, 6495, 6494, 6511, 6503, - 6506, 6526, 8293, 6504, 6507, 6516, 6528, 8293, 6530, 6532, - - 6518, 6519, 6533, 6534, 6544, 6547, 6542, 6551, 6548, 6568, - 6508, 6554, 6564, 6561, 6577, 6563, 6566, 6589, 6571, 6584, - 6585, 6596, 8293, 6598, 8293, 6592, 6599, 6593, 6588, 6597, - 6607, 6603, 8293, 8293, 6611, 6630, 6636, 6624, 6619, 6640, - 6638, 8293, 6626, 6643, 6648, 6646, 8293, 6635, 6651, 6650, - 8293, 6649, 6652, 6653, 6656, 6676, 6673, 6684, 8293, 8293, - 8293, 8293, 6686, 6667, 6690, 6678, 6679, 6688, 6693, 6695, - 6694, 8293, 6696, 8293, 8293, 6699, 6705, 6711, 6722, 6720, - 6714, 6721, 6726, 8293, 6724, 6735, 6737, 6729, 6743, 6745, - 6751, 6741, 6732, 6747, 6768, 6770, 6778, 6761, 6777, 6780, - - 6781, 8293, 8293, 6771, 6783, 6786, 6791, 6785, 6788, 6792, - 6795, 6796, 6805, 6806, 6816, 6820, 6815, 8293, 6826, 6832, - 8293, 6817, 8293, 6833, 6834, 6818, 6837, 6840, 6846, 6856, - 6859, 8293, 8293, 6851, 6852, 6861, 6869, 6862, 6865, 6860, - 6871, 6866, 8293, 6876, 8293, 6884, 6886, 6894, 6889, 6905, - 6910, 6911, 6909, 6907, 6917, 8293, 6916, 6906, 8293, 6920, - 6912, 6908, 8293, 6927, 6929, 6930, 8293, 6940, 8293, 6945, - 8293, 6938, 6964, 8293, 6941, 6947, 8293, 6960, 6962, 6963, - 6956, 8293, 6952, 8293, 6951, 6973, 6975, 6977, 6965, 6981, - 6982, 6983, 6972, 6987, 6984, 6990, 8293, 8293, 7020, 6989, - - 6998, 6999, 7000, 7010, 7004, 7026, 7023, 8293, 8293, 7027, - 8293, 7016, 7031, 8293, 7011, 7037, 7048, 7044, 7017, 7021, - 7028, 7052, 7051, 7064, 7082, 7054, 7060, 7079, 7083, 7085, - 7087, 7058, 7089, 7075, 7077, 7081, 7078, 7099, 8293, 7096, - 7115, 7102, 8293, 7124, 7121, 7127, 7126, 8293, 7132, 7125, - 7129, 7130, 8293, 7117, 7133, 7136, 7141, 7122, 7174, 7157, - 7162, 8293, 8293, 8293, 8293, 7172, 7155, 8293, 7166, 7164, - 8293, 8293, 7153, 7177, 7161, 7184, 8293, 7180, 8293, 7169, - 8293, 7182, 7189, 7205, 7201, 8293, 7207, 7214, 8293, 7195, - 7220, 7223, 7216, 7204, 7208, 7221, 8293, 7234, 7231, 7233, - - 7230, 7222, 7235, 7239, 7228, 7264, 7243, 7269, 8293, 7253, - 7259, 7255, 8293, 7276, 8293, 7265, 7266, 7273, 7280, 7271, - 7290, 7286, 7283, 7258, 7281, 7293, 8293, 7297, 7318, 8293, - 7298, 8293, 7322, 8293, 7307, 7310, 7311, 7324, 8293, 7328, - 7313, 7308, 7325, 8293, 7340, 7316, 8293, 7337, 7339, 7332, - 7347, 7343, 7362, 7364, 7356, 7352, 7353, 7357, 7366, 7367, - 7373, 7374, 7384, 8293, 8293, 8293, 7370, 7386, 7391, 7395, - 7393, 7403, 7389, 8293, 7405, 7412, 7400, 7420, 7408, 7421, - 8293, 7424, 7409, 7422, 8293, 7429, 7438, 7435, 7427, 7437, - 7443, 7445, 7450, 7452, 8293, 7459, 8293, 8293, 7444, 8293, - - 7439, 7451, 7453, 7480, 8293, 7460, 7462, 7465, 7474, 7482, - 7472, 7488, 8293, 8293, 7494, 8293, 7495, 7492, 7484, 7479, - 7501, 7496, 7505, 7509, 8293, 7506, 7507, 7511, 7517, 7524, - 8293, 7531, 7518, 7515, 7528, 7532, 7533, 7551, 7525, 7556, - 8293, 8293, 7543, 7552, 8293, 8293, 7547, 7567, 7576, 8293, - 8293, 8293, 7571, 8293, 7572, 7583, 7586, 7588, 7585, 8293, - 7591, 7575, 7587, 8293, 7592, 7600, 8293, 8293, 7579, 7598, - 7607, 7599, 7594, 8293, 7612, 7613, 7616, 7623, 7629, 7618, - 7632, 7639, 7646, 7647, 7627, 7638, 7634, 7657, 7658, 7649, - 7667, 7664, 8293, 8293, 7670, 8293, 8293, 7671, 7672, 7677, - - 7681, 7683, 7686, 7687, 8293, 7679, 7692, 7673, 8293, 7682, - 7702, 7690, 7694, 7691, 7710, 7697, 7716, 8293, 8293, 7704, - 7720, 7699, 7726, 7715, 8293, 7732, 7741, 7730, 7740, 7729, - 7728, 7742, 8293, 7736, 8293, 8293, 8293, 8293, 8293, 8293, - 8293, 8293, 7761, 8293, 7765, 7766, 8293, 7747, 7767, 7773, - 7759, 7768, 8293, 7757, 7772, 7784, 7785, 7775, 7795, 7788, - 7786, 7800, 7792, 7799, 7806, 7804, 7809, 8293, 8293, 7816, - 7814, 7820, 7828, 7838, 7839, 7842, 7844, 7827, 7833, 7847, - 7854, 7857, 7843, 7848, 7877, 7864, 7856, 7858, 7860, 7882, - 8293, 7873, 8293, 7874, 8293, 8293, 7893, 7895, 7886, 7880, - - 7902, 7903, 7897, 7901, 7889, 7910, 8293, 7898, 8293, 7913, - 7928, 8293, 7916, 7907, 7923, 7904, 7920, 7929, 7941, 7944, - 8293, 7934, 7938, 7951, 7953, 7967, 7963, 7961, 7965, 7969, - 7962, 7972, 7977, 7983, 8293, 7991, 7979, 7980, 7984, 7986, - 8007, 7993, 8002, 7999, 8293, 8016, 8019, 8018, 8014, 8017, - 8008, 8037, 8035, 8034, 8293, 8025, 8048, 8050, 8052, 8055, - 8054, 8061, 8065, 8066, 8067, 8071, 8070, 8078, 8080, 8082, - 8086, 8083, 8293, 8089, 8096, 8293, 8098, 8099, 8100, 8105, - 8107, 8293, 8090, 8114, 8117, 8120, 8122, 8130, 8293, 8138, - 8139, 8143, 8293, 8135, 8293, 8293, 8147, 8126, 8142, 8154, - - 8155, 8293, 8293, 8293, 8201, 8208, 8215, 8222, 8229, 83, - 8236, 8243, 8250, 8257, 8264, 8271, 8278, 8285 + 1022, 1021, 1009, 1017, 1026, 1061, 1036, 1016, 1019, 1063, + + 1055, 1049, 1044, 1072, 1059, 1064, 1092, 1083, 1087, 1094, + 668, 1099, 1114, 1101, 1108, 1105, 1110, 1100, 1107, 1060, + 1118, 1119, 1123, 1128, 1143, 1156, 1139, 1155, 1160, 1151, + 1162, 1163, 1191, 1239, 1164, 1172, 1182, 1187, 1178, 8310, + 1203, 1196, 1288, 1201, 1198, 1241, 1211, 1205, 1227, 1230, + 1238, 1229, 1256, 1244, 1188, 1236, 1257, 1269, 1259, 1274, + 1266, 1293, 1284, 1283, 1308, 1285, 1301, 1310, 1319, 1314, + 1306, 1311, 1346, 1327, 1326, 1332, 1336, 1356, 1351, 1353, + 1359, 1343, 1337, 1365, 1370, 1377, 1385, 1384, 1363, 1392, + 1389, 1406, 1379, 1403, 1410, 1397, 1408, 1412, 1404, 784, + + 1421, 1425, 1441, 1427, 1439, 1430, 1429, 1444, 1446, 1458, + 1435, 1455, 1461, 1468, 1457, 1477, 1471, 1462, 1486, 1472, + 1495, 1470, 8310, 1499, 1482, 1497, 1502, 1494, 1489, 8310, + 1513, 1515, 1498, 1520, 1525, 1522, 1532, 1529, 1540, 1541, + 1526, 1542, 1559, 1530, 1558, 1552, 1555, 1561, 1575, 1566, + 1578, 1568, 1570, 1585, 1625, 1567, 1594, 1592, 1572, 1597, + 1611, 1623, 1607, 1630, 1621, 1620, 1668, 1627, 1658, 1642, + 1647, 1674, 1652, 1679, 1666, 1664, 1669, 1663, 1683, 1692, + 1689, 1693, 1672, 1707, 8310, 1706, 1714, 1694, 1710, 1702, + 1704, 1716, 1711, 1709, 1724, 1733, 1745, 1740, 1600, 1757, + + 1744, 1763, 1749, 1732, 1750, 1751, 1760, 1767, 1780, 1752, + 1785, 1773, 1781, 1782, 1774, 1798, 1802, 1808, 1783, 1803, + 1800, 1792, 1807, 1814, 1813, 1797, 1809, 1833, 1819, 1835, + 1825, 1844, 1830, 1826, 1846, 1834, 1855, 1838, 1853, 1841, + 1864, 1874, 1870, 1872, 8310, 1877, 1880, 1885, 1891, 1893, + 1897, 1903, 1876, 1905, 1902, 1913, 1916, 1911, 1910, 1919, + 1914, 1918, 1930, 1935, 1954, 1936, 1948, 1966, 1949, 1962, + 1941, 1956, 1961, 1968, 1976, 1969, 1975, 1982, 1971, 1974, + 1985, 1990, 1989, 1983, 1986, 2003, 1995, 2011, 2010, 2025, + 2026, 1999, 2032, 2009, 2037, 2022, 2029, 2042, 2038, 2043, + + 2046, 2041, 2035, 2061, 2062, 2064, 2056, 2066, 2065, 2084, + 2067, 2073, 2079, 2091, 2092, 2068, 2099, 2102, 2103, 2097, + 2087, 2126, 2113, 2112, 2123, 2118, 2128, 2119, 2137, 2125, + 2144, 2136, 2150, 2161, 2162, 2152, 2165, 2160, 2159, 2171, + 2163, 2176, 2179, 2187, 2190, 2186, 2196, 2198, 2189, 2174, + 2218, 2205, 2206, 8310, 2201, 2226, 2209, 2230, 2223, 2199, + 2222, 2246, 2236, 2241, 2225, 2233, 2239, 2282, 8310, 2250, + 8310, 8310, 2252, 8310, 8310, 2263, 2249, 2262, 2276, 2283, + 2292, 2270, 2288, 2286, 2275, 2303, 2333, 2311, 2296, 2314, + 2321, 2309, 2326, 2322, 2341, 2339, 2349, 2353, 2344, 2360, + + 2355, 2363, 2364, 2366, 2368, 2367, 2381, 2395, 2384, 2387, + 2397, 2382, 2391, 2385, 2409, 2412, 2405, 2438, 8310, 2414, + 2425, 2426, 2424, 2436, 2432, 2431, 2434, 2440, 2443, 2439, + 2427, 2444, 2441, 2454, 2450, 2451, 2471, 2462, 2461, 8310, + 2474, 2475, 2477, 2476, 2487, 2481, 2478, 2466, 2493, 2500, + 2497, 2513, 2472, 2523, 8310, 2527, 2525, 2509, 2528, 2510, + 2512, 2518, 2519, 2524, 2539, 2540, 2543, 2546, 2550, 2567, + 2570, 2560, 2557, 2566, 2575, 2568, 2573, 2583, 2565, 2577, + 2591, 2590, 2594, 2593, 2597, 2599, 2606, 2608, 2628, 2607, + 2633, 2634, 2626, 2612, 2620, 2639, 2624, 2635, 2642, 2647, + + 2638, 2651, 2653, 2648, 2652, 2655, 2665, 2676, 2666, 2680, + 2685, 2667, 2678, 2682, 2669, 8310, 2675, 2690, 8310, 2700, + 2697, 2745, 2705, 2715, 2695, 2701, 2711, 2726, 2725, 2735, + 2738, 2737, 2744, 2741, 2765, 2758, 2774, 2775, 2770, 2777, + 2772, 2781, 2763, 2764, 2794, 1268, 2800, 2783, 2790, 2785, + 2836, 2806, 2814, 2808, 2812, 2825, 2833, 2832, 2820, 2839, + 2849, 2843, 2853, 8310, 2859, 2845, 2854, 2861, 2883, 2882, + 2871, 2870, 2884, 2875, 2897, 2885, 2877, 2898, 2888, 2899, + 2902, 2904, 2910, 2918, 2901, 2915, 2938, 8310, 2920, 8310, + 2925, 2921, 2931, 2930, 2933, 2940, 2948, 2956, 8310, 8310, + + 2957, 2960, 2963, 2943, 2959, 8310, 2958, 2981, 2991, 2970, + 2979, 2978, 2976, 2989, 2996, 3009, 2987, 3014, 3010, 3003, + 3012, 3021, 3015, 3022, 3023, 3020, 8310, 3029, 3030, 3037, + 3038, 3045, 3051, 3034, 3063, 3067, 3053, 3050, 3054, 3072, + 3070, 3081, 3087, 3079, 3080, 3086, 3093, 8310, 3082, 3095, + 3094, 3098, 3092, 3096, 3107, 3099, 3101, 3121, 3118, 3119, + 3123, 3114, 3141, 3143, 3125, 3134, 3147, 3130, 3144, 3142, + 410, 3145, 3146, 3156, 3152, 8310, 3159, 3153, 61, 3170, + 3172, 3176, 3186, 3180, 3165, 3173, 3199, 3200, 3196, 3204, + 3203, 3195, 3198, 3205, 3202, 3215, 3214, 3223, 3224, 8310, + + 3219, 3226, 3227, 3232, 3246, 3229, 3250, 8310, 3256, 3253, + 3261, 3248, 3260, 3274, 3272, 3273, 3267, 3293, 3291, 3284, + 8310, 3297, 3299, 3301, 3287, 3305, 3308, 3300, 3323, 3325, + 3296, 3329, 3328, 3337, 3333, 3327, 3326, 3330, 3352, 3334, + 3339, 3342, 3354, 8310, 3356, 3364, 3369, 3360, 3379, 3370, + 3393, 3373, 3381, 3385, 3400, 3424, 3386, 3394, 3407, 3413, + 3412, 3409, 3415, 3426, 3430, 3422, 3425, 3453, 3458, 3428, + 3449, 3456, 3451, 3464, 3452, 3450, 3477, 3487, 3479, 3482, + 3506, 3500, 1065, 3478, 8310, 3498, 3492, 3485, 3508, 3523, + 3509, 3505, 3525, 3529, 3521, 3527, 3533, 3543, 3550, 3545, + + 3552, 3544, 3549, 3558, 3564, 3554, 3575, 3576, 8310, 3577, + 3582, 3573, 3584, 3583, 3579, 3594, 3596, 3590, 3591, 3604, + 3608, 3607, 3610, 3609, 3611, 3606, 3626, 3614, 8310, 3641, + 3630, 3642, 3643, 3638, 3653, 3655, 3649, 3656, 3663, 3672, + 3657, 3666, 8310, 3603, 3667, 3684, 3668, 3677, 3673, 3685, + 3697, 3682, 8310, 3683, 3691, 3671, 3706, 3701, 8310, 3720, + 3711, 3712, 3709, 3708, 3699, 3726, 3723, 3715, 3719, 3746, + 3745, 3733, 3750, 8310, 3738, 3766, 3744, 3754, 3760, 3761, + 3759, 3776, 3792, 3777, 3771, 3781, 3765, 3788, 3786, 3783, + 3789, 3806, 3796, 3812, 3802, 8310, 3816, 3810, 3813, 3819, + + 3821, 3824, 3826, 3840, 3838, 3835, 3846, 3841, 3844, 3847, + 3858, 3857, 3865, 3861, 3867, 3874, 3880, 3872, 3877, 3884, + 3885, 3887, 3899, 3907, 8310, 3896, 3905, 3901, 3897, 3903, + 3904, 3906, 3920, 3918, 3931, 3924, 3927, 3930, 3955, 3964, + 3933, 3942, 3944, 3948, 3952, 3957, 3954, 3958, 3956, 3925, + 3972, 3960, 3997, 3976, 3987, 4001, 3979, 3983, 3988, 3989, + 4003, 3991, 3994, 4010, 4016, 4014, 4023, 4022, 4028, 4018, + 4024, 4029, 4046, 8310, 4035, 4049, 4041, 4047, 4057, 4066, + 4067, 4073, 4074, 4060, 4068, 4062, 4075, 4081, 8310, 4079, + 8310, 4089, 4091, 4084, 4088, 4094, 8310, 4103, 8310, 4116, + + 4117, 4104, 4106, 8310, 4123, 4105, 4118, 4128, 4121, 4113, + 4132, 4130, 4144, 4137, 4142, 4152, 4141, 4169, 4159, 4154, + 4171, 4162, 4174, 4178, 4163, 4179, 4186, 4164, 4184, 4193, + 4187, 8310, 4195, 4198, 4203, 4204, 4207, 4201, 4228, 4213, + 4222, 4227, 4232, 4231, 4237, 4244, 4233, 4266, 4250, 4267, + 8310, 4258, 4252, 4256, 4274, 8310, 4271, 4254, 4281, 4285, + 4273, 4277, 4291, 4289, 4309, 4284, 4297, 4322, 4293, 4316, + 4318, 4324, 4305, 4312, 4331, 4333, 4334, 4345, 4336, 4342, + 4337, 4341, 4351, 4355, 4363, 4358, 4376, 4374, 4381, 4357, + 4378, 4387, 4384, 4373, 4368, 4372, 4382, 4390, 4386, 4399, + + 4425, 4401, 4402, 4410, 4406, 8310, 4430, 4414, 4431, 4437, + 4417, 4426, 4418, 4428, 4441, 4420, 4449, 4462, 4454, 8310, + 4460, 8310, 4457, 4463, 4472, 4478, 4467, 4468, 4485, 4491, + 4483, 4473, 4498, 4499, 4489, 4495, 4505, 4501, 4512, 4518, + 4490, 4529, 4513, 4523, 4516, 4528, 4530, 4525, 8310, 4540, + 4526, 4548, 4543, 4553, 4561, 4557, 4569, 4550, 4570, 4556, + 4587, 8310, 4576, 4584, 4580, 4594, 4605, 4597, 4609, 4600, + 8310, 4592, 4596, 4614, 4603, 4617, 4618, 8310, 4607, 8310, + 4619, 4621, 4623, 4642, 4622, 4639, 4641, 4643, 4654, 4633, + 4661, 4646, 4644, 4645, 4658, 4667, 4666, 4665, 4673, 4656, + + 8310, 4676, 4678, 4691, 4692, 4694, 4701, 4700, 4685, 8310, + 4696, 4710, 4712, 4703, 4713, 4717, 4720, 4722, 4733, 4736, + 4724, 4726, 4725, 4738, 4737, 4735, 4754, 4763, 4757, 8310, + 4762, 4760, 4776, 4774, 4768, 4777, 4775, 4765, 4761, 4773, + 4781, 4792, 4789, 4801, 4794, 4806, 4805, 4795, 4802, 4820, + 4828, 4810, 4816, 4818, 4819, 4846, 4836, 4829, 4849, 4851, + 4833, 4859, 4863, 4844, 4847, 4867, 4866, 4874, 4869, 8310, + 4886, 4871, 4887, 4858, 4881, 4888, 4899, 4892, 4890, 4885, + 4898, 4911, 4901, 8310, 4939, 4906, 4922, 4926, 4908, 4927, + 4931, 4932, 4934, 4941, 4916, 4943, 4936, 4935, 4945, 4960, + + 4954, 8310, 8310, 4965, 4950, 4967, 8310, 4969, 4959, 4990, + 4988, 4968, 4982, 4984, 4995, 4972, 4992, 4986, 4994, 8310, + 5001, 5005, 5003, 5007, 5013, 5031, 5027, 5024, 5026, 5016, + 5019, 5030, 5041, 5034, 5021, 5048, 5050, 5039, 5040, 5060, + 8310, 5058, 5054, 5057, 8310, 5069, 5066, 5077, 5081, 5089, + 5091, 5087, 5092, 5085, 5097, 5075, 5096, 5093, 5107, 5114, + 5116, 5121, 5129, 5134, 5128, 8310, 5130, 5133, 5125, 5136, + 5137, 5147, 5151, 5155, 5141, 5160, 5157, 5156, 8310, 5158, + 5171, 5161, 5152, 5185, 5159, 5194, 5178, 8310, 5179, 5174, + 5198, 8310, 5192, 5206, 5199, 5209, 5196, 5215, 5205, 5208, + + 5218, 5219, 8310, 5222, 8310, 5226, 5225, 5230, 8310, 5232, + 5235, 5234, 5214, 5241, 5243, 5255, 5263, 5245, 5258, 5251, + 5254, 5272, 5274, 5285, 5270, 8310, 5290, 5268, 5280, 5282, + 5295, 5281, 5294, 5300, 5301, 8310, 8310, 5298, 8310, 5316, + 5307, 5308, 8310, 5311, 5322, 5335, 5320, 5332, 5338, 5339, + 5344, 8310, 5341, 5334, 5355, 5349, 5351, 5357, 5361, 5362, + 5360, 5365, 5371, 8310, 5375, 5379, 5370, 5376, 5385, 5406, + 5388, 5396, 8310, 5403, 5412, 5392, 5419, 5404, 8310, 5417, + 8310, 5407, 5418, 5428, 5445, 5423, 8310, 5446, 5435, 5429, + 5431, 5454, 5458, 5456, 5463, 5452, 5444, 5471, 5472, 5465, + + 5474, 8310, 5475, 5466, 5489, 5495, 5485, 5483, 5511, 5508, + 5512, 5509, 5515, 5506, 5519, 5523, 5522, 5544, 5530, 5507, + 5548, 5545, 5549, 8310, 5550, 5555, 5558, 8310, 5551, 5546, + 5559, 5565, 5552, 5576, 5580, 5584, 5585, 8310, 5587, 5589, + 5582, 5603, 5605, 5595, 8310, 8310, 5614, 8310, 5607, 5592, + 5609, 5621, 5618, 5629, 5617, 5637, 5649, 5631, 5648, 5654, + 5640, 5662, 5542, 5579, 5658, 5647, 5651, 8310, 8310, 5663, + 5668, 5675, 5672, 5686, 5679, 5674, 5673, 5688, 5696, 5703, + 5699, 5710, 8310, 5705, 5702, 5708, 8310, 5700, 5711, 5717, + 5718, 5723, 5724, 5730, 5707, 5737, 5732, 5743, 5727, 5744, + + 5739, 5757, 5750, 5754, 5761, 8310, 5768, 5759, 5760, 5769, + 5767, 5774, 5777, 5770, 5781, 8310, 5785, 5807, 5808, 5797, + 5799, 5801, 5815, 5817, 5821, 5818, 5809, 5829, 5838, 5831, + 5827, 8310, 5834, 5826, 5835, 5840, 5851, 5863, 5845, 5868, + 5853, 5869, 5860, 5865, 5876, 5881, 5872, 5874, 5879, 5885, + 8310, 5884, 5888, 5890, 5894, 5887, 5901, 5897, 5917, 5919, + 5903, 5908, 5910, 5925, 8310, 5920, 5915, 5924, 5937, 5926, + 5935, 5928, 5942, 8310, 5948, 5951, 5952, 5947, 5946, 5962, + 5949, 5975, 5960, 8310, 5970, 5978, 5986, 5967, 5987, 5974, + 5988, 5985, 8310, 5998, 6001, 5981, 6021, 6005, 6022, 6019, + + 6029, 6010, 6018, 6033, 6030, 6032, 6038, 6043, 6028, 6045, + 6048, 6040, 8310, 6053, 8310, 6055, 6049, 6059, 6080, 6063, + 8310, 6068, 6071, 6078, 6077, 6079, 8310, 6082, 6086, 6103, + 6105, 8310, 6093, 6119, 6106, 6110, 6101, 6130, 8310, 6125, + 6132, 6129, 6141, 6143, 6127, 6128, 6138, 6136, 6133, 6145, + 6149, 8310, 6163, 6168, 6173, 6174, 6169, 6160, 6177, 6182, + 6170, 8310, 6184, 6165, 6166, 6188, 6195, 6194, 6198, 6193, + 6211, 6200, 8310, 6207, 6219, 6233, 6227, 6229, 8310, 8310, + 6222, 6238, 6234, 6206, 6241, 8310, 6243, 6245, 6240, 6248, + 6244, 8310, 8310, 6255, 8310, 6258, 8310, 6259, 6261, 8310, + + 8310, 6278, 6263, 6279, 6282, 6281, 8310, 6291, 8310, 6297, + 6292, 6280, 6272, 6290, 8310, 6306, 6300, 6301, 8310, 6304, + 6302, 6308, 6315, 8310, 6332, 6317, 6316, 8310, 6337, 6341, + 6340, 6342, 6344, 6335, 6352, 6328, 6351, 6350, 6354, 6358, + 6360, 6368, 6364, 6365, 6383, 6385, 6376, 6377, 6374, 6390, + 6396, 6381, 6398, 6399, 6391, 6393, 6407, 6410, 6404, 6423, + 6415, 6416, 6419, 6421, 6412, 6420, 6431, 6429, 6445, 6451, + 6455, 6439, 6446, 8310, 6442, 6448, 6462, 6465, 6463, 6469, + 6471, 6483, 6484, 6492, 8310, 6498, 8310, 6501, 6482, 6494, + 6487, 8310, 6488, 6489, 6491, 6497, 6514, 6510, 6504, 6535, + + 8310, 6538, 6520, 6534, 6539, 8310, 6537, 6545, 6533, 6540, + 6541, 6544, 6556, 6561, 6560, 6562, 6553, 6555, 6557, 6572, + 6577, 6575, 6586, 6573, 6578, 6602, 6595, 6596, 6608, 6609, + 8310, 6611, 8310, 6605, 6612, 6615, 6606, 6623, 6620, 6624, + 8310, 8310, 6625, 6641, 6646, 6633, 6638, 6649, 6655, 8310, + 6647, 6657, 6663, 6651, 8310, 6660, 6665, 6666, 8310, 6667, + 6669, 6676, 6677, 6692, 6686, 6681, 8310, 8310, 8310, 8310, + 6699, 6683, 6701, 6689, 6696, 6706, 6708, 6711, 6703, 8310, + 6714, 8310, 8310, 6716, 6726, 6720, 6732, 6738, 6730, 6741, + 6743, 8310, 6725, 6755, 6757, 6739, 6756, 6763, 6764, 6767, + + 6761, 6768, 6774, 6770, 6784, 6765, 6788, 6796, 6800, 8310, + 8310, 6790, 6804, 6802, 6814, 6811, 6813, 6815, 6817, 6819, + 6799, 6807, 6820, 6831, 6825, 8310, 6834, 6830, 8310, 6838, + 8310, 6848, 6849, 6841, 6843, 6858, 6860, 6861, 6863, 8310, + 8310, 6852, 6864, 6855, 6873, 6876, 6883, 6878, 6897, 6885, + 8310, 6887, 8310, 6886, 6903, 6908, 6890, 6914, 6921, 6923, + 6925, 6918, 6922, 8310, 6919, 6924, 8310, 6932, 6929, 6942, + 8310, 6938, 6940, 6944, 8310, 6947, 8310, 6958, 8310, 6941, + 6977, 8310, 6953, 6959, 8310, 6962, 6975, 6976, 6965, 8310, + 6963, 8310, 6971, 6982, 6992, 6983, 6980, 6994, 6984, 6996, + + 6985, 7001, 7013, 7011, 8310, 8310, 7030, 7004, 7009, 7012, + 7010, 7006, 7019, 7031, 7034, 8310, 8310, 7040, 8310, 7039, + 7046, 8310, 7023, 7050, 7051, 7055, 7052, 7061, 7071, 7063, + 7064, 7057, 7094, 7074, 7086, 7098, 7101, 7103, 7105, 7084, + 7109, 7095, 7090, 7110, 7118, 7120, 8310, 7107, 7121, 7117, + 8310, 7123, 7132, 7149, 7147, 8310, 7153, 7145, 7146, 7148, + 8310, 7142, 7156, 7159, 7161, 7162, 7196, 7158, 7183, 8310, + 8310, 8310, 8310, 7168, 7175, 8310, 7185, 7187, 8310, 8310, + 7176, 7191, 7186, 7210, 8310, 7195, 8310, 7188, 8310, 7203, + 7211, 7223, 7220, 8310, 7212, 7241, 8310, 7225, 7231, 7232, + + 7237, 7228, 7230, 7235, 8310, 7258, 7255, 7256, 7254, 7247, + 7250, 7273, 7252, 7268, 7259, 7266, 8310, 7272, 7274, 7276, + 8310, 7280, 8310, 7277, 7281, 7298, 7297, 7293, 7295, 7304, + 7305, 7300, 7313, 7311, 8310, 7315, 7319, 8310, 7307, 8310, + 7335, 8310, 7327, 7329, 7331, 7339, 8310, 7348, 7332, 7337, + 7342, 8310, 7349, 7351, 8310, 7358, 7346, 7367, 7380, 7362, + 7381, 7372, 7375, 7366, 7396, 7378, 7389, 7392, 7398, 7403, + 7413, 8310, 8310, 8310, 7405, 7395, 7408, 7404, 7418, 7423, + 7402, 8310, 7429, 7431, 7419, 7442, 7435, 7443, 8310, 7449, + 7432, 7445, 8310, 7455, 7457, 7459, 7446, 7461, 7467, 7468, + + 7471, 7469, 8310, 7475, 8310, 8310, 7458, 8310, 7470, 7478, + 7481, 7482, 8310, 7489, 7485, 7486, 7498, 7490, 7495, 7510, + 8310, 8310, 7511, 8310, 7518, 7516, 7509, 7525, 7512, 7520, + 7529, 7526, 8310, 7534, 7537, 7535, 7532, 7543, 8310, 7538, + 7541, 7552, 7555, 7551, 7547, 7568, 7556, 7561, 8310, 8310, + 7571, 7567, 8310, 8310, 7589, 7592, 7593, 8310, 8310, 8310, + 7600, 8310, 7601, 7607, 7610, 7612, 7599, 8310, 7614, 7604, + 7609, 8310, 7616, 7615, 8310, 8310, 7608, 7618, 7613, 7620, + 7631, 8310, 7635, 7642, 7637, 7632, 7654, 7640, 7652, 7659, + 7666, 7675, 7647, 7648, 7656, 7680, 7682, 7669, 7676, 7684, + + 8310, 8310, 7691, 8310, 8310, 7692, 7694, 7697, 7700, 7701, + 7705, 7706, 8310, 7699, 7710, 7693, 8310, 7698, 7722, 7714, + 7718, 7711, 7733, 7715, 7736, 8310, 8310, 7721, 7740, 7720, + 7750, 7735, 8310, 7749, 7759, 7741, 7760, 7745, 7756, 7768, + 8310, 7754, 8310, 8310, 8310, 8310, 8310, 8310, 8310, 8310, + 7772, 8310, 7771, 7785, 8310, 7766, 7779, 7786, 7777, 7780, + 8310, 7782, 7792, 7795, 7806, 7799, 7809, 7807, 7804, 7811, + 7812, 7815, 7830, 7822, 7824, 8310, 8310, 7832, 7833, 7825, + 7839, 7854, 7857, 7861, 7862, 7849, 7859, 7860, 7864, 7872, + 7867, 7878, 7870, 7884, 7880, 7874, 7883, 7882, 8310, 7888, + + 8310, 7890, 8310, 8310, 7912, 7913, 7910, 7897, 7926, 7927, + 7909, 7915, 7919, 7931, 8310, 7924, 8310, 7920, 7929, 8310, + 7932, 7943, 7930, 7950, 7951, 7947, 7957, 7967, 8310, 7955, + 7961, 7968, 7976, 7974, 7982, 7987, 7991, 7993, 7978, 7990, + 7999, 7986, 8310, 8002, 8003, 8005, 8008, 8009, 8007, 8018, + 8025, 8014, 8310, 8016, 8035, 8041, 8021, 8031, 8043, 8052, + 8054, 8048, 8310, 8058, 8062, 8068, 8065, 8071, 8064, 8075, + 8078, 8051, 8089, 8074, 8100, 8099, 8101, 8085, 8102, 8091, + 8310, 8113, 8096, 8310, 8112, 8114, 8103, 8124, 8131, 8310, + 8120, 8126, 8129, 8135, 8125, 8147, 8310, 8138, 8150, 8153, + + 8310, 8152, 8310, 8310, 8156, 8149, 8159, 8155, 8164, 8310, + 8310, 8310, 8218, 8225, 8232, 8239, 8246, 83, 8253, 8260, + 8267, 8274, 8281, 8288, 8295, 8302 } ; -static yyconst flex_int16_t yy_def[2919] = +static const flex_int16_t yy_def[2927] = { 0, - 2904, 1, 2905, 2905, 2906, 2906, 2907, 2907, 2908, 2908, - 2909, 2909, 2904, 2910, 2904, 2904, 2904, 2904, 2911, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2912, 2904, 2904, 2904, 2912, 2913, 2904, 2904, - 2904, 2913, 2914, 2904, 2904, 2904, 2904, 2914, 2915, 2904, - 2904, 2904, 2915, 2916, 2904, 2917, 2904, 2916, 2916, 2910, - 2910, 2904, 2918, 2911, 2918, 2911, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2912, - 2912, 2913, 2913, 2914, 2914, 2904, 2915, 2915, 2916, 2916, - 2917, 2917, 2916, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2916, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2916, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2916, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2916, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2904, 2904, 2910, 2904, - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2916, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, - 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2904, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - 2916, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2904, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2904, 2910, - 2904, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2904, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2904, - 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2904, 2904, 2910, 2910, 2910, 2904, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2910, 2910, 2904, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2904, 2910, 2910, 2910, - - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2904, 2910, - 2904, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2904, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2904, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2904, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, - 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2904, 2910, 2904, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2904, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2904, 2910, 2904, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2904, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2904, 2904, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - 2910, 2910, 2910, 2904, 2904, 2910, 2904, 2910, 2904, 2910, - 2910, 2904, 2904, 2910, 2910, 2910, 2910, 2910, 2904, 2910, - - 2904, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, - 2904, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2904, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2904, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2904, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2904, - 2904, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2904, 2910, 2904, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - - 2910, 2904, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - 2904, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2904, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2904, 2910, - 2910, 2910, 2904, 2910, 2910, 2910, 2904, 2910, 2904, 2910, - 2904, 2910, 2910, 2904, 2910, 2910, 2904, 2910, 2910, 2910, - 2910, 2904, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2904, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2904, 2910, - 2904, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, - 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2904, 2910, 2910, - 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2904, 2904, 2904, 2904, 2910, 2910, 2904, 2910, 2910, - 2904, 2904, 2910, 2910, 2910, 2910, 2904, 2910, 2904, 2910, - 2904, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2904, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, - 2910, 2910, 2904, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2904, - 2910, 2904, 2910, 2904, 2910, 2910, 2910, 2910, 2904, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2904, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2904, 2904, 2904, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2904, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2904, 2904, 2910, 2904, - - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2904, 2910, 2904, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2904, 2904, 2910, 2910, 2904, 2904, 2910, 2910, 2910, 2904, - 2904, 2904, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2904, - 2910, 2910, 2910, 2904, 2910, 2910, 2904, 2904, 2910, 2910, - 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2904, 2910, 2904, 2904, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2904, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2904, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2904, 2904, 2904, 2904, 2904, 2904, - 2904, 2904, 2910, 2904, 2910, 2910, 2904, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2904, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2904, 2910, 2904, 2910, 2904, 2904, 2910, 2910, 2910, 2910, - - 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, 2904, 2910, - 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2904, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, 2910, - 2910, 2910, 2904, 2910, 2910, 2904, 2910, 2910, 2910, 2910, - 2910, 2904, 2910, 2910, 2910, 2910, 2910, 2910, 2904, 2910, - 2910, 2910, 2904, 2910, 2904, 2904, 2910, 2910, 2910, 2910, - - 2910, 2904, 2904, 0, 2904, 2904, 2904, 2904, 2904, 2904, - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904 + 2912, 1, 2913, 2913, 2914, 2914, 2915, 2915, 2916, 2916, + 2917, 2917, 2912, 2918, 2912, 2912, 2912, 2912, 2919, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2920, 2912, 2912, 2912, 2920, 2921, 2912, 2912, + 2912, 2921, 2922, 2912, 2912, 2912, 2912, 2922, 2923, 2912, + 2912, 2912, 2923, 2924, 2912, 2925, 2912, 2924, 2924, 2918, + 2918, 2912, 2926, 2919, 2926, 2919, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2920, + 2920, 2921, 2921, 2922, 2922, 2912, 2923, 2923, 2924, 2924, + 2925, 2925, 2924, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2924, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2924, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2912, 2918, 2924, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2924, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2912, 2912, 2918, 2912, 2912, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2924, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2912, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2912, + + 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2924, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2912, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2912, 2918, + + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2912, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2912, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2912, 2912, 2918, 2918, 2918, 2912, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2912, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2912, 2918, 2912, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2912, 2912, 2918, 2912, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2912, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2912, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, + 2918, 2918, 2918, 2918, 2912, 2912, 2918, 2912, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2912, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2912, 2918, 2918, 2918, 2918, 2918, + 2912, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2912, 2912, + 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, + 2918, 2912, 2912, 2918, 2912, 2918, 2912, 2918, 2918, 2912, + + 2912, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2912, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2912, 2918, 2912, 2918, 2918, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2912, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2912, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2912, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2912, 2912, 2912, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2918, 2912, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2912, 2918, + 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2912, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2912, 2918, 2918, 2918, + 2912, 2918, 2918, 2918, 2912, 2918, 2912, 2918, 2912, 2918, + 2918, 2912, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2912, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2912, 2912, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2912, 2912, 2918, 2912, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, + 2912, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, + 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, + 2912, 2912, 2912, 2918, 2918, 2912, 2918, 2918, 2912, 2912, + 2918, 2918, 2918, 2918, 2912, 2918, 2912, 2918, 2912, 2918, + 2918, 2918, 2918, 2912, 2918, 2918, 2912, 2918, 2918, 2918, + + 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, + 2912, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2912, 2918, 2912, + 2918, 2912, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, + 2918, 2912, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2912, 2912, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2918, 2918, 2912, 2918, 2912, 2912, 2918, 2912, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2912, 2912, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2912, + 2918, 2918, 2912, 2912, 2918, 2918, 2918, 2912, 2912, 2912, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, + 2918, 2912, 2918, 2918, 2912, 2912, 2918, 2918, 2918, 2918, + 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + + 2912, 2912, 2918, 2912, 2912, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2912, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2912, 2912, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2912, 2918, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2918, 2912, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, + 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2912, 2912, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + + 2912, 2918, 2912, 2912, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2912, 2918, 2912, 2918, 2918, 2912, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, 2918, + 2912, 2918, 2918, 2912, 2918, 2918, 2918, 2918, 2918, 2912, + 2918, 2918, 2918, 2918, 2918, 2918, 2912, 2918, 2918, 2918, + + 2912, 2918, 2912, 2912, 2918, 2918, 2918, 2918, 2918, 2912, + 2912, 0, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912 } ; -static yyconst flex_uint16_t yy_nxt[8360] = +static const flex_int16_t yy_nxt[8377] = { 0, 14, 15, 16, 17, 18, 19, 18, 14, 14, 14, 14, 14, 18, 20, 21, 22, 23, 24, 25, 14, @@ -1429,55 +1423,55 @@ static yyconst flex_uint16_t yy_nxt[8360] = 172, 134, 135, 114, 174, 145, 179, 143, 141, 115, 71, 161, 116, 136, 132, 71, 200, 137, 173, 117, 123, 138, 71, 124, 133, 160, 71, 261, 134, 135, - 125, 2904, 71, 179, 126, 127, 71, 180, 161, 71, - 136, 2904, 71, 200, 137, 173, 71, 123, 138, 70, + 125, 2912, 71, 179, 126, 127, 71, 180, 161, 71, + 136, 2912, 71, 200, 137, 173, 71, 123, 138, 70, 124, 70, 70, 75, 70, 75, 75, 125, 75, 71, 70, 126, 127, 149, 180, 149, 149, 70, 149, 70, 70, 75, 70, 75, 75, 165, 75, 175, 70, 168, 169, 166, 75, 167, 71, 176, 177, 183, 71, 182, - 2904, 152, 181, 178, 294, 2904, 71, 190, 188, 1139, - 71, 71, 165, 2904, 175, 71, 168, 169, 166, 76, + 2912, 152, 181, 178, 294, 2912, 71, 190, 188, 1147, + 71, 71, 165, 2912, 175, 71, 168, 169, 166, 76, 167, 71, 176, 177, 183, 71, 182, 191, 184, 181, 178, 185, 189, 193, 190, 198, 71, 194, 196, 71, 71, 202, 201, 197, 186, 187, 71, 192, 71, 71, - 199, 2904, 71, 195, 191, 184, 71, 71, 185, 189, + 199, 2912, 71, 195, 191, 184, 71, 71, 185, 189, 193, 71, 198, 206, 194, 196, 211, 203, 202, 201, 197, 186, 187, 71, 192, 204, 205, 199, 207, 208, 195, 71, 71, 209, 210, 71, 71, 71, 212, 213, - 206, 71, 71, 211, 203, 71, 216, 2904, 214, 217, + 206, 71, 71, 211, 203, 71, 216, 2912, 214, 217, 221, 71, 204, 205, 215, 207, 208, 71, 71, 218, - 209, 210, 71, 223, 71, 212, 213, 224, 228, 2904, - 219, 227, 2904, 216, 220, 214, 217, 221, 71, 71, + 209, 210, 71, 223, 71, 212, 213, 224, 228, 2912, + 219, 227, 2912, 216, 220, 214, 217, 221, 71, 71, 71, 215, 236, 71, 225, 230, 218, 226, 229, 231, 223, 71, 235, 71, 224, 228, 71, 219, 227, 232, - 71, 220, 237, 239, 71, 240, 2904, 71, 233, 236, + 71, 220, 237, 239, 71, 240, 2912, 71, 233, 236, 280, 225, 230, 238, 226, 229, 231, 71, 71, 235, - 234, 2904, 71, 71, 71, 71, 232, 241, 242, 237, + 234, 2912, 71, 71, 71, 71, 232, 241, 242, 237, 239, 144, 240, 144, 144, 233, 144, 280, 243, 149, 238, 149, 149, 75, 149, 75, 75, 234, 75, 245, 71, 150, 244, 246, 241, 242, 247, 249, 71, 250, - 251, 2904, 252, 248, 254, 71, 253, 255, 71, 340, - 71, 71, 2904, 71, 71, 71, 245, 259, 71, 244, + 251, 2912, 252, 248, 254, 71, 253, 255, 71, 340, + 71, 71, 2912, 71, 71, 71, 245, 259, 71, 244, 246, 152, 260, 247, 249, 71, 250, 251, 71, 252, 248, 254, 256, 253, 255, 258, 71, 71, 257, 71, 270, 274, 262, 276, 259, 271, 263, 272, 71, 260, - 275, 2904, 284, 71, 273, 278, 71, 71, 279, 2904, - 421, 71, 258, 264, 71, 257, 71, 270, 274, 71, + 275, 2912, 284, 71, 273, 278, 71, 71, 279, 2912, + 430, 71, 258, 264, 71, 257, 71, 270, 274, 71, 71, 277, 271, 263, 272, 71, 71, 275, 71, 284, - 71, 273, 278, 281, 285, 279, 293, 71, 2904, 282, - 264, 265, 283, 286, 2904, 71, 266, 71, 277, 291, - 2904, 267, 2904, 2904, 71, 298, 71, 268, 269, 2904, + 71, 273, 278, 281, 285, 279, 293, 71, 2912, 282, + 264, 265, 283, 286, 2912, 71, 266, 71, 277, 291, + 2912, 267, 2912, 2912, 71, 298, 71, 268, 269, 2912, 281, 285, 287, 293, 71, 71, 282, 288, 265, 283, 286, 71, 295, 266, 305, 292, 291, 300, 267, 289, 296, 290, 71, 299, 268, 269, 303, 71, 71, 287, 71, 297, 71, 301, 288, 304, 71, 306, 71, 295, - 307, 305, 292, 308, 311, 2904, 289, 302, 290, 71, + 307, 305, 292, 308, 311, 2912, 289, 302, 290, 71, 299, 71, 71, 303, 309, 310, 312, 313, 297, 314, - 2904, 315, 71, 71, 2904, 71, 428, 71, 71, 71, + 2912, 315, 71, 71, 2912, 71, 545, 71, 71, 71, 308, 311, 71, 316, 302, 71, 71, 71, 71, 317, 318, 309, 310, 312, 313, 319, 314, 320, 315, 321, @@ -1485,834 +1479,836 @@ static yyconst flex_uint16_t yy_nxt[8360] = 316, 326, 327, 324, 328, 330, 317, 318, 71, 333, 71, 71, 319, 329, 320, 332, 321, 322, 331, 334, 71, 71, 336, 71, 341, 323, 335, 71, 326, 327, - 324, 337, 330, 339, 71, 71, 71, 338, 343, 2904, + 324, 337, 330, 339, 71, 71, 71, 338, 343, 2912, 329, 71, 332, 71, 344, 331, 71, 342, 346, 350, 71, 71, 71, 335, 71, 347, 71, 348, 337, 71, - 339, 345, 2904, 354, 338, 349, 355, 352, 71, 71, + 339, 345, 2912, 354, 338, 349, 355, 352, 71, 71, 71, 344, 150, 71, 342, 346, 350, 71, 351, 353, 356, 357, 347, 71, 348, 71, 358, 359, 345, 71, - 365, 2904, 349, 363, 352, 71, 360, 366, 71, 71, + 365, 2912, 349, 363, 352, 71, 360, 366, 71, 71, 362, 361, 71, 71, 367, 351, 353, 356, 357, 71, 71, 368, 71, 71, 359, 364, 370, 71, 71, 371, 363, 71, 71, 360, 366, 71, 372, 362, 361, 71, 373, 367, 374, 376, 375, 378, 377, 71, 368, 380, - 2904, 71, 364, 370, 71, 71, 371, 381, 382, 379, - 387, 385, 71, 372, 71, 2904, 71, 373, 71, 374, - 376, 375, 71, 377, 383, 2904, 386, 71, 388, 2904, + 2912, 71, 364, 370, 71, 71, 371, 381, 382, 379, + 387, 385, 71, 372, 71, 2912, 71, 373, 71, 374, + 376, 375, 71, 377, 383, 2912, 386, 71, 388, 2912, 389, 71, 71, 392, 381, 71, 379, 71, 385, 71, - 71, 384, 71, 390, 391, 393, 401, 71, 71, 71, + 71, 384, 71, 390, 391, 393, 402, 71, 71, 71, 395, 383, 394, 386, 396, 388, 397, 389, 71, 71, - 392, 71, 399, 71, 402, 398, 410, 411, 384, 71, - 390, 391, 393, 71, 71, 400, 71, 395, 71, 394, - 403, 396, 71, 397, 71, 417, 71, 412, 71, 399, - 71, 402, 398, 410, 411, 71, 416, 2904, 418, 71, - 2904, 2904, 400, 413, 426, 414, 2904, 403, 404, 71, - 422, 405, 417, 71, 412, 437, 406, 407, 408, 409, - 71, 415, 71, 416, 425, 418, 71, 71, 419, 420, - - 413, 426, 414, 430, 71, 404, 71, 422, 405, 423, - 427, 429, 424, 406, 407, 408, 409, 71, 415, 71, - 431, 425, 432, 71, 435, 419, 420, 433, 71, 71, - 430, 71, 71, 71, 436, 434, 423, 427, 429, 424, - 2904, 438, 71, 71, 71, 439, 71, 431, 71, 432, - 440, 435, 441, 442, 433, 2904, 446, 453, 451, 443, - 2904, 436, 434, 444, 1014, 445, 454, 71, 438, 71, - 2904, 452, 439, 2904, 71, 71, 71, 465, 447, 441, - 442, 2904, 71, 446, 71, 451, 443, 71, 71, 71, - 444, 448, 445, 454, 449, 71, 450, 71, 452, 469, - - 466, 455, 71, 467, 465, 447, 71, 456, 468, 472, - 490, 457, 71, 470, 481, 71, 2904, 2904, 448, 458, - 71, 449, 71, 450, 484, 71, 469, 466, 455, 471, - 467, 480, 71, 2904, 456, 468, 472, 71, 457, 482, - 470, 481, 71, 71, 483, 71, 458, 459, 485, 460, - 488, 484, 486, 489, 150, 496, 471, 493, 480, 71, - 71, 71, 461, 491, 71, 462, 487, 463, 71, 464, - 71, 71, 502, 71, 459, 485, 460, 488, 71, 486, - 489, 492, 496, 2904, 493, 2904, 2904, 507, 71, 461, - 491, 494, 462, 487, 463, 2904, 464, 473, 474, 497, - - 495, 499, 2904, 501, 71, 498, 71, 475, 492, 476, - 477, 478, 71, 71, 479, 71, 503, 500, 506, 71, - 505, 2904, 71, 71, 473, 474, 497, 495, 499, 510, - 501, 71, 498, 504, 475, 71, 476, 477, 478, 71, - 71, 479, 71, 503, 500, 506, 508, 505, 71, 517, - 509, 71, 511, 512, 2904, 513, 510, 514, 515, 516, - 504, 71, 71, 522, 519, 520, 2904, 518, 71, 71, - 523, 524, 71, 508, 71, 2904, 517, 509, 71, 532, - 521, 71, 513, 71, 514, 515, 516, 71, 71, 71, - 522, 519, 520, 525, 518, 527, 526, 523, 524, 528, - - 531, 71, 533, 534, 71, 71, 532, 521, 71, 535, - 529, 537, 530, 536, 546, 2904, 2904, 71, 71, 71, - 525, 71, 527, 526, 538, 71, 528, 531, 539, 533, - 534, 541, 71, 547, 542, 540, 2904, 529, 537, 530, - 536, 71, 71, 543, 550, 544, 71, 71, 71, 545, - 71, 538, 548, 554, 575, 539, 71, 71, 541, 71, - 547, 542, 540, 549, 71, 71, 71, 551, 71, 71, - 543, 550, 544, 552, 556, 71, 545, 555, 557, 548, - 554, 553, 558, 71, 71, 561, 71, 559, 560, 71, - 549, 562, 563, 71, 551, 564, 2904, 565, 71, 71, - - 552, 556, 2904, 71, 555, 557, 71, 568, 553, 558, - 71, 71, 561, 71, 559, 560, 567, 570, 562, 563, - 566, 71, 564, 71, 565, 71, 71, 574, 571, 569, - 572, 573, 71, 576, 568, 71, 71, 71, 71, 577, - 71, 578, 580, 567, 570, 581, 579, 566, 582, 2904, - 2904, 71, 584, 2904, 574, 571, 569, 572, 573, 71, - 576, 71, 587, 71, 585, 589, 588, 583, 578, 580, - 71, 71, 581, 579, 71, 71, 71, 590, 591, 584, - 71, 592, 596, 71, 594, 593, 597, 586, 71, 587, - 71, 595, 589, 588, 583, 1259, 71, 71, 607, 639, - - 71, 71, 71, 71, 590, 591, 71, 2904, 592, 596, - 71, 594, 593, 597, 586, 606, 608, 2904, 595, 598, - 609, 2904, 71, 71, 599, 607, 600, 611, 71, 610, - 2904, 71, 601, 2904, 602, 615, 2904, 603, 604, 71, - 71, 2904, 606, 608, 605, 71, 598, 609, 612, 616, - 71, 599, 613, 600, 611, 614, 610, 71, 620, 601, - 71, 602, 615, 617, 603, 604, 623, 71, 618, 71, - 71, 605, 621, 71, 2904, 612, 616, 624, 619, 613, - 622, 71, 614, 626, 71, 620, 625, 628, 71, 627, - 617, 2904, 2904, 623, 629, 2904, 71, 633, 632, 621, - - 71, 71, 71, 71, 624, 619, 71, 622, 636, 71, - 626, 630, 631, 625, 628, 71, 627, 71, 634, 71, - 71, 629, 635, 637, 633, 632, 71, 640, 638, 71, - 650, 641, 642, 643, 71, 636, 644, 648, 630, 631, - 71, 71, 71, 71, 645, 634, 71, 646, 71, 635, - 637, 150, 647, 71, 640, 638, 649, 71, 641, 642, - 643, 651, 71, 644, 648, 652, 71, 653, 656, 654, - 71, 645, 2904, 655, 646, 71, 657, 2904, 659, 647, - 71, 71, 658, 649, 71, 664, 667, 663, 71, 668, - 665, 669, 652, 71, 670, 656, 654, 71, 71, 71, - - 655, 660, 71, 657, 71, 659, 666, 671, 661, 658, - 672, 662, 673, 71, 663, 2904, 71, 71, 71, 71, - 71, 71, 674, 71, 676, 675, 677, 683, 660, 2904, - 678, 2904, 71, 666, 71, 661, 679, 680, 662, 673, - 681, 71, 71, 682, 688, 71, 71, 71, 71, 674, - 684, 676, 675, 677, 71, 2904, 685, 678, 71, 71, - 686, 687, 689, 679, 680, 71, 71, 681, 71, 691, - 682, 694, 690, 71, 692, 697, 71, 684, 693, 699, - 71, 695, 71, 685, 71, 71, 696, 686, 687, 689, - 698, 700, 71, 71, 701, 71, 691, 71, 694, 690, - - 703, 692, 697, 71, 702, 693, 699, 71, 695, 2904, - 704, 707, 71, 696, 706, 2904, 710, 698, 700, 709, - 708, 2904, 71, 713, 71, 71, 71, 703, 711, 715, - 71, 702, 705, 71, 716, 71, 71, 704, 707, 712, - 719, 706, 71, 710, 714, 71, 709, 708, 71, 717, - 713, 71, 71, 71, 718, 711, 71, 71, 71, 705, - 720, 716, 721, 722, 723, 71, 712, 719, 724, 2904, - 726, 714, 727, 728, 725, 71, 717, 730, 2904, 71, - 729, 718, 2904, 739, 71, 71, 731, 720, 71, 732, - 722, 723, 71, 733, 71, 724, 71, 726, 734, 727, - - 735, 725, 71, 736, 740, 71, 741, 729, 743, 71, - 71, 71, 71, 731, 71, 71, 732, 71, 737, 738, - 742, 745, 746, 744, 71, 71, 71, 735, 750, 747, - 736, 740, 71, 741, 748, 743, 751, 71, 71, 749, - 752, 2904, 71, 754, 753, 737, 738, 742, 755, 746, - 744, 71, 71, 71, 71, 750, 747, 71, 760, 761, - 756, 762, 2904, 751, 757, 71, 71, 752, 71, 71, - 754, 753, 758, 71, 759, 755, 765, 763, 767, 71, - 71, 71, 71, 764, 766, 71, 761, 756, 762, 71, - 71, 757, 71, 71, 768, 71, 769, 771, 2904, 758, - - 770, 759, 774, 765, 763, 767, 71, 772, 773, 775, - 764, 766, 71, 71, 777, 71, 71, 782, 71, 776, - 781, 768, 2904, 71, 771, 71, 783, 770, 71, 774, - 71, 778, 779, 71, 772, 773, 775, 780, 785, 786, - 71, 777, 784, 71, 782, 71, 776, 781, 787, 71, - 71, 788, 71, 783, 71, 789, 791, 790, 778, 779, - 793, 798, 71, 71, 780, 785, 786, 792, 794, 784, - 71, 71, 796, 797, 795, 787, 71, 2904, 788, 71, - 71, 71, 789, 791, 790, 799, 800, 793, 798, 71, - 71, 801, 802, 71, 792, 794, 71, 803, 71, 796, - - 797, 795, 804, 805, 71, 806, 71, 810, 807, 808, - 813, 809, 799, 800, 150, 814, 71, 71, 801, 802, - 71, 71, 71, 71, 803, 71, 818, 816, 822, 804, - 805, 811, 806, 71, 71, 807, 808, 71, 809, 812, - 815, 819, 814, 817, 820, 821, 71, 2904, 71, 71, - 71, 2904, 839, 818, 71, 823, 71, 71, 811, 71, - 71, 824, 827, 826, 825, 71, 812, 815, 819, 71, - 817, 820, 821, 71, 71, 833, 834, 835, 71, 839, - 836, 71, 823, 837, 841, 838, 71, 71, 824, 827, - 826, 825, 828, 2904, 71, 71, 829, 845, 840, 830, - - 71, 71, 833, 834, 835, 843, 831, 836, 71, 832, - 837, 841, 838, 842, 71, 853, 2904, 858, 71, 828, - 844, 2904, 71, 829, 71, 840, 830, 71, 854, 71, - 855, 2904, 843, 831, 71, 860, 832, 71, 2904, 71, - 842, 856, 853, 71, 71, 857, 861, 844, 846, 847, - 859, 848, 2904, 862, 849, 854, 2904, 855, 71, 850, - 863, 71, 860, 865, 864, 851, 852, 2904, 856, 71, - 71, 866, 857, 861, 71, 846, 847, 859, 848, 71, - 862, 849, 71, 869, 867, 71, 850, 863, 71, 868, - 865, 864, 851, 852, 870, 871, 71, 71, 866, 71, - - 872, 71, 873, 71, 876, 874, 71, 875, 878, 877, - 869, 867, 880, 882, 2904, 881, 868, 71, 71, 71, - 71, 870, 871, 71, 886, 885, 887, 872, 71, 873, - 71, 876, 874, 879, 875, 878, 877, 71, 71, 888, - 71, 883, 881, 889, 71, 890, 884, 71, 2904, 891, - 2904, 2904, 885, 894, 898, 892, 71, 895, 71, 893, - 879, 71, 71, 896, 901, 932, 888, 2904, 900, 71, - 71, 899, 890, 71, 71, 71, 891, 897, 71, 71, - 894, 71, 892, 71, 895, 71, 893, 71, 903, 71, - 896, 902, 904, 906, 905, 900, 71, 71, 899, 71, - - 907, 908, 912, 910, 897, 71, 71, 911, 914, 909, - 71, 71, 2904, 2904, 71, 903, 71, 913, 902, 904, - 906, 905, 71, 71, 71, 71, 71, 907, 908, 912, - 910, 916, 918, 71, 911, 914, 909, 915, 919, 917, - 71, 920, 922, 923, 913, 921, 924, 71, 71, 925, - 71, 2904, 2904, 71, 71, 71, 926, 71, 916, 918, - 927, 929, 933, 71, 915, 71, 917, 71, 920, 922, - 923, 928, 921, 924, 931, 71, 925, 930, 71, 934, - 71, 937, 71, 926, 71, 935, 71, 927, 929, 933, - 936, 939, 938, 71, 71, 940, 942, 2904, 928, 949, - - 941, 931, 71, 71, 930, 71, 934, 71, 937, 943, - 944, 951, 935, 71, 71, 946, 71, 936, 939, 938, - 71, 945, 71, 942, 947, 950, 948, 941, 71, 71, - 953, 71, 71, 71, 952, 954, 943, 944, 71, 956, - 2904, 71, 946, 71, 960, 955, 962, 71, 945, 957, - 71, 947, 950, 948, 961, 959, 966, 958, 968, 963, - 964, 952, 71, 967, 71, 965, 956, 71, 71, 71, - 71, 960, 955, 970, 971, 2904, 957, 71, 71, 71, - 71, 961, 959, 71, 958, 71, 963, 964, 71, 969, - 967, 972, 965, 974, 973, 71, 978, 975, 71, 976, - - 970, 150, 71, 71, 71, 977, 71, 979, 981, 980, - 71, 989, 992, 1011, 2904, 71, 969, 71, 972, 71, - 974, 973, 71, 978, 975, 982, 976, 71, 2904, 2904, - 991, 71, 977, 990, 979, 981, 980, 71, 989, 71, - 994, 993, 71, 71, 2904, 71, 995, 997, 1008, 996, - 2904, 998, 982, 983, 71, 984, 71, 991, 71, 985, - 990, 986, 71, 71, 71, 999, 987, 994, 993, 71, - 1000, 988, 1001, 995, 997, 1008, 996, 71, 998, 1002, - 983, 1004, 984, 1003, 1012, 71, 985, 1006, 986, 2904, - 1010, 1005, 1007, 987, 1009, 71, 1013, 71, 988, 1001, - - 1015, 2904, 71, 71, 1017, 71, 1002, 71, 1004, 71, - 1003, 71, 71, 1018, 1006, 1016, 71, 1010, 1005, 1007, - 71, 1009, 71, 71, 1026, 1027, 2904, 1030, 1028, 2904, - 1029, 1017, 71, 1036, 2904, 1038, 1031, 2904, 2904, 71, - 1018, 71, 1016, 1019, 2904, 71, 1032, 71, 1020, 1042, - 1021, 1026, 1027, 71, 1030, 1028, 1022, 1029, 71, 1033, - 71, 1023, 1024, 1031, 1037, 71, 1034, 71, 1025, 71, - 1019, 1035, 71, 1032, 71, 1020, 1039, 1021, 1041, 71, - 1043, 71, 1040, 1022, 1048, 2904, 1033, 71, 1023, 1024, - 71, 1037, 71, 1034, 1045, 1025, 1044, 1046, 1035, 1047, - - 71, 1049, 71, 1039, 71, 1041, 1050, 1043, 1051, 1040, - 71, 1052, 71, 1060, 71, 71, 71, 1055, 71, 71, - 1058, 1045, 1054, 1044, 1046, 1056, 1047, 1053, 1049, 71, - 71, 1061, 71, 1050, 2904, 1051, 1059, 1057, 1052, 2904, - 71, 71, 71, 71, 1055, 71, 71, 1058, 1062, 1054, - 1063, 1064, 1056, 1065, 1053, 71, 1066, 71, 1061, 71, - 1067, 71, 1068, 1059, 1057, 71, 71, 1071, 1069, 1070, - 1073, 1072, 71, 2904, 1074, 1062, 1080, 1063, 1064, 1078, - 1065, 1075, 1079, 1066, 71, 71, 1082, 1067, 71, 1068, - 71, 71, 71, 71, 1071, 1069, 1070, 71, 1072, 1076, - - 71, 1074, 71, 1080, 1077, 71, 1078, 1081, 1075, 1079, - 1083, 1084, 1085, 1082, 1086, 1087, 1088, 1089, 1091, 71, - 71, 2904, 71, 1090, 71, 71, 1097, 1092, 2904, 71, - 1094, 71, 1093, 1095, 1081, 1101, 1096, 1083, 1084, 1085, - 71, 71, 1087, 71, 1089, 1091, 71, 71, 71, 71, - 1090, 71, 71, 1097, 1092, 71, 1098, 1094, 1099, 1093, - 1095, 1100, 71, 1096, 1102, 1103, 2904, 71, 2904, 1105, - 1104, 1106, 2904, 1107, 71, 1109, 1110, 1108, 1111, 71, - 71, 71, 71, 1098, 71, 1099, 1112, 1113, 1116, 1114, - 71, 1102, 1103, 71, 71, 71, 1105, 1104, 1106, 71, - - 1107, 1115, 1109, 1110, 1108, 1118, 1117, 1119, 1120, 71, - 71, 71, 71, 1121, 1113, 71, 1114, 1124, 71, 1122, - 71, 1125, 2904, 71, 1123, 1126, 71, 1127, 1115, 1128, - 71, 1131, 1118, 1117, 1132, 1120, 2904, 71, 71, 71, - 71, 1133, 71, 71, 1124, 71, 1122, 1129, 1125, 71, - 1130, 1123, 1126, 71, 1127, 1135, 1128, 1134, 71, 1136, - 1137, 1138, 71, 71, 1142, 1141, 71, 71, 1133, 1140, - 1145, 1153, 71, 71, 1129, 2904, 71, 1130, 71, 71, - 1151, 1144, 71, 71, 1134, 1146, 1136, 1137, 1138, 71, - 1147, 1142, 1141, 1143, 1148, 71, 1140, 71, 71, 1152, - - 1149, 1150, 71, 71, 1154, 2904, 71, 71, 1144, 71, - 1155, 2904, 1146, 1156, 1163, 2904, 1158, 1147, 2904, 71, - 1143, 1148, 71, 1157, 1160, 1162, 1152, 1149, 1150, 71, - 1161, 1159, 71, 71, 71, 1164, 71, 1155, 71, 1166, - 1156, 1163, 71, 1158, 71, 71, 71, 71, 1165, 1169, - 1157, 1160, 1162, 1170, 1167, 1168, 71, 1161, 1159, 2904, - 2904, 71, 1164, 1171, 71, 1177, 71, 71, 1176, 1178, - 71, 1179, 2904, 1180, 71, 1165, 1169, 1172, 2904, 2904, - 1170, 1167, 1168, 1182, 71, 1183, 1173, 71, 1174, 71, - 1171, 1175, 1177, 1181, 71, 1176, 1178, 71, 1179, 71, - - 1180, 71, 71, 1184, 1172, 1185, 1186, 71, 1187, 1188, - 1182, 71, 1183, 1173, 2904, 1174, 71, 1189, 1175, 1190, - 1181, 1191, 71, 1192, 1193, 1194, 1195, 71, 71, 2904, - 1184, 2904, 1185, 1186, 1197, 1187, 71, 1196, 71, 71, - 1198, 71, 71, 71, 1189, 71, 1190, 71, 1191, 71, - 1192, 1193, 1194, 1195, 1199, 71, 1200, 1201, 1205, 1203, - 1202, 1197, 1204, 1206, 1196, 71, 71, 1198, 71, 1211, - 1207, 71, 71, 1208, 1209, 71, 71, 71, 1210, 71, - 71, 1199, 71, 1200, 1201, 1205, 1203, 1202, 1212, 1204, - 1206, 1213, 71, 1215, 1214, 1218, 1211, 1207, 71, 1216, - - 1208, 1209, 1221, 71, 1217, 1232, 1219, 71, 71, 1220, - 71, 1228, 1229, 2904, 1230, 1212, 71, 1231, 1213, 71, - 1215, 1214, 1218, 71, 1234, 71, 1235, 71, 71, 1221, - 71, 71, 1232, 1219, 1233, 1236, 1220, 1222, 1228, 1229, - 1223, 1224, 2904, 71, 1231, 1225, 71, 1237, 71, 1239, - 2904, 1226, 71, 1235, 1238, 1227, 71, 71, 2904, 71, - 71, 1233, 1236, 1240, 1222, 1241, 1244, 1223, 1224, 1246, - 1242, 1243, 1225, 71, 1237, 71, 1239, 71, 1226, 1245, - 71, 1238, 1227, 1251, 71, 1248, 71, 71, 1247, 1249, - 1240, 71, 1241, 1244, 71, 1250, 1246, 1242, 1243, 1252, - - 2904, 71, 2904, 1258, 1260, 71, 1245, 1262, 1265, 1261, - 1251, 1267, 1248, 1266, 1263, 1247, 71, 1281, 2904, 71, - 71, 71, 71, 71, 1264, 1268, 1252, 71, 1253, 71, - 1258, 1260, 71, 1254, 1262, 1255, 1261, 1256, 1267, 1257, - 71, 1263, 71, 1269, 71, 1270, 71, 71, 1273, 1271, - 1272, 1264, 1268, 1277, 2904, 1253, 71, 71, 71, 1275, - 1254, 1274, 1255, 71, 1256, 1276, 1257, 71, 1280, 1283, - 1269, 71, 1270, 1278, 71, 1273, 1271, 1272, 71, 1282, - 1277, 71, 71, 1279, 1284, 71, 1275, 1288, 1274, 1285, - 71, 71, 1276, 1286, 1287, 1280, 71, 1289, 1291, 2904, - - 1278, 1290, 71, 1292, 1293, 71, 1282, 1296, 71, 71, - 1279, 1284, 1294, 71, 1288, 71, 1285, 1295, 71, 1298, - 1286, 1287, 2904, 71, 71, 71, 71, 1300, 1290, 71, - 1292, 1293, 1301, 1297, 71, 1299, 1302, 1308, 1303, 1294, - 71, 1305, 71, 71, 1295, 1304, 1298, 71, 1306, 71, - 71, 1307, 1309, 71, 1300, 1310, 71, 1311, 1312, 1301, - 1297, 71, 1299, 1302, 1308, 1303, 1314, 1313, 1305, 71, - 71, 1315, 1304, 71, 71, 1306, 71, 71, 1307, 1309, - 71, 1316, 1310, 71, 1311, 1312, 1317, 71, 1318, 1319, - 1320, 71, 1321, 1314, 1313, 71, 1322, 1323, 1315, 1324, - - 1325, 1327, 1326, 1328, 71, 71, 1329, 71, 1316, 71, - 71, 71, 1330, 71, 1331, 1340, 1319, 71, 71, 1321, - 71, 1338, 71, 1322, 1323, 1334, 71, 1325, 1327, 1326, - 1332, 1336, 71, 71, 1335, 71, 1333, 1342, 71, 1330, - 1343, 1337, 1340, 71, 71, 1341, 71, 71, 1338, 71, - 71, 1344, 1334, 1339, 71, 71, 1350, 1332, 1336, 71, - 71, 1335, 1345, 1333, 1342, 1346, 1347, 71, 1337, 1351, - 1349, 1348, 1341, 71, 71, 1353, 2904, 1352, 1344, 71, - 1339, 1358, 1354, 1350, 71, 1355, 1359, 71, 71, 1345, - 71, 1360, 1346, 1361, 71, 2904, 1351, 1349, 71, 71, - - 1356, 1362, 1353, 1357, 1352, 1365, 71, 1363, 1358, 1354, - 1364, 71, 1355, 1359, 71, 71, 71, 71, 1366, 1368, - 1361, 2904, 71, 71, 1367, 1370, 1371, 1356, 1362, 1369, - 1357, 1373, 1365, 71, 1363, 71, 71, 1364, 71, 1372, - 71, 71, 1374, 1377, 2904, 1366, 1368, 1376, 71, 1378, - 1375, 1367, 1370, 1371, 1379, 71, 1369, 71, 1373, 71, - 1380, 1384, 71, 1383, 71, 71, 1372, 1381, 1382, 1374, - 1389, 71, 1385, 71, 1376, 71, 1378, 1375, 1386, 71, - 71, 1379, 1387, 71, 1388, 1391, 1390, 1380, 1384, 1394, - 1383, 71, 71, 1393, 1381, 1382, 71, 1389, 71, 1385, - - 71, 1392, 71, 1395, 1396, 1386, 71, 71, 2904, 1387, - 1397, 1388, 1391, 1390, 1398, 71, 1399, 1401, 2904, 1402, - 1393, 71, 1400, 2904, 1405, 1409, 71, 1404, 1392, 2904, - 71, 1396, 71, 1403, 1407, 71, 71, 1397, 71, 71, - 71, 71, 1408, 1399, 1401, 71, 1402, 71, 1406, 1400, - 71, 1405, 1409, 71, 1404, 71, 1416, 1410, 1411, 1415, - 1403, 1407, 1413, 1412, 71, 71, 71, 1414, 1417, 1408, - 1418, 1419, 1421, 1424, 1420, 1406, 71, 1427, 71, 1428, - 71, 1422, 71, 1416, 1410, 1425, 1415, 71, 71, 71, - 71, 1423, 1426, 71, 71, 1417, 71, 1418, 1419, 1421, - - 71, 1420, 1429, 1430, 1436, 71, 1428, 71, 1422, 71, - 71, 1438, 1425, 1431, 1432, 1435, 1433, 1434, 1423, 1426, - 1437, 71, 71, 71, 71, 71, 1439, 1441, 71, 1429, - 1440, 1436, 71, 1442, 1444, 71, 1443, 71, 1438, 1454, - 1431, 1432, 1435, 1433, 1434, 71, 1445, 1437, 71, 1450, - 71, 1446, 1447, 1439, 71, 71, 1448, 1440, 1451, 71, - 1442, 1444, 1455, 1443, 71, 71, 71, 1452, 1456, 1449, - 71, 71, 2904, 1445, 71, 1453, 1450, 71, 1446, 1447, - 1457, 1458, 1462, 1448, 71, 1451, 71, 2904, 1460, 1455, - 71, 1459, 1461, 1463, 1452, 1456, 1449, 71, 71, 71, - - 1464, 1466, 1453, 71, 71, 1465, 1468, 1457, 1458, 71, - 1467, 71, 1470, 2904, 71, 1460, 1471, 1469, 1459, 1461, - 71, 1472, 1473, 71, 71, 1478, 1475, 1464, 1466, 1477, - 1474, 2904, 1465, 71, 1479, 1476, 71, 1467, 71, 71, - 71, 71, 71, 1471, 1469, 1482, 71, 71, 71, 1473, - 71, 71, 1478, 1475, 1480, 1481, 1477, 1474, 1483, 1485, - 71, 1479, 1476, 71, 1484, 1486, 1489, 71, 71, 1488, - 1493, 71, 1482, 1487, 1490, 71, 1491, 71, 1496, 71, - 2904, 1480, 1481, 71, 1494, 1483, 1485, 1492, 1502, 1497, - 71, 1484, 1486, 1489, 71, 71, 1488, 71, 71, 71, - - 1487, 1490, 1495, 1491, 71, 1496, 1498, 71, 1499, 71, - 1500, 1494, 1501, 2904, 1492, 71, 1497, 1503, 71, 1504, - 1505, 1506, 71, 1507, 2904, 1508, 71, 71, 71, 1495, - 1509, 71, 71, 1498, 71, 1499, 71, 1500, 1510, 1501, - 1514, 1513, 1511, 2904, 1503, 1516, 1504, 1505, 1506, 71, - 1507, 1512, 1508, 1517, 1515, 1518, 71, 1509, 71, 71, - 71, 71, 71, 1520, 1519, 1510, 1521, 1514, 1513, 1511, - 71, 71, 1516, 1522, 1523, 71, 1524, 1525, 1512, 71, - 1517, 1515, 71, 1526, 2904, 1527, 71, 71, 1528, 1529, - 2904, 1519, 1533, 1521, 1531, 71, 1530, 71, 1532, 71, - - 71, 1523, 71, 1524, 1525, 71, 71, 1539, 1540, 1534, - 1526, 71, 1527, 1535, 71, 1528, 1529, 1545, 71, 1533, - 71, 1531, 71, 1530, 71, 1532, 1536, 1541, 2904, 1537, - 71, 1547, 1543, 1542, 71, 1540, 1534, 1544, 2904, 71, - 1535, 1538, 1549, 1546, 1550, 71, 1548, 1556, 1551, 71, - 71, 1557, 1559, 1536, 1541, 71, 1537, 71, 1547, 1543, - 1542, 71, 71, 1555, 1544, 71, 71, 1552, 1538, 1553, - 1546, 1550, 71, 1548, 71, 1551, 71, 71, 1554, 71, - 1558, 1561, 1560, 71, 71, 71, 71, 71, 1562, 1563, - 1555, 1564, 1565, 1567, 1552, 1569, 1553, 1566, 1570, 71, - - 71, 1568, 71, 71, 71, 1554, 71, 1558, 1561, 1560, - 71, 71, 71, 1571, 71, 71, 1563, 1576, 1564, 1565, - 1567, 1574, 1569, 1572, 1566, 1570, 1573, 1578, 1568, 1575, - 71, 1577, 1583, 71, 71, 71, 1579, 1582, 71, 1580, - 71, 71, 1581, 1584, 71, 71, 1589, 1586, 1574, 71, - 1572, 71, 1594, 1573, 1578, 71, 1575, 71, 1577, 1583, - 1585, 71, 71, 1579, 1582, 1587, 1580, 71, 1588, 1581, - 1584, 1595, 71, 1589, 1586, 1592, 1590, 71, 1596, 71, - 1593, 1591, 1597, 71, 1599, 1600, 1598, 1585, 71, 1601, - 1605, 71, 1587, 71, 1611, 1588, 1602, 71, 71, 71, - - 1603, 71, 1592, 1590, 71, 1596, 1604, 1593, 1591, 1597, - 71, 71, 1600, 1598, 71, 1612, 1601, 1605, 71, 1606, - 1607, 1608, 71, 1602, 1609, 1610, 71, 1603, 71, 1613, - 1614, 1615, 1616, 1604, 1621, 1618, 71, 71, 1617, 71, - 71, 1637, 71, 71, 71, 71, 1606, 1607, 1608, 71, - 71, 1609, 1610, 1619, 1620, 71, 1613, 1614, 1615, 1616, - 71, 1621, 1618, 71, 1622, 1617, 1623, 1624, 71, 1625, - 1627, 1630, 1635, 1628, 1632, 71, 1629, 71, 1631, 1633, - 1619, 1620, 1638, 1626, 71, 71, 1634, 71, 71, 71, - 1639, 1622, 1636, 1623, 1624, 71, 1625, 1627, 1630, 71, - - 1628, 71, 1640, 1629, 71, 1631, 71, 1644, 1641, 1642, - 1626, 1643, 71, 1634, 71, 1650, 71, 1639, 1645, 1636, - 1646, 1649, 1648, 71, 71, 1651, 1647, 1660, 1653, 71, - 1652, 2904, 71, 71, 71, 1641, 1642, 1654, 1643, 71, - 71, 1658, 1650, 1661, 71, 1645, 71, 1646, 1649, 71, - 1656, 71, 1651, 1647, 71, 1653, 1655, 1652, 1657, 71, - 1662, 1665, 1659, 71, 1654, 1663, 1666, 1664, 71, 71, - 71, 71, 71, 1667, 71, 71, 71, 1656, 2904, 1668, - 71, 1670, 1671, 1655, 71, 1657, 1669, 1662, 1665, 1659, - 71, 1672, 1663, 1666, 1664, 1674, 1673, 71, 71, 1675, - - 1678, 1680, 1676, 1679, 71, 71, 1668, 1677, 1670, 71, - 1684, 2904, 1681, 1669, 2904, 71, 1682, 71, 1672, 71, - 71, 71, 1674, 1673, 71, 71, 1675, 1678, 71, 1676, - 1679, 71, 1683, 1685, 1677, 1686, 1687, 71, 1688, 1681, - 71, 1689, 1691, 1682, 1700, 1690, 71, 2904, 1693, 71, - 1694, 71, 71, 71, 1692, 71, 1695, 71, 1696, 1683, - 1685, 1697, 1686, 1687, 1698, 1688, 1699, 1701, 1689, 71, - 1707, 71, 1690, 1703, 71, 1693, 71, 1694, 1704, 71, - 1702, 1692, 71, 71, 71, 1696, 71, 1706, 71, 1705, - 1708, 1698, 71, 1699, 71, 71, 71, 1707, 71, 71, - - 1703, 1709, 71, 1710, 1711, 1704, 1712, 1702, 1716, 1714, - 1713, 1718, 1717, 1719, 1706, 71, 1705, 1708, 71, 71, - 1720, 71, 1715, 71, 71, 1724, 71, 71, 1709, 1722, - 1710, 1711, 71, 1712, 1721, 1716, 1714, 1713, 71, 1717, - 71, 1723, 71, 1727, 1725, 71, 1726, 1720, 71, 1715, - 71, 1728, 1724, 1729, 1731, 1730, 1722, 71, 1732, 1733, - 1734, 1721, 71, 1735, 1737, 71, 71, 1738, 1723, 71, - 1727, 1725, 1736, 1726, 1739, 1741, 1743, 1742, 71, 71, - 71, 71, 1730, 1740, 71, 1732, 1733, 1734, 1744, 1746, - 71, 71, 71, 1745, 1738, 71, 71, 1753, 1751, 1736, - - 71, 1752, 1761, 1743, 1742, 71, 71, 71, 71, 1754, - 1740, 1747, 1748, 1749, 1757, 71, 71, 1755, 1750, 71, - 1745, 71, 1756, 1758, 1762, 1751, 71, 71, 1752, 71, - 1759, 1760, 1765, 2904, 71, 1767, 1754, 1763, 1747, 1748, - 1749, 1757, 71, 71, 71, 1750, 71, 1764, 71, 71, - 1758, 1762, 1770, 71, 1766, 71, 1768, 1759, 1760, 71, - 1769, 71, 1767, 71, 1763, 71, 1771, 1773, 1772, 1774, - 1775, 71, 1776, 1778, 1764, 71, 1777, 1779, 71, 1770, - 1780, 1766, 71, 1768, 2904, 2904, 71, 1769, 71, 1781, - 71, 1782, 1783, 71, 71, 1772, 1774, 1775, 1785, 1776, - - 1788, 71, 1789, 1777, 71, 71, 1787, 1780, 1784, 71, - 71, 71, 1786, 71, 1790, 1794, 1781, 71, 1782, 1783, - 1791, 71, 71, 1792, 71, 1785, 1793, 1788, 2904, 1795, - 1796, 2904, 2904, 1787, 71, 1784, 1797, 1798, 1799, 1786, - 71, 1790, 71, 71, 1800, 71, 1803, 1791, 71, 1804, - 1801, 71, 1816, 71, 2904, 71, 1795, 1796, 71, 71, - 1802, 71, 1805, 1797, 1798, 1799, 1806, 1807, 71, 71, - 1814, 1800, 71, 1803, 1811, 1809, 1810, 1801, 71, 71, - 1812, 71, 71, 1808, 71, 1813, 71, 1802, 71, 1805, - 71, 71, 1817, 1806, 1807, 1815, 1820, 1814, 1821, 1824, - - 1818, 1811, 1809, 1810, 71, 1819, 1823, 1812, 71, 1827, - 1808, 1822, 1813, 71, 71, 71, 71, 1829, 1828, 1817, - 1830, 71, 1815, 71, 71, 1821, 1824, 1818, 1825, 1826, - 71, 1831, 1819, 1823, 1833, 71, 71, 1832, 1822, 71, - 1837, 71, 1836, 1834, 1829, 1828, 1838, 71, 1835, 71, - 1841, 1842, 71, 1843, 71, 1825, 1826, 71, 1831, 71, - 71, 1833, 1844, 1839, 1832, 1846, 1845, 71, 1840, 1836, - 1834, 1847, 2904, 71, 1851, 1835, 1848, 1849, 1853, 2904, - 1843, 71, 71, 71, 71, 1850, 71, 71, 1859, 1844, - 1854, 1852, 71, 1845, 1855, 71, 71, 71, 1847, 71, - - 1856, 1857, 1858, 1848, 1849, 71, 71, 1860, 71, 71, - 71, 1861, 1850, 1862, 71, 1859, 1863, 1854, 1852, 1865, - 71, 1855, 1864, 71, 1866, 1868, 71, 1856, 1857, 1858, - 1869, 2904, 1867, 1875, 71, 1871, 1874, 2904, 71, 2904, - 1862, 71, 1877, 71, 2904, 71, 1865, 71, 71, 1864, - 71, 1866, 1868, 1870, 71, 1872, 1873, 1869, 71, 1867, - 71, 71, 1871, 1874, 71, 1878, 1876, 1879, 71, 1877, - 71, 71, 1880, 1881, 1884, 1886, 1882, 1887, 1883, 71, - 1870, 2904, 1872, 1873, 71, 71, 71, 71, 1885, 1890, - 71, 71, 1878, 1876, 71, 1888, 1891, 71, 71, 1880, - - 1881, 1884, 1892, 1882, 1887, 1883, 1889, 71, 1893, 1894, - 71, 1895, 1896, 1897, 71, 1885, 1890, 71, 1898, 1899, - 1900, 71, 1888, 1891, 71, 1902, 71, 71, 71, 1892, - 1901, 71, 1904, 1889, 71, 1893, 1894, 71, 1895, 1896, - 1897, 71, 1903, 71, 1905, 71, 1899, 1900, 1906, 2904, - 1908, 1907, 1902, 1909, 71, 71, 1911, 1901, 1912, 1910, - 1914, 2904, 2904, 71, 71, 1924, 71, 1915, 2904, 1903, - 1913, 1905, 71, 2904, 71, 1906, 71, 71, 1907, 71, - 1909, 1916, 71, 1911, 71, 1912, 1910, 1914, 71, 1917, - 1918, 71, 71, 1919, 1915, 1922, 71, 1913, 1920, 1923, - - 1925, 1928, 71, 1926, 71, 71, 1929, 1927, 1916, 71, - 71, 1921, 1932, 71, 71, 1930, 1917, 1918, 1931, 71, - 1919, 71, 1922, 71, 1933, 1920, 1923, 1925, 1928, 1934, - 1926, 71, 1935, 1929, 1927, 1936, 1937, 71, 1921, 1932, - 1938, 1939, 1930, 71, 71, 1931, 71, 1941, 1942, 71, - 71, 1933, 1940, 1943, 71, 71, 1934, 1944, 71, 1935, - 71, 71, 1936, 1937, 1945, 1946, 71, 1938, 1939, 1949, - 1950, 1947, 71, 1948, 1941, 1942, 1951, 71, 71, 1940, - 71, 2904, 1952, 1954, 1944, 1953, 71, 1957, 1956, 2904, - 71, 1945, 1946, 71, 1958, 71, 1949, 1950, 1947, 71, - - 1948, 71, 71, 1955, 71, 1959, 1960, 1961, 71, 1952, - 1954, 71, 1953, 71, 71, 1956, 1962, 71, 1964, 1963, - 71, 1958, 1966, 2904, 1968, 1967, 1965, 2904, 1969, 1970, - 1955, 1975, 1959, 1960, 1973, 1974, 1976, 71, 71, 71, - 71, 71, 1985, 1962, 71, 1964, 1963, 71, 2904, 71, - 71, 1968, 1967, 1965, 71, 1969, 1970, 1971, 1977, 71, - 1972, 1973, 1974, 71, 1978, 1979, 1980, 1981, 1982, 71, - 1983, 2904, 1984, 1989, 1986, 71, 71, 71, 2904, 71, - 71, 2904, 71, 71, 1971, 1977, 71, 1972, 71, 71, - 71, 1978, 1979, 1980, 1981, 1982, 1987, 1983, 1988, 1984, - - 1989, 1986, 1990, 1991, 1992, 71, 1993, 2904, 1996, 71, - 1994, 2904, 1995, 71, 71, 1997, 2000, 1999, 71, 71, - 71, 2005, 2003, 1987, 71, 1988, 71, 2004, 1998, 1990, - 1991, 1992, 71, 1993, 71, 1996, 71, 1994, 71, 1995, - 2001, 2002, 1997, 2000, 1999, 71, 2006, 2007, 71, 2003, - 71, 2008, 71, 2009, 2004, 1998, 2011, 2010, 2012, 71, - 2014, 2015, 2016, 2013, 71, 2028, 2904, 2001, 2002, 2017, - 71, 2019, 2024, 2006, 71, 2018, 71, 2904, 2008, 71, - 2009, 2020, 71, 2011, 2010, 2023, 71, 2025, 71, 2016, - 71, 2027, 71, 71, 2026, 2021, 2017, 71, 71, 71, - - 71, 2029, 2018, 71, 2030, 2031, 2022, 71, 2020, 71, - 2904, 2033, 2023, 71, 2025, 2032, 2904, 2034, 2027, 2035, - 2904, 2026, 2021, 71, 2036, 2037, 71, 71, 2029, 2904, - 71, 2030, 71, 2022, 2038, 2039, 2040, 71, 2041, 71, - 71, 2042, 2032, 71, 2034, 2044, 2035, 71, 71, 2047, - 71, 2036, 2037, 2043, 2045, 2046, 71, 2048, 71, 2049, - 71, 2038, 2039, 2040, 71, 2041, 2051, 71, 2042, 2052, - 2050, 71, 71, 2054, 71, 2904, 2047, 71, 71, 2055, - 2043, 2045, 2046, 71, 2048, 2053, 2049, 2056, 71, 2059, - 2065, 2057, 71, 2051, 71, 71, 2052, 2050, 71, 71, - - 71, 2058, 2060, 2061, 2062, 71, 2055, 2063, 2064, 71, - 71, 2067, 2053, 71, 2056, 2066, 2059, 71, 2057, 71, - 71, 2070, 2071, 2068, 2072, 71, 2069, 2074, 2058, 2060, - 2061, 2062, 2073, 2078, 2063, 2064, 71, 2075, 2067, 71, - 71, 71, 2066, 2076, 71, 2079, 2077, 71, 2070, 71, - 2068, 71, 2080, 2069, 2074, 2081, 2083, 2084, 2082, 2073, - 71, 71, 71, 71, 2075, 71, 2085, 71, 2086, 2087, - 2076, 71, 2079, 2077, 71, 2089, 71, 2088, 2090, 2080, - 2092, 2091, 2081, 2083, 71, 2082, 71, 2093, 2094, 2098, - 71, 2095, 2097, 71, 2099, 2086, 71, 2096, 2100, 2101, - - 71, 71, 71, 71, 2088, 2090, 71, 71, 2091, 71, - 71, 71, 2103, 2102, 71, 2094, 2098, 2104, 2095, 2097, - 2105, 71, 71, 2107, 2096, 2100, 71, 2111, 2108, 2110, - 2109, 2112, 2116, 71, 2904, 2106, 71, 71, 71, 2103, - 2102, 71, 71, 2115, 2104, 2113, 71, 2105, 2114, 71, - 71, 2118, 2119, 2117, 71, 2108, 2110, 2109, 2112, 71, - 71, 71, 2106, 71, 71, 2120, 71, 2121, 2122, 2123, - 2115, 2125, 2113, 2126, 71, 2114, 2124, 71, 2118, 2119, - 2117, 2127, 71, 2128, 2129, 2130, 2904, 2131, 71, 2140, - 71, 71, 71, 2904, 2121, 2122, 2123, 71, 2125, 71, - - 2126, 2133, 2132, 2124, 71, 2135, 71, 71, 2127, 71, - 2128, 2129, 2130, 2134, 2131, 71, 2136, 71, 2139, 71, - 2137, 71, 2138, 2142, 2143, 2141, 2144, 71, 2133, 2132, - 71, 71, 2135, 2145, 2147, 71, 2146, 2153, 2148, 2149, - 2134, 2150, 71, 2136, 71, 2139, 71, 2137, 71, 2138, - 71, 2143, 2141, 2144, 2151, 71, 71, 71, 71, 71, - 2145, 2147, 2152, 2146, 2154, 2148, 2149, 2155, 2150, 71, - 2156, 2166, 71, 2157, 2159, 71, 2158, 71, 2160, 2904, - 2162, 2151, 2163, 2168, 2164, 2904, 2161, 71, 2165, 2152, - 71, 71, 2177, 2904, 2155, 71, 71, 2156, 71, 71, - - 2157, 71, 71, 2158, 71, 2160, 71, 2162, 2167, 2163, - 2168, 2164, 2169, 2161, 2170, 2165, 2171, 2172, 2173, 71, - 71, 2176, 2175, 2179, 2174, 71, 2178, 71, 71, 71, - 2180, 2182, 71, 2181, 2183, 2167, 71, 2184, 2904, 2169, - 2904, 2170, 71, 2171, 2172, 2173, 71, 2186, 2176, 2175, - 71, 2174, 71, 2178, 71, 71, 2185, 2180, 2188, 2189, - 2181, 2187, 2193, 71, 71, 2190, 71, 71, 2194, 71, - 2191, 71, 2192, 71, 2186, 2196, 71, 2197, 2198, 2904, - 2195, 2200, 71, 2185, 2904, 2188, 2189, 2199, 2187, 71, - 71, 71, 2190, 71, 2204, 2194, 71, 2191, 71, 2192, - - 71, 71, 2196, 71, 2197, 71, 2201, 2195, 2200, 2202, - 2203, 2205, 2206, 71, 2199, 2207, 71, 71, 71, 2208, - 2212, 2204, 2209, 71, 2210, 2904, 2211, 2904, 2904, 2214, - 2215, 71, 2216, 2201, 71, 71, 2202, 2203, 2205, 2206, - 71, 2213, 2217, 71, 2218, 71, 2208, 71, 71, 2209, - 2219, 2210, 71, 2211, 71, 2220, 2214, 2215, 71, 2216, - 71, 2221, 2223, 2224, 2222, 2225, 71, 2227, 2213, 2217, - 2904, 2218, 2233, 2228, 2226, 2229, 71, 2219, 71, 71, - 71, 71, 2220, 71, 71, 2230, 71, 2231, 2232, 71, - 2224, 2222, 71, 71, 2227, 2234, 2235, 71, 2236, 71, - - 2228, 2226, 2229, 2238, 2239, 2237, 2241, 2242, 71, 71, - 71, 2240, 2230, 2244, 2231, 2232, 71, 2243, 2904, 71, - 2245, 71, 71, 2247, 71, 2236, 71, 2246, 71, 71, - 2238, 2239, 2237, 2241, 71, 71, 2250, 2249, 2240, 71, - 2248, 2251, 2255, 2252, 2243, 71, 71, 2245, 71, 2253, - 71, 2257, 2254, 2256, 2246, 71, 2259, 2260, 71, 2258, - 2261, 2262, 71, 2250, 2249, 71, 71, 2248, 71, 2255, - 2252, 71, 2265, 2264, 2263, 2904, 2253, 71, 2257, 2254, - 2256, 71, 71, 71, 71, 2266, 2258, 71, 71, 71, - 2267, 2268, 2269, 2271, 71, 2270, 2272, 2273, 2274, 2265, - - 2264, 2263, 71, 2275, 71, 71, 71, 71, 2280, 2278, - 2276, 71, 2266, 2277, 2284, 71, 71, 2267, 2268, 2269, - 2271, 2281, 2270, 71, 2273, 71, 71, 2279, 71, 71, - 71, 2282, 2283, 2285, 2904, 2280, 2278, 2276, 71, 71, - 2277, 71, 71, 71, 2286, 71, 2287, 2288, 2281, 2289, - 2290, 71, 71, 71, 2279, 2291, 2293, 2292, 2282, 2283, - 2285, 71, 2296, 71, 2298, 2297, 2294, 71, 71, 71, - 2295, 2286, 2299, 2287, 2288, 71, 2289, 2290, 71, 71, - 2300, 71, 2291, 2293, 2292, 71, 2301, 2302, 71, 2296, - 2303, 2298, 2297, 2294, 2304, 2904, 2305, 2295, 2306, 2299, - - 2307, 2311, 71, 2308, 2309, 2904, 2904, 2300, 71, 71, - 71, 2310, 71, 2301, 71, 2334, 2318, 71, 71, 71, - 71, 2304, 71, 2305, 71, 2306, 2313, 2307, 2311, 2312, - 2308, 2309, 2314, 71, 71, 2315, 2316, 2320, 2310, 2317, - 2321, 2319, 71, 71, 2323, 71, 71, 71, 2324, 2325, - 71, 2322, 2326, 2313, 2904, 71, 2312, 71, 71, 2314, - 2332, 2327, 2315, 2316, 2320, 71, 2317, 71, 2319, 71, - 2330, 71, 71, 71, 2328, 2324, 2325, 2329, 2322, 2326, - 2333, 71, 2331, 71, 2335, 2342, 71, 71, 2327, 2904, - 71, 2336, 2337, 71, 2338, 2339, 2343, 2330, 2340, 2344, - - 71, 2328, 71, 71, 2329, 71, 2341, 71, 2345, 2331, - 71, 2335, 2342, 2347, 2351, 2904, 71, 2349, 2336, 2337, - 2350, 2338, 2339, 71, 71, 2340, 2344, 71, 71, 2346, - 2348, 71, 71, 2341, 2353, 71, 71, 71, 71, 2352, - 2347, 2351, 71, 2354, 2349, 2355, 71, 2350, 2356, 2358, - 71, 2357, 2359, 2361, 2360, 2904, 2346, 2348, 71, 2362, - 2363, 2353, 2367, 71, 2369, 71, 2352, 2365, 2371, 71, - 2354, 2364, 2355, 2368, 71, 71, 2358, 71, 2357, 71, - 2361, 2360, 71, 2366, 2370, 71, 2362, 71, 71, 71, - 71, 71, 71, 2372, 2365, 71, 2374, 2373, 2364, 2375, - - 2368, 2376, 2377, 2378, 2379, 2904, 71, 2382, 2384, 2380, - 2366, 2370, 71, 2904, 2381, 71, 2385, 71, 71, 2904, - 2372, 2383, 2386, 71, 2373, 71, 2375, 71, 2376, 71, - 2378, 2379, 71, 71, 71, 71, 2380, 2387, 71, 2388, - 2389, 2381, 2391, 2385, 71, 2390, 2392, 2904, 2383, 2386, - 71, 2393, 2394, 71, 2395, 2397, 2396, 2398, 2400, 71, - 71, 71, 2401, 71, 2387, 71, 2388, 2389, 71, 2391, - 2399, 71, 2390, 2392, 71, 2403, 71, 2402, 2393, 2394, - 71, 2395, 71, 2396, 71, 2400, 71, 2404, 2406, 2401, - 71, 2405, 2408, 2409, 2407, 2411, 2410, 2399, 2413, 2417, - - 71, 2412, 2415, 2414, 2402, 2416, 2904, 71, 2904, 71, - 71, 2418, 2904, 2419, 2404, 2406, 71, 71, 2405, 71, - 71, 2407, 71, 2410, 71, 71, 2420, 71, 2412, 2415, - 71, 71, 2416, 2421, 71, 71, 2422, 2423, 2418, 2424, - 2419, 2427, 2904, 2425, 71, 71, 2904, 2426, 2430, 2904, - 2428, 2429, 2904, 2420, 71, 71, 71, 71, 2904, 71, - 2421, 2432, 2431, 2422, 2423, 71, 2424, 2433, 2427, 2434, - 2425, 71, 71, 71, 2426, 2430, 71, 2428, 2429, 71, - 2435, 2439, 2436, 2443, 2437, 71, 2441, 2442, 2432, 2431, - 71, 71, 2438, 2440, 2433, 71, 2434, 2444, 71, 71, - - 71, 71, 2447, 2445, 71, 71, 2448, 2435, 71, 2436, - 71, 2437, 2450, 2441, 2442, 71, 2446, 2451, 2452, 2438, - 2440, 2453, 2904, 71, 2444, 71, 2449, 2454, 71, 2447, - 2445, 2457, 2904, 71, 2455, 2460, 2458, 2456, 2459, 2904, - 2461, 2462, 2463, 2446, 71, 71, 71, 71, 71, 71, - 71, 71, 2464, 2449, 2454, 71, 71, 2465, 2457, 71, - 2470, 2455, 2460, 2458, 2456, 2459, 71, 2461, 71, 71, - 2466, 2467, 2471, 2469, 2472, 2904, 2468, 71, 2473, 71, - 71, 2474, 2475, 2476, 71, 2477, 71, 2470, 2478, 2479, - 71, 71, 2480, 2481, 2485, 71, 2486, 2466, 2484, 71, - - 2469, 71, 71, 71, 71, 2473, 2487, 2482, 2474, 2475, - 2476, 71, 71, 2483, 71, 2478, 71, 2494, 2493, 2480, - 71, 71, 71, 71, 2490, 2484, 71, 2488, 71, 71, - 2491, 2492, 2489, 2487, 2482, 2497, 2499, 71, 71, 71, - 2483, 2495, 2496, 71, 2498, 2493, 2500, 2506, 2501, 71, - 71, 2490, 2502, 2507, 2508, 71, 71, 2491, 2492, 71, - 71, 2505, 71, 2499, 2509, 71, 71, 71, 2495, 2496, - 71, 2498, 2515, 2500, 2506, 2501, 71, 2503, 2504, 2502, - 2507, 2508, 2510, 71, 2511, 2514, 2520, 71, 2505, 2512, - 71, 71, 2516, 71, 2513, 2904, 2517, 71, 2518, 71, - - 2519, 2904, 2524, 71, 2503, 2504, 2521, 2522, 2527, 2510, - 2525, 2511, 2514, 2520, 71, 2523, 71, 71, 71, 2516, - 71, 71, 71, 2517, 71, 2518, 71, 2519, 71, 2524, - 2528, 2526, 2529, 2521, 2522, 71, 2530, 2525, 71, 2532, - 2531, 71, 2523, 2533, 2534, 2539, 2535, 2538, 2904, 2542, - 2536, 2537, 2540, 2904, 71, 2904, 71, 2528, 2526, 2529, - 71, 71, 2541, 71, 71, 71, 71, 2531, 71, 71, - 2533, 71, 71, 2535, 2538, 71, 2542, 2536, 2537, 2540, - 71, 2543, 2545, 2546, 2547, 2548, 2544, 2549, 2550, 2541, - 2551, 2554, 71, 2553, 71, 2904, 71, 2904, 2552, 2557, - - 71, 71, 2556, 71, 2555, 71, 2558, 2564, 71, 2545, - 2546, 71, 2548, 71, 2549, 2550, 71, 2551, 2559, 71, - 2553, 71, 2560, 71, 2561, 2552, 2557, 2562, 71, 2556, - 2563, 2555, 2565, 2558, 71, 2566, 2568, 2567, 2570, 2569, - 71, 2571, 2574, 71, 71, 2559, 71, 71, 2572, 2560, - 2573, 2561, 2575, 71, 2562, 71, 2577, 2563, 2578, 71, - 71, 71, 71, 2568, 2567, 2570, 2569, 71, 2576, 71, - 71, 2579, 71, 71, 71, 2572, 2904, 2573, 71, 2575, - 2580, 2581, 71, 2577, 2582, 2578, 2583, 2584, 2585, 2588, - 2586, 2587, 71, 2595, 71, 2576, 2594, 71, 71, 2590, - - 2593, 2589, 2904, 71, 71, 71, 2592, 2580, 71, 2597, - 71, 2582, 71, 2583, 2584, 71, 2588, 2586, 2587, 71, - 71, 2591, 71, 2594, 2596, 71, 2590, 2593, 2589, 71, - 2598, 2599, 71, 2592, 2600, 2601, 71, 71, 2602, 2603, - 2605, 2604, 2610, 2607, 2613, 2606, 71, 71, 2591, 71, - 71, 2596, 71, 2609, 2611, 71, 2608, 71, 2599, 2614, - 2621, 71, 2601, 71, 71, 2602, 2603, 71, 2604, 2610, - 2607, 71, 2606, 2612, 2616, 2615, 71, 2619, 71, 71, - 2609, 2611, 71, 2608, 2620, 2625, 71, 2618, 2622, 2626, - 2623, 71, 71, 2617, 2628, 71, 71, 2627, 2630, 2624, - - 2612, 71, 2615, 71, 2619, 71, 71, 2631, 2632, 71, - 2633, 2620, 71, 71, 2618, 2622, 2626, 2623, 2629, 2634, - 2617, 2628, 2635, 71, 2627, 71, 2624, 2638, 71, 2636, - 71, 2637, 71, 2641, 71, 2632, 2642, 2639, 2640, 71, - 2643, 2645, 71, 2644, 71, 2629, 2634, 71, 71, 2635, - 2646, 71, 2647, 2648, 2649, 2650, 2636, 2651, 2637, 71, - 71, 71, 2652, 71, 2639, 2640, 71, 2643, 71, 2653, - 2644, 2654, 2660, 2656, 71, 2655, 71, 71, 71, 2647, - 2648, 2649, 71, 71, 71, 2657, 2671, 2658, 2661, 71, - 71, 71, 71, 2659, 2664, 2663, 2653, 2662, 71, 71, - - 2656, 71, 2655, 2665, 71, 2666, 2667, 2668, 2904, 2669, - 2670, 71, 2657, 71, 2658, 2661, 2673, 2674, 71, 71, - 2659, 71, 2663, 71, 2662, 2672, 2675, 71, 2678, 2904, - 2665, 71, 2666, 71, 71, 71, 2669, 2670, 2676, 2677, - 71, 2679, 2680, 2673, 71, 71, 71, 2683, 71, 2682, - 71, 2681, 2672, 2675, 71, 2678, 71, 71, 2689, 2693, - 2684, 2686, 2685, 71, 71, 2676, 2677, 71, 2679, 2680, - 71, 71, 71, 2690, 2683, 2691, 2682, 2692, 2681, 2694, - 2687, 2688, 71, 2696, 2697, 2689, 71, 2684, 2686, 2685, - 71, 71, 2695, 2698, 2699, 71, 2700, 2701, 2702, 2703, - - 2690, 2704, 2691, 2705, 2692, 2706, 71, 2687, 2688, 2708, - 71, 71, 2709, 2707, 71, 71, 2710, 2711, 71, 2695, - 2713, 2714, 71, 2712, 71, 71, 71, 71, 2704, 2717, - 71, 71, 2706, 71, 2716, 2718, 2708, 71, 71, 71, - 2707, 2719, 2715, 2710, 2711, 2720, 71, 2713, 2714, 2721, - 2712, 71, 71, 2724, 2726, 71, 2717, 71, 2725, 2904, - 2722, 2716, 71, 2723, 2727, 2728, 71, 2729, 71, 2715, - 2904, 71, 2720, 71, 2730, 2731, 2721, 71, 71, 2733, - 2732, 2734, 2735, 2736, 2737, 71, 71, 2722, 71, 2738, - 2723, 2727, 2728, 2739, 2729, 2740, 71, 71, 2741, 2742, - - 2743, 2730, 2731, 71, 2744, 2745, 71, 2732, 2734, 71, - 71, 71, 71, 2746, 2747, 2750, 71, 2748, 71, 2749, - 71, 71, 71, 2751, 2752, 71, 71, 2743, 2753, 71, - 71, 71, 2745, 71, 2754, 2755, 71, 2756, 71, 2757, - 2746, 71, 2750, 71, 2748, 2758, 2749, 2759, 2760, 71, - 2751, 2752, 2904, 2904, 71, 71, 2761, 2762, 2764, 71, - 2763, 2754, 2755, 2766, 2756, 71, 2757, 71, 71, 71, - 2765, 71, 2758, 2904, 2759, 71, 2767, 2768, 2769, 71, - 71, 71, 2770, 2761, 2762, 2764, 71, 2763, 2771, 2772, - 2766, 2773, 2775, 2904, 2774, 2776, 71, 2765, 71, 2778, - - 71, 2777, 2779, 2767, 71, 71, 71, 71, 2780, 2770, - 2904, 71, 71, 2781, 71, 2771, 2772, 2782, 2773, 2775, - 2784, 2774, 2776, 71, 71, 71, 2778, 71, 2777, 2779, - 2783, 71, 2791, 2786, 71, 2780, 2785, 2787, 71, 71, - 2781, 2788, 2789, 71, 2782, 71, 2790, 2784, 71, 2792, - 2793, 2904, 2794, 71, 2795, 71, 2796, 2783, 2797, 71, - 2786, 2904, 2799, 2785, 2787, 2798, 71, 71, 2788, 2789, - 2807, 2800, 71, 2790, 2801, 2803, 2792, 71, 71, 2794, - 2802, 71, 71, 71, 2804, 2797, 71, 71, 2806, 2799, - 2805, 2808, 2798, 71, 2809, 71, 71, 71, 2800, 71, - - 2810, 2801, 2803, 71, 2811, 2812, 2814, 2802, 2813, 2816, - 2817, 2815, 71, 71, 2904, 2806, 71, 2805, 2808, 71, - 2820, 71, 2821, 2818, 2826, 71, 2819, 2810, 71, 2828, - 2822, 2811, 71, 2814, 71, 2813, 71, 71, 2815, 2823, - 71, 71, 71, 71, 2824, 2829, 71, 2820, 2825, 71, - 2818, 2826, 71, 2819, 2827, 71, 2828, 2822, 2831, 71, - 2830, 2832, 71, 2835, 2833, 2904, 2823, 71, 71, 2834, - 2836, 2824, 2829, 71, 2837, 2825, 2838, 71, 2839, 2843, - 71, 2827, 2840, 71, 2904, 2831, 2841, 2830, 2832, 2904, - 71, 2833, 71, 2842, 2844, 2845, 2834, 2836, 2904, 2848, - - 71, 71, 71, 2838, 71, 2839, 71, 2846, 71, 2840, - 2847, 71, 2854, 2841, 2851, 2849, 71, 2850, 71, 71, - 2842, 2844, 71, 71, 2852, 71, 2848, 2853, 2855, 2904, - 71, 2904, 71, 2861, 2846, 2858, 2904, 2847, 71, 2854, - 2856, 71, 2849, 2857, 2850, 2859, 71, 71, 2860, 2904, - 2862, 2852, 2863, 71, 2853, 71, 71, 71, 71, 2864, - 2861, 2866, 2858, 2865, 71, 2868, 2904, 2856, 2869, 2904, - 2857, 2870, 2859, 71, 71, 2860, 71, 2862, 2873, 2863, - 2871, 2867, 2876, 2904, 2874, 2875, 2864, 71, 2866, 71, - 2865, 71, 2868, 71, 71, 2869, 2872, 2877, 2870, 2878, - - 71, 2882, 2889, 2880, 71, 71, 71, 2871, 2867, 71, - 71, 2874, 2875, 2879, 2881, 2884, 2885, 71, 2904, 71, - 2888, 71, 71, 2872, 2877, 71, 2878, 2883, 71, 71, - 2880, 2886, 2904, 2892, 2893, 71, 2887, 71, 71, 71, - 2879, 2881, 2884, 2885, 71, 2890, 71, 2888, 2891, 2894, - 2895, 2896, 2898, 71, 2883, 2904, 71, 2900, 2886, 71, - 2892, 71, 2897, 2887, 2899, 71, 2902, 2903, 2904, 71, - 2904, 2904, 2890, 2901, 71, 2891, 2894, 71, 71, 2898, - 2904, 71, 71, 2904, 2900, 2904, 71, 2904, 2904, 2897, - 2904, 2899, 2904, 71, 71, 2904, 2904, 2904, 2904, 2904, - - 2901, 43, 43, 43, 43, 43, 43, 43, 48, 48, - 48, 48, 48, 48, 48, 53, 53, 53, 53, 53, - 53, 53, 59, 59, 59, 59, 59, 59, 59, 64, - 64, 64, 64, 64, 64, 64, 74, 74, 2904, 74, - 74, 74, 74, 140, 140, 2904, 2904, 2904, 140, 140, - 142, 142, 2904, 2904, 142, 2904, 142, 144, 2904, 2904, - 2904, 2904, 2904, 144, 147, 147, 2904, 2904, 2904, 147, - 147, 149, 2904, 2904, 2904, 2904, 2904, 149, 151, 151, - 2904, 151, 151, 151, 151, 75, 75, 2904, 75, 75, - 75, 75, 13, 2904, 2904, 2904, 2904, 2904, 2904, 2904, - - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904 + 392, 71, 403, 71, 2912, 398, 413, 399, 384, 71, + 390, 391, 393, 71, 71, 401, 412, 395, 71, 394, + 404, 396, 71, 397, 400, 71, 71, 411, 71, 403, + 71, 71, 398, 413, 399, 71, 422, 439, 419, 2912, + 417, 423, 401, 412, 418, 71, 1267, 404, 414, 424, + 415, 400, 405, 71, 411, 406, 420, 421, 71, 2912, + 407, 408, 409, 410, 71, 419, 416, 417, 71, 71, + + 71, 418, 71, 71, 71, 414, 424, 415, 428, 405, + 427, 71, 406, 420, 421, 429, 431, 407, 408, 409, + 410, 425, 71, 416, 426, 434, 71, 432, 433, 435, + 442, 71, 437, 71, 438, 428, 441, 427, 71, 71, + 71, 436, 429, 431, 71, 443, 71, 71, 425, 71, + 440, 426, 434, 71, 432, 433, 435, 71, 71, 437, + 444, 438, 71, 441, 454, 448, 445, 71, 436, 455, + 449, 446, 443, 447, 2912, 2912, 2912, 440, 71, 2912, + 456, 453, 71, 450, 2912, 2912, 451, 444, 452, 2912, + 71, 454, 448, 445, 71, 71, 467, 449, 446, 71, + + 447, 71, 71, 71, 471, 468, 457, 456, 453, 469, + 450, 71, 458, 451, 470, 452, 459, 71, 472, 483, + 494, 71, 474, 467, 460, 2912, 71, 71, 482, 486, + 71, 471, 468, 457, 473, 71, 469, 71, 487, 458, + 71, 470, 71, 459, 150, 472, 483, 494, 484, 474, + 71, 460, 461, 485, 462, 482, 486, 489, 488, 490, + 491, 473, 495, 492, 496, 487, 71, 463, 71, 71, + 464, 2912, 465, 497, 466, 71, 1022, 71, 71, 461, + 71, 462, 493, 71, 489, 488, 490, 491, 2912, 495, + 504, 499, 2912, 501, 463, 71, 71, 464, 71, 465, + + 497, 466, 475, 476, 498, 71, 500, 71, 71, 493, + 502, 503, 477, 71, 478, 479, 480, 506, 499, 481, + 501, 505, 71, 71, 71, 507, 509, 71, 512, 475, + 476, 498, 71, 500, 511, 2912, 508, 502, 503, 477, + 71, 478, 479, 480, 506, 71, 481, 71, 505, 71, + 71, 510, 507, 71, 516, 512, 513, 514, 71, 515, + 517, 511, 518, 508, 526, 71, 71, 521, 2912, 522, + 519, 71, 524, 2912, 525, 71, 71, 2912, 510, 2912, + 534, 516, 71, 2912, 523, 71, 515, 517, 520, 518, + 71, 526, 71, 527, 521, 71, 522, 519, 71, 524, + + 528, 525, 71, 529, 71, 533, 530, 534, 535, 71, + 536, 523, 538, 537, 541, 520, 71, 531, 71, 532, + 527, 539, 2912, 71, 71, 543, 540, 528, 71, 544, + 529, 71, 533, 530, 549, 535, 71, 536, 546, 538, + 542, 541, 71, 71, 531, 71, 532, 71, 539, 71, + 547, 71, 543, 540, 548, 550, 544, 551, 2912, 557, + 71, 553, 552, 554, 71, 546, 71, 542, 71, 71, + 2912, 555, 561, 2912, 71, 564, 2912, 547, 71, 556, + 71, 548, 550, 71, 551, 71, 557, 558, 553, 552, + 554, 559, 560, 562, 71, 563, 71, 71, 555, 561, + + 71, 71, 564, 565, 568, 566, 556, 71, 567, 71, + 71, 71, 569, 574, 558, 570, 71, 571, 559, 560, + 562, 71, 563, 572, 578, 71, 573, 579, 71, 581, + 565, 568, 566, 71, 71, 567, 71, 71, 71, 569, + 574, 71, 570, 575, 571, 576, 580, 577, 586, 582, + 572, 578, 71, 573, 71, 583, 591, 588, 587, 71, + 584, 71, 2912, 585, 71, 71, 589, 2912, 71, 71, + 575, 71, 576, 580, 577, 592, 582, 595, 2912, 71, + 71, 71, 583, 591, 588, 587, 593, 584, 594, 590, + 585, 71, 596, 597, 71, 598, 599, 71, 71, 610, + + 71, 600, 592, 613, 595, 71, 71, 71, 612, 71, + 601, 71, 654, 593, 71, 594, 590, 71, 2912, 596, + 597, 611, 598, 599, 71, 614, 610, 615, 600, 2912, + 613, 71, 2912, 71, 618, 612, 71, 601, 602, 71, + 616, 621, 2912, 603, 617, 604, 71, 619, 611, 620, + 71, 605, 614, 606, 615, 624, 607, 608, 2912, 71, + 71, 618, 71, 609, 71, 602, 71, 616, 621, 71, + 603, 617, 604, 625, 619, 622, 620, 626, 605, 627, + 606, 71, 624, 607, 608, 623, 71, 628, 632, 629, + 609, 71, 630, 631, 634, 2912, 633, 71, 2912, 639, + + 625, 643, 71, 71, 626, 71, 627, 71, 71, 636, + 637, 71, 623, 71, 628, 632, 629, 635, 71, 630, + 631, 634, 71, 633, 638, 640, 639, 641, 71, 645, + 642, 71, 71, 71, 644, 646, 636, 637, 648, 649, + 650, 71, 647, 71, 635, 71, 71, 659, 71, 71, + 71, 638, 640, 150, 641, 71, 645, 642, 651, 652, + 653, 644, 646, 71, 655, 648, 649, 650, 656, 647, + 657, 71, 71, 658, 659, 2912, 660, 662, 661, 71, + 667, 673, 663, 71, 71, 651, 652, 653, 71, 71, + 71, 71, 668, 671, 672, 656, 71, 669, 670, 71, + + 658, 664, 71, 660, 662, 661, 71, 667, 665, 663, + 674, 666, 71, 71, 675, 676, 677, 679, 678, 71, + 71, 71, 71, 680, 71, 670, 687, 681, 664, 682, + 683, 71, 684, 692, 2912, 665, 71, 71, 666, 71, + 685, 71, 71, 677, 679, 678, 71, 71, 71, 686, + 680, 688, 71, 71, 681, 689, 682, 683, 71, 684, + 694, 690, 691, 693, 71, 71, 699, 685, 698, 71, + 695, 700, 71, 71, 71, 696, 686, 71, 688, 697, + 71, 701, 689, 71, 705, 71, 2912, 694, 690, 691, + 693, 702, 71, 699, 71, 698, 703, 695, 700, 704, + + 707, 706, 696, 71, 713, 2912, 697, 708, 701, 71, + 710, 71, 711, 71, 2912, 71, 71, 2912, 702, 71, + 712, 715, 719, 703, 71, 2912, 704, 707, 706, 709, + 71, 713, 71, 717, 708, 714, 71, 710, 716, 711, + 720, 71, 71, 718, 71, 721, 722, 712, 715, 71, + 71, 723, 71, 71, 726, 71, 709, 71, 71, 724, + 717, 725, 714, 727, 730, 716, 2912, 720, 734, 71, + 718, 732, 721, 722, 71, 71, 728, 729, 723, 731, + 71, 726, 733, 736, 737, 735, 724, 71, 71, 739, + 727, 730, 738, 71, 740, 71, 741, 745, 732, 742, + + 71, 71, 751, 748, 747, 71, 731, 71, 71, 733, + 71, 737, 735, 71, 71, 71, 743, 744, 749, 738, + 746, 71, 71, 741, 71, 71, 742, 753, 71, 71, + 748, 747, 754, 750, 71, 752, 757, 755, 71, 756, + 759, 2912, 71, 743, 744, 749, 758, 746, 71, 71, + 71, 760, 761, 766, 753, 2912, 768, 767, 2912, 762, + 750, 71, 752, 757, 71, 71, 756, 759, 71, 764, + 2912, 71, 763, 758, 71, 765, 71, 71, 760, 761, + 71, 71, 71, 768, 767, 71, 762, 772, 769, 770, + 773, 775, 774, 776, 771, 71, 764, 777, 781, 763, + + 71, 71, 765, 71, 71, 71, 71, 71, 780, 2912, + 778, 2912, 71, 787, 772, 769, 770, 773, 71, 774, + 776, 771, 779, 71, 777, 781, 71, 782, 786, 789, + 71, 71, 783, 784, 785, 780, 71, 778, 71, 788, + 787, 71, 71, 790, 792, 793, 791, 794, 2912, 779, + 796, 71, 71, 798, 782, 786, 789, 71, 71, 783, + 784, 785, 71, 797, 71, 71, 788, 71, 795, 799, + 790, 792, 793, 791, 794, 71, 71, 796, 800, 801, + 798, 804, 802, 71, 803, 805, 816, 807, 2912, 71, + 797, 71, 806, 808, 809, 795, 799, 2912, 71, 71, + + 71, 71, 71, 810, 71, 800, 801, 812, 804, 802, + 71, 803, 805, 71, 807, 150, 811, 819, 71, 806, + 808, 809, 815, 813, 814, 71, 71, 820, 71, 71, + 810, 817, 821, 822, 812, 71, 826, 71, 71, 818, + 71, 823, 2912, 811, 71, 71, 824, 825, 71, 815, + 813, 814, 827, 828, 820, 831, 829, 71, 817, 821, + 830, 71, 71, 826, 71, 71, 818, 842, 823, 71, + 832, 833, 71, 824, 825, 71, 2912, 839, 71, 827, + 71, 840, 831, 829, 841, 71, 2912, 830, 71, 71, + 843, 71, 844, 847, 842, 2912, 845, 832, 833, 834, + + 2912, 71, 71, 835, 839, 846, 836, 850, 840, 71, + 851, 841, 849, 837, 71, 71, 838, 843, 848, 844, + 847, 71, 71, 845, 863, 71, 834, 71, 859, 860, + 835, 71, 846, 836, 850, 71, 2912, 2912, 864, 849, + 837, 865, 71, 838, 861, 848, 852, 853, 71, 854, + 71, 863, 855, 71, 866, 859, 860, 856, 862, 870, + 71, 71, 868, 857, 858, 71, 867, 2912, 865, 872, + 869, 861, 71, 852, 853, 2912, 854, 871, 71, 855, + 71, 866, 875, 71, 856, 862, 870, 873, 71, 868, + 857, 858, 71, 867, 71, 874, 872, 869, 877, 71, + + 876, 878, 71, 71, 871, 71, 71, 71, 879, 875, + 882, 880, 883, 881, 873, 884, 886, 888, 2912, 885, + 71, 71, 874, 71, 71, 877, 71, 876, 878, 887, + 71, 891, 892, 893, 71, 879, 71, 882, 880, 883, + 881, 894, 884, 895, 71, 889, 885, 896, 71, 897, + 890, 71, 899, 71, 898, 900, 887, 902, 891, 901, + 904, 903, 906, 71, 71, 71, 71, 2912, 894, 909, + 71, 71, 907, 71, 896, 71, 897, 71, 71, 71, + 71, 898, 71, 71, 902, 905, 901, 904, 903, 71, + 71, 908, 910, 71, 913, 911, 912, 914, 916, 907, + + 71, 71, 915, 918, 917, 71, 919, 2912, 923, 2912, + 71, 71, 905, 71, 71, 71, 71, 71, 908, 910, + 71, 913, 911, 912, 914, 916, 71, 920, 921, 915, + 918, 917, 71, 919, 922, 923, 71, 927, 924, 71, + 2912, 926, 928, 930, 931, 929, 925, 2912, 71, 71, + 932, 71, 71, 933, 920, 921, 934, 71, 71, 937, + 935, 922, 71, 71, 71, 924, 71, 71, 926, 928, + 930, 931, 929, 925, 940, 936, 938, 932, 71, 71, + 933, 939, 71, 934, 942, 71, 937, 935, 943, 71, + 947, 941, 944, 945, 946, 948, 71, 949, 950, 71, + + 2912, 2912, 936, 938, 71, 71, 71, 71, 939, 71, + 952, 942, 71, 957, 71, 943, 71, 947, 941, 944, + 945, 946, 71, 951, 949, 950, 953, 954, 955, 71, + 71, 956, 71, 71, 958, 959, 71, 952, 71, 960, + 961, 962, 963, 964, 965, 71, 71, 71, 969, 970, + 951, 71, 966, 953, 954, 955, 967, 968, 956, 71, + 974, 958, 971, 71, 976, 71, 960, 71, 972, 963, + 964, 965, 71, 71, 71, 969, 973, 71, 71, 966, + 975, 71, 978, 967, 968, 977, 71, 71, 979, 971, + 71, 71, 71, 980, 71, 972, 981, 2912, 982, 985, + + 986, 983, 2912, 973, 71, 71, 71, 975, 71, 978, + 984, 987, 977, 1000, 71, 150, 988, 71, 997, 71, + 980, 71, 999, 981, 71, 982, 985, 986, 983, 71, + 990, 998, 989, 2912, 71, 2912, 71, 984, 987, 71, + 71, 2912, 1002, 988, 71, 997, 2912, 2912, 1001, 999, + 71, 1007, 1003, 2912, 71, 1005, 1008, 990, 998, 989, + 991, 1004, 992, 1006, 71, 71, 993, 1009, 994, 1002, + 1019, 1020, 2912, 995, 71, 1001, 71, 71, 996, 1003, + 71, 1010, 1005, 71, 71, 1011, 2912, 991, 1004, 992, + 1006, 1012, 1014, 993, 1009, 994, 1015, 71, 1017, 1018, + + 995, 1013, 71, 71, 71, 996, 1021, 1023, 1010, 71, + 1016, 71, 1011, 71, 71, 1026, 71, 1024, 1012, 1014, + 71, 1025, 71, 1015, 71, 1017, 1018, 2912, 1013, 71, + 1034, 1035, 2912, 71, 1036, 2912, 1037, 1016, 1038, 71, + 2912, 2912, 1026, 2912, 1024, 71, 1041, 71, 1025, 1027, + 1039, 71, 1040, 71, 1028, 1044, 1029, 1034, 1035, 71, + 1047, 1036, 1030, 1037, 71, 1038, 1046, 1031, 1032, 1045, + 1042, 71, 71, 1041, 1033, 71, 1027, 1039, 71, 1040, + 1043, 1028, 71, 1029, 71, 1048, 1049, 1047, 71, 1030, + 1050, 1053, 71, 71, 1031, 1032, 1045, 1042, 71, 1051, + + 71, 1033, 1052, 1055, 1056, 1054, 1057, 1043, 1058, 71, + 71, 2912, 1048, 1049, 71, 1059, 71, 2912, 1053, 1066, + 1060, 71, 71, 71, 71, 1061, 1051, 71, 1063, 1052, + 1055, 1064, 1054, 1057, 1062, 1058, 71, 71, 71, 1065, + 71, 71, 1059, 71, 1067, 1068, 1066, 1060, 1069, 71, + 1081, 1070, 1061, 1071, 71, 1063, 1073, 71, 1064, 71, + 71, 1062, 1072, 1074, 71, 1076, 1065, 1075, 2912, 71, + 71, 1067, 71, 1077, 1078, 1069, 1080, 71, 1070, 71, + 1071, 1079, 71, 1073, 1082, 1088, 1083, 71, 1084, 1072, + 1074, 2912, 1076, 1085, 1075, 71, 71, 71, 71, 71, + + 1077, 1078, 71, 1080, 1086, 1089, 1091, 1087, 1079, 71, + 1090, 1082, 1088, 1083, 1092, 71, 1094, 71, 71, 1095, + 71, 1096, 2912, 1093, 2912, 1097, 71, 2912, 71, 1099, + 71, 1086, 1089, 1091, 1087, 71, 1098, 1090, 1100, 1102, + 1103, 1092, 71, 1101, 1104, 1108, 1095, 1105, 71, 71, + 1093, 71, 1097, 71, 71, 1107, 1099, 1109, 1106, 71, + 71, 71, 71, 1098, 1111, 1100, 1102, 1103, 71, 71, + 1101, 1104, 1110, 71, 1105, 2912, 71, 71, 1112, 2912, + 1113, 1115, 1107, 1114, 71, 1106, 1116, 1117, 1119, 71, + 71, 1111, 71, 71, 1120, 1118, 1121, 1122, 2912, 1110, + + 1124, 1127, 71, 1123, 1129, 1112, 71, 1113, 1115, 71, + 1114, 71, 1125, 1116, 1117, 1128, 1133, 1130, 71, 71, + 71, 71, 1118, 1121, 1122, 71, 71, 1126, 1131, 1132, + 1123, 71, 71, 71, 71, 71, 1134, 71, 71, 1125, + 71, 1135, 1128, 1133, 1130, 1138, 71, 1137, 1139, 1136, + 1140, 1142, 1141, 71, 1126, 1131, 1132, 71, 71, 1143, + 71, 1144, 71, 1134, 71, 1153, 1146, 1149, 1135, 71, + 1145, 2912, 1138, 71, 1137, 1148, 1136, 1159, 1142, 1141, + 71, 71, 71, 71, 71, 71, 71, 1150, 1144, 1151, + 1152, 71, 71, 1146, 1149, 71, 1154, 1145, 71, 1155, + + 1156, 1158, 1148, 1157, 71, 1160, 1161, 1162, 2912, 71, + 2912, 71, 71, 1163, 1150, 71, 1151, 1152, 1164, 71, + 1165, 1166, 1168, 1154, 1167, 71, 1155, 1156, 1158, 1169, + 1157, 1174, 1160, 1171, 71, 71, 2912, 71, 71, 71, + 1163, 71, 71, 71, 71, 1164, 1170, 1165, 1166, 1168, + 1172, 1167, 1175, 71, 71, 1173, 1169, 1176, 71, 1177, + 1171, 1179, 71, 71, 1178, 71, 71, 1180, 71, 1184, + 1185, 71, 2912, 1170, 1187, 1188, 1181, 1172, 1182, 1175, + 1186, 1183, 1173, 2912, 1176, 71, 1177, 71, 1179, 71, + 1191, 1178, 71, 1190, 1180, 71, 1184, 1185, 1192, 71, + + 71, 1187, 1188, 1181, 1189, 1182, 71, 1186, 1183, 1196, + 1193, 71, 71, 71, 1194, 1195, 1197, 1191, 1198, 1199, + 1190, 1202, 1200, 71, 1201, 1192, 71, 1205, 2912, 2912, + 71, 1189, 71, 2912, 2912, 71, 71, 1193, 71, 71, + 71, 1194, 1195, 1197, 71, 1198, 1199, 71, 1202, 1200, + 1203, 1201, 1204, 1206, 1205, 1207, 1208, 1209, 1210, 1211, + 1212, 1214, 71, 1218, 71, 71, 71, 71, 71, 71, + 1213, 1215, 71, 71, 1216, 1217, 71, 1203, 71, 1204, + 1206, 71, 1207, 1208, 1209, 1210, 1211, 1212, 1214, 1220, + 1219, 71, 1221, 71, 1223, 71, 1222, 1213, 1215, 71, + + 1224, 1216, 1217, 71, 1226, 1225, 2912, 1227, 71, 71, + 1228, 1236, 71, 1229, 1238, 1237, 1220, 1219, 71, 1221, + 71, 1223, 1242, 1222, 71, 71, 1239, 2912, 2912, 1240, + 1241, 1226, 71, 71, 1227, 1245, 2912, 1228, 1236, 71, + 1229, 1230, 1237, 1243, 1231, 1232, 71, 1244, 71, 1233, + 2912, 71, 71, 1239, 71, 1234, 1240, 1241, 1246, 1235, + 1250, 71, 1245, 71, 71, 71, 1247, 71, 1230, 71, + 1243, 1231, 1232, 1248, 1244, 1249, 1233, 1252, 1255, 1251, + 1256, 1254, 1234, 1253, 1257, 1246, 1235, 1250, 71, 71, + 71, 71, 71, 1247, 1258, 71, 1259, 71, 1260, 2912, + + 1248, 1268, 1249, 71, 1252, 1255, 1251, 1256, 1254, 2912, + 1253, 2912, 2912, 1266, 1269, 1271, 71, 71, 71, 1270, + 2912, 71, 1276, 1259, 71, 1260, 71, 1261, 1268, 1272, + 1273, 71, 1262, 2912, 1263, 1274, 1264, 71, 1265, 71, + 1266, 1269, 1271, 1275, 71, 71, 1270, 71, 71, 1276, + 1278, 1277, 1279, 1281, 1261, 2912, 1272, 2912, 1280, 1262, + 71, 1263, 71, 1264, 71, 1265, 71, 1283, 71, 1282, + 1275, 1284, 71, 1285, 1286, 1288, 1289, 1278, 1277, 1279, + 1281, 1290, 71, 71, 71, 1280, 1287, 1291, 71, 71, + 1292, 71, 1293, 71, 1283, 1297, 1282, 71, 1284, 1294, + + 1285, 1286, 1288, 71, 1295, 1296, 1299, 1301, 1290, 1300, + 1325, 1298, 71, 1287, 71, 71, 71, 1292, 71, 1293, + 1304, 71, 71, 71, 1302, 1306, 1294, 1309, 1308, 71, + 71, 1295, 1296, 71, 1301, 71, 1300, 1303, 1298, 1305, + 1310, 1307, 71, 71, 1311, 71, 71, 71, 71, 71, + 71, 1302, 1306, 71, 1309, 1308, 1312, 1313, 1316, 1314, + 1315, 2912, 1319, 2912, 1303, 71, 1305, 1310, 1307, 71, + 1317, 1311, 1318, 1320, 1326, 1328, 1323, 71, 1336, 2912, + 71, 71, 71, 1312, 1313, 1316, 1314, 1315, 71, 1319, + 1322, 1324, 71, 1321, 71, 71, 71, 1317, 1329, 1318, + + 1320, 1327, 71, 1323, 1330, 71, 71, 71, 1331, 1332, + 71, 71, 71, 1337, 1333, 1334, 71, 1322, 1324, 1338, + 1321, 71, 71, 71, 71, 1329, 1335, 1339, 1327, 1345, + 71, 1330, 2912, 1343, 1344, 1331, 71, 1340, 71, 1346, + 71, 1333, 1334, 1341, 1342, 71, 1338, 71, 71, 1349, + 71, 71, 1348, 1335, 71, 1347, 1345, 1351, 71, 71, + 1343, 1344, 71, 1350, 1340, 71, 1346, 1353, 1352, 1354, + 1341, 1342, 71, 1355, 1357, 1358, 1349, 71, 1356, 1348, + 1359, 1369, 1347, 71, 71, 71, 1361, 1360, 1368, 71, + 1350, 1366, 2912, 71, 1353, 1352, 1354, 1367, 71, 71, + + 71, 1357, 1358, 1362, 71, 71, 1363, 1359, 1369, 1364, + 71, 1370, 1365, 1361, 1360, 71, 71, 1371, 1366, 1373, + 71, 1372, 71, 1374, 1367, 71, 1375, 71, 71, 1376, + 1362, 71, 1381, 1363, 1377, 71, 1364, 1382, 1370, 1365, + 1379, 71, 1378, 1380, 1371, 71, 1373, 1385, 1372, 71, + 1374, 71, 71, 1375, 1383, 71, 1376, 1384, 71, 1381, + 71, 1377, 1386, 71, 1382, 71, 1387, 1379, 1389, 1378, + 1380, 1390, 1388, 2912, 71, 1392, 1393, 71, 1391, 71, + 71, 1383, 1394, 71, 1384, 71, 71, 1397, 1396, 1386, + 1399, 1395, 1402, 1387, 1403, 1389, 71, 71, 1390, 1388, + + 71, 1401, 1392, 1393, 71, 1391, 71, 1398, 1406, 1394, + 1400, 71, 1404, 71, 1397, 1396, 71, 1399, 1395, 71, + 1405, 1407, 1408, 71, 71, 1412, 71, 1409, 1401, 1410, + 2912, 1411, 1432, 1413, 1398, 71, 71, 1400, 71, 1404, + 71, 1416, 71, 71, 71, 71, 71, 1405, 1407, 1408, + 1414, 1415, 1412, 1417, 1409, 1424, 1410, 71, 1411, 71, + 1413, 1418, 1419, 71, 71, 1423, 71, 1420, 1416, 71, + 71, 1421, 71, 1427, 1428, 1425, 1422, 1414, 1415, 1426, + 1417, 71, 1424, 71, 2912, 1429, 1431, 71, 1418, 1433, + 1430, 71, 1423, 71, 71, 71, 71, 71, 1434, 71, + + 1427, 1428, 1425, 71, 1435, 1437, 1426, 1436, 1438, 2912, + 1439, 71, 1429, 1431, 1440, 71, 1433, 1430, 71, 1441, + 1442, 1445, 71, 1446, 1444, 1434, 71, 71, 71, 1443, + 71, 1447, 1437, 71, 1436, 1449, 71, 1439, 1448, 1450, + 71, 1440, 71, 1452, 1451, 1453, 1441, 1442, 1445, 71, + 1446, 1444, 1458, 71, 1454, 71, 1443, 71, 1447, 2912, + 1455, 71, 71, 71, 1456, 1448, 1450, 71, 71, 1462, + 1452, 1451, 1453, 1460, 71, 1461, 1459, 1457, 2912, 1458, + 71, 1454, 1470, 1463, 1464, 71, 71, 1455, 71, 1465, + 1466, 1456, 1467, 1471, 1469, 1476, 71, 1475, 1468, 71, + + 1460, 71, 1461, 1459, 1457, 71, 71, 71, 1474, 1472, + 1463, 1464, 71, 71, 71, 1478, 1465, 1466, 71, 1467, + 71, 1469, 1473, 71, 1475, 1468, 1477, 71, 71, 1480, + 71, 1479, 1481, 71, 1482, 1474, 1472, 1484, 1483, 1485, + 2912, 1486, 71, 71, 71, 71, 1488, 1490, 1487, 1473, + 1492, 2912, 71, 1477, 2912, 71, 71, 71, 1479, 1481, + 71, 1482, 71, 1489, 1484, 1483, 1485, 71, 1486, 71, + 1491, 71, 1493, 1488, 1490, 1487, 71, 1492, 1495, 1494, + 71, 71, 1496, 71, 1498, 1497, 1501, 1506, 1499, 1500, + 1489, 71, 1504, 71, 1502, 1503, 2912, 1491, 71, 1493, + + 1507, 71, 71, 71, 1509, 1495, 1494, 1510, 71, 1496, + 71, 1498, 1497, 71, 1506, 1499, 1500, 71, 71, 1504, + 1505, 1502, 1503, 71, 1508, 71, 71, 1507, 1511, 1512, + 1518, 1509, 71, 1515, 71, 1513, 1514, 71, 1516, 2912, + 71, 1517, 71, 71, 2912, 2912, 71, 1505, 1522, 2912, + 1525, 1508, 71, 1521, 1519, 1511, 1512, 1518, 1524, 1520, + 1515, 71, 1513, 1514, 1530, 1516, 71, 71, 1517, 1523, + 71, 71, 71, 1526, 1528, 1522, 71, 1525, 2912, 2912, + 1521, 1519, 1527, 71, 1529, 1524, 1520, 1531, 1533, 71, + 1534, 71, 1532, 71, 1535, 71, 1523, 71, 1536, 1537, + + 1547, 2912, 2912, 2912, 1540, 71, 71, 1538, 1542, 1527, + 71, 1529, 71, 71, 1531, 1533, 71, 1534, 1539, 1532, + 71, 1535, 1541, 71, 71, 1536, 1537, 1552, 71, 1543, + 71, 1540, 71, 1548, 1538, 1542, 71, 1544, 1553, 1549, + 1545, 1550, 1551, 1557, 71, 1539, 2912, 1555, 71, 1541, + 1554, 71, 1546, 2912, 1552, 71, 1543, 71, 1556, 1558, + 1548, 71, 1559, 71, 1544, 1564, 1549, 1545, 1550, 1551, + 71, 1560, 71, 71, 1555, 71, 71, 1554, 1563, 1546, + 71, 71, 1561, 1565, 71, 1556, 1558, 1562, 1567, 1559, + 71, 1566, 1568, 2912, 71, 1569, 71, 71, 1560, 1570, + + 1573, 1571, 71, 1572, 1574, 1563, 2912, 71, 1575, 1561, + 1577, 71, 71, 71, 1562, 71, 1576, 71, 1566, 1568, + 71, 71, 1569, 71, 1578, 71, 71, 1573, 1571, 71, + 1572, 1574, 1579, 1580, 1581, 1575, 1582, 1577, 71, 1583, + 71, 71, 1584, 1576, 1588, 71, 1585, 1593, 1586, 71, + 1587, 1578, 1589, 71, 1590, 2912, 71, 71, 1591, 71, + 1580, 1581, 1592, 1582, 71, 71, 1583, 71, 1594, 71, + 71, 1588, 2912, 1585, 1593, 1586, 71, 1587, 1601, 1589, + 71, 1590, 1597, 1595, 1602, 1591, 1596, 1598, 71, 1592, + 1603, 1604, 1599, 71, 1600, 1594, 71, 1619, 1605, 71, + + 1606, 71, 71, 1607, 1609, 1601, 71, 71, 1608, 1597, + 1595, 71, 71, 1596, 1598, 1610, 1611, 71, 1604, 1599, + 1612, 1600, 71, 1613, 71, 1605, 1614, 1606, 71, 71, + 71, 1609, 1615, 1616, 71, 1608, 1617, 71, 71, 1618, + 71, 1620, 1610, 1611, 71, 1621, 1623, 1612, 1622, 1626, + 1613, 71, 71, 1614, 1624, 71, 1628, 71, 1625, 1615, + 1616, 1629, 71, 1617, 71, 71, 1618, 71, 71, 71, + 1633, 1630, 1621, 1623, 1631, 1622, 1626, 1627, 1632, 71, + 1637, 1624, 71, 1628, 1634, 1625, 1639, 71, 1629, 71, + 1635, 1643, 71, 1636, 1640, 71, 71, 1633, 1630, 1641, + + 71, 1631, 1642, 1638, 1627, 1632, 1645, 1637, 71, 71, + 1644, 1634, 1646, 1639, 1647, 71, 1648, 1635, 1649, 71, + 1636, 1652, 1651, 71, 1650, 1656, 71, 1657, 1653, 1642, + 1638, 71, 1654, 71, 2912, 71, 71, 1644, 1655, 71, + 1668, 1647, 71, 1660, 71, 1649, 71, 1662, 71, 1651, + 1658, 1650, 1659, 71, 1657, 1653, 71, 71, 71, 1654, + 71, 71, 71, 1661, 1663, 1655, 1666, 1664, 1669, 1665, + 1660, 1670, 71, 1675, 1662, 1672, 1671, 1658, 71, 1659, + 71, 71, 71, 71, 71, 71, 1678, 1667, 1679, 1673, + 1661, 1663, 1674, 71, 1664, 71, 1665, 71, 1670, 1676, + + 71, 1677, 1672, 1671, 71, 71, 71, 1681, 2912, 1682, + 1680, 1683, 71, 1678, 1667, 71, 1673, 71, 1684, 1674, + 1686, 1685, 1688, 1687, 71, 2912, 1676, 1690, 1677, 1692, + 71, 71, 1699, 71, 1681, 71, 1682, 1680, 1683, 71, + 71, 1694, 71, 1689, 1691, 1684, 1693, 1686, 1685, 71, + 1687, 71, 71, 1702, 1690, 1697, 71, 1695, 1698, 71, + 1696, 71, 1700, 71, 71, 71, 1703, 1701, 1694, 1705, + 1689, 1691, 71, 1693, 71, 71, 71, 71, 1704, 1706, + 1702, 1707, 1697, 1708, 1695, 1698, 1709, 1696, 2912, 1700, + 1712, 1711, 1710, 71, 1701, 1714, 71, 1713, 2912, 71, + + 71, 71, 71, 1715, 71, 1704, 1706, 71, 1707, 1717, + 1718, 1716, 71, 71, 71, 71, 71, 1712, 1711, 1710, + 71, 1720, 1714, 1721, 1713, 1719, 1722, 1724, 71, 1725, + 1715, 71, 1726, 71, 71, 1727, 1717, 1718, 1716, 1723, + 71, 71, 1735, 1728, 71, 71, 1730, 1729, 1720, 71, + 1721, 1731, 1719, 1722, 1724, 71, 1725, 71, 71, 71, + 1732, 1736, 1733, 1737, 1734, 1738, 1723, 71, 71, 1735, + 1728, 1739, 71, 1730, 1729, 71, 1740, 1741, 1731, 1743, + 1742, 1745, 1744, 71, 1746, 71, 71, 1732, 71, 1733, + 71, 1734, 1738, 1747, 1749, 1750, 1751, 71, 71, 1754, + + 1752, 1748, 71, 1740, 1741, 71, 71, 1742, 71, 1744, + 71, 1746, 1753, 71, 1755, 1756, 1757, 1759, 1761, 2912, + 71, 1758, 1750, 1751, 71, 71, 71, 71, 1748, 71, + 1760, 71, 1765, 1762, 1769, 1768, 1766, 71, 71, 1753, + 71, 1755, 1756, 1757, 1759, 71, 1763, 71, 1758, 1767, + 71, 1764, 1770, 1773, 1774, 71, 1775, 1760, 1778, 1765, + 1762, 71, 1768, 1766, 1771, 71, 71, 1772, 1776, 1777, + 71, 71, 1779, 71, 71, 71, 1767, 1781, 71, 1770, + 71, 1774, 71, 1775, 71, 1778, 1780, 1782, 1783, 71, + 1784, 1771, 1785, 71, 1772, 1776, 1777, 1786, 71, 71, + + 1787, 1788, 2912, 1790, 71, 1793, 71, 71, 71, 1789, + 1792, 71, 1797, 1780, 1782, 1783, 1791, 1784, 1796, 1785, + 1800, 71, 1795, 71, 1794, 71, 1799, 71, 1788, 71, + 1790, 71, 1793, 71, 71, 1798, 1789, 1792, 1801, 1802, + 71, 1803, 71, 1791, 71, 1796, 71, 1804, 1805, 1795, + 1806, 1794, 71, 1799, 1807, 71, 1808, 1812, 71, 1810, + 71, 1811, 1798, 71, 1809, 71, 71, 1814, 1803, 71, + 71, 1813, 2912, 71, 1804, 1805, 1815, 1806, 71, 71, + 71, 1807, 1821, 1808, 1819, 1818, 1810, 71, 1811, 71, + 1817, 1809, 1816, 71, 1814, 1822, 71, 71, 1813, 71, + + 1820, 1824, 1823, 1815, 1828, 71, 1831, 1825, 71, 1821, + 1826, 1819, 1818, 1832, 71, 1827, 71, 1817, 1829, 1816, + 71, 1835, 1822, 1830, 71, 1833, 71, 1820, 71, 1823, + 71, 71, 71, 1831, 1825, 71, 71, 1826, 1837, 1834, + 1832, 1838, 1827, 1836, 1840, 1829, 71, 1839, 1845, 1846, + 1830, 1841, 1833, 71, 1847, 71, 1842, 1844, 1849, 1848, + 71, 1843, 1850, 1854, 71, 1837, 1834, 71, 71, 71, + 1836, 1840, 71, 71, 1839, 71, 71, 1852, 1841, 1851, + 71, 1853, 1855, 1842, 1844, 1857, 71, 1856, 1843, 1858, + 71, 71, 1859, 1860, 71, 71, 71, 71, 71, 71, + + 71, 1861, 1862, 1863, 1852, 1864, 1851, 1866, 1853, 1855, + 71, 1868, 1857, 71, 1856, 1865, 1858, 71, 71, 1867, + 1860, 1869, 1871, 1872, 71, 1873, 1883, 2912, 1870, 1862, + 1863, 71, 1864, 71, 1866, 71, 1874, 71, 71, 1876, + 1875, 1877, 1865, 1879, 71, 71, 1867, 71, 71, 1878, + 1872, 1882, 1873, 71, 71, 1870, 1880, 71, 71, 1881, + 1885, 71, 1884, 1874, 71, 71, 1876, 1875, 1877, 71, + 1879, 71, 1886, 71, 71, 1887, 1878, 1888, 1882, 1889, + 71, 1890, 71, 1880, 71, 1891, 1881, 1885, 1892, 1884, + 71, 1893, 1894, 71, 71, 1900, 1895, 71, 1898, 1886, + + 2912, 1899, 71, 1896, 1888, 1902, 1889, 71, 1890, 71, + 1906, 71, 1891, 71, 1897, 1892, 1901, 1904, 1893, 71, + 71, 71, 1900, 1895, 71, 1898, 1905, 1903, 1899, 71, + 1896, 1907, 1902, 71, 71, 1908, 1909, 71, 1910, 71, + 71, 1897, 1912, 1901, 1904, 1914, 71, 71, 1911, 1913, + 71, 1916, 1915, 1905, 1903, 71, 2912, 2912, 1907, 71, + 1918, 71, 1908, 1909, 1917, 1910, 1919, 2912, 1920, 2912, + 1921, 71, 1914, 71, 71, 1911, 1913, 71, 71, 1915, + 71, 1923, 1932, 71, 1922, 1924, 1925, 1918, 71, 1928, + 71, 1917, 1927, 1919, 71, 1920, 71, 1921, 1926, 71, + + 71, 71, 1929, 1931, 71, 1936, 1933, 1930, 1923, 71, + 71, 1922, 1924, 1925, 71, 71, 1928, 1934, 71, 1927, + 1938, 1935, 1940, 1942, 71, 1926, 1939, 71, 1937, 1929, + 1931, 71, 1936, 1933, 1930, 71, 1941, 1944, 1943, 1945, + 2912, 1951, 71, 71, 1934, 71, 71, 1938, 1935, 1940, + 1942, 71, 1946, 1939, 1948, 1937, 71, 71, 71, 1947, + 1949, 1950, 71, 1941, 1944, 1943, 1945, 71, 71, 1952, + 71, 1953, 1954, 1955, 71, 2912, 1958, 2912, 1959, 1946, + 1956, 1948, 1957, 71, 71, 71, 1947, 1949, 1950, 1960, + 1961, 71, 1964, 71, 1962, 71, 1952, 71, 1953, 1954, + + 1955, 1965, 71, 1958, 71, 71, 1963, 1956, 1966, 1957, + 71, 71, 1967, 71, 71, 1968, 1960, 1961, 1969, 1964, + 2912, 1962, 71, 2912, 71, 1970, 1971, 1974, 71, 1972, + 1975, 2912, 1976, 1963, 71, 1966, 1977, 1973, 2912, 1967, + 1982, 2912, 1968, 1978, 1981, 71, 71, 71, 71, 2022, + 71, 71, 1970, 1971, 71, 1983, 1972, 1975, 71, 1976, + 1984, 71, 71, 1977, 1973, 1979, 1985, 1982, 1980, 71, + 1978, 1981, 1988, 1986, 1987, 1989, 1990, 1993, 1991, 2912, + 1992, 71, 1994, 71, 71, 71, 2023, 71, 71, 71, + 71, 71, 1979, 1985, 71, 1980, 2912, 71, 71, 1988, + + 1986, 1987, 1989, 1990, 71, 1991, 1995, 1992, 1996, 1994, + 1997, 1999, 1998, 2000, 2001, 71, 2004, 2912, 71, 71, + 2002, 71, 2003, 71, 71, 2007, 71, 2008, 71, 2013, + 2912, 71, 2005, 1995, 71, 1996, 2009, 1997, 1999, 1998, + 2000, 2001, 71, 2004, 71, 2006, 71, 2002, 71, 2003, + 2012, 2010, 2007, 71, 2008, 2011, 71, 71, 2014, 2005, + 71, 2015, 2016, 2009, 2017, 2019, 2912, 2025, 71, 2020, + 71, 2018, 2006, 2024, 2021, 2027, 71, 2012, 2010, 71, + 2036, 2028, 2011, 2026, 2032, 2014, 71, 71, 71, 2016, + 71, 2017, 2019, 71, 2025, 2029, 2031, 71, 2018, 2033, + + 2024, 71, 71, 2034, 2035, 2037, 2030, 71, 2028, 2038, + 2026, 71, 71, 71, 71, 2039, 2040, 2041, 71, 2052, + 2912, 2042, 2029, 2031, 2044, 71, 2033, 71, 2046, 2912, + 2034, 2035, 2037, 2030, 2043, 71, 2038, 2045, 71, 71, + 2049, 71, 71, 2040, 71, 2048, 71, 71, 2042, 71, + 71, 2044, 2047, 2053, 2050, 2046, 71, 71, 2051, 2054, + 2055, 2043, 71, 71, 2045, 2056, 71, 2049, 2057, 71, + 2058, 71, 2048, 2062, 2059, 2060, 71, 2912, 71, 2047, + 2053, 2050, 71, 71, 2061, 2051, 2054, 2055, 2063, 71, + 2064, 2065, 2056, 71, 2070, 2057, 71, 2058, 71, 71, + + 71, 2059, 2060, 2067, 2066, 2068, 71, 71, 71, 71, + 2069, 2061, 2072, 71, 2071, 2063, 71, 2064, 2065, 2073, + 71, 2070, 2075, 2074, 71, 2076, 2077, 2912, 2078, 2079, + 2067, 2066, 2068, 2080, 2082, 2912, 71, 2069, 71, 2072, + 71, 2071, 2083, 2086, 2087, 2081, 71, 71, 71, 2075, + 2074, 2088, 2076, 2077, 71, 2078, 71, 71, 2089, 2084, + 71, 2082, 2085, 2092, 2091, 71, 71, 2090, 71, 2083, + 71, 2087, 2081, 71, 71, 2093, 2094, 71, 2088, 71, + 2095, 2097, 2099, 2096, 71, 2089, 2084, 2098, 2100, 2085, + 71, 2091, 71, 2101, 2090, 2103, 2912, 2912, 2102, 71, + + 2107, 2106, 71, 2094, 71, 2104, 2109, 71, 71, 2099, + 2096, 71, 2112, 71, 2098, 71, 2105, 2110, 71, 2111, + 71, 2108, 2103, 71, 71, 2102, 71, 71, 2106, 71, + 2113, 2115, 2104, 71, 2116, 2117, 71, 2119, 2124, 2112, + 71, 2118, 71, 2105, 2110, 2114, 2111, 71, 2108, 71, + 2121, 2122, 2120, 2123, 71, 2126, 71, 2113, 71, 71, + 2128, 2116, 2117, 71, 71, 71, 2125, 71, 2118, 2127, + 2134, 2130, 2114, 2131, 71, 2133, 71, 2121, 2122, 2120, + 2123, 71, 2126, 2129, 2132, 71, 71, 71, 71, 2135, + 71, 71, 2136, 2125, 2137, 2138, 2127, 2134, 2130, 71, + + 2131, 71, 2133, 2139, 2140, 2143, 71, 2142, 2147, 71, + 2129, 2132, 2141, 71, 71, 2145, 2135, 71, 2146, 2136, + 71, 2137, 2138, 2144, 71, 71, 71, 71, 2148, 2150, + 2139, 2140, 2143, 2912, 2142, 2147, 2151, 71, 2149, 2141, + 71, 2912, 2145, 2154, 71, 2146, 2152, 2153, 2155, 71, + 2144, 2156, 2161, 2157, 2160, 2162, 2163, 71, 71, 2158, + 71, 71, 2166, 2151, 2159, 2149, 2167, 71, 71, 71, + 2154, 71, 71, 2152, 2153, 2155, 2165, 71, 2156, 71, + 2157, 2160, 71, 2163, 71, 2164, 2158, 71, 71, 2166, + 2174, 2159, 71, 2168, 71, 2170, 2172, 2171, 71, 2173, + + 2176, 2169, 71, 2165, 2175, 2912, 2177, 71, 2181, 2912, + 71, 2912, 2164, 2185, 2178, 2912, 71, 71, 71, 71, + 2168, 71, 2170, 2172, 2171, 71, 2173, 2176, 2169, 2180, + 2179, 2175, 71, 2177, 2184, 2181, 2182, 2187, 2183, 2192, + 71, 2178, 71, 2186, 71, 71, 2189, 2188, 2190, 71, + 2191, 2194, 2912, 2912, 2193, 2912, 2180, 2179, 71, 2196, + 2195, 2184, 2198, 2182, 71, 2183, 71, 71, 71, 71, + 2186, 71, 71, 2189, 2188, 71, 2197, 71, 2194, 2199, + 71, 2193, 71, 2200, 71, 2201, 2196, 2195, 71, 2198, + 2203, 2202, 2204, 2205, 2206, 2207, 2912, 2209, 2210, 71, + + 2215, 2208, 71, 2197, 71, 71, 2199, 71, 71, 71, + 2200, 2212, 71, 71, 2211, 2214, 71, 2203, 2202, 2204, + 2205, 71, 2207, 71, 2209, 2210, 2213, 71, 2208, 2216, + 2217, 2912, 71, 71, 71, 2218, 2219, 71, 2212, 71, + 2220, 2211, 2214, 2222, 2226, 71, 71, 2221, 2223, 2225, + 71, 2224, 2229, 2213, 2227, 2912, 2216, 2217, 71, 2228, + 2231, 71, 2218, 2219, 2230, 2232, 71, 2233, 71, 2912, + 2222, 2226, 71, 71, 2221, 2223, 2225, 71, 2224, 71, + 71, 2227, 71, 71, 71, 2235, 2228, 71, 2234, 2236, + 2912, 2230, 2232, 2241, 71, 2237, 2239, 71, 71, 2240, + + 71, 2238, 71, 2242, 2243, 2244, 2246, 2247, 2245, 2252, + 2912, 71, 2235, 2250, 2912, 2234, 2236, 71, 71, 71, + 71, 71, 2237, 2239, 2249, 2251, 2240, 2912, 2238, 71, + 71, 71, 2244, 2246, 2247, 2245, 71, 2248, 2253, 71, + 71, 71, 2254, 71, 2255, 71, 2257, 71, 2256, 2912, + 2258, 2249, 2251, 2259, 71, 71, 71, 2260, 2262, 2261, + 2265, 2263, 2267, 2912, 2248, 2253, 2268, 71, 2266, 2254, + 2269, 71, 2270, 2257, 71, 2256, 71, 2258, 2264, 71, + 71, 71, 2273, 71, 2260, 2262, 2261, 2265, 2263, 71, + 71, 71, 2271, 71, 2272, 2266, 2274, 71, 2275, 71, + + 2276, 2277, 2912, 71, 71, 2264, 2278, 71, 2280, 2273, + 2282, 2283, 2281, 71, 2284, 71, 71, 2285, 2279, 2271, + 71, 2272, 71, 2274, 71, 2275, 2286, 2276, 2277, 71, + 71, 2292, 71, 2278, 2287, 71, 2288, 71, 71, 2281, + 2289, 2284, 2293, 71, 2285, 2279, 71, 2290, 2291, 71, + 2294, 71, 2295, 2286, 71, 71, 2296, 2912, 71, 71, + 71, 2287, 71, 2288, 2299, 2297, 2301, 2289, 71, 2293, + 71, 2298, 2303, 2302, 2290, 2291, 2300, 2294, 71, 2295, + 2306, 71, 2304, 2296, 71, 71, 2308, 71, 2309, 2307, + 71, 2299, 2297, 2301, 71, 2310, 2311, 2305, 2298, 2303, + + 2302, 71, 71, 2300, 71, 2312, 2912, 2306, 71, 2304, + 71, 2313, 2315, 2308, 2314, 2309, 2307, 2316, 2317, 2319, + 2318, 71, 71, 71, 2305, 2320, 71, 71, 71, 2321, + 71, 71, 2312, 71, 2324, 2322, 71, 71, 2313, 2315, + 71, 2314, 2323, 71, 2316, 2317, 2319, 2318, 2325, 71, + 2326, 2329, 2320, 71, 2327, 2328, 2321, 2331, 2330, 71, + 2334, 2324, 2322, 2332, 2342, 2340, 2912, 2341, 2912, 2323, + 2333, 2335, 71, 71, 71, 2325, 71, 71, 71, 71, + 71, 2327, 2328, 71, 71, 2330, 2336, 2334, 2338, 2912, + 2332, 2337, 71, 2339, 71, 71, 71, 2333, 2335, 71, + + 71, 71, 2343, 2346, 2344, 2347, 2345, 2912, 2351, 2350, + 2348, 71, 71, 2336, 71, 2338, 71, 71, 2337, 2349, + 2339, 2353, 2352, 2912, 2912, 71, 2355, 2912, 2912, 2343, + 2346, 2344, 2347, 2345, 71, 71, 2350, 2348, 2358, 2357, + 2359, 71, 2354, 2356, 71, 71, 2349, 71, 71, 2352, + 71, 71, 2360, 2355, 71, 2361, 2363, 2362, 2364, 71, + 2365, 2367, 71, 71, 71, 2358, 2357, 2359, 2366, 2354, + 2356, 2368, 71, 2370, 2369, 2371, 2372, 71, 2375, 2360, + 71, 2377, 2361, 2363, 2362, 71, 71, 2365, 71, 2379, + 71, 2376, 2373, 2382, 71, 2366, 71, 2374, 2368, 71, + + 2370, 2369, 71, 2372, 71, 71, 71, 2378, 71, 2380, + 2381, 2912, 2383, 2385, 2386, 71, 71, 2384, 2376, 2373, + 71, 2387, 71, 2390, 2374, 71, 2392, 2388, 71, 2389, + 2391, 71, 2912, 2393, 2378, 71, 2380, 2381, 71, 2383, + 71, 2386, 71, 2394, 2384, 71, 2395, 71, 2387, 2396, + 71, 2912, 2401, 71, 2388, 71, 2389, 2391, 2397, 71, + 2393, 2398, 2399, 2400, 71, 71, 2404, 2912, 2405, 71, + 2394, 71, 2402, 2395, 2403, 2406, 2396, 71, 71, 2401, + 71, 2411, 71, 2407, 2408, 2397, 2912, 2412, 2398, 2399, + 2400, 2409, 2414, 2404, 71, 71, 71, 2413, 2410, 2402, + + 71, 2403, 71, 71, 71, 2415, 71, 71, 2416, 71, + 2407, 2408, 2417, 71, 2412, 2418, 2419, 2420, 2409, 2414, + 2428, 2421, 2425, 71, 2413, 2410, 2422, 71, 2423, 71, + 2424, 2912, 2415, 2426, 2429, 71, 2427, 2912, 71, 71, + 2430, 71, 2418, 71, 2420, 2434, 71, 2428, 2431, 2432, + 71, 2433, 71, 71, 71, 2423, 71, 2424, 71, 71, + 2426, 2429, 2435, 2427, 71, 2436, 2437, 2430, 2439, 71, + 71, 2438, 2434, 71, 2442, 2431, 2432, 71, 2433, 2440, + 71, 2441, 71, 2444, 2443, 2447, 2446, 71, 71, 2435, + 2912, 71, 2436, 2437, 71, 2439, 2445, 71, 2438, 71, + + 71, 2442, 71, 71, 2449, 2450, 2440, 2448, 2441, 2451, + 2444, 2443, 71, 2446, 2453, 71, 2452, 71, 2454, 2455, + 2456, 2458, 71, 2445, 71, 71, 71, 2457, 2459, 71, + 2460, 2449, 2450, 2912, 2448, 2912, 71, 2461, 2462, 2463, + 2464, 2453, 71, 2452, 2912, 2454, 2455, 71, 2466, 2465, + 2912, 2469, 2470, 71, 2457, 2467, 2471, 71, 71, 2472, + 71, 71, 71, 71, 71, 2462, 2463, 2464, 71, 2468, + 2473, 71, 2478, 2474, 2479, 2466, 2465, 71, 2469, 71, + 71, 71, 2467, 71, 2475, 2477, 71, 2480, 2912, 2476, + 2482, 2481, 71, 2483, 2485, 2487, 2468, 71, 71, 2478, + + 2474, 71, 71, 2484, 71, 2486, 2489, 2488, 2493, 2490, + 71, 2492, 2477, 2502, 71, 71, 71, 2482, 2481, 71, + 2483, 71, 71, 71, 71, 2494, 2491, 2495, 2501, 2912, + 2484, 71, 2486, 71, 2488, 71, 2490, 2496, 2492, 2498, + 71, 2499, 2497, 71, 2500, 71, 2505, 2504, 71, 71, + 71, 71, 71, 2491, 2495, 2501, 2503, 2506, 71, 2507, + 2509, 2508, 71, 2912, 2912, 2510, 2498, 2912, 2499, 71, + 71, 2500, 2513, 71, 2504, 2517, 2912, 2519, 71, 71, + 2511, 2512, 2514, 2503, 2506, 71, 2507, 2509, 2508, 71, + 71, 71, 2510, 2515, 71, 2518, 71, 2516, 2523, 2513, + + 71, 2520, 71, 71, 2519, 2522, 2521, 2511, 2512, 2514, + 71, 2524, 2528, 71, 2525, 2912, 2526, 2912, 2527, 2535, + 2515, 2912, 2518, 71, 2516, 71, 2529, 2530, 2531, 71, + 2912, 2532, 2522, 71, 71, 2538, 2536, 71, 2524, 2528, + 71, 2525, 71, 2526, 71, 2527, 71, 2537, 71, 71, + 2533, 2539, 2534, 2529, 2530, 2531, 71, 71, 2532, 71, + 71, 2540, 71, 2536, 2541, 2542, 2543, 2544, 2547, 2545, + 2912, 71, 2546, 2912, 2537, 2548, 2912, 2533, 2539, 2534, + 2555, 71, 2549, 2553, 71, 71, 71, 71, 71, 2550, + 2912, 2541, 71, 2543, 2544, 71, 2545, 71, 71, 2546, + + 71, 71, 2548, 2551, 2554, 2556, 2557, 71, 2552, 2549, + 2553, 2558, 2560, 2559, 71, 71, 2550, 2562, 2561, 2563, + 2565, 2564, 71, 2912, 71, 71, 71, 71, 2566, 2569, + 71, 2554, 2556, 2557, 71, 71, 2567, 2572, 2558, 2560, + 2559, 2568, 71, 2573, 2574, 2561, 2563, 2565, 2564, 71, + 71, 71, 2578, 2912, 2570, 2566, 2569, 2571, 2575, 71, + 2576, 2577, 71, 2567, 71, 2579, 2582, 71, 2568, 71, + 71, 71, 2580, 2581, 71, 2587, 71, 2583, 2589, 2578, + 71, 2570, 2586, 2584, 2571, 2575, 71, 2576, 2577, 71, + 2585, 71, 2593, 71, 71, 71, 2588, 71, 71, 2580, + + 2581, 2591, 2594, 2590, 2583, 71, 2595, 71, 2592, 2586, + 2584, 71, 71, 71, 2596, 71, 71, 2585, 2597, 71, + 71, 2598, 2601, 2588, 2600, 2603, 2599, 2605, 2591, 2594, + 2590, 2606, 71, 2595, 71, 2592, 71, 71, 2602, 71, + 2607, 2596, 2604, 71, 71, 2597, 71, 2608, 2598, 2601, + 71, 2600, 71, 2599, 71, 2609, 2612, 2610, 71, 2611, + 2613, 2912, 2617, 2912, 2614, 2602, 71, 2607, 71, 2604, + 71, 71, 2615, 2616, 71, 2619, 71, 2618, 71, 2621, + 2620, 71, 2609, 2612, 2610, 71, 2611, 71, 71, 2617, + 71, 2614, 2622, 2624, 2623, 2626, 2627, 71, 2628, 2615, + + 2616, 71, 2619, 2629, 2618, 71, 71, 2620, 2912, 2630, + 2633, 71, 2625, 2631, 71, 2638, 2639, 71, 2634, 71, + 71, 2623, 2626, 2627, 2632, 2628, 2635, 2637, 71, 2636, + 2641, 71, 2642, 2640, 71, 71, 2630, 71, 2912, 2625, + 2631, 71, 71, 71, 71, 2634, 2643, 71, 2644, 2646, + 2645, 2632, 71, 2635, 2637, 2649, 2636, 71, 71, 2642, + 2640, 2650, 71, 2651, 2647, 2648, 2652, 2653, 71, 2654, + 71, 71, 2656, 2643, 71, 2644, 2655, 2645, 2657, 2658, + 2659, 71, 71, 2660, 71, 71, 2661, 2662, 71, 2663, + 2651, 2647, 2648, 2652, 71, 2667, 71, 71, 71, 2656, + + 71, 2668, 2672, 2655, 2664, 2657, 71, 71, 71, 71, + 71, 2669, 2665, 2661, 71, 2666, 2663, 71, 2670, 2671, + 71, 71, 2667, 2675, 71, 71, 2673, 2674, 71, 71, + 2676, 2664, 2679, 2677, 71, 2678, 2680, 71, 2669, 2665, + 2681, 2682, 2666, 2683, 2912, 2670, 2671, 2912, 71, 71, + 71, 71, 2686, 2673, 2674, 71, 2687, 71, 2689, 71, + 2677, 2688, 2678, 2680, 71, 71, 2684, 2681, 71, 2685, + 2683, 71, 2690, 71, 71, 2694, 71, 71, 2698, 2686, + 71, 2693, 71, 2687, 2691, 2689, 71, 2692, 2688, 2697, + 71, 71, 2700, 2684, 71, 71, 2685, 2695, 2696, 2690, + + 71, 2701, 2694, 2699, 2702, 2698, 71, 71, 2693, 2703, + 71, 2691, 2704, 2705, 2692, 2712, 2697, 2706, 2707, 2700, + 2708, 2709, 2710, 2711, 2695, 2696, 2713, 2717, 71, 2720, + 2699, 71, 71, 2716, 2714, 2715, 2703, 2719, 71, 71, + 71, 2721, 2712, 71, 2726, 2718, 71, 71, 71, 71, + 2725, 71, 71, 71, 71, 71, 2720, 71, 2722, 71, + 2716, 2714, 2715, 2724, 2719, 2723, 2727, 2728, 2721, 2729, + 71, 71, 2718, 2732, 71, 2736, 71, 2725, 2733, 71, + 2730, 71, 2734, 2731, 2735, 2722, 71, 71, 2741, 2737, + 2724, 71, 2723, 71, 2728, 71, 2729, 2738, 71, 2739, + + 2740, 2742, 2736, 2743, 2744, 71, 2745, 2730, 71, 2746, + 2731, 2735, 2747, 2748, 71, 71, 2737, 2749, 2750, 71, + 2751, 71, 2752, 71, 2738, 2753, 2739, 2740, 2742, 2754, + 71, 71, 71, 71, 2755, 2758, 71, 71, 71, 71, + 71, 2756, 2760, 2757, 71, 71, 2759, 2751, 2761, 71, + 71, 2762, 2753, 71, 71, 2763, 2754, 71, 2764, 71, + 71, 71, 2758, 2765, 2767, 2766, 2768, 2769, 2756, 2760, + 2757, 2912, 71, 2759, 71, 71, 2771, 2770, 2762, 71, + 71, 2774, 2763, 2776, 71, 2764, 2772, 2775, 71, 71, + 2765, 2767, 2766, 71, 2769, 71, 2773, 2777, 71, 71, + + 2779, 2778, 2780, 2771, 2770, 71, 2782, 71, 2774, 2781, + 71, 71, 2785, 2772, 2775, 2784, 71, 2783, 71, 71, + 2786, 71, 2788, 2773, 71, 71, 2787, 2779, 2778, 2780, + 2912, 71, 2789, 2782, 71, 2790, 2781, 2799, 71, 2785, + 2792, 2791, 2784, 71, 2783, 71, 71, 2786, 71, 2788, + 71, 71, 2793, 2787, 71, 2795, 2796, 2794, 2797, 2789, + 2800, 71, 2790, 71, 71, 2798, 2801, 2792, 2791, 71, + 2802, 71, 71, 2803, 2804, 2807, 2912, 2812, 71, 2793, + 2805, 2808, 2795, 2796, 2794, 2797, 2815, 2800, 71, 2809, + 2912, 2806, 2798, 71, 2817, 2912, 71, 2802, 71, 71, + + 71, 71, 2807, 71, 2810, 2811, 71, 2805, 2808, 71, + 2813, 71, 2814, 71, 2816, 2818, 2809, 71, 2806, 71, + 2819, 71, 71, 71, 2820, 2912, 2821, 71, 2823, 71, + 2822, 2810, 2811, 2824, 2825, 2826, 71, 2813, 2912, 2814, + 2827, 2816, 2818, 2829, 2912, 2832, 2831, 2819, 71, 71, + 2828, 71, 71, 2821, 71, 2823, 2830, 2822, 71, 71, + 2834, 2835, 2826, 71, 2833, 71, 71, 2827, 71, 71, + 71, 71, 2832, 2831, 2839, 2836, 2837, 2828, 2838, 2912, + 2843, 2845, 71, 2830, 2840, 2841, 71, 2834, 2835, 71, + 71, 2833, 2842, 2844, 71, 2846, 71, 2851, 2853, 2912, + + 71, 2839, 2836, 2837, 2847, 2838, 71, 71, 2848, 2850, + 2849, 2840, 2841, 71, 2859, 71, 2852, 71, 2854, 2842, + 2844, 71, 2846, 2912, 2856, 71, 71, 2862, 2863, 71, + 71, 2847, 71, 2912, 2855, 2848, 2850, 2849, 71, 2857, + 2858, 71, 71, 2852, 71, 2854, 71, 71, 71, 2860, + 2861, 2856, 2867, 71, 2862, 71, 2864, 71, 2866, 2865, + 71, 2855, 2868, 2881, 71, 2870, 2857, 2858, 2869, 2912, + 71, 2871, 2912, 2872, 71, 2874, 2860, 2861, 2876, 2867, + 71, 2878, 71, 2864, 2877, 2866, 2865, 71, 2883, 2868, + 71, 71, 2870, 71, 2879, 2869, 2873, 71, 2871, 2875, + + 2872, 71, 2874, 71, 71, 2876, 2882, 71, 2878, 2880, + 71, 2877, 2884, 71, 71, 2883, 2887, 71, 2885, 2888, + 2886, 2879, 2889, 2873, 71, 2890, 2875, 2891, 71, 2892, + 71, 2893, 2897, 2882, 2894, 71, 2880, 2901, 71, 71, + 71, 71, 71, 2887, 2896, 2885, 2888, 2886, 2900, 2889, + 2903, 71, 71, 71, 2891, 2895, 2892, 2898, 2893, 71, + 2899, 2894, 2904, 71, 71, 71, 2902, 2910, 71, 2906, + 71, 2896, 2905, 2907, 71, 2900, 2911, 71, 2912, 2912, + 2908, 2912, 2895, 2912, 2898, 2912, 71, 2899, 71, 71, + 2909, 71, 71, 2902, 71, 71, 2906, 2912, 71, 2905, + + 2907, 2912, 2912, 71, 2912, 2912, 2912, 2908, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2909, 43, 43, + 43, 43, 43, 43, 43, 48, 48, 48, 48, 48, + 48, 48, 53, 53, 53, 53, 53, 53, 53, 59, + 59, 59, 59, 59, 59, 59, 64, 64, 64, 64, + 64, 64, 64, 74, 74, 2912, 74, 74, 74, 74, + 140, 140, 2912, 2912, 2912, 140, 140, 142, 142, 2912, + 2912, 142, 2912, 142, 144, 2912, 2912, 2912, 2912, 2912, + 144, 147, 147, 2912, 2912, 2912, 147, 147, 149, 2912, + 2912, 2912, 2912, 2912, 149, 151, 151, 2912, 151, 151, + + 151, 151, 75, 75, 2912, 75, 75, 75, 75, 13, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912 } ; -static yyconst flex_int16_t yy_chk[8360] = +static const flex_int16_t yy_chk[8377] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -2322,10 +2318,10 @@ static yyconst flex_int16_t yy_chk[8360] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 5, 28, 6, 7, - 7, 7, 7, 2910, 7, 8, 8, 8, 8, 28, + 7, 7, 7, 2918, 7, 8, 8, 8, 8, 28, 8, 9, 9, 9, 10, 10, 10, 15, 21, 24, - 971, 15, 30, 3, 28, 149, 4, 47, 47, 5, + 979, 15, 30, 3, 28, 149, 4, 47, 47, 5, 19, 6, 19, 19, 30, 19, 72, 7, 147, 24, 72, 19, 24, 8, 21, 21, 24, 29, 9, 30, 25, 10, 11, 11, 11, 11, 11, 11, 12, 12, @@ -2359,10 +2355,10 @@ static yyconst flex_int16_t yy_chk[8360] = 71, 74, 71, 74, 74, 87, 74, 93, 71, 88, 88, 87, 74, 87, 93, 94, 94, 99, 88, 98, - 0, 66, 97, 94, 192, 0, 87, 102, 101, 963, + 0, 66, 97, 94, 192, 0, 87, 102, 101, 971, 99, 94, 87, 0, 93, 102, 88, 88, 87, 74, 87, 98, 94, 94, 99, 97, 98, 103, 100, 97, - 94, 100, 101, 104, 102, 106, 192, 104, 105, 963, + 94, 100, 101, 104, 102, 106, 192, 104, 105, 971, 101, 110, 109, 105, 100, 100, 105, 103, 106, 103, 107, 0, 100, 104, 103, 100, 109, 104, 100, 101, 104, 110, 106, 114, 104, 105, 118, 111, 110, 109, @@ -2388,10 +2384,10 @@ static yyconst flex_int16_t yy_chk[8360] = 158, 164, 166, 163, 165, 167, 235, 167, 166, 168, 173, 177, 171, 179, 168, 174, 171, 175, 169, 169, 178, 0, 185, 174, 176, 180, 177, 178, 181, 0, - 305, 185, 167, 171, 166, 166, 173, 173, 177, 175, + 311, 185, 167, 171, 166, 166, 173, 173, 177, 175, 171, 179, 174, 171, 175, 179, 176, 178, 180, 185, - 181, 176, 180, 183, 186, 181, 191, 305, 0, 184, + 181, 176, 180, 183, 186, 181, 191, 311, 0, 184, 171, 172, 184, 187, 0, 183, 172, 191, 179, 189, 0, 172, 0, 0, 184, 195, 186, 172, 172, 0, 183, 186, 188, 191, 172, 187, 184, 188, 172, 184, @@ -2400,11 +2396,11 @@ static yyconst flex_int16_t yy_chk[8360] = 196, 194, 199, 198, 188, 200, 201, 202, 193, 193, 203, 201, 190, 204, 207, 0, 188, 198, 188, 197, 196, 207, 194, 199, 205, 206, 208, 209, 194, 210, - 0, 211, 209, 204, 0, 198, 311, 200, 205, 202, + 0, 211, 209, 204, 0, 198, 400, 200, 205, 202, 204, 207, 203, 212, 198, 211, 206, 208, 210, 213, 214, 205, 206, 208, 209, 215, 210, 216, 211, 217, - 218, 221, 214, 311, 216, 212, 215, 213, 219, 218, + 218, 221, 214, 400, 216, 212, 215, 213, 219, 218, 212, 222, 222, 220, 223, 225, 213, 214, 220, 228, 222, 217, 215, 224, 216, 227, 217, 218, 226, 229, 224, 219, 231, 221, 236, 219, 230, 225, 222, 222, @@ -2427,812 +2423,814 @@ static yyconst flex_int16_t yy_chk[8360] = 281, 273, 274, 284, 274, 280, 272, 277, 277, 281, 275, 276, 279, 282, 283, 285, 293, 276, 278, 282, 287, 276, 286, 278, 288, 280, 289, 281, 283, 284, - 284, 286, 291, 288, 294, 290, 297, 298, 276, 285, + 284, 286, 294, 288, 0, 290, 299, 291, 276, 285, 282, 283, 285, 287, 290, 292, 298, 287, 293, 286, - 295, 288, 289, 289, 297, 302, 291, 299, 294, 291, - 292, 294, 290, 297, 298, 295, 301, 0, 303, 302, - 0, 0, 292, 300, 309, 300, 0, 295, 296, 299, - 306, 296, 302, 303, 299, 320, 296, 296, 296, 296, - 301, 300, 309, 301, 308, 303, 296, 300, 304, 304, - - 300, 309, 300, 313, 306, 296, 308, 306, 296, 307, - 310, 312, 307, 296, 296, 296, 296, 320, 300, 307, - 314, 308, 315, 304, 318, 304, 304, 316, 310, 313, - 313, 318, 314, 312, 319, 317, 307, 310, 312, 307, - 0, 321, 316, 317, 315, 322, 319, 314, 321, 315, - 323, 318, 324, 325, 316, 0, 327, 331, 329, 325, - 0, 319, 317, 326, 840, 326, 332, 322, 321, 327, - 0, 330, 322, 0, 324, 325, 329, 335, 328, 324, - 325, 0, 323, 327, 335, 329, 325, 326, 332, 331, - 326, 328, 326, 332, 328, 840, 328, 330, 330, 339, - - 336, 333, 328, 337, 335, 328, 336, 333, 338, 342, - 353, 333, 339, 341, 345, 337, 0, 0, 328, 333, - 338, 328, 342, 328, 347, 333, 339, 336, 333, 341, - 337, 344, 345, 0, 333, 338, 342, 341, 333, 346, - 341, 345, 353, 344, 346, 347, 333, 334, 348, 334, - 351, 347, 349, 352, 348, 358, 341, 356, 344, 358, - 349, 352, 334, 354, 354, 334, 350, 334, 351, 334, - 356, 346, 364, 334, 334, 348, 334, 351, 350, 349, - 352, 355, 358, 0, 356, 0, 0, 369, 355, 334, - 354, 357, 334, 350, 334, 0, 334, 343, 343, 359, - - 357, 361, 0, 363, 364, 360, 359, 343, 355, 343, - 343, 343, 360, 361, 343, 363, 365, 362, 368, 369, - 367, 0, 343, 357, 343, 343, 359, 357, 361, 372, - 363, 368, 360, 366, 343, 367, 343, 343, 343, 362, - 366, 343, 365, 365, 362, 368, 370, 367, 370, 378, - 371, 372, 373, 373, 0, 374, 372, 375, 376, 377, - 366, 371, 374, 381, 379, 380, 0, 378, 375, 376, - 382, 383, 377, 370, 378, 0, 378, 371, 382, 389, - 380, 373, 374, 383, 375, 376, 377, 379, 380, 381, - 381, 379, 380, 384, 378, 386, 385, 382, 383, 387, - - 388, 389, 390, 391, 384, 385, 389, 380, 386, 392, - 387, 394, 387, 393, 403, 0, 0, 387, 388, 393, - 384, 391, 386, 385, 395, 390, 387, 388, 396, 390, - 391, 398, 394, 404, 399, 397, 0, 387, 394, 387, - 393, 392, 397, 400, 407, 401, 403, 395, 399, 402, - 396, 395, 405, 410, 432, 396, 404, 398, 398, 401, - 404, 399, 397, 406, 405, 400, 407, 408, 410, 406, - 400, 407, 401, 409, 412, 402, 402, 411, 413, 405, - 410, 409, 414, 412, 411, 417, 432, 415, 416, 408, - 406, 418, 419, 413, 408, 420, 0, 422, 419, 409, - - 409, 412, 0, 416, 411, 413, 414, 425, 409, 414, - 415, 417, 417, 418, 415, 416, 424, 427, 418, 419, - 423, 420, 420, 422, 422, 425, 423, 431, 429, 426, - 429, 430, 427, 433, 425, 424, 426, 429, 430, 434, - 431, 435, 437, 424, 427, 437, 436, 423, 438, 0, - 0, 433, 440, 0, 431, 429, 426, 429, 430, 436, - 433, 437, 442, 435, 441, 444, 443, 439, 435, 437, - 444, 434, 437, 436, 439, 442, 440, 445, 446, 440, - 438, 447, 451, 445, 449, 448, 452, 441, 443, 442, - 451, 450, 444, 443, 439, 1075, 441, 448, 455, 486, - - 452, 446, 450, 447, 445, 446, 449, 0, 447, 451, - 455, 449, 448, 452, 441, 454, 456, 0, 450, 453, - 457, 0, 454, 1075, 453, 455, 453, 459, 457, 458, - 0, 486, 453, 0, 453, 462, 0, 453, 453, 456, - 458, 0, 454, 456, 453, 453, 453, 457, 460, 463, - 459, 453, 460, 453, 459, 461, 458, 462, 466, 453, - 463, 453, 462, 464, 453, 453, 469, 461, 465, 466, - 460, 453, 467, 469, 0, 460, 463, 470, 465, 460, - 468, 464, 461, 472, 468, 466, 471, 474, 471, 473, - 464, 0, 0, 469, 475, 0, 467, 479, 478, 467, - - 465, 473, 474, 470, 470, 465, 475, 468, 482, 472, - 472, 476, 477, 471, 474, 479, 473, 477, 480, 476, - 478, 475, 481, 484, 479, 478, 480, 487, 485, 482, - 497, 488, 489, 490, 481, 482, 491, 495, 476, 477, - 489, 484, 487, 488, 492, 480, 490, 493, 491, 481, - 484, 485, 494, 492, 487, 485, 496, 497, 488, 489, - 490, 498, 495, 491, 495, 499, 494, 500, 503, 501, - 493, 492, 0, 502, 493, 496, 504, 0, 506, 494, - 499, 503, 505, 496, 501, 509, 511, 508, 504, 512, - 509, 513, 499, 498, 514, 503, 501, 502, 508, 500, - - 502, 507, 506, 504, 505, 506, 510, 515, 507, 505, - 516, 507, 517, 511, 508, 0, 512, 509, 517, 507, - 510, 514, 518, 513, 520, 519, 521, 527, 507, 0, - 522, 0, 520, 510, 515, 507, 523, 524, 507, 517, - 525, 524, 516, 526, 532, 521, 518, 519, 525, 518, - 528, 520, 519, 521, 522, 0, 529, 522, 523, 527, - 530, 531, 533, 523, 524, 529, 526, 525, 531, 535, - 526, 536, 534, 528, 535, 539, 532, 528, 535, 541, - 536, 537, 530, 529, 533, 534, 538, 530, 531, 533, - 540, 542, 541, 535, 543, 538, 535, 539, 536, 534, - - 545, 535, 539, 542, 544, 535, 541, 537, 537, 0, - 546, 548, 540, 538, 547, 0, 551, 540, 542, 550, - 549, 0, 544, 554, 545, 551, 543, 545, 552, 556, - 550, 544, 546, 546, 557, 548, 547, 546, 548, 553, - 560, 547, 549, 551, 555, 554, 550, 549, 552, 558, - 554, 555, 557, 553, 559, 552, 556, 558, 560, 546, - 561, 557, 562, 563, 564, 559, 553, 560, 565, 0, - 567, 555, 568, 569, 566, 561, 558, 571, 0, 567, - 570, 559, 0, 578, 563, 568, 572, 561, 564, 573, - 563, 564, 565, 574, 562, 565, 566, 567, 574, 568, - - 575, 566, 570, 576, 579, 569, 580, 570, 582, 571, - 572, 573, 579, 572, 575, 578, 573, 576, 577, 577, - 581, 583, 584, 582, 580, 574, 577, 575, 587, 585, - 576, 579, 582, 580, 586, 582, 588, 584, 588, 586, - 589, 0, 581, 591, 590, 577, 577, 581, 592, 584, - 582, 585, 590, 583, 587, 587, 585, 592, 597, 598, - 593, 599, 0, 588, 594, 589, 586, 589, 591, 593, - 591, 590, 595, 594, 596, 592, 602, 600, 604, 599, - 595, 596, 598, 601, 603, 602, 598, 593, 599, 600, - 597, 594, 603, 604, 605, 601, 606, 608, 0, 595, - - 607, 596, 611, 602, 600, 604, 605, 609, 610, 612, - 601, 603, 608, 607, 614, 609, 610, 618, 612, 613, - 617, 605, 0, 614, 608, 611, 619, 607, 606, 611, - 613, 615, 615, 617, 609, 610, 612, 616, 621, 622, - 615, 614, 620, 618, 618, 616, 613, 617, 623, 619, - 620, 624, 622, 619, 621, 625, 627, 626, 615, 615, - 629, 634, 624, 625, 616, 621, 622, 628, 630, 620, - 623, 626, 632, 633, 631, 623, 627, 0, 624, 634, - 629, 632, 625, 627, 626, 635, 636, 629, 634, 628, - 630, 637, 638, 633, 628, 630, 631, 639, 635, 632, - - 633, 631, 640, 641, 636, 642, 637, 646, 643, 644, - 648, 645, 635, 636, 638, 649, 641, 645, 637, 638, - 643, 639, 644, 642, 639, 640, 654, 652, 658, 640, - 641, 647, 642, 649, 646, 643, 644, 648, 645, 647, - 651, 655, 649, 653, 656, 657, 656, 0, 651, 654, - 653, 0, 676, 654, 657, 659, 655, 647, 647, 652, - 658, 660, 663, 662, 661, 662, 647, 651, 655, 663, - 653, 656, 657, 661, 659, 666, 669, 672, 676, 676, - 673, 660, 659, 674, 678, 675, 669, 666, 660, 663, - 662, 661, 664, 0, 674, 672, 664, 682, 677, 664, - - 678, 673, 666, 669, 672, 680, 664, 673, 675, 664, - 674, 678, 675, 679, 664, 684, 0, 689, 680, 664, - 681, 0, 679, 664, 677, 677, 664, 681, 685, 682, - 686, 0, 680, 664, 685, 691, 664, 684, 0, 686, - 679, 687, 684, 687, 689, 688, 692, 681, 683, 683, - 690, 683, 0, 693, 683, 685, 0, 686, 692, 683, - 694, 691, 691, 696, 695, 683, 683, 0, 687, 688, - 690, 697, 688, 692, 683, 683, 683, 690, 683, 693, - 693, 683, 694, 700, 698, 696, 683, 694, 695, 699, - 696, 695, 683, 683, 701, 702, 697, 699, 697, 698, - - 703, 701, 704, 702, 707, 705, 700, 706, 709, 708, - 700, 698, 711, 713, 0, 712, 699, 705, 708, 703, - 706, 701, 702, 709, 717, 716, 718, 703, 704, 704, - 707, 707, 705, 710, 706, 709, 708, 712, 710, 719, - 713, 714, 712, 720, 711, 721, 714, 716, 0, 722, - 0, 0, 716, 725, 729, 723, 717, 726, 718, 724, - 710, 719, 725, 727, 732, 764, 719, 0, 731, 721, - 722, 730, 721, 714, 723, 720, 722, 728, 724, 726, - 725, 729, 723, 727, 726, 728, 724, 731, 735, 730, - 727, 733, 736, 738, 737, 731, 732, 764, 730, 733, - - 739, 740, 744, 742, 728, 742, 735, 743, 746, 741, - 736, 738, 0, 0, 744, 735, 737, 745, 733, 736, - 738, 737, 741, 740, 739, 745, 746, 739, 740, 744, - 742, 748, 750, 743, 743, 746, 741, 747, 751, 748, - 747, 752, 754, 755, 745, 753, 756, 752, 754, 757, - 755, 0, 0, 756, 757, 748, 758, 750, 748, 750, - 759, 761, 765, 758, 747, 751, 748, 753, 752, 754, - 755, 760, 753, 756, 763, 760, 757, 762, 759, 766, - 765, 769, 763, 758, 761, 767, 762, 759, 761, 765, - 768, 771, 770, 767, 766, 772, 774, 0, 760, 781, - - 773, 763, 769, 768, 762, 770, 766, 773, 769, 775, - 776, 783, 767, 771, 774, 778, 775, 768, 771, 770, - 778, 777, 772, 774, 779, 782, 780, 773, 777, 776, - 785, 781, 779, 780, 784, 786, 775, 776, 782, 788, - 0, 784, 778, 783, 791, 787, 793, 788, 777, 789, - 791, 779, 782, 780, 792, 790, 797, 789, 799, 794, - 795, 784, 785, 798, 789, 796, 788, 786, 787, 795, - 798, 791, 787, 801, 802, 0, 789, 790, 793, 796, - 792, 792, 790, 794, 789, 799, 794, 795, 797, 800, - 798, 803, 796, 805, 804, 801, 809, 806, 800, 807, - - 801, 802, 806, 803, 809, 808, 807, 811, 814, 812, - 811, 817, 820, 837, 0, 814, 800, 804, 803, 805, - 805, 804, 812, 809, 806, 815, 807, 808, 0, 0, - 819, 815, 808, 818, 811, 814, 812, 817, 817, 820, - 822, 821, 819, 821, 0, 837, 823, 825, 834, 824, - 0, 826, 815, 816, 834, 816, 818, 819, 823, 816, - 818, 816, 824, 822, 826, 827, 816, 822, 821, 825, - 827, 816, 828, 823, 825, 834, 824, 816, 826, 829, - 816, 831, 816, 830, 838, 828, 816, 832, 816, 0, - 836, 831, 833, 816, 835, 830, 839, 827, 816, 828, - - 841, 0, 829, 831, 843, 833, 829, 835, 831, 832, - 830, 836, 843, 844, 832, 842, 838, 836, 831, 833, - 842, 835, 844, 839, 846, 847, 0, 850, 848, 0, - 849, 843, 841, 856, 0, 859, 851, 0, 0, 846, - 844, 848, 842, 845, 0, 849, 852, 847, 845, 863, - 845, 846, 847, 850, 850, 848, 845, 849, 851, 853, - 856, 845, 845, 851, 857, 852, 854, 859, 845, 845, - 845, 855, 853, 852, 854, 845, 860, 845, 862, 855, - 864, 863, 861, 845, 869, 0, 853, 857, 845, 845, - 861, 857, 862, 854, 866, 845, 865, 867, 855, 868, - - 860, 870, 864, 860, 865, 862, 871, 864, 872, 861, - 868, 873, 866, 881, 871, 867, 869, 876, 873, 870, - 879, 866, 875, 865, 867, 877, 868, 874, 870, 875, - 872, 883, 876, 871, 0, 872, 880, 878, 873, 0, - 874, 879, 883, 877, 876, 881, 880, 879, 885, 875, - 886, 887, 877, 888, 874, 878, 889, 886, 883, 887, - 890, 885, 891, 880, 878, 889, 888, 894, 892, 893, - 896, 895, 890, 0, 897, 885, 902, 886, 887, 901, - 888, 899, 901, 889, 891, 894, 904, 890, 897, 891, - 892, 893, 899, 904, 894, 892, 893, 895, 895, 900, - - 902, 897, 896, 902, 900, 901, 901, 903, 899, 901, - 905, 906, 907, 904, 908, 909, 910, 911, 913, 905, - 903, 0, 909, 912, 907, 906, 920, 914, 0, 912, - 916, 900, 915, 917, 903, 924, 918, 905, 906, 907, - 913, 911, 909, 915, 911, 913, 908, 920, 910, 914, - 912, 918, 916, 920, 914, 917, 921, 916, 922, 915, - 917, 923, 924, 918, 925, 926, 0, 921, 0, 928, - 927, 929, 0, 930, 926, 932, 933, 931, 934, 922, - 929, 930, 925, 921, 931, 922, 935, 936, 939, 937, - 933, 925, 926, 923, 927, 928, 928, 927, 929, 932, - - 930, 938, 932, 933, 931, 942, 941, 943, 944, 936, - 934, 937, 942, 945, 936, 941, 937, 948, 935, 946, - 939, 949, 0, 938, 947, 950, 948, 951, 938, 952, - 944, 955, 942, 941, 956, 944, 0, 946, 952, 943, - 945, 957, 947, 951, 948, 949, 946, 953, 949, 950, - 954, 947, 950, 957, 951, 959, 952, 958, 954, 960, - 961, 962, 953, 955, 966, 965, 956, 960, 957, 964, - 970, 979, 966, 961, 953, 0, 962, 954, 964, 958, - 977, 969, 959, 965, 958, 972, 960, 961, 962, 969, - 973, 966, 965, 967, 974, 967, 964, 970, 972, 978, - - 975, 976, 973, 979, 980, 0, 978, 977, 969, 974, - 981, 0, 972, 982, 989, 0, 984, 973, 0, 976, - 967, 974, 975, 983, 986, 988, 978, 975, 976, 984, - 987, 985, 981, 988, 989, 990, 980, 981, 982, 993, - 982, 989, 987, 984, 985, 983, 986, 990, 991, 996, - 983, 986, 988, 997, 994, 995, 991, 987, 985, 0, - 0, 996, 990, 998, 995, 1002, 993, 994, 1001, 1003, - 998, 1004, 0, 1005, 997, 991, 996, 999, 0, 0, - 997, 994, 995, 1007, 1004, 1008, 999, 1002, 999, 1003, - 998, 999, 1002, 1006, 1001, 1001, 1003, 1005, 1004, 999, - - 1005, 1007, 1006, 1009, 999, 1010, 1011, 1008, 1012, 1014, - 1007, 1009, 1008, 999, 0, 999, 1012, 1015, 999, 1016, - 1006, 1017, 1011, 1018, 1019, 1020, 1021, 1010, 1017, 0, - 1009, 0, 1010, 1011, 1023, 1012, 1014, 1022, 1021, 1015, - 1024, 1016, 1023, 1020, 1015, 1018, 1016, 1019, 1017, 1022, - 1018, 1019, 1020, 1021, 1025, 1024, 1026, 1027, 1031, 1029, - 1028, 1023, 1030, 1032, 1022, 1029, 1025, 1024, 1028, 1038, - 1033, 1030, 1027, 1034, 1035, 1032, 1026, 1033, 1037, 1031, - 1034, 1025, 1038, 1026, 1027, 1031, 1029, 1028, 1039, 1030, - 1032, 1040, 1035, 1042, 1041, 1044, 1038, 1033, 1040, 1043, - - 1034, 1035, 1047, 1044, 1043, 1053, 1045, 1039, 1042, 1046, - 1037, 1049, 1050, 0, 1051, 1039, 1041, 1052, 1040, 1045, - 1042, 1041, 1044, 1046, 1055, 1049, 1056, 1053, 1047, 1047, - 1050, 1043, 1053, 1045, 1054, 1057, 1046, 1048, 1049, 1050, - 1048, 1048, 0, 1052, 1052, 1048, 1051, 1058, 1056, 1060, - 0, 1048, 1054, 1056, 1059, 1048, 1055, 1057, 0, 1048, - 1059, 1054, 1057, 1061, 1048, 1061, 1064, 1048, 1048, 1066, - 1062, 1063, 1048, 1058, 1058, 1060, 1060, 1062, 1048, 1065, - 1063, 1059, 1048, 1071, 1064, 1068, 1065, 1061, 1067, 1069, - 1061, 1066, 1061, 1064, 1068, 1070, 1066, 1062, 1063, 1072, - - 0, 1067, 0, 1074, 1076, 1071, 1065, 1079, 1082, 1078, - 1071, 1083, 1068, 1082, 1080, 1067, 1083, 1097, 0, 1079, - 1076, 1069, 1072, 1080, 1081, 1084, 1072, 1070, 1073, 1074, - 1074, 1076, 1078, 1073, 1079, 1073, 1078, 1073, 1083, 1073, - 1082, 1080, 1081, 1085, 1097, 1086, 1073, 1084, 1089, 1087, - 1088, 1081, 1084, 1093, 0, 1073, 1085, 1087, 1088, 1091, - 1073, 1090, 1073, 1086, 1073, 1092, 1073, 1089, 1096, 1099, - 1085, 1093, 1086, 1094, 1090, 1089, 1087, 1088, 1092, 1098, - 1093, 1091, 1094, 1095, 1100, 1095, 1091, 1105, 1090, 1102, - 1096, 1098, 1092, 1103, 1104, 1096, 1099, 1106, 1108, 0, - - 1094, 1107, 1104, 1109, 1110, 1105, 1098, 1113, 1107, 1100, - 1095, 1100, 1111, 1102, 1105, 1103, 1102, 1112, 1111, 1115, - 1103, 1104, 0, 1112, 1106, 1108, 1110, 1117, 1107, 1109, - 1109, 1110, 1118, 1114, 1113, 1116, 1119, 1126, 1120, 1111, - 1114, 1123, 1116, 1115, 1112, 1122, 1115, 1120, 1124, 1117, - 1118, 1125, 1127, 1123, 1117, 1128, 1126, 1129, 1130, 1118, - 1114, 1119, 1116, 1119, 1126, 1120, 1132, 1131, 1123, 1122, - 1124, 1133, 1122, 1125, 1127, 1124, 1131, 1128, 1125, 1127, - 1130, 1134, 1128, 1129, 1129, 1130, 1136, 1132, 1137, 1138, - 1139, 1133, 1140, 1132, 1131, 1134, 1141, 1142, 1133, 1143, - - 1144, 1147, 1146, 1148, 1141, 1147, 1149, 1144, 1134, 1146, - 1140, 1138, 1150, 1142, 1152, 1160, 1138, 1160, 1136, 1140, - 1137, 1158, 1139, 1141, 1142, 1154, 1143, 1144, 1147, 1146, - 1153, 1156, 1154, 1150, 1155, 1148, 1153, 1162, 1149, 1150, - 1163, 1157, 1160, 1153, 1156, 1161, 1152, 1158, 1158, 1155, - 1157, 1164, 1154, 1159, 1161, 1164, 1170, 1153, 1156, 1162, - 1159, 1155, 1165, 1153, 1162, 1167, 1168, 1163, 1157, 1171, - 1169, 1168, 1161, 1167, 1170, 1173, 0, 1172, 1164, 1169, - 1159, 1176, 1174, 1170, 1165, 1174, 1177, 1173, 1171, 1165, - 1172, 1178, 1167, 1179, 1174, 0, 1171, 1169, 1168, 1177, - - 1175, 1180, 1173, 1175, 1172, 1183, 1176, 1181, 1176, 1174, - 1182, 1182, 1174, 1177, 1183, 1181, 1179, 1180, 1184, 1186, - 1179, 0, 1175, 1178, 1185, 1189, 1190, 1175, 1180, 1187, - 1175, 1192, 1183, 1185, 1181, 1190, 1187, 1182, 1189, 1191, - 1184, 1186, 1193, 1196, 0, 1184, 1186, 1195, 1191, 1197, - 1194, 1185, 1189, 1190, 1198, 1195, 1187, 1192, 1192, 1194, - 1199, 1203, 1198, 1202, 1197, 1193, 1191, 1200, 1201, 1193, - 1208, 1202, 1204, 1199, 1195, 1196, 1197, 1194, 1205, 1200, - 1201, 1198, 1206, 1203, 1207, 1210, 1209, 1199, 1203, 1213, - 1202, 1206, 1204, 1212, 1200, 1201, 1208, 1208, 1209, 1204, - - 1205, 1211, 1207, 1214, 1215, 1205, 1210, 1211, 0, 1206, - 1216, 1207, 1210, 1209, 1218, 1212, 1219, 1221, 0, 1222, - 1212, 1213, 1220, 0, 1225, 1229, 1221, 1224, 1211, 0, - 1215, 1215, 1222, 1223, 1227, 1214, 1216, 1216, 1229, 1219, - 1220, 1218, 1228, 1219, 1221, 1223, 1222, 1224, 1226, 1220, - 1225, 1225, 1229, 1227, 1224, 1226, 1234, 1230, 1231, 1233, - 1223, 1227, 1232, 1231, 1228, 1230, 1233, 1232, 1235, 1228, - 1236, 1237, 1239, 1242, 1238, 1226, 1235, 1245, 1236, 1246, - 1239, 1240, 1234, 1234, 1230, 1243, 1233, 1246, 1240, 1237, - 1231, 1241, 1244, 1244, 1232, 1235, 1238, 1236, 1237, 1239, - - 1241, 1238, 1247, 1248, 1254, 1242, 1246, 1243, 1240, 1245, - 1254, 1256, 1243, 1249, 1250, 1253, 1251, 1252, 1241, 1244, - 1255, 1249, 1250, 1247, 1251, 1252, 1257, 1259, 1253, 1247, - 1258, 1254, 1255, 1260, 1262, 1248, 1261, 1256, 1256, 1271, - 1249, 1250, 1253, 1251, 1252, 1258, 1263, 1255, 1262, 1267, - 1257, 1264, 1265, 1257, 1259, 1260, 1265, 1258, 1268, 1261, - 1260, 1262, 1272, 1261, 1263, 1264, 1271, 1269, 1273, 1265, - 1268, 1267, 0, 1263, 1269, 1270, 1267, 1265, 1264, 1265, - 1274, 1275, 1279, 1265, 1272, 1268, 1270, 0, 1277, 1272, - 1273, 1276, 1278, 1280, 1269, 1273, 1265, 1277, 1276, 1278, - - 1282, 1285, 1270, 1274, 1275, 1284, 1287, 1274, 1275, 1282, - 1286, 1284, 1290, 0, 1279, 1277, 1292, 1288, 1276, 1278, - 1280, 1293, 1294, 1285, 1288, 1300, 1297, 1282, 1285, 1299, - 1295, 0, 1284, 1294, 1301, 1298, 1286, 1286, 1287, 1290, - 1292, 1295, 1298, 1292, 1288, 1304, 1301, 1299, 1293, 1294, - 1297, 1300, 1300, 1297, 1302, 1303, 1299, 1295, 1305, 1307, - 1302, 1301, 1298, 1303, 1306, 1308, 1311, 1304, 1307, 1310, - 1315, 1305, 1304, 1309, 1312, 1309, 1313, 1308, 1318, 1311, - 0, 1302, 1303, 1312, 1316, 1305, 1307, 1314, 1325, 1319, - 1306, 1306, 1308, 1311, 1319, 1310, 1310, 1315, 1313, 1314, - - 1309, 1312, 1317, 1313, 1318, 1318, 1320, 1316, 1321, 1317, - 1322, 1316, 1323, 0, 1314, 1325, 1319, 1326, 1322, 1327, - 1328, 1328, 1320, 1329, 0, 1330, 1326, 1330, 1328, 1317, - 1331, 1321, 1327, 1320, 1323, 1321, 1329, 1322, 1332, 1323, - 1336, 1335, 1333, 0, 1326, 1338, 1327, 1328, 1328, 1333, - 1329, 1334, 1330, 1339, 1337, 1340, 1331, 1331, 1334, 1335, - 1332, 1337, 1336, 1342, 1341, 1332, 1344, 1336, 1335, 1333, - 1338, 1341, 1338, 1345, 1346, 1339, 1347, 1349, 1334, 1344, - 1339, 1337, 1346, 1350, 0, 1351, 1350, 1340, 1352, 1353, - 0, 1341, 1357, 1344, 1355, 1342, 1354, 1347, 1356, 1349, - - 1345, 1346, 1353, 1347, 1349, 1354, 1355, 1361, 1362, 1358, - 1350, 1351, 1351, 1359, 1352, 1352, 1353, 1367, 1357, 1357, - 1359, 1355, 1356, 1354, 1358, 1356, 1360, 1363, 0, 1360, - 1362, 1369, 1365, 1364, 1365, 1362, 1358, 1366, 0, 1361, - 1359, 1360, 1371, 1368, 1372, 1363, 1370, 1378, 1373, 1367, - 1360, 1379, 1381, 1360, 1363, 1364, 1360, 1369, 1369, 1365, - 1364, 1366, 1373, 1377, 1366, 1368, 1372, 1374, 1360, 1375, - 1368, 1372, 1370, 1370, 1371, 1373, 1374, 1375, 1376, 1378, - 1380, 1383, 1382, 1379, 1381, 1376, 1382, 1377, 1384, 1385, - 1377, 1386, 1387, 1389, 1374, 1391, 1375, 1388, 1392, 1387, - - 1386, 1390, 1380, 1383, 1388, 1376, 1389, 1380, 1383, 1382, - 1391, 1385, 1392, 1393, 1390, 1384, 1385, 1399, 1386, 1387, - 1389, 1396, 1391, 1394, 1388, 1392, 1395, 1401, 1390, 1397, - 1394, 1400, 1406, 1395, 1396, 1397, 1402, 1405, 1400, 1403, - 1405, 1406, 1404, 1407, 1399, 1393, 1411, 1409, 1396, 1401, - 1394, 1403, 1417, 1395, 1401, 1404, 1397, 1411, 1400, 1406, - 1408, 1407, 1402, 1402, 1405, 1410, 1403, 1409, 1410, 1404, - 1407, 1418, 1408, 1411, 1409, 1415, 1413, 1415, 1419, 1417, - 1416, 1413, 1420, 1410, 1422, 1423, 1421, 1408, 1413, 1424, - 1428, 1420, 1410, 1419, 1433, 1410, 1425, 1424, 1418, 1423, - - 1426, 1428, 1415, 1413, 1416, 1419, 1427, 1416, 1413, 1420, - 1421, 1422, 1423, 1421, 1427, 1434, 1424, 1428, 1425, 1429, - 1430, 1431, 1426, 1425, 1431, 1432, 1433, 1426, 1430, 1435, - 1436, 1437, 1438, 1427, 1444, 1440, 1435, 1429, 1439, 1431, - 1437, 1458, 1434, 1432, 1436, 1438, 1429, 1430, 1431, 1439, - 1440, 1431, 1432, 1442, 1443, 1442, 1435, 1436, 1437, 1438, - 1444, 1444, 1440, 1443, 1445, 1439, 1446, 1447, 1458, 1448, - 1449, 1451, 1456, 1449, 1453, 1445, 1450, 1451, 1452, 1453, - 1442, 1443, 1459, 1448, 1446, 1450, 1455, 1452, 1449, 1447, - 1460, 1445, 1457, 1446, 1447, 1448, 1448, 1449, 1451, 1455, - - 1449, 1457, 1461, 1450, 1456, 1452, 1453, 1466, 1462, 1464, - 1448, 1465, 1460, 1455, 1459, 1473, 1464, 1460, 1467, 1457, - 1468, 1471, 1469, 1473, 1465, 1474, 1468, 1482, 1476, 1462, - 1475, 0, 1467, 1474, 1461, 1462, 1464, 1477, 1465, 1466, - 1471, 1481, 1473, 1483, 1468, 1467, 1476, 1468, 1471, 1475, - 1479, 1477, 1474, 1468, 1469, 1476, 1478, 1475, 1480, 1482, - 1484, 1487, 1481, 1479, 1477, 1485, 1488, 1486, 1481, 1487, - 1478, 1480, 1485, 1489, 1484, 1483, 1486, 1479, 0, 1490, - 1488, 1492, 1494, 1478, 1490, 1480, 1491, 1484, 1487, 1481, - 1492, 1495, 1485, 1488, 1486, 1497, 1496, 1491, 1495, 1498, - - 1501, 1504, 1499, 1503, 1501, 1489, 1490, 1500, 1492, 1494, - 1508, 0, 1505, 1491, 0, 1503, 1506, 1497, 1495, 1496, - 1505, 1498, 1497, 1496, 1499, 1500, 1498, 1501, 1504, 1499, - 1503, 1506, 1507, 1509, 1500, 1510, 1511, 1508, 1512, 1505, - 1507, 1513, 1515, 1506, 1525, 1514, 1509, 0, 1517, 1513, - 1518, 1511, 1514, 1512, 1516, 1510, 1519, 1517, 1520, 1507, - 1509, 1521, 1510, 1511, 1523, 1512, 1524, 1526, 1513, 1516, - 1532, 1518, 1514, 1528, 1515, 1517, 1525, 1518, 1529, 1532, - 1527, 1516, 1520, 1519, 1524, 1520, 1523, 1531, 1521, 1530, - 1533, 1523, 1531, 1524, 1526, 1527, 1530, 1532, 1528, 1533, - - 1528, 1534, 1529, 1535, 1536, 1529, 1537, 1527, 1540, 1539, - 1538, 1542, 1541, 1543, 1531, 1540, 1530, 1533, 1537, 1536, - 1544, 1535, 1539, 1534, 1541, 1548, 1544, 1539, 1534, 1546, - 1535, 1536, 1538, 1537, 1545, 1540, 1539, 1538, 1542, 1541, - 1546, 1547, 1545, 1550, 1549, 1543, 1549, 1544, 1547, 1539, - 1548, 1551, 1548, 1552, 1554, 1553, 1546, 1549, 1555, 1556, - 1557, 1545, 1553, 1558, 1560, 1556, 1557, 1561, 1547, 1550, - 1550, 1549, 1559, 1549, 1563, 1565, 1567, 1566, 1551, 1566, - 1552, 1554, 1553, 1564, 1555, 1555, 1556, 1557, 1568, 1570, - 1558, 1561, 1564, 1569, 1561, 1559, 1560, 1574, 1572, 1559, - - 1567, 1573, 1582, 1567, 1566, 1572, 1563, 1565, 1573, 1575, - 1564, 1571, 1571, 1571, 1578, 1568, 1575, 1577, 1571, 1569, - 1569, 1570, 1577, 1579, 1583, 1572, 1571, 1578, 1573, 1574, - 1580, 1581, 1586, 0, 1582, 1588, 1575, 1584, 1571, 1571, - 1571, 1578, 1583, 1581, 1584, 1571, 1580, 1585, 1579, 1577, - 1579, 1583, 1591, 1585, 1587, 1587, 1589, 1580, 1581, 1586, - 1590, 1588, 1588, 1589, 1584, 1590, 1592, 1596, 1593, 1597, - 1598, 1597, 1600, 1602, 1585, 1593, 1601, 1603, 1591, 1591, - 1604, 1587, 1601, 1589, 0, 0, 1604, 1590, 1598, 1605, - 1600, 1606, 1607, 1592, 1596, 1593, 1597, 1598, 1609, 1600, - - 1613, 1605, 1614, 1601, 1603, 1602, 1611, 1604, 1608, 1608, - 1607, 1606, 1610, 1610, 1615, 1619, 1605, 1611, 1606, 1607, - 1616, 1615, 1613, 1617, 1609, 1609, 1618, 1613, 0, 1620, - 1621, 0, 0, 1611, 1614, 1608, 1622, 1623, 1624, 1610, - 1616, 1615, 1619, 1622, 1625, 1623, 1628, 1616, 1621, 1629, - 1626, 1620, 1642, 1624, 0, 1617, 1620, 1621, 1618, 1626, - 1627, 1627, 1630, 1622, 1623, 1624, 1631, 1632, 1625, 1630, - 1640, 1625, 1628, 1628, 1636, 1634, 1635, 1626, 1631, 1642, - 1638, 1629, 1634, 1632, 1635, 1639, 1636, 1627, 1638, 1630, - 1632, 1640, 1643, 1631, 1632, 1641, 1645, 1640, 1646, 1649, - - 1644, 1636, 1634, 1635, 1646, 1644, 1648, 1638, 1639, 1652, - 1632, 1647, 1639, 1641, 1648, 1643, 1644, 1654, 1653, 1643, - 1655, 1649, 1641, 1645, 1647, 1646, 1649, 1644, 1650, 1651, - 1653, 1656, 1644, 1648, 1659, 1650, 1651, 1657, 1647, 1654, - 1662, 1652, 1661, 1660, 1654, 1653, 1663, 1655, 1660, 1661, - 1665, 1666, 1659, 1667, 1667, 1650, 1651, 1656, 1656, 1660, - 1657, 1659, 1668, 1664, 1657, 1670, 1669, 1662, 1664, 1661, - 1660, 1672, 0, 1663, 1676, 1660, 1673, 1674, 1678, 0, - 1667, 1669, 1665, 1666, 1668, 1675, 1672, 1675, 1686, 1668, - 1679, 1677, 1674, 1669, 1681, 1664, 1677, 1670, 1672, 1673, - - 1682, 1683, 1685, 1673, 1674, 1679, 1676, 1687, 1682, 1681, - 1678, 1688, 1675, 1689, 1686, 1686, 1690, 1679, 1677, 1692, - 1689, 1681, 1691, 1683, 1693, 1696, 1685, 1682, 1683, 1685, - 1698, 0, 1694, 1705, 1687, 1700, 1704, 0, 1688, 0, - 1689, 1692, 1707, 1691, 0, 1693, 1692, 1696, 1690, 1691, - 1694, 1693, 1696, 1699, 1698, 1702, 1703, 1698, 1704, 1694, - 1705, 1700, 1700, 1704, 1707, 1708, 1706, 1709, 1699, 1707, - 1702, 1703, 1710, 1711, 1714, 1716, 1712, 1717, 1713, 1710, - 1699, 0, 1702, 1703, 1706, 1712, 1713, 1708, 1715, 1720, - 1717, 1711, 1708, 1706, 1709, 1719, 1721, 1714, 1720, 1710, - - 1711, 1714, 1722, 1712, 1717, 1713, 1719, 1716, 1723, 1724, - 1715, 1725, 1726, 1727, 1721, 1715, 1720, 1725, 1730, 1732, - 1733, 1719, 1719, 1721, 1724, 1736, 1723, 1727, 1722, 1722, - 1734, 1733, 1738, 1719, 1726, 1723, 1724, 1736, 1725, 1726, - 1727, 1734, 1737, 1732, 1739, 1730, 1732, 1733, 1740, 0, - 1742, 1741, 1736, 1743, 1739, 1737, 1746, 1734, 1747, 1745, - 1749, 0, 0, 1746, 1738, 1759, 1749, 1750, 0, 1737, - 1748, 1739, 1743, 0, 1740, 1740, 1741, 1742, 1741, 1745, - 1743, 1751, 1750, 1746, 1747, 1747, 1745, 1749, 1748, 1752, - 1753, 1753, 1759, 1754, 1750, 1757, 1751, 1748, 1755, 1758, - - 1760, 1763, 1757, 1761, 1752, 1754, 1764, 1762, 1751, 1760, - 1761, 1755, 1768, 1764, 1758, 1766, 1752, 1753, 1767, 1755, - 1754, 1768, 1757, 1763, 1769, 1755, 1758, 1760, 1763, 1770, - 1761, 1762, 1772, 1764, 1762, 1774, 1775, 1766, 1755, 1768, - 1776, 1777, 1766, 1767, 1774, 1767, 1769, 1780, 1781, 1770, - 1772, 1769, 1778, 1782, 1775, 1776, 1770, 1783, 1783, 1772, - 1778, 1781, 1774, 1775, 1784, 1785, 1777, 1776, 1777, 1788, - 1789, 1786, 1780, 1787, 1780, 1781, 1790, 1789, 1788, 1778, - 1782, 0, 1791, 1793, 1783, 1792, 1784, 1797, 1796, 0, - 1785, 1784, 1785, 1786, 1798, 1787, 1788, 1789, 1786, 1792, - - 1787, 1796, 1793, 1795, 1791, 1799, 1800, 1801, 1790, 1791, - 1793, 1795, 1792, 1800, 1797, 1796, 1802, 1799, 1804, 1803, - 1798, 1798, 1805, 0, 1807, 1806, 1804, 0, 1808, 1809, - 1795, 1813, 1799, 1800, 1811, 1812, 1813, 1804, 1802, 1801, - 1806, 1812, 1824, 1802, 1803, 1804, 1803, 1809, 0, 1805, - 1807, 1807, 1806, 1804, 1808, 1808, 1809, 1810, 1814, 1811, - 1810, 1811, 1812, 1813, 1815, 1817, 1818, 1819, 1821, 1824, - 1822, 0, 1823, 1828, 1825, 1810, 1814, 1822, 0, 1815, - 1817, 0, 1821, 1825, 1810, 1814, 1828, 1810, 1818, 1819, - 1823, 1815, 1817, 1818, 1819, 1821, 1826, 1822, 1827, 1823, - - 1828, 1825, 1829, 1831, 1832, 1826, 1833, 0, 1836, 1827, - 1834, 0, 1835, 1833, 1829, 1839, 1842, 1841, 1831, 1832, - 1842, 1847, 1845, 1826, 1845, 1827, 1836, 1846, 1839, 1829, - 1831, 1832, 1834, 1833, 1835, 1836, 1839, 1834, 1841, 1835, - 1843, 1844, 1839, 1842, 1841, 1846, 1848, 1849, 1847, 1845, - 1844, 1850, 1843, 1851, 1846, 1839, 1853, 1852, 1854, 1850, - 1855, 1856, 1857, 1854, 1848, 1869, 0, 1843, 1844, 1858, - 1853, 1862, 1865, 1848, 1849, 1859, 1851, 0, 1850, 1852, - 1851, 1863, 1859, 1853, 1852, 1864, 1857, 1866, 1858, 1857, - 1854, 1868, 1855, 1856, 1867, 1863, 1858, 1869, 1862, 1865, - - 1868, 1870, 1859, 1864, 1871, 1872, 1863, 1863, 1863, 1867, - 0, 1874, 1864, 1866, 1866, 1873, 0, 1876, 1868, 1877, - 0, 1867, 1863, 1870, 1878, 1880, 1877, 1880, 1870, 0, - 1871, 1871, 1872, 1863, 1881, 1882, 1883, 1873, 1884, 1882, - 1876, 1885, 1873, 1874, 1876, 1887, 1877, 1878, 1883, 1890, - 1885, 1878, 1880, 1886, 1888, 1889, 1881, 1891, 1891, 1892, - 1884, 1881, 1882, 1883, 1886, 1884, 1894, 1889, 1885, 1895, - 1893, 1890, 1887, 1897, 1892, 0, 1890, 1888, 1893, 1899, - 1886, 1888, 1889, 1895, 1891, 1896, 1892, 1900, 1894, 1903, - 1910, 1901, 1903, 1894, 1896, 1900, 1895, 1893, 1899, 1901, - - 1897, 1902, 1904, 1905, 1906, 1902, 1899, 1907, 1909, 1905, - 1904, 1912, 1896, 1907, 1900, 1911, 1903, 1910, 1901, 1906, - 1909, 1915, 1916, 1913, 1917, 1912, 1914, 1919, 1902, 1904, - 1905, 1906, 1918, 1922, 1907, 1909, 1913, 1920, 1912, 1911, - 1914, 1919, 1911, 1921, 1918, 1923, 1921, 1915, 1915, 1916, - 1913, 1917, 1925, 1914, 1919, 1926, 1928, 1929, 1927, 1918, - 1922, 1921, 1926, 1920, 1920, 1927, 1930, 1923, 1931, 1932, - 1921, 1928, 1923, 1921, 1925, 1934, 1931, 1933, 1935, 1925, - 1937, 1936, 1926, 1928, 1929, 1927, 1933, 1938, 1939, 1944, - 1935, 1940, 1942, 1930, 1945, 1931, 1932, 1941, 1946, 1947, - - 1942, 1939, 1934, 1936, 1933, 1935, 1946, 1937, 1936, 1940, - 1941, 1944, 1949, 1948, 1938, 1939, 1944, 1950, 1940, 1942, - 1951, 1945, 1948, 1952, 1941, 1946, 1947, 1956, 1953, 1955, - 1954, 1958, 1962, 1949, 0, 1951, 1953, 1955, 1958, 1949, - 1948, 1950, 1954, 1961, 1950, 1959, 1951, 1951, 1960, 1959, - 1952, 1964, 1965, 1963, 1956, 1953, 1955, 1954, 1958, 1962, - 1960, 1963, 1951, 1964, 1965, 1967, 1961, 1968, 1969, 1970, - 1961, 1972, 1959, 1973, 1968, 1960, 1971, 1971, 1964, 1965, - 1963, 1974, 1970, 1975, 1977, 1978, 0, 1979, 1969, 1989, - 1975, 1973, 1967, 0, 1968, 1969, 1970, 1972, 1972, 1977, - - 1973, 1981, 1980, 1971, 1980, 1983, 1974, 1978, 1974, 1979, - 1975, 1977, 1978, 1982, 1979, 1981, 1984, 1984, 1988, 1982, - 1986, 1989, 1987, 1991, 1992, 1990, 1993, 1983, 1981, 1980, - 1988, 1990, 1983, 1994, 1996, 1994, 1995, 2002, 1997, 1998, - 1982, 1999, 1986, 1984, 1987, 1988, 1992, 1986, 1993, 1987, - 1995, 1992, 1990, 1993, 2000, 1991, 1997, 1998, 1996, 1999, - 1994, 1996, 2001, 1995, 2003, 1997, 1998, 2004, 1999, 2002, - 2006, 2016, 2000, 2008, 2010, 2001, 2009, 2006, 2011, 0, - 2012, 2000, 2012, 2018, 2014, 0, 2011, 2012, 2015, 2001, - 2004, 2008, 2029, 0, 2004, 2014, 2003, 2006, 2016, 2015, - - 2008, 2018, 2009, 2009, 2011, 2011, 2010, 2012, 2017, 2012, - 2018, 2014, 2020, 2011, 2021, 2015, 2022, 2023, 2025, 2029, - 2017, 2028, 2027, 2032, 2026, 2021, 2030, 2020, 2022, 2027, - 2033, 2035, 2023, 2034, 2036, 2017, 2028, 2037, 0, 2020, - 0, 2021, 2025, 2022, 2023, 2025, 2026, 2039, 2028, 2027, - 2032, 2026, 2030, 2030, 2033, 2034, 2038, 2033, 2041, 2042, - 2034, 2040, 2047, 2035, 2037, 2043, 2036, 2042, 2048, 2038, - 2045, 2041, 2046, 2039, 2039, 2050, 2040, 2051, 2052, 0, - 2049, 2055, 2050, 2038, 0, 2041, 2042, 2053, 2040, 2047, - 2048, 2043, 2043, 2045, 2059, 2048, 2046, 2045, 2049, 2046, - - 2051, 2053, 2050, 2055, 2051, 2052, 2056, 2049, 2055, 2057, - 2058, 2060, 2061, 2056, 2053, 2062, 2057, 2059, 2060, 2063, - 2068, 2059, 2064, 2058, 2066, 0, 2067, 0, 0, 2070, - 2073, 2064, 2074, 2056, 2061, 2066, 2057, 2058, 2060, 2061, - 2063, 2069, 2075, 2073, 2076, 2076, 2063, 2062, 2067, 2064, - 2077, 2066, 2068, 2067, 2070, 2079, 2070, 2073, 2074, 2074, - 2069, 2080, 2082, 2083, 2081, 2086, 2075, 2090, 2069, 2075, - 0, 2076, 2098, 2091, 2088, 2094, 2077, 2077, 2079, 2081, - 2090, 2083, 2079, 2088, 2091, 2095, 2095, 2096, 2097, 2082, - 2083, 2081, 2086, 2080, 2090, 2100, 2102, 2094, 2103, 2098, - - 2091, 2088, 2094, 2105, 2106, 2104, 2109, 2110, 2105, 2096, - 2097, 2108, 2095, 2113, 2096, 2097, 2104, 2112, 0, 2108, - 2114, 2109, 2100, 2117, 2103, 2103, 2106, 2115, 2102, 2114, - 2105, 2106, 2104, 2109, 2110, 2112, 2121, 2119, 2108, 2115, - 2118, 2122, 2126, 2123, 2112, 2113, 2119, 2114, 2118, 2124, - 2117, 2128, 2125, 2127, 2115, 2126, 2130, 2131, 2128, 2129, - 2132, 2133, 2121, 2121, 2119, 2123, 2127, 2118, 2122, 2126, - 2123, 2124, 2136, 2135, 2134, 0, 2124, 2125, 2128, 2125, - 2127, 2129, 2135, 2130, 2131, 2137, 2129, 2132, 2133, 2134, - 2138, 2139, 2140, 2142, 2136, 2141, 2143, 2144, 2145, 2136, - - 2135, 2134, 2141, 2146, 2142, 2144, 2139, 2140, 2151, 2149, - 2147, 2137, 2137, 2148, 2155, 2151, 2138, 2138, 2139, 2140, - 2142, 2152, 2141, 2143, 2144, 2145, 2147, 2150, 2148, 2149, - 2146, 2153, 2154, 2156, 0, 2151, 2149, 2147, 2153, 2154, - 2148, 2155, 2150, 2152, 2157, 2157, 2158, 2159, 2152, 2160, - 2161, 2156, 2160, 2158, 2150, 2162, 2164, 2163, 2153, 2154, - 2156, 2159, 2168, 2161, 2170, 2169, 2165, 2168, 2164, 2169, - 2167, 2157, 2171, 2158, 2159, 2163, 2160, 2161, 2165, 2167, - 2172, 2162, 2162, 2164, 2163, 2171, 2173, 2174, 2170, 2168, - 2175, 2170, 2169, 2165, 2176, 0, 2178, 2167, 2180, 2171, - - 2181, 2186, 2172, 2182, 2183, 0, 0, 2172, 2173, 2181, - 2186, 2185, 2183, 2173, 2174, 2211, 2194, 2175, 2185, 2182, - 2176, 2176, 2178, 2178, 2180, 2180, 2188, 2181, 2186, 2187, - 2182, 2183, 2189, 2188, 2187, 2190, 2191, 2196, 2185, 2192, - 2197, 2195, 2190, 2194, 2200, 2191, 2195, 2211, 2201, 2202, - 2189, 2199, 2203, 2188, 0, 2196, 2187, 2201, 2202, 2189, - 2209, 2204, 2190, 2191, 2196, 2192, 2192, 2197, 2195, 2199, - 2207, 2200, 2203, 2204, 2205, 2201, 2202, 2206, 2199, 2203, - 2210, 2207, 2208, 2205, 2212, 2219, 2206, 2209, 2204, 0, - 2208, 2213, 2214, 2212, 2215, 2216, 2220, 2207, 2217, 2221, - - 2214, 2205, 2216, 2213, 2206, 2217, 2218, 2210, 2222, 2208, - 2219, 2212, 2219, 2226, 2230, 0, 2215, 2228, 2213, 2214, - 2229, 2215, 2216, 2220, 2221, 2217, 2221, 2229, 2218, 2224, - 2227, 2226, 2228, 2218, 2232, 2222, 2230, 2224, 2227, 2231, - 2226, 2230, 2232, 2235, 2228, 2236, 2231, 2229, 2237, 2239, - 2235, 2238, 2240, 2243, 2241, 0, 2224, 2227, 2239, 2244, - 2245, 2232, 2250, 2238, 2253, 2243, 2231, 2248, 2255, 2236, - 2235, 2246, 2236, 2252, 2248, 2237, 2239, 2241, 2238, 2240, - 2243, 2241, 2244, 2249, 2254, 2246, 2244, 2245, 2252, 2250, - 2249, 2253, 2254, 2256, 2248, 2255, 2258, 2257, 2246, 2263, - - 2252, 2264, 2265, 2266, 2267, 0, 2264, 2270, 2273, 2268, - 2249, 2254, 2257, 0, 2269, 2256, 2276, 2266, 2267, 0, - 2256, 2271, 2277, 2258, 2257, 2263, 2263, 2268, 2264, 2265, - 2266, 2267, 2269, 2271, 2270, 2273, 2268, 2278, 2276, 2279, - 2280, 2269, 2282, 2276, 2277, 2281, 2283, 0, 2271, 2277, - 2278, 2285, 2286, 2281, 2287, 2289, 2288, 2290, 2292, 2280, - 2282, 2279, 2293, 2285, 2278, 2283, 2279, 2280, 2288, 2282, - 2291, 2293, 2281, 2283, 2286, 2295, 2287, 2294, 2285, 2286, - 2292, 2287, 2289, 2288, 2290, 2292, 2294, 2296, 2298, 2293, - 2291, 2297, 2300, 2301, 2299, 2305, 2304, 2291, 2307, 2310, - - 2298, 2306, 2308, 2307, 2294, 2309, 0, 2295, 0, 2296, - 2304, 2311, 0, 2312, 2296, 2298, 2299, 2297, 2297, 2300, - 2301, 2299, 2305, 2304, 2308, 2306, 2313, 2309, 2306, 2308, - 2307, 2310, 2309, 2314, 2311, 2312, 2315, 2316, 2311, 2317, - 2312, 2322, 0, 2319, 2313, 2314, 0, 2320, 2326, 0, - 2324, 2325, 0, 2313, 2317, 2315, 2322, 2326, 0, 2316, - 2314, 2328, 2327, 2315, 2316, 2319, 2317, 2329, 2322, 2330, - 2319, 2320, 2324, 2325, 2320, 2326, 2327, 2324, 2325, 2328, - 2331, 2337, 2334, 2341, 2335, 2329, 2339, 2340, 2328, 2327, - 2334, 2335, 2336, 2338, 2329, 2330, 2330, 2342, 2331, 2340, - - 2336, 2338, 2347, 2344, 2339, 2342, 2348, 2331, 2337, 2334, - 2341, 2335, 2350, 2339, 2340, 2344, 2346, 2351, 2352, 2336, - 2338, 2353, 0, 2346, 2342, 2347, 2349, 2354, 2349, 2347, - 2344, 2358, 0, 2348, 2355, 2362, 2360, 2357, 2361, 0, - 2364, 2365, 2366, 2346, 2350, 2358, 2354, 2362, 2353, 2351, - 2352, 2361, 2368, 2349, 2354, 2357, 2355, 2370, 2358, 2360, - 2376, 2355, 2362, 2360, 2357, 2361, 2364, 2364, 2365, 2366, - 2372, 2373, 2378, 2375, 2379, 0, 2373, 2372, 2380, 2368, - 2375, 2381, 2383, 2385, 2370, 2386, 2376, 2376, 2387, 2388, - 2385, 2383, 2389, 2390, 2394, 2381, 2395, 2372, 2393, 2378, - - 2375, 2379, 2380, 2373, 2389, 2380, 2396, 2391, 2381, 2383, - 2385, 2393, 2386, 2392, 2387, 2387, 2388, 2404, 2403, 2389, - 2390, 2391, 2392, 2395, 2400, 2393, 2394, 2399, 2400, 2396, - 2401, 2402, 2399, 2396, 2391, 2407, 2412, 2401, 2402, 2403, - 2392, 2405, 2406, 2405, 2410, 2403, 2413, 2419, 2415, 2404, - 2415, 2400, 2416, 2420, 2421, 2412, 2419, 2401, 2402, 2399, - 2420, 2418, 2407, 2412, 2422, 2406, 2410, 2421, 2405, 2406, - 2413, 2410, 2427, 2413, 2419, 2415, 2416, 2417, 2417, 2416, - 2420, 2421, 2423, 2418, 2424, 2426, 2432, 2417, 2418, 2425, - 2423, 2422, 2428, 2426, 2425, 0, 2429, 2432, 2430, 2427, - - 2431, 0, 2436, 2424, 2417, 2417, 2433, 2434, 2440, 2423, - 2437, 2424, 2426, 2432, 2434, 2435, 2435, 2437, 2428, 2428, - 2436, 2425, 2429, 2429, 2430, 2430, 2431, 2431, 2433, 2436, - 2441, 2438, 2442, 2433, 2434, 2440, 2444, 2437, 2438, 2446, - 2445, 2442, 2435, 2447, 2449, 2455, 2450, 2454, 0, 2458, - 2451, 2452, 2456, 0, 2441, 0, 2454, 2441, 2438, 2442, - 2445, 2458, 2457, 2444, 2450, 2447, 2446, 2445, 2451, 2452, - 2447, 2449, 2455, 2450, 2454, 2456, 2458, 2451, 2452, 2456, - 2457, 2459, 2460, 2461, 2466, 2467, 2459, 2469, 2470, 2457, - 2473, 2476, 2473, 2475, 2467, 0, 2460, 0, 2474, 2482, - - 2475, 2461, 2480, 2470, 2478, 2469, 2483, 2490, 2480, 2460, - 2461, 2466, 2467, 2459, 2469, 2470, 2474, 2473, 2484, 2478, - 2475, 2482, 2485, 2476, 2487, 2474, 2482, 2488, 2483, 2480, - 2488, 2478, 2491, 2483, 2490, 2492, 2494, 2493, 2496, 2495, - 2485, 2498, 2501, 2494, 2484, 2484, 2487, 2495, 2499, 2485, - 2500, 2487, 2502, 2488, 2488, 2493, 2504, 2488, 2505, 2491, - 2496, 2502, 2492, 2494, 2493, 2496, 2495, 2505, 2503, 2501, - 2499, 2506, 2500, 2498, 2503, 2499, 0, 2500, 2504, 2502, - 2507, 2508, 2507, 2504, 2510, 2505, 2511, 2512, 2514, 2518, - 2516, 2517, 2510, 2525, 2512, 2503, 2524, 2524, 2511, 2520, - - 2523, 2519, 0, 2506, 2516, 2517, 2522, 2507, 2508, 2528, - 2520, 2510, 2518, 2511, 2512, 2514, 2518, 2516, 2517, 2519, - 2525, 2521, 2523, 2524, 2526, 2522, 2520, 2523, 2519, 2521, - 2529, 2531, 2526, 2522, 2533, 2535, 2528, 2531, 2536, 2537, - 2540, 2538, 2546, 2542, 2550, 2541, 2535, 2542, 2521, 2536, - 2537, 2526, 2541, 2545, 2548, 2546, 2543, 2529, 2531, 2551, - 2557, 2533, 2535, 2538, 2543, 2536, 2537, 2540, 2538, 2546, - 2542, 2550, 2541, 2549, 2553, 2552, 2548, 2555, 2549, 2545, - 2545, 2548, 2552, 2543, 2556, 2561, 2551, 2554, 2558, 2562, - 2559, 2556, 2557, 2553, 2567, 2555, 2558, 2563, 2569, 2560, - - 2549, 2553, 2552, 2554, 2555, 2559, 2560, 2570, 2571, 2567, - 2572, 2556, 2561, 2562, 2554, 2558, 2562, 2559, 2568, 2573, - 2553, 2567, 2575, 2563, 2563, 2568, 2560, 2578, 2573, 2576, - 2569, 2577, 2571, 2580, 2570, 2571, 2582, 2579, 2579, 2577, - 2583, 2586, 2572, 2584, 2575, 2568, 2573, 2579, 2583, 2575, - 2587, 2576, 2588, 2589, 2590, 2591, 2576, 2592, 2577, 2578, - 2580, 2584, 2593, 2582, 2579, 2579, 2589, 2583, 2586, 2594, - 2584, 2596, 2606, 2601, 2588, 2599, 2590, 2587, 2601, 2588, - 2589, 2590, 2591, 2599, 2592, 2602, 2620, 2603, 2607, 2593, - 2602, 2594, 2603, 2604, 2610, 2609, 2594, 2608, 2596, 2606, - - 2601, 2607, 2599, 2611, 2608, 2612, 2615, 2617, 0, 2618, - 2619, 2611, 2602, 2609, 2603, 2607, 2622, 2623, 2620, 2604, - 2604, 2610, 2609, 2619, 2608, 2621, 2624, 2612, 2628, 0, - 2611, 2618, 2612, 2615, 2617, 2622, 2618, 2619, 2626, 2627, - 2621, 2629, 2630, 2622, 2623, 2626, 2627, 2634, 2624, 2633, - 2628, 2632, 2621, 2624, 2634, 2628, 2629, 2633, 2639, 2647, - 2635, 2637, 2636, 2630, 2639, 2626, 2627, 2635, 2629, 2630, - 2632, 2636, 2637, 2640, 2634, 2643, 2633, 2644, 2632, 2648, - 2638, 2638, 2643, 2653, 2655, 2639, 2647, 2635, 2637, 2636, - 2638, 2644, 2649, 2656, 2656, 2640, 2657, 2657, 2658, 2658, - - 2640, 2659, 2643, 2661, 2644, 2662, 2648, 2638, 2638, 2665, - 2653, 2655, 2666, 2663, 2662, 2649, 2669, 2670, 2669, 2649, - 2672, 2673, 2656, 2671, 2659, 2657, 2663, 2658, 2659, 2677, - 2661, 2665, 2662, 2673, 2676, 2678, 2665, 2670, 2672, 2666, - 2663, 2679, 2675, 2669, 2670, 2680, 2671, 2672, 2673, 2681, - 2671, 2675, 2676, 2683, 2684, 2677, 2677, 2680, 2683, 0, - 2682, 2676, 2678, 2682, 2685, 2686, 2685, 2687, 2679, 2675, - 0, 2681, 2680, 2687, 2688, 2689, 2681, 2686, 2682, 2691, - 2690, 2692, 2695, 2698, 2699, 2683, 2684, 2682, 2690, 2700, - 2682, 2685, 2686, 2701, 2687, 2702, 2688, 2689, 2703, 2704, - - 2706, 2688, 2689, 2692, 2707, 2708, 2691, 2690, 2692, 2695, - 2698, 2699, 2708, 2710, 2711, 2714, 2700, 2712, 2706, 2713, - 2701, 2710, 2702, 2715, 2716, 2703, 2704, 2706, 2717, 2712, - 2714, 2707, 2708, 2713, 2720, 2721, 2716, 2722, 2722, 2723, - 2710, 2711, 2714, 2720, 2712, 2724, 2713, 2726, 2727, 2715, - 2715, 2716, 0, 0, 2724, 2717, 2728, 2729, 2731, 2721, - 2730, 2720, 2721, 2734, 2722, 2723, 2723, 2731, 2730, 2728, - 2732, 2726, 2724, 0, 2726, 2734, 2743, 2745, 2746, 2729, - 2727, 2732, 2748, 2728, 2729, 2731, 2748, 2730, 2749, 2750, - 2734, 2751, 2754, 0, 2752, 2755, 2754, 2732, 2751, 2757, - - 2743, 2756, 2758, 2743, 2745, 2746, 2749, 2752, 2759, 2748, - 0, 2755, 2750, 2760, 2758, 2749, 2750, 2761, 2751, 2754, - 2763, 2752, 2755, 2756, 2757, 2761, 2757, 2760, 2756, 2758, - 2762, 2763, 2772, 2765, 2759, 2759, 2764, 2766, 2764, 2762, - 2760, 2767, 2770, 2766, 2761, 2765, 2771, 2763, 2767, 2773, - 2774, 0, 2775, 2771, 2776, 2770, 2777, 2762, 2778, 2772, - 2765, 0, 2780, 2764, 2766, 2779, 2778, 2773, 2767, 2770, - 2788, 2781, 2779, 2771, 2782, 2784, 2773, 2774, 2775, 2775, - 2783, 2776, 2783, 2777, 2785, 2778, 2780, 2784, 2787, 2780, - 2786, 2789, 2779, 2781, 2790, 2787, 2782, 2788, 2781, 2789, - - 2792, 2782, 2784, 2786, 2794, 2797, 2799, 2783, 2798, 2801, - 2802, 2800, 2792, 2794, 0, 2787, 2785, 2786, 2789, 2800, - 2805, 2790, 2806, 2803, 2814, 2799, 2804, 2792, 2805, 2816, - 2808, 2794, 2797, 2799, 2798, 2798, 2803, 2808, 2800, 2810, - 2804, 2801, 2802, 2816, 2811, 2817, 2814, 2805, 2813, 2806, - 2803, 2814, 2810, 2804, 2815, 2813, 2816, 2808, 2819, 2817, - 2818, 2820, 2815, 2824, 2822, 0, 2810, 2811, 2818, 2823, - 2825, 2811, 2817, 2822, 2826, 2813, 2827, 2823, 2828, 2832, - 2819, 2815, 2829, 2820, 0, 2819, 2830, 2818, 2820, 0, - 2824, 2822, 2825, 2831, 2833, 2834, 2823, 2825, 0, 2838, - - 2828, 2831, 2827, 2827, 2829, 2828, 2826, 2836, 2830, 2829, - 2837, 2832, 2844, 2830, 2841, 2839, 2833, 2840, 2837, 2838, - 2831, 2833, 2834, 2839, 2842, 2840, 2838, 2843, 2846, 0, - 2836, 0, 2842, 2851, 2836, 2848, 0, 2837, 2844, 2844, - 2847, 2843, 2839, 2847, 2840, 2849, 2841, 2851, 2850, 0, - 2852, 2842, 2853, 2849, 2843, 2846, 2850, 2848, 2847, 2854, - 2851, 2857, 2848, 2856, 2856, 2859, 0, 2847, 2860, 0, - 2847, 2861, 2849, 2854, 2853, 2850, 2852, 2852, 2864, 2853, - 2862, 2858, 2867, 0, 2865, 2866, 2854, 2857, 2857, 2858, - 2856, 2859, 2859, 2861, 2860, 2860, 2863, 2868, 2861, 2869, - - 2862, 2874, 2883, 2871, 2863, 2864, 2865, 2862, 2858, 2867, - 2866, 2865, 2866, 2870, 2872, 2877, 2878, 2868, 0, 2869, - 2881, 2870, 2872, 2863, 2868, 2871, 2869, 2875, 2874, 2883, - 2871, 2879, 0, 2886, 2887, 2875, 2880, 2877, 2878, 2879, - 2870, 2872, 2877, 2878, 2880, 2884, 2881, 2881, 2885, 2888, - 2890, 2891, 2894, 2884, 2875, 0, 2885, 2898, 2879, 2886, - 2886, 2887, 2892, 2880, 2897, 2898, 2900, 2901, 0, 2888, - 0, 0, 2884, 2899, 2894, 2885, 2888, 2890, 2891, 2894, - 0, 2899, 2892, 0, 2898, 0, 2897, 0, 0, 2892, - 0, 2897, 0, 2900, 2901, 0, 0, 0, 0, 0, - - 2899, 2905, 2905, 2905, 2905, 2905, 2905, 2905, 2906, 2906, - 2906, 2906, 2906, 2906, 2906, 2907, 2907, 2907, 2907, 2907, - 2907, 2907, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2909, - 2909, 2909, 2909, 2909, 2909, 2909, 2911, 2911, 0, 2911, - 2911, 2911, 2911, 2912, 2912, 0, 0, 0, 2912, 2912, - 2913, 2913, 0, 0, 2913, 0, 2913, 2914, 0, 0, - 0, 0, 0, 2914, 2915, 2915, 0, 0, 0, 2915, - 2915, 2916, 0, 0, 0, 0, 0, 2916, 2917, 2917, - 0, 2917, 2917, 2917, 2917, 2918, 2918, 0, 2918, 2918, - 2918, 2918, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, - - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, - 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904, 2904 + 295, 288, 289, 289, 291, 298, 294, 297, 299, 294, + 292, 291, 290, 299, 291, 295, 305, 320, 303, 0, + 301, 305, 292, 298, 302, 297, 1083, 295, 300, 306, + 300, 291, 296, 303, 297, 296, 304, 304, 302, 0, + 296, 296, 296, 296, 301, 303, 300, 301, 305, 320, + + 296, 302, 300, 306, 1083, 300, 306, 300, 309, 296, + 308, 304, 296, 304, 304, 310, 312, 296, 296, 296, + 296, 307, 308, 300, 307, 315, 309, 313, 314, 316, + 323, 307, 318, 310, 319, 309, 322, 308, 312, 318, + 314, 317, 310, 312, 316, 324, 319, 315, 307, 317, + 321, 307, 315, 313, 313, 314, 316, 321, 322, 318, + 325, 319, 323, 322, 330, 327, 325, 324, 317, 331, + 328, 326, 324, 326, 0, 0, 0, 321, 327, 0, + 332, 329, 325, 328, 0, 0, 328, 325, 328, 0, + 330, 330, 327, 325, 328, 326, 335, 328, 326, 329, + + 326, 331, 332, 335, 339, 336, 333, 332, 329, 337, + 328, 336, 333, 328, 338, 328, 333, 339, 341, 345, + 355, 337, 342, 335, 333, 0, 338, 355, 344, 347, + 333, 339, 336, 333, 341, 342, 337, 345, 348, 333, + 344, 338, 341, 333, 348, 341, 345, 355, 346, 342, + 347, 333, 334, 346, 334, 344, 347, 350, 349, 351, + 352, 341, 356, 353, 357, 348, 349, 334, 352, 350, + 334, 0, 334, 357, 334, 356, 846, 351, 334, 334, + 346, 334, 354, 354, 350, 349, 351, 352, 0, 356, + 364, 359, 0, 361, 334, 353, 357, 334, 359, 334, + + 357, 334, 343, 343, 358, 361, 360, 846, 358, 354, + 362, 363, 343, 360, 343, 343, 343, 366, 359, 343, + 361, 365, 364, 363, 366, 367, 369, 343, 372, 343, + 343, 358, 362, 360, 371, 0, 368, 362, 363, 343, + 367, 343, 343, 343, 366, 371, 343, 365, 365, 368, + 372, 370, 367, 370, 375, 372, 373, 373, 369, 374, + 376, 371, 377, 368, 383, 375, 374, 379, 0, 380, + 378, 376, 381, 0, 382, 377, 383, 0, 370, 0, + 389, 375, 382, 0, 380, 373, 374, 376, 378, 377, + 379, 383, 380, 384, 379, 378, 380, 378, 381, 381, + + 385, 382, 389, 386, 384, 388, 387, 389, 390, 385, + 391, 380, 393, 392, 396, 378, 386, 387, 393, 387, + 384, 394, 0, 388, 387, 398, 395, 385, 391, 399, + 386, 390, 388, 387, 404, 390, 396, 391, 401, 393, + 397, 396, 394, 399, 387, 392, 387, 397, 394, 395, + 402, 398, 398, 395, 403, 405, 399, 406, 0, 411, + 401, 408, 407, 409, 402, 401, 404, 397, 407, 406, + 0, 410, 415, 0, 411, 418, 0, 402, 405, 410, + 403, 403, 405, 408, 406, 409, 411, 412, 408, 407, + 409, 413, 414, 416, 412, 417, 415, 410, 410, 415, + + 413, 418, 418, 419, 422, 420, 410, 414, 421, 422, + 417, 420, 424, 429, 412, 425, 416, 426, 413, 414, + 416, 425, 417, 427, 433, 419, 428, 434, 429, 436, + 419, 422, 420, 428, 421, 421, 426, 433, 424, 424, + 429, 427, 425, 431, 426, 431, 435, 432, 440, 437, + 427, 433, 431, 428, 432, 438, 444, 442, 441, 434, + 439, 436, 0, 439, 435, 441, 443, 0, 438, 444, + 431, 437, 431, 435, 432, 445, 437, 448, 0, 439, + 440, 442, 438, 444, 442, 441, 446, 439, 447, 443, + 439, 446, 449, 450, 447, 451, 452, 445, 443, 456, + + 448, 453, 445, 459, 448, 450, 456, 452, 458, 453, + 454, 459, 499, 446, 449, 447, 443, 451, 0, 449, + 450, 457, 451, 452, 454, 460, 456, 461, 453, 0, + 459, 458, 0, 457, 463, 458, 460, 454, 455, 499, + 462, 466, 0, 455, 462, 455, 463, 464, 457, 465, + 461, 455, 460, 455, 461, 468, 455, 455, 0, 466, + 465, 463, 462, 455, 455, 455, 468, 462, 466, 464, + 455, 462, 455, 469, 464, 467, 465, 470, 455, 471, + 455, 470, 468, 455, 455, 467, 471, 472, 476, 473, + 455, 473, 474, 475, 478, 0, 477, 469, 0, 483, + + 469, 488, 478, 476, 470, 475, 471, 467, 477, 480, + 481, 483, 467, 472, 472, 476, 473, 479, 474, 474, + 475, 478, 479, 477, 482, 484, 483, 486, 481, 490, + 487, 480, 482, 488, 489, 491, 480, 481, 493, 494, + 495, 490, 492, 491, 479, 486, 484, 504, 494, 489, + 493, 482, 484, 487, 486, 492, 490, 487, 496, 497, + 498, 489, 491, 495, 500, 493, 494, 495, 501, 492, + 502, 504, 496, 503, 504, 0, 505, 507, 506, 498, + 510, 515, 508, 501, 497, 496, 497, 498, 503, 505, + 506, 510, 511, 513, 514, 501, 500, 511, 512, 507, + + 503, 509, 502, 505, 507, 506, 508, 510, 509, 508, + 516, 509, 512, 515, 517, 518, 519, 521, 520, 509, + 513, 514, 519, 522, 511, 512, 529, 523, 509, 524, + 525, 522, 526, 534, 0, 509, 526, 516, 509, 521, + 527, 517, 520, 519, 521, 520, 523, 518, 527, 528, + 522, 530, 525, 524, 523, 531, 524, 525, 529, 526, + 536, 532, 533, 535, 531, 534, 539, 527, 538, 533, + 537, 540, 528, 536, 530, 537, 528, 538, 530, 537, + 540, 541, 531, 532, 546, 535, 0, 536, 532, 533, + 535, 542, 539, 539, 537, 538, 543, 537, 540, 544, + + 548, 547, 537, 541, 553, 0, 537, 549, 541, 543, + 550, 544, 551, 542, 0, 553, 546, 0, 542, 547, + 552, 555, 559, 543, 548, 0, 544, 548, 547, 549, + 549, 553, 550, 557, 549, 554, 551, 550, 556, 551, + 560, 555, 552, 558, 554, 561, 562, 552, 555, 559, + 558, 563, 556, 561, 566, 557, 549, 562, 560, 564, + 557, 565, 554, 567, 569, 556, 0, 560, 573, 563, + 558, 571, 561, 562, 564, 566, 568, 568, 563, 570, + 571, 566, 572, 575, 576, 574, 564, 567, 569, 578, + 567, 569, 577, 565, 578, 572, 579, 582, 571, 580, + + 573, 570, 587, 585, 584, 568, 570, 574, 576, 572, + 579, 576, 574, 580, 577, 575, 581, 581, 586, 577, + 583, 578, 584, 579, 581, 585, 580, 589, 583, 582, + 585, 584, 590, 586, 587, 588, 592, 590, 592, 591, + 594, 0, 586, 581, 581, 586, 593, 583, 594, 589, + 588, 595, 596, 601, 589, 0, 603, 602, 0, 597, + 586, 596, 588, 592, 590, 591, 591, 594, 597, 599, + 0, 593, 598, 593, 603, 600, 595, 599, 595, 596, + 602, 598, 600, 603, 602, 601, 597, 607, 604, 605, + 608, 610, 609, 611, 606, 607, 599, 612, 616, 598, + + 604, 605, 600, 606, 609, 608, 611, 616, 615, 0, + 613, 0, 612, 621, 607, 604, 605, 608, 613, 609, + 611, 606, 614, 610, 612, 616, 621, 617, 620, 623, + 614, 615, 618, 619, 619, 615, 620, 613, 617, 622, + 621, 618, 619, 624, 626, 627, 625, 628, 0, 614, + 630, 624, 623, 632, 617, 620, 623, 626, 628, 618, + 619, 619, 625, 631, 630, 622, 622, 627, 629, 633, + 624, 626, 627, 625, 628, 632, 629, 630, 634, 635, + 632, 638, 636, 631, 637, 639, 650, 641, 0, 633, + 631, 636, 640, 642, 643, 629, 633, 0, 639, 638, + + 634, 635, 641, 644, 637, 634, 635, 646, 638, 636, + 640, 637, 639, 650, 641, 642, 645, 652, 643, 640, + 642, 643, 649, 647, 648, 646, 644, 653, 649, 645, + 644, 651, 655, 656, 646, 647, 660, 648, 660, 651, + 655, 657, 0, 645, 652, 653, 658, 659, 657, 649, + 647, 648, 661, 662, 653, 665, 663, 651, 651, 655, + 664, 661, 659, 660, 665, 656, 651, 677, 657, 658, + 666, 667, 666, 658, 659, 663, 0, 670, 667, 661, + 664, 673, 665, 663, 676, 662, 0, 664, 677, 670, + 678, 673, 679, 682, 677, 0, 680, 666, 667, 668, + + 0, 678, 676, 668, 670, 681, 668, 685, 673, 682, + 686, 676, 684, 668, 685, 679, 668, 678, 683, 679, + 682, 668, 680, 680, 692, 684, 668, 683, 688, 689, + 668, 681, 681, 668, 685, 689, 0, 0, 693, 684, + 668, 694, 686, 668, 690, 683, 687, 687, 692, 687, + 688, 692, 687, 690, 695, 688, 689, 687, 691, 699, + 691, 694, 697, 687, 687, 693, 696, 0, 694, 701, + 698, 690, 687, 687, 687, 0, 687, 700, 696, 687, + 695, 695, 704, 699, 687, 691, 699, 702, 697, 697, + 687, 687, 698, 696, 701, 703, 701, 698, 706, 700, + + 705, 707, 702, 703, 700, 704, 706, 705, 708, 704, + 711, 709, 712, 710, 702, 713, 715, 717, 0, 714, + 707, 712, 703, 709, 714, 706, 710, 705, 707, 716, + 713, 720, 721, 722, 708, 708, 711, 711, 709, 712, + 710, 723, 713, 724, 717, 718, 714, 725, 715, 726, + 718, 716, 728, 720, 727, 729, 716, 731, 720, 730, + 733, 732, 735, 723, 721, 722, 731, 0, 723, 738, + 726, 725, 736, 727, 725, 724, 726, 718, 730, 728, + 733, 727, 729, 732, 731, 734, 730, 733, 732, 735, + 736, 737, 739, 734, 743, 741, 742, 744, 746, 736, + + 739, 738, 745, 748, 747, 748, 749, 0, 753, 0, + 737, 753, 734, 741, 742, 744, 743, 747, 737, 739, + 746, 743, 741, 742, 744, 746, 745, 750, 751, 745, + 748, 747, 749, 749, 752, 753, 751, 757, 754, 750, + 0, 756, 758, 760, 761, 759, 754, 0, 758, 760, + 762, 761, 752, 763, 750, 751, 764, 762, 763, 767, + 765, 752, 754, 764, 757, 754, 756, 759, 756, 758, + 760, 761, 759, 754, 770, 766, 768, 762, 765, 766, + 763, 769, 767, 764, 772, 768, 767, 765, 773, 769, + 777, 771, 774, 775, 776, 778, 773, 779, 780, 772, + + 0, 0, 766, 768, 779, 774, 770, 776, 769, 771, + 782, 772, 777, 787, 775, 773, 780, 777, 771, 774, + 775, 776, 778, 781, 779, 780, 783, 784, 785, 782, + 781, 786, 784, 783, 788, 789, 785, 782, 786, 790, + 791, 792, 793, 794, 795, 787, 790, 788, 798, 799, + 781, 794, 795, 783, 784, 785, 796, 797, 786, 795, + 803, 788, 800, 797, 805, 793, 790, 789, 801, 793, + 794, 795, 791, 792, 798, 798, 802, 801, 796, 795, + 804, 799, 807, 796, 797, 806, 800, 804, 808, 800, + 802, 805, 803, 809, 806, 801, 810, 0, 811, 814, + + 815, 812, 0, 802, 807, 809, 812, 804, 815, 807, + 813, 817, 806, 826, 817, 808, 818, 813, 823, 810, + 809, 814, 825, 810, 811, 811, 814, 815, 812, 818, + 821, 824, 820, 0, 825, 0, 821, 813, 817, 820, + 826, 0, 828, 818, 823, 823, 0, 0, 827, 825, + 827, 833, 829, 0, 824, 831, 833, 821, 824, 820, + 822, 830, 822, 832, 829, 828, 822, 834, 822, 828, + 843, 844, 0, 822, 830, 827, 832, 831, 822, 829, + 834, 835, 831, 833, 822, 836, 0, 822, 830, 822, + 832, 837, 838, 822, 834, 822, 839, 836, 841, 842, + + 822, 837, 843, 844, 835, 822, 845, 847, 835, 839, + 840, 841, 836, 837, 838, 850, 840, 848, 837, 838, + 842, 849, 848, 839, 850, 841, 842, 0, 837, 849, + 852, 853, 0, 845, 854, 0, 855, 840, 856, 847, + 0, 0, 850, 0, 848, 852, 859, 854, 849, 851, + 857, 855, 858, 853, 851, 862, 851, 852, 853, 859, + 866, 854, 851, 855, 856, 856, 865, 851, 851, 863, + 860, 858, 857, 859, 851, 851, 851, 857, 860, 858, + 861, 851, 862, 851, 866, 867, 868, 866, 861, 851, + 869, 872, 863, 867, 851, 851, 863, 860, 865, 870, + + 868, 851, 871, 874, 875, 873, 876, 861, 877, 872, + 871, 0, 867, 868, 874, 878, 877, 0, 872, 885, + 879, 870, 869, 873, 876, 880, 870, 879, 882, 871, + 874, 883, 873, 876, 881, 877, 875, 878, 880, 884, + 885, 881, 878, 882, 886, 887, 885, 879, 889, 883, + 904, 891, 880, 892, 886, 882, 894, 884, 883, 889, + 892, 881, 893, 895, 891, 897, 884, 896, 0, 894, + 893, 886, 895, 898, 901, 889, 903, 887, 891, 896, + 892, 902, 904, 894, 905, 910, 907, 897, 908, 893, + 895, 0, 897, 908, 896, 898, 901, 907, 905, 902, + + 898, 901, 903, 903, 909, 911, 913, 909, 902, 910, + 912, 905, 910, 907, 914, 913, 916, 912, 911, 917, + 908, 918, 0, 915, 0, 919, 917, 0, 914, 921, + 909, 909, 911, 913, 909, 915, 920, 912, 922, 924, + 925, 914, 920, 923, 926, 931, 917, 928, 916, 919, + 915, 921, 919, 918, 923, 930, 921, 932, 929, 926, + 922, 924, 925, 920, 934, 922, 924, 925, 928, 929, + 923, 926, 933, 934, 928, 0, 930, 931, 935, 0, + 936, 938, 930, 937, 932, 929, 939, 940, 942, 938, + 933, 934, 937, 939, 943, 941, 944, 945, 0, 933, + + 947, 951, 935, 946, 953, 935, 936, 936, 938, 941, + 937, 940, 949, 939, 940, 952, 957, 954, 944, 945, + 942, 949, 941, 944, 945, 946, 943, 950, 955, 956, + 946, 953, 947, 951, 950, 954, 958, 952, 956, 949, + 957, 959, 952, 957, 954, 962, 955, 961, 963, 960, + 964, 966, 965, 962, 950, 955, 956, 959, 960, 967, + 958, 968, 961, 958, 965, 978, 970, 973, 959, 968, + 969, 0, 962, 966, 961, 972, 960, 985, 966, 965, + 963, 970, 964, 969, 972, 973, 967, 974, 968, 975, + 977, 975, 978, 970, 973, 974, 980, 969, 977, 981, + + 982, 984, 972, 983, 985, 986, 987, 988, 0, 980, + 0, 981, 986, 989, 974, 982, 975, 977, 990, 984, + 991, 992, 994, 980, 993, 983, 981, 982, 984, 995, + 983, 1001, 986, 997, 992, 989, 0, 993, 987, 988, + 989, 995, 991, 990, 994, 990, 996, 991, 992, 994, + 998, 993, 1002, 997, 996, 999, 995, 1003, 1001, 1004, + 997, 1006, 998, 999, 1005, 1002, 1003, 1007, 1006, 1009, + 1010, 1004, 0, 996, 1012, 1013, 1007, 998, 1007, 1002, + 1011, 1007, 999, 0, 1003, 1005, 1004, 1012, 1006, 1007, + 1016, 1005, 1010, 1015, 1007, 1009, 1009, 1010, 1017, 1013, + + 1011, 1012, 1013, 1007, 1014, 1007, 1017, 1011, 1007, 1022, + 1018, 1015, 1016, 1014, 1019, 1020, 1023, 1016, 1024, 1025, + 1015, 1028, 1026, 1020, 1027, 1017, 1025, 1031, 0, 0, + 1019, 1014, 1018, 0, 0, 1031, 1022, 1018, 1023, 1028, + 1024, 1019, 1020, 1023, 1026, 1024, 1025, 1027, 1028, 1026, + 1029, 1027, 1030, 1032, 1031, 1033, 1034, 1035, 1036, 1037, + 1038, 1040, 1029, 1045, 1030, 1037, 1036, 1033, 1032, 1038, + 1039, 1041, 1035, 1040, 1042, 1043, 1034, 1029, 1041, 1030, + 1032, 1042, 1033, 1034, 1035, 1036, 1037, 1038, 1040, 1047, + 1046, 1039, 1048, 1043, 1050, 1045, 1049, 1039, 1041, 1048, + + 1051, 1042, 1043, 1046, 1052, 1051, 0, 1053, 1047, 1050, + 1054, 1057, 1052, 1055, 1059, 1058, 1047, 1046, 1049, 1048, + 1053, 1050, 1063, 1049, 1054, 1057, 1060, 0, 0, 1061, + 1062, 1052, 1051, 1058, 1053, 1066, 0, 1054, 1057, 1055, + 1055, 1056, 1058, 1064, 1056, 1056, 1059, 1065, 1062, 1056, + 0, 1061, 1060, 1060, 1063, 1056, 1061, 1062, 1067, 1056, + 1070, 1066, 1066, 1056, 1067, 1064, 1068, 1070, 1056, 1065, + 1064, 1056, 1056, 1069, 1065, 1069, 1056, 1072, 1075, 1071, + 1076, 1074, 1056, 1073, 1077, 1067, 1056, 1070, 1071, 1076, + 1073, 1075, 1068, 1068, 1078, 1072, 1079, 1069, 1080, 0, + + 1069, 1084, 1069, 1074, 1072, 1075, 1071, 1076, 1074, 0, + 1073, 0, 0, 1082, 1086, 1088, 1077, 1084, 1079, 1087, + 0, 1080, 1092, 1079, 1088, 1080, 1078, 1081, 1084, 1089, + 1090, 1087, 1081, 0, 1081, 1090, 1081, 1086, 1081, 1082, + 1082, 1086, 1088, 1091, 1092, 1081, 1087, 1089, 1091, 1092, + 1094, 1093, 1095, 1097, 1081, 0, 1089, 0, 1096, 1081, + 1095, 1081, 1090, 1081, 1093, 1081, 1096, 1099, 1094, 1098, + 1091, 1100, 1097, 1101, 1102, 1104, 1105, 1094, 1093, 1095, + 1097, 1106, 1098, 1102, 1100, 1096, 1103, 1107, 1103, 1099, + 1108, 1101, 1110, 1106, 1099, 1114, 1098, 1104, 1100, 1111, + + 1101, 1102, 1104, 1105, 1112, 1113, 1116, 1118, 1106, 1117, + 1144, 1115, 1112, 1103, 1107, 1108, 1110, 1108, 1115, 1110, + 1121, 1111, 1114, 1113, 1119, 1123, 1111, 1126, 1125, 1118, + 1119, 1112, 1113, 1116, 1118, 1117, 1117, 1120, 1115, 1122, + 1127, 1124, 1144, 1120, 1128, 1126, 1122, 1121, 1124, 1123, + 1125, 1119, 1123, 1128, 1126, 1125, 1130, 1131, 1134, 1132, + 1133, 0, 1137, 0, 1120, 1127, 1122, 1127, 1124, 1131, + 1135, 1128, 1136, 1138, 1145, 1147, 1141, 1134, 1156, 0, + 1130, 1132, 1133, 1130, 1131, 1134, 1132, 1133, 1137, 1137, + 1140, 1142, 1135, 1139, 1136, 1138, 1141, 1135, 1148, 1136, + + 1138, 1146, 1139, 1141, 1149, 1142, 1145, 1147, 1150, 1151, + 1156, 1140, 1149, 1157, 1152, 1154, 1148, 1140, 1142, 1158, + 1139, 1152, 1154, 1146, 1150, 1148, 1155, 1160, 1146, 1165, + 1155, 1149, 0, 1163, 1164, 1150, 1151, 1161, 1165, 1166, + 1158, 1152, 1154, 1161, 1162, 1157, 1158, 1164, 1163, 1169, + 1161, 1162, 1168, 1155, 1168, 1167, 1165, 1171, 1169, 1160, + 1163, 1164, 1167, 1170, 1161, 1166, 1166, 1173, 1172, 1175, + 1161, 1162, 1172, 1176, 1177, 1178, 1169, 1175, 1176, 1168, + 1179, 1187, 1167, 1177, 1171, 1170, 1181, 1180, 1186, 1173, + 1170, 1184, 0, 1178, 1173, 1172, 1175, 1185, 1181, 1179, + + 1180, 1177, 1178, 1182, 1187, 1176, 1182, 1179, 1187, 1183, + 1185, 1188, 1183, 1181, 1180, 1182, 1184, 1189, 1184, 1191, + 1186, 1190, 1190, 1192, 1185, 1189, 1193, 1188, 1191, 1194, + 1182, 1183, 1200, 1182, 1195, 1193, 1183, 1201, 1188, 1183, + 1198, 1195, 1197, 1199, 1189, 1192, 1191, 1204, 1190, 1198, + 1192, 1194, 1199, 1193, 1202, 1197, 1194, 1203, 1200, 1200, + 1201, 1195, 1205, 1202, 1201, 1203, 1206, 1198, 1208, 1197, + 1199, 1209, 1207, 0, 1206, 1211, 1212, 1205, 1210, 1204, + 1208, 1202, 1213, 1209, 1203, 1207, 1210, 1216, 1215, 1205, + 1218, 1214, 1221, 1206, 1222, 1208, 1212, 1211, 1209, 1207, + + 1214, 1220, 1211, 1212, 1213, 1210, 1215, 1217, 1226, 1213, + 1219, 1218, 1223, 1216, 1216, 1215, 1219, 1218, 1214, 1217, + 1224, 1227, 1228, 1220, 1221, 1232, 1222, 1229, 1220, 1230, + 0, 1231, 1250, 1233, 1217, 1226, 1229, 1219, 1223, 1223, + 1228, 1236, 1230, 1231, 1227, 1232, 1224, 1224, 1227, 1228, + 1234, 1235, 1232, 1237, 1229, 1242, 1230, 1234, 1231, 1233, + 1233, 1238, 1239, 1236, 1250, 1241, 1237, 1239, 1236, 1238, + 1235, 1240, 1241, 1245, 1246, 1243, 1240, 1234, 1235, 1244, + 1237, 1242, 1242, 1243, 0, 1247, 1249, 1244, 1238, 1251, + 1248, 1245, 1241, 1247, 1239, 1249, 1246, 1248, 1252, 1252, + + 1245, 1246, 1243, 1240, 1253, 1255, 1244, 1254, 1256, 0, + 1257, 1251, 1247, 1249, 1258, 1254, 1251, 1248, 1257, 1259, + 1260, 1263, 1258, 1264, 1262, 1252, 1255, 1259, 1260, 1261, + 1262, 1265, 1255, 1263, 1254, 1267, 1253, 1257, 1266, 1268, + 1256, 1258, 1261, 1270, 1269, 1271, 1259, 1260, 1263, 1264, + 1264, 1262, 1275, 1266, 1272, 1265, 1261, 1270, 1265, 0, + 1273, 1268, 1267, 1271, 1273, 1266, 1268, 1269, 1272, 1279, + 1270, 1269, 1271, 1277, 1275, 1278, 1276, 1273, 0, 1275, + 1277, 1272, 1287, 1280, 1281, 1273, 1278, 1273, 1276, 1282, + 1283, 1273, 1284, 1288, 1286, 1295, 1279, 1294, 1285, 1284, + + 1277, 1286, 1278, 1276, 1273, 1280, 1281, 1285, 1293, 1290, + 1280, 1281, 1282, 1283, 1287, 1298, 1282, 1283, 1290, 1284, + 1288, 1286, 1292, 1294, 1294, 1285, 1296, 1295, 1292, 1301, + 1293, 1300, 1302, 1296, 1303, 1293, 1290, 1306, 1305, 1307, + 0, 1308, 1298, 1302, 1306, 1303, 1310, 1312, 1309, 1292, + 1314, 0, 1310, 1296, 0, 1300, 1301, 1307, 1300, 1302, + 1309, 1303, 1305, 1311, 1306, 1305, 1307, 1308, 1308, 1312, + 1313, 1311, 1315, 1310, 1312, 1309, 1314, 1314, 1317, 1316, + 1317, 1315, 1318, 1313, 1320, 1319, 1323, 1328, 1321, 1322, + 1311, 1316, 1326, 1320, 1324, 1325, 0, 1313, 1319, 1315, + + 1329, 1322, 1325, 1328, 1331, 1317, 1316, 1333, 1318, 1318, + 1321, 1320, 1319, 1323, 1328, 1321, 1322, 1324, 1326, 1326, + 1327, 1324, 1325, 1329, 1330, 1327, 1331, 1329, 1334, 1335, + 1340, 1331, 1330, 1337, 1333, 1336, 1336, 1334, 1338, 0, + 1338, 1339, 1335, 1336, 0, 0, 1337, 1327, 1344, 0, + 1347, 1330, 1340, 1343, 1341, 1334, 1335, 1340, 1346, 1342, + 1337, 1341, 1336, 1336, 1353, 1338, 1342, 1339, 1339, 1345, + 1344, 1343, 1347, 1348, 1350, 1344, 1345, 1347, 0, 0, + 1343, 1341, 1349, 1346, 1352, 1346, 1342, 1354, 1357, 1349, + 1358, 1353, 1355, 1358, 1359, 1354, 1345, 1352, 1360, 1361, + + 1369, 0, 0, 0, 1364, 1348, 1350, 1362, 1366, 1349, + 1357, 1352, 1361, 1355, 1354, 1357, 1362, 1358, 1363, 1355, + 1359, 1359, 1365, 1366, 1360, 1360, 1361, 1374, 1364, 1367, + 1363, 1364, 1369, 1370, 1362, 1366, 1367, 1368, 1375, 1371, + 1368, 1372, 1373, 1379, 1373, 1363, 0, 1377, 1365, 1365, + 1376, 1374, 1368, 0, 1374, 1370, 1367, 1371, 1378, 1380, + 1370, 1368, 1381, 1372, 1368, 1386, 1371, 1368, 1372, 1373, + 1375, 1382, 1376, 1377, 1377, 1379, 1381, 1376, 1385, 1368, + 1382, 1380, 1383, 1387, 1378, 1378, 1380, 1384, 1389, 1381, + 1383, 1388, 1390, 0, 1384, 1391, 1390, 1386, 1382, 1392, + + 1395, 1393, 1385, 1394, 1396, 1385, 0, 1395, 1397, 1383, + 1399, 1396, 1394, 1388, 1384, 1387, 1398, 1391, 1388, 1390, + 1389, 1397, 1391, 1393, 1400, 1399, 1392, 1395, 1393, 1398, + 1394, 1396, 1401, 1402, 1403, 1397, 1404, 1399, 1400, 1405, + 1402, 1403, 1407, 1398, 1411, 1405, 1408, 1416, 1409, 1404, + 1410, 1400, 1412, 1408, 1413, 0, 1411, 1413, 1414, 1416, + 1402, 1403, 1415, 1404, 1401, 1412, 1405, 1414, 1417, 1407, + 1409, 1411, 0, 1408, 1416, 1409, 1410, 1410, 1424, 1412, + 1415, 1413, 1419, 1418, 1425, 1414, 1418, 1421, 1417, 1415, + 1426, 1427, 1421, 1419, 1423, 1417, 1423, 1441, 1428, 1421, + + 1429, 1418, 1424, 1430, 1432, 1424, 1427, 1428, 1431, 1419, + 1418, 1425, 1432, 1418, 1421, 1433, 1434, 1426, 1427, 1421, + 1435, 1423, 1431, 1436, 1429, 1428, 1437, 1429, 1435, 1441, + 1430, 1432, 1438, 1439, 1436, 1431, 1439, 1433, 1434, 1440, + 1438, 1442, 1433, 1434, 1437, 1443, 1445, 1435, 1444, 1448, + 1436, 1439, 1443, 1437, 1446, 1445, 1451, 1440, 1447, 1438, + 1439, 1452, 1444, 1439, 1448, 1451, 1440, 1446, 1442, 1447, + 1456, 1453, 1443, 1445, 1454, 1444, 1448, 1450, 1455, 1450, + 1458, 1446, 1453, 1451, 1456, 1447, 1460, 1452, 1452, 1458, + 1457, 1464, 1454, 1457, 1461, 1460, 1456, 1456, 1453, 1461, + + 1455, 1454, 1463, 1459, 1450, 1455, 1466, 1458, 1457, 1459, + 1465, 1456, 1467, 1460, 1468, 1463, 1469, 1457, 1470, 1465, + 1457, 1474, 1473, 1464, 1472, 1477, 1461, 1479, 1475, 1463, + 1459, 1472, 1476, 1466, 0, 1473, 1468, 1465, 1476, 1470, + 1490, 1468, 1475, 1483, 1467, 1470, 1479, 1485, 1469, 1473, + 1481, 1472, 1482, 1474, 1479, 1475, 1476, 1477, 1481, 1476, + 1482, 1485, 1483, 1484, 1486, 1476, 1489, 1487, 1491, 1488, + 1483, 1492, 1490, 1497, 1485, 1494, 1493, 1481, 1486, 1482, + 1487, 1484, 1488, 1493, 1494, 1492, 1500, 1489, 1502, 1495, + 1484, 1486, 1496, 1489, 1487, 1500, 1488, 1495, 1492, 1498, + + 1491, 1499, 1494, 1493, 1498, 1497, 1496, 1504, 0, 1505, + 1503, 1506, 1499, 1500, 1489, 1502, 1495, 1503, 1507, 1496, + 1509, 1508, 1512, 1511, 1509, 0, 1498, 1514, 1499, 1516, + 1504, 1505, 1523, 1506, 1504, 1511, 1505, 1503, 1506, 1508, + 1507, 1518, 1514, 1513, 1515, 1507, 1517, 1509, 1508, 1512, + 1511, 1513, 1515, 1526, 1514, 1521, 1516, 1519, 1522, 1517, + 1520, 1518, 1524, 1521, 1523, 1522, 1527, 1525, 1518, 1529, + 1513, 1515, 1519, 1517, 1526, 1520, 1525, 1524, 1528, 1531, + 1526, 1532, 1521, 1533, 1519, 1522, 1534, 1520, 0, 1524, + 1537, 1536, 1535, 1527, 1525, 1539, 1529, 1538, 0, 1532, + + 1539, 1531, 1528, 1540, 1538, 1528, 1531, 1535, 1532, 1542, + 1543, 1541, 1540, 1534, 1537, 1533, 1536, 1537, 1536, 1535, + 1541, 1545, 1539, 1546, 1538, 1544, 1547, 1548, 1543, 1549, + 1540, 1542, 1550, 1545, 1548, 1551, 1542, 1543, 1541, 1547, + 1544, 1549, 1558, 1552, 1547, 1546, 1554, 1553, 1545, 1552, + 1546, 1555, 1544, 1547, 1548, 1553, 1549, 1554, 1555, 1550, + 1556, 1559, 1557, 1560, 1557, 1561, 1547, 1551, 1558, 1558, + 1552, 1562, 1561, 1554, 1553, 1557, 1563, 1564, 1555, 1566, + 1565, 1568, 1567, 1564, 1569, 1556, 1565, 1556, 1559, 1557, + 1560, 1557, 1561, 1571, 1573, 1574, 1575, 1574, 1562, 1578, + + 1576, 1572, 1563, 1563, 1564, 1567, 1566, 1565, 1569, 1567, + 1572, 1569, 1577, 1568, 1579, 1579, 1579, 1580, 1582, 0, + 1575, 1579, 1574, 1575, 1580, 1571, 1573, 1576, 1572, 1579, + 1581, 1578, 1586, 1583, 1590, 1589, 1587, 1581, 1577, 1577, + 1583, 1579, 1579, 1579, 1580, 1586, 1585, 1589, 1579, 1588, + 1582, 1585, 1591, 1594, 1595, 1595, 1596, 1581, 1599, 1586, + 1583, 1587, 1589, 1587, 1592, 1588, 1590, 1593, 1597, 1598, + 1591, 1592, 1600, 1593, 1598, 1597, 1588, 1604, 1585, 1591, + 1594, 1595, 1596, 1596, 1599, 1599, 1601, 1605, 1606, 1605, + 1608, 1592, 1609, 1601, 1593, 1597, 1598, 1610, 1609, 1600, + + 1611, 1612, 0, 1614, 1604, 1617, 1606, 1612, 1608, 1613, + 1616, 1616, 1622, 1601, 1605, 1606, 1615, 1608, 1621, 1609, + 1625, 1613, 1619, 1614, 1618, 1618, 1624, 1611, 1612, 1610, + 1614, 1617, 1617, 1619, 1615, 1623, 1613, 1616, 1626, 1627, + 1621, 1628, 1623, 1615, 1622, 1621, 1624, 1629, 1630, 1619, + 1631, 1618, 1625, 1624, 1632, 1630, 1633, 1637, 1631, 1635, + 1635, 1636, 1623, 1628, 1634, 1629, 1627, 1639, 1628, 1632, + 1626, 1638, 0, 1634, 1629, 1630, 1640, 1631, 1638, 1639, + 1633, 1632, 1647, 1633, 1644, 1643, 1635, 1636, 1636, 1637, + 1642, 1634, 1640, 1643, 1639, 1648, 1644, 1642, 1638, 1640, + + 1646, 1650, 1649, 1640, 1653, 1647, 1656, 1651, 1646, 1647, + 1652, 1644, 1643, 1657, 1656, 1652, 1648, 1642, 1654, 1640, + 1649, 1660, 1648, 1655, 1654, 1658, 1652, 1646, 1650, 1649, + 1651, 1653, 1658, 1656, 1651, 1657, 1655, 1652, 1662, 1659, + 1657, 1663, 1652, 1661, 1665, 1654, 1659, 1664, 1670, 1671, + 1655, 1667, 1658, 1660, 1672, 1661, 1668, 1669, 1673, 1672, + 1662, 1668, 1674, 1678, 1669, 1662, 1659, 1665, 1663, 1667, + 1661, 1665, 1668, 1664, 1664, 1670, 1671, 1676, 1667, 1675, + 1675, 1677, 1680, 1668, 1669, 1682, 1672, 1681, 1668, 1683, + 1673, 1683, 1684, 1685, 1674, 1678, 1677, 1680, 1685, 1676, + + 1682, 1686, 1687, 1689, 1676, 1690, 1675, 1693, 1677, 1680, + 1681, 1695, 1682, 1690, 1681, 1691, 1683, 1687, 1689, 1694, + 1685, 1696, 1698, 1699, 1684, 1700, 1713, 0, 1697, 1687, + 1689, 1693, 1690, 1686, 1693, 1697, 1701, 1691, 1695, 1704, + 1702, 1706, 1691, 1708, 1699, 1694, 1694, 1700, 1696, 1707, + 1699, 1712, 1700, 1713, 1698, 1697, 1710, 1701, 1702, 1711, + 1715, 1704, 1714, 1701, 1707, 1706, 1704, 1702, 1706, 1708, + 1708, 1710, 1716, 1712, 1711, 1717, 1707, 1718, 1712, 1719, + 1714, 1720, 1715, 1710, 1718, 1721, 1711, 1715, 1722, 1714, + 1720, 1723, 1724, 1721, 1716, 1730, 1725, 1719, 1728, 1716, + + 0, 1729, 1717, 1727, 1718, 1732, 1719, 1728, 1720, 1725, + 1738, 1722, 1721, 1723, 1727, 1722, 1731, 1734, 1723, 1729, + 1732, 1730, 1730, 1725, 1724, 1728, 1735, 1733, 1729, 1727, + 1727, 1740, 1732, 1733, 1731, 1741, 1742, 1738, 1744, 1734, + 1735, 1727, 1746, 1731, 1734, 1748, 1741, 1742, 1745, 1747, + 1744, 1750, 1749, 1735, 1733, 1740, 0, 0, 1740, 1747, + 1753, 1745, 1741, 1742, 1751, 1744, 1754, 0, 1755, 0, + 1756, 1748, 1748, 1754, 1746, 1745, 1747, 1749, 1750, 1749, + 1753, 1758, 1767, 1751, 1757, 1759, 1760, 1753, 1756, 1763, + 1757, 1751, 1762, 1754, 1755, 1755, 1758, 1756, 1761, 1761, + + 1759, 1760, 1763, 1766, 1762, 1771, 1768, 1765, 1758, 1767, + 1763, 1757, 1759, 1760, 1765, 1768, 1763, 1769, 1766, 1762, + 1774, 1770, 1776, 1778, 1769, 1761, 1775, 1771, 1772, 1763, + 1766, 1776, 1771, 1768, 1765, 1772, 1777, 1782, 1780, 1783, + 0, 1790, 1774, 1778, 1769, 1770, 1782, 1774, 1770, 1776, + 1778, 1775, 1784, 1775, 1786, 1772, 1780, 1783, 1777, 1785, + 1788, 1789, 1786, 1777, 1782, 1780, 1783, 1784, 1790, 1791, + 1791, 1792, 1793, 1794, 1789, 0, 1797, 0, 1798, 1784, + 1795, 1786, 1796, 1797, 1785, 1788, 1785, 1788, 1789, 1799, + 1800, 1796, 1804, 1792, 1801, 1794, 1791, 1793, 1792, 1793, + + 1794, 1805, 1795, 1797, 1800, 1804, 1803, 1795, 1806, 1796, + 1798, 1799, 1807, 1801, 1803, 1808, 1799, 1800, 1809, 1804, + 0, 1801, 1808, 0, 1807, 1810, 1811, 1813, 1805, 1812, + 1814, 0, 1815, 1803, 1806, 1806, 1816, 1812, 0, 1807, + 1820, 0, 1808, 1817, 1819, 1814, 1820, 1810, 1812, 1863, + 1809, 1811, 1810, 1811, 1813, 1821, 1812, 1814, 1815, 1815, + 1821, 1817, 1816, 1816, 1812, 1818, 1822, 1820, 1818, 1819, + 1817, 1819, 1826, 1823, 1825, 1827, 1829, 1832, 1830, 0, + 1831, 1863, 1833, 1818, 1822, 1830, 1864, 1821, 1823, 1825, + 1829, 1833, 1818, 1822, 1826, 1818, 0, 1827, 1831, 1826, + + 1823, 1825, 1827, 1829, 1832, 1830, 1834, 1831, 1835, 1833, + 1836, 1839, 1837, 1840, 1841, 1834, 1844, 0, 1864, 1835, + 1842, 1841, 1843, 1836, 1837, 1849, 1839, 1850, 1840, 1855, + 0, 1850, 1847, 1834, 1844, 1835, 1851, 1836, 1839, 1837, + 1840, 1841, 1842, 1844, 1843, 1847, 1849, 1842, 1851, 1843, + 1854, 1852, 1849, 1847, 1850, 1853, 1855, 1853, 1856, 1847, + 1852, 1857, 1858, 1851, 1859, 1861, 0, 1866, 1854, 1862, + 1858, 1860, 1847, 1865, 1862, 1870, 1856, 1854, 1852, 1861, + 1877, 1871, 1853, 1867, 1873, 1856, 1866, 1859, 1857, 1858, + 1867, 1859, 1861, 1860, 1866, 1871, 1872, 1865, 1860, 1874, + + 1865, 1862, 1870, 1875, 1876, 1878, 1871, 1871, 1871, 1879, + 1867, 1873, 1877, 1876, 1872, 1880, 1881, 1882, 1875, 1895, + 0, 1884, 1871, 1872, 1886, 1874, 1874, 1878, 1889, 0, + 1875, 1876, 1878, 1871, 1885, 1879, 1879, 1888, 1881, 1888, + 1892, 1885, 1880, 1881, 1884, 1891, 1895, 1886, 1884, 1882, + 1889, 1886, 1890, 1896, 1893, 1889, 1890, 1891, 1894, 1897, + 1898, 1885, 1892, 1893, 1888, 1899, 1899, 1892, 1900, 1894, + 1901, 1897, 1891, 1905, 1902, 1903, 1896, 0, 1901, 1890, + 1896, 1893, 1898, 1900, 1904, 1894, 1897, 1898, 1907, 1903, + 1908, 1909, 1899, 1904, 1914, 1900, 1902, 1901, 1908, 1909, + + 1905, 1902, 1903, 1911, 1910, 1912, 1911, 1907, 1910, 1914, + 1913, 1904, 1917, 1912, 1915, 1907, 1913, 1908, 1909, 1918, + 1915, 1914, 1920, 1919, 1917, 1921, 1922, 0, 1923, 1924, + 1911, 1910, 1912, 1925, 1927, 0, 1920, 1913, 1921, 1917, + 1922, 1915, 1928, 1930, 1931, 1926, 1918, 1919, 1927, 1920, + 1919, 1933, 1921, 1922, 1923, 1923, 1924, 1926, 1934, 1929, + 1925, 1927, 1929, 1937, 1936, 1934, 1931, 1935, 1928, 1928, + 1930, 1931, 1926, 1933, 1935, 1938, 1939, 1929, 1933, 1936, + 1940, 1942, 1944, 1941, 1939, 1934, 1929, 1943, 1945, 1929, + 1937, 1936, 1941, 1946, 1935, 1948, 0, 0, 1947, 1943, + + 1953, 1952, 1938, 1939, 1944, 1949, 1955, 1940, 1942, 1944, + 1941, 1947, 1958, 1948, 1943, 1945, 1950, 1956, 1949, 1957, + 1946, 1954, 1948, 1952, 1950, 1947, 1956, 1953, 1952, 1954, + 1959, 1960, 1949, 1955, 1961, 1962, 1958, 1964, 1970, 1958, + 1957, 1963, 1961, 1950, 1956, 1959, 1957, 1962, 1954, 1963, + 1967, 1968, 1966, 1969, 1967, 1972, 1959, 1959, 1960, 1966, + 1975, 1961, 1962, 1968, 1964, 1970, 1971, 1972, 1963, 1973, + 1981, 1977, 1959, 1978, 1971, 1980, 1969, 1967, 1968, 1966, + 1969, 1973, 1972, 1976, 1979, 1979, 1978, 1975, 1981, 1982, + 1976, 1977, 1983, 1971, 1985, 1986, 1973, 1981, 1977, 1983, + + 1978, 1980, 1980, 1987, 1988, 1991, 1988, 1990, 1996, 1985, + 1976, 1979, 1989, 1990, 1982, 1994, 1982, 1986, 1995, 1983, + 1996, 1985, 1986, 1992, 1992, 1987, 1989, 1991, 1997, 1999, + 1987, 1988, 1991, 0, 1990, 1996, 2000, 1994, 1998, 1989, + 1995, 0, 1994, 2003, 1998, 1995, 2001, 2002, 2004, 2002, + 1992, 2005, 2010, 2006, 2009, 2011, 2012, 2003, 2000, 2007, + 1997, 1999, 2017, 2000, 2008, 1998, 2018, 2009, 2001, 2005, + 2003, 2006, 2004, 2001, 2002, 2004, 2016, 2007, 2005, 2012, + 2006, 2009, 2008, 2012, 2010, 2014, 2007, 2011, 2017, 2017, + 2024, 2008, 2014, 2019, 2016, 2020, 2022, 2020, 2018, 2023, + + 2026, 2019, 2020, 2016, 2025, 0, 2028, 2022, 2033, 0, + 2023, 0, 2014, 2037, 2029, 0, 2025, 2024, 2026, 2019, + 2019, 2028, 2020, 2022, 2020, 2029, 2023, 2026, 2019, 2031, + 2030, 2025, 2033, 2028, 2036, 2033, 2034, 2040, 2035, 2045, + 2037, 2029, 2030, 2038, 2031, 2035, 2042, 2041, 2043, 2036, + 2044, 2047, 0, 0, 2046, 0, 2031, 2030, 2034, 2049, + 2048, 2036, 2051, 2034, 2040, 2035, 2045, 2046, 2042, 2038, + 2038, 2041, 2049, 2042, 2041, 2048, 2050, 2047, 2047, 2053, + 2043, 2046, 2044, 2054, 2050, 2055, 2049, 2048, 2051, 2051, + 2057, 2056, 2058, 2059, 2060, 2061, 0, 2064, 2065, 2058, + + 2070, 2063, 2053, 2050, 2064, 2065, 2053, 2054, 2057, 2061, + 2054, 2067, 2055, 2056, 2066, 2069, 2059, 2057, 2056, 2058, + 2059, 2060, 2061, 2063, 2064, 2065, 2068, 2066, 2063, 2071, + 2072, 0, 2070, 2068, 2067, 2074, 2075, 2069, 2067, 2072, + 2076, 2066, 2069, 2078, 2084, 2084, 2074, 2077, 2081, 2083, + 2071, 2082, 2088, 2068, 2085, 0, 2071, 2072, 2075, 2087, + 2090, 2081, 2074, 2075, 2089, 2091, 2077, 2094, 2078, 0, + 2078, 2084, 2076, 2083, 2077, 2081, 2083, 2082, 2082, 2089, + 2085, 2085, 2087, 2091, 2088, 2098, 2087, 2090, 2096, 2099, + 0, 2089, 2091, 2106, 2094, 2102, 2104, 2096, 2098, 2105, + + 2099, 2103, 2103, 2108, 2110, 2111, 2113, 2114, 2112, 2121, + 0, 2113, 2098, 2118, 0, 2096, 2099, 2102, 2104, 2112, + 2106, 2105, 2102, 2104, 2117, 2120, 2105, 0, 2103, 2114, + 2108, 2111, 2111, 2113, 2114, 2112, 2110, 2116, 2122, 2117, + 2118, 2121, 2123, 2120, 2125, 2116, 2127, 2122, 2126, 0, + 2129, 2117, 2120, 2130, 2123, 2127, 2126, 2131, 2133, 2132, + 2136, 2134, 2138, 0, 2116, 2122, 2139, 2136, 2137, 2123, + 2140, 2125, 2141, 2127, 2134, 2126, 2129, 2129, 2135, 2131, + 2130, 2132, 2144, 2133, 2131, 2133, 2132, 2136, 2134, 2138, + 2137, 2135, 2142, 2139, 2143, 2137, 2145, 2140, 2146, 2141, + + 2147, 2148, 0, 2143, 2144, 2135, 2149, 2142, 2151, 2144, + 2153, 2154, 2152, 2149, 2155, 2147, 2148, 2156, 2150, 2142, + 2152, 2143, 2145, 2145, 2146, 2146, 2157, 2147, 2148, 2150, + 2155, 2163, 2156, 2149, 2158, 2151, 2159, 2153, 2154, 2152, + 2160, 2155, 2164, 2159, 2156, 2150, 2157, 2161, 2162, 2158, + 2165, 2165, 2166, 2157, 2161, 2162, 2167, 0, 2163, 2166, + 2164, 2158, 2160, 2159, 2170, 2168, 2172, 2160, 2168, 2164, + 2167, 2169, 2175, 2173, 2161, 2162, 2171, 2165, 2172, 2166, + 2178, 2175, 2176, 2167, 2169, 2173, 2180, 2176, 2181, 2179, + 2170, 2170, 2168, 2172, 2171, 2182, 2183, 2177, 2169, 2175, + + 2173, 2177, 2179, 2171, 2178, 2184, 0, 2178, 2180, 2176, + 2181, 2186, 2189, 2180, 2188, 2181, 2179, 2190, 2191, 2194, + 2193, 2189, 2182, 2183, 2177, 2195, 2191, 2193, 2194, 2196, + 2195, 2184, 2184, 2190, 2199, 2197, 2196, 2186, 2186, 2189, + 2188, 2188, 2198, 2199, 2190, 2191, 2194, 2193, 2200, 2198, + 2202, 2205, 2195, 2197, 2203, 2204, 2196, 2208, 2207, 2203, + 2211, 2199, 2197, 2209, 2219, 2217, 0, 2218, 0, 2198, + 2210, 2212, 2209, 2204, 2200, 2200, 2207, 2202, 2205, 2210, + 2211, 2203, 2204, 2212, 2208, 2207, 2213, 2211, 2215, 0, + 2209, 2214, 2217, 2216, 2218, 2213, 2219, 2210, 2212, 2215, + + 2214, 2216, 2220, 2223, 2221, 2224, 2222, 0, 2228, 2227, + 2225, 2220, 2224, 2213, 2222, 2215, 2221, 2225, 2214, 2226, + 2216, 2230, 2229, 0, 0, 2223, 2234, 0, 0, 2220, + 2223, 2221, 2224, 2222, 2227, 2228, 2227, 2225, 2237, 2236, + 2238, 2226, 2232, 2235, 2234, 2237, 2226, 2229, 2230, 2229, + 2232, 2235, 2239, 2234, 2236, 2240, 2244, 2243, 2245, 2239, + 2246, 2248, 2238, 2240, 2243, 2237, 2236, 2238, 2247, 2232, + 2235, 2249, 2246, 2252, 2251, 2253, 2254, 2247, 2258, 2239, + 2244, 2261, 2240, 2244, 2243, 2245, 2251, 2246, 2248, 2263, + 2254, 2260, 2256, 2266, 2249, 2247, 2252, 2257, 2249, 2256, + + 2252, 2251, 2253, 2254, 2257, 2258, 2260, 2262, 2261, 2264, + 2265, 0, 2271, 2273, 2274, 2262, 2263, 2272, 2260, 2256, + 2266, 2275, 2272, 2278, 2257, 2265, 2281, 2276, 2274, 2277, + 2279, 2264, 0, 2284, 2262, 2275, 2264, 2265, 2271, 2271, + 2273, 2274, 2279, 2285, 2272, 2276, 2286, 2277, 2275, 2287, + 2278, 0, 2293, 2281, 2276, 2284, 2277, 2279, 2288, 2286, + 2284, 2289, 2290, 2291, 2293, 2285, 2296, 0, 2297, 2289, + 2285, 2287, 2294, 2286, 2295, 2298, 2287, 2288, 2296, 2293, + 2290, 2303, 2291, 2299, 2300, 2288, 0, 2304, 2289, 2290, + 2291, 2301, 2306, 2296, 2294, 2297, 2295, 2305, 2302, 2294, + + 2301, 2295, 2298, 2299, 2306, 2307, 2300, 2302, 2308, 2304, + 2299, 2300, 2309, 2303, 2304, 2312, 2313, 2314, 2301, 2306, + 2321, 2315, 2318, 2305, 2305, 2302, 2315, 2307, 2316, 2312, + 2317, 0, 2307, 2319, 2322, 2308, 2320, 0, 2321, 2309, + 2323, 2314, 2312, 2313, 2314, 2328, 2322, 2321, 2324, 2325, + 2316, 2327, 2317, 2315, 2318, 2316, 2319, 2317, 2320, 2323, + 2319, 2322, 2330, 2320, 2325, 2332, 2333, 2323, 2335, 2328, + 2324, 2334, 2328, 2327, 2338, 2324, 2325, 2330, 2327, 2336, + 2334, 2337, 2335, 2342, 2339, 2345, 2344, 2332, 2333, 2330, + 0, 2342, 2332, 2333, 2344, 2335, 2343, 2336, 2334, 2337, + + 2338, 2338, 2339, 2343, 2347, 2348, 2336, 2346, 2337, 2349, + 2342, 2339, 2345, 2344, 2352, 2346, 2350, 2348, 2354, 2355, + 2356, 2358, 2347, 2343, 2350, 2354, 2352, 2357, 2359, 2357, + 2360, 2347, 2348, 0, 2346, 0, 2349, 2361, 2362, 2363, + 2365, 2352, 2355, 2350, 0, 2354, 2355, 2356, 2368, 2366, + 0, 2372, 2373, 2358, 2357, 2369, 2374, 2362, 2365, 2376, + 2359, 2363, 2360, 2366, 2361, 2362, 2363, 2365, 2369, 2370, + 2378, 2368, 2384, 2380, 2386, 2368, 2366, 2372, 2372, 2373, + 2380, 2370, 2369, 2374, 2381, 2383, 2376, 2387, 0, 2381, + 2389, 2388, 2383, 2391, 2394, 2396, 2370, 2378, 2384, 2384, + + 2380, 2386, 2391, 2393, 2389, 2395, 2398, 2397, 2402, 2399, + 2393, 2401, 2383, 2412, 2387, 2388, 2381, 2389, 2388, 2397, + 2391, 2394, 2396, 2399, 2401, 2403, 2400, 2404, 2411, 0, + 2393, 2395, 2395, 2398, 2397, 2400, 2399, 2407, 2401, 2408, + 2402, 2409, 2407, 2408, 2410, 2412, 2415, 2414, 2409, 2411, + 2404, 2410, 2403, 2400, 2404, 2411, 2413, 2418, 2413, 2420, + 2423, 2421, 2423, 0, 0, 2424, 2408, 0, 2409, 2407, + 2414, 2410, 2426, 2415, 2414, 2430, 0, 2432, 2420, 2418, + 2425, 2425, 2427, 2413, 2418, 2421, 2420, 2423, 2421, 2424, + 2425, 2427, 2424, 2428, 2426, 2431, 2432, 2429, 2435, 2426, + + 2428, 2433, 2430, 2431, 2432, 2434, 2433, 2425, 2425, 2427, + 2429, 2436, 2440, 2434, 2437, 0, 2438, 0, 2439, 2448, + 2428, 0, 2431, 2440, 2429, 2435, 2441, 2442, 2443, 2443, + 0, 2444, 2434, 2433, 2442, 2452, 2449, 2436, 2436, 2440, + 2437, 2437, 2438, 2438, 2439, 2439, 2448, 2450, 2441, 2444, + 2445, 2453, 2446, 2441, 2442, 2443, 2450, 2445, 2444, 2446, + 2449, 2454, 2452, 2449, 2455, 2457, 2458, 2459, 2463, 2460, + 0, 2453, 2462, 0, 2450, 2464, 0, 2445, 2453, 2446, + 2474, 2462, 2465, 2468, 2458, 2459, 2455, 2460, 2454, 2466, + 0, 2455, 2457, 2458, 2459, 2463, 2460, 2468, 2464, 2462, + + 2465, 2466, 2464, 2467, 2469, 2475, 2477, 2474, 2467, 2465, + 2468, 2478, 2482, 2481, 2475, 2481, 2466, 2484, 2483, 2486, + 2490, 2488, 2469, 0, 2477, 2483, 2478, 2488, 2491, 2495, + 2482, 2469, 2475, 2477, 2486, 2467, 2492, 2498, 2478, 2482, + 2481, 2493, 2490, 2499, 2500, 2483, 2486, 2490, 2488, 2484, + 2491, 2495, 2504, 0, 2496, 2491, 2495, 2496, 2501, 2493, + 2502, 2503, 2492, 2492, 2498, 2506, 2509, 2502, 2493, 2503, + 2499, 2500, 2507, 2508, 2504, 2514, 2501, 2510, 2516, 2504, + 2496, 2496, 2513, 2511, 2496, 2501, 2510, 2502, 2503, 2511, + 2512, 2513, 2522, 2509, 2507, 2508, 2515, 2506, 2515, 2507, + + 2508, 2519, 2524, 2518, 2510, 2516, 2525, 2514, 2520, 2513, + 2511, 2518, 2512, 2519, 2526, 2520, 2524, 2512, 2527, 2522, + 2525, 2528, 2531, 2515, 2530, 2533, 2529, 2536, 2519, 2524, + 2518, 2537, 2528, 2525, 2529, 2520, 2527, 2526, 2532, 2532, + 2539, 2526, 2534, 2530, 2531, 2527, 2539, 2541, 2528, 2531, + 2534, 2530, 2533, 2529, 2536, 2543, 2546, 2544, 2537, 2545, + 2548, 0, 2553, 0, 2549, 2532, 2543, 2539, 2544, 2534, + 2545, 2549, 2550, 2551, 2541, 2556, 2550, 2554, 2546, 2558, + 2557, 2551, 2543, 2546, 2544, 2557, 2545, 2548, 2553, 2553, + 2554, 2549, 2559, 2561, 2560, 2562, 2563, 2556, 2564, 2550, + + 2551, 2560, 2556, 2565, 2554, 2564, 2558, 2557, 0, 2566, + 2569, 2562, 2561, 2567, 2563, 2577, 2578, 2566, 2570, 2559, + 2561, 2560, 2562, 2563, 2568, 2564, 2571, 2576, 2567, 2575, + 2580, 2568, 2581, 2579, 2576, 2565, 2566, 2569, 0, 2561, + 2567, 2581, 2570, 2578, 2575, 2570, 2583, 2577, 2584, 2586, + 2585, 2568, 2571, 2571, 2576, 2588, 2575, 2579, 2585, 2581, + 2579, 2590, 2580, 2591, 2587, 2587, 2592, 2594, 2583, 2595, + 2584, 2591, 2597, 2583, 2587, 2584, 2596, 2585, 2598, 2599, + 2600, 2586, 2588, 2601, 2592, 2597, 2602, 2604, 2590, 2607, + 2591, 2587, 2587, 2592, 2594, 2612, 2595, 2607, 2596, 2597, + + 2598, 2614, 2618, 2596, 2609, 2598, 2599, 2600, 2602, 2609, + 2601, 2615, 2610, 2602, 2604, 2611, 2607, 2610, 2616, 2617, + 2611, 2612, 2612, 2623, 2615, 2616, 2619, 2620, 2614, 2618, + 2625, 2609, 2628, 2626, 2619, 2627, 2629, 2617, 2615, 2610, + 2630, 2631, 2611, 2632, 0, 2616, 2617, 0, 2627, 2620, + 2623, 2629, 2636, 2619, 2620, 2626, 2637, 2625, 2640, 2630, + 2626, 2638, 2627, 2629, 2628, 2632, 2634, 2630, 2631, 2635, + 2632, 2637, 2641, 2634, 2636, 2645, 2635, 2640, 2648, 2636, + 2641, 2644, 2638, 2637, 2642, 2640, 2645, 2643, 2638, 2647, + 2644, 2642, 2652, 2634, 2643, 2647, 2635, 2646, 2646, 2641, + + 2648, 2655, 2645, 2651, 2656, 2648, 2652, 2646, 2644, 2657, + 2651, 2642, 2661, 2663, 2643, 2667, 2647, 2664, 2664, 2652, + 2665, 2665, 2666, 2666, 2646, 2646, 2669, 2674, 2655, 2679, + 2651, 2656, 2657, 2673, 2670, 2671, 2657, 2678, 2667, 2661, + 2663, 2680, 2667, 2670, 2686, 2677, 2664, 2677, 2671, 2665, + 2685, 2666, 2679, 2669, 2674, 2673, 2679, 2678, 2681, 2680, + 2673, 2670, 2671, 2684, 2678, 2683, 2687, 2688, 2680, 2689, + 2681, 2686, 2677, 2691, 2683, 2694, 2685, 2685, 2691, 2688, + 2690, 2684, 2692, 2690, 2693, 2681, 2693, 2694, 2699, 2695, + 2684, 2689, 2683, 2687, 2688, 2695, 2689, 2696, 2690, 2697, + + 2698, 2700, 2694, 2703, 2706, 2691, 2707, 2690, 2698, 2708, + 2690, 2693, 2709, 2710, 2692, 2699, 2695, 2711, 2712, 2696, + 2714, 2697, 2715, 2700, 2696, 2716, 2697, 2698, 2700, 2718, + 2703, 2706, 2716, 2707, 2719, 2722, 2708, 2718, 2714, 2709, + 2710, 2720, 2724, 2721, 2711, 2712, 2723, 2714, 2725, 2715, + 2722, 2728, 2716, 2720, 2724, 2729, 2718, 2721, 2730, 2730, + 2728, 2719, 2722, 2731, 2734, 2732, 2735, 2736, 2720, 2724, + 2721, 0, 2723, 2723, 2732, 2725, 2738, 2737, 2728, 2729, + 2736, 2742, 2729, 2753, 2738, 2730, 2739, 2751, 2734, 2731, + 2731, 2734, 2732, 2742, 2736, 2739, 2740, 2754, 2735, 2737, + + 2757, 2756, 2758, 2738, 2737, 2756, 2760, 2740, 2742, 2759, + 2753, 2751, 2764, 2739, 2751, 2763, 2759, 2762, 2757, 2760, + 2765, 2762, 2767, 2740, 2754, 2758, 2766, 2757, 2756, 2758, + 0, 2763, 2768, 2760, 2764, 2769, 2759, 2780, 2766, 2764, + 2771, 2770, 2763, 2769, 2762, 2765, 2768, 2765, 2767, 2767, + 2770, 2771, 2772, 2766, 2772, 2774, 2775, 2773, 2778, 2768, + 2781, 2774, 2769, 2775, 2780, 2779, 2782, 2771, 2770, 2773, + 2783, 2778, 2779, 2784, 2785, 2788, 0, 2793, 2781, 2772, + 2786, 2789, 2774, 2775, 2773, 2778, 2796, 2781, 2786, 2790, + 0, 2787, 2779, 2782, 2798, 0, 2783, 2783, 2787, 2788, + + 2784, 2785, 2788, 2789, 2791, 2792, 2791, 2786, 2789, 2793, + 2794, 2790, 2795, 2796, 2797, 2800, 2790, 2792, 2787, 2795, + 2802, 2798, 2797, 2794, 2805, 0, 2806, 2800, 2808, 2802, + 2807, 2791, 2792, 2809, 2810, 2811, 2808, 2794, 0, 2795, + 2812, 2797, 2800, 2814, 0, 2819, 2818, 2802, 2811, 2807, + 2813, 2805, 2806, 2806, 2812, 2808, 2816, 2807, 2813, 2818, + 2822, 2823, 2811, 2816, 2821, 2809, 2810, 2812, 2819, 2823, + 2814, 2821, 2819, 2818, 2827, 2824, 2825, 2813, 2826, 0, + 2832, 2834, 2822, 2816, 2828, 2830, 2826, 2822, 2823, 2824, + 2825, 2821, 2831, 2833, 2830, 2835, 2827, 2840, 2842, 0, + + 2831, 2827, 2824, 2825, 2836, 2826, 2828, 2832, 2837, 2839, + 2838, 2828, 2830, 2834, 2849, 2833, 2841, 2839, 2844, 2831, + 2833, 2835, 2835, 0, 2846, 2842, 2836, 2852, 2854, 2840, + 2837, 2836, 2838, 0, 2845, 2837, 2839, 2838, 2841, 2847, + 2848, 2844, 2845, 2841, 2846, 2844, 2849, 2847, 2848, 2850, + 2851, 2846, 2857, 2852, 2852, 2854, 2855, 2850, 2856, 2855, + 2857, 2845, 2858, 2872, 2851, 2860, 2847, 2848, 2859, 0, + 2858, 2861, 0, 2862, 2855, 2865, 2850, 2851, 2867, 2857, + 2856, 2869, 2859, 2855, 2868, 2856, 2855, 2862, 2874, 2858, + 2872, 2860, 2860, 2861, 2870, 2859, 2864, 2864, 2861, 2866, + + 2862, 2865, 2865, 2869, 2867, 2867, 2873, 2866, 2869, 2871, + 2868, 2868, 2875, 2874, 2870, 2874, 2878, 2871, 2876, 2879, + 2877, 2870, 2880, 2864, 2878, 2882, 2866, 2883, 2873, 2885, + 2880, 2886, 2891, 2873, 2887, 2883, 2871, 2895, 2876, 2875, + 2877, 2879, 2887, 2878, 2889, 2876, 2879, 2877, 2894, 2880, + 2898, 2885, 2882, 2886, 2883, 2888, 2885, 2892, 2886, 2891, + 2893, 2887, 2899, 2888, 2895, 2892, 2896, 2908, 2893, 2902, + 2889, 2889, 2900, 2905, 2894, 2894, 2909, 2898, 0, 0, + 2906, 0, 2888, 0, 2892, 0, 2896, 2893, 2906, 2899, + 2907, 2902, 2900, 2896, 2908, 2905, 2902, 0, 2907, 2900, + + 2905, 0, 0, 2909, 0, 0, 0, 2906, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2907, 2913, 2913, + 2913, 2913, 2913, 2913, 2913, 2914, 2914, 2914, 2914, 2914, + 2914, 2914, 2915, 2915, 2915, 2915, 2915, 2915, 2915, 2916, + 2916, 2916, 2916, 2916, 2916, 2916, 2917, 2917, 2917, 2917, + 2917, 2917, 2917, 2919, 2919, 0, 2919, 2919, 2919, 2919, + 2920, 2920, 0, 0, 0, 2920, 2920, 2921, 2921, 0, + 0, 2921, 0, 2921, 2922, 0, 0, 0, 0, 0, + 2922, 2923, 2923, 0, 0, 0, 2923, 2923, 2924, 0, + 0, 0, 0, 0, 2924, 2925, 2925, 0, 2925, 2925, + + 2925, 2925, 2926, 2926, 0, 2926, 2926, 2926, 2926, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, 2912, + 2912, 2912, 2912, 2912, 2912, 2912 } ; static yy_state_type yy_last_accepting_state; @@ -3357,7 +3355,7 @@ static void config_start_include(const char* filename) config_include_stack = s; cfg_parser->filename = nm; cfg_parser->line = 1; - yy_switch_to_buffer(yy_create_buffer(input,YY_BUF_SIZE)); + yy_switch_to_buffer(yy_create_buffer(input, YY_BUF_SIZE)); } static void config_start_include_glob(const char* filename) @@ -3366,8 +3364,7 @@ static void config_start_include_glob(const char* filename) /* check for wildcards */ #ifdef HAVE_GLOB glob_t g; - size_t i; - int r, flags; + int i, r, flags; if(!(!strchr(filename, '*') && !strchr(filename, '?') && !strchr(filename, '[') && !strchr(filename, '{') && !strchr(filename, '~'))) { flags = 0 @@ -3398,7 +3395,7 @@ static void config_start_include_glob(const char* filename) return; } /* process files found, if any */ - for(i=0; i<(size_t)g.gl_pathc; i++) { + for(i=(int)g.gl_pathc-1; i>=0; i--) { config_start_include(g.gl_pathv[i]); } globfree(&g); @@ -3427,21 +3424,23 @@ static void config_end_include(void) #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer(yyin,YY_BUF_SIZE ); \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_ch_buf[0] = ((at_bol)?'\n':' '); \ } #endif +#line 3431 "" #define YY_NO_INPUT 1 -#line 185 "util/configlexer.lex" +#line 184 "util/configlexer.lex" #ifndef YY_NO_UNPUT #define YY_NO_UNPUT 1 #endif #ifndef YY_NO_INPUT #define YY_NO_INPUT 1 #endif +#line 3440 "" -#line 3443 "" +#line 3442 "" #define INITIAL 0 #define quotedstring 1 @@ -3462,36 +3461,36 @@ static void config_end_include(void) #define YY_EXTRA_TYPE void * #endif -static int yy_init_globals (void ); +static int yy_init_globals ( void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy (void ); +int yylex_destroy ( void ); -int yyget_debug (void ); +int yyget_debug ( void ); -void yyset_debug (int debug_flag ); +void yyset_debug ( int debug_flag ); -YY_EXTRA_TYPE yyget_extra (void ); +YY_EXTRA_TYPE yyget_extra ( void ); -void yyset_extra (YY_EXTRA_TYPE user_defined ); +void yyset_extra ( YY_EXTRA_TYPE user_defined ); -FILE *yyget_in (void ); +FILE *yyget_in ( void ); -void yyset_in (FILE * _in_str ); +void yyset_in ( FILE * _in_str ); -FILE *yyget_out (void ); +FILE *yyget_out ( void ); -void yyset_out (FILE * _out_str ); +void yyset_out ( FILE * _out_str ); - int yyget_leng (void ); + int yyget_leng ( void ); -char *yyget_text (void ); +char *yyget_text ( void ); -int yyget_lineno (void ); +int yyget_lineno ( void ); -void yyset_lineno (int _line_number ); +void yyset_lineno ( int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -3499,9 +3498,9 @@ void yyset_lineno (int _line_number ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap (void ); +extern "C" int yywrap ( void ); #else -extern int yywrap (void ); +extern int yywrap ( void ); #endif #endif @@ -3510,19 +3509,18 @@ extern int yywrap (void ); #endif #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); +static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT - #ifdef __cplusplus -static int yyinput (void ); +static int yyinput ( void ); #else -static int input (void ); +static int input ( void ); #endif #endif @@ -3655,23 +3653,23 @@ YY_DECL if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - yy_load_buffer_state( ); + yy_load_buffer_state( ); } { -#line 205 "util/configlexer.lex" +#line 204 "util/configlexer.lex" -#line 3666 "" +#line 3664 "" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { (yy_more_len) = 0; if ( (yy_more_flag) ) { - (yy_more_len) = (yy_c_buf_p) - (yytext_ptr); + (yy_more_len) = (int) ((yy_c_buf_p) - (yytext_ptr)); (yy_more_flag) = 0; } yy_cp = (yy_c_buf_p); @@ -3697,13 +3695,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 2905 ) - yy_c = yy_meta[(unsigned int) yy_c]; + if ( yy_current_state >= 2913 ) + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 8293 ); + while ( yy_base[yy_current_state] != 8310 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -3729,1401 +3727,1416 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 206 "util/configlexer.lex" +#line 205 "util/configlexer.lex" { LEXOUT(("SP ")); /* ignore */ } YY_BREAK case 2: YY_RULE_SETUP -#line 208 "util/configlexer.lex" +#line 207 "util/configlexer.lex" { /* note that flex makes the longest match and '.' is any but not nl */ LEXOUT(("comment(%s) ", yytext)); /* ignore */ } YY_BREAK case 3: YY_RULE_SETUP -#line 211 "util/configlexer.lex" +#line 210 "util/configlexer.lex" { YDVAR(0, VAR_SERVER) } YY_BREAK case 4: YY_RULE_SETUP -#line 212 "util/configlexer.lex" +#line 211 "util/configlexer.lex" { YDVAR(1, VAR_QNAME_MINIMISATION) } YY_BREAK case 5: YY_RULE_SETUP -#line 213 "util/configlexer.lex" +#line 212 "util/configlexer.lex" { YDVAR(1, VAR_QNAME_MINIMISATION_STRICT) } YY_BREAK case 6: YY_RULE_SETUP -#line 214 "util/configlexer.lex" +#line 213 "util/configlexer.lex" { YDVAR(1, VAR_NUM_THREADS) } YY_BREAK case 7: YY_RULE_SETUP -#line 215 "util/configlexer.lex" +#line 214 "util/configlexer.lex" { YDVAR(1, VAR_VERBOSITY) } YY_BREAK case 8: YY_RULE_SETUP -#line 216 "util/configlexer.lex" +#line 215 "util/configlexer.lex" { YDVAR(1, VAR_PORT) } YY_BREAK case 9: YY_RULE_SETUP -#line 217 "util/configlexer.lex" +#line 216 "util/configlexer.lex" { YDVAR(1, VAR_OUTGOING_RANGE) } YY_BREAK case 10: YY_RULE_SETUP -#line 218 "util/configlexer.lex" +#line 217 "util/configlexer.lex" { YDVAR(1, VAR_OUTGOING_PORT_PERMIT) } YY_BREAK case 11: YY_RULE_SETUP -#line 219 "util/configlexer.lex" +#line 218 "util/configlexer.lex" { YDVAR(1, VAR_OUTGOING_PORT_AVOID) } YY_BREAK case 12: YY_RULE_SETUP -#line 220 "util/configlexer.lex" +#line 219 "util/configlexer.lex" { YDVAR(1, VAR_OUTGOING_NUM_TCP) } YY_BREAK case 13: YY_RULE_SETUP -#line 221 "util/configlexer.lex" +#line 220 "util/configlexer.lex" { YDVAR(1, VAR_INCOMING_NUM_TCP) } YY_BREAK case 14: YY_RULE_SETUP -#line 222 "util/configlexer.lex" +#line 221 "util/configlexer.lex" { YDVAR(1, VAR_DO_IP4) } YY_BREAK case 15: YY_RULE_SETUP -#line 223 "util/configlexer.lex" +#line 222 "util/configlexer.lex" { YDVAR(1, VAR_DO_IP6) } YY_BREAK case 16: YY_RULE_SETUP -#line 224 "util/configlexer.lex" +#line 223 "util/configlexer.lex" { YDVAR(1, VAR_PREFER_IP6) } YY_BREAK case 17: YY_RULE_SETUP -#line 225 "util/configlexer.lex" +#line 224 "util/configlexer.lex" { YDVAR(1, VAR_DO_UDP) } YY_BREAK case 18: YY_RULE_SETUP -#line 226 "util/configlexer.lex" +#line 225 "util/configlexer.lex" { YDVAR(1, VAR_DO_TCP) } YY_BREAK case 19: YY_RULE_SETUP -#line 227 "util/configlexer.lex" +#line 226 "util/configlexer.lex" { YDVAR(1, VAR_TCP_UPSTREAM) } YY_BREAK case 20: YY_RULE_SETUP -#line 228 "util/configlexer.lex" +#line 227 "util/configlexer.lex" { YDVAR(1, VAR_TCP_MSS) } YY_BREAK case 21: YY_RULE_SETUP -#line 229 "util/configlexer.lex" +#line 228 "util/configlexer.lex" { YDVAR(1, VAR_OUTGOING_TCP_MSS) } YY_BREAK case 22: YY_RULE_SETUP -#line 230 "util/configlexer.lex" +#line 229 "util/configlexer.lex" { YDVAR(1, VAR_TCP_IDLE_TIMEOUT) } YY_BREAK case 23: YY_RULE_SETUP -#line 231 "util/configlexer.lex" +#line 230 "util/configlexer.lex" { YDVAR(1, VAR_EDNS_TCP_KEEPALIVE) } YY_BREAK case 24: YY_RULE_SETUP -#line 232 "util/configlexer.lex" +#line 231 "util/configlexer.lex" { YDVAR(1, VAR_EDNS_TCP_KEEPALIVE_TIMEOUT) } YY_BREAK case 25: YY_RULE_SETUP -#line 233 "util/configlexer.lex" +#line 232 "util/configlexer.lex" { YDVAR(1, VAR_SSL_UPSTREAM) } YY_BREAK case 26: YY_RULE_SETUP -#line 234 "util/configlexer.lex" +#line 233 "util/configlexer.lex" { YDVAR(1, VAR_SSL_UPSTREAM) } YY_BREAK case 27: YY_RULE_SETUP -#line 235 "util/configlexer.lex" +#line 234 "util/configlexer.lex" { YDVAR(1, VAR_SSL_SERVICE_KEY) } YY_BREAK case 28: YY_RULE_SETUP -#line 236 "util/configlexer.lex" +#line 235 "util/configlexer.lex" { YDVAR(1, VAR_SSL_SERVICE_KEY) } YY_BREAK case 29: YY_RULE_SETUP -#line 237 "util/configlexer.lex" +#line 236 "util/configlexer.lex" { YDVAR(1, VAR_SSL_SERVICE_PEM) } YY_BREAK case 30: YY_RULE_SETUP -#line 238 "util/configlexer.lex" +#line 237 "util/configlexer.lex" { YDVAR(1, VAR_SSL_SERVICE_PEM) } YY_BREAK case 31: YY_RULE_SETUP -#line 239 "util/configlexer.lex" +#line 238 "util/configlexer.lex" { YDVAR(1, VAR_SSL_PORT) } YY_BREAK case 32: YY_RULE_SETUP -#line 240 "util/configlexer.lex" +#line 239 "util/configlexer.lex" { YDVAR(1, VAR_SSL_PORT) } YY_BREAK case 33: YY_RULE_SETUP -#line 241 "util/configlexer.lex" +#line 240 "util/configlexer.lex" { YDVAR(1, VAR_TLS_CERT_BUNDLE) } YY_BREAK case 34: YY_RULE_SETUP -#line 242 "util/configlexer.lex" +#line 241 "util/configlexer.lex" { YDVAR(1, VAR_TLS_CERT_BUNDLE) } YY_BREAK case 35: YY_RULE_SETUP -#line 243 "util/configlexer.lex" +#line 242 "util/configlexer.lex" { YDVAR(1, VAR_TLS_WIN_CERT) } YY_BREAK case 36: YY_RULE_SETUP -#line 244 "util/configlexer.lex" +#line 243 "util/configlexer.lex" { YDVAR(1, VAR_TLS_ADDITIONAL_PORT) } YY_BREAK case 37: YY_RULE_SETUP -#line 245 "util/configlexer.lex" +#line 244 "util/configlexer.lex" { YDVAR(1, VAR_TLS_ADDITIONAL_PORT) } YY_BREAK case 38: YY_RULE_SETUP -#line 246 "util/configlexer.lex" +#line 245 "util/configlexer.lex" { YDVAR(1, VAR_TLS_ADDITIONAL_PORT) } YY_BREAK case 39: YY_RULE_SETUP -#line 247 "util/configlexer.lex" +#line 246 "util/configlexer.lex" { YDVAR(1, VAR_TLS_ADDITIONAL_PORT) } YY_BREAK case 40: YY_RULE_SETUP -#line 248 "util/configlexer.lex" +#line 247 "util/configlexer.lex" { YDVAR(1, VAR_TLS_SESSION_TICKET_KEYS) } YY_BREAK case 41: YY_RULE_SETUP -#line 249 "util/configlexer.lex" +#line 248 "util/configlexer.lex" { YDVAR(1, VAR_TLS_CIPHERS) } YY_BREAK case 42: YY_RULE_SETUP -#line 250 "util/configlexer.lex" +#line 249 "util/configlexer.lex" { YDVAR(1, VAR_TLS_CIPHERSUITES) } YY_BREAK case 43: YY_RULE_SETUP -#line 251 "util/configlexer.lex" +#line 250 "util/configlexer.lex" { YDVAR(1, VAR_USE_SYSTEMD) } YY_BREAK case 44: YY_RULE_SETUP -#line 252 "util/configlexer.lex" +#line 251 "util/configlexer.lex" { YDVAR(1, VAR_DO_DAEMONIZE) } YY_BREAK case 45: YY_RULE_SETUP -#line 253 "util/configlexer.lex" +#line 252 "util/configlexer.lex" { YDVAR(1, VAR_INTERFACE) } YY_BREAK case 46: YY_RULE_SETUP -#line 254 "util/configlexer.lex" +#line 253 "util/configlexer.lex" { YDVAR(1, VAR_INTERFACE) } YY_BREAK case 47: YY_RULE_SETUP -#line 255 "util/configlexer.lex" +#line 254 "util/configlexer.lex" { YDVAR(1, VAR_OUTGOING_INTERFACE) } YY_BREAK case 48: YY_RULE_SETUP -#line 256 "util/configlexer.lex" +#line 255 "util/configlexer.lex" { YDVAR(1, VAR_INTERFACE_AUTOMATIC) } YY_BREAK case 49: YY_RULE_SETUP -#line 257 "util/configlexer.lex" +#line 256 "util/configlexer.lex" { YDVAR(1, VAR_SO_RCVBUF) } YY_BREAK case 50: YY_RULE_SETUP -#line 258 "util/configlexer.lex" +#line 257 "util/configlexer.lex" { YDVAR(1, VAR_SO_SNDBUF) } YY_BREAK case 51: YY_RULE_SETUP -#line 259 "util/configlexer.lex" +#line 258 "util/configlexer.lex" { YDVAR(1, VAR_SO_REUSEPORT) } YY_BREAK case 52: YY_RULE_SETUP -#line 260 "util/configlexer.lex" +#line 259 "util/configlexer.lex" { YDVAR(1, VAR_IP_TRANSPARENT) } YY_BREAK case 53: YY_RULE_SETUP -#line 261 "util/configlexer.lex" +#line 260 "util/configlexer.lex" { YDVAR(1, VAR_IP_FREEBIND) } YY_BREAK case 54: YY_RULE_SETUP -#line 262 "util/configlexer.lex" +#line 261 "util/configlexer.lex" { YDVAR(1, VAR_CHROOT) } YY_BREAK case 55: YY_RULE_SETUP -#line 263 "util/configlexer.lex" +#line 262 "util/configlexer.lex" { YDVAR(1, VAR_USERNAME) } YY_BREAK case 56: YY_RULE_SETUP -#line 264 "util/configlexer.lex" +#line 263 "util/configlexer.lex" { YDVAR(1, VAR_DIRECTORY) } YY_BREAK case 57: YY_RULE_SETUP -#line 265 "util/configlexer.lex" +#line 264 "util/configlexer.lex" { YDVAR(1, VAR_LOGFILE) } YY_BREAK case 58: YY_RULE_SETUP -#line 266 "util/configlexer.lex" +#line 265 "util/configlexer.lex" { YDVAR(1, VAR_PIDFILE) } YY_BREAK case 59: YY_RULE_SETUP -#line 267 "util/configlexer.lex" +#line 266 "util/configlexer.lex" { YDVAR(1, VAR_ROOT_HINTS) } YY_BREAK case 60: YY_RULE_SETUP -#line 268 "util/configlexer.lex" +#line 267 "util/configlexer.lex" { YDVAR(1, VAR_STREAM_WAIT_SIZE) } YY_BREAK case 61: YY_RULE_SETUP -#line 269 "util/configlexer.lex" +#line 268 "util/configlexer.lex" { YDVAR(1, VAR_EDNS_BUFFER_SIZE) } YY_BREAK case 62: YY_RULE_SETUP -#line 270 "util/configlexer.lex" +#line 269 "util/configlexer.lex" { YDVAR(1, VAR_MSG_BUFFER_SIZE) } YY_BREAK case 63: YY_RULE_SETUP -#line 271 "util/configlexer.lex" +#line 270 "util/configlexer.lex" { YDVAR(1, VAR_MSG_CACHE_SIZE) } YY_BREAK case 64: YY_RULE_SETUP -#line 272 "util/configlexer.lex" +#line 271 "util/configlexer.lex" { YDVAR(1, VAR_MSG_CACHE_SLABS) } YY_BREAK case 65: YY_RULE_SETUP -#line 273 "util/configlexer.lex" +#line 272 "util/configlexer.lex" { YDVAR(1, VAR_RRSET_CACHE_SIZE) } YY_BREAK case 66: YY_RULE_SETUP -#line 274 "util/configlexer.lex" +#line 273 "util/configlexer.lex" { YDVAR(1, VAR_RRSET_CACHE_SLABS) } YY_BREAK case 67: YY_RULE_SETUP -#line 275 "util/configlexer.lex" +#line 274 "util/configlexer.lex" { YDVAR(1, VAR_CACHE_MAX_TTL) } YY_BREAK case 68: YY_RULE_SETUP -#line 276 "util/configlexer.lex" +#line 275 "util/configlexer.lex" { YDVAR(1, VAR_CACHE_MAX_NEGATIVE_TTL) } YY_BREAK case 69: YY_RULE_SETUP -#line 277 "util/configlexer.lex" +#line 276 "util/configlexer.lex" { YDVAR(1, VAR_CACHE_MIN_TTL) } YY_BREAK case 70: YY_RULE_SETUP -#line 278 "util/configlexer.lex" +#line 277 "util/configlexer.lex" { YDVAR(1, VAR_INFRA_HOST_TTL) } YY_BREAK case 71: YY_RULE_SETUP -#line 279 "util/configlexer.lex" +#line 278 "util/configlexer.lex" { YDVAR(1, VAR_INFRA_LAME_TTL) } YY_BREAK case 72: YY_RULE_SETUP -#line 280 "util/configlexer.lex" +#line 279 "util/configlexer.lex" { YDVAR(1, VAR_INFRA_CACHE_SLABS) } YY_BREAK case 73: YY_RULE_SETUP -#line 281 "util/configlexer.lex" +#line 280 "util/configlexer.lex" { YDVAR(1, VAR_INFRA_CACHE_NUMHOSTS) } YY_BREAK case 74: YY_RULE_SETUP -#line 282 "util/configlexer.lex" +#line 281 "util/configlexer.lex" { YDVAR(1, VAR_INFRA_CACHE_LAME_SIZE) } YY_BREAK case 75: YY_RULE_SETUP -#line 283 "util/configlexer.lex" +#line 282 "util/configlexer.lex" { YDVAR(1, VAR_INFRA_CACHE_MIN_RTT) } YY_BREAK case 76: YY_RULE_SETUP -#line 284 "util/configlexer.lex" +#line 283 "util/configlexer.lex" { YDVAR(1, VAR_NUM_QUERIES_PER_THREAD) } YY_BREAK case 77: YY_RULE_SETUP -#line 285 "util/configlexer.lex" +#line 284 "util/configlexer.lex" { YDVAR(1, VAR_JOSTLE_TIMEOUT) } YY_BREAK case 78: YY_RULE_SETUP -#line 286 "util/configlexer.lex" +#line 285 "util/configlexer.lex" { YDVAR(1, VAR_DELAY_CLOSE) } YY_BREAK case 79: YY_RULE_SETUP -#line 287 "util/configlexer.lex" +#line 286 "util/configlexer.lex" { YDVAR(1, VAR_TARGET_FETCH_POLICY) } YY_BREAK case 80: YY_RULE_SETUP -#line 288 "util/configlexer.lex" +#line 287 "util/configlexer.lex" { YDVAR(1, VAR_HARDEN_SHORT_BUFSIZE) } YY_BREAK case 81: YY_RULE_SETUP -#line 289 "util/configlexer.lex" +#line 288 "util/configlexer.lex" { YDVAR(1, VAR_HARDEN_LARGE_QUERIES) } YY_BREAK case 82: YY_RULE_SETUP -#line 290 "util/configlexer.lex" +#line 289 "util/configlexer.lex" { YDVAR(1, VAR_HARDEN_GLUE) } YY_BREAK case 83: YY_RULE_SETUP -#line 291 "util/configlexer.lex" +#line 290 "util/configlexer.lex" { YDVAR(1, VAR_HARDEN_DNSSEC_STRIPPED) } YY_BREAK case 84: YY_RULE_SETUP -#line 292 "util/configlexer.lex" +#line 291 "util/configlexer.lex" { YDVAR(1, VAR_HARDEN_BELOW_NXDOMAIN) } YY_BREAK case 85: YY_RULE_SETUP -#line 293 "util/configlexer.lex" +#line 292 "util/configlexer.lex" { YDVAR(1, VAR_HARDEN_REFERRAL_PATH) } YY_BREAK case 86: YY_RULE_SETUP -#line 294 "util/configlexer.lex" +#line 293 "util/configlexer.lex" { YDVAR(1, VAR_HARDEN_ALGO_DOWNGRADE) } YY_BREAK case 87: YY_RULE_SETUP -#line 295 "util/configlexer.lex" +#line 294 "util/configlexer.lex" { YDVAR(1, VAR_USE_CAPS_FOR_ID) } YY_BREAK case 88: YY_RULE_SETUP -#line 296 "util/configlexer.lex" +#line 295 "util/configlexer.lex" { YDVAR(1, VAR_CAPS_WHITELIST) } YY_BREAK case 89: YY_RULE_SETUP -#line 297 "util/configlexer.lex" +#line 296 "util/configlexer.lex" { YDVAR(1, VAR_UNWANTED_REPLY_THRESHOLD) } YY_BREAK case 90: YY_RULE_SETUP -#line 298 "util/configlexer.lex" +#line 297 "util/configlexer.lex" { YDVAR(1, VAR_PRIVATE_ADDRESS) } YY_BREAK case 91: YY_RULE_SETUP -#line 299 "util/configlexer.lex" +#line 298 "util/configlexer.lex" { YDVAR(1, VAR_PRIVATE_DOMAIN) } YY_BREAK case 92: YY_RULE_SETUP -#line 300 "util/configlexer.lex" +#line 299 "util/configlexer.lex" { YDVAR(1, VAR_PREFETCH_KEY) } YY_BREAK case 93: YY_RULE_SETUP -#line 301 "util/configlexer.lex" +#line 300 "util/configlexer.lex" { YDVAR(1, VAR_PREFETCH) } YY_BREAK case 94: YY_RULE_SETUP -#line 302 "util/configlexer.lex" +#line 301 "util/configlexer.lex" { YDVAR(1, VAR_DENY_ANY) } YY_BREAK case 95: YY_RULE_SETUP -#line 303 "util/configlexer.lex" +#line 302 "util/configlexer.lex" { YDVAR(0, VAR_STUB_ZONE) } YY_BREAK case 96: YY_RULE_SETUP -#line 304 "util/configlexer.lex" +#line 303 "util/configlexer.lex" { YDVAR(1, VAR_NAME) } YY_BREAK case 97: YY_RULE_SETUP -#line 305 "util/configlexer.lex" +#line 304 "util/configlexer.lex" { YDVAR(1, VAR_STUB_ADDR) } YY_BREAK case 98: YY_RULE_SETUP -#line 306 "util/configlexer.lex" +#line 305 "util/configlexer.lex" { YDVAR(1, VAR_STUB_HOST) } YY_BREAK case 99: YY_RULE_SETUP -#line 307 "util/configlexer.lex" +#line 306 "util/configlexer.lex" { YDVAR(1, VAR_STUB_PRIME) } YY_BREAK case 100: YY_RULE_SETUP -#line 308 "util/configlexer.lex" +#line 307 "util/configlexer.lex" { YDVAR(1, VAR_STUB_FIRST) } YY_BREAK case 101: YY_RULE_SETUP -#line 309 "util/configlexer.lex" +#line 308 "util/configlexer.lex" { YDVAR(1, VAR_STUB_NO_CACHE) } YY_BREAK case 102: YY_RULE_SETUP -#line 310 "util/configlexer.lex" +#line 309 "util/configlexer.lex" { YDVAR(1, VAR_STUB_SSL_UPSTREAM) } YY_BREAK case 103: YY_RULE_SETUP -#line 311 "util/configlexer.lex" +#line 310 "util/configlexer.lex" { YDVAR(1, VAR_STUB_SSL_UPSTREAM) } YY_BREAK case 104: YY_RULE_SETUP -#line 312 "util/configlexer.lex" +#line 311 "util/configlexer.lex" { YDVAR(0, VAR_FORWARD_ZONE) } YY_BREAK case 105: YY_RULE_SETUP -#line 313 "util/configlexer.lex" +#line 312 "util/configlexer.lex" { YDVAR(1, VAR_FORWARD_ADDR) } YY_BREAK case 106: YY_RULE_SETUP -#line 314 "util/configlexer.lex" +#line 313 "util/configlexer.lex" { YDVAR(1, VAR_FORWARD_HOST) } YY_BREAK case 107: YY_RULE_SETUP -#line 315 "util/configlexer.lex" +#line 314 "util/configlexer.lex" { YDVAR(1, VAR_FORWARD_FIRST) } YY_BREAK case 108: YY_RULE_SETUP -#line 316 "util/configlexer.lex" +#line 315 "util/configlexer.lex" { YDVAR(1, VAR_FORWARD_NO_CACHE) } YY_BREAK case 109: YY_RULE_SETUP -#line 317 "util/configlexer.lex" +#line 316 "util/configlexer.lex" { YDVAR(1, VAR_FORWARD_SSL_UPSTREAM) } YY_BREAK case 110: YY_RULE_SETUP -#line 318 "util/configlexer.lex" +#line 317 "util/configlexer.lex" { YDVAR(1, VAR_FORWARD_SSL_UPSTREAM) } YY_BREAK case 111: YY_RULE_SETUP -#line 319 "util/configlexer.lex" +#line 318 "util/configlexer.lex" { YDVAR(0, VAR_AUTH_ZONE) } YY_BREAK case 112: YY_RULE_SETUP -#line 320 "util/configlexer.lex" +#line 319 "util/configlexer.lex" { YDVAR(1, VAR_ZONEFILE) } YY_BREAK case 113: YY_RULE_SETUP -#line 321 "util/configlexer.lex" +#line 320 "util/configlexer.lex" { YDVAR(1, VAR_MASTER) } YY_BREAK case 114: YY_RULE_SETUP -#line 322 "util/configlexer.lex" +#line 321 "util/configlexer.lex" { YDVAR(1, VAR_URL) } YY_BREAK case 115: YY_RULE_SETUP -#line 323 "util/configlexer.lex" +#line 322 "util/configlexer.lex" { YDVAR(1, VAR_ALLOW_NOTIFY) } YY_BREAK case 116: YY_RULE_SETUP -#line 324 "util/configlexer.lex" +#line 323 "util/configlexer.lex" { YDVAR(1, VAR_FOR_DOWNSTREAM) } YY_BREAK case 117: YY_RULE_SETUP -#line 325 "util/configlexer.lex" +#line 324 "util/configlexer.lex" { YDVAR(1, VAR_FOR_UPSTREAM) } YY_BREAK case 118: YY_RULE_SETUP -#line 326 "util/configlexer.lex" +#line 325 "util/configlexer.lex" { YDVAR(1, VAR_FALLBACK_ENABLED) } YY_BREAK case 119: YY_RULE_SETUP -#line 327 "util/configlexer.lex" +#line 326 "util/configlexer.lex" { YDVAR(0, VAR_VIEW) } YY_BREAK case 120: YY_RULE_SETUP -#line 328 "util/configlexer.lex" +#line 327 "util/configlexer.lex" { YDVAR(1, VAR_VIEW_FIRST) } YY_BREAK case 121: YY_RULE_SETUP -#line 329 "util/configlexer.lex" +#line 328 "util/configlexer.lex" { YDVAR(1, VAR_DO_NOT_QUERY_ADDRESS) } YY_BREAK case 122: YY_RULE_SETUP -#line 330 "util/configlexer.lex" +#line 329 "util/configlexer.lex" { YDVAR(1, VAR_DO_NOT_QUERY_LOCALHOST) } YY_BREAK case 123: YY_RULE_SETUP -#line 331 "util/configlexer.lex" +#line 330 "util/configlexer.lex" { YDVAR(2, VAR_ACCESS_CONTROL) } YY_BREAK case 124: YY_RULE_SETUP -#line 332 "util/configlexer.lex" +#line 331 "util/configlexer.lex" { YDVAR(1, VAR_SEND_CLIENT_SUBNET) } YY_BREAK case 125: YY_RULE_SETUP -#line 333 "util/configlexer.lex" +#line 332 "util/configlexer.lex" { YDVAR(1, VAR_CLIENT_SUBNET_ZONE) } YY_BREAK case 126: YY_RULE_SETUP -#line 334 "util/configlexer.lex" +#line 333 "util/configlexer.lex" { YDVAR(1, VAR_CLIENT_SUBNET_ALWAYS_FORWARD) } YY_BREAK case 127: YY_RULE_SETUP -#line 335 "util/configlexer.lex" +#line 334 "util/configlexer.lex" { YDVAR(1, VAR_CLIENT_SUBNET_OPCODE) } YY_BREAK case 128: YY_RULE_SETUP -#line 336 "util/configlexer.lex" +#line 335 "util/configlexer.lex" { YDVAR(1, VAR_MAX_CLIENT_SUBNET_IPV4) } YY_BREAK case 129: YY_RULE_SETUP -#line 337 "util/configlexer.lex" +#line 336 "util/configlexer.lex" { YDVAR(1, VAR_MAX_CLIENT_SUBNET_IPV6) } YY_BREAK case 130: YY_RULE_SETUP -#line 338 "util/configlexer.lex" +#line 337 "util/configlexer.lex" { YDVAR(1, VAR_MIN_CLIENT_SUBNET_IPV4) } YY_BREAK case 131: YY_RULE_SETUP -#line 339 "util/configlexer.lex" +#line 338 "util/configlexer.lex" { YDVAR(1, VAR_MIN_CLIENT_SUBNET_IPV6) } YY_BREAK case 132: YY_RULE_SETUP -#line 340 "util/configlexer.lex" +#line 339 "util/configlexer.lex" { YDVAR(1, VAR_MAX_ECS_TREE_SIZE_IPV4) } YY_BREAK case 133: YY_RULE_SETUP -#line 341 "util/configlexer.lex" +#line 340 "util/configlexer.lex" { YDVAR(1, VAR_MAX_ECS_TREE_SIZE_IPV6) } YY_BREAK case 134: YY_RULE_SETUP -#line 342 "util/configlexer.lex" +#line 341 "util/configlexer.lex" { YDVAR(1, VAR_HIDE_IDENTITY) } YY_BREAK case 135: YY_RULE_SETUP -#line 343 "util/configlexer.lex" +#line 342 "util/configlexer.lex" { YDVAR(1, VAR_HIDE_VERSION) } YY_BREAK case 136: YY_RULE_SETUP -#line 344 "util/configlexer.lex" +#line 343 "util/configlexer.lex" { YDVAR(1, VAR_HIDE_TRUSTANCHOR) } YY_BREAK case 137: YY_RULE_SETUP -#line 345 "util/configlexer.lex" +#line 344 "util/configlexer.lex" { YDVAR(1, VAR_IDENTITY) } YY_BREAK case 138: YY_RULE_SETUP -#line 346 "util/configlexer.lex" +#line 345 "util/configlexer.lex" { YDVAR(1, VAR_VERSION) } YY_BREAK case 139: YY_RULE_SETUP -#line 347 "util/configlexer.lex" +#line 346 "util/configlexer.lex" { YDVAR(1, VAR_MODULE_CONF) } YY_BREAK case 140: YY_RULE_SETUP -#line 348 "util/configlexer.lex" +#line 347 "util/configlexer.lex" { YDVAR(1, VAR_DLV_ANCHOR) } YY_BREAK case 141: YY_RULE_SETUP -#line 349 "util/configlexer.lex" +#line 348 "util/configlexer.lex" { YDVAR(1, VAR_DLV_ANCHOR_FILE) } YY_BREAK case 142: YY_RULE_SETUP -#line 350 "util/configlexer.lex" +#line 349 "util/configlexer.lex" { YDVAR(1, VAR_TRUST_ANCHOR_FILE) } YY_BREAK case 143: YY_RULE_SETUP -#line 351 "util/configlexer.lex" +#line 350 "util/configlexer.lex" { YDVAR(1, VAR_AUTO_TRUST_ANCHOR_FILE) } YY_BREAK case 144: YY_RULE_SETUP -#line 352 "util/configlexer.lex" +#line 351 "util/configlexer.lex" { YDVAR(1, VAR_TRUSTED_KEYS_FILE) } YY_BREAK case 145: YY_RULE_SETUP -#line 353 "util/configlexer.lex" +#line 352 "util/configlexer.lex" { YDVAR(1, VAR_TRUST_ANCHOR) } YY_BREAK case 146: YY_RULE_SETUP -#line 354 "util/configlexer.lex" +#line 353 "util/configlexer.lex" { YDVAR(1, VAR_TRUST_ANCHOR_SIGNALING) } YY_BREAK case 147: YY_RULE_SETUP -#line 355 "util/configlexer.lex" +#line 354 "util/configlexer.lex" { YDVAR(1, VAR_ROOT_KEY_SENTINEL) } YY_BREAK case 148: YY_RULE_SETUP -#line 356 "util/configlexer.lex" +#line 355 "util/configlexer.lex" { YDVAR(1, VAR_VAL_OVERRIDE_DATE) } YY_BREAK case 149: YY_RULE_SETUP -#line 357 "util/configlexer.lex" +#line 356 "util/configlexer.lex" { YDVAR(1, VAR_VAL_SIG_SKEW_MIN) } YY_BREAK case 150: YY_RULE_SETUP -#line 358 "util/configlexer.lex" +#line 357 "util/configlexer.lex" { YDVAR(1, VAR_VAL_SIG_SKEW_MAX) } YY_BREAK case 151: YY_RULE_SETUP -#line 359 "util/configlexer.lex" +#line 358 "util/configlexer.lex" { YDVAR(1, VAR_BOGUS_TTL) } YY_BREAK case 152: YY_RULE_SETUP -#line 360 "util/configlexer.lex" +#line 359 "util/configlexer.lex" { YDVAR(1, VAR_VAL_CLEAN_ADDITIONAL) } YY_BREAK case 153: YY_RULE_SETUP -#line 361 "util/configlexer.lex" +#line 360 "util/configlexer.lex" { YDVAR(1, VAR_VAL_PERMISSIVE_MODE) } YY_BREAK case 154: YY_RULE_SETUP -#line 362 "util/configlexer.lex" +#line 361 "util/configlexer.lex" { YDVAR(1, VAR_AGGRESSIVE_NSEC) } YY_BREAK case 155: YY_RULE_SETUP -#line 363 "util/configlexer.lex" +#line 362 "util/configlexer.lex" { YDVAR(1, VAR_IGNORE_CD_FLAG) } YY_BREAK case 156: YY_RULE_SETUP -#line 364 "util/configlexer.lex" +#line 363 "util/configlexer.lex" { YDVAR(1, VAR_SERVE_EXPIRED) } YY_BREAK case 157: YY_RULE_SETUP -#line 365 "util/configlexer.lex" +#line 364 "util/configlexer.lex" { YDVAR(1, VAR_SERVE_EXPIRED_TTL) } YY_BREAK case 158: YY_RULE_SETUP -#line 366 "util/configlexer.lex" +#line 365 "util/configlexer.lex" { YDVAR(1, VAR_SERVE_EXPIRED_TTL_RESET) } YY_BREAK case 159: YY_RULE_SETUP -#line 367 "util/configlexer.lex" +#line 366 "util/configlexer.lex" { YDVAR(1, VAR_FAKE_DSA) } YY_BREAK case 160: YY_RULE_SETUP -#line 368 "util/configlexer.lex" +#line 367 "util/configlexer.lex" { YDVAR(1, VAR_FAKE_SHA1) } YY_BREAK case 161: YY_RULE_SETUP -#line 369 "util/configlexer.lex" +#line 368 "util/configlexer.lex" { YDVAR(1, VAR_VAL_LOG_LEVEL) } YY_BREAK case 162: YY_RULE_SETUP -#line 370 "util/configlexer.lex" +#line 369 "util/configlexer.lex" { YDVAR(1, VAR_KEY_CACHE_SIZE) } YY_BREAK case 163: YY_RULE_SETUP -#line 371 "util/configlexer.lex" +#line 370 "util/configlexer.lex" { YDVAR(1, VAR_KEY_CACHE_SLABS) } YY_BREAK case 164: YY_RULE_SETUP -#line 372 "util/configlexer.lex" +#line 371 "util/configlexer.lex" { YDVAR(1, VAR_NEG_CACHE_SIZE) } YY_BREAK case 165: YY_RULE_SETUP -#line 373 "util/configlexer.lex" +#line 372 "util/configlexer.lex" { YDVAR(1, VAR_VAL_NSEC3_KEYSIZE_ITERATIONS) } YY_BREAK case 166: YY_RULE_SETUP -#line 375 "util/configlexer.lex" +#line 374 "util/configlexer.lex" { YDVAR(1, VAR_ADD_HOLDDOWN) } YY_BREAK case 167: YY_RULE_SETUP -#line 376 "util/configlexer.lex" +#line 375 "util/configlexer.lex" { YDVAR(1, VAR_DEL_HOLDDOWN) } YY_BREAK case 168: YY_RULE_SETUP -#line 377 "util/configlexer.lex" +#line 376 "util/configlexer.lex" { YDVAR(1, VAR_KEEP_MISSING) } YY_BREAK case 169: YY_RULE_SETUP -#line 378 "util/configlexer.lex" +#line 377 "util/configlexer.lex" { YDVAR(1, VAR_PERMIT_SMALL_HOLDDOWN) } YY_BREAK case 170: YY_RULE_SETUP -#line 379 "util/configlexer.lex" +#line 378 "util/configlexer.lex" { YDVAR(1, VAR_USE_SYSLOG) } YY_BREAK case 171: YY_RULE_SETUP -#line 380 "util/configlexer.lex" +#line 379 "util/configlexer.lex" { YDVAR(1, VAR_LOG_IDENTITY) } YY_BREAK case 172: YY_RULE_SETUP -#line 381 "util/configlexer.lex" +#line 380 "util/configlexer.lex" { YDVAR(1, VAR_LOG_TIME_ASCII) } YY_BREAK case 173: YY_RULE_SETUP -#line 382 "util/configlexer.lex" +#line 381 "util/configlexer.lex" { YDVAR(1, VAR_LOG_QUERIES) } YY_BREAK case 174: YY_RULE_SETUP -#line 383 "util/configlexer.lex" +#line 382 "util/configlexer.lex" { YDVAR(1, VAR_LOG_REPLIES) } YY_BREAK case 175: YY_RULE_SETUP -#line 384 "util/configlexer.lex" +#line 383 "util/configlexer.lex" { YDVAR(1, VAR_LOG_TAG_QUERYREPLY) } YY_BREAK case 176: YY_RULE_SETUP -#line 385 "util/configlexer.lex" +#line 384 "util/configlexer.lex" { YDVAR(1, VAR_LOG_LOCAL_ACTIONS) } YY_BREAK case 177: YY_RULE_SETUP -#line 386 "util/configlexer.lex" +#line 385 "util/configlexer.lex" { YDVAR(1, VAR_LOG_SERVFAIL) } YY_BREAK case 178: YY_RULE_SETUP -#line 387 "util/configlexer.lex" +#line 386 "util/configlexer.lex" { YDVAR(2, VAR_LOCAL_ZONE) } YY_BREAK case 179: YY_RULE_SETUP -#line 388 "util/configlexer.lex" +#line 387 "util/configlexer.lex" { YDVAR(1, VAR_LOCAL_DATA) } YY_BREAK case 180: YY_RULE_SETUP -#line 389 "util/configlexer.lex" +#line 388 "util/configlexer.lex" { YDVAR(1, VAR_LOCAL_DATA_PTR) } YY_BREAK case 181: YY_RULE_SETUP -#line 390 "util/configlexer.lex" +#line 389 "util/configlexer.lex" { YDVAR(1, VAR_UNBLOCK_LAN_ZONES) } YY_BREAK case 182: YY_RULE_SETUP -#line 391 "util/configlexer.lex" +#line 390 "util/configlexer.lex" { YDVAR(1, VAR_INSECURE_LAN_ZONES) } YY_BREAK case 183: YY_RULE_SETUP -#line 392 "util/configlexer.lex" +#line 391 "util/configlexer.lex" { YDVAR(1, VAR_STATISTICS_INTERVAL) } YY_BREAK case 184: YY_RULE_SETUP -#line 393 "util/configlexer.lex" +#line 392 "util/configlexer.lex" { YDVAR(1, VAR_STATISTICS_CUMULATIVE) } YY_BREAK case 185: YY_RULE_SETUP -#line 394 "util/configlexer.lex" +#line 393 "util/configlexer.lex" { YDVAR(1, VAR_EXTENDED_STATISTICS) } YY_BREAK case 186: YY_RULE_SETUP -#line 395 "util/configlexer.lex" +#line 394 "util/configlexer.lex" { YDVAR(1, VAR_SHM_ENABLE) } YY_BREAK case 187: YY_RULE_SETUP -#line 396 "util/configlexer.lex" +#line 395 "util/configlexer.lex" { YDVAR(1, VAR_SHM_KEY) } YY_BREAK case 188: YY_RULE_SETUP -#line 397 "util/configlexer.lex" +#line 396 "util/configlexer.lex" { YDVAR(0, VAR_REMOTE_CONTROL) } YY_BREAK case 189: YY_RULE_SETUP -#line 398 "util/configlexer.lex" +#line 397 "util/configlexer.lex" { YDVAR(1, VAR_CONTROL_ENABLE) } YY_BREAK case 190: YY_RULE_SETUP -#line 399 "util/configlexer.lex" +#line 398 "util/configlexer.lex" { YDVAR(1, VAR_CONTROL_INTERFACE) } YY_BREAK case 191: YY_RULE_SETUP -#line 400 "util/configlexer.lex" +#line 399 "util/configlexer.lex" { YDVAR(1, VAR_CONTROL_PORT) } YY_BREAK case 192: YY_RULE_SETUP -#line 401 "util/configlexer.lex" +#line 400 "util/configlexer.lex" { YDVAR(1, VAR_CONTROL_USE_CERT) } YY_BREAK case 193: YY_RULE_SETUP -#line 402 "util/configlexer.lex" +#line 401 "util/configlexer.lex" { YDVAR(1, VAR_SERVER_KEY_FILE) } YY_BREAK case 194: YY_RULE_SETUP -#line 403 "util/configlexer.lex" +#line 402 "util/configlexer.lex" { YDVAR(1, VAR_SERVER_CERT_FILE) } YY_BREAK case 195: YY_RULE_SETUP -#line 404 "util/configlexer.lex" +#line 403 "util/configlexer.lex" { YDVAR(1, VAR_CONTROL_KEY_FILE) } YY_BREAK case 196: YY_RULE_SETUP -#line 405 "util/configlexer.lex" +#line 404 "util/configlexer.lex" { YDVAR(1, VAR_CONTROL_CERT_FILE) } YY_BREAK case 197: YY_RULE_SETUP -#line 406 "util/configlexer.lex" +#line 405 "util/configlexer.lex" { YDVAR(1, VAR_PYTHON_SCRIPT) } YY_BREAK case 198: YY_RULE_SETUP -#line 407 "util/configlexer.lex" +#line 406 "util/configlexer.lex" { YDVAR(0, VAR_PYTHON) } YY_BREAK case 199: YY_RULE_SETUP -#line 408 "util/configlexer.lex" +#line 407 "util/configlexer.lex" { YDVAR(1, VAR_DOMAIN_INSECURE) } YY_BREAK case 200: YY_RULE_SETUP -#line 409 "util/configlexer.lex" +#line 408 "util/configlexer.lex" { YDVAR(1, VAR_MINIMAL_RESPONSES) } YY_BREAK case 201: YY_RULE_SETUP -#line 410 "util/configlexer.lex" +#line 409 "util/configlexer.lex" { YDVAR(1, VAR_RRSET_ROUNDROBIN) } YY_BREAK case 202: YY_RULE_SETUP -#line 411 "util/configlexer.lex" +#line 410 "util/configlexer.lex" { YDVAR(1, VAR_UNKNOWN_SERVER_TIME_LIMIT) } YY_BREAK case 203: YY_RULE_SETUP -#line 412 "util/configlexer.lex" +#line 411 "util/configlexer.lex" { YDVAR(1, VAR_MAX_UDP_SIZE) } YY_BREAK case 204: YY_RULE_SETUP -#line 413 "util/configlexer.lex" +#line 412 "util/configlexer.lex" { YDVAR(1, VAR_DNS64_PREFIX) } YY_BREAK case 205: YY_RULE_SETUP -#line 414 "util/configlexer.lex" +#line 413 "util/configlexer.lex" { YDVAR(1, VAR_DNS64_SYNTHALL) } YY_BREAK case 206: YY_RULE_SETUP -#line 415 "util/configlexer.lex" +#line 414 "util/configlexer.lex" { YDVAR(1, VAR_DNS64_IGNORE_AAAA) } YY_BREAK case 207: YY_RULE_SETUP -#line 416 "util/configlexer.lex" +#line 415 "util/configlexer.lex" { YDVAR(1, VAR_DEFINE_TAG) } YY_BREAK case 208: YY_RULE_SETUP -#line 417 "util/configlexer.lex" +#line 416 "util/configlexer.lex" { YDVAR(2, VAR_LOCAL_ZONE_TAG) } YY_BREAK case 209: YY_RULE_SETUP -#line 418 "util/configlexer.lex" +#line 417 "util/configlexer.lex" { YDVAR(2, VAR_ACCESS_CONTROL_TAG) } YY_BREAK case 210: YY_RULE_SETUP -#line 419 "util/configlexer.lex" +#line 418 "util/configlexer.lex" { YDVAR(3, VAR_ACCESS_CONTROL_TAG_ACTION) } YY_BREAK case 211: YY_RULE_SETUP -#line 420 "util/configlexer.lex" +#line 419 "util/configlexer.lex" { YDVAR(3, VAR_ACCESS_CONTROL_TAG_DATA) } YY_BREAK case 212: YY_RULE_SETUP -#line 421 "util/configlexer.lex" +#line 420 "util/configlexer.lex" { YDVAR(2, VAR_ACCESS_CONTROL_VIEW) } YY_BREAK case 213: YY_RULE_SETUP -#line 422 "util/configlexer.lex" +#line 421 "util/configlexer.lex" { YDVAR(3, VAR_LOCAL_ZONE_OVERRIDE) } YY_BREAK case 214: YY_RULE_SETUP -#line 423 "util/configlexer.lex" +#line 422 "util/configlexer.lex" { YDVAR(0, VAR_DNSTAP) } YY_BREAK case 215: YY_RULE_SETUP -#line 424 "util/configlexer.lex" +#line 423 "util/configlexer.lex" { YDVAR(1, VAR_DNSTAP_ENABLE) } YY_BREAK case 216: YY_RULE_SETUP -#line 425 "util/configlexer.lex" +#line 424 "util/configlexer.lex" { YDVAR(1, VAR_DNSTAP_SOCKET_PATH) } YY_BREAK case 217: YY_RULE_SETUP -#line 426 "util/configlexer.lex" +#line 425 "util/configlexer.lex" { YDVAR(1, VAR_DNSTAP_SEND_IDENTITY) } YY_BREAK case 218: YY_RULE_SETUP -#line 427 "util/configlexer.lex" +#line 426 "util/configlexer.lex" { YDVAR(1, VAR_DNSTAP_SEND_VERSION) } YY_BREAK case 219: YY_RULE_SETUP -#line 428 "util/configlexer.lex" +#line 427 "util/configlexer.lex" { YDVAR(1, VAR_DNSTAP_IDENTITY) } YY_BREAK case 220: YY_RULE_SETUP -#line 429 "util/configlexer.lex" +#line 428 "util/configlexer.lex" { YDVAR(1, VAR_DNSTAP_VERSION) } YY_BREAK case 221: YY_RULE_SETUP -#line 430 "util/configlexer.lex" +#line 429 "util/configlexer.lex" { YDVAR(1, VAR_DNSTAP_LOG_RESOLVER_QUERY_MESSAGES) } YY_BREAK case 222: YY_RULE_SETUP -#line 432 "util/configlexer.lex" +#line 431 "util/configlexer.lex" { YDVAR(1, VAR_DNSTAP_LOG_RESOLVER_RESPONSE_MESSAGES) } YY_BREAK case 223: YY_RULE_SETUP -#line 434 "util/configlexer.lex" +#line 433 "util/configlexer.lex" { YDVAR(1, VAR_DNSTAP_LOG_CLIENT_QUERY_MESSAGES) } YY_BREAK case 224: YY_RULE_SETUP -#line 436 "util/configlexer.lex" +#line 435 "util/configlexer.lex" { YDVAR(1, VAR_DNSTAP_LOG_CLIENT_RESPONSE_MESSAGES) } YY_BREAK case 225: YY_RULE_SETUP -#line 438 "util/configlexer.lex" +#line 437 "util/configlexer.lex" { YDVAR(1, VAR_DNSTAP_LOG_FORWARDER_QUERY_MESSAGES) } YY_BREAK case 226: YY_RULE_SETUP -#line 440 "util/configlexer.lex" +#line 439 "util/configlexer.lex" { YDVAR(1, VAR_DNSTAP_LOG_FORWARDER_RESPONSE_MESSAGES) } YY_BREAK case 227: YY_RULE_SETUP -#line 442 "util/configlexer.lex" +#line 441 "util/configlexer.lex" { YDVAR(1, VAR_DISABLE_DNSSEC_LAME_CHECK) } YY_BREAK case 228: YY_RULE_SETUP -#line 443 "util/configlexer.lex" +#line 442 "util/configlexer.lex" { YDVAR(1, VAR_IP_RATELIMIT) } YY_BREAK case 229: YY_RULE_SETUP -#line 444 "util/configlexer.lex" +#line 443 "util/configlexer.lex" { YDVAR(1, VAR_RATELIMIT) } YY_BREAK case 230: YY_RULE_SETUP -#line 445 "util/configlexer.lex" +#line 444 "util/configlexer.lex" { YDVAR(1, VAR_IP_RATELIMIT_SLABS) } YY_BREAK case 231: YY_RULE_SETUP -#line 446 "util/configlexer.lex" +#line 445 "util/configlexer.lex" { YDVAR(1, VAR_RATELIMIT_SLABS) } YY_BREAK case 232: YY_RULE_SETUP -#line 447 "util/configlexer.lex" +#line 446 "util/configlexer.lex" { YDVAR(1, VAR_IP_RATELIMIT_SIZE) } YY_BREAK case 233: YY_RULE_SETUP -#line 448 "util/configlexer.lex" +#line 447 "util/configlexer.lex" { YDVAR(1, VAR_RATELIMIT_SIZE) } YY_BREAK case 234: YY_RULE_SETUP -#line 449 "util/configlexer.lex" +#line 448 "util/configlexer.lex" { YDVAR(2, VAR_RATELIMIT_FOR_DOMAIN) } YY_BREAK case 235: YY_RULE_SETUP -#line 450 "util/configlexer.lex" +#line 449 "util/configlexer.lex" { YDVAR(2, VAR_RATELIMIT_BELOW_DOMAIN) } YY_BREAK case 236: YY_RULE_SETUP -#line 451 "util/configlexer.lex" +#line 450 "util/configlexer.lex" { YDVAR(1, VAR_IP_RATELIMIT_FACTOR) } YY_BREAK case 237: YY_RULE_SETUP -#line 452 "util/configlexer.lex" +#line 451 "util/configlexer.lex" { YDVAR(1, VAR_RATELIMIT_FACTOR) } YY_BREAK case 238: YY_RULE_SETUP -#line 453 "util/configlexer.lex" +#line 452 "util/configlexer.lex" { YDVAR(1, VAR_LOW_RTT) } YY_BREAK case 239: YY_RULE_SETUP -#line 454 "util/configlexer.lex" +#line 453 "util/configlexer.lex" { YDVAR(1, VAR_FAST_SERVER_NUM) } YY_BREAK case 240: YY_RULE_SETUP -#line 455 "util/configlexer.lex" +#line 454 "util/configlexer.lex" { YDVAR(1, VAR_FAST_SERVER_PERMIL) } YY_BREAK case 241: YY_RULE_SETUP -#line 456 "util/configlexer.lex" +#line 455 "util/configlexer.lex" { YDVAR(1, VAR_FAST_SERVER_PERMIL) } YY_BREAK case 242: YY_RULE_SETUP -#line 457 "util/configlexer.lex" +#line 456 "util/configlexer.lex" { YDVAR(1, VAR_FAST_SERVER_PERMIL) } YY_BREAK case 243: YY_RULE_SETUP -#line 458 "util/configlexer.lex" +#line 457 "util/configlexer.lex" { YDVAR(2, VAR_RESPONSE_IP_TAG) } YY_BREAK case 244: YY_RULE_SETUP -#line 459 "util/configlexer.lex" +#line 458 "util/configlexer.lex" { YDVAR(2, VAR_RESPONSE_IP) } YY_BREAK case 245: YY_RULE_SETUP -#line 460 "util/configlexer.lex" +#line 459 "util/configlexer.lex" { YDVAR(2, VAR_RESPONSE_IP_DATA) } YY_BREAK case 246: YY_RULE_SETUP -#line 461 "util/configlexer.lex" +#line 460 "util/configlexer.lex" { YDVAR(0, VAR_DNSCRYPT) } YY_BREAK case 247: YY_RULE_SETUP -#line 462 "util/configlexer.lex" +#line 461 "util/configlexer.lex" { YDVAR(1, VAR_DNSCRYPT_ENABLE) } YY_BREAK case 248: YY_RULE_SETUP -#line 463 "util/configlexer.lex" +#line 462 "util/configlexer.lex" { YDVAR(1, VAR_DNSCRYPT_PORT) } YY_BREAK case 249: YY_RULE_SETUP -#line 464 "util/configlexer.lex" +#line 463 "util/configlexer.lex" { YDVAR(1, VAR_DNSCRYPT_PROVIDER) } YY_BREAK case 250: YY_RULE_SETUP -#line 465 "util/configlexer.lex" +#line 464 "util/configlexer.lex" { YDVAR(1, VAR_DNSCRYPT_SECRET_KEY) } YY_BREAK case 251: YY_RULE_SETUP -#line 466 "util/configlexer.lex" +#line 465 "util/configlexer.lex" { YDVAR(1, VAR_DNSCRYPT_PROVIDER_CERT) } YY_BREAK case 252: YY_RULE_SETUP -#line 467 "util/configlexer.lex" +#line 466 "util/configlexer.lex" { YDVAR(1, VAR_DNSCRYPT_PROVIDER_CERT_ROTATED) } YY_BREAK case 253: YY_RULE_SETUP -#line 468 "util/configlexer.lex" +#line 467 "util/configlexer.lex" { YDVAR(1, VAR_DNSCRYPT_SHARED_SECRET_CACHE_SIZE) } YY_BREAK case 254: YY_RULE_SETUP -#line 470 "util/configlexer.lex" +#line 469 "util/configlexer.lex" { YDVAR(1, VAR_DNSCRYPT_SHARED_SECRET_CACHE_SLABS) } YY_BREAK case 255: YY_RULE_SETUP -#line 472 "util/configlexer.lex" +#line 471 "util/configlexer.lex" { YDVAR(1, VAR_DNSCRYPT_NONCE_CACHE_SIZE) } YY_BREAK case 256: YY_RULE_SETUP -#line 473 "util/configlexer.lex" +#line 472 "util/configlexer.lex" { YDVAR(1, VAR_DNSCRYPT_NONCE_CACHE_SLABS) } YY_BREAK case 257: YY_RULE_SETUP -#line 474 "util/configlexer.lex" +#line 473 "util/configlexer.lex" { YDVAR(1, VAR_IPSECMOD_ENABLED) } YY_BREAK case 258: YY_RULE_SETUP -#line 475 "util/configlexer.lex" +#line 474 "util/configlexer.lex" { YDVAR(1, VAR_IPSECMOD_IGNORE_BOGUS) } YY_BREAK case 259: YY_RULE_SETUP -#line 476 "util/configlexer.lex" +#line 475 "util/configlexer.lex" { YDVAR(1, VAR_IPSECMOD_HOOK) } YY_BREAK case 260: YY_RULE_SETUP -#line 477 "util/configlexer.lex" +#line 476 "util/configlexer.lex" { YDVAR(1, VAR_IPSECMOD_MAX_TTL) } YY_BREAK case 261: YY_RULE_SETUP -#line 478 "util/configlexer.lex" +#line 477 "util/configlexer.lex" { YDVAR(1, VAR_IPSECMOD_WHITELIST) } YY_BREAK case 262: YY_RULE_SETUP -#line 479 "util/configlexer.lex" +#line 478 "util/configlexer.lex" { YDVAR(1, VAR_IPSECMOD_STRICT) } YY_BREAK case 263: YY_RULE_SETUP -#line 480 "util/configlexer.lex" +#line 479 "util/configlexer.lex" { YDVAR(0, VAR_CACHEDB) } YY_BREAK case 264: YY_RULE_SETUP -#line 481 "util/configlexer.lex" +#line 480 "util/configlexer.lex" { YDVAR(1, VAR_CACHEDB_BACKEND) } YY_BREAK case 265: YY_RULE_SETUP -#line 482 "util/configlexer.lex" +#line 481 "util/configlexer.lex" { YDVAR(1, VAR_CACHEDB_SECRETSEED) } YY_BREAK case 266: YY_RULE_SETUP -#line 483 "util/configlexer.lex" +#line 482 "util/configlexer.lex" { YDVAR(1, VAR_CACHEDB_REDISHOST) } YY_BREAK case 267: YY_RULE_SETUP -#line 484 "util/configlexer.lex" +#line 483 "util/configlexer.lex" { YDVAR(1, VAR_CACHEDB_REDISPORT) } YY_BREAK case 268: YY_RULE_SETUP -#line 485 "util/configlexer.lex" +#line 484 "util/configlexer.lex" { YDVAR(1, VAR_CACHEDB_REDISTIMEOUT) } YY_BREAK case 269: YY_RULE_SETUP -#line 486 "util/configlexer.lex" -{ YDVAR(1, VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM) } +#line 485 "util/configlexer.lex" +{ YDVAR(0, VAR_IPSET) } YY_BREAK case 270: YY_RULE_SETUP -#line 487 "util/configlexer.lex" -{ YDVAR(2, VAR_TCP_CONNECTION_LIMIT) } +#line 486 "util/configlexer.lex" +{ YDVAR(1, VAR_IPSET_NAME_V4) } YY_BREAK case 271: -/* rule 271 can match eol */ +YY_RULE_SETUP +#line 487 "util/configlexer.lex" +{ YDVAR(1, VAR_IPSET_NAME_V6) } + YY_BREAK +case 272: YY_RULE_SETUP #line 488 "util/configlexer.lex" +{ YDVAR(1, VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM) } + YY_BREAK +case 273: +YY_RULE_SETUP +#line 489 "util/configlexer.lex" +{ YDVAR(2, VAR_TCP_CONNECTION_LIMIT) } + YY_BREAK +case 274: +/* rule 274 can match eol */ +YY_RULE_SETUP +#line 490 "util/configlexer.lex" { LEXOUT(("NL\n")); cfg_parser->line++; } YY_BREAK /* Quoted strings. Strip leading and ending quotes */ -case 272: +case 275: YY_RULE_SETUP -#line 491 "util/configlexer.lex" +#line 493 "util/configlexer.lex" { BEGIN(quotedstring); LEXOUT(("QS ")); } YY_BREAK case YY_STATE_EOF(quotedstring): -#line 492 "util/configlexer.lex" +#line 494 "util/configlexer.lex" { yyerror("EOF inside quoted string"); if(--num_args == 0) { BEGIN(INITIAL); } else { BEGIN(val); } } YY_BREAK -case 273: +case 276: YY_RULE_SETUP -#line 497 "util/configlexer.lex" +#line 499 "util/configlexer.lex" { LEXOUT(("STR(%s) ", yytext)); yymore(); } YY_BREAK -case 274: -/* rule 274 can match eol */ +case 277: +/* rule 277 can match eol */ YY_RULE_SETUP -#line 498 "util/configlexer.lex" +#line 500 "util/configlexer.lex" { yyerror("newline inside quoted string, no end \""); cfg_parser->line++; BEGIN(INITIAL); } YY_BREAK -case 275: +case 278: YY_RULE_SETUP -#line 500 "util/configlexer.lex" +#line 502 "util/configlexer.lex" { LEXOUT(("QE ")); if(--num_args == 0) { BEGIN(INITIAL); } @@ -5136,34 +5149,34 @@ YY_RULE_SETUP } YY_BREAK /* Single Quoted strings. Strip leading and ending quotes */ -case 276: +case 279: YY_RULE_SETUP -#line 512 "util/configlexer.lex" +#line 514 "util/configlexer.lex" { BEGIN(singlequotedstr); LEXOUT(("SQS ")); } YY_BREAK case YY_STATE_EOF(singlequotedstr): -#line 513 "util/configlexer.lex" +#line 515 "util/configlexer.lex" { yyerror("EOF inside quoted string"); if(--num_args == 0) { BEGIN(INITIAL); } else { BEGIN(val); } } YY_BREAK -case 277: +case 280: YY_RULE_SETUP -#line 518 "util/configlexer.lex" +#line 520 "util/configlexer.lex" { LEXOUT(("STR(%s) ", yytext)); yymore(); } YY_BREAK -case 278: -/* rule 278 can match eol */ +case 281: +/* rule 281 can match eol */ YY_RULE_SETUP -#line 519 "util/configlexer.lex" +#line 521 "util/configlexer.lex" { yyerror("newline inside quoted string, no end '"); cfg_parser->line++; BEGIN(INITIAL); } YY_BREAK -case 279: +case 282: YY_RULE_SETUP -#line 521 "util/configlexer.lex" +#line 523 "util/configlexer.lex" { LEXOUT(("SQE ")); if(--num_args == 0) { BEGIN(INITIAL); } @@ -5176,38 +5189,38 @@ YY_RULE_SETUP } YY_BREAK /* include: directive */ -case 280: +case 283: YY_RULE_SETUP -#line 533 "util/configlexer.lex" +#line 535 "util/configlexer.lex" { LEXOUT(("v(%s) ", yytext)); inc_prev = YYSTATE; BEGIN(include); } YY_BREAK case YY_STATE_EOF(include): -#line 535 "util/configlexer.lex" +#line 537 "util/configlexer.lex" { yyerror("EOF inside include directive"); BEGIN(inc_prev); } YY_BREAK -case 281: +case 284: YY_RULE_SETUP -#line 539 "util/configlexer.lex" +#line 541 "util/configlexer.lex" { LEXOUT(("ISP ")); /* ignore */ } YY_BREAK -case 282: -/* rule 282 can match eol */ +case 285: +/* rule 285 can match eol */ YY_RULE_SETUP -#line 540 "util/configlexer.lex" +#line 542 "util/configlexer.lex" { LEXOUT(("NL\n")); cfg_parser->line++;} YY_BREAK -case 283: +case 286: YY_RULE_SETUP -#line 541 "util/configlexer.lex" +#line 543 "util/configlexer.lex" { LEXOUT(("IQS ")); BEGIN(include_quoted); } YY_BREAK -case 284: +case 287: YY_RULE_SETUP -#line 542 "util/configlexer.lex" +#line 544 "util/configlexer.lex" { LEXOUT(("Iunquotedstr(%s) ", yytext)); config_start_include_glob(yytext); @@ -5215,27 +5228,27 @@ YY_RULE_SETUP } YY_BREAK case YY_STATE_EOF(include_quoted): -#line 547 "util/configlexer.lex" +#line 549 "util/configlexer.lex" { yyerror("EOF inside quoted string"); BEGIN(inc_prev); } YY_BREAK -case 285: +case 288: YY_RULE_SETUP -#line 551 "util/configlexer.lex" +#line 553 "util/configlexer.lex" { LEXOUT(("ISTR(%s) ", yytext)); yymore(); } YY_BREAK -case 286: -/* rule 286 can match eol */ +case 289: +/* rule 289 can match eol */ YY_RULE_SETUP -#line 552 "util/configlexer.lex" +#line 554 "util/configlexer.lex" { yyerror("newline before \" in include name"); cfg_parser->line++; BEGIN(inc_prev); } YY_BREAK -case 287: +case 290: YY_RULE_SETUP -#line 554 "util/configlexer.lex" +#line 556 "util/configlexer.lex" { LEXOUT(("IQE ")); yytext[yyleng - 1] = '\0'; @@ -5245,7 +5258,7 @@ YY_RULE_SETUP YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(val): -#line 560 "util/configlexer.lex" +#line 562 "util/configlexer.lex" { LEXOUT(("LEXEOF ")); yy_set_bol(1); /* Set beginning of line, so "^" rules match. */ @@ -5257,33 +5270,33 @@ case YY_STATE_EOF(val): } } YY_BREAK -case 288: +case 291: YY_RULE_SETUP -#line 571 "util/configlexer.lex" +#line 573 "util/configlexer.lex" { LEXOUT(("unquotedstr(%s) ", yytext)); if(--num_args == 0) { BEGIN(INITIAL); } yylval.str = strdup(yytext); return STRING_ARG; } YY_BREAK -case 289: +case 292: YY_RULE_SETUP -#line 575 "util/configlexer.lex" +#line 577 "util/configlexer.lex" { ub_c_error_msg("unknown keyword '%s'", yytext); } YY_BREAK -case 290: +case 293: YY_RULE_SETUP -#line 579 "util/configlexer.lex" +#line 581 "util/configlexer.lex" { ub_c_error_msg("stray '%s'", yytext); } YY_BREAK -case 291: +case 294: YY_RULE_SETUP -#line 583 "util/configlexer.lex" +#line 585 "util/configlexer.lex" ECHO; YY_BREAK -#line 5285 "" +#line 5298 "" case YY_END_OF_BUFFER: { @@ -5359,7 +5372,7 @@ ECHO; { (yy_did_buffer_switch_on_eof) = 0; - if ( yywrap( ) ) + if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -5426,7 +5439,7 @@ static int yy_get_next_buffer (void) { char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *source = (yytext_ptr); - yy_size_t number_to_move, i; + int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) @@ -5455,7 +5468,7 @@ static int yy_get_next_buffer (void) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1; + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -5491,7 +5504,8 @@ static int yy_get_next_buffer (void) b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ); + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); } else /* Can't grow it, we don't own it. */ @@ -5523,7 +5537,7 @@ static int yy_get_next_buffer (void) if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ); + yyrestart( yyin ); } else @@ -5537,12 +5551,15 @@ static int yy_get_next_buffer (void) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } (yy_n_chars) += number_to_move; @@ -5574,10 +5591,10 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 2905 ) - yy_c = yy_meta[(unsigned int) yy_c]; + if ( yy_current_state >= 2913 ) + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; @@ -5602,11 +5619,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 2905 ) - yy_c = yy_meta[(unsigned int) yy_c]; + if ( yy_current_state >= 2913 ) + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - yy_is_jam = (yy_current_state == 2904); + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 2912); return yy_is_jam ? 0 : yy_current_state; } @@ -5639,7 +5656,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -5656,13 +5673,13 @@ static int yy_get_next_buffer (void) */ /* Reset buffer status. */ - yyrestart(yyin ); + yyrestart( yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap( ) ) + if ( yywrap( ) ) return 0; if ( ! (yy_did_buffer_switch_on_eof) ) @@ -5700,11 +5717,11 @@ static int yy_get_next_buffer (void) if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - yy_init_buffer(YY_CURRENT_BUFFER,input_file ); - yy_load_buffer_state( ); + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); } /** Switch to a different input buffer. @@ -5732,7 +5749,7 @@ static int yy_get_next_buffer (void) } YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); + yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag @@ -5760,7 +5777,7 @@ static void yy_load_buffer_state (void) { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -5769,13 +5786,13 @@ static void yy_load_buffer_state (void) /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yyalloc((yy_size_t) (b->yy_buf_size + 2) ); + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer(b,file ); + yy_init_buffer( b, file ); return b; } @@ -5794,9 +5811,9 @@ static void yy_load_buffer_state (void) YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ); + yyfree( (void *) b->yy_ch_buf ); - yyfree((void *) b ); + yyfree( (void *) b ); } /* Initializes or reinitializes a buffer. @@ -5808,7 +5825,7 @@ static void yy_load_buffer_state (void) { int oerrno = errno; - yy_flush_buffer(b ); + yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; @@ -5851,7 +5868,7 @@ static void yy_load_buffer_state (void) b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); + yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes @@ -5882,7 +5899,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } @@ -5901,7 +5918,7 @@ void yypop_buffer_state (void) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } @@ -5911,7 +5928,7 @@ void yypop_buffer_state (void) */ static void yyensure_buffer_stack (void) { - int num_to_alloc; + yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { @@ -5925,9 +5942,9 @@ static void yyensure_buffer_stack (void) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; @@ -5956,7 +5973,7 @@ static void yyensure_buffer_stack (void) * @param base the character buffer * @param size the size in bytes of the character buffer * - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { @@ -5968,7 +5985,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) /* They forgot to leave room for the EOB's. */ return NULL; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); @@ -5982,7 +5999,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer(b ); + yy_switch_to_buffer( b ); return b; } @@ -5995,10 +6012,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) +YY_BUFFER_STATE yy_scan_string (const char * yystr ) { - return yy_scan_bytes(yystr,(int) strlen(yystr) ); + return yy_scan_bytes( yystr, (int) strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -6008,7 +6025,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; @@ -6017,7 +6034,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc(n ); + buf = (char *) yyalloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); @@ -6026,7 +6043,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer(buf,n ); + b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -6042,9 +6059,9 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (yyconst char* msg ) +static void yynoreturn yy_fatal_error (const char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); + fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -6055,7 +6072,7 @@ static void yynoreturn yy_fatal_error (yyconst char* msg ) do \ { \ /* Undo effects of setting up yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ + int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ @@ -6072,7 +6089,7 @@ static void yynoreturn yy_fatal_error (yyconst char* msg ) */ int yyget_lineno (void) { - + return yylineno; } @@ -6179,7 +6196,7 @@ int yylex_destroy (void) /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ); + yy_delete_buffer( YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } @@ -6200,7 +6217,7 @@ int yylex_destroy (void) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +static void yy_flex_strncpy (char* s1, const char * s2, int n ) { int i; @@ -6210,7 +6227,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) +static int yy_flex_strlen (const char * s ) { int n; for ( n = 0; s[n]; ++n ) @@ -6245,7 +6262,6 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 583 "util/configlexer.lex" - +#line 585 "util/configlexer.lex" diff --git a/util/configlexer.lex b/util/configlexer.lex index 16b5bc5471b02110af50606124889b703e3d08eb..a86ddf55d9beb5f9e9957537e3a2549e419089f9 100644 --- a/util/configlexer.lex +++ b/util/configlexer.lex @@ -112,8 +112,7 @@ static void config_start_include_glob(const char* filename) /* check for wildcards */ #ifdef HAVE_GLOB glob_t g; - size_t i; - int r, flags; + int i, r, flags; if(!(!strchr(filename, '*') && !strchr(filename, '?') && !strchr(filename, '[') && !strchr(filename, '{') && !strchr(filename, '~'))) { flags = 0 @@ -144,7 +143,7 @@ static void config_start_include_glob(const char* filename) return; } /* process files found, if any */ - for(i=0; i<(size_t)g.gl_pathc; i++) { + for(i=(int)g.gl_pathc-1; i>=0; i--) { config_start_include(g.gl_pathv[i]); } globfree(&g); @@ -483,6 +482,9 @@ secret-seed{COLON} { YDVAR(1, VAR_CACHEDB_SECRETSEED) } redis-server-host{COLON} { YDVAR(1, VAR_CACHEDB_REDISHOST) } redis-server-port{COLON} { YDVAR(1, VAR_CACHEDB_REDISPORT) } redis-timeout{COLON} { YDVAR(1, VAR_CACHEDB_REDISTIMEOUT) } +ipset{COLON} { YDVAR(0, VAR_IPSET) } +name-v4{COLON} { YDVAR(1, VAR_IPSET_NAME_V4) } +name-v6{COLON} { YDVAR(1, VAR_IPSET_NAME_V6) } udp-upstream-without-downstream{COLON} { YDVAR(1, VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM) } tcp-connection-limit{COLON} { YDVAR(2, VAR_TCP_CONNECTION_LIMIT) } {NEWLINE} { LEXOUT(("NL\n")); cfg_parser->line++; } diff --git a/util/configparser.c b/util/configparser.c index b93319fae678c09ca5a52e39ff189dc6a60cd4f3..432ad48948c3f3a6850f83c17f57fab2948c8965 100644 --- a/util/configparser.c +++ b/util/configparser.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.5. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.5" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -389,7 +389,10 @@ extern int yydebug; VAR_STREAM_WAIT_SIZE = 518, VAR_TLS_CIPHERS = 519, VAR_TLS_CIPHERSUITES = 520, - VAR_TLS_SESSION_TICKET_KEYS = 521 + VAR_TLS_SESSION_TICKET_KEYS = 521, + VAR_IPSET = 522, + VAR_IPSET_NAME_V4 = 523, + VAR_IPSET_NAME_V6 = 524 }; #endif /* Tokens. */ @@ -657,6 +660,9 @@ extern int yydebug; #define VAR_TLS_CIPHERS 519 #define VAR_TLS_CIPHERSUITES 520 #define VAR_TLS_SESSION_TICKET_KEYS 521 +#define VAR_IPSET 522 +#define VAR_IPSET_NAME_V4 523 +#define VAR_IPSET_NAME_V6 524 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED @@ -667,7 +673,7 @@ union YYSTYPE char* str; -#line 671 "util/configparser.c" /* yacc.c:355 */ +#line 677 "util/configparser.c" /* yacc.c:355 */ }; typedef union YYSTYPE YYSTYPE; @@ -684,7 +690,7 @@ int yyparse (void); /* Copy the second part of user declarations. */ -#line 688 "util/configparser.c" /* yacc.c:358 */ +#line 694 "util/configparser.c" /* yacc.c:358 */ #ifdef short # undef short @@ -926,21 +932,21 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 536 +#define YYLAST 543 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 267 +#define YYNTOKENS 270 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 286 +#define YYNNTS 291 /* YYNRULES -- Number of rules. */ -#define YYNRULES 549 +#define YYNRULES 557 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 823 +#define YYNSTATES 833 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 521 +#define YYMAXUTOK 524 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -1001,68 +1007,69 @@ static const yytype_uint16 yytranslate[] = 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266 + 265, 266, 267, 268, 269 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 172, 172, 172, 173, 173, 174, 174, 175, 175, - 175, 176, 176, 177, 181, 186, 187, 188, 188, 188, - 189, 189, 190, 190, 191, 191, 192, 192, 192, 193, - 193, 194, 194, 194, 195, 195, 195, 196, 196, 197, - 197, 198, 198, 199, 199, 200, 200, 201, 201, 202, - 202, 203, 203, 204, 204, 204, 205, 205, 205, 206, - 206, 206, 207, 207, 208, 208, 209, 209, 210, 210, - 211, 211, 211, 212, 212, 213, 213, 214, 214, 214, - 215, 215, 216, 216, 217, 217, 218, 218, 218, 219, - 219, 220, 220, 221, 221, 222, 222, 223, 223, 224, - 224, 224, 225, 225, 226, 226, 226, 227, 227, 227, - 228, 228, 228, 229, 229, 229, 229, 230, 231, 231, - 231, 232, 232, 232, 233, 233, 234, 234, 235, 235, - 235, 236, 236, 237, 237, 237, 238, 238, 239, 239, - 240, 241, 241, 242, 242, 243, 243, 244, 245, 245, - 246, 246, 247, 247, 248, 248, 249, 249, 250, 250, - 250, 251, 251, 252, 252, 253, 253, 254, 254, 255, - 255, 256, 256, 256, 257, 257, 257, 258, 258, 258, - 259, 259, 260, 261, 261, 262, 262, 263, 263, 264, - 264, 265, 265, 265, 266, 266, 266, 267, 267, 267, - 268, 268, 269, 269, 270, 270, 272, 284, 285, 286, - 286, 286, 286, 286, 287, 287, 289, 301, 302, 303, - 303, 303, 303, 304, 304, 306, 320, 321, 322, 322, - 322, 322, 323, 323, 323, 325, 341, 342, 343, 343, - 343, 343, 344, 344, 344, 345, 347, 356, 365, 376, - 385, 394, 403, 414, 423, 434, 447, 462, 473, 490, - 507, 524, 541, 556, 571, 584, 599, 608, 617, 626, - 635, 644, 653, 662, 671, 680, 689, 698, 707, 716, - 729, 738, 751, 760, 769, 778, 785, 792, 801, 808, - 817, 825, 832, 839, 847, 856, 865, 879, 888, 897, - 906, 915, 924, 933, 940, 947, 973, 981, 988, 995, - 1002, 1009, 1017, 1025, 1033, 1040, 1051, 1062, 1069, 1078, - 1087, 1096, 1103, 1110, 1118, 1126, 1136, 1146, 1156, 1164, - 1177, 1188, 1196, 1209, 1218, 1227, 1236, 1246, 1256, 1264, - 1277, 1286, 1294, 1303, 1311, 1324, 1333, 1340, 1350, 1360, - 1370, 1380, 1390, 1400, 1410, 1420, 1427, 1434, 1441, 1450, - 1459, 1468, 1477, 1484, 1494, 1514, 1521, 1539, 1552, 1565, - 1574, 1583, 1592, 1601, 1611, 1621, 1632, 1641, 1650, 1659, - 1668, 1681, 1694, 1703, 1710, 1719, 1728, 1737, 1746, 1754, - 1767, 1775, 1806, 1813, 1828, 1838, 1848, 1855, 1862, 1869, - 1878, 1886, 1900, 1921, 1942, 1954, 1966, 1978, 1987, 2008, - 2018, 2027, 2035, 2043, 2056, 2069, 2084, 2099, 2108, 2117, - 2123, 2132, 2141, 2151, 2161, 2174, 2187, 2199, 2213, 2225, - 2239, 2249, 2256, 2263, 2272, 2281, 2291, 2301, 2311, 2318, - 2325, 2334, 2343, 2353, 2363, 2370, 2377, 2384, 2392, 2402, - 2412, 2422, 2432, 2464, 2474, 2482, 2490, 2505, 2514, 2519, - 2520, 2521, 2521, 2521, 2522, 2522, 2522, 2523, 2523, 2525, - 2535, 2544, 2551, 2558, 2565, 2572, 2579, 2586, 2591, 2592, - 2593, 2593, 2594, 2594, 2595, 2595, 2596, 2597, 2598, 2599, - 2600, 2601, 2603, 2612, 2619, 2628, 2637, 2644, 2651, 2661, - 2671, 2681, 2691, 2701, 2711, 2716, 2717, 2718, 2720, 2726, - 2736, 2743, 2752, 2760, 2765, 2766, 2768, 2768, 2768, 2769, - 2769, 2770, 2771, 2772, 2773, 2774, 2776, 2786, 2795, 2802, - 2811, 2818, 2827, 2835, 2848, 2856, 2869, 2874, 2875, 2876, - 2876, 2877, 2877, 2877, 2879, 2894, 2909, 2921, 2936, 2949 + 0, 173, 173, 173, 174, 174, 175, 175, 176, 176, + 176, 177, 177, 178, 178, 182, 187, 188, 189, 189, + 189, 190, 190, 191, 191, 192, 192, 193, 193, 193, + 194, 194, 195, 195, 195, 196, 196, 196, 197, 197, + 198, 198, 199, 199, 200, 200, 201, 201, 202, 202, + 203, 203, 204, 204, 205, 205, 205, 206, 206, 206, + 207, 207, 207, 208, 208, 209, 209, 210, 210, 211, + 211, 212, 212, 212, 213, 213, 214, 214, 215, 215, + 215, 216, 216, 217, 217, 218, 218, 219, 219, 219, + 220, 220, 221, 221, 222, 222, 223, 223, 224, 224, + 225, 225, 225, 226, 226, 227, 227, 227, 228, 228, + 228, 229, 229, 229, 230, 230, 230, 230, 231, 232, + 232, 232, 233, 233, 233, 234, 234, 235, 235, 236, + 236, 236, 237, 237, 238, 238, 238, 239, 239, 240, + 240, 241, 242, 242, 243, 243, 244, 244, 245, 246, + 246, 247, 247, 248, 248, 249, 249, 250, 250, 251, + 251, 251, 252, 252, 253, 253, 254, 254, 255, 255, + 256, 256, 257, 257, 257, 258, 258, 258, 259, 259, + 259, 260, 260, 261, 262, 262, 263, 263, 264, 264, + 265, 265, 266, 266, 266, 267, 267, 267, 268, 268, + 268, 269, 269, 270, 270, 271, 271, 273, 285, 286, + 287, 287, 287, 287, 287, 288, 288, 290, 302, 303, + 304, 304, 304, 304, 305, 305, 307, 321, 322, 323, + 323, 323, 323, 324, 324, 324, 326, 342, 343, 344, + 344, 344, 344, 345, 345, 345, 346, 348, 357, 366, + 377, 386, 395, 404, 415, 424, 435, 448, 463, 474, + 491, 508, 525, 542, 557, 572, 585, 600, 609, 618, + 627, 636, 645, 654, 663, 672, 681, 690, 699, 708, + 717, 730, 739, 752, 761, 770, 779, 786, 793, 802, + 809, 818, 826, 833, 840, 848, 857, 866, 880, 889, + 898, 907, 916, 925, 934, 941, 948, 974, 982, 989, + 996, 1003, 1010, 1018, 1026, 1034, 1041, 1052, 1063, 1070, + 1079, 1088, 1097, 1104, 1111, 1119, 1127, 1137, 1147, 1157, + 1165, 1178, 1189, 1197, 1210, 1219, 1228, 1237, 1247, 1257, + 1265, 1278, 1287, 1295, 1304, 1312, 1325, 1334, 1341, 1351, + 1361, 1371, 1381, 1391, 1401, 1411, 1421, 1428, 1435, 1442, + 1451, 1460, 1469, 1478, 1485, 1495, 1515, 1522, 1540, 1553, + 1566, 1575, 1584, 1593, 1602, 1612, 1622, 1633, 1642, 1651, + 1660, 1669, 1682, 1695, 1704, 1711, 1720, 1729, 1738, 1747, + 1755, 1768, 1776, 1817, 1824, 1839, 1849, 1859, 1866, 1873, + 1880, 1889, 1897, 1911, 1932, 1953, 1965, 1977, 1989, 1998, + 2019, 2029, 2038, 2046, 2054, 2067, 2080, 2095, 2110, 2119, + 2128, 2134, 2143, 2152, 2162, 2172, 2185, 2198, 2210, 2224, + 2236, 2250, 2260, 2267, 2274, 2283, 2292, 2302, 2312, 2322, + 2329, 2336, 2345, 2354, 2364, 2374, 2381, 2388, 2395, 2403, + 2413, 2423, 2433, 2443, 2482, 2492, 2500, 2508, 2523, 2532, + 2537, 2538, 2539, 2539, 2539, 2540, 2540, 2540, 2541, 2541, + 2543, 2553, 2562, 2569, 2576, 2583, 2590, 2597, 2604, 2609, + 2610, 2611, 2611, 2612, 2612, 2613, 2613, 2614, 2615, 2616, + 2617, 2618, 2619, 2621, 2630, 2637, 2646, 2655, 2662, 2669, + 2679, 2689, 2699, 2709, 2719, 2729, 2734, 2735, 2736, 2738, + 2744, 2754, 2761, 2770, 2778, 2783, 2784, 2786, 2786, 2786, + 2787, 2787, 2788, 2789, 2790, 2791, 2792, 2794, 2804, 2813, + 2820, 2829, 2836, 2845, 2853, 2866, 2874, 2887, 2892, 2893, + 2894, 2894, 2895, 2895, 2895, 2897, 2912, 2927, 2939, 2954, + 2967, 2978, 2983, 2984, 2985, 2985, 2987, 3002 }; #endif @@ -1169,7 +1176,8 @@ static const char *const yytname[] = "VAR_STUB_NO_CACHE", "VAR_LOG_SERVFAIL", "VAR_DENY_ANY", "VAR_UNKNOWN_SERVER_TIME_LIMIT", "VAR_LOG_TAG_QUERYREPLY", "VAR_STREAM_WAIT_SIZE", "VAR_TLS_CIPHERS", "VAR_TLS_CIPHERSUITES", - "VAR_TLS_SESSION_TICKET_KEYS", "$accept", "toplevelvars", "toplevelvar", + "VAR_TLS_SESSION_TICKET_KEYS", "VAR_IPSET", "VAR_IPSET_NAME_V4", + "VAR_IPSET_NAME_V6", "$accept", "toplevelvars", "toplevelvar", "serverstart", "contents_server", "content_server", "stubstart", "contents_stub", "content_stub", "forwardstart", "contents_forward", "content_forward", "viewstart", "contents_view", "content_view", @@ -1285,7 +1293,9 @@ static const char *const yytname[] = "dnsc_dnscrypt_nonce_cache_size", "dnsc_dnscrypt_nonce_cache_slabs", "cachedbstart", "contents_cachedb", "content_cachedb", "cachedb_backend_name", "cachedb_secret_seed", "redis_server_host", - "redis_server_port", "redis_timeout", "server_tcp_connection_limit", YY_NULLPTR + "redis_server_port", "redis_timeout", "server_tcp_connection_limit", + "ipsetstart", "contents_ipset", "content_ipset", "ipset_name_v4", + "ipset_name_v6", YY_NULLPTR }; #endif @@ -1320,14 +1330,14 @@ static const yytype_uint16 yytoknum[] = 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, - 515, 516, 517, 518, 519, 520, 521 + 515, 516, 517, 518, 519, 520, 521, 522, 523, 524 }; # endif -#define YYPACT_NINF -154 +#define YYPACT_NINF -262 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-154))) + (!!((Yystate) == (-262))) #define YYTABLE_NINF -1 @@ -1338,89 +1348,90 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - -154, 212, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -12, 102, 98, 166, 39, 213, - 142, -80, 52, -153, 22, 23, 24, 28, 29, 30, - 78, 79, 80, 84, 88, 89, 114, 115, 116, 118, - 129, 130, 132, 133, 134, 136, 141, 180, 182, 196, - 197, 200, 201, 203, 204, 205, 206, 214, 215, 216, - 217, 218, 220, 221, 222, 223, 225, 245, 247, 248, - 249, 250, 251, 253, 254, 255, 256, 257, 258, 259, - 272, 278, 279, 280, 281, 282, 297, 306, 307, 308, - 309, 310, 311, 313, 314, 315, 316, 317, 318, 319, - 320, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, - 342, 343, 344, 346, 347, 348, 349, 351, 352, 354, - 355, 356, 357, 358, 359, 361, 362, 363, 364, 365, - 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, - 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, - 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, - 396, 397, 398, 399, 400, 401, 402, 403, 405, 406, - 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, - 417, 418, 419, 421, 422, 423, 424, 425, 426, 427, - 428, 429, 430, 431, 432, 433, 434, 435, 436, 438, - 439, 440, 441, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, 442, 443, 444, 446, 447, 448, 449, - -154, -154, -154, -154, -154, -154, -154, -154, 450, 451, - 452, 453, 454, 455, -154, -154, -154, -154, -154, -154, - -154, 456, 457, 458, 459, 460, 461, 462, -154, -154, - -154, -154, -154, -154, -154, -154, 463, 464, 465, 466, - 467, 468, 469, 470, -154, -154, -154, -154, -154, -154, - -154, -154, -154, 471, 472, 473, 474, 475, 476, 477, - 478, -154, -154, -154, -154, -154, -154, -154, -154, -154, - 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, - 489, 490, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, 491, -154, -154, 492, 493, - 494, 495, 496, 497, 498, 499, 500, 501, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, 502, - 503, 504, 505, 506, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, 507, - 508, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, 509, 510, 511, -154, - -154, -154, -154, -154, -154, -154, -154, -154, 512, 513, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, 514, - 515, 516, 517, 518, 519, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - 520, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, 521, -154, -154, 522, 523, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, 524, 525, 526, -154, -154, -154, -154, -154, - -154, -154, -154 + -262, 0, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, 256, -42, -37, -38, + -41, -44, -136, -102, -191, -177, -261, 2, 3, 28, + 29, 30, 33, 35, 36, 37, 38, 39, 55, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 86, 87, 90, 92, + 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 198, 199, 200, 201, 202, 204, 205, + 207, 209, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 226, 227, 228, 229, + 230, 231, 232, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 289, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, 290, 291, 292, 296, + 297, 298, 340, -262, -262, -262, -262, -262, -262, -262, + -262, 341, 342, 343, 344, 345, 346, -262, -262, -262, + -262, -262, -262, -262, 347, 348, 352, 356, 357, 382, + 383, -262, -262, -262, -262, -262, -262, -262, -262, 384, + 386, 397, 398, 399, 400, 401, 402, -262, -262, -262, + -262, -262, -262, -262, -262, -262, 403, 404, 405, 406, + 407, 408, 409, 448, -262, -262, -262, -262, -262, -262, + -262, -262, -262, 450, 464, 465, 466, 467, 468, 469, + 470, 471, 472, 473, 474, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, 481, -262, + -262, 482, 483, 484, 485, 486, 488, 489, 490, 491, + 492, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, 493, 494, 497, 500, 503, -262, -262, -262, + -262, -262, -262, 504, 513, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, 514, 515, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, 516, 517, 518, -262, -262, -262, + -262, -262, -262, -262, -262, -262, 519, 520, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, 521, 522, 523, + 524, 525, 526, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, 527, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, 528, -262, -262, 529, 530, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, 531, 532, 533, -262, -262, -262, -262, -262, + -262, -262, -262 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1428,11 +1439,10 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 2, 0, 1, 14, 206, 216, 458, 504, 477, 225, - 513, 536, 235, 3, 16, 208, 218, 227, 237, 460, - 479, 506, 515, 538, 4, 5, 6, 10, 13, 8, - 9, 7, 11, 12, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 1, 15, 207, 217, 459, 505, 478, 226, + 514, 537, 236, 551, 3, 17, 209, 219, 228, 238, + 461, 480, 507, 516, 539, 553, 4, 5, 6, 10, + 14, 8, 9, 7, 11, 12, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1450,135 +1460,139 @@ static const yytype_uint16 yydefact[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 15, 17, 18, 80, 83, 92, 177, - 178, 19, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 31, 71, 20, 84, 85, 42, 64, 79, - 21, 22, 24, 25, 23, 26, 27, 28, 29, 30, - 115, 189, 116, 118, 119, 120, 191, 196, 192, 203, - 204, 205, 173, 81, 70, 96, 113, 114, 201, 198, - 117, 32, 33, 34, 35, 36, 72, 86, 87, 102, - 58, 68, 59, 181, 182, 97, 52, 53, 180, 54, - 55, 106, 110, 124, 133, 158, 202, 107, 65, 37, - 38, 39, 94, 125, 126, 127, 40, 41, 43, 44, - 46, 47, 45, 131, 48, 49, 50, 56, 75, 111, - 89, 132, 82, 154, 90, 91, 108, 109, 199, 95, - 51, 73, 76, 57, 60, 98, 99, 74, 155, 100, - 61, 62, 63, 190, 112, 168, 169, 170, 171, 179, - 101, 69, 103, 104, 105, 156, 66, 67, 88, 77, - 78, 93, 121, 122, 200, 123, 128, 129, 130, 159, - 160, 162, 164, 165, 163, 166, 174, 134, 135, 138, - 139, 136, 137, 140, 141, 143, 142, 193, 195, 194, - 157, 167, 183, 185, 184, 186, 187, 188, 161, 172, - 175, 176, 197, 0, 0, 0, 0, 0, 0, 0, - 207, 209, 210, 211, 213, 214, 215, 212, 0, 0, - 0, 0, 0, 0, 217, 219, 220, 221, 222, 223, - 224, 0, 0, 0, 0, 0, 0, 0, 226, 228, - 229, 232, 233, 230, 234, 231, 0, 0, 0, 0, - 0, 0, 0, 0, 236, 238, 239, 240, 241, 245, - 242, 243, 244, 0, 0, 0, 0, 0, 0, 0, - 0, 459, 461, 463, 462, 468, 464, 465, 466, 467, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 478, 480, 481, 482, 483, 484, 485, 486, - 487, 488, 489, 490, 491, 0, 505, 507, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 514, 516, - 517, 518, 520, 521, 519, 522, 523, 524, 525, 0, - 0, 0, 0, 0, 537, 539, 540, 541, 542, 543, - 247, 246, 253, 266, 264, 272, 273, 276, 274, 275, - 277, 278, 279, 280, 281, 303, 304, 305, 306, 307, - 331, 332, 333, 338, 339, 269, 340, 341, 344, 342, - 343, 346, 347, 348, 362, 318, 319, 321, 322, 349, - 365, 312, 314, 366, 372, 373, 374, 270, 330, 388, - 389, 313, 383, 296, 265, 308, 363, 369, 350, 0, - 0, 392, 271, 248, 295, 354, 249, 267, 268, 309, - 310, 390, 352, 356, 357, 250, 393, 334, 361, 297, - 317, 367, 368, 371, 382, 311, 386, 384, 385, 323, - 329, 358, 359, 324, 325, 351, 376, 298, 299, 302, - 282, 284, 285, 286, 287, 288, 394, 395, 397, 335, - 336, 337, 345, 398, 399, 400, 0, 0, 0, 353, - 326, 509, 409, 413, 411, 410, 414, 412, 0, 0, - 417, 418, 254, 255, 256, 257, 258, 259, 260, 261, - 262, 263, 355, 370, 387, 422, 423, 327, 401, 0, - 0, 0, 0, 0, 0, 377, 378, 379, 380, 381, - 510, 320, 315, 375, 294, 251, 252, 316, 424, 426, - 425, 427, 428, 429, 283, 290, 419, 421, 420, 289, - 0, 301, 360, 396, 300, 328, 291, 292, 293, 430, - 431, 432, 436, 435, 433, 434, 437, 438, 439, 440, - 442, 441, 451, 0, 455, 456, 0, 0, 457, 443, - 449, 444, 445, 446, 448, 450, 447, 469, 471, 470, - 473, 474, 475, 476, 472, 492, 493, 494, 495, 496, - 497, 498, 499, 500, 501, 502, 503, 508, 526, 527, - 528, 531, 529, 530, 532, 533, 534, 535, 544, 545, - 546, 547, 548, 364, 391, 408, 511, 512, 415, 416, - 402, 403, 0, 0, 0, 407, 549, 452, 453, 454, - 406, 404, 405 + 0, 0, 0, 0, 0, 0, 16, 18, 19, 81, + 84, 93, 178, 179, 20, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 32, 72, 21, 85, 86, + 43, 65, 80, 22, 23, 25, 26, 24, 27, 28, + 29, 30, 31, 116, 190, 117, 119, 120, 121, 192, + 197, 193, 204, 205, 206, 174, 82, 71, 97, 114, + 115, 202, 199, 118, 33, 34, 35, 36, 37, 73, + 87, 88, 103, 59, 69, 60, 182, 183, 98, 53, + 54, 181, 55, 56, 107, 111, 125, 134, 159, 203, + 108, 66, 38, 39, 40, 95, 126, 127, 128, 41, + 42, 44, 45, 47, 48, 46, 132, 49, 50, 51, + 57, 76, 112, 90, 133, 83, 155, 91, 92, 109, + 110, 200, 96, 52, 74, 77, 58, 61, 99, 100, + 75, 156, 101, 62, 63, 64, 191, 113, 169, 170, + 171, 172, 180, 102, 70, 104, 105, 106, 157, 67, + 68, 89, 78, 79, 94, 122, 123, 201, 124, 129, + 130, 131, 160, 161, 163, 165, 166, 164, 167, 175, + 135, 136, 139, 140, 137, 138, 141, 142, 144, 143, + 194, 196, 195, 158, 168, 184, 186, 185, 187, 188, + 189, 162, 173, 176, 177, 198, 0, 0, 0, 0, + 0, 0, 0, 208, 210, 211, 212, 214, 215, 216, + 213, 0, 0, 0, 0, 0, 0, 218, 220, 221, + 222, 223, 224, 225, 0, 0, 0, 0, 0, 0, + 0, 227, 229, 230, 233, 234, 231, 235, 232, 0, + 0, 0, 0, 0, 0, 0, 0, 237, 239, 240, + 241, 242, 246, 243, 244, 245, 0, 0, 0, 0, + 0, 0, 0, 0, 460, 462, 464, 463, 469, 465, + 466, 467, 468, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 479, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 0, 506, + 508, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 515, 517, 518, 519, 521, 522, 520, 523, 524, + 525, 526, 0, 0, 0, 0, 0, 538, 540, 541, + 542, 543, 544, 0, 0, 552, 554, 555, 248, 247, + 254, 267, 265, 273, 274, 277, 275, 276, 278, 279, + 280, 281, 282, 304, 305, 306, 307, 308, 332, 333, + 334, 339, 340, 270, 341, 342, 345, 343, 344, 347, + 348, 349, 363, 319, 320, 322, 323, 350, 366, 313, + 315, 367, 373, 374, 375, 271, 331, 389, 390, 314, + 384, 297, 266, 309, 364, 370, 351, 0, 0, 393, + 272, 249, 296, 355, 250, 268, 269, 310, 311, 391, + 353, 357, 358, 251, 394, 335, 362, 298, 318, 368, + 369, 372, 383, 312, 387, 385, 386, 324, 330, 359, + 360, 325, 326, 352, 377, 299, 300, 303, 283, 285, + 286, 287, 288, 289, 395, 396, 398, 336, 337, 338, + 346, 399, 400, 401, 0, 0, 0, 354, 327, 510, + 410, 414, 412, 411, 415, 413, 0, 0, 418, 419, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 356, 371, 388, 423, 424, 328, 402, 0, 0, 0, + 0, 0, 0, 378, 379, 380, 381, 382, 511, 321, + 316, 376, 295, 252, 253, 317, 425, 427, 426, 428, + 429, 430, 284, 291, 420, 422, 421, 290, 0, 302, + 361, 397, 301, 329, 292, 293, 294, 431, 432, 433, + 437, 436, 434, 435, 438, 439, 440, 441, 443, 442, + 452, 0, 456, 457, 0, 0, 458, 444, 450, 445, + 446, 447, 449, 451, 448, 470, 472, 471, 474, 475, + 476, 477, 473, 493, 494, 495, 496, 497, 498, 499, + 500, 501, 502, 503, 504, 509, 527, 528, 529, 532, + 530, 531, 533, 534, 535, 536, 545, 546, 547, 548, + 549, 556, 557, 365, 392, 409, 512, 513, 416, 417, + 403, 404, 0, 0, 0, 408, 550, 453, 454, 455, + 407, 405, 406 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154 + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262, -262, -262, -262, -262, -262, -262, -262, -262, -262, + -262 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 1, 13, 14, 24, 223, 15, 25, 420, 16, - 26, 434, 17, 27, 448, 18, 28, 464, 224, 225, - 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, - 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, - 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, - 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, - 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, - 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, - 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, - 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, - 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, - 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, - 406, 407, 421, 422, 423, 424, 425, 426, 427, 435, - 436, 437, 438, 439, 440, 465, 466, 467, 468, 469, - 470, 471, 472, 449, 450, 451, 452, 453, 454, 455, - 19, 29, 481, 482, 483, 484, 485, 486, 487, 488, - 489, 20, 30, 502, 503, 504, 505, 506, 507, 508, - 509, 510, 511, 512, 513, 514, 21, 31, 516, 517, - 408, 409, 410, 411, 22, 32, 528, 529, 530, 531, - 532, 533, 534, 535, 536, 537, 538, 23, 33, 544, - 545, 546, 547, 548, 549, 412 + -1, 1, 14, 15, 26, 226, 16, 27, 423, 17, + 28, 437, 18, 29, 451, 19, 30, 467, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, + 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, + 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, + 409, 410, 424, 425, 426, 427, 428, 429, 430, 438, + 439, 440, 441, 442, 443, 468, 469, 470, 471, 472, + 473, 474, 475, 452, 453, 454, 455, 456, 457, 458, + 20, 31, 484, 485, 486, 487, 488, 489, 490, 491, + 492, 21, 32, 505, 506, 507, 508, 509, 510, 511, + 512, 513, 514, 515, 516, 517, 22, 33, 519, 520, + 411, 412, 413, 414, 23, 34, 531, 532, 533, 534, + 535, 536, 537, 538, 539, 540, 541, 24, 35, 547, + 548, 549, 550, 551, 552, 415, 25, 36, 555, 556, + 557 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1586,147 +1600,149 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint16 yytable[] = { - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 515, 550, 551, 552, 65, 66, 67, 553, 554, - 555, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 456, 539, 540, 541, 542, 543, 556, 557, - 558, 109, 110, 111, 559, 112, 113, 114, 560, 561, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 562, 563, 564, 139, 565, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 566, - 567, 428, 568, 569, 570, 413, 571, 414, 415, 429, - 430, 572, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 573, 188, 574, 189, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 575, 576, 416, 441, - 577, 578, 2, 579, 580, 581, 582, 202, 203, 204, - 205, 206, 207, 3, 583, 584, 585, 586, 587, 208, - 588, 589, 590, 591, 431, 592, 432, 209, 210, 417, - 211, 212, 418, 213, 214, 442, 443, 215, 216, 217, - 218, 219, 220, 221, 222, 593, 4, 594, 595, 596, - 597, 598, 5, 599, 600, 601, 602, 603, 604, 605, - 444, 518, 519, 520, 521, 522, 523, 524, 525, 526, - 527, 457, 606, 458, 459, 460, 461, 462, 607, 608, - 609, 610, 611, 463, 490, 491, 492, 493, 494, 495, - 496, 497, 498, 499, 500, 501, 6, 612, 473, 474, - 475, 476, 477, 478, 479, 480, 613, 614, 615, 616, - 617, 618, 7, 619, 620, 621, 622, 623, 624, 625, - 626, 445, 446, 627, 628, 629, 630, 631, 632, 633, - 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, - 644, 645, 646, 647, 648, 433, 649, 650, 651, 652, - 419, 653, 654, 8, 655, 656, 657, 658, 659, 660, - 447, 661, 662, 663, 664, 665, 666, 667, 668, 669, - 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, - 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, - 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, - 700, 701, 702, 703, 9, 704, 705, 706, 707, 708, - 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, - 10, 719, 720, 721, 722, 723, 724, 725, 726, 727, - 728, 729, 730, 731, 732, 733, 734, 11, 735, 736, - 737, 738, 739, 740, 741, 12, 742, 743, 744, 745, - 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, - 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, - 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, - 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, - 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, - 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, - 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, - 816, 817, 818, 819, 820, 821, 822 + 2, 416, 459, 417, 418, 444, 431, 553, 554, 518, + 0, 3, 558, 559, 432, 433, 493, 494, 495, 496, + 497, 498, 499, 500, 501, 502, 503, 504, 521, 522, + 523, 524, 525, 526, 527, 528, 529, 530, 560, 561, + 562, 445, 446, 563, 4, 564, 565, 566, 567, 568, + 5, 476, 477, 478, 479, 480, 481, 482, 483, 542, + 543, 544, 545, 546, 419, 569, 447, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, + 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, + 593, 594, 595, 596, 6, 420, 597, 598, 421, 434, + 599, 435, 600, 601, 602, 603, 604, 605, 606, 607, + 7, 608, 609, 610, 611, 612, 613, 614, 615, 616, + 617, 618, 619, 620, 621, 622, 623, 448, 449, 624, + 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, + 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, + 645, 8, 646, 647, 648, 649, 650, 651, 652, 653, + 654, 655, 656, 657, 658, 659, 450, 660, 661, 662, + 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, + 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, + 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, + 693, 460, 9, 461, 462, 463, 464, 465, 694, 695, + 696, 697, 698, 466, 699, 700, 422, 701, 10, 702, + 436, 703, 704, 705, 706, 707, 708, 709, 710, 711, + 712, 713, 714, 715, 716, 11, 717, 718, 719, 720, + 721, 722, 723, 12, 724, 725, 726, 727, 728, 729, + 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, + 740, 741, 742, 743, 744, 745, 0, 13, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 746, + 747, 748, 749, 68, 69, 70, 750, 751, 752, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 112, + 113, 114, 762, 115, 116, 117, 763, 764, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 765, 766, 767, 142, 768, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 769, 770, 771, + 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 782, 191, + 783, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 784, 785, 786, 787, 788, 789, + 790, 791, 792, 793, 794, 205, 206, 207, 208, 209, + 210, 795, 796, 797, 798, 799, 800, 211, 801, 802, + 803, 804, 805, 806, 807, 212, 213, 808, 214, 215, + 809, 216, 217, 810, 811, 218, 219, 220, 221, 222, + 223, 224, 225, 812, 813, 814, 815, 816, 817, 818, + 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, + 829, 830, 831, 832 }; -static const yytype_uint16 yycheck[] = +static const yytype_int16 yycheck[] = { - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 111, 10, 10, 10, 47, 48, 49, 10, 10, - 10, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 43, 236, 237, 238, 239, 240, 10, 10, - 10, 103, 104, 105, 10, 107, 108, 109, 10, 10, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 10, 10, 10, 139, 10, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 10, - 10, 43, 10, 10, 10, 43, 10, 45, 46, 51, - 52, 10, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 10, 203, 10, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 10, 10, 106, 43, - 10, 10, 0, 10, 10, 10, 10, 229, 230, 231, - 232, 233, 234, 11, 10, 10, 10, 10, 10, 241, - 10, 10, 10, 10, 136, 10, 138, 249, 250, 137, - 252, 253, 140, 255, 256, 79, 80, 259, 260, 261, - 262, 263, 264, 265, 266, 10, 44, 10, 10, 10, - 10, 10, 50, 10, 10, 10, 10, 10, 10, 10, - 104, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 242, 10, 244, 245, 246, 247, 248, 10, 10, - 10, 10, 10, 254, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 94, 10, 95, 96, - 97, 98, 99, 100, 101, 102, 10, 10, 10, 10, - 10, 10, 110, 10, 10, 10, 10, 10, 10, 10, - 10, 165, 166, 10, 10, 10, 10, 10, 10, 10, + 0, 43, 43, 45, 46, 43, 43, 268, 269, 111, + -1, 11, 10, 10, 51, 52, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 228, 10, 10, + 10, 79, 80, 10, 44, 10, 10, 10, 10, 10, + 50, 95, 96, 97, 98, 99, 100, 101, 102, 236, + 237, 238, 239, 240, 106, 10, 104, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 257, 10, 10, 10, 10, - 258, 10, 10, 151, 10, 10, 10, 10, 10, 10, - 204, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 94, 137, 10, 10, 140, 136, + 10, 138, 10, 10, 10, 10, 10, 10, 10, 10, + 110, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 165, 166, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 202, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 218, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 235, 10, 10, - 10, 10, 10, 10, 10, 243, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 151, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 204, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 242, 202, 244, 245, 246, 247, 248, 10, 10, + 10, 10, 10, 254, 10, 10, 258, 10, 218, 10, + 257, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 235, 10, 10, 10, 10, + 10, 10, 10, 243, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, -1, 267, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 10, + 10, 10, 10, 47, 48, 49, 10, 10, 10, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 103, + 104, 105, 10, 107, 108, 109, 10, 10, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 10, 10, 10, 139, 10, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 10, 203, + 10, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 229, 230, 231, 232, 233, + 234, 10, 10, 10, 10, 10, 10, 241, 10, 10, + 10, 10, 10, 10, 10, 249, 250, 10, 252, 253, + 10, 255, 256, 10, 10, 259, 260, 261, 262, 263, + 264, 265, 266, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10 + 10, 10, 10, 10 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint16 yystos[] = { - 0, 268, 0, 11, 44, 50, 94, 110, 151, 202, - 218, 235, 243, 269, 270, 273, 276, 279, 282, 497, - 508, 523, 531, 544, 271, 274, 277, 280, 283, 498, - 509, 524, 532, 545, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 47, 48, 49, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 103, - 104, 105, 107, 108, 109, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 139, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 203, 205, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 229, 230, 231, 232, 233, 234, 241, 249, - 250, 252, 253, 255, 256, 259, 260, 261, 262, 263, - 264, 265, 266, 272, 285, 286, 287, 288, 289, 290, + 0, 271, 0, 11, 44, 50, 94, 110, 151, 202, + 218, 235, 243, 267, 272, 273, 276, 279, 282, 285, + 500, 511, 526, 534, 547, 556, 274, 277, 280, 283, + 286, 501, 512, 527, 535, 548, 557, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 47, 48, + 49, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 103, 104, 105, 107, 108, 109, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 139, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 203, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 229, 230, 231, 232, 233, + 234, 241, 249, 250, 252, 253, 255, 256, 259, 260, + 261, 262, 263, 264, 265, 266, 275, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, @@ -1744,21 +1760,22 @@ static const yytype_uint16 yystos[] = 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, - 461, 462, 463, 464, 465, 466, 467, 468, 527, 528, - 529, 530, 552, 43, 45, 46, 106, 137, 140, 258, - 275, 469, 470, 471, 472, 473, 474, 475, 43, 51, - 52, 136, 138, 257, 278, 476, 477, 478, 479, 480, - 481, 43, 79, 80, 104, 165, 166, 204, 281, 490, - 491, 492, 493, 494, 495, 496, 43, 242, 244, 245, - 246, 247, 248, 254, 284, 482, 483, 484, 485, 486, - 487, 488, 489, 95, 96, 97, 98, 99, 100, 101, - 102, 499, 500, 501, 502, 503, 504, 505, 506, 507, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 510, 511, 512, 513, 514, 515, 516, 517, - 518, 519, 520, 521, 522, 111, 525, 526, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 533, 534, - 535, 536, 537, 538, 539, 540, 541, 542, 543, 236, - 237, 238, 239, 240, 546, 547, 548, 549, 550, 551, + 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, + 471, 530, 531, 532, 533, 555, 43, 45, 46, 106, + 137, 140, 258, 278, 472, 473, 474, 475, 476, 477, + 478, 43, 51, 52, 136, 138, 257, 281, 479, 480, + 481, 482, 483, 484, 43, 79, 80, 104, 165, 166, + 204, 284, 493, 494, 495, 496, 497, 498, 499, 43, + 242, 244, 245, 246, 247, 248, 254, 287, 485, 486, + 487, 488, 489, 490, 491, 492, 95, 96, 97, 98, + 99, 100, 101, 102, 502, 503, 504, 505, 506, 507, + 508, 509, 510, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 513, 514, 515, 516, 517, + 518, 519, 520, 521, 522, 523, 524, 525, 111, 528, + 529, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 536, 537, 538, 539, 540, 541, 542, 543, 544, + 545, 546, 236, 237, 238, 239, 240, 549, 550, 551, + 552, 553, 554, 268, 269, 558, 559, 560, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, @@ -1792,68 +1809,69 @@ static const yytype_uint16 yystos[] = /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint16 yyr1[] = { - 0, 267, 268, 268, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 270, 271, 271, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, - 272, 272, 272, 272, 272, 272, 273, 274, 274, 275, - 275, 275, 275, 275, 275, 275, 276, 277, 277, 278, - 278, 278, 278, 278, 278, 279, 280, 280, 281, 281, - 281, 281, 281, 281, 281, 282, 283, 283, 284, 284, - 284, 284, 284, 284, 284, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, - 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, - 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, - 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, - 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, - 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, - 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, - 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, - 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, - 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, - 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, - 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, - 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, - 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, - 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, - 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, - 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, - 498, 499, 499, 499, 499, 499, 499, 499, 499, 500, - 501, 502, 503, 504, 505, 506, 507, 508, 509, 509, - 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, - 510, 510, 511, 512, 513, 514, 515, 516, 517, 518, - 519, 520, 521, 522, 523, 524, 524, 525, 526, 527, - 528, 529, 530, 531, 532, 532, 533, 533, 533, 533, - 533, 533, 533, 533, 533, 533, 534, 535, 536, 537, - 538, 539, 540, 541, 542, 543, 544, 545, 545, 546, - 546, 546, 546, 546, 547, 548, 549, 550, 551, 552 + 0, 270, 271, 271, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 273, 274, 274, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + 275, 275, 275, 275, 275, 275, 275, 276, 277, 277, + 278, 278, 278, 278, 278, 278, 278, 279, 280, 280, + 281, 281, 281, 281, 281, 281, 282, 283, 283, 284, + 284, 284, 284, 284, 284, 284, 285, 286, 286, 287, + 287, 287, 287, 287, 287, 287, 287, 288, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, + 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, + 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, + 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, + 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, + 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, + 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, + 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, + 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, + 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 501, 502, 502, 502, 502, 502, 502, 502, 502, + 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, + 512, 513, 513, 513, 513, 513, 513, 513, 513, 513, + 513, 513, 513, 514, 515, 516, 517, 518, 519, 520, + 521, 522, 523, 524, 525, 526, 527, 527, 528, 529, + 530, 531, 532, 533, 534, 535, 535, 536, 536, 536, + 536, 536, 536, 536, 536, 536, 536, 537, 538, 539, + 540, 541, 542, 543, 544, 545, 546, 547, 548, 548, + 549, 549, 549, 549, 549, 550, 551, 552, 553, 554, + 555, 556, 557, 557, 558, 558, 559, 560 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 1, 2, 0, 1, 1, 1, + 2, 2, 2, 2, 2, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1872,11 +1890,11 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, - 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1888,25 +1906,26 @@ static const yytype_uint8 yyr2[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 3, 3, 4, 4, 4, 3, 3, 2, - 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, + 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 3, 3, 4, 4, 4, 3, 3, + 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 3, 3, 3, 2, 2, 2, 1, 2, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 2, 2, 2, 3, 3, 3, 2, 2, 2, 1, + 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 2, 0, 1, 2, + 2, 2, 3, 3, 1, 2, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 1, 2, 0, 1, 2, 2, - 2, 3, 3, 1, 2, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 0, 1, - 1, 1, 1, 1, 2, 2, 2, 2, 2, 3 + 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, + 3, 1, 2, 0, 1, 1, 2, 2 }; @@ -2267,7 +2286,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, case N: \ yyformat = S; \ break - default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); @@ -2583,16 +2601,16 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 14: -#line 182 "util/configparser.y" /* yacc.c:1648 */ + case 15: +#line 183 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("\nP(server:)\n")); } -#line 2592 "util/configparser.c" /* yacc.c:1648 */ +#line 2610 "util/configparser.c" /* yacc.c:1646 */ break; - case 206: -#line 273 "util/configparser.y" /* yacc.c:1648 */ + case 207: +#line 274 "util/configparser.y" /* yacc.c:1646 */ { struct config_stub* s; OUTYY(("\nP(stub_zone:)\n")); @@ -2603,11 +2621,11 @@ yyreduce: } else yyerror("out of memory"); } -#line 2607 "util/configparser.c" /* yacc.c:1648 */ +#line 2625 "util/configparser.c" /* yacc.c:1646 */ break; - case 216: -#line 290 "util/configparser.y" /* yacc.c:1648 */ + case 217: +#line 291 "util/configparser.y" /* yacc.c:1646 */ { struct config_stub* s; OUTYY(("\nP(forward_zone:)\n")); @@ -2618,11 +2636,11 @@ yyreduce: } else yyerror("out of memory"); } -#line 2622 "util/configparser.c" /* yacc.c:1648 */ +#line 2640 "util/configparser.c" /* yacc.c:1646 */ break; - case 225: -#line 307 "util/configparser.y" /* yacc.c:1648 */ + case 226: +#line 308 "util/configparser.y" /* yacc.c:1646 */ { struct config_view* s; OUTYY(("\nP(view:)\n")); @@ -2635,11 +2653,11 @@ yyreduce: } else yyerror("out of memory"); } -#line 2639 "util/configparser.c" /* yacc.c:1648 */ +#line 2657 "util/configparser.c" /* yacc.c:1646 */ break; - case 235: -#line 326 "util/configparser.y" /* yacc.c:1648 */ + case 236: +#line 327 "util/configparser.y" /* yacc.c:1646 */ { struct config_auth* s; OUTYY(("\nP(auth_zone:)\n")); @@ -2654,11 +2672,11 @@ yyreduce: } else yyerror("out of memory"); } -#line 2658 "util/configparser.c" /* yacc.c:1648 */ +#line 2676 "util/configparser.c" /* yacc.c:1646 */ break; - case 246: -#line 348 "util/configparser.y" /* yacc.c:1648 */ + case 247: +#line 349 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_num_threads:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -2666,11 +2684,11 @@ yyreduce: else cfg_parser->cfg->num_threads = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 2670 "util/configparser.c" /* yacc.c:1648 */ +#line 2688 "util/configparser.c" /* yacc.c:1646 */ break; - case 247: -#line 357 "util/configparser.y" /* yacc.c:1648 */ + case 248: +#line 358 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_verbosity:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -2678,11 +2696,11 @@ yyreduce: else cfg_parser->cfg->verbosity = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 2682 "util/configparser.c" /* yacc.c:1648 */ +#line 2700 "util/configparser.c" /* yacc.c:1646 */ break; - case 248: -#line 366 "util/configparser.y" /* yacc.c:1648 */ + case 249: +#line 367 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_statistics_interval:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "") == 0 || strcmp((yyvsp[0].str), "0") == 0) @@ -2692,11 +2710,11 @@ yyreduce: else cfg_parser->cfg->stat_interval = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 2696 "util/configparser.c" /* yacc.c:1648 */ +#line 2714 "util/configparser.c" /* yacc.c:1646 */ break; - case 249: -#line 377 "util/configparser.y" /* yacc.c:1648 */ + case 250: +#line 378 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_statistics_cumulative:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -2704,11 +2722,11 @@ yyreduce: else cfg_parser->cfg->stat_cumulative = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 2708 "util/configparser.c" /* yacc.c:1648 */ +#line 2726 "util/configparser.c" /* yacc.c:1646 */ break; - case 250: -#line 386 "util/configparser.y" /* yacc.c:1648 */ + case 251: +#line 387 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_extended_statistics:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -2716,11 +2734,11 @@ yyreduce: else cfg_parser->cfg->stat_extended = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 2720 "util/configparser.c" /* yacc.c:1648 */ +#line 2738 "util/configparser.c" /* yacc.c:1646 */ break; - case 251: -#line 395 "util/configparser.y" /* yacc.c:1648 */ + case 252: +#line 396 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_shm_enable:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -2728,11 +2746,11 @@ yyreduce: else cfg_parser->cfg->shm_enable = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 2732 "util/configparser.c" /* yacc.c:1648 */ +#line 2750 "util/configparser.c" /* yacc.c:1646 */ break; - case 252: -#line 404 "util/configparser.y" /* yacc.c:1648 */ + case 253: +#line 405 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_shm_key:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "") == 0 || strcmp((yyvsp[0].str), "0") == 0) @@ -2742,11 +2760,11 @@ yyreduce: else cfg_parser->cfg->shm_key = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 2746 "util/configparser.c" /* yacc.c:1648 */ +#line 2764 "util/configparser.c" /* yacc.c:1646 */ break; - case 253: -#line 415 "util/configparser.y" /* yacc.c:1648 */ + case 254: +#line 416 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_port:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -2754,11 +2772,11 @@ yyreduce: else cfg_parser->cfg->port = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 2758 "util/configparser.c" /* yacc.c:1648 */ +#line 2776 "util/configparser.c" /* yacc.c:1646 */ break; - case 254: -#line 424 "util/configparser.y" /* yacc.c:1648 */ + case 255: +#line 425 "util/configparser.y" /* yacc.c:1646 */ { #ifdef CLIENT_SUBNET OUTYY(("P(server_send_client_subnet:%s)\n", (yyvsp[0].str))); @@ -2768,11 +2786,11 @@ yyreduce: OUTYY(("P(Compiled without edns subnet option, ignoring)\n")); #endif } -#line 2772 "util/configparser.c" /* yacc.c:1648 */ +#line 2790 "util/configparser.c" /* yacc.c:1646 */ break; - case 255: -#line 435 "util/configparser.y" /* yacc.c:1648 */ + case 256: +#line 436 "util/configparser.y" /* yacc.c:1646 */ { #ifdef CLIENT_SUBNET OUTYY(("P(server_client_subnet_zone:%s)\n", (yyvsp[0].str))); @@ -2783,11 +2801,11 @@ yyreduce: OUTYY(("P(Compiled without edns subnet option, ignoring)\n")); #endif } -#line 2787 "util/configparser.c" /* yacc.c:1648 */ +#line 2805 "util/configparser.c" /* yacc.c:1646 */ break; - case 256: -#line 448 "util/configparser.y" /* yacc.c:1648 */ + case 257: +#line 449 "util/configparser.y" /* yacc.c:1646 */ { #ifdef CLIENT_SUBNET OUTYY(("P(server_client_subnet_always_forward:%s)\n", (yyvsp[0].str))); @@ -2801,11 +2819,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 2805 "util/configparser.c" /* yacc.c:1648 */ +#line 2823 "util/configparser.c" /* yacc.c:1646 */ break; - case 257: -#line 463 "util/configparser.y" /* yacc.c:1648 */ + case 258: +#line 464 "util/configparser.y" /* yacc.c:1646 */ { #ifdef CLIENT_SUBNET OUTYY(("P(client_subnet_opcode:%s)\n", (yyvsp[0].str))); @@ -2815,11 +2833,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 2819 "util/configparser.c" /* yacc.c:1648 */ +#line 2837 "util/configparser.c" /* yacc.c:1646 */ break; - case 258: -#line 474 "util/configparser.y" /* yacc.c:1648 */ + case 259: +#line 475 "util/configparser.y" /* yacc.c:1646 */ { #ifdef CLIENT_SUBNET OUTYY(("P(max_client_subnet_ipv4:%s)\n", (yyvsp[0].str))); @@ -2835,11 +2853,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 2839 "util/configparser.c" /* yacc.c:1648 */ +#line 2857 "util/configparser.c" /* yacc.c:1646 */ break; - case 259: -#line 491 "util/configparser.y" /* yacc.c:1648 */ + case 260: +#line 492 "util/configparser.y" /* yacc.c:1646 */ { #ifdef CLIENT_SUBNET OUTYY(("P(max_client_subnet_ipv6:%s)\n", (yyvsp[0].str))); @@ -2855,11 +2873,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 2859 "util/configparser.c" /* yacc.c:1648 */ +#line 2877 "util/configparser.c" /* yacc.c:1646 */ break; - case 260: -#line 508 "util/configparser.y" /* yacc.c:1648 */ + case 261: +#line 509 "util/configparser.y" /* yacc.c:1646 */ { #ifdef CLIENT_SUBNET OUTYY(("P(min_client_subnet_ipv4:%s)\n", (yyvsp[0].str))); @@ -2875,11 +2893,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 2879 "util/configparser.c" /* yacc.c:1648 */ +#line 2897 "util/configparser.c" /* yacc.c:1646 */ break; - case 261: -#line 525 "util/configparser.y" /* yacc.c:1648 */ + case 262: +#line 526 "util/configparser.y" /* yacc.c:1646 */ { #ifdef CLIENT_SUBNET OUTYY(("P(min_client_subnet_ipv6:%s)\n", (yyvsp[0].str))); @@ -2895,11 +2913,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 2899 "util/configparser.c" /* yacc.c:1648 */ +#line 2917 "util/configparser.c" /* yacc.c:1646 */ break; - case 262: -#line 542 "util/configparser.y" /* yacc.c:1648 */ + case 263: +#line 543 "util/configparser.y" /* yacc.c:1646 */ { #ifdef CLIENT_SUBNET OUTYY(("P(max_ecs_tree_size_ipv4:%s)\n", (yyvsp[0].str))); @@ -2913,11 +2931,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 2917 "util/configparser.c" /* yacc.c:1648 */ +#line 2935 "util/configparser.c" /* yacc.c:1646 */ break; - case 263: -#line 557 "util/configparser.y" /* yacc.c:1648 */ + case 264: +#line 558 "util/configparser.y" /* yacc.c:1646 */ { #ifdef CLIENT_SUBNET OUTYY(("P(max_ecs_tree_size_ipv6:%s)\n", (yyvsp[0].str))); @@ -2931,11 +2949,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 2935 "util/configparser.c" /* yacc.c:1648 */ +#line 2953 "util/configparser.c" /* yacc.c:1646 */ break; - case 264: -#line 572 "util/configparser.y" /* yacc.c:1648 */ + case 265: +#line 573 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_interface:%s)\n", (yyvsp[0].str))); if(cfg_parser->cfg->num_ifs == 0) @@ -2947,11 +2965,11 @@ yyreduce: else cfg_parser->cfg->ifs[cfg_parser->cfg->num_ifs++] = (yyvsp[0].str); } -#line 2951 "util/configparser.c" /* yacc.c:1648 */ +#line 2969 "util/configparser.c" /* yacc.c:1646 */ break; - case 265: -#line 585 "util/configparser.y" /* yacc.c:1648 */ + case 266: +#line 586 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_outgoing_interface:%s)\n", (yyvsp[0].str))); if(cfg_parser->cfg->num_out_ifs == 0) @@ -2965,11 +2983,11 @@ yyreduce: cfg_parser->cfg->out_ifs[ cfg_parser->cfg->num_out_ifs++] = (yyvsp[0].str); } -#line 2969 "util/configparser.c" /* yacc.c:1648 */ +#line 2987 "util/configparser.c" /* yacc.c:1646 */ break; - case 266: -#line 600 "util/configparser.y" /* yacc.c:1648 */ + case 267: +#line 601 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_outgoing_range:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -2977,11 +2995,11 @@ yyreduce: else cfg_parser->cfg->outgoing_num_ports = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 2981 "util/configparser.c" /* yacc.c:1648 */ +#line 2999 "util/configparser.c" /* yacc.c:1646 */ break; - case 267: -#line 609 "util/configparser.y" /* yacc.c:1648 */ + case 268: +#line 610 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_outgoing_port_permit:%s)\n", (yyvsp[0].str))); if(!cfg_mark_ports((yyvsp[0].str), 1, @@ -2989,11 +3007,11 @@ yyreduce: yyerror("port number or range (\"low-high\") expected"); free((yyvsp[0].str)); } -#line 2993 "util/configparser.c" /* yacc.c:1648 */ +#line 3011 "util/configparser.c" /* yacc.c:1646 */ break; - case 268: -#line 618 "util/configparser.y" /* yacc.c:1648 */ + case 269: +#line 619 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_outgoing_port_avoid:%s)\n", (yyvsp[0].str))); if(!cfg_mark_ports((yyvsp[0].str), 0, @@ -3001,11 +3019,11 @@ yyreduce: yyerror("port number or range (\"low-high\") expected"); free((yyvsp[0].str)); } -#line 3005 "util/configparser.c" /* yacc.c:1648 */ +#line 3023 "util/configparser.c" /* yacc.c:1646 */ break; - case 269: -#line 627 "util/configparser.y" /* yacc.c:1648 */ + case 270: +#line 628 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_outgoing_num_tcp:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -3013,11 +3031,11 @@ yyreduce: else cfg_parser->cfg->outgoing_num_tcp = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3017 "util/configparser.c" /* yacc.c:1648 */ +#line 3035 "util/configparser.c" /* yacc.c:1646 */ break; - case 270: -#line 636 "util/configparser.y" /* yacc.c:1648 */ + case 271: +#line 637 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_incoming_num_tcp:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -3025,11 +3043,11 @@ yyreduce: else cfg_parser->cfg->incoming_num_tcp = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3029 "util/configparser.c" /* yacc.c:1648 */ +#line 3047 "util/configparser.c" /* yacc.c:1646 */ break; - case 271: -#line 645 "util/configparser.y" /* yacc.c:1648 */ + case 272: +#line 646 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_interface_automatic:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3037,11 +3055,11 @@ yyreduce: else cfg_parser->cfg->if_automatic = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3041 "util/configparser.c" /* yacc.c:1648 */ +#line 3059 "util/configparser.c" /* yacc.c:1646 */ break; - case 272: -#line 654 "util/configparser.y" /* yacc.c:1648 */ + case 273: +#line 655 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_do_ip4:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3049,11 +3067,11 @@ yyreduce: else cfg_parser->cfg->do_ip4 = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3053 "util/configparser.c" /* yacc.c:1648 */ +#line 3071 "util/configparser.c" /* yacc.c:1646 */ break; - case 273: -#line 663 "util/configparser.y" /* yacc.c:1648 */ + case 274: +#line 664 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_do_ip6:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3061,11 +3079,11 @@ yyreduce: else cfg_parser->cfg->do_ip6 = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3065 "util/configparser.c" /* yacc.c:1648 */ +#line 3083 "util/configparser.c" /* yacc.c:1646 */ break; - case 274: -#line 672 "util/configparser.y" /* yacc.c:1648 */ + case 275: +#line 673 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_do_udp:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3073,11 +3091,11 @@ yyreduce: else cfg_parser->cfg->do_udp = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3077 "util/configparser.c" /* yacc.c:1648 */ +#line 3095 "util/configparser.c" /* yacc.c:1646 */ break; - case 275: -#line 681 "util/configparser.y" /* yacc.c:1648 */ + case 276: +#line 682 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_do_tcp:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3085,11 +3103,11 @@ yyreduce: else cfg_parser->cfg->do_tcp = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3089 "util/configparser.c" /* yacc.c:1648 */ +#line 3107 "util/configparser.c" /* yacc.c:1646 */ break; - case 276: -#line 690 "util/configparser.y" /* yacc.c:1648 */ + case 277: +#line 691 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_prefer_ip6:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3097,11 +3115,11 @@ yyreduce: else cfg_parser->cfg->prefer_ip6 = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3101 "util/configparser.c" /* yacc.c:1648 */ +#line 3119 "util/configparser.c" /* yacc.c:1646 */ break; - case 277: -#line 699 "util/configparser.y" /* yacc.c:1648 */ + case 278: +#line 700 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_tcp_mss:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -3109,11 +3127,11 @@ yyreduce: else cfg_parser->cfg->tcp_mss = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3113 "util/configparser.c" /* yacc.c:1648 */ +#line 3131 "util/configparser.c" /* yacc.c:1646 */ break; - case 278: -#line 708 "util/configparser.y" /* yacc.c:1648 */ + case 279: +#line 709 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_outgoing_tcp_mss:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -3121,11 +3139,11 @@ yyreduce: else cfg_parser->cfg->outgoing_tcp_mss = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3125 "util/configparser.c" /* yacc.c:1648 */ +#line 3143 "util/configparser.c" /* yacc.c:1646 */ break; - case 279: -#line 717 "util/configparser.y" /* yacc.c:1648 */ + case 280: +#line 718 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_tcp_idle_timeout:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -3137,11 +3155,11 @@ yyreduce: else cfg_parser->cfg->tcp_idle_timeout = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3141 "util/configparser.c" /* yacc.c:1648 */ +#line 3159 "util/configparser.c" /* yacc.c:1646 */ break; - case 280: -#line 730 "util/configparser.y" /* yacc.c:1648 */ + case 281: +#line 731 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_tcp_keepalive:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3149,11 +3167,11 @@ yyreduce: else cfg_parser->cfg->do_tcp_keepalive = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3153 "util/configparser.c" /* yacc.c:1648 */ +#line 3171 "util/configparser.c" /* yacc.c:1646 */ break; - case 281: -#line 739 "util/configparser.y" /* yacc.c:1648 */ + case 282: +#line 740 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_tcp_keepalive_timeout:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -3165,11 +3183,11 @@ yyreduce: else cfg_parser->cfg->tcp_keepalive_timeout = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3169 "util/configparser.c" /* yacc.c:1648 */ +#line 3187 "util/configparser.c" /* yacc.c:1646 */ break; - case 282: -#line 752 "util/configparser.y" /* yacc.c:1648 */ + case 283: +#line 753 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_tcp_upstream:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3177,11 +3195,11 @@ yyreduce: else cfg_parser->cfg->tcp_upstream = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3181 "util/configparser.c" /* yacc.c:1648 */ +#line 3199 "util/configparser.c" /* yacc.c:1646 */ break; - case 283: -#line 761 "util/configparser.y" /* yacc.c:1648 */ + case 284: +#line 762 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_udp_upstream_without_downstream:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3189,11 +3207,11 @@ yyreduce: else cfg_parser->cfg->udp_upstream_without_downstream = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3193 "util/configparser.c" /* yacc.c:1648 */ +#line 3211 "util/configparser.c" /* yacc.c:1646 */ break; - case 284: -#line 770 "util/configparser.y" /* yacc.c:1648 */ + case 285: +#line 771 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ssl_upstream:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3201,31 +3219,31 @@ yyreduce: else cfg_parser->cfg->ssl_upstream = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3205 "util/configparser.c" /* yacc.c:1648 */ +#line 3223 "util/configparser.c" /* yacc.c:1646 */ break; - case 285: -#line 779 "util/configparser.y" /* yacc.c:1648 */ + case 286: +#line 780 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ssl_service_key:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->ssl_service_key); cfg_parser->cfg->ssl_service_key = (yyvsp[0].str); } -#line 3215 "util/configparser.c" /* yacc.c:1648 */ +#line 3233 "util/configparser.c" /* yacc.c:1646 */ break; - case 286: -#line 786 "util/configparser.y" /* yacc.c:1648 */ + case 287: +#line 787 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ssl_service_pem:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->ssl_service_pem); cfg_parser->cfg->ssl_service_pem = (yyvsp[0].str); } -#line 3225 "util/configparser.c" /* yacc.c:1648 */ +#line 3243 "util/configparser.c" /* yacc.c:1646 */ break; - case 287: -#line 793 "util/configparser.y" /* yacc.c:1648 */ + case 288: +#line 794 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ssl_port:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -3233,21 +3251,21 @@ yyreduce: else cfg_parser->cfg->ssl_port = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3237 "util/configparser.c" /* yacc.c:1648 */ +#line 3255 "util/configparser.c" /* yacc.c:1646 */ break; - case 288: -#line 802 "util/configparser.y" /* yacc.c:1648 */ + case 289: +#line 803 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_tls_cert_bundle:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->tls_cert_bundle); cfg_parser->cfg->tls_cert_bundle = (yyvsp[0].str); } -#line 3247 "util/configparser.c" /* yacc.c:1648 */ +#line 3265 "util/configparser.c" /* yacc.c:1646 */ break; - case 289: -#line 809 "util/configparser.y" /* yacc.c:1648 */ + case 290: +#line 810 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_tls_win_cert:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3255,53 +3273,53 @@ yyreduce: else cfg_parser->cfg->tls_win_cert = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3259 "util/configparser.c" /* yacc.c:1648 */ +#line 3277 "util/configparser.c" /* yacc.c:1646 */ break; - case 290: -#line 818 "util/configparser.y" /* yacc.c:1648 */ + case 291: +#line 819 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_tls_additional_port:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->tls_additional_port, (yyvsp[0].str))) yyerror("out of memory"); } -#line 3270 "util/configparser.c" /* yacc.c:1648 */ +#line 3288 "util/configparser.c" /* yacc.c:1646 */ break; - case 291: -#line 826 "util/configparser.y" /* yacc.c:1648 */ + case 292: +#line 827 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_tls_ciphers:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->tls_ciphers); cfg_parser->cfg->tls_ciphers = (yyvsp[0].str); } -#line 3280 "util/configparser.c" /* yacc.c:1648 */ +#line 3298 "util/configparser.c" /* yacc.c:1646 */ break; - case 292: -#line 833 "util/configparser.y" /* yacc.c:1648 */ + case 293: +#line 834 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_tls_ciphersuites:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->tls_ciphersuites); cfg_parser->cfg->tls_ciphersuites = (yyvsp[0].str); } -#line 3290 "util/configparser.c" /* yacc.c:1648 */ +#line 3308 "util/configparser.c" /* yacc.c:1646 */ break; - case 293: -#line 840 "util/configparser.y" /* yacc.c:1648 */ + case 294: +#line 841 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_tls_session_ticket_keys:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_append(&cfg_parser->cfg->tls_session_ticket_keys, (yyvsp[0].str))) yyerror("out of memory"); } -#line 3301 "util/configparser.c" /* yacc.c:1648 */ +#line 3319 "util/configparser.c" /* yacc.c:1646 */ break; - case 294: -#line 848 "util/configparser.y" /* yacc.c:1648 */ + case 295: +#line 849 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_use_systemd:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3309,11 +3327,11 @@ yyreduce: else cfg_parser->cfg->use_systemd = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3313 "util/configparser.c" /* yacc.c:1648 */ +#line 3331 "util/configparser.c" /* yacc.c:1646 */ break; - case 295: -#line 857 "util/configparser.y" /* yacc.c:1648 */ + case 296: +#line 858 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_do_daemonize:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3321,11 +3339,11 @@ yyreduce: else cfg_parser->cfg->do_daemonize = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3325 "util/configparser.c" /* yacc.c:1648 */ +#line 3343 "util/configparser.c" /* yacc.c:1646 */ break; - case 296: -#line 866 "util/configparser.y" /* yacc.c:1648 */ + case 297: +#line 867 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_use_syslog:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3338,11 +3356,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 3342 "util/configparser.c" /* yacc.c:1648 */ +#line 3360 "util/configparser.c" /* yacc.c:1646 */ break; - case 297: -#line 880 "util/configparser.y" /* yacc.c:1648 */ + case 298: +#line 881 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_log_time_ascii:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3350,11 +3368,11 @@ yyreduce: else cfg_parser->cfg->log_time_ascii = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3354 "util/configparser.c" /* yacc.c:1648 */ +#line 3372 "util/configparser.c" /* yacc.c:1646 */ break; - case 298: -#line 889 "util/configparser.y" /* yacc.c:1648 */ + case 299: +#line 890 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_log_queries:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3362,11 +3380,11 @@ yyreduce: else cfg_parser->cfg->log_queries = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3366 "util/configparser.c" /* yacc.c:1648 */ +#line 3384 "util/configparser.c" /* yacc.c:1646 */ break; - case 299: -#line 898 "util/configparser.y" /* yacc.c:1648 */ + case 300: +#line 899 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_log_replies:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3374,11 +3392,11 @@ yyreduce: else cfg_parser->cfg->log_replies = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3378 "util/configparser.c" /* yacc.c:1648 */ +#line 3396 "util/configparser.c" /* yacc.c:1646 */ break; - case 300: -#line 907 "util/configparser.y" /* yacc.c:1648 */ + case 301: +#line 908 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_log_tag_queryreply:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3386,11 +3404,11 @@ yyreduce: else cfg_parser->cfg->log_tag_queryreply = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3390 "util/configparser.c" /* yacc.c:1648 */ +#line 3408 "util/configparser.c" /* yacc.c:1646 */ break; - case 301: -#line 916 "util/configparser.y" /* yacc.c:1648 */ + case 302: +#line 917 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_log_servfail:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3398,11 +3416,11 @@ yyreduce: else cfg_parser->cfg->log_servfail = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3402 "util/configparser.c" /* yacc.c:1648 */ +#line 3420 "util/configparser.c" /* yacc.c:1646 */ break; - case 302: -#line 925 "util/configparser.y" /* yacc.c:1648 */ + case 303: +#line 926 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_log_local_actions:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3410,31 +3428,31 @@ yyreduce: else cfg_parser->cfg->log_local_actions = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3414 "util/configparser.c" /* yacc.c:1648 */ +#line 3432 "util/configparser.c" /* yacc.c:1646 */ break; - case 303: -#line 934 "util/configparser.y" /* yacc.c:1648 */ + case 304: +#line 935 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_chroot:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->chrootdir); cfg_parser->cfg->chrootdir = (yyvsp[0].str); } -#line 3424 "util/configparser.c" /* yacc.c:1648 */ +#line 3442 "util/configparser.c" /* yacc.c:1646 */ break; - case 304: -#line 941 "util/configparser.y" /* yacc.c:1648 */ + case 305: +#line 942 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_username:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->username); cfg_parser->cfg->username = (yyvsp[0].str); } -#line 3434 "util/configparser.c" /* yacc.c:1648 */ +#line 3452 "util/configparser.c" /* yacc.c:1646 */ break; - case 305: -#line 948 "util/configparser.y" /* yacc.c:1648 */ + case 306: +#line 949 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_directory:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->directory); @@ -3459,105 +3477,105 @@ yyreduce: } } } -#line 3463 "util/configparser.c" /* yacc.c:1648 */ +#line 3481 "util/configparser.c" /* yacc.c:1646 */ break; - case 306: -#line 974 "util/configparser.y" /* yacc.c:1648 */ + case 307: +#line 975 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_logfile:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->logfile); cfg_parser->cfg->logfile = (yyvsp[0].str); cfg_parser->cfg->use_syslog = 0; } -#line 3474 "util/configparser.c" /* yacc.c:1648 */ +#line 3492 "util/configparser.c" /* yacc.c:1646 */ break; - case 307: -#line 982 "util/configparser.y" /* yacc.c:1648 */ + case 308: +#line 983 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_pidfile:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->pidfile); cfg_parser->cfg->pidfile = (yyvsp[0].str); } -#line 3484 "util/configparser.c" /* yacc.c:1648 */ +#line 3502 "util/configparser.c" /* yacc.c:1646 */ break; - case 308: -#line 989 "util/configparser.y" /* yacc.c:1648 */ + case 309: +#line 990 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_root_hints:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->root_hints, (yyvsp[0].str))) yyerror("out of memory"); } -#line 3494 "util/configparser.c" /* yacc.c:1648 */ +#line 3512 "util/configparser.c" /* yacc.c:1646 */ break; - case 309: -#line 996 "util/configparser.y" /* yacc.c:1648 */ + case 310: +#line 997 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_dlv_anchor_file:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->dlv_anchor_file); cfg_parser->cfg->dlv_anchor_file = (yyvsp[0].str); } -#line 3504 "util/configparser.c" /* yacc.c:1648 */ +#line 3522 "util/configparser.c" /* yacc.c:1646 */ break; - case 310: -#line 1003 "util/configparser.y" /* yacc.c:1648 */ + case 311: +#line 1004 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_dlv_anchor:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->dlv_anchor_list, (yyvsp[0].str))) yyerror("out of memory"); } -#line 3514 "util/configparser.c" /* yacc.c:1648 */ +#line 3532 "util/configparser.c" /* yacc.c:1646 */ break; - case 311: -#line 1010 "util/configparser.y" /* yacc.c:1648 */ + case 312: +#line 1011 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_auto_trust_anchor_file:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg-> auto_trust_anchor_file_list, (yyvsp[0].str))) yyerror("out of memory"); } -#line 3525 "util/configparser.c" /* yacc.c:1648 */ +#line 3543 "util/configparser.c" /* yacc.c:1646 */ break; - case 312: -#line 1018 "util/configparser.y" /* yacc.c:1648 */ + case 313: +#line 1019 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_trust_anchor_file:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg-> trust_anchor_file_list, (yyvsp[0].str))) yyerror("out of memory"); } -#line 3536 "util/configparser.c" /* yacc.c:1648 */ +#line 3554 "util/configparser.c" /* yacc.c:1646 */ break; - case 313: -#line 1026 "util/configparser.y" /* yacc.c:1648 */ + case 314: +#line 1027 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_trusted_keys_file:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg-> trusted_keys_file_list, (yyvsp[0].str))) yyerror("out of memory"); } -#line 3547 "util/configparser.c" /* yacc.c:1648 */ +#line 3565 "util/configparser.c" /* yacc.c:1646 */ break; - case 314: -#line 1034 "util/configparser.y" /* yacc.c:1648 */ + case 315: +#line 1035 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_trust_anchor:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->trust_anchor_list, (yyvsp[0].str))) yyerror("out of memory"); } -#line 3557 "util/configparser.c" /* yacc.c:1648 */ +#line 3575 "util/configparser.c" /* yacc.c:1646 */ break; - case 315: -#line 1041 "util/configparser.y" /* yacc.c:1648 */ + case 316: +#line 1042 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_trust_anchor_signaling:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3567,11 +3585,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3571 "util/configparser.c" /* yacc.c:1648 */ +#line 3589 "util/configparser.c" /* yacc.c:1646 */ break; - case 316: -#line 1052 "util/configparser.y" /* yacc.c:1648 */ + case 317: +#line 1053 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_root_key_sentinel:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3581,21 +3599,21 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3585 "util/configparser.c" /* yacc.c:1648 */ +#line 3603 "util/configparser.c" /* yacc.c:1646 */ break; - case 317: -#line 1063 "util/configparser.y" /* yacc.c:1648 */ + case 318: +#line 1064 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_domain_insecure:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->domain_insecure, (yyvsp[0].str))) yyerror("out of memory"); } -#line 3595 "util/configparser.c" /* yacc.c:1648 */ +#line 3613 "util/configparser.c" /* yacc.c:1646 */ break; - case 318: -#line 1070 "util/configparser.y" /* yacc.c:1648 */ + case 319: +#line 1071 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_hide_identity:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3603,11 +3621,11 @@ yyreduce: else cfg_parser->cfg->hide_identity = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3607 "util/configparser.c" /* yacc.c:1648 */ +#line 3625 "util/configparser.c" /* yacc.c:1646 */ break; - case 319: -#line 1079 "util/configparser.y" /* yacc.c:1648 */ + case 320: +#line 1080 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_hide_version:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3615,11 +3633,11 @@ yyreduce: else cfg_parser->cfg->hide_version = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3619 "util/configparser.c" /* yacc.c:1648 */ +#line 3637 "util/configparser.c" /* yacc.c:1646 */ break; - case 320: -#line 1088 "util/configparser.y" /* yacc.c:1648 */ + case 321: +#line 1089 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_hide_trustanchor:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3627,53 +3645,53 @@ yyreduce: else cfg_parser->cfg->hide_trustanchor = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3631 "util/configparser.c" /* yacc.c:1648 */ +#line 3649 "util/configparser.c" /* yacc.c:1646 */ break; - case 321: -#line 1097 "util/configparser.y" /* yacc.c:1648 */ + case 322: +#line 1098 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_identity:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->identity); cfg_parser->cfg->identity = (yyvsp[0].str); } -#line 3641 "util/configparser.c" /* yacc.c:1648 */ +#line 3659 "util/configparser.c" /* yacc.c:1646 */ break; - case 322: -#line 1104 "util/configparser.y" /* yacc.c:1648 */ + case 323: +#line 1105 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_version:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->version); cfg_parser->cfg->version = (yyvsp[0].str); } -#line 3651 "util/configparser.c" /* yacc.c:1648 */ +#line 3669 "util/configparser.c" /* yacc.c:1646 */ break; - case 323: -#line 1111 "util/configparser.y" /* yacc.c:1648 */ + case 324: +#line 1112 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_so_rcvbuf:%s)\n", (yyvsp[0].str))); if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->so_rcvbuf)) yyerror("buffer size expected"); free((yyvsp[0].str)); } -#line 3662 "util/configparser.c" /* yacc.c:1648 */ +#line 3680 "util/configparser.c" /* yacc.c:1646 */ break; - case 324: -#line 1119 "util/configparser.y" /* yacc.c:1648 */ + case 325: +#line 1120 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_so_sndbuf:%s)\n", (yyvsp[0].str))); if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->so_sndbuf)) yyerror("buffer size expected"); free((yyvsp[0].str)); } -#line 3673 "util/configparser.c" /* yacc.c:1648 */ +#line 3691 "util/configparser.c" /* yacc.c:1646 */ break; - case 325: -#line 1127 "util/configparser.y" /* yacc.c:1648 */ + case 326: +#line 1128 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_so_reuseport:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3682,11 +3700,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3686 "util/configparser.c" /* yacc.c:1648 */ +#line 3704 "util/configparser.c" /* yacc.c:1646 */ break; - case 326: -#line 1137 "util/configparser.y" /* yacc.c:1648 */ + case 327: +#line 1138 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ip_transparent:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3695,11 +3713,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3699 "util/configparser.c" /* yacc.c:1648 */ +#line 3717 "util/configparser.c" /* yacc.c:1646 */ break; - case 327: -#line 1147 "util/configparser.y" /* yacc.c:1648 */ + case 328: +#line 1148 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ip_freebind:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3708,22 +3726,22 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3712 "util/configparser.c" /* yacc.c:1648 */ +#line 3730 "util/configparser.c" /* yacc.c:1646 */ break; - case 328: -#line 1157 "util/configparser.y" /* yacc.c:1648 */ + case 329: +#line 1158 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_stream_wait_size:%s)\n", (yyvsp[0].str))); if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->stream_wait_size)) yyerror("memory size expected"); free((yyvsp[0].str)); } -#line 3723 "util/configparser.c" /* yacc.c:1648 */ +#line 3741 "util/configparser.c" /* yacc.c:1646 */ break; - case 329: -#line 1165 "util/configparser.y" /* yacc.c:1648 */ + case 330: +#line 1166 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_edns_buffer_size:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -3735,11 +3753,11 @@ yyreduce: else cfg_parser->cfg->edns_buffer_size = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3739 "util/configparser.c" /* yacc.c:1648 */ +#line 3757 "util/configparser.c" /* yacc.c:1646 */ break; - case 330: -#line 1178 "util/configparser.y" /* yacc.c:1648 */ + case 331: +#line 1179 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_msg_buffer_size:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -3749,22 +3767,22 @@ yyreduce: else cfg_parser->cfg->msg_buffer_size = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3753 "util/configparser.c" /* yacc.c:1648 */ +#line 3771 "util/configparser.c" /* yacc.c:1646 */ break; - case 331: -#line 1189 "util/configparser.y" /* yacc.c:1648 */ + case 332: +#line 1190 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_msg_cache_size:%s)\n", (yyvsp[0].str))); if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->msg_cache_size)) yyerror("memory size expected"); free((yyvsp[0].str)); } -#line 3764 "util/configparser.c" /* yacc.c:1648 */ +#line 3782 "util/configparser.c" /* yacc.c:1646 */ break; - case 332: -#line 1197 "util/configparser.y" /* yacc.c:1648 */ + case 333: +#line 1198 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_msg_cache_slabs:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -3776,11 +3794,11 @@ yyreduce: } free((yyvsp[0].str)); } -#line 3780 "util/configparser.c" /* yacc.c:1648 */ +#line 3798 "util/configparser.c" /* yacc.c:1646 */ break; - case 333: -#line 1210 "util/configparser.y" /* yacc.c:1648 */ + case 334: +#line 1211 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_num_queries_per_thread:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -3788,11 +3806,11 @@ yyreduce: else cfg_parser->cfg->num_queries_per_thread = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3792 "util/configparser.c" /* yacc.c:1648 */ +#line 3810 "util/configparser.c" /* yacc.c:1646 */ break; - case 334: -#line 1219 "util/configparser.y" /* yacc.c:1648 */ + case 335: +#line 1220 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_jostle_timeout:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -3800,11 +3818,11 @@ yyreduce: else cfg_parser->cfg->jostle_time = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3804 "util/configparser.c" /* yacc.c:1648 */ +#line 3822 "util/configparser.c" /* yacc.c:1646 */ break; - case 335: -#line 1228 "util/configparser.y" /* yacc.c:1648 */ + case 336: +#line 1229 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_delay_close:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -3812,11 +3830,11 @@ yyreduce: else cfg_parser->cfg->delay_close = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3816 "util/configparser.c" /* yacc.c:1648 */ +#line 3834 "util/configparser.c" /* yacc.c:1646 */ break; - case 336: -#line 1237 "util/configparser.y" /* yacc.c:1648 */ + case 337: +#line 1238 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_unblock_lan_zones:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3825,11 +3843,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3829 "util/configparser.c" /* yacc.c:1648 */ +#line 3847 "util/configparser.c" /* yacc.c:1646 */ break; - case 337: -#line 1247 "util/configparser.y" /* yacc.c:1648 */ + case 338: +#line 1248 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_insecure_lan_zones:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3838,22 +3856,22 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3842 "util/configparser.c" /* yacc.c:1648 */ +#line 3860 "util/configparser.c" /* yacc.c:1646 */ break; - case 338: -#line 1257 "util/configparser.y" /* yacc.c:1648 */ + case 339: +#line 1258 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_rrset_cache_size:%s)\n", (yyvsp[0].str))); if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->rrset_cache_size)) yyerror("memory size expected"); free((yyvsp[0].str)); } -#line 3853 "util/configparser.c" /* yacc.c:1648 */ +#line 3871 "util/configparser.c" /* yacc.c:1646 */ break; - case 339: -#line 1265 "util/configparser.y" /* yacc.c:1648 */ + case 340: +#line 1266 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_rrset_cache_slabs:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -3865,11 +3883,11 @@ yyreduce: } free((yyvsp[0].str)); } -#line 3869 "util/configparser.c" /* yacc.c:1648 */ +#line 3887 "util/configparser.c" /* yacc.c:1646 */ break; - case 340: -#line 1278 "util/configparser.y" /* yacc.c:1648 */ + case 341: +#line 1279 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_infra_host_ttl:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -3877,22 +3895,22 @@ yyreduce: else cfg_parser->cfg->host_ttl = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3881 "util/configparser.c" /* yacc.c:1648 */ +#line 3899 "util/configparser.c" /* yacc.c:1646 */ break; - case 341: -#line 1287 "util/configparser.y" /* yacc.c:1648 */ + case 342: +#line 1288 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_infra_lame_ttl:%s)\n", (yyvsp[0].str))); verbose(VERB_DETAIL, "ignored infra-lame-ttl: %s (option " "removed, use infra-host-ttl)", (yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3892 "util/configparser.c" /* yacc.c:1648 */ +#line 3910 "util/configparser.c" /* yacc.c:1646 */ break; - case 342: -#line 1295 "util/configparser.y" /* yacc.c:1648 */ + case 343: +#line 1296 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_infra_cache_numhosts:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -3900,22 +3918,22 @@ yyreduce: else cfg_parser->cfg->infra_cache_numhosts = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3904 "util/configparser.c" /* yacc.c:1648 */ +#line 3922 "util/configparser.c" /* yacc.c:1646 */ break; - case 343: -#line 1304 "util/configparser.y" /* yacc.c:1648 */ + case 344: +#line 1305 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_infra_cache_lame_size:%s)\n", (yyvsp[0].str))); verbose(VERB_DETAIL, "ignored infra-cache-lame-size: %s " "(option removed, use infra-cache-numhosts)", (yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3915 "util/configparser.c" /* yacc.c:1648 */ +#line 3933 "util/configparser.c" /* yacc.c:1646 */ break; - case 344: -#line 1312 "util/configparser.y" /* yacc.c:1648 */ + case 345: +#line 1313 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_infra_cache_slabs:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -3927,11 +3945,11 @@ yyreduce: } free((yyvsp[0].str)); } -#line 3931 "util/configparser.c" /* yacc.c:1648 */ +#line 3949 "util/configparser.c" /* yacc.c:1646 */ break; - case 345: -#line 1325 "util/configparser.y" /* yacc.c:1648 */ + case 346: +#line 1326 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_infra_cache_min_rtt:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -3939,21 +3957,21 @@ yyreduce: else cfg_parser->cfg->infra_cache_min_rtt = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 3943 "util/configparser.c" /* yacc.c:1648 */ +#line 3961 "util/configparser.c" /* yacc.c:1646 */ break; - case 346: -#line 1334 "util/configparser.y" /* yacc.c:1648 */ + case 347: +#line 1335 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_target_fetch_policy:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->target_fetch_policy); cfg_parser->cfg->target_fetch_policy = (yyvsp[0].str); } -#line 3953 "util/configparser.c" /* yacc.c:1648 */ +#line 3971 "util/configparser.c" /* yacc.c:1646 */ break; - case 347: -#line 1341 "util/configparser.y" /* yacc.c:1648 */ + case 348: +#line 1342 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_harden_short_bufsize:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3962,11 +3980,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3966 "util/configparser.c" /* yacc.c:1648 */ +#line 3984 "util/configparser.c" /* yacc.c:1646 */ break; - case 348: -#line 1351 "util/configparser.y" /* yacc.c:1648 */ + case 349: +#line 1352 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_harden_large_queries:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3975,11 +3993,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3979 "util/configparser.c" /* yacc.c:1648 */ +#line 3997 "util/configparser.c" /* yacc.c:1646 */ break; - case 349: -#line 1361 "util/configparser.y" /* yacc.c:1648 */ + case 350: +#line 1362 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_harden_glue:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -3988,11 +4006,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 3992 "util/configparser.c" /* yacc.c:1648 */ +#line 4010 "util/configparser.c" /* yacc.c:1646 */ break; - case 350: -#line 1371 "util/configparser.y" /* yacc.c:1648 */ + case 351: +#line 1372 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_harden_dnssec_stripped:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4001,11 +4019,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4005 "util/configparser.c" /* yacc.c:1648 */ +#line 4023 "util/configparser.c" /* yacc.c:1646 */ break; - case 351: -#line 1381 "util/configparser.y" /* yacc.c:1648 */ + case 352: +#line 1382 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_harden_below_nxdomain:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4014,11 +4032,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4018 "util/configparser.c" /* yacc.c:1648 */ +#line 4036 "util/configparser.c" /* yacc.c:1646 */ break; - case 352: -#line 1391 "util/configparser.y" /* yacc.c:1648 */ + case 353: +#line 1392 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_harden_referral_path:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4027,11 +4045,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4031 "util/configparser.c" /* yacc.c:1648 */ +#line 4049 "util/configparser.c" /* yacc.c:1646 */ break; - case 353: -#line 1401 "util/configparser.y" /* yacc.c:1648 */ + case 354: +#line 1402 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_harden_algo_downgrade:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4040,11 +4058,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4044 "util/configparser.c" /* yacc.c:1648 */ +#line 4062 "util/configparser.c" /* yacc.c:1646 */ break; - case 354: -#line 1411 "util/configparser.y" /* yacc.c:1648 */ + case 355: +#line 1412 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_use_caps_for_id:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4053,41 +4071,41 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4057 "util/configparser.c" /* yacc.c:1648 */ +#line 4075 "util/configparser.c" /* yacc.c:1646 */ break; - case 355: -#line 1421 "util/configparser.y" /* yacc.c:1648 */ + case 356: +#line 1422 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_caps_whitelist:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->caps_whitelist, (yyvsp[0].str))) yyerror("out of memory"); } -#line 4067 "util/configparser.c" /* yacc.c:1648 */ +#line 4085 "util/configparser.c" /* yacc.c:1646 */ break; - case 356: -#line 1428 "util/configparser.y" /* yacc.c:1648 */ + case 357: +#line 1429 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_private_address:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->private_address, (yyvsp[0].str))) yyerror("out of memory"); } -#line 4077 "util/configparser.c" /* yacc.c:1648 */ +#line 4095 "util/configparser.c" /* yacc.c:1646 */ break; - case 357: -#line 1435 "util/configparser.y" /* yacc.c:1648 */ + case 358: +#line 1436 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_private_domain:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->private_domain, (yyvsp[0].str))) yyerror("out of memory"); } -#line 4087 "util/configparser.c" /* yacc.c:1648 */ +#line 4105 "util/configparser.c" /* yacc.c:1646 */ break; - case 358: -#line 1442 "util/configparser.y" /* yacc.c:1648 */ + case 359: +#line 1443 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_prefetch:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4095,11 +4113,11 @@ yyreduce: else cfg_parser->cfg->prefetch = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4099 "util/configparser.c" /* yacc.c:1648 */ +#line 4117 "util/configparser.c" /* yacc.c:1646 */ break; - case 359: -#line 1451 "util/configparser.y" /* yacc.c:1648 */ + case 360: +#line 1452 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_prefetch_key:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4107,11 +4125,11 @@ yyreduce: else cfg_parser->cfg->prefetch_key = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4111 "util/configparser.c" /* yacc.c:1648 */ +#line 4129 "util/configparser.c" /* yacc.c:1646 */ break; - case 360: -#line 1460 "util/configparser.y" /* yacc.c:1648 */ + case 361: +#line 1461 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_deny_any:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4119,11 +4137,11 @@ yyreduce: else cfg_parser->cfg->deny_any = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4123 "util/configparser.c" /* yacc.c:1648 */ +#line 4141 "util/configparser.c" /* yacc.c:1646 */ break; - case 361: -#line 1469 "util/configparser.y" /* yacc.c:1648 */ + case 362: +#line 1470 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_unwanted_reply_threshold:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4131,21 +4149,21 @@ yyreduce: else cfg_parser->cfg->unwanted_threshold = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4135 "util/configparser.c" /* yacc.c:1648 */ +#line 4153 "util/configparser.c" /* yacc.c:1646 */ break; - case 362: -#line 1478 "util/configparser.y" /* yacc.c:1648 */ + case 363: +#line 1479 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_do_not_query_address:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->donotqueryaddrs, (yyvsp[0].str))) yyerror("out of memory"); } -#line 4145 "util/configparser.c" /* yacc.c:1648 */ +#line 4163 "util/configparser.c" /* yacc.c:1646 */ break; - case 363: -#line 1485 "util/configparser.y" /* yacc.c:1648 */ + case 364: +#line 1486 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_do_not_query_localhost:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4154,11 +4172,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4158 "util/configparser.c" /* yacc.c:1648 */ +#line 4176 "util/configparser.c" /* yacc.c:1646 */ break; - case 364: -#line 1495 "util/configparser.y" /* yacc.c:1648 */ + case 365: +#line 1496 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_access_control:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "deny")!=0 && strcmp((yyvsp[0].str), "refuse")!=0 && @@ -4177,21 +4195,21 @@ yyreduce: fatal_exit("out of memory adding acl"); } } -#line 4181 "util/configparser.c" /* yacc.c:1648 */ +#line 4199 "util/configparser.c" /* yacc.c:1646 */ break; - case 365: -#line 1515 "util/configparser.y" /* yacc.c:1648 */ + case 366: +#line 1516 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_module_conf:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->module_conf); cfg_parser->cfg->module_conf = (yyvsp[0].str); } -#line 4191 "util/configparser.c" /* yacc.c:1648 */ +#line 4209 "util/configparser.c" /* yacc.c:1646 */ break; - case 366: -#line 1522 "util/configparser.y" /* yacc.c:1648 */ + case 367: +#line 1523 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_val_override_date:%s)\n", (yyvsp[0].str))); if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) { @@ -4208,11 +4226,11 @@ yyreduce: } free((yyvsp[0].str)); } -#line 4212 "util/configparser.c" /* yacc.c:1648 */ +#line 4230 "util/configparser.c" /* yacc.c:1646 */ break; - case 367: -#line 1540 "util/configparser.y" /* yacc.c:1648 */ + case 368: +#line 1541 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_val_sig_skew_min:%s)\n", (yyvsp[0].str))); if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) { @@ -4224,11 +4242,11 @@ yyreduce: } free((yyvsp[0].str)); } -#line 4228 "util/configparser.c" /* yacc.c:1648 */ +#line 4246 "util/configparser.c" /* yacc.c:1646 */ break; - case 368: -#line 1553 "util/configparser.y" /* yacc.c:1648 */ + case 369: +#line 1554 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_val_sig_skew_max:%s)\n", (yyvsp[0].str))); if(*(yyvsp[0].str) == '\0' || strcmp((yyvsp[0].str), "0") == 0) { @@ -4240,11 +4258,11 @@ yyreduce: } free((yyvsp[0].str)); } -#line 4244 "util/configparser.c" /* yacc.c:1648 */ +#line 4262 "util/configparser.c" /* yacc.c:1646 */ break; - case 369: -#line 1566 "util/configparser.y" /* yacc.c:1648 */ + case 370: +#line 1567 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_cache_max_ttl:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4252,11 +4270,11 @@ yyreduce: else cfg_parser->cfg->max_ttl = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4256 "util/configparser.c" /* yacc.c:1648 */ +#line 4274 "util/configparser.c" /* yacc.c:1646 */ break; - case 370: -#line 1575 "util/configparser.y" /* yacc.c:1648 */ + case 371: +#line 1576 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_cache_max_negative_ttl:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4264,11 +4282,11 @@ yyreduce: else cfg_parser->cfg->max_negative_ttl = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4268 "util/configparser.c" /* yacc.c:1648 */ +#line 4286 "util/configparser.c" /* yacc.c:1646 */ break; - case 371: -#line 1584 "util/configparser.y" /* yacc.c:1648 */ + case 372: +#line 1585 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_cache_min_ttl:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4276,11 +4294,11 @@ yyreduce: else cfg_parser->cfg->min_ttl = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4280 "util/configparser.c" /* yacc.c:1648 */ +#line 4298 "util/configparser.c" /* yacc.c:1646 */ break; - case 372: -#line 1593 "util/configparser.y" /* yacc.c:1648 */ + case 373: +#line 1594 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_bogus_ttl:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4288,11 +4306,11 @@ yyreduce: else cfg_parser->cfg->bogus_ttl = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4292 "util/configparser.c" /* yacc.c:1648 */ +#line 4310 "util/configparser.c" /* yacc.c:1646 */ break; - case 373: -#line 1602 "util/configparser.y" /* yacc.c:1648 */ + case 374: +#line 1603 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_val_clean_additional:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4301,11 +4319,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4305 "util/configparser.c" /* yacc.c:1648 */ +#line 4323 "util/configparser.c" /* yacc.c:1646 */ break; - case 374: -#line 1612 "util/configparser.y" /* yacc.c:1648 */ + case 375: +#line 1613 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_val_permissive_mode:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4314,11 +4332,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4318 "util/configparser.c" /* yacc.c:1648 */ +#line 4336 "util/configparser.c" /* yacc.c:1646 */ break; - case 375: -#line 1622 "util/configparser.y" /* yacc.c:1648 */ + case 376: +#line 1623 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_aggressive_nsec:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4328,11 +4346,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4332 "util/configparser.c" /* yacc.c:1648 */ +#line 4350 "util/configparser.c" /* yacc.c:1646 */ break; - case 376: -#line 1633 "util/configparser.y" /* yacc.c:1648 */ + case 377: +#line 1634 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ignore_cd_flag:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4340,11 +4358,11 @@ yyreduce: else cfg_parser->cfg->ignore_cd = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4344 "util/configparser.c" /* yacc.c:1648 */ +#line 4362 "util/configparser.c" /* yacc.c:1646 */ break; - case 377: -#line 1642 "util/configparser.y" /* yacc.c:1648 */ + case 378: +#line 1643 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_serve_expired:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4352,11 +4370,11 @@ yyreduce: else cfg_parser->cfg->serve_expired = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4356 "util/configparser.c" /* yacc.c:1648 */ +#line 4374 "util/configparser.c" /* yacc.c:1646 */ break; - case 378: -#line 1651 "util/configparser.y" /* yacc.c:1648 */ + case 379: +#line 1652 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_serve_expired_ttl:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4364,11 +4382,11 @@ yyreduce: else cfg_parser->cfg->serve_expired_ttl = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4368 "util/configparser.c" /* yacc.c:1648 */ +#line 4386 "util/configparser.c" /* yacc.c:1646 */ break; - case 379: -#line 1660 "util/configparser.y" /* yacc.c:1648 */ + case 380: +#line 1661 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_serve_expired_ttl_reset:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4376,11 +4394,11 @@ yyreduce: else cfg_parser->cfg->serve_expired_ttl_reset = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4380 "util/configparser.c" /* yacc.c:1648 */ +#line 4398 "util/configparser.c" /* yacc.c:1646 */ break; - case 380: -#line 1669 "util/configparser.y" /* yacc.c:1648 */ + case 381: +#line 1670 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_fake_dsa:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4392,11 +4410,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 4396 "util/configparser.c" /* yacc.c:1648 */ +#line 4414 "util/configparser.c" /* yacc.c:1646 */ break; - case 381: -#line 1682 "util/configparser.y" /* yacc.c:1648 */ + case 382: +#line 1683 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_fake_sha1:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4408,11 +4426,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 4412 "util/configparser.c" /* yacc.c:1648 */ +#line 4430 "util/configparser.c" /* yacc.c:1646 */ break; - case 382: -#line 1695 "util/configparser.y" /* yacc.c:1648 */ + case 383: +#line 1696 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_val_log_level:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4420,21 +4438,21 @@ yyreduce: else cfg_parser->cfg->val_log_level = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4424 "util/configparser.c" /* yacc.c:1648 */ +#line 4442 "util/configparser.c" /* yacc.c:1646 */ break; - case 383: -#line 1704 "util/configparser.y" /* yacc.c:1648 */ + case 384: +#line 1705 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_val_nsec3_keysize_iterations:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->val_nsec3_key_iterations); cfg_parser->cfg->val_nsec3_key_iterations = (yyvsp[0].str); } -#line 4434 "util/configparser.c" /* yacc.c:1648 */ +#line 4452 "util/configparser.c" /* yacc.c:1646 */ break; - case 384: -#line 1711 "util/configparser.y" /* yacc.c:1648 */ + case 385: +#line 1712 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_add_holddown:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4442,11 +4460,11 @@ yyreduce: else cfg_parser->cfg->add_holddown = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4446 "util/configparser.c" /* yacc.c:1648 */ +#line 4464 "util/configparser.c" /* yacc.c:1646 */ break; - case 385: -#line 1720 "util/configparser.y" /* yacc.c:1648 */ + case 386: +#line 1721 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_del_holddown:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4454,11 +4472,11 @@ yyreduce: else cfg_parser->cfg->del_holddown = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4458 "util/configparser.c" /* yacc.c:1648 */ +#line 4476 "util/configparser.c" /* yacc.c:1646 */ break; - case 386: -#line 1729 "util/configparser.y" /* yacc.c:1648 */ + case 387: +#line 1730 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_keep_missing:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4466,11 +4484,11 @@ yyreduce: else cfg_parser->cfg->keep_missing = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4470 "util/configparser.c" /* yacc.c:1648 */ +#line 4488 "util/configparser.c" /* yacc.c:1646 */ break; - case 387: -#line 1738 "util/configparser.y" /* yacc.c:1648 */ + case 388: +#line 1739 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_permit_small_holddown:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4479,22 +4497,22 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4483 "util/configparser.c" /* yacc.c:1648 */ +#line 4501 "util/configparser.c" /* yacc.c:1646 */ break; - case 388: -#line 1747 "util/configparser.y" /* yacc.c:1648 */ + case 389: +#line 1748 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_key_cache_size:%s)\n", (yyvsp[0].str))); if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->key_cache_size)) yyerror("memory size expected"); free((yyvsp[0].str)); } -#line 4494 "util/configparser.c" /* yacc.c:1648 */ +#line 4512 "util/configparser.c" /* yacc.c:1646 */ break; - case 389: -#line 1755 "util/configparser.y" /* yacc.c:1648 */ + case 390: +#line 1756 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_key_cache_slabs:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -4506,22 +4524,22 @@ yyreduce: } free((yyvsp[0].str)); } -#line 4510 "util/configparser.c" /* yacc.c:1648 */ +#line 4528 "util/configparser.c" /* yacc.c:1646 */ break; - case 390: -#line 1768 "util/configparser.y" /* yacc.c:1648 */ + case 391: +#line 1769 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_neg_cache_size:%s)\n", (yyvsp[0].str))); if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->neg_cache_size)) yyerror("memory size expected"); free((yyvsp[0].str)); } -#line 4521 "util/configparser.c" /* yacc.c:1648 */ +#line 4539 "util/configparser.c" /* yacc.c:1646 */ break; - case 391: -#line 1776 "util/configparser.y" /* yacc.c:1648 */ + case 392: +#line 1777 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_local_zone:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "static")!=0 && strcmp((yyvsp[0].str), "deny")!=0 && @@ -4532,12 +4550,15 @@ yyreduce: && strcmp((yyvsp[0].str), "always_refuse")!=0 && strcmp((yyvsp[0].str), "always_nxdomain")!=0 && strcmp((yyvsp[0].str), "noview")!=0 - && strcmp((yyvsp[0].str), "inform")!=0 && strcmp((yyvsp[0].str), "inform_deny")!=0) { + && strcmp((yyvsp[0].str), "inform")!=0 && strcmp((yyvsp[0].str), "inform_deny")!=0 + && strcmp((yyvsp[0].str), "inform_redirect") != 0 + && strcmp((yyvsp[0].str), "ipset") != 0) { yyerror("local-zone type: expected static, deny, " "refuse, redirect, transparent, " "typetransparent, inform, inform_deny, " - "always_transparent, always_refuse, " - "always_nxdomain, noview or nodefault"); + "inform_redirect, always_transparent, " + "always_refuse, always_nxdomain, noview " + ", nodefault or ipset"); free((yyvsp[-1].str)); free((yyvsp[0].str)); } else if(strcmp((yyvsp[0].str), "nodefault")==0) { @@ -4545,27 +4566,34 @@ yyreduce: local_zones_nodefault, (yyvsp[-1].str))) fatal_exit("out of memory adding local-zone"); free((yyvsp[0].str)); +#ifdef USE_IPSET + } else if(strcmp((yyvsp[0].str), "ipset")==0) { + if(!cfg_strlist_insert(&cfg_parser->cfg-> + local_zones_ipset, (yyvsp[-1].str))) + fatal_exit("out of memory adding local-zone"); + free((yyvsp[0].str)); +#endif } else { if(!cfg_str2list_insert(&cfg_parser->cfg->local_zones, (yyvsp[-1].str), (yyvsp[0].str))) fatal_exit("out of memory adding local-zone"); } } -#line 4555 "util/configparser.c" /* yacc.c:1648 */ +#line 4583 "util/configparser.c" /* yacc.c:1646 */ break; - case 392: -#line 1807 "util/configparser.y" /* yacc.c:1648 */ + case 393: +#line 1818 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_local_data:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->local_data, (yyvsp[0].str))) fatal_exit("out of memory adding local-data"); } -#line 4565 "util/configparser.c" /* yacc.c:1648 */ +#line 4593 "util/configparser.c" /* yacc.c:1646 */ break; - case 393: -#line 1814 "util/configparser.y" /* yacc.c:1648 */ + case 394: +#line 1825 "util/configparser.y" /* yacc.c:1646 */ { char* ptr; OUTYY(("P(server_local_data_ptr:%s)\n", (yyvsp[0].str))); @@ -4579,11 +4607,11 @@ yyreduce: yyerror("local-data-ptr could not be reversed"); } } -#line 4583 "util/configparser.c" /* yacc.c:1648 */ +#line 4611 "util/configparser.c" /* yacc.c:1646 */ break; - case 394: -#line 1829 "util/configparser.y" /* yacc.c:1648 */ + case 395: +#line 1840 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_minimal_responses:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4592,11 +4620,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4596 "util/configparser.c" /* yacc.c:1648 */ +#line 4624 "util/configparser.c" /* yacc.c:1646 */ break; - case 395: -#line 1839 "util/configparser.y" /* yacc.c:1648 */ + case 396: +#line 1850 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_rrset_roundrobin:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4605,41 +4633,41 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4609 "util/configparser.c" /* yacc.c:1648 */ +#line 4637 "util/configparser.c" /* yacc.c:1646 */ break; - case 396: -#line 1849 "util/configparser.y" /* yacc.c:1648 */ + case 397: +#line 1860 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_unknown_server_time_limit:%s)\n", (yyvsp[0].str))); cfg_parser->cfg->unknown_server_time_limit = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4619 "util/configparser.c" /* yacc.c:1648 */ +#line 4647 "util/configparser.c" /* yacc.c:1646 */ break; - case 397: -#line 1856 "util/configparser.y" /* yacc.c:1648 */ + case 398: +#line 1867 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_max_udp_size:%s)\n", (yyvsp[0].str))); cfg_parser->cfg->max_udp_size = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4629 "util/configparser.c" /* yacc.c:1648 */ +#line 4657 "util/configparser.c" /* yacc.c:1646 */ break; - case 398: -#line 1863 "util/configparser.y" /* yacc.c:1648 */ + case 399: +#line 1874 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dns64_prefix:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->dns64_prefix); cfg_parser->cfg->dns64_prefix = (yyvsp[0].str); } -#line 4639 "util/configparser.c" /* yacc.c:1648 */ +#line 4667 "util/configparser.c" /* yacc.c:1646 */ break; - case 399: -#line 1870 "util/configparser.y" /* yacc.c:1648 */ + case 400: +#line 1881 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_dns64_synthall:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4647,22 +4675,22 @@ yyreduce: else cfg_parser->cfg->dns64_synthall = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4651 "util/configparser.c" /* yacc.c:1648 */ +#line 4679 "util/configparser.c" /* yacc.c:1646 */ break; - case 400: -#line 1879 "util/configparser.y" /* yacc.c:1648 */ + case 401: +#line 1890 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dns64_ignore_aaaa:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->dns64_ignore_aaaa, (yyvsp[0].str))) fatal_exit("out of memory adding dns64-ignore-aaaa"); } -#line 4662 "util/configparser.c" /* yacc.c:1648 */ +#line 4690 "util/configparser.c" /* yacc.c:1646 */ break; - case 401: -#line 1887 "util/configparser.y" /* yacc.c:1648 */ + case 402: +#line 1898 "util/configparser.y" /* yacc.c:1646 */ { char* p, *s = (yyvsp[0].str); OUTYY(("P(server_define_tag:%s)\n", (yyvsp[0].str))); @@ -4675,11 +4703,11 @@ yyreduce: } free((yyvsp[0].str)); } -#line 4679 "util/configparser.c" /* yacc.c:1648 */ +#line 4707 "util/configparser.c" /* yacc.c:1646 */ break; - case 402: -#line 1901 "util/configparser.y" /* yacc.c:1648 */ + case 403: +#line 1912 "util/configparser.y" /* yacc.c:1646 */ { size_t len = 0; uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, (yyvsp[0].str), @@ -4699,11 +4727,11 @@ yyreduce: } } } -#line 4703 "util/configparser.c" /* yacc.c:1648 */ +#line 4731 "util/configparser.c" /* yacc.c:1646 */ break; - case 403: -#line 1922 "util/configparser.y" /* yacc.c:1648 */ + case 404: +#line 1933 "util/configparser.y" /* yacc.c:1646 */ { size_t len = 0; uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, (yyvsp[0].str), @@ -4723,11 +4751,11 @@ yyreduce: } } } -#line 4727 "util/configparser.c" /* yacc.c:1648 */ +#line 4755 "util/configparser.c" /* yacc.c:1646 */ break; - case 404: -#line 1943 "util/configparser.y" /* yacc.c:1648 */ + case 405: +#line 1954 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_access_control_tag_action:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str))); if(!cfg_str3list_insert(&cfg_parser->cfg->acl_tag_actions, @@ -4738,11 +4766,11 @@ yyreduce: free((yyvsp[0].str)); } } -#line 4742 "util/configparser.c" /* yacc.c:1648 */ +#line 4770 "util/configparser.c" /* yacc.c:1646 */ break; - case 405: -#line 1955 "util/configparser.y" /* yacc.c:1648 */ + case 406: +#line 1966 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_access_control_tag_data:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str))); if(!cfg_str3list_insert(&cfg_parser->cfg->acl_tag_datas, @@ -4753,11 +4781,11 @@ yyreduce: free((yyvsp[0].str)); } } -#line 4757 "util/configparser.c" /* yacc.c:1648 */ +#line 4785 "util/configparser.c" /* yacc.c:1646 */ break; - case 406: -#line 1967 "util/configparser.y" /* yacc.c:1648 */ + case 407: +#line 1978 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_local_zone_override:%s %s %s)\n", (yyvsp[-2].str), (yyvsp[-1].str), (yyvsp[0].str))); if(!cfg_str3list_insert(&cfg_parser->cfg->local_zone_overrides, @@ -4768,11 +4796,11 @@ yyreduce: free((yyvsp[0].str)); } } -#line 4772 "util/configparser.c" /* yacc.c:1648 */ +#line 4800 "util/configparser.c" /* yacc.c:1646 */ break; - case 407: -#line 1979 "util/configparser.y" /* yacc.c:1648 */ + case 408: +#line 1990 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_access_control_view:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); if(!cfg_str2list_insert(&cfg_parser->cfg->acl_view, @@ -4780,11 +4808,11 @@ yyreduce: yyerror("out of memory"); } } -#line 4784 "util/configparser.c" /* yacc.c:1648 */ +#line 4812 "util/configparser.c" /* yacc.c:1646 */ break; - case 408: -#line 1988 "util/configparser.y" /* yacc.c:1648 */ + case 409: +#line 1999 "util/configparser.y" /* yacc.c:1646 */ { size_t len = 0; uint8_t* bitlist = config_parse_taglist(cfg_parser->cfg, (yyvsp[0].str), @@ -4804,11 +4832,11 @@ yyreduce: } } } -#line 4808 "util/configparser.c" /* yacc.c:1648 */ +#line 4836 "util/configparser.c" /* yacc.c:1646 */ break; - case 409: -#line 2009 "util/configparser.y" /* yacc.c:1648 */ + case 410: +#line 2020 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ip_ratelimit:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4816,11 +4844,11 @@ yyreduce: else cfg_parser->cfg->ip_ratelimit = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4820 "util/configparser.c" /* yacc.c:1648 */ +#line 4848 "util/configparser.c" /* yacc.c:1646 */ break; - case 410: -#line 2019 "util/configparser.y" /* yacc.c:1648 */ + case 411: +#line 2030 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ratelimit:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4828,33 +4856,33 @@ yyreduce: else cfg_parser->cfg->ratelimit = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4832 "util/configparser.c" /* yacc.c:1648 */ +#line 4860 "util/configparser.c" /* yacc.c:1646 */ break; - case 411: -#line 2028 "util/configparser.y" /* yacc.c:1648 */ + case 412: +#line 2039 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ip_ratelimit_size:%s)\n", (yyvsp[0].str))); if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->ip_ratelimit_size)) yyerror("memory size expected"); free((yyvsp[0].str)); } -#line 4843 "util/configparser.c" /* yacc.c:1648 */ +#line 4871 "util/configparser.c" /* yacc.c:1646 */ break; - case 412: -#line 2036 "util/configparser.y" /* yacc.c:1648 */ + case 413: +#line 2047 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ratelimit_size:%s)\n", (yyvsp[0].str))); if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->ratelimit_size)) yyerror("memory size expected"); free((yyvsp[0].str)); } -#line 4854 "util/configparser.c" /* yacc.c:1648 */ +#line 4882 "util/configparser.c" /* yacc.c:1646 */ break; - case 413: -#line 2044 "util/configparser.y" /* yacc.c:1648 */ + case 414: +#line 2055 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ip_ratelimit_slabs:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -4866,11 +4894,11 @@ yyreduce: } free((yyvsp[0].str)); } -#line 4870 "util/configparser.c" /* yacc.c:1648 */ +#line 4898 "util/configparser.c" /* yacc.c:1646 */ break; - case 414: -#line 2057 "util/configparser.y" /* yacc.c:1648 */ + case 415: +#line 2068 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ratelimit_slabs:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -4882,11 +4910,11 @@ yyreduce: } free((yyvsp[0].str)); } -#line 4886 "util/configparser.c" /* yacc.c:1648 */ +#line 4914 "util/configparser.c" /* yacc.c:1646 */ break; - case 415: -#line 2070 "util/configparser.y" /* yacc.c:1648 */ + case 416: +#line 2081 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ratelimit_for_domain:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) { @@ -4900,11 +4928,11 @@ yyreduce: "ratelimit-for-domain"); } } -#line 4904 "util/configparser.c" /* yacc.c:1648 */ +#line 4932 "util/configparser.c" /* yacc.c:1646 */ break; - case 416: -#line 2085 "util/configparser.y" /* yacc.c:1648 */ + case 417: +#line 2096 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ratelimit_below_domain:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) { @@ -4918,11 +4946,11 @@ yyreduce: "ratelimit-below-domain"); } } -#line 4922 "util/configparser.c" /* yacc.c:1648 */ +#line 4950 "util/configparser.c" /* yacc.c:1646 */ break; - case 417: -#line 2100 "util/configparser.y" /* yacc.c:1648 */ + case 418: +#line 2111 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ip_ratelimit_factor:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4930,11 +4958,11 @@ yyreduce: else cfg_parser->cfg->ip_ratelimit_factor = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4934 "util/configparser.c" /* yacc.c:1648 */ +#line 4962 "util/configparser.c" /* yacc.c:1646 */ break; - case 418: -#line 2109 "util/configparser.y" /* yacc.c:1648 */ + case 419: +#line 2120 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_ratelimit_factor:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4942,20 +4970,20 @@ yyreduce: else cfg_parser->cfg->ratelimit_factor = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4946 "util/configparser.c" /* yacc.c:1648 */ +#line 4974 "util/configparser.c" /* yacc.c:1646 */ break; - case 419: -#line 2118 "util/configparser.y" /* yacc.c:1648 */ + case 420: +#line 2129 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(low-rtt option is deprecated, use fast-server-num instead)\n")); free((yyvsp[0].str)); } -#line 4955 "util/configparser.c" /* yacc.c:1648 */ +#line 4983 "util/configparser.c" /* yacc.c:1646 */ break; - case 420: -#line 2124 "util/configparser.y" /* yacc.c:1648 */ + case 421: +#line 2135 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_fast_server_num:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) <= 0) @@ -4963,11 +4991,11 @@ yyreduce: else cfg_parser->cfg->fast_server_num = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4967 "util/configparser.c" /* yacc.c:1648 */ +#line 4995 "util/configparser.c" /* yacc.c:1646 */ break; - case 421: -#line 2133 "util/configparser.y" /* yacc.c:1648 */ + case 422: +#line 2144 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_fast_server_permil:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0) @@ -4975,11 +5003,11 @@ yyreduce: else cfg_parser->cfg->fast_server_permil = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 4979 "util/configparser.c" /* yacc.c:1648 */ +#line 5007 "util/configparser.c" /* yacc.c:1646 */ break; - case 422: -#line 2142 "util/configparser.y" /* yacc.c:1648 */ + case 423: +#line 2153 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_qname_minimisation:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -4988,11 +5016,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 4992 "util/configparser.c" /* yacc.c:1648 */ +#line 5020 "util/configparser.c" /* yacc.c:1646 */ break; - case 423: -#line 2152 "util/configparser.y" /* yacc.c:1648 */ + case 424: +#line 2163 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_qname_minimisation_strict:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5001,11 +5029,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5005 "util/configparser.c" /* yacc.c:1648 */ +#line 5033 "util/configparser.c" /* yacc.c:1646 */ break; - case 424: -#line 2162 "util/configparser.y" /* yacc.c:1648 */ + case 425: +#line 2173 "util/configparser.y" /* yacc.c:1646 */ { #ifdef USE_IPSECMOD OUTYY(("P(server_ipsecmod_enabled:%s)\n", (yyvsp[0].str))); @@ -5017,11 +5045,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 5021 "util/configparser.c" /* yacc.c:1648 */ +#line 5049 "util/configparser.c" /* yacc.c:1646 */ break; - case 425: -#line 2175 "util/configparser.y" /* yacc.c:1648 */ + case 426: +#line 2186 "util/configparser.y" /* yacc.c:1646 */ { #ifdef USE_IPSECMOD OUTYY(("P(server_ipsecmod_ignore_bogus:%s)\n", (yyvsp[0].str))); @@ -5033,11 +5061,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 5037 "util/configparser.c" /* yacc.c:1648 */ +#line 5065 "util/configparser.c" /* yacc.c:1646 */ break; - case 426: -#line 2188 "util/configparser.y" /* yacc.c:1648 */ + case 427: +#line 2199 "util/configparser.y" /* yacc.c:1646 */ { #ifdef USE_IPSECMOD OUTYY(("P(server_ipsecmod_hook:%s)\n", (yyvsp[0].str))); @@ -5048,11 +5076,11 @@ yyreduce: free((yyvsp[0].str)); #endif } -#line 5052 "util/configparser.c" /* yacc.c:1648 */ +#line 5080 "util/configparser.c" /* yacc.c:1646 */ break; - case 427: -#line 2200 "util/configparser.y" /* yacc.c:1648 */ + case 428: +#line 2211 "util/configparser.y" /* yacc.c:1646 */ { #ifdef USE_IPSECMOD OUTYY(("P(server_ipsecmod_max_ttl:%s)\n", (yyvsp[0].str))); @@ -5065,11 +5093,11 @@ yyreduce: free((yyvsp[0].str)); #endif } -#line 5069 "util/configparser.c" /* yacc.c:1648 */ +#line 5097 "util/configparser.c" /* yacc.c:1646 */ break; - case 428: -#line 2214 "util/configparser.y" /* yacc.c:1648 */ + case 429: +#line 2225 "util/configparser.y" /* yacc.c:1646 */ { #ifdef USE_IPSECMOD OUTYY(("P(server_ipsecmod_whitelist:%s)\n", (yyvsp[0].str))); @@ -5080,11 +5108,11 @@ yyreduce: free((yyvsp[0].str)); #endif } -#line 5084 "util/configparser.c" /* yacc.c:1648 */ +#line 5112 "util/configparser.c" /* yacc.c:1646 */ break; - case 429: -#line 2226 "util/configparser.y" /* yacc.c:1648 */ + case 430: +#line 2237 "util/configparser.y" /* yacc.c:1646 */ { #ifdef USE_IPSECMOD OUTYY(("P(server_ipsecmod_strict:%s)\n", (yyvsp[0].str))); @@ -5097,11 +5125,11 @@ yyreduce: free((yyvsp[0].str)); #endif } -#line 5101 "util/configparser.c" /* yacc.c:1648 */ +#line 5129 "util/configparser.c" /* yacc.c:1646 */ break; - case 430: -#line 2240 "util/configparser.y" /* yacc.c:1648 */ + case 431: +#line 2251 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(name:%s)\n", (yyvsp[0].str))); if(cfg_parser->cfg->stubs->name) @@ -5110,31 +5138,31 @@ yyreduce: free(cfg_parser->cfg->stubs->name); cfg_parser->cfg->stubs->name = (yyvsp[0].str); } -#line 5114 "util/configparser.c" /* yacc.c:1648 */ +#line 5142 "util/configparser.c" /* yacc.c:1646 */ break; - case 431: -#line 2250 "util/configparser.y" /* yacc.c:1648 */ + case 432: +#line 2261 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(stub-host:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->hosts, (yyvsp[0].str))) yyerror("out of memory"); } -#line 5124 "util/configparser.c" /* yacc.c:1648 */ +#line 5152 "util/configparser.c" /* yacc.c:1646 */ break; - case 432: -#line 2257 "util/configparser.y" /* yacc.c:1648 */ + case 433: +#line 2268 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(stub-addr:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->addrs, (yyvsp[0].str))) yyerror("out of memory"); } -#line 5134 "util/configparser.c" /* yacc.c:1648 */ +#line 5162 "util/configparser.c" /* yacc.c:1646 */ break; - case 433: -#line 2264 "util/configparser.y" /* yacc.c:1648 */ + case 434: +#line 2275 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(stub-first:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5142,11 +5170,11 @@ yyreduce: else cfg_parser->cfg->stubs->isfirst=(strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5146 "util/configparser.c" /* yacc.c:1648 */ +#line 5174 "util/configparser.c" /* yacc.c:1646 */ break; - case 434: -#line 2273 "util/configparser.y" /* yacc.c:1648 */ + case 435: +#line 2284 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(stub-no-cache:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5154,11 +5182,11 @@ yyreduce: else cfg_parser->cfg->stubs->no_cache=(strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5158 "util/configparser.c" /* yacc.c:1648 */ +#line 5186 "util/configparser.c" /* yacc.c:1646 */ break; - case 435: -#line 2282 "util/configparser.y" /* yacc.c:1648 */ + case 436: +#line 2293 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(stub-ssl-upstream:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5167,11 +5195,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5171 "util/configparser.c" /* yacc.c:1648 */ +#line 5199 "util/configparser.c" /* yacc.c:1646 */ break; - case 436: -#line 2292 "util/configparser.y" /* yacc.c:1648 */ + case 437: +#line 2303 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(stub-prime:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5180,11 +5208,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5184 "util/configparser.c" /* yacc.c:1648 */ +#line 5212 "util/configparser.c" /* yacc.c:1646 */ break; - case 437: -#line 2302 "util/configparser.y" /* yacc.c:1648 */ + case 438: +#line 2313 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(name:%s)\n", (yyvsp[0].str))); if(cfg_parser->cfg->forwards->name) @@ -5193,31 +5221,31 @@ yyreduce: free(cfg_parser->cfg->forwards->name); cfg_parser->cfg->forwards->name = (yyvsp[0].str); } -#line 5197 "util/configparser.c" /* yacc.c:1648 */ +#line 5225 "util/configparser.c" /* yacc.c:1646 */ break; - case 438: -#line 2312 "util/configparser.y" /* yacc.c:1648 */ + case 439: +#line 2323 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(forward-host:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->hosts, (yyvsp[0].str))) yyerror("out of memory"); } -#line 5207 "util/configparser.c" /* yacc.c:1648 */ +#line 5235 "util/configparser.c" /* yacc.c:1646 */ break; - case 439: -#line 2319 "util/configparser.y" /* yacc.c:1648 */ + case 440: +#line 2330 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(forward-addr:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->addrs, (yyvsp[0].str))) yyerror("out of memory"); } -#line 5217 "util/configparser.c" /* yacc.c:1648 */ +#line 5245 "util/configparser.c" /* yacc.c:1646 */ break; - case 440: -#line 2326 "util/configparser.y" /* yacc.c:1648 */ + case 441: +#line 2337 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(forward-first:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5225,11 +5253,11 @@ yyreduce: else cfg_parser->cfg->forwards->isfirst=(strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5229 "util/configparser.c" /* yacc.c:1648 */ +#line 5257 "util/configparser.c" /* yacc.c:1646 */ break; - case 441: -#line 2335 "util/configparser.y" /* yacc.c:1648 */ + case 442: +#line 2346 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(forward-no-cache:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5237,11 +5265,11 @@ yyreduce: else cfg_parser->cfg->forwards->no_cache=(strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5241 "util/configparser.c" /* yacc.c:1648 */ +#line 5269 "util/configparser.c" /* yacc.c:1646 */ break; - case 442: -#line 2344 "util/configparser.y" /* yacc.c:1648 */ + case 443: +#line 2355 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(forward-ssl-upstream:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5250,11 +5278,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5254 "util/configparser.c" /* yacc.c:1648 */ +#line 5282 "util/configparser.c" /* yacc.c:1646 */ break; - case 443: -#line 2354 "util/configparser.y" /* yacc.c:1648 */ + case 444: +#line 2365 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(name:%s)\n", (yyvsp[0].str))); if(cfg_parser->cfg->auths->name) @@ -5263,52 +5291,52 @@ yyreduce: free(cfg_parser->cfg->auths->name); cfg_parser->cfg->auths->name = (yyvsp[0].str); } -#line 5267 "util/configparser.c" /* yacc.c:1648 */ +#line 5295 "util/configparser.c" /* yacc.c:1646 */ break; - case 444: -#line 2364 "util/configparser.y" /* yacc.c:1648 */ + case 445: +#line 2375 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(zonefile:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->auths->zonefile); cfg_parser->cfg->auths->zonefile = (yyvsp[0].str); } -#line 5277 "util/configparser.c" /* yacc.c:1648 */ +#line 5305 "util/configparser.c" /* yacc.c:1646 */ break; - case 445: -#line 2371 "util/configparser.y" /* yacc.c:1648 */ + case 446: +#line 2382 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(master:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->auths->masters, (yyvsp[0].str))) yyerror("out of memory"); } -#line 5287 "util/configparser.c" /* yacc.c:1648 */ +#line 5315 "util/configparser.c" /* yacc.c:1646 */ break; - case 446: -#line 2378 "util/configparser.y" /* yacc.c:1648 */ + case 447: +#line 2389 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(url:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->auths->urls, (yyvsp[0].str))) yyerror("out of memory"); } -#line 5297 "util/configparser.c" /* yacc.c:1648 */ +#line 5325 "util/configparser.c" /* yacc.c:1646 */ break; - case 447: -#line 2385 "util/configparser.y" /* yacc.c:1648 */ + case 448: +#line 2396 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(allow-notify:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->auths->allow_notify, (yyvsp[0].str))) yyerror("out of memory"); } -#line 5308 "util/configparser.c" /* yacc.c:1648 */ +#line 5336 "util/configparser.c" /* yacc.c:1646 */ break; - case 448: -#line 2393 "util/configparser.y" /* yacc.c:1648 */ + case 449: +#line 2404 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(for-downstream:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5317,11 +5345,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5321 "util/configparser.c" /* yacc.c:1648 */ +#line 5349 "util/configparser.c" /* yacc.c:1646 */ break; - case 449: -#line 2403 "util/configparser.y" /* yacc.c:1648 */ + case 450: +#line 2414 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(for-upstream:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5330,11 +5358,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5334 "util/configparser.c" /* yacc.c:1648 */ +#line 5362 "util/configparser.c" /* yacc.c:1646 */ break; - case 450: -#line 2413 "util/configparser.y" /* yacc.c:1648 */ + case 451: +#line 2424 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(fallback-enabled:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5343,11 +5371,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5347 "util/configparser.c" /* yacc.c:1648 */ +#line 5375 "util/configparser.c" /* yacc.c:1646 */ break; - case 451: -#line 2423 "util/configparser.y" /* yacc.c:1648 */ + case 452: +#line 2434 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(name:%s)\n", (yyvsp[0].str))); if(cfg_parser->cfg->views->name) @@ -5356,11 +5384,11 @@ yyreduce: free(cfg_parser->cfg->views->name); cfg_parser->cfg->views->name = (yyvsp[0].str); } -#line 5360 "util/configparser.c" /* yacc.c:1648 */ +#line 5388 "util/configparser.c" /* yacc.c:1646 */ break; - case 452: -#line 2433 "util/configparser.y" /* yacc.c:1648 */ + case 453: +#line 2444 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(view_local_zone:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "static")!=0 && strcmp((yyvsp[0].str), "deny")!=0 && @@ -5384,6 +5412,13 @@ yyreduce: local_zones_nodefault, (yyvsp[-1].str))) fatal_exit("out of memory adding local-zone"); free((yyvsp[0].str)); +#ifdef USE_IPSET + } else if(strcmp((yyvsp[0].str), "ipset")==0) { + if(!cfg_strlist_insert(&cfg_parser->cfg->views-> + local_zones_ipset, (yyvsp[-1].str))) + fatal_exit("out of memory adding local-zone"); + free((yyvsp[0].str)); +#endif } else { if(!cfg_str2list_insert( &cfg_parser->cfg->views->local_zones, @@ -5391,11 +5426,11 @@ yyreduce: fatal_exit("out of memory adding local-zone"); } } -#line 5395 "util/configparser.c" /* yacc.c:1648 */ +#line 5430 "util/configparser.c" /* yacc.c:1646 */ break; - case 453: -#line 2465 "util/configparser.y" /* yacc.c:1648 */ + case 454: +#line 2483 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(view_response_ip:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); validate_respip_action((yyvsp[0].str)); @@ -5404,33 +5439,33 @@ yyreduce: fatal_exit("out of memory adding per-view " "response-ip action"); } -#line 5408 "util/configparser.c" /* yacc.c:1648 */ +#line 5443 "util/configparser.c" /* yacc.c:1646 */ break; - case 454: -#line 2475 "util/configparser.y" /* yacc.c:1648 */ + case 455: +#line 2493 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(view_response_ip_data:%s)\n", (yyvsp[-1].str))); if(!cfg_str2list_insert( &cfg_parser->cfg->views->respip_data, (yyvsp[-1].str), (yyvsp[0].str))) fatal_exit("out of memory adding response-ip-data"); } -#line 5419 "util/configparser.c" /* yacc.c:1648 */ +#line 5454 "util/configparser.c" /* yacc.c:1646 */ break; - case 455: -#line 2483 "util/configparser.y" /* yacc.c:1648 */ + case 456: +#line 2501 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(view_local_data:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->views->local_data, (yyvsp[0].str))) { fatal_exit("out of memory adding local-data"); } } -#line 5430 "util/configparser.c" /* yacc.c:1648 */ +#line 5465 "util/configparser.c" /* yacc.c:1646 */ break; - case 456: -#line 2491 "util/configparser.y" /* yacc.c:1648 */ + case 457: +#line 2509 "util/configparser.y" /* yacc.c:1646 */ { char* ptr; OUTYY(("P(view_local_data_ptr:%s)\n", (yyvsp[0].str))); @@ -5444,11 +5479,11 @@ yyreduce: yyerror("local-data-ptr could not be reversed"); } } -#line 5448 "util/configparser.c" /* yacc.c:1648 */ +#line 5483 "util/configparser.c" /* yacc.c:1646 */ break; - case 457: -#line 2506 "util/configparser.y" /* yacc.c:1648 */ + case 458: +#line 2524 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(view-first:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5456,19 +5491,19 @@ yyreduce: else cfg_parser->cfg->views->isfirst=(strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5460 "util/configparser.c" /* yacc.c:1648 */ +#line 5495 "util/configparser.c" /* yacc.c:1646 */ break; - case 458: -#line 2515 "util/configparser.y" /* yacc.c:1648 */ + case 459: +#line 2533 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("\nP(remote-control:)\n")); } -#line 5468 "util/configparser.c" /* yacc.c:1648 */ +#line 5503 "util/configparser.c" /* yacc.c:1646 */ break; - case 469: -#line 2526 "util/configparser.y" /* yacc.c:1648 */ + case 470: +#line 2544 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(control_enable:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5477,11 +5512,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5481 "util/configparser.c" /* yacc.c:1648 */ +#line 5516 "util/configparser.c" /* yacc.c:1646 */ break; - case 470: -#line 2536 "util/configparser.y" /* yacc.c:1648 */ + case 471: +#line 2554 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(control_port:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -5489,79 +5524,79 @@ yyreduce: else cfg_parser->cfg->control_port = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 5493 "util/configparser.c" /* yacc.c:1648 */ +#line 5528 "util/configparser.c" /* yacc.c:1646 */ break; - case 471: -#line 2545 "util/configparser.y" /* yacc.c:1648 */ + case 472: +#line 2563 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(control_interface:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_append(&cfg_parser->cfg->control_ifs, (yyvsp[0].str))) yyerror("out of memory"); } -#line 5503 "util/configparser.c" /* yacc.c:1648 */ +#line 5538 "util/configparser.c" /* yacc.c:1646 */ break; - case 472: -#line 2552 "util/configparser.y" /* yacc.c:1648 */ + case 473: +#line 2570 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(control_use_cert:%s)\n", (yyvsp[0].str))); cfg_parser->cfg->control_use_cert = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5513 "util/configparser.c" /* yacc.c:1648 */ +#line 5548 "util/configparser.c" /* yacc.c:1646 */ break; - case 473: -#line 2559 "util/configparser.y" /* yacc.c:1648 */ + case 474: +#line 2577 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(rc_server_key_file:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->server_key_file); cfg_parser->cfg->server_key_file = (yyvsp[0].str); } -#line 5523 "util/configparser.c" /* yacc.c:1648 */ +#line 5558 "util/configparser.c" /* yacc.c:1646 */ break; - case 474: -#line 2566 "util/configparser.y" /* yacc.c:1648 */ + case 475: +#line 2584 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(rc_server_cert_file:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->server_cert_file); cfg_parser->cfg->server_cert_file = (yyvsp[0].str); } -#line 5533 "util/configparser.c" /* yacc.c:1648 */ +#line 5568 "util/configparser.c" /* yacc.c:1646 */ break; - case 475: -#line 2573 "util/configparser.y" /* yacc.c:1648 */ + case 476: +#line 2591 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(rc_control_key_file:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->control_key_file); cfg_parser->cfg->control_key_file = (yyvsp[0].str); } -#line 5543 "util/configparser.c" /* yacc.c:1648 */ +#line 5578 "util/configparser.c" /* yacc.c:1646 */ break; - case 476: -#line 2580 "util/configparser.y" /* yacc.c:1648 */ + case 477: +#line 2598 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(rc_control_cert_file:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->control_cert_file); cfg_parser->cfg->control_cert_file = (yyvsp[0].str); } -#line 5553 "util/configparser.c" /* yacc.c:1648 */ +#line 5588 "util/configparser.c" /* yacc.c:1646 */ break; - case 477: -#line 2587 "util/configparser.y" /* yacc.c:1648 */ + case 478: +#line 2605 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("\nP(dnstap:)\n")); } -#line 5561 "util/configparser.c" /* yacc.c:1648 */ +#line 5596 "util/configparser.c" /* yacc.c:1646 */ break; - case 492: -#line 2604 "util/configparser.y" /* yacc.c:1648 */ + case 493: +#line 2622 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dt_dnstap_enable:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5569,21 +5604,21 @@ yyreduce: else cfg_parser->cfg->dnstap = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5573 "util/configparser.c" /* yacc.c:1648 */ +#line 5608 "util/configparser.c" /* yacc.c:1646 */ break; - case 493: -#line 2613 "util/configparser.y" /* yacc.c:1648 */ + case 494: +#line 2631 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dt_dnstap_socket_path:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->dnstap_socket_path); cfg_parser->cfg->dnstap_socket_path = (yyvsp[0].str); } -#line 5583 "util/configparser.c" /* yacc.c:1648 */ +#line 5618 "util/configparser.c" /* yacc.c:1646 */ break; - case 494: -#line 2620 "util/configparser.y" /* yacc.c:1648 */ + case 495: +#line 2638 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dt_dnstap_send_identity:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5591,11 +5626,11 @@ yyreduce: else cfg_parser->cfg->dnstap_send_identity = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5595 "util/configparser.c" /* yacc.c:1648 */ +#line 5630 "util/configparser.c" /* yacc.c:1646 */ break; - case 495: -#line 2629 "util/configparser.y" /* yacc.c:1648 */ + case 496: +#line 2647 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dt_dnstap_send_version:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5603,31 +5638,31 @@ yyreduce: else cfg_parser->cfg->dnstap_send_version = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5607 "util/configparser.c" /* yacc.c:1648 */ +#line 5642 "util/configparser.c" /* yacc.c:1646 */ break; - case 496: -#line 2638 "util/configparser.y" /* yacc.c:1648 */ + case 497: +#line 2656 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dt_dnstap_identity:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->dnstap_identity); cfg_parser->cfg->dnstap_identity = (yyvsp[0].str); } -#line 5617 "util/configparser.c" /* yacc.c:1648 */ +#line 5652 "util/configparser.c" /* yacc.c:1646 */ break; - case 497: -#line 2645 "util/configparser.y" /* yacc.c:1648 */ + case 498: +#line 2663 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dt_dnstap_version:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->dnstap_version); cfg_parser->cfg->dnstap_version = (yyvsp[0].str); } -#line 5627 "util/configparser.c" /* yacc.c:1648 */ +#line 5662 "util/configparser.c" /* yacc.c:1646 */ break; - case 498: -#line 2652 "util/configparser.y" /* yacc.c:1648 */ + case 499: +#line 2670 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dt_dnstap_log_resolver_query_messages:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5636,11 +5671,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5640 "util/configparser.c" /* yacc.c:1648 */ +#line 5675 "util/configparser.c" /* yacc.c:1646 */ break; - case 499: -#line 2662 "util/configparser.y" /* yacc.c:1648 */ + case 500: +#line 2680 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dt_dnstap_log_resolver_response_messages:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5649,11 +5684,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5653 "util/configparser.c" /* yacc.c:1648 */ +#line 5688 "util/configparser.c" /* yacc.c:1646 */ break; - case 500: -#line 2672 "util/configparser.y" /* yacc.c:1648 */ + case 501: +#line 2690 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dt_dnstap_log_client_query_messages:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5662,11 +5697,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5666 "util/configparser.c" /* yacc.c:1648 */ +#line 5701 "util/configparser.c" /* yacc.c:1646 */ break; - case 501: -#line 2682 "util/configparser.y" /* yacc.c:1648 */ + case 502: +#line 2700 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dt_dnstap_log_client_response_messages:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5675,11 +5710,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5679 "util/configparser.c" /* yacc.c:1648 */ +#line 5714 "util/configparser.c" /* yacc.c:1646 */ break; - case 502: -#line 2692 "util/configparser.y" /* yacc.c:1648 */ + case 503: +#line 2710 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dt_dnstap_log_forwarder_query_messages:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5688,11 +5723,11 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5692 "util/configparser.c" /* yacc.c:1648 */ +#line 5727 "util/configparser.c" /* yacc.c:1646 */ break; - case 503: -#line 2702 "util/configparser.y" /* yacc.c:1648 */ + case 504: +#line 2720 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dt_dnstap_log_forwarder_response_messages:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5701,29 +5736,29 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5705 "util/configparser.c" /* yacc.c:1648 */ +#line 5740 "util/configparser.c" /* yacc.c:1646 */ break; - case 504: -#line 2712 "util/configparser.y" /* yacc.c:1648 */ + case 505: +#line 2730 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("\nP(python:)\n")); } -#line 5713 "util/configparser.c" /* yacc.c:1648 */ +#line 5748 "util/configparser.c" /* yacc.c:1646 */ break; - case 508: -#line 2721 "util/configparser.y" /* yacc.c:1648 */ + case 509: +#line 2739 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(python-script:%s)\n", (yyvsp[0].str))); - free(cfg_parser->cfg->python_script); - cfg_parser->cfg->python_script = (yyvsp[0].str); + if(!cfg_strlist_append_ex(&cfg_parser->cfg->python_script, (yyvsp[0].str))) + yyerror("out of memory"); } -#line 5723 "util/configparser.c" /* yacc.c:1648 */ +#line 5758 "util/configparser.c" /* yacc.c:1646 */ break; - case 509: -#line 2727 "util/configparser.y" /* yacc.c:1648 */ + case 510: +#line 2745 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(disable_dnssec_lame_check:%s)\n", (yyvsp[0].str))); if (strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5732,21 +5767,21 @@ yyreduce: (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5736 "util/configparser.c" /* yacc.c:1648 */ +#line 5771 "util/configparser.c" /* yacc.c:1646 */ break; - case 510: -#line 2737 "util/configparser.y" /* yacc.c:1648 */ + case 511: +#line 2755 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_log_identity:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->log_identity); cfg_parser->cfg->log_identity = (yyvsp[0].str); } -#line 5746 "util/configparser.c" /* yacc.c:1648 */ +#line 5781 "util/configparser.c" /* yacc.c:1646 */ break; - case 511: -#line 2744 "util/configparser.y" /* yacc.c:1648 */ + case 512: +#line 2762 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_response_ip:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); validate_respip_action((yyvsp[0].str)); @@ -5754,30 +5789,30 @@ yyreduce: (yyvsp[-1].str), (yyvsp[0].str))) fatal_exit("out of memory adding response-ip"); } -#line 5758 "util/configparser.c" /* yacc.c:1648 */ +#line 5793 "util/configparser.c" /* yacc.c:1646 */ break; - case 512: -#line 2753 "util/configparser.y" /* yacc.c:1648 */ + case 513: +#line 2771 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_response_ip_data:%s)\n", (yyvsp[-1].str))); if(!cfg_str2list_insert(&cfg_parser->cfg->respip_data, (yyvsp[-1].str), (yyvsp[0].str))) fatal_exit("out of memory adding response-ip-data"); } -#line 5769 "util/configparser.c" /* yacc.c:1648 */ +#line 5804 "util/configparser.c" /* yacc.c:1646 */ break; - case 513: -#line 2761 "util/configparser.y" /* yacc.c:1648 */ + case 514: +#line 2779 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("\nP(dnscrypt:)\n")); } -#line 5777 "util/configparser.c" /* yacc.c:1648 */ +#line 5812 "util/configparser.c" /* yacc.c:1646 */ break; - case 526: -#line 2777 "util/configparser.y" /* yacc.c:1648 */ + case 527: +#line 2795 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dnsc_dnscrypt_enable:%s)\n", (yyvsp[0].str))); if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0) @@ -5785,11 +5820,11 @@ yyreduce: else cfg_parser->cfg->dnscrypt = (strcmp((yyvsp[0].str), "yes")==0); free((yyvsp[0].str)); } -#line 5789 "util/configparser.c" /* yacc.c:1648 */ +#line 5824 "util/configparser.c" /* yacc.c:1646 */ break; - case 527: -#line 2787 "util/configparser.y" /* yacc.c:1648 */ + case 528: +#line 2805 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dnsc_dnscrypt_port:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -5797,21 +5832,21 @@ yyreduce: else cfg_parser->cfg->dnscrypt_port = atoi((yyvsp[0].str)); free((yyvsp[0].str)); } -#line 5801 "util/configparser.c" /* yacc.c:1648 */ +#line 5836 "util/configparser.c" /* yacc.c:1646 */ break; - case 528: -#line 2796 "util/configparser.y" /* yacc.c:1648 */ + case 529: +#line 2814 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dnsc_dnscrypt_provider:%s)\n", (yyvsp[0].str))); free(cfg_parser->cfg->dnscrypt_provider); cfg_parser->cfg->dnscrypt_provider = (yyvsp[0].str); } -#line 5811 "util/configparser.c" /* yacc.c:1648 */ +#line 5846 "util/configparser.c" /* yacc.c:1646 */ break; - case 529: -#line 2803 "util/configparser.y" /* yacc.c:1648 */ + case 530: +#line 2821 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dnsc_dnscrypt_provider_cert:%s)\n", (yyvsp[0].str))); if(cfg_strlist_find(cfg_parser->cfg->dnscrypt_provider_cert, (yyvsp[0].str))) @@ -5819,21 +5854,21 @@ yyreduce: if(!cfg_strlist_insert(&cfg_parser->cfg->dnscrypt_provider_cert, (yyvsp[0].str))) fatal_exit("out of memory adding dnscrypt-provider-cert"); } -#line 5823 "util/configparser.c" /* yacc.c:1648 */ +#line 5858 "util/configparser.c" /* yacc.c:1646 */ break; - case 530: -#line 2812 "util/configparser.y" /* yacc.c:1648 */ + case 531: +#line 2830 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dnsc_dnscrypt_provider_cert_rotated:%s)\n", (yyvsp[0].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->dnscrypt_provider_cert_rotated, (yyvsp[0].str))) fatal_exit("out of memory adding dnscrypt-provider-cert-rotated"); } -#line 5833 "util/configparser.c" /* yacc.c:1648 */ +#line 5868 "util/configparser.c" /* yacc.c:1646 */ break; - case 531: -#line 2819 "util/configparser.y" /* yacc.c:1648 */ + case 532: +#line 2837 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dnsc_dnscrypt_secret_key:%s)\n", (yyvsp[0].str))); if(cfg_strlist_find(cfg_parser->cfg->dnscrypt_secret_key, (yyvsp[0].str))) @@ -5841,22 +5876,22 @@ yyreduce: if(!cfg_strlist_insert(&cfg_parser->cfg->dnscrypt_secret_key, (yyvsp[0].str))) fatal_exit("out of memory adding dnscrypt-secret-key"); } -#line 5845 "util/configparser.c" /* yacc.c:1648 */ +#line 5880 "util/configparser.c" /* yacc.c:1646 */ break; - case 532: -#line 2828 "util/configparser.y" /* yacc.c:1648 */ + case 533: +#line 2846 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dnscrypt_shared_secret_cache_size:%s)\n", (yyvsp[0].str))); if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->dnscrypt_shared_secret_cache_size)) yyerror("memory size expected"); free((yyvsp[0].str)); } -#line 5856 "util/configparser.c" /* yacc.c:1648 */ +#line 5891 "util/configparser.c" /* yacc.c:1646 */ break; - case 533: -#line 2836 "util/configparser.y" /* yacc.c:1648 */ + case 534: +#line 2854 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dnscrypt_shared_secret_cache_slabs:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -5868,22 +5903,22 @@ yyreduce: } free((yyvsp[0].str)); } -#line 5872 "util/configparser.c" /* yacc.c:1648 */ +#line 5907 "util/configparser.c" /* yacc.c:1646 */ break; - case 534: -#line 2849 "util/configparser.y" /* yacc.c:1648 */ + case 535: +#line 2867 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dnscrypt_nonce_cache_size:%s)\n", (yyvsp[0].str))); if(!cfg_parse_memsize((yyvsp[0].str), &cfg_parser->cfg->dnscrypt_nonce_cache_size)) yyerror("memory size expected"); free((yyvsp[0].str)); } -#line 5883 "util/configparser.c" /* yacc.c:1648 */ +#line 5918 "util/configparser.c" /* yacc.c:1646 */ break; - case 535: -#line 2857 "util/configparser.y" /* yacc.c:1648 */ + case 536: +#line 2875 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(dnscrypt_nonce_cache_slabs:%s)\n", (yyvsp[0].str))); if(atoi((yyvsp[0].str)) == 0) @@ -5895,19 +5930,19 @@ yyreduce: } free((yyvsp[0].str)); } -#line 5899 "util/configparser.c" /* yacc.c:1648 */ +#line 5934 "util/configparser.c" /* yacc.c:1646 */ break; - case 536: -#line 2870 "util/configparser.y" /* yacc.c:1648 */ + case 537: +#line 2888 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("\nP(cachedb:)\n")); } -#line 5907 "util/configparser.c" /* yacc.c:1648 */ +#line 5942 "util/configparser.c" /* yacc.c:1646 */ break; - case 544: -#line 2880 "util/configparser.y" /* yacc.c:1648 */ + case 545: +#line 2898 "util/configparser.y" /* yacc.c:1646 */ { #ifdef USE_CACHEDB OUTYY(("P(backend:%s)\n", (yyvsp[0].str))); @@ -5921,11 +5956,11 @@ yyreduce: free((yyvsp[0].str)); #endif } -#line 5925 "util/configparser.c" /* yacc.c:1648 */ +#line 5960 "util/configparser.c" /* yacc.c:1646 */ break; - case 545: -#line 2895 "util/configparser.y" /* yacc.c:1648 */ + case 546: +#line 2913 "util/configparser.y" /* yacc.c:1646 */ { #ifdef USE_CACHEDB OUTYY(("P(secret-seed:%s)\n", (yyvsp[0].str))); @@ -5939,11 +5974,11 @@ yyreduce: free((yyvsp[0].str)); #endif } -#line 5943 "util/configparser.c" /* yacc.c:1648 */ +#line 5978 "util/configparser.c" /* yacc.c:1646 */ break; - case 546: -#line 2910 "util/configparser.y" /* yacc.c:1648 */ + case 547: +#line 2928 "util/configparser.y" /* yacc.c:1646 */ { #if defined(USE_CACHEDB) && defined(USE_REDIS) OUTYY(("P(redis_server_host:%s)\n", (yyvsp[0].str))); @@ -5954,11 +5989,11 @@ yyreduce: free((yyvsp[0].str)); #endif } -#line 5958 "util/configparser.c" /* yacc.c:1648 */ +#line 5993 "util/configparser.c" /* yacc.c:1646 */ break; - case 547: -#line 2922 "util/configparser.y" /* yacc.c:1648 */ + case 548: +#line 2940 "util/configparser.y" /* yacc.c:1646 */ { #if defined(USE_CACHEDB) && defined(USE_REDIS) int port; @@ -5972,11 +6007,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 5976 "util/configparser.c" /* yacc.c:1648 */ +#line 6011 "util/configparser.c" /* yacc.c:1646 */ break; - case 548: -#line 2937 "util/configparser.y" /* yacc.c:1648 */ + case 549: +#line 2955 "util/configparser.y" /* yacc.c:1646 */ { #if defined(USE_CACHEDB) && defined(USE_REDIS) OUTYY(("P(redis_timeout:%s)\n", (yyvsp[0].str))); @@ -5988,11 +6023,11 @@ yyreduce: #endif free((yyvsp[0].str)); } -#line 5992 "util/configparser.c" /* yacc.c:1648 */ +#line 6027 "util/configparser.c" /* yacc.c:1646 */ break; - case 549: -#line 2950 "util/configparser.y" /* yacc.c:1648 */ + case 550: +#line 2968 "util/configparser.y" /* yacc.c:1646 */ { OUTYY(("P(server_tcp_connection_limit:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str))); if (atoi((yyvsp[0].str)) < 0) @@ -6002,11 +6037,55 @@ yyreduce: fatal_exit("out of memory adding tcp connection limit"); } } -#line 6006 "util/configparser.c" /* yacc.c:1648 */ +#line 6041 "util/configparser.c" /* yacc.c:1646 */ break; + case 551: +#line 2979 "util/configparser.y" /* yacc.c:1646 */ + { + OUTYY(("\nP(ipset:)\n")); + } +#line 6049 "util/configparser.c" /* yacc.c:1646 */ + break; -#line 6010 "util/configparser.c" /* yacc.c:1648 */ + case 556: +#line 2988 "util/configparser.y" /* yacc.c:1646 */ + { + #ifdef USE_IPSET + OUTYY(("P(name-v4:%s)\n", (yyvsp[0].str))); + if(cfg_parser->cfg->ipset_name_v4) + yyerror("ipset name v4 override, there must be one " + "name for ip v4"); + free(cfg_parser->cfg->ipset_name_v4); + cfg_parser->cfg->ipset_name_v4 = (yyvsp[0].str); + #else + OUTYY(("P(Compiled without ipset, ignoring)\n")); + free((yyvsp[0].str)); + #endif + } +#line 6067 "util/configparser.c" /* yacc.c:1646 */ + break; + + case 557: +#line 3003 "util/configparser.y" /* yacc.c:1646 */ + { + #ifdef USE_IPSET + OUTYY(("P(name-v6:%s)\n", (yyvsp[0].str))); + if(cfg_parser->cfg->ipset_name_v6) + yyerror("ipset name v6 override, there must be one " + "name for ip v6"); + free(cfg_parser->cfg->ipset_name_v6); + cfg_parser->cfg->ipset_name_v6 = (yyvsp[0].str); + #else + OUTYY(("P(Compiled without ipset, ignoring)\n")); + free((yyvsp[0].str)); + #endif + } +#line 6085 "util/configparser.c" /* yacc.c:1646 */ + break; + + +#line 6089 "util/configparser.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -6234,7 +6313,7 @@ yyreturn: #endif return yyresult; } -#line 2960 "util/configparser.y" /* yacc.c:1907 */ +#line 3017 "util/configparser.y" /* yacc.c:1906 */ /* parse helper routines could be here */ @@ -6254,3 +6333,5 @@ validate_respip_action(const char* action) "always_refuse or always_nxdomain"); } } + + diff --git a/util/configparser.h b/util/configparser.h index 9582232acc274177d8c588dd587629deb608ad3c..4a883d1020b4a4ab14d68ab8f35932282390db7b 100644 --- a/util/configparser.h +++ b/util/configparser.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.5. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -308,7 +308,10 @@ extern int yydebug; VAR_STREAM_WAIT_SIZE = 518, VAR_TLS_CIPHERS = 519, VAR_TLS_CIPHERSUITES = 520, - VAR_TLS_SESSION_TICKET_KEYS = 521 + VAR_TLS_SESSION_TICKET_KEYS = 521, + VAR_IPSET = 522, + VAR_IPSET_NAME_V4 = 523, + VAR_IPSET_NAME_V6 = 524 }; #endif /* Tokens. */ @@ -576,17 +579,20 @@ extern int yydebug; #define VAR_TLS_CIPHERS 519 #define VAR_TLS_CIPHERSUITES 520 #define VAR_TLS_SESSION_TICKET_KEYS 521 +#define VAR_IPSET 522 +#define VAR_IPSET_NAME_V4 523 +#define VAR_IPSET_NAME_V6 524 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 66 "util/configparser.y" /* yacc.c:1910 */ +#line 66 "util/configparser.y" /* yacc.c:1909 */ char* str; -#line 590 "util/configparser.h" /* yacc.c:1910 */ +#line 596 "util/configparser.h" /* yacc.c:1909 */ }; typedef union YYSTYPE YYSTYPE; diff --git a/util/configparser.y b/util/configparser.y index 5f52f4d7784782d905b8762cf31480ee526cb25d..10227a2ff7ff674898e978e3892d389b1aa12803 100644 --- a/util/configparser.y +++ b/util/configparser.y @@ -167,6 +167,7 @@ extern struct config_parser_state* cfg_parser; %token VAR_UNKNOWN_SERVER_TIME_LIMIT VAR_LOG_TAG_QUERYREPLY %token VAR_STREAM_WAIT_SIZE VAR_TLS_CIPHERS VAR_TLS_CIPHERSUITES %token VAR_TLS_SESSION_TICKET_KEYS +%token VAR_IPSET VAR_IPSET_NAME_V4 VAR_IPSET_NAME_V6 %% toplevelvars: /* empty */ | toplevelvars toplevelvar ; @@ -174,7 +175,7 @@ toplevelvar: serverstart contents_server | stubstart contents_stub | forwardstart contents_forward | pythonstart contents_py | rcstart contents_rc | dtstart contents_dt | viewstart contents_view | dnscstart contents_dnsc | cachedbstart contents_cachedb | - authstart contents_auth + ipsetstart contents_ipset | authstart contents_auth ; /* server: declaration */ @@ -1783,12 +1784,15 @@ server_local_zone: VAR_LOCAL_ZONE STRING_ARG STRING_ARG && strcmp($3, "always_refuse")!=0 && strcmp($3, "always_nxdomain")!=0 && strcmp($3, "noview")!=0 - && strcmp($3, "inform")!=0 && strcmp($3, "inform_deny")!=0) { + && strcmp($3, "inform")!=0 && strcmp($3, "inform_deny")!=0 + && strcmp($3, "inform_redirect") != 0 + && strcmp($3, "ipset") != 0) { yyerror("local-zone type: expected static, deny, " "refuse, redirect, transparent, " "typetransparent, inform, inform_deny, " - "always_transparent, always_refuse, " - "always_nxdomain, noview or nodefault"); + "inform_redirect, always_transparent, " + "always_refuse, always_nxdomain, noview " + ", nodefault or ipset"); free($2); free($3); } else if(strcmp($3, "nodefault")==0) { @@ -1796,6 +1800,13 @@ server_local_zone: VAR_LOCAL_ZONE STRING_ARG STRING_ARG local_zones_nodefault, $2)) fatal_exit("out of memory adding local-zone"); free($3); +#ifdef USE_IPSET + } else if(strcmp($3, "ipset")==0) { + if(!cfg_strlist_insert(&cfg_parser->cfg-> + local_zones_ipset, $2)) + fatal_exit("out of memory adding local-zone"); + free($3); +#endif } else { if(!cfg_str2list_insert(&cfg_parser->cfg->local_zones, $2, $3)) @@ -2453,6 +2464,13 @@ view_local_zone: VAR_LOCAL_ZONE STRING_ARG STRING_ARG local_zones_nodefault, $2)) fatal_exit("out of memory adding local-zone"); free($3); +#ifdef USE_IPSET + } else if(strcmp($3, "ipset")==0) { + if(!cfg_strlist_insert(&cfg_parser->cfg->views-> + local_zones_ipset, $2)) + fatal_exit("out of memory adding local-zone"); + free($3); +#endif } else { if(!cfg_str2list_insert( &cfg_parser->cfg->views->local_zones, @@ -2720,8 +2738,8 @@ content_py: py_script py_script: VAR_PYTHON_SCRIPT STRING_ARG { OUTYY(("P(python-script:%s)\n", $2)); - free(cfg_parser->cfg->python_script); - cfg_parser->cfg->python_script = $2; + if(!cfg_strlist_append_ex(&cfg_parser->cfg->python_script, $2)) + yyerror("out of memory"); } server_disable_dnssec_lame_check: VAR_DISABLE_DNSSEC_LAME_CHECK STRING_ARG { @@ -2957,6 +2975,45 @@ server_tcp_connection_limit: VAR_TCP_CONNECTION_LIMIT STRING_ARG STRING_ARG } } ; + ipsetstart: VAR_IPSET + { + OUTYY(("\nP(ipset:)\n")); + } + ; + contents_ipset: contents_ipset content_ipset + | ; + content_ipset: ipset_name_v4 | ipset_name_v6 + ; + ipset_name_v4: VAR_IPSET_NAME_V4 STRING_ARG + { + #ifdef USE_IPSET + OUTYY(("P(name-v4:%s)\n", $2)); + if(cfg_parser->cfg->ipset_name_v4) + yyerror("ipset name v4 override, there must be one " + "name for ip v4"); + free(cfg_parser->cfg->ipset_name_v4); + cfg_parser->cfg->ipset_name_v4 = $2; + #else + OUTYY(("P(Compiled without ipset, ignoring)\n")); + free($2); + #endif + } + ; + ipset_name_v6: VAR_IPSET_NAME_V6 STRING_ARG + { + #ifdef USE_IPSET + OUTYY(("P(name-v6:%s)\n", $2)); + if(cfg_parser->cfg->ipset_name_v6) + yyerror("ipset name v6 override, there must be one " + "name for ip v6"); + free(cfg_parser->cfg->ipset_name_v6); + cfg_parser->cfg->ipset_name_v6 = $2; + #else + OUTYY(("P(Compiled without ipset, ignoring)\n")); + free($2); + #endif + } + ; %% /* parse helper routines could be here */ @@ -2976,3 +3033,5 @@ validate_respip_action(const char* action) "always_refuse or always_nxdomain"); } } + + diff --git a/util/data/dname.c b/util/data/dname.c index 3109971770b562ee9ab396cb44e74391f57ce499..9f25e1efe204fb9118850e9c52bcb10ca0f05312 100644 --- a/util/data/dname.c +++ b/util/data/dname.c @@ -75,6 +75,8 @@ dname_valid(uint8_t* dname, size_t maxlen) { size_t len = 0; size_t labellen; + if(maxlen == 0) + return 0; /* too short, shortest is '0' root label */ labellen = *dname++; while(labellen) { if(labellen&0xc0) @@ -231,28 +233,17 @@ int dname_pkt_compare(sldns_buffer* pkt, uint8_t* d1, uint8_t* d2) { uint8_t len1, len2; - int count1 = 0, count2 = 0; log_assert(pkt && d1 && d2); len1 = *d1++; len2 = *d2++; while( len1 != 0 || len2 != 0 ) { /* resolve ptrs */ if(LABEL_IS_PTR(len1)) { - if((size_t)PTR_OFFSET(len1, *d1) - >= sldns_buffer_limit(pkt)) - return -1; - if(count1++ > MAX_COMPRESS_PTRS) - return -1; d1 = sldns_buffer_at(pkt, PTR_OFFSET(len1, *d1)); len1 = *d1++; continue; } if(LABEL_IS_PTR(len2)) { - if((size_t)PTR_OFFSET(len2, *d2) - >= sldns_buffer_limit(pkt)) - return 1; - if(count2++ > MAX_COMPRESS_PTRS) - return 1; d2 = sldns_buffer_at(pkt, PTR_OFFSET(len2, *d2)); len2 = *d2++; continue; @@ -311,18 +302,12 @@ dname_pkt_hash(sldns_buffer* pkt, uint8_t* dname, hashvalue_type h) uint8_t labuf[LDNS_MAX_LABELLEN+1]; uint8_t lablen; int i; - int count = 0; /* preserve case of query, make hash label by label */ lablen = *dname++; while(lablen) { if(LABEL_IS_PTR(lablen)) { /* follow pointer */ - if((size_t)PTR_OFFSET(lablen, *dname) - >= sldns_buffer_limit(pkt)) - return h; - if(count++ > MAX_COMPRESS_PTRS) - return h; dname = sldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); lablen = *dname++; continue; @@ -344,19 +329,26 @@ dname_pkt_hash(sldns_buffer* pkt, uint8_t* dname, hashvalue_type h) void dname_pkt_copy(sldns_buffer* pkt, uint8_t* to, uint8_t* dname) { /* copy over the dname and decompress it at the same time */ + size_t comprcount = 0; size_t len = 0; uint8_t lablen; lablen = *dname++; while(lablen) { if(LABEL_IS_PTR(lablen)) { - /* follow pointer */ - if((size_t)PTR_OFFSET(lablen, *dname) - >= sldns_buffer_limit(pkt)) + if(comprcount++ > MAX_COMPRESS_PTRS) { + /* too many compression pointers */ + *to = 0; /* end the result prematurely */ return; + } + /* follow pointer */ dname = sldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); lablen = *dname++; continue; } + if(lablen > LDNS_MAX_LABELLEN) { + *to = 0; /* end the result prematurely */ + return; + } log_assert(lablen <= LDNS_MAX_LABELLEN); len += (size_t)lablen+1; if(len >= LDNS_MAX_DOMAINLEN) { @@ -377,7 +369,6 @@ void dname_pkt_copy(sldns_buffer* pkt, uint8_t* to, uint8_t* dname) void dname_print(FILE* out, struct sldns_buffer* pkt, uint8_t* dname) { uint8_t lablen; - int count = 0; if(!out) out = stdout; if(!dname) return; @@ -391,15 +382,6 @@ void dname_print(FILE* out, struct sldns_buffer* pkt, uint8_t* dname) fputs("??compressionptr??", out); return; } - if((size_t)PTR_OFFSET(lablen, *dname) - >= sldns_buffer_limit(pkt)) { - fputs("??compressionptr??", out); - return; - } - if(count++ > MAX_COMPRESS_PTRS) { - fputs("??compressionptr??", out); - return; - } dname = sldns_buffer_at(pkt, PTR_OFFSET(lablen, *dname)); lablen = *dname++; continue; diff --git a/util/data/msgencode.c b/util/data/msgencode.c index 4c0a5550be13354f95a5085bb6a21c4ac90f59ef..a51a4b9b85d8a4b408b80e722b4a2835440bbf34 100644 --- a/util/data/msgencode.c +++ b/util/data/msgencode.c @@ -639,15 +639,37 @@ positive_answer(struct reply_info* rep, uint16_t qtype) { return 0; } -int -reply_info_encode(struct query_info* qinfo, struct reply_info* rep, - uint16_t id, uint16_t flags, sldns_buffer* buffer, time_t timenow, - struct regional* region, uint16_t udpsize, int dnssec) +static int +negative_answer(struct reply_info* rep) { + size_t i; + int ns_seen = 0; + if(FLAGS_GET_RCODE(rep->flags) == LDNS_RCODE_NXDOMAIN) + return 1; + if(FLAGS_GET_RCODE(rep->flags) == LDNS_RCODE_NOERROR && + rep->an_numrrsets != 0) + return 0; /* positive */ + if(FLAGS_GET_RCODE(rep->flags) != LDNS_RCODE_NOERROR && + FLAGS_GET_RCODE(rep->flags) != LDNS_RCODE_NXDOMAIN) + return 0; + for(i=rep->an_numrrsets; ian_numrrsets+rep->ns_numrrsets; i++){ + if(ntohs(rep->rrsets[i]->rk.type) == LDNS_RR_TYPE_SOA) + return 1; + if(ntohs(rep->rrsets[i]->rk.type) == LDNS_RR_TYPE_NS) + ns_seen = 1; + } + if(ns_seen) return 0; /* could be referral, NS, but no SOA */ + return 1; +} + +int +reply_info_encode(struct query_info* qinfo, struct reply_info* rep, + uint16_t id, uint16_t flags, sldns_buffer* buffer, time_t timenow, + struct regional* region, uint16_t udpsize, int dnssec, int minimise) { uint16_t ancount=0, nscount=0, arcount=0; struct compress_tree_node* tree = 0; int r; - size_t rr_offset; + size_t rr_offset; sldns_buffer_clear(buffer); if(udpsize < sldns_buffer_limit(buffer)) @@ -663,7 +685,7 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep, /* insert query section */ if(rep->qdcount) { - if((r=insert_query(qinfo, &tree, buffer, region)) != + if((r=insert_query(qinfo, &tree, buffer, region)) != RETVAL_OK) { if(r == RETVAL_TRUNC) { /* create truncated message */ @@ -707,8 +729,8 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep, } /* insert answer section */ - if((r=insert_section(rep, rep->an_numrrsets, &ancount, buffer, - 0, timenow, region, &tree, LDNS_SECTION_ANSWER, qinfo->qtype, + if((r=insert_section(rep, rep->an_numrrsets, &ancount, buffer, + 0, timenow, region, &tree, LDNS_SECTION_ANSWER, qinfo->qtype, dnssec, rr_offset)) != RETVAL_OK) { if(r == RETVAL_TRUNC) { /* create truncated message */ @@ -722,9 +744,9 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep, sldns_buffer_write_u16_at(buffer, 6, ancount); /* if response is positive answer, auth/add sections are not required */ - if( ! (MINIMAL_RESPONSES && positive_answer(rep, qinfo->qtype)) ) { + if( ! (minimise && positive_answer(rep, qinfo->qtype)) ) { /* insert auth section */ - if((r=insert_section(rep, rep->ns_numrrsets, &nscount, buffer, + if((r=insert_section(rep, rep->ns_numrrsets, &nscount, buffer, rep->an_numrrsets, timenow, region, &tree, LDNS_SECTION_AUTHORITY, qinfo->qtype, dnssec, rr_offset)) != RETVAL_OK) { @@ -739,20 +761,22 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep, } sldns_buffer_write_u16_at(buffer, 8, nscount); - /* insert add section */ - if((r=insert_section(rep, rep->ar_numrrsets, &arcount, buffer, - rep->an_numrrsets + rep->ns_numrrsets, timenow, region, - &tree, LDNS_SECTION_ADDITIONAL, qinfo->qtype, - dnssec, rr_offset)) != RETVAL_OK) { - if(r == RETVAL_TRUNC) { - /* no need to set TC bit, this is the additional */ - sldns_buffer_write_u16_at(buffer, 10, arcount); - sldns_buffer_flip(buffer); - return 1; + if(! (minimise && negative_answer(rep))) { + /* insert add section */ + if((r=insert_section(rep, rep->ar_numrrsets, &arcount, buffer, + rep->an_numrrsets + rep->ns_numrrsets, timenow, region, + &tree, LDNS_SECTION_ADDITIONAL, qinfo->qtype, + dnssec, rr_offset)) != RETVAL_OK) { + if(r == RETVAL_TRUNC) { + /* no need to set TC bit, this is the additional */ + sldns_buffer_write_u16_at(buffer, 10, arcount); + sldns_buffer_flip(buffer); + return 1; + } + return 0; } - return 0; + sldns_buffer_write_u16_at(buffer, 10, arcount); } - sldns_buffer_write_u16_at(buffer, 10, arcount); } sldns_buffer_flip(buffer); return 1; @@ -763,7 +787,7 @@ calc_edns_field_size(struct edns_data* edns) { size_t rdatalen = 0; struct edns_option* opt; - if(!edns || !edns->edns_present) + if(!edns || !edns->edns_present) return 0; for(opt = edns->opt_list; opt; opt = opt->next) { rdatalen += 4 + opt->opt_len; @@ -850,7 +874,7 @@ reply_info_answer_encode(struct query_info* qinf, struct reply_info* rep, } if(!reply_info_encode(qinf, rep, id, flags, pkt, timenow, region, - udpsize, dnssec)) { + udpsize, dnssec, MINIMAL_RESPONSES)) { log_err("reply encode: out of memory"); return 0; } diff --git a/util/data/msgencode.h b/util/data/msgencode.h index eea129d98d59823358a9f0bbd74dc71fb1ff8dd4..30dc515cbe595eadcb0bf58b5ded21b32e55296c 100644 --- a/util/data/msgencode.h +++ b/util/data/msgencode.h @@ -85,12 +85,14 @@ int reply_info_answer_encode(struct query_info* qinf, struct reply_info* rep, * @param region: to store temporary data in. * @param udpsize: size of the answer, 512, from EDNS, or 64k for TCP. * @param dnssec: if 0 DNSSEC records are omitted from the answer. + * @param minimise: if true, the answer is a minimal response, with + * authority and additional removed if possible. * @return: nonzero is success, or * 0 on error: malloc failure (no log_err has been done). */ int reply_info_encode(struct query_info* qinfo, struct reply_info* rep, uint16_t id, uint16_t flags, struct sldns_buffer* buffer, time_t timenow, - struct regional* region, uint16_t udpsize, int dnssec); + struct regional* region, uint16_t udpsize, int dnssec, int minimise); /** * Encode query packet. Assumes the buffer is large enough. diff --git a/util/data/msgparse.c b/util/data/msgparse.c index 7c32618a30154d72b45fe74451ba80c3aa8e62fc..fb312370366d3f96d1a86a4224270268d47d2e85 100644 --- a/util/data/msgparse.c +++ b/util/data/msgparse.c @@ -55,11 +55,7 @@ smart_compare(sldns_buffer* pkt, uint8_t* dnow, { if(LABEL_IS_PTR(*dnow)) { /* ptr points to a previous dname */ - uint8_t* p; - if((size_t)PTR_OFFSET(dnow[0], dnow[1]) - >= sldns_buffer_limit(pkt)) - return -1; - p = sldns_buffer_at(pkt, PTR_OFFSET(dnow[0], dnow[1])); + uint8_t* p = sldns_buffer_at(pkt, PTR_OFFSET(dnow[0], dnow[1])); if( p == dprfirst || p == dprlast ) return 0; /* prev dname is also a ptr, both ptrs are the same. */ diff --git a/util/data/msgreply.c b/util/data/msgreply.c index 32aec4bf4c959161babc5fd04df7ebac7d9b04f3..4320f312d6f3def44fb71f047a43d19924473b67 100644 --- a/util/data/msgreply.c +++ b/util/data/msgreply.c @@ -243,10 +243,10 @@ rdata_copy(sldns_buffer* pkt, struct packed_rrset_data* data, uint8_t* to, break; } if(len) { + log_assert(len <= pkt_len); memmove(to, sldns_buffer_current(pkt), len); to += len; sldns_buffer_skip(pkt, (ssize_t)len); - log_assert(len <= pkt_len); pkt_len -= len; } rdf++; @@ -819,7 +819,7 @@ log_dns_msg(const char* str, struct query_info* qinfo, struct reply_info* rep) sldns_buffer* buf = sldns_buffer_new(65535); struct regional* region = regional_create(); if(!reply_info_encode(qinfo, rep, 0, rep->flags, buf, 0, - region, 65535, 1)) { + region, 65535, 1, 0)) { log_info("%s: log_dns_msg: out of memory", str); } else { char* s = sldns_wire2str_pkt(sldns_buffer_begin(buf), diff --git a/util/data/msgreply.h b/util/data/msgreply.h index a455c4d2b37422b6601640d7922dd15a04209641..8d75f9b12f3ae5170fba9eca7c57e218aa958370 100644 --- a/util/data/msgreply.h +++ b/util/data/msgreply.h @@ -157,7 +157,7 @@ struct reply_info { time_t prefetch_ttl; /** - * Reply TTL extended with serve exipred TTL, to limit time to serve + * Reply TTL extended with serve expired TTL, to limit time to serve * expired message. */ time_t serve_expired_ttl; diff --git a/util/fptr_wlist.c b/util/fptr_wlist.c index 02f85e8dc4ab756a1f1bc539323411e11ee5d23e..f5da501de19be48cc09e211ff7d36619b3885caf 100644 --- a/util/fptr_wlist.c +++ b/util/fptr_wlist.c @@ -90,6 +90,9 @@ #ifdef CLIENT_SUBNET #include "edns-subnet/subnetmod.h" #endif +#ifdef USE_IPSET +#include "ipset/ipset.h" +#endif int fptr_whitelist_comm_point(comm_point_callback_type *fptr) @@ -127,6 +130,7 @@ fptr_whitelist_comm_timer(void (*fptr)(void*)) #endif else if(fptr == &auth_xfer_timer) return 1; else if(fptr == &auth_xfer_probe_timer_callback) return 1; + else if(fptr == &auth_xfer_transfer_timer_callback) return 1; return 0; } @@ -357,8 +361,8 @@ fptr_whitelist_modenv_kill_sub(void (*fptr)(struct module_qstate* newq)) } int -fptr_whitelist_modenv_detect_cycle(int (*fptr)( - struct module_qstate* qstate, struct query_info* qinfo, +fptr_whitelist_modenv_detect_cycle(int (*fptr)( + struct module_qstate* qstate, struct query_info* qinfo, uint16_t flags, int prime, int valrec)) { if(fptr == &mesh_detect_cycle) return 1; @@ -383,6 +387,9 @@ fptr_whitelist_mod_init(int (*fptr)(struct module_env* env, int id)) #endif #ifdef CLIENT_SUBNET else if(fptr == &subnetmod_init) return 1; +#endif +#ifdef USE_IPSET + else if(fptr == &ipset_init) return 1; #endif return 0; } @@ -405,6 +412,9 @@ fptr_whitelist_mod_deinit(void (*fptr)(struct module_env* env, int id)) #endif #ifdef CLIENT_SUBNET else if(fptr == &subnetmod_deinit) return 1; +#endif +#ifdef USE_IPSET + else if(fptr == &ipset_deinit) return 1; #endif return 0; } @@ -428,6 +438,9 @@ fptr_whitelist_mod_operate(void (*fptr)(struct module_qstate* qstate, #endif #ifdef CLIENT_SUBNET else if(fptr == &subnetmod_operate) return 1; +#endif +#ifdef USE_IPSET + else if(fptr == &ipset_operate) return 1; #endif return 0; } @@ -451,6 +464,9 @@ fptr_whitelist_mod_inform_super(void (*fptr)( #endif #ifdef CLIENT_SUBNET else if(fptr == &subnetmod_inform_super) return 1; +#endif +#ifdef USE_IPSET + else if(fptr == &ipset_inform_super) return 1; #endif return 0; } @@ -474,6 +490,9 @@ fptr_whitelist_mod_clear(void (*fptr)(struct module_qstate* qstate, #endif #ifdef CLIENT_SUBNET else if(fptr == &subnetmod_clear) return 1; +#endif +#ifdef USE_IPSET + else if(fptr == &ipset_clear) return 1; #endif return 0; } @@ -496,6 +515,9 @@ fptr_whitelist_mod_get_mem(size_t (*fptr)(struct module_env* env, int id)) #endif #ifdef CLIENT_SUBNET else if(fptr == &subnetmod_get_mem) return 1; +#endif +#ifdef USE_IPSET + else if(fptr == &ipset_get_mem) return 1; #endif return 0; } @@ -596,3 +618,4 @@ int fptr_whitelist_inplace_cb_query_response( #endif return 0; } + diff --git a/util/iana_ports.inc b/util/iana_ports.inc index 5ead47f0f665b511224fd58513fd7d0d721cfc7e..3e6f3e6be617babbb63819661b3756c23cd4f8e0 100644 --- a/util/iana_ports.inc +++ b/util/iana_ports.inc @@ -960,8 +960,6 @@ 1298, 1299, 1300, -1301, -1302, 1303, 1304, 1305, @@ -1848,7 +1846,6 @@ 2197, 2198, 2199, -2200, 2201, 2202, 2203, @@ -4768,6 +4765,7 @@ 8088, 8097, 8100, +8111, 8115, 8116, 8118, @@ -4864,6 +4862,7 @@ 8805, 8807, 8808, +8809, 8873, 8880, 8883, diff --git a/util/log.c b/util/log.c index 318ff1d79107052d70dd0886de8596983d1817cd..8499d8c0a8a77ea6e573145939306a031ca84a91 100644 --- a/util/log.c +++ b/util/log.c @@ -61,7 +61,7 @@ #endif /* default verbosity */ -enum verbosity_value verbosity = 0; +enum verbosity_value verbosity = NO_VERBOSE; /** the file logged to. */ static FILE* logfile = 0; /** if key has been created */ @@ -70,7 +70,7 @@ static int key_created = 0; static ub_thread_key_type logkey; #ifndef THREADS_DISABLED /** pthread mutex to protect FILE* */ -static lock_quick_type log_lock; +static lock_basic_type log_lock; #endif /** the identity of this executable/process */ static const char* ident="unbound"; @@ -88,18 +88,18 @@ log_init(const char* filename, int use_syslog, const char* chrootdir) if(!key_created) { key_created = 1; ub_thread_key_create(&logkey, NULL); - lock_quick_init(&log_lock); + lock_basic_init(&log_lock); } - lock_quick_lock(&log_lock); + lock_basic_lock(&log_lock); if(logfile #if defined(HAVE_SYSLOG_H) || defined(UB_ON_WINDOWS) || logging_to_syslog #endif ) { - lock_quick_unlock(&log_lock); /* verbose() needs the lock */ + lock_basic_unlock(&log_lock); /* verbose() needs the lock */ verbose(VERB_QUERY, "switching log to %s", use_syslog?"syslog":(filename&&filename[0]?filename:"stderr")); - lock_quick_lock(&log_lock); + lock_basic_lock(&log_lock); } if(logfile && logfile != stderr) { FILE* cl = logfile; @@ -115,9 +115,11 @@ log_init(const char* filename, int use_syslog, const char* chrootdir) if(use_syslog) { /* do not delay opening until first write, because we may * chroot and no longer be able to access dev/log and so on */ - openlog(ident, LOG_NDELAY, LOG_DAEMON); + /* the facility is LOG_DAEMON by default, but + * --with-syslog-facility=LOCAL[0-7] can override it */ + openlog(ident, LOG_NDELAY, UB_SYSLOG_FACILITY); logging_to_syslog = 1; - lock_quick_unlock(&log_lock); + lock_basic_unlock(&log_lock); return; } #elif defined(UB_ON_WINDOWS) @@ -126,13 +128,13 @@ log_init(const char* filename, int use_syslog, const char* chrootdir) } if(use_syslog) { logging_to_syslog = 1; - lock_quick_unlock(&log_lock); + lock_basic_unlock(&log_lock); return; } #endif /* HAVE_SYSLOG_H */ if(!filename || !filename[0]) { logfile = stderr; - lock_quick_unlock(&log_lock); + lock_basic_unlock(&log_lock); return; } /* open the file for logging */ @@ -141,7 +143,7 @@ log_init(const char* filename, int use_syslog, const char* chrootdir) filename += strlen(chrootdir); f = fopen(filename, "a"); if(!f) { - lock_quick_unlock(&log_lock); + lock_basic_unlock(&log_lock); log_err("Could not open logfile %s: %s", filename, strerror(errno)); return; @@ -151,14 +153,14 @@ log_init(const char* filename, int use_syslog, const char* chrootdir) setvbuf(f, NULL, (int)_IOLBF, 0); #endif logfile = f; - lock_quick_unlock(&log_lock); + lock_basic_unlock(&log_lock); } void log_file(FILE *f) { - lock_quick_lock(&log_lock); + lock_basic_lock(&log_lock); logfile = f; - lock_quick_unlock(&log_lock); + lock_basic_unlock(&log_lock); } void log_thread_set(int* num) @@ -243,9 +245,9 @@ log_vmsg(int pri, const char* type, return; } #endif /* HAVE_SYSLOG_H */ - lock_quick_lock(&log_lock); + lock_basic_lock(&log_lock); if(!logfile) { - lock_quick_unlock(&log_lock); + lock_basic_unlock(&log_lock); return; } now = (time_t)time(NULL); @@ -270,7 +272,7 @@ log_vmsg(int pri, const char* type, /* line buffering does not work on windows */ fflush(logfile); #endif - lock_quick_unlock(&log_lock); + lock_basic_unlock(&log_lock); } /** diff --git a/util/mini_event.c b/util/mini_event.c index faadf1a23c8df57c47ce37006f4352dddc2c16b9..661d88d2e6f60faace77e909318ccd69df91a5e6 100644 --- a/util/mini_event.c +++ b/util/mini_event.c @@ -313,7 +313,7 @@ int event_add(struct event* ev, struct timeval* tv) struct timeval *now = ev->ev_base->time_tv; ev->ev_timeout.tv_sec = tv->tv_sec + now->tv_sec; ev->ev_timeout.tv_usec = tv->tv_usec + now->tv_usec; - while(ev->ev_timeout.tv_usec > 1000000) { + while(ev->ev_timeout.tv_usec >= 1000000) { ev->ev_timeout.tv_usec -= 1000000; ev->ev_timeout.tv_sec++; } diff --git a/util/net_help.c b/util/net_help.c index 1a4fa8a58e6f307c8dc19504125891fc93e9b800..9747b5d55a781d06c99a45e5c2bd961547a2f19b 100644 --- a/util/net_help.c +++ b/util/net_help.c @@ -697,11 +697,20 @@ void sock_list_merge(struct sock_list** list, struct regional* region, void log_crypto_err(const char* str) { +#ifdef HAVE_SSL + log_crypto_err_code(str, ERR_get_error()); +#else + (void)str; +#endif /* HAVE_SSL */ +} + +void log_crypto_err_code(const char* str, unsigned long err) +{ #ifdef HAVE_SSL /* error:[error code]:[library name]:[function name]:[reason string] */ char buf[128]; unsigned long e; - ERR_error_string_n(ERR_get_error(), buf, sizeof(buf)); + ERR_error_string_n(err, buf, sizeof(buf)); log_err("%s crypto %s", str, buf); while( (e=ERR_get_error()) ) { ERR_error_string_n(e, buf, sizeof(buf)); @@ -709,6 +718,7 @@ log_crypto_err(const char* str) } #else (void)str; + (void)err; #endif /* HAVE_SSL */ } @@ -744,6 +754,14 @@ listen_sslctx_setup(void* ctxt) return 0; } #endif +#if defined(SSL_OP_NO_RENEGOTIATION) + /* disable client renegotiation */ + if((SSL_CTX_set_options(ctx, SSL_OP_NO_RENEGOTIATION) & + SSL_OP_NO_RENEGOTIATION) != SSL_OP_NO_RENEGOTIATION) { + log_crypto_err("could not set SSL_OP_NO_RENEGOTIATION"); + return 0; + } +#endif #if defined(SHA256_DIGEST_LENGTH) && defined(USE_ECDSA) /* if we have sha256, set the cipher list to have no known vulns */ if(!SSL_CTX_set_cipher_list(ctx, "TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256")) @@ -802,6 +820,16 @@ void* listen_sslctx_create(char* key, char* pem, char* verifypem) log_crypto_err("could not SSL_CTX_new"); return NULL; } + if(!key || key[0] == 0) { + log_err("error: no tls-service-key file specified"); + SSL_CTX_free(ctx); + return NULL; + } + if(!pem || pem[0] == 0) { + log_err("error: no tls-service-pem file specified"); + SSL_CTX_free(ctx); + return NULL; + } if(!listen_sslctx_setup(ctx)) { SSL_CTX_free(ctx); return NULL; @@ -952,6 +980,14 @@ void* connect_sslctx_create(char* key, char* pem, char* verifypem, int wincert) SSL_CTX_free(ctx); return NULL; } +#if defined(SSL_OP_NO_RENEGOTIATION) + /* disable client renegotiation */ + if((SSL_CTX_set_options(ctx, SSL_OP_NO_RENEGOTIATION) & + SSL_OP_NO_RENEGOTIATION) != SSL_OP_NO_RENEGOTIATION) { + log_crypto_err("could not set SSL_OP_NO_RENEGOTIATION"); + return 0; + } +#endif if(key && key[0]) { if(!SSL_CTX_use_certificate_chain_file(ctx, pem)) { log_err("error in client certificate %s", pem); @@ -1009,7 +1045,7 @@ void* incoming_ssl_fd(void* sslctx, int fd) return NULL; } SSL_set_accept_state(ssl); - (void)SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); + (void)SSL_set_mode(ssl, (long)SSL_MODE_AUTO_RETRY); if(!SSL_set_fd(ssl, fd)) { log_crypto_err("could not SSL_set_fd"); SSL_free(ssl); @@ -1031,7 +1067,7 @@ void* outgoing_ssl_fd(void* sslctx, int fd) return NULL; } SSL_set_connect_state(ssl); - (void)SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); + (void)SSL_set_mode(ssl, (long)SSL_MODE_AUTO_RETRY); if(!SSL_set_fd(ssl, fd)) { log_crypto_err("could not SSL_set_fd"); SSL_free(ssl); @@ -1049,11 +1085,19 @@ void* outgoing_ssl_fd(void* sslctx, int fd) static lock_basic_type *ub_openssl_locks = NULL; /** callback that gets thread id for openssl */ +#ifdef HAVE_CRYPTO_THREADID_SET_CALLBACK +static void +ub_crypto_id_cb(CRYPTO_THREADID *id) +{ + CRYPTO_THREADID_set_numeric(id, (unsigned long)log_thread_get()); +} +#else static unsigned long ub_crypto_id_cb(void) { return (unsigned long)log_thread_get(); } +#endif static void ub_crypto_lock_cb(int mode, int type, const char *ATTR_UNUSED(file), @@ -1078,7 +1122,11 @@ int ub_openssl_lock_init(void) for(i=0; ihmac_key, 32, digest, NULL) != 1) { verbose(VERB_CLIENT, "HMAC_Init_ex failed"); return -1; } +#else + HMAC_Init_ex(hmac_ctx, ticket_keys->hmac_key, 32, digest, NULL); +#endif return 1; } else if (enc == 0) { /* decrypt */ @@ -1191,10 +1247,14 @@ int tls_session_ticket_key_cb(void *ATTR_UNUSED(sslctx), unsigned char* key_name return 0; } +#ifndef HMAC_INIT_EX_RETURNS_VOID if (HMAC_Init_ex(hmac_ctx, key->hmac_key, 32, digest, NULL) != 1) { verbose(VERB_CLIENT, "HMAC_Init_ex failed"); return -1; } +#else + HMAC_Init_ex(hmac_ctx, key->hmac_key, 32, digest, NULL); +#endif if (EVP_DecryptInit_ex(evp_sctx, cipher, NULL, key->aes_key, iv) != 1) { log_err("EVP_DecryptInit_ex failed"); return -1; @@ -1219,6 +1279,12 @@ listen_sslctx_delete_ticket_keys(void) struct tls_session_ticket_key *key; if(!ticket_keys) return; for(key = ticket_keys; key->key_name != NULL; key++) { + /* wipe key data from memory*/ +#ifdef HAVE_EXPLICIT_BZERO + explicit_bzero(key->key_name, 80); +#else + memset(key->key_name, 0xdd, 80); +#endif free(key->key_name); } free(ticket_keys); diff --git a/util/net_help.h b/util/net_help.h index 0b197fbdd6e73e411ae11c0579d7be60ef31ef15..79e2a834931a0111bf70cdddaa06170c58b6bb0c 100644 --- a/util/net_help.h +++ b/util/net_help.h @@ -378,6 +378,13 @@ void sock_list_merge(struct sock_list** list, struct regional* region, */ void log_crypto_err(const char* str); +/** + * Log libcrypto error from errcode with descriptive string, calls log_err. + * @param str: what failed. + * @param err: error code from ERR_get_error. + */ +void log_crypto_err_code(const char* str, unsigned long err); + /** * Set SSL_OP_NOxxx options on SSL context to disable bad crypto * @param ctxt: SSL_CTX* diff --git a/util/netevent.c b/util/netevent.c index a507faf7e41189e3ba87d20f8edc122cde40c502..980bb8bea97224e9eb20071aba801c3cbd8d9ae5 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -178,7 +178,7 @@ comm_base_create(int sigs) } ub_comm_base_now(b); ub_get_event_sys(b->eb->base, &evnm, &evsys, &evmethod); - verbose(VERB_ALGO, "%s %s user %s method.", evnm, evsys, evmethod); + verbose(VERB_ALGO, "%s %s uses %s method.", evnm, evsys, evmethod); return b; } @@ -926,6 +926,14 @@ comm_point_tcp_accept_callback(int fd, short event, void* arg) } /* accept incoming connection. */ c_hdl = c->tcp_free; + /* clear leftover flags from previous use, and then set the + * correct event base for the event structure for libevent */ + ub_event_free(c_hdl->ev->ev); + c_hdl->ev->ev = ub_event_new(c_hdl->ev->base->eb->base, -1, UB_EV_PERSIST | UB_EV_READ | UB_EV_TIMEOUT, comm_point_tcp_handle_callback, c_hdl); + if(!c_hdl->ev->ev) { + log_warn("could not ub_event_new, dropped tcp"); + return; + } log_assert(fd != -1); (void)fd; new_fd = comm_point_perform_accept(c, &c_hdl->repinfo.addr, @@ -989,11 +997,11 @@ tcp_callback_writer(struct comm_point* c) c->tcp_is_reading = 1; c->tcp_byte_count = 0; /* switch from listening(write) to listening(read) */ - comm_point_stop_listening(c); if(c->tcp_req_info) { tcp_req_info_handle_writedone(c->tcp_req_info); } else { - comm_point_start_listening(c, -1, -1); + comm_point_stop_listening(c); + comm_point_start_listening(c, -1, c->tcp_timeout_msec); } } @@ -1006,11 +1014,11 @@ tcp_callback_reader(struct comm_point* c) if(c->tcp_do_toggle_rw) c->tcp_is_reading = 0; c->tcp_byte_count = 0; - if(c->type == comm_tcp) - comm_point_stop_listening(c); if(c->tcp_req_info) { tcp_req_info_handle_readdone(c->tcp_req_info); } else { + if(c->type == comm_tcp) + comm_point_stop_listening(c); fptr_ok(fptr_whitelist_comm_point(c->callback)); if( (*c->callback)(c, c->cb_arg, NETEVENT_NOERROR, &c->repinfo) ) { comm_point_start_listening(c, -1, c->tcp_timeout_msec); @@ -1044,6 +1052,35 @@ log_cert(unsigned level, const char* str, X509* cert) } #endif /* HAVE_SSL */ +#ifdef HAVE_SSL +/** true if the ssl handshake error has to be squelched from the logs */ +static int +squelch_err_ssl_handshake(unsigned long err) +{ + if(verbosity >= VERB_QUERY) + return 0; /* only squelch on low verbosity */ + /* this is very specific, we could filter on ERR_GET_REASON() + * (the third element in ERR_PACK) */ + if(err == ERR_PACK(ERR_LIB_SSL, SSL_F_SSL3_GET_RECORD, SSL_R_HTTPS_PROXY_REQUEST) || + err == ERR_PACK(ERR_LIB_SSL, SSL_F_SSL3_GET_RECORD, SSL_R_HTTP_REQUEST) || + err == ERR_PACK(ERR_LIB_SSL, SSL_F_SSL3_GET_RECORD, SSL_R_WRONG_VERSION_NUMBER) || + err == ERR_PACK(ERR_LIB_SSL, SSL_F_SSL3_READ_BYTES, SSL_R_SSLV3_ALERT_BAD_CERTIFICATE) +#ifdef SSL_F_TLS_POST_PROCESS_CLIENT_HELLO + || err == ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_POST_PROCESS_CLIENT_HELLO, SSL_R_NO_SHARED_CIPHER) +#endif +#ifdef SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO + || err == ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO, SSL_R_UNKNOWN_PROTOCOL) + || err == ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO, SSL_R_UNSUPPORTED_PROTOCOL) +# ifdef SSL_R_VERSION_TOO_LOW + || err == ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO, SSL_R_VERSION_TOO_LOW) +# endif +#endif + ) + return 1; + return 0; +} +#endif /* HAVE_SSL */ + /** continue ssl handshake */ #ifdef HAVE_SSL static int @@ -1088,9 +1125,12 @@ ssl_handshake(struct comm_point* c) strerror(errno)); return 0; } else { - log_crypto_err("ssl handshake failed"); - log_addr(1, "ssl handshake failed", &c->repinfo.addr, - c->repinfo.addrlen); + unsigned long err = ERR_get_error(); + if(!squelch_err_ssl_handshake(err)) { + log_crypto_err_code("ssl handshake failed", err); + log_addr(VERB_OPS, "ssl handshake failed", &c->repinfo.addr, + c->repinfo.addrlen); + } return 0; } } @@ -1184,6 +1224,10 @@ ssl_handle_read(struct comm_point* c) comm_point_listen_for_rw(c, 0, 1); return 1; } else if(want == SSL_ERROR_SYSCALL) { +#ifdef ECONNRESET + if(errno == ECONNRESET && verbosity < 2) + return 0; /* silence reset by peer */ +#endif if(errno != 0) log_err("SSL_read syscall: %s", strerror(errno)); @@ -1228,6 +1272,10 @@ ssl_handle_read(struct comm_point* c) comm_point_listen_for_rw(c, 0, 1); return 1; } else if(want == SSL_ERROR_SYSCALL) { +#ifdef ECONNRESET + if(errno == ECONNRESET && verbosity < 2) + return 0; /* silence reset by peer */ +#endif if(errno != 0) log_err("SSL_read syscall: %s", strerror(errno)); @@ -1261,7 +1309,7 @@ ssl_handle_write(struct comm_point* c) return 1; } /* ignore return, if fails we may simply block */ - (void)SSL_set_mode(c->ssl, SSL_MODE_ENABLE_PARTIAL_WRITE); + (void)SSL_set_mode(c->ssl, (long)SSL_MODE_ENABLE_PARTIAL_WRITE); if(c->tcp_byte_count < sizeof(uint16_t)) { uint16_t len = htons(sldns_buffer_limit(c->buffer)); ERR_clear_error(); @@ -1288,13 +1336,17 @@ ssl_handle_write(struct comm_point* c) if(want == SSL_ERROR_ZERO_RETURN) { return 0; /* closed */ } else if(want == SSL_ERROR_WANT_READ) { - c->ssl_shake_state = comm_ssl_shake_read; + c->ssl_shake_state = comm_ssl_shake_hs_read; comm_point_listen_for_rw(c, 1, 0); return 1; /* wait for read condition */ } else if(want == SSL_ERROR_WANT_WRITE) { ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE); return 1; /* write more later */ } else if(want == SSL_ERROR_SYSCALL) { +#ifdef EPIPE + if(errno == EPIPE && verbosity < 2) + return 0; /* silence 'broken pipe' */ +#endif if(errno != 0) log_err("SSL_write syscall: %s", strerror(errno)); @@ -1322,13 +1374,17 @@ ssl_handle_write(struct comm_point* c) if(want == SSL_ERROR_ZERO_RETURN) { return 0; /* closed */ } else if(want == SSL_ERROR_WANT_READ) { - c->ssl_shake_state = comm_ssl_shake_read; + c->ssl_shake_state = comm_ssl_shake_hs_read; comm_point_listen_for_rw(c, 1, 0); return 1; /* wait for read condition */ } else if(want == SSL_ERROR_WANT_WRITE) { ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE); return 1; /* write more later */ } else if(want == SSL_ERROR_SYSCALL) { +#ifdef EPIPE + if(errno == EPIPE && verbosity < 2) + return 0; /* silence 'broken pipe' */ +#endif if(errno != 0) log_err("SSL_write syscall: %s", strerror(errno)); @@ -1543,7 +1599,6 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) iov[1].iov_base = sldns_buffer_begin(buffer); iov[1].iov_len = sldns_buffer_limit(buffer); log_assert(iov[0].iov_len > 0); - log_assert(iov[1].iov_len > 0); msg.msg_name = &c->repinfo.addr; msg.msg_namelen = c->repinfo.addrlen; msg.msg_iov = iov; @@ -1610,7 +1665,6 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) iov[1].iov_base = sldns_buffer_begin(buffer); iov[1].iov_len = sldns_buffer_limit(buffer); log_assert(iov[0].iov_len > 0); - log_assert(iov[1].iov_len > 0); r = writev(fd, iov, 2); #else /* HAVE_WRITEV */ r = send(fd, (void*)(((uint8_t*)&len)+c->tcp_byte_count), @@ -1624,6 +1678,10 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) #endif if(errno == EINTR || errno == EAGAIN) return 1; +#ifdef ECONNRESET + if(errno == ECONNRESET && verbosity < 2) + return 0; /* silence reset by peer */ +#endif # ifdef HAVE_WRITEV log_err_addr("tcp writev", strerror(errno), &c->repinfo.addr, c->repinfo.addrlen); @@ -1641,6 +1699,8 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) UB_EV_WRITE); return 1; } + if(WSAGetLastError() == WSAECONNRESET && verbosity < 2) + return 0; /* silence reset by peer */ log_err_addr("tcp send s", wsa_strerror(WSAGetLastError()), &c->repinfo.addr, c->repinfo.addrlen); @@ -1664,6 +1724,10 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) #ifndef USE_WINSOCK if(errno == EINTR || errno == EAGAIN) return 1; +#ifdef ECONNRESET + if(errno == ECONNRESET && verbosity < 2) + return 0; /* silence reset by peer */ +#endif log_err_addr("tcp send r", strerror(errno), &c->repinfo.addr, c->repinfo.addrlen); #else @@ -1673,6 +1737,8 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE); return 1; } + if(WSAGetLastError() == WSAECONNRESET && verbosity < 2) + return 0; /* silence reset by peer */ log_err_addr("tcp send r", wsa_strerror(WSAGetLastError()), &c->repinfo.addr, c->repinfo.addrlen); #endif @@ -1738,6 +1804,16 @@ comm_point_tcp_handle_callback(int fd, short event, void* arg) } #endif + if(event&UB_EV_TIMEOUT) { + verbose(VERB_QUERY, "tcp took too long, dropped"); + reclaim_tcp_handler(c); + if(!c->tcp_do_close) { + fptr_ok(fptr_whitelist_comm_point(c->callback)); + (void)(*c->callback)(c, c->cb_arg, + NETEVENT_TIMEOUT, NULL); + } + return; + } if(event&UB_EV_READ) { int has_tcpq = (c->tcp_req_info != NULL); if(!comm_point_tcp_handle_read(fd, c, 0)) { @@ -1768,16 +1844,6 @@ comm_point_tcp_handle_callback(int fd, short event, void* arg) tcp_req_info_read_again(fd, c); return; } - if(event&UB_EV_TIMEOUT) { - verbose(VERB_QUERY, "tcp took too long, dropped"); - reclaim_tcp_handler(c); - if(!c->tcp_do_close) { - fptr_ok(fptr_whitelist_comm_point(c->callback)); - (void)(*c->callback)(c, c->cb_arg, - NETEVENT_TIMEOUT, NULL); - } - return; - } log_err("Ignored event %d for tcphdl.", event); } @@ -1826,6 +1892,10 @@ ssl_http_read_more(struct comm_point* c) comm_point_listen_for_rw(c, 0, 1); return 1; } else if(want == SSL_ERROR_SYSCALL) { +#ifdef ECONNRESET + if(errno == ECONNRESET && verbosity < 2) + return 0; /* silence reset by peer */ +#endif if(errno != 0) log_err("SSL_read syscall: %s", strerror(errno)); @@ -2268,12 +2338,16 @@ ssl_http_write_more(struct comm_point* c) if(want == SSL_ERROR_ZERO_RETURN) { return 0; /* closed */ } else if(want == SSL_ERROR_WANT_READ) { - c->ssl_shake_state = comm_ssl_shake_read; + c->ssl_shake_state = comm_ssl_shake_hs_read; comm_point_listen_for_rw(c, 1, 0); return 1; /* wait for read condition */ } else if(want == SSL_ERROR_WANT_WRITE) { return 1; /* write more later */ } else if(want == SSL_ERROR_SYSCALL) { +#ifdef EPIPE + if(errno == EPIPE && verbosity < 2) + return 0; /* silence 'broken pipe' */ +#endif if(errno != 0) log_err("SSL_write syscall: %s", strerror(errno)); @@ -2382,6 +2456,16 @@ comm_point_http_handle_callback(int fd, short event, void* arg) log_assert(c->type == comm_http); ub_comm_base_now(c->ev->base); + if(event&UB_EV_TIMEOUT) { + verbose(VERB_QUERY, "http took too long, dropped"); + reclaim_http_handler(c); + if(!c->tcp_do_close) { + fptr_ok(fptr_whitelist_comm_point(c->callback)); + (void)(*c->callback)(c, c->cb_arg, + NETEVENT_TIMEOUT, NULL); + } + return; + } if(event&UB_EV_READ) { if(!comm_point_http_handle_read(fd, c)) { reclaim_http_handler(c); @@ -2406,16 +2490,6 @@ comm_point_http_handle_callback(int fd, short event, void* arg) } return; } - if(event&UB_EV_TIMEOUT) { - verbose(VERB_QUERY, "http took too long, dropped"); - reclaim_http_handler(c); - if(!c->tcp_do_close) { - fptr_ok(fptr_whitelist_comm_point(c->callback)); - (void)(*c->callback)(c, c->cb_arg, - NETEVENT_TIMEOUT, NULL); - } - return; - } log_err("Ignored event %d for httphdl.", event); } @@ -3117,7 +3191,7 @@ comm_point_drop_reply(struct comm_reply* repinfo) { if(!repinfo) return; - log_assert(repinfo && repinfo->c); + log_assert(repinfo->c); log_assert(repinfo->c->type != comm_tcp_accept); if(repinfo->c->type == comm_udp) return; @@ -3138,8 +3212,8 @@ comm_point_stop_listening(struct comm_point* c) void comm_point_start_listening(struct comm_point* c, int newfd, int msec) { - verbose(VERB_ALGO, "comm point start listening %d", - c->fd==-1?newfd:c->fd); + verbose(VERB_ALGO, "comm point start listening %d (%d msec)", + c->fd==-1?newfd:c->fd, msec); if(c->type == comm_tcp_accept && !c->tcp_free) { /* no use to start listening no free slots. */ return; diff --git a/util/random.c b/util/random.c index 8332960b4d0c352a5c733c48f18f6474042ae686..bb564f2f99aad6cba1b6b4bd349b0150d3d078b9 100644 --- a/util/random.c +++ b/util/random.c @@ -79,15 +79,8 @@ #define MAX_VALUE 0x7fffffff #if defined(HAVE_SSL) -void -ub_systemseed(unsigned int ATTR_UNUSED(seed)) -{ - /* arc4random_uniform does not need seeds, it gets kernel entropy */ -} - struct ub_randstate* -ub_initstate(unsigned int ATTR_UNUSED(seed), - struct ub_randstate* ATTR_UNUSED(from)) +ub_initstate(struct ub_randstate* ATTR_UNUSED(from)) { struct ub_randstate* s = (struct ub_randstate*)malloc(1); if(!s) { @@ -119,12 +112,7 @@ struct ub_randstate { int ready; }; -void ub_systemseed(unsigned int ATTR_UNUSED(seed)) -{ -} - -struct ub_randstate* ub_initstate(unsigned int ATTR_UNUSED(seed), - struct ub_randstate* ATTR_UNUSED(from)) +struct ub_randstate* ub_initstate(struct ub_randstate* ATTR_UNUSED(from)) { struct ub_randstate* s = (struct ub_randstate*)calloc(1, sizeof(*s)); if(!s) { @@ -140,7 +128,9 @@ long int ub_random(struct ub_randstate* ATTR_UNUSED(state)) /* random 31 bit value. */ SECStatus s = PK11_GenerateRandom((unsigned char*)&x, (int)sizeof(x)); if(s != SECSuccess) { - log_err("PK11_GenerateRandom error: %s", + /* unbound needs secure randomness for randomized + * ID bits and port numbers in packets to upstream servers */ + fatal_exit("PK11_GenerateRandom error: %s", PORT_ErrorToString(PORT_GetError())); } return x & MAX_VALUE; @@ -157,17 +147,7 @@ struct ub_randstate { int seeded; }; -void ub_systemseed(unsigned int ATTR_UNUSED(seed)) -{ -/** - * We seed on init and not here, as we need the ctx to re-seed. - * This also means that re-seeding is not supported. - */ - log_err("Re-seeding not supported, generator untouched"); -} - -struct ub_randstate* ub_initstate(unsigned int seed, - struct ub_randstate* ATTR_UNUSED(from)) +struct ub_randstate* ub_initstate(struct ub_randstate* ATTR_UNUSED(from)) { struct ub_randstate* s = (struct ub_randstate*)calloc(1, sizeof(*s)); uint8_t buf[YARROW256_SEED_FILE_SIZE]; @@ -183,15 +163,10 @@ struct ub_randstate* ub_initstate(unsigned int seed, yarrow256_seed(&s->ctx, YARROW256_SEED_FILE_SIZE, buf); s->seeded = yarrow256_is_seeded(&s->ctx); } else { - /* Stretch the uint32 input seed and feed it to Yarrow */ - uint32_t v = seed; - size_t i; - for(i=0; i < (YARROW256_SEED_FILE_SIZE/sizeof(seed)); i++) { - memmove(buf+i*sizeof(seed), &v, sizeof(seed)); - v = v*seed + (uint32_t)i; - } - yarrow256_seed(&s->ctx, YARROW256_SEED_FILE_SIZE, buf); - s->seeded = yarrow256_is_seeded(&s->ctx); + log_err("nettle random(yarrow) cannot initialize, " + "getentropy failed: %s", strerror(errno)); + free(s); + return NULL; } return s; diff --git a/util/random.h b/util/random.h index a05a994a3d5292caf3877776d807960afef38144..b257793a4449f4d2903b39af9f5782f82ab2e396 100644 --- a/util/random.h +++ b/util/random.h @@ -47,25 +47,14 @@ */ struct ub_randstate; -/** - * Initialize the system randomness. Obtains entropy from the system - * before a chroot or privilege makes it unavailable. - * You do not have to call this, otherwise ub_initstate does so. - * @param seed: seed value to create state (if no good entropy is found). - */ -void ub_systemseed(unsigned int seed); - /** * Initialize a random generator state for use - * @param seed: seed value to create state contents. - * (ignored for arc4random). * @param from: if not NULL, the seed is taken from this random structure. * can be used to seed random states via a parent-random-state that * is itself seeded with entropy. * @return new state or NULL alloc failure. */ -struct ub_randstate* ub_initstate(unsigned int seed, - struct ub_randstate* from); +struct ub_randstate* ub_initstate(struct ub_randstate* from); /** * Generate next random number from the state passed along. diff --git a/util/regional.c b/util/regional.c index 899a54edbddddba9f101c84bb6dcb172b8d28590..ff36d0e212416c0dc7b695881060f28f8b0fa884 100644 --- a/util/regional.c +++ b/util/regional.c @@ -84,6 +84,7 @@ struct regional* regional_create_custom(size_t size) { struct regional* r = (struct regional*)malloc(size); + size = ALIGN_UP(size, ALIGNMENT); log_assert(sizeof(struct regional) <= size); if(!r) return NULL; r->first_size = size; @@ -120,8 +121,18 @@ regional_destroy(struct regional *r) void * regional_alloc(struct regional *r, size_t size) { - size_t a = ALIGN_UP(size, ALIGNMENT); + size_t a; void *s; + if( +#if SIZEOF_SIZE_T == 8 + (unsigned long long)size >= 0xffffffffffffff00ULL +#else + (unsigned)size >= (unsigned)0xffffff00UL +#endif + ) + return NULL; /* protect against integer overflow in + malloc and ALIGN_UP */ + a = ALIGN_UP(size, ALIGNMENT); /* large objects */ if(a > REGIONAL_LARGE_OBJECT_SIZE) { s = malloc(ALIGNMENT + size); diff --git a/util/shm_side/shm_main.c b/util/shm_side/shm_main.c index a783c099b5a489b0f27dfee9a3f4959f57ec0b04..46a71510fea3263c03cdbabaa2ebe818a3b5ef42 100644 --- a/util/shm_side/shm_main.c +++ b/util/shm_side/shm_main.c @@ -121,7 +121,7 @@ int shm_main_init(struct daemon* daemon) shmctl(daemon->shm_info->id_arr, IPC_RMID, NULL); /* SHM: Create the segment */ - daemon->shm_info->id_ctl = shmget(daemon->shm_info->key, sizeof(struct ub_shm_stat_info), IPC_CREAT | 0666); + daemon->shm_info->id_ctl = shmget(daemon->shm_info->key, sizeof(struct ub_shm_stat_info), IPC_CREAT | 0644); if (daemon->shm_info->id_ctl < 0) { @@ -134,7 +134,7 @@ int shm_main_init(struct daemon* daemon) return 0; } - daemon->shm_info->id_arr = shmget(daemon->shm_info->key + 1, shm_size, IPC_CREAT | 0666); + daemon->shm_info->id_arr = shmget(daemon->shm_info->key + 1, shm_size, IPC_CREAT | 0644); if (daemon->shm_info->id_arr < 0) { @@ -223,8 +223,10 @@ void shm_main_run(struct worker *worker) struct ub_stats_info *stat_info; int offset; +#ifndef S_SPLINT_S verbose(VERB_DETAIL, "SHM run - worker [%d] - daemon [%p] - timenow(%u) - timeboot(%u)", worker->thread_num, worker->daemon, (unsigned)worker->env.now_tv->tv_sec, (unsigned)worker->daemon->time_boot.tv_sec); +#endif offset = worker->thread_num + 1; stat_total = worker->daemon->shm_info->ptr_arr; @@ -240,9 +242,11 @@ void shm_main_run(struct worker *worker) memset(stat_total, 0, sizeof(struct ub_stats_info)); /* Point to data into SHM */ +#ifndef S_SPLINT_S shm_stat = worker->daemon->shm_info->ptr_ctl; shm_stat->time.now_sec = (long long)worker->env.now_tv->tv_sec; shm_stat->time.now_usec = (long long)worker->env.now_tv->tv_usec; +#endif stat_timeval_subtract(&shm_stat->time.up_sec, &shm_stat->time.up_usec, worker->env.now_tv, &worker->daemon->time_boot); stat_timeval_subtract(&shm_stat->time.elapsed_sec, &shm_stat->time.elapsed_usec, worker->env.now_tv, &worker->daemon->time_last_stat); diff --git a/util/storage/lookup3.c b/util/storage/lookup3.c index cc110748156f581ed13b9db40f08ee3e39ed1e8d..bb25eb433c94f122de5bb8ae0922939c8d16a3b0 100644 --- a/util/storage/lookup3.c +++ b/util/storage/lookup3.c @@ -1,4 +1,7 @@ /* + May 2019(Wouter) patch to enable the valgrind clean implementation all the + time. This enables better security audit and checks, which is better + than the speedup. Git issue #30. Renamed the define ARRAY_CLEAN_ACCESS. February 2013(Wouter) patch defines for BSD endianness, from Brad Smith. January 2012(Wouter) added randomised initial value, fallout from 28c3. March 2007(Wouter) adapted from lookup3.c original, add config.h include. @@ -44,6 +47,7 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy. ------------------------------------------------------------------------------- */ /*#define SELF_TEST 1*/ +#define ARRAY_CLEAN_ACCESS 1 #include "config.h" #include "util/storage/lookup3.h" @@ -336,7 +340,7 @@ uint32_t hashlittle( const void *key, size_t length, uint32_t initval) u.ptr = key; if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) { const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */ -#ifdef VALGRIND +#ifdef ARRAY_CLEAN_ACCESS const uint8_t *k8; #endif @@ -361,7 +365,7 @@ uint32_t hashlittle( const void *key, size_t length, uint32_t initval) * still catch it and complain. The masking trick does make the hash * noticeably faster for short strings (like English words). */ -#ifndef VALGRIND +#ifndef ARRAY_CLEAN_ACCESS switch(length) { diff --git a/util/ub_event.c b/util/ub_event.c index 78481a982055b57a73cee8a961a9c920d67a7c5e..9af476ad40841f0693d5164cae4f56bb07819672 100644 --- a/util/ub_event.c +++ b/util/ub_event.c @@ -295,11 +295,18 @@ ub_event_new(struct ub_event_base* base, int fd, short bits, if (!ev) return NULL; +#ifndef HAVE_EVENT_ASSIGN event_set(ev, fd, NATIVE_BITS(bits), NATIVE_BITS_CB(cb), arg); if (event_base_set(AS_EVENT_BASE(base), ev) != 0) { free(ev); return NULL; } +#else + if (event_assign(ev, AS_EVENT_BASE(base), fd, bits, cb, arg) != 0) { + free(ev); + return NULL; + } +#endif return AS_UB_EVENT(ev); } @@ -312,11 +319,18 @@ ub_signal_new(struct ub_event_base* base, int fd, if (!ev) return NULL; +#if !HAVE_DECL_EVSIGNAL_ASSIGN signal_set(ev, fd, NATIVE_BITS_CB(cb), arg); if (event_base_set(AS_EVENT_BASE(base), ev) != 0) { free(ev); return NULL; } +#else + if (evsignal_assign(ev, AS_EVENT_BASE(base), fd, cb, arg) != 0) { + free(ev); + return NULL; + } +#endif return AS_UB_EVENT(ev); } @@ -444,7 +458,9 @@ void ub_comm_base_now(struct comm_base* cb) if(gettimeofday(tv, NULL) < 0) { log_err("gettimeofday: %s", strerror(errno)); } +#ifndef S_SPLINT_S *tt = tv->tv_sec; +#endif #endif /* USE_MINI_EVENT */ } diff --git a/util/ub_event_pluggable.c b/util/ub_event_pluggable.c index 4a9451263b7ce047418ff28c27fd78c32f5689bd..235bba6ba7973f8e131b972e0f9906b27e6eb6fc 100644 --- a/util/ub_event_pluggable.c +++ b/util/ub_event_pluggable.c @@ -453,7 +453,7 @@ ub_get_event_sys(struct ub_event_base* ub_base, const char** n, const char** s, * ub_base is guaranteed to exist and to be the default * event base. */ - assert(b); + assert(b != NULL); *n = "pluggable-event"; *s = event_get_version(); # if defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP) @@ -687,6 +687,8 @@ void ub_comm_base_now(struct comm_base* cb) if(gettimeofday(tv, NULL) < 0) { log_err("gettimeofday: %s", strerror(errno)); } +#ifndef S_SPLINT_S *tt = tv->tv_sec; +#endif } diff --git a/util/winsock_event.c b/util/winsock_event.c index 63d98796d19ff02d794ad0319cb30edf977a777a..de6c28ecb08e15878259eb5e5b4f6fc99ab8a4b7 100644 --- a/util/winsock_event.c +++ b/util/winsock_event.c @@ -558,7 +558,7 @@ int event_add(struct event *ev, struct timeval *tv) struct timeval *now = ev->ev_base->time_tv; ev->ev_timeout.tv_sec = tv->tv_sec + now->tv_sec; ev->ev_timeout.tv_usec = tv->tv_usec + now->tv_usec; - while(ev->ev_timeout.tv_usec > 1000000) { + while(ev->ev_timeout.tv_usec >= 1000000) { ev->ev_timeout.tv_usec -= 1000000; ev->ev_timeout.tv_sec++; } diff --git a/validator/autotrust.c b/validator/autotrust.c index a72967302df1853ed324b384f1feb056301ca032..fd9fb3cf1991300ec9d1950b16b73932d2a45d3e 100644 --- a/validator/autotrust.c +++ b/validator/autotrust.c @@ -86,7 +86,6 @@ void autr_global_delete(struct autr_global_data* global) if(!global) return; /* elements deleted by parent */ - memset(global, 0, sizeof(*global)); free(global); } @@ -370,10 +369,10 @@ autr_tp_create(struct val_anchors* anchors, uint8_t* own, size_t own_len, free(tp); return NULL; } - lock_basic_unlock(&anchors->lock); lock_basic_init(&tp->lock); lock_protect(&tp->lock, tp, sizeof(*tp)); lock_protect(&tp->lock, tp->autr, sizeof(*tp->autr)); + lock_basic_unlock(&anchors->lock); return tp; } @@ -1175,15 +1174,32 @@ void autr_write_file(struct module_env* env, struct trust_anchor* tp) { FILE* out; char* fname = tp->autr->file; +#ifndef S_SPLINT_S + long long llvalue; +#endif char tempf[2048]; log_assert(tp->autr); if(!env) { log_err("autr_write_file: Module environment is NULL."); return; } - /* unique name with pid number and thread number */ - snprintf(tempf, sizeof(tempf), "%s.%d-%d", fname, (int)getpid(), - env->worker?*(int*)env->worker:0); + /* unique name with pid number, thread number, and struct pointer + * (the pointer uniquifies for multiple libunbound contexts) */ +#ifndef S_SPLINT_S +#if defined(SIZE_MAX) && defined(UINT32_MAX) && (UINT32_MAX == SIZE_MAX || INT32_MAX == SIZE_MAX) + /* avoid warning about upcast on 32bit systems */ + llvalue = (unsigned long)tp; +#else + llvalue = (unsigned long long)tp; +#endif +#ifndef USE_WINSOCK + snprintf(tempf, sizeof(tempf), "%s.%d-%d-%llx", fname, (int)getpid(), + env->worker?*(int*)env->worker:0, llvalue); +#else + snprintf(tempf, sizeof(tempf), "%s.%d-%d-%I64x", fname, (int)getpid(), + env->worker?*(int*)env->worker:0, llvalue); +#endif +#endif /* S_SPLINT_S */ verbose(VERB_ALGO, "autotrust: write to disk: %s", tempf); out = fopen(tempf, "w"); if(!out) { @@ -2245,7 +2261,7 @@ autr_debug_print_ta(struct autr_ta* ta) log_info("out of memory in debug_print_ta"); return; } - if(str && str[0]) str[strlen(str)-1]=0; /* remove newline */ + if(str[0]) str[strlen(str)-1]=0; /* remove newline */ ctime_r(&ta->last_change, buf); if(buf[0]) buf[strlen(buf)-1]=0; /* remove newline */ log_info("[%s] %s ;;state:%d ;;pending_count:%d%s%s last:%s", @@ -2267,10 +2283,10 @@ autr_debug_print_tp(struct trust_anchor* tp) log_info("assembled %d DS and %d DNSKEYs", (int)tp->numDS, (int)tp->numDNSKEY); if(tp->ds_rrset) { - log_packed_rrset(0, "DS:", tp->ds_rrset); + log_packed_rrset(NO_VERBOSE, "DS:", tp->ds_rrset); } if(tp->dnskey_rrset) { - log_packed_rrset(0, "DNSKEY:", tp->dnskey_rrset); + log_packed_rrset(NO_VERBOSE, "DNSKEY:", tp->dnskey_rrset); } log_info("file %s", tp->autr->file); ctime_r(&tp->autr->last_queried, buf); diff --git a/validator/val_anchor.c b/validator/val_anchor.c index 8ae9e7f3bce03654a6f8e737ddfdda1836c32fad..7224f00a21b652fd14ceb5dcde91c8eac2cd9f65 100644 --- a/validator/val_anchor.c +++ b/validator/val_anchor.c @@ -1007,12 +1007,12 @@ anchors_assemble_rrsets(struct val_anchors* anchors) nods = anchors_ds_unsupported(ta); nokey = anchors_dnskey_unsupported(ta); if(nods) { - log_nametypeclass(0, "warning: unsupported " + log_nametypeclass(NO_VERBOSE, "warning: unsupported " "algorithm for trust anchor", ta->name, LDNS_RR_TYPE_DS, ta->dclass); } if(nokey) { - log_nametypeclass(0, "warning: unsupported " + log_nametypeclass(NO_VERBOSE, "warning: unsupported " "algorithm for trust anchor", ta->name, LDNS_RR_TYPE_DNSKEY, ta->dclass); } diff --git a/validator/val_secalgo.c b/validator/val_secalgo.c index 0613316c908843d7cd440e3a1ec99d6ff29f542c..5e02f6bdbad228ed5fa0e9c61bb5ecac3ab788c4 100644 --- a/validator/val_secalgo.c +++ b/validator/val_secalgo.c @@ -326,8 +326,10 @@ setup_dsa_sig(unsigned char** sig, unsigned int* len) #ifdef HAVE_DSA_SIG_SET0 if(!DSA_SIG_set0(dsasig, R, S)) return 0; #else +# ifndef S_SPLINT_S dsasig->r = R; dsasig->s = S; +# endif /* S_SPLINT_S */ #endif *sig = NULL; newlen = i2d_DSA_SIG(dsasig, sig); @@ -1725,7 +1727,7 @@ _verify_nettle_ecdsa(sldns_buffer* buf, unsigned int digest_size, unsigned char* { uint8_t digest[SHA256_DIGEST_SIZE]; mpz_t x, y; - nettle_ecc_point_init(&pubkey, &nettle_secp_256r1); + nettle_ecc_point_init(&pubkey, nettle_get_secp_256r1()); nettle_mpz_init_set_str_256_u(x, SHA256_DIGEST_SIZE, key); nettle_mpz_init_set_str_256_u(y, SHA256_DIGEST_SIZE, key+SHA256_DIGEST_SIZE); nettle_mpz_set_str_256_u(signature.r, SHA256_DIGEST_SIZE, sigblock); @@ -1742,7 +1744,7 @@ _verify_nettle_ecdsa(sldns_buffer* buf, unsigned int digest_size, unsigned char* { uint8_t digest[SHA384_DIGEST_SIZE]; mpz_t x, y; - nettle_ecc_point_init(&pubkey, &nettle_secp_384r1); + nettle_ecc_point_init(&pubkey, nettle_get_secp_384r1()); nettle_mpz_init_set_str_256_u(x, SHA384_DIGEST_SIZE, key); nettle_mpz_init_set_str_256_u(y, SHA384_DIGEST_SIZE, key+SHA384_DIGEST_SIZE); nettle_mpz_set_str_256_u(signature.r, SHA384_DIGEST_SIZE, sigblock); diff --git a/validator/val_sigcrypt.c b/validator/val_sigcrypt.c index cfa3eadcf6a0f9639519193c61d8440a18ddf8e1..33d206de8d7f2560c21282e386a993cae321bf6d 100644 --- a/validator/val_sigcrypt.c +++ b/validator/val_sigcrypt.c @@ -1225,11 +1225,11 @@ sigdate_error(const char* str, int32_t expi, int32_t incep, int32_t now) (unsigned)incep, (unsigned)now); } -/** RFC 1918 comparison, uses unsigned integers, and tries to avoid +/** RFC 1982 comparison, uses unsigned integers, and tries to avoid * compiler optimization (eg. by avoiding a-b<0 comparisons), * this routine matches compare_serial(), for SOA serial number checks */ static int -compare_1918(uint32_t a, uint32_t b) +compare_1982(uint32_t a, uint32_t b) { /* for 32 bit values */ const uint32_t cutoff = ((uint32_t) 1 << (32 - 1)); @@ -1244,9 +1244,9 @@ compare_1918(uint32_t a, uint32_t b) } /** if we know that b is larger than a, return the difference between them, - * that is the distance between them. in RFC1918 arith */ + * that is the distance between them. in RFC1982 arith */ static uint32_t -subtract_1918(uint32_t a, uint32_t b) +subtract_1982(uint32_t a, uint32_t b) { /* for 32 bit values */ const uint32_t cutoff = ((uint32_t) 1 << (32 - 1)); @@ -1286,18 +1286,18 @@ check_dates(struct val_env* ve, uint32_t unow, } else now = unow; /* check them */ - if(compare_1918(incep, expi) > 0) { + if(compare_1982(incep, expi) > 0) { sigdate_error("verify: inception after expiration, " "signature bad", expi, incep, now); *reason = "signature inception after expiration"; return 0; } - if(compare_1918(incep, now) > 0) { + if(compare_1982(incep, now) > 0) { /* within skew ? (calc here to avoid calculation normally) */ - uint32_t skew = subtract_1918(incep, expi)/10; + uint32_t skew = subtract_1982(incep, expi)/10; if(skew < (uint32_t)ve->skew_min) skew = ve->skew_min; if(skew > (uint32_t)ve->skew_max) skew = ve->skew_max; - if(subtract_1918(now, incep) > skew) { + if(subtract_1982(now, incep) > skew) { sigdate_error("verify: signature bad, current time is" " before inception date", expi, incep, now); *reason = "signature before inception date"; @@ -1306,11 +1306,11 @@ check_dates(struct val_env* ve, uint32_t unow, sigdate_error("verify warning suspicious signature inception " " or bad local clock", expi, incep, now); } - if(compare_1918(now, expi) > 0) { - uint32_t skew = subtract_1918(incep, expi)/10; + if(compare_1982(now, expi) > 0) { + uint32_t skew = subtract_1982(incep, expi)/10; if(skew < (uint32_t)ve->skew_min) skew = ve->skew_min; if(skew > (uint32_t)ve->skew_max) skew = ve->skew_max; - if(subtract_1918(expi, now) > skew) { + if(subtract_1982(expi, now) > skew) { sigdate_error("verify: signature expired", expi, incep, now); *reason = "signature expired"; diff --git a/validator/validator.c b/validator/validator.c index fa8d5419a80aadf4cbe8aeb97765c5019082f314..4c560a8e1de1787fcb24222386f6eee96df12b6a 100644 --- a/validator/validator.c +++ b/validator/validator.c @@ -2242,7 +2242,7 @@ processFinished(struct module_qstate* qstate, struct val_qstate* vq, !qstate->env->cfg->val_log_squelch) { if(qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail) - log_query_info(0, "validation failure", + log_query_info(NO_VERBOSE, "validation failure", &qstate->qinfo); else { char* err = errinf_to_str_bogus(qstate);