summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2014-05-14 18:43:20 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2014-05-14 18:43:20 +0000
commitf61d78fb42d2662643e7f0dbdcb97adbc2589dbc (patch)
tree9b915379eafaa12682f45d6cb1f41e94fcb12a36
parent697291b66c481c617cf9875497e2189bc4a4b096 (diff)
downloadsrc-test2-f61d78fb42d2662643e7f0dbdcb97adbc2589dbc.tar.gz
src-test2-f61d78fb42d2662643e7f0dbdcb97adbc2589dbc.zip
import unbound 1.4.21vendor/unbound/1.4.21
Notes
Notes: svn path=/vendor/unbound/dist/; revision=266075 svn path=/vendor/unbound/1.4.21/; revision=266076; tag=vendor/unbound/1.4.21
-rw-r--r--Makefile.in19
-rw-r--r--acx_nlnetlabs.m441
-rw-r--r--acx_pthread.m4280
-rw-r--r--ax_pthread.m4317
-rw-r--r--compat/snprintf.c1770
-rw-r--r--config.h.in7
-rwxr-xr-xconfigure273
-rw-r--r--configure.ac26
-rw-r--r--daemon/cachedump.c47
-rw-r--r--daemon/remote.c68
-rw-r--r--daemon/unbound.c3
-rw-r--r--daemon/worker.c18
-rw-r--r--doc/Changelog153
-rw-r--r--doc/FEATURES1
-rw-r--r--doc/README2
-rw-r--r--doc/example.conf.in47
-rw-r--r--doc/libunbound.3.in9
-rw-r--r--doc/unbound-anchor.8.in2
-rw-r--r--doc/unbound-checkconf.8.in2
-rw-r--r--doc/unbound-control.8.in12
-rw-r--r--doc/unbound-host.12
-rw-r--r--doc/unbound.8.in4
-rw-r--r--doc/unbound.conf.5.in9
-rw-r--r--iterator/iter_delegpt.c29
-rw-r--r--iterator/iter_delegpt.h30
-rw-r--r--iterator/iter_fwd.c14
-rw-r--r--iterator/iter_fwd.h10
-rw-r--r--iterator/iter_priv.c48
-rw-r--r--iterator/iter_priv.h2
-rw-r--r--iterator/iter_scrub.c16
-rw-r--r--iterator/iter_utils.c18
-rw-r--r--iterator/iter_utils.h2
-rw-r--r--iterator/iterator.c66
-rw-r--r--libunbound/context.c2
-rw-r--r--libunbound/context.h2
-rw-r--r--libunbound/libunbound.c61
-rw-r--r--libunbound/libworker.c8
-rw-r--r--libunbound/unbound.h40
-rw-r--r--services/cache/dns.c40
-rw-r--r--services/cache/dns.h8
-rw-r--r--services/cache/infra.c22
-rw-r--r--services/cache/infra.h18
-rw-r--r--services/cache/rrset.c12
-rw-r--r--services/cache/rrset.h10
-rw-r--r--services/listen_dnsport.c5
-rw-r--r--services/localzone.c10
-rw-r--r--services/mesh.c22
-rw-r--r--services/mesh.h2
-rw-r--r--services/outside_network.c24
-rw-r--r--services/outside_network.h2
-rw-r--r--smallapp/unbound-anchor.c10
-rw-r--r--smallapp/unbound-control.c2
-rw-r--r--testcode/fake_event.c8
-rw-r--r--testcode/petal.c48
-rw-r--r--testcode/replay.c10
-rw-r--r--testcode/replay.h2
-rw-r--r--testcode/streamtcp.166
-rw-r--r--testcode/streamtcp.c2
-rw-r--r--testcode/unitmain.c4
-rw-r--r--testcode/unitmsgparse.c4
-rw-r--r--testcode/unitneg.c2
-rw-r--r--testcode/unitverify.c4
-rw-r--r--testdata/autotrust_revtp_use.rpl12
-rw-r--r--testdata/iter_fwdfirstequal.rpl157
-rw-r--r--testdata/iter_privaddr.rpl39
-rw-r--r--testdata/iter_stublastresort.rpl259
-rw-r--r--testdata/nss_compile.tpkgbin1049 -> 1055 bytes
-rw-r--r--testdata/val_cnametonsec.rpl36
-rw-r--r--testdata/val_cnametooptin.rpl36
-rw-r--r--util/config_file.c40
-rw-r--r--util/config_file.h5
-rw-r--r--util/configlexer.c3019
-rw-r--r--util/configlexer.lex64
-rw-r--r--util/configparser.c990
-rw-r--r--util/configparser.h6
-rw-r--r--util/configparser.y10
-rw-r--r--util/data/msgencode.c16
-rw-r--r--util/data/msgencode.h4
-rw-r--r--util/data/msgparse.h4
-rw-r--r--util/data/msgreply.c14
-rw-r--r--util/data/msgreply.h12
-rw-r--r--util/data/packed_rrset.c14
-rw-r--r--util/data/packed_rrset.h12
-rw-r--r--util/iana_ports.inc16
-rw-r--r--util/log.c6
-rw-r--r--util/log.h2
-rw-r--r--util/mini_event.c4
-rw-r--r--util/mini_event.h4
-rw-r--r--util/module.h4
-rw-r--r--util/netevent.c10
-rw-r--r--util/netevent.h2
-rw-r--r--util/storage/lookup3.c26
-rw-r--r--util/tube.c2
-rw-r--r--util/winsock_event.c18
-rw-r--r--util/winsock_event.h4
-rw-r--r--validator/autotrust.c84
-rw-r--r--validator/autotrust.h6
-rw-r--r--validator/val_anchor.c4
-rw-r--r--validator/val_kcache.c2
-rw-r--r--validator/val_kcache.h2
-rw-r--r--validator/val_kentry.c10
-rw-r--r--validator/val_kentry.h12
-rw-r--r--validator/val_neg.c16
-rw-r--r--validator/val_neg.h4
-rw-r--r--validator/val_nsec.c2
-rw-r--r--validator/val_nsec.h2
-rw-r--r--validator/val_nsec3.c2
-rw-r--r--validator/val_secalgo.c14
-rw-r--r--validator/val_sigcrypt.c15
-rw-r--r--validator/val_sigcrypt.h4
-rw-r--r--validator/val_utils.c8
-rw-r--r--validator/validator.c2
112 files changed, 5219 insertions, 3614 deletions
diff --git a/Makefile.in b/Makefile.in
index 0064341462c0..bb1643010ee1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -30,6 +30,9 @@ PYTHONMOD_INSTALL=@PYTHONMOD_INSTALL@
PYTHONMOD_UNINSTALL=@PYTHONMOD_UNINSTALL@
PYUNBOUND_INSTALL=@PYUNBOUND_INSTALL@
PYUNBOUND_UNINSTALL=@PYUNBOUND_UNINSTALL@
+UNBOUND_VERSION_MAJOR=@UNBOUND_VERSION_MAJOR@
+UNBOUND_VERSION_MINOR=@UNBOUND_VERSION_MINOR@
+UNBOUND_VERSION_MICRO=@UNBOUND_VERSION_MICRO@
ALLTARGET=@ALLTARGET@
# _unbound.la if pyunbound enabled.
@@ -275,7 +278,7 @@ test: unittest$(EXEEXT) testbound$(EXEEXT)
longtest: tests
if test -x "`which bash`"; then bash testcode/do-tests.sh; else sh testcode/do-tests.sh; fi
-lib: libunbound.la
+lib: libunbound.la unbound.h
libunbound.la: $(LIBUNBOUND_OBJ_LINK)
$(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath $(libdir) -lssl $(LIBS)
@@ -340,6 +343,9 @@ delayer$(EXEEXT): $(DELAYER_OBJ_LINK)
harvest$(EXEEXT): $(HARVEST_OBJ_LINK) libunbound.la
$(LINK) -o $@ $(HARVEST_OBJ_LINK) $(LIBS) -L. -L.libs -lunbound
+unbound.h: $(srcdir)/libunbound/unbound.h
+ sed -e 's/@''UNBOUND_VERSION_MAJOR@/$(UNBOUND_VERSION_MAJOR)/' -e 's/@''UNBOUND_VERSION_MINOR@/$(UNBOUND_VERSION_MINOR)/' -e 's/@''UNBOUND_VERSION_MICRO@/$(UNBOUND_VERSION_MICRO)/' < $(srcdir)/libunbound/unbound.h > $@
+
unbound-control-setup: $(srcdir)/smallapp/unbound-control-setup.sh
sed -e 's:^DESTDIR=.*$$:DESTDIR=$(UNBOUND_RUN_DIR):' < $(srcdir)/smallapp/unbound-control-setup.sh > $@
-chmod +x $@
@@ -367,8 +373,8 @@ pythonmod/interface.h: $(srcdir)/pythonmod/interface.i config.h
$(SWIG) $(CPPFLAGS) -o $@ -python $(srcdir)/pythonmod/interface.i
libunbound_wrap.lo libunbound_wrap.o: libunbound/python/libunbound_wrap.c \
- $(srcdir)/libunbound/unbound.h
-libunbound/python/libunbound_wrap.c: $(srcdir)/libunbound/python/libunbound.i $(srcdir)/libunbound/unbound.h
+ unbound.h
+libunbound/python/libunbound_wrap.c: $(srcdir)/libunbound/python/libunbound.i unbound.h
@-if test ! -d libunbound/python; then $(INSTALL) -d libunbound/python; fi
$(SWIG) -python -o $@ $(CPPFLAGS) $(srcdir)/libunbound/python/libunbound.i
@@ -391,7 +397,7 @@ util/configparser.c util/configparser.h: $(srcdir)/util/configparser.y
clean:
rm -f *.o *.d *.lo *~ tags
- rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la
+ rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la unbound.h
rm -f $(ALL_SRC:.c=.lint)
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
@@ -466,6 +472,7 @@ install: all $(PYTHONMOD_INSTALL) $(PYUNBOUND_INSTALL)
$(INSTALL) -c -m 644 doc/unbound.8 $(DESTDIR)$(mandir)/man8
$(INSTALL) -c -m 644 doc/unbound-checkconf.8 $(DESTDIR)$(mandir)/man8
$(INSTALL) -c -m 644 doc/unbound-control.8 $(DESTDIR)$(mandir)/man8
+ $(INSTALL) -c -m 644 doc/unbound-control.8 $(DESTDIR)$(mandir)/man8/unbound-control-setup.8
$(INSTALL) -c -m 644 doc/unbound-anchor.8 $(DESTDIR)$(mandir)/man8
$(INSTALL) -c -m 644 doc/unbound.conf.5 $(DESTDIR)$(mandir)/man5
$(INSTALL) -c -m 644 $(srcdir)/doc/unbound-host.1 $(DESTDIR)$(mandir)/man1
@@ -482,7 +489,7 @@ install: all $(PYTHONMOD_INSTALL) $(PYUNBOUND_INSTALL)
done
$(INSTALL) -c -m 755 unbound-control-setup $(DESTDIR)$(sbindir)/unbound-control-setup
if test ! -e $(DESTDIR)$(configfile); then $(INSTALL) -d `dirname $(DESTDIR)$(configfile)`; $(INSTALL) -c -m 644 doc/example.conf $(DESTDIR)$(configfile); fi
- $(LIBTOOL) --mode=install cp $(srcdir)/libunbound/unbound.h $(DESTDIR)$(includedir)/unbound.h
+ $(LIBTOOL) --mode=install cp unbound.h $(DESTDIR)$(includedir)/unbound.h
$(LIBTOOL) --mode=install cp libunbound.la $(DESTDIR)$(libdir)
$(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
@@ -495,7 +502,7 @@ pyunbound-uninstall:
uninstall: $(PYTHONMOD_UNINSTALL) $(PYUNBOUND_UNINSTALL)
rm -f -- $(DESTDIR)$(sbindir)/unbound$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-checkconf$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-host$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-control$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-anchor$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-control-setup
- rm -f -- $(DESTDIR)$(mandir)/man8/unbound.8 $(DESTDIR)$(mandir)/man8/unbound-checkconf.8 $(DESTDIR)$(mandir)/man5/unbound.conf.5 $(DESTDIR)$(mandir)/man8/unbound-control.8 $(DESTDIR)$(mandir)/man8/unbound-anchor.8
+ rm -f -- $(DESTDIR)$(mandir)/man8/unbound.8 $(DESTDIR)$(mandir)/man8/unbound-checkconf.8 $(DESTDIR)$(mandir)/man5/unbound.conf.5 $(DESTDIR)$(mandir)/man8/unbound-control.8 $(DESTDIR)$(mandir)/man8/unbound-anchor.8 $(DESTDIR)$(mandir)/man8/unbound-control-setup.8
rm -f -- $(DESTDIR)$(mandir)/man1/unbound-host.1 $(DESTDIR)$(mandir)/man3/libunbound.3
for mpage in ub_ctx ub_result ub_ctx_create ub_ctx_delete \
ub_ctx_set_option ub_ctx_get_option ub_ctx_config ub_ctx_set_fwd \
diff --git a/acx_nlnetlabs.m4 b/acx_nlnetlabs.m4
index e90c81ea02ab..90f1315bb6a8 100644
--- a/acx_nlnetlabs.m4
+++ b/acx_nlnetlabs.m4
@@ -2,7 +2,11 @@
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
# BSD licensed.
#
-# Version 21
+# Version 25
+# 2013-07-18 Enable ACX_CHECK_COMPILER_FLAG to test for -Wstrict-prototypes
+# 2013-06-25 FLTO has --disable-flto option.
+# 2013-05-03 Update W32_SLEEP for newer mingw that links but not defines it.
+# 2013-03-22 Fix ACX_RSRC_VERSION for long version numbers.
# 2012-02-09 Fix AHX_MEMCMP_BROKEN with undef in compat/memcmp.h.
# 2012-01-20 Fix COMPILER_FLAGS_UNBOUND for gcc 4.6.2 assigned-not-used-warns.
# 2011-12-05 Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
@@ -101,7 +105,7 @@ dnl Calculate comma separated windows-resource numbers from package version.
dnl Picks the first three(,0) or four numbers out of the name.
dnl $1: variable for the result
AC_DEFUN([ACX_RSRC_VERSION],
-[$1=[`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*$/\1,\2,\3,0/' `]
+[$1=[`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' `]
])
dnl Routine to help check for compiler flags.
@@ -116,7 +120,7 @@ AC_MSG_CHECKING(whether $CC supports -$1)
cache=`echo $1 | sed 'y%.=/+-%___p_%'`
AC_CACHE_VAL(cv_prog_cc_flag_$cache,
[
-echo 'void f(){}' >conftest.c
+echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -$1 -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -405,19 +409,22 @@ int test() {
dnl Check if CC supports -flto.
dnl in a way that supports clang and suncc (that flag does something else,
dnl but fails to link). It sets it in CFLAGS if it works.
-AC_DEFUN([ACX_CHECK_FLTO],
-[AC_MSG_CHECKING([if $CC supports -flto])
-BAKCFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -flto"
-AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
- if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
- CFLAGS="$BAKCFLAGS"
- AC_MSG_RESULT(no)
- else
- AC_MSG_RESULT(yes)
- fi
- rm -f conftest conftest.c conftest.o
-], [CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)])
+AC_DEFUN([ACX_CHECK_FLTO], [
+ AC_ARG_ENABLE([flto], AS_HELP_STRING([--disable-flto], [Disable link-time optimization]))
+ AS_IF([test "x$enable_flto" != "xno"], [
+ AC_MSG_CHECKING([if $CC supports -flto])
+ BAKCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -flto"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
+ if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
+ CFLAGS="$BAKCFLAGS"
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ fi
+ rm -f conftest conftest.c conftest.o
+ ], [CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)])
+ ])
])
dnl Check the printf-format attribute (if any)
@@ -1208,7 +1215,7 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result);
dnl provide w32 compat definition for sleep
AC_DEFUN([AHX_CONFIG_W32_SLEEP],
[
-#ifndef HAVE_SLEEP
+#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
#define sleep(x) Sleep((x)*1000) /* on win32 */
#endif /* HAVE_SLEEP */
])
diff --git a/acx_pthread.m4 b/acx_pthread.m4
deleted file mode 100644
index 7ac8ffddc5b7..000000000000
--- a/acx_pthread.m4
+++ /dev/null
@@ -1,280 +0,0 @@
-##### http://autoconf-archive.cryp.to/acx_pthread.html
-#
-# SYNOPSIS
-#
-# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-#
-# DESCRIPTION
-#
-# This macro figures out how to build C programs using POSIX threads.
-# It sets the PTHREAD_LIBS output variable to the threads library and
-# linker flags, and the PTHREAD_CFLAGS output variable to any special
-# C compiler flags that are needed. (The user can also force certain
-# compiler flags/libs to be tested by setting these environment
-# variables.)
-#
-# Also sets PTHREAD_CC to any special C compiler that is needed for
-# multi-threaded programs (defaults to the value of CC otherwise).
-# (This is necessary on AIX to use the special cc_r compiler alias.)
-#
-# NOTE: You are assumed to not only compile your program with these
-# flags, but also link it with them as well. e.g. you should link
-# with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
-# $LIBS
-#
-# If you are only building threads programs, you may wish to use
-# these variables in your default LIBS, CFLAGS, and CC:
-#
-# LIBS="$PTHREAD_LIBS $LIBS"
-# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-# CC="$PTHREAD_CC"
-#
-# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
-# constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
-# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-#
-# ACTION-IF-FOUND is a list of shell commands to run if a threads
-# library is found, and ACTION-IF-NOT-FOUND is a list of commands to
-# run it if it is not found. If ACTION-IF-FOUND is not specified, the
-# default action will define HAVE_PTHREAD.
-#
-# Please let the authors know if this macro fails on any platform, or
-# if you have any other suggestions or comments. This macro was based
-# on work by SGJ on autoconf scripts for FFTW (http://www.fftw.org/)
-# (with help from M. Frigo), as well as ac_pthread and hb_pthread
-# macros posted by Alejandro Forero Cuervo to the autoconf macro
-# repository. We are also grateful for the helpful feedback of
-# numerous users.
-#
-# LAST MODIFICATION
-#
-# 2006-05-29
-#
-# COPYLEFT
-#
-# Copyright (c) 2006 Steven G. Johnson <stevenj@alum.mit.edu>
-#
-# 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 the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-#
-# As a special exception, the respective Autoconf Macro's copyright
-# owner gives unlimited permission to copy, distribute and modify the
-# configure scripts that are the output of Autoconf when processing
-# the Macro. You need not follow the terms of the GNU General Public
-# License when using or distributing such scripts, even though
-# portions of the text of the Macro appear in them. The GNU General
-# Public License (GPL) does govern all other use of the material that
-# constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the
-# Autoconf Macro released by the Autoconf Macro Archive. When you
-# make and distribute a modified version of the Autoconf Macro, you
-# may extend this special exception to the GPL to apply to your
-# modified version as well.
-
-AC_DEFUN([ACX_PTHREAD], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_SAVE
-AC_LANG_C
-acx_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
- AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
- AC_MSG_RESULT($acx_pthread_ok)
- if test x"$acx_pthread_ok" = xno; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# ... -mt is also the pthreads flag for HP/aCC
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case "${host_cpu}-${host_os}" in
- *solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthreads/-mt/
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
-
- acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
- ;;
-esac
-
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
-
- case $flag in
- none)
- AC_MSG_CHECKING([whether pthreads work without any flags])
- ;;
-
- -*)
- AC_MSG_CHECKING([whether pthreads work with $flag])
- PTHREAD_CFLAGS="$flag"
- ;;
-
- pthread-config)
- AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
- if test x"$acx_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- AC_MSG_CHECKING([for the pthreads library -l$flag])
- PTHREAD_LIBS="-l$flag"
- ;;
- esac
-
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
- AC_TRY_LINK([#include <pthread.h>],
- [pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
- [acx_pthread_ok=yes])
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- AC_MSG_RESULT($acx_pthread_ok)
- if test "x$acx_pthread_ok" = xyes; then
- break;
- fi
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- AC_MSG_CHECKING([for joinable pthread attribute])
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
- [attr_name=$attr; break])
- done
- AC_MSG_RESULT($attr_name)
- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
- AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
- [Define to necessary symbol if this constant
- uses a non-standard name on your system.])
- fi
-
- AC_MSG_CHECKING([if more special flags are required for pthreads])
- flag=no
- case "${host_cpu}-${host_os}" in
- *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
- *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
- esac
- AC_MSG_RESULT(${flag})
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- # More AIX lossage: must compile with xlc_r or cc_r
- if test x"$GCC" != xyes; then
- AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
- else
- PTHREAD_CC=$CC
- fi
-else
- PTHREAD_CC="$CC"
-fi
-
-AC_SUBST(PTHREAD_LIBS)
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_CC)
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
- ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
- :
-else
- acx_pthread_ok=no
- $2
-fi
-AC_LANG_RESTORE
-])dnl ACX_PTHREAD
diff --git a/ax_pthread.m4 b/ax_pthread.m4
new file mode 100644
index 000000000000..47fe233b20fa
--- /dev/null
+++ b/ax_pthread.m4
@@ -0,0 +1,317 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+# This macro figures out how to build C programs using POSIX threads. It
+# sets the PTHREAD_LIBS output variable to the threads library and linker
+# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
+# flags that are needed. (The user can also force certain compiler
+# flags/libs to be tested by setting these environment variables.)
+#
+# Also sets PTHREAD_CC to any special C compiler that is needed for
+# multi-threaded programs (defaults to the value of CC otherwise). (This
+# is necessary on AIX to use the special cc_r compiler alias.)
+#
+# NOTE: You are assumed to not only compile your program with these flags,
+# but also link it with them as well. e.g. you should link with
+# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+#
+# If you are only building threads programs, you may wish to use these
+# variables in your default LIBS, CFLAGS, and CC:
+#
+# LIBS="$PTHREAD_LIBS $LIBS"
+# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CC="$PTHREAD_CC"
+#
+# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
+# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
+# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
+# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
+# PTHREAD_CFLAGS.
+#
+# ACTION-IF-FOUND is a list of shell commands to run if a threads library
+# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
+# is not found. If ACTION-IF-FOUND is not specified, the default action
+# will define HAVE_PTHREAD.
+#
+# Please let the authors know if this macro fails on any platform, or if
+# you have any other suggestions or comments. This macro was based on work
+# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
+# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
+# Alejandro Forero Cuervo to the autoconf macro repository. We are also
+# grateful for the helpful feedback of numerous users.
+#
+# Updated for Autoconf 2.68 by Daniel Richard G.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
+#
+# 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 the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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 <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 20
+
+AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
+AC_DEFUN([AX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_PUSH([C])
+ax_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+ AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
+ AC_MSG_RESULT($ax_pthread_ok)
+ if test x"$ax_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case ${host_os} in
+ solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+
+ ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
+ ;;
+
+ darwin*)
+ ax_pthread_flags="-pthread $ax_pthread_flags"
+ ;;
+esac
+
+if test x"$ax_pthread_ok" = xno; then
+for flag in $ax_pthread_flags; do
+
+ case $flag in
+ none)
+ AC_MSG_CHECKING([whether pthreads work without any flags])
+ ;;
+
+ -*)
+ AC_MSG_CHECKING([whether pthreads work with $flag])
+ PTHREAD_CFLAGS="$flag"
+ ;;
+
+ pthread-config)
+ AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
+ if test x"$ax_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ AC_MSG_CHECKING([for the pthreads library -l$flag])
+ PTHREAD_LIBS="-l$flag"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
+ static void routine(void *a) { *((int*)a) = 0; }
+ static void *start_routine(void *a) { return a; }],
+ [pthread_t th; pthread_attr_t attr;
+ pthread_create(&th, 0, start_routine, 0);
+ pthread_join(th, 0);
+ pthread_attr_init(&attr);
+ pthread_cleanup_push(routine, 0);
+ pthread_cleanup_pop(0) /* ; */])],
+ [ax_pthread_ok=yes],
+ [])
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ AC_MSG_RESULT($ax_pthread_ok)
+ if test "x$ax_pthread_ok" = xyes; then
+ break;
+ fi
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$ax_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ AC_MSG_CHECKING([for joinable pthread attribute])
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+ [int attr = $attr; return attr /* ; */])],
+ [attr_name=$attr; break],
+ [])
+ done
+ AC_MSG_RESULT($attr_name)
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+ AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+ [Define to necessary symbol if this constant
+ uses a non-standard name on your system.])
+ fi
+
+ AC_MSG_CHECKING([if more special flags are required for pthreads])
+ flag=no
+ case ${host_os} in
+ aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
+ osf* | hpux*) flag="-D_REENTRANT";;
+ solaris*)
+ if test "$GCC" = "yes"; then
+ flag="-D_REENTRANT"
+ else
+ flag="-mt -D_REENTRANT"
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT(${flag})
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
+
+ AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
+ ax_cv_PTHREAD_PRIO_INHERIT, [
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
+ [ax_cv_PTHREAD_PRIO_INHERIT=yes],
+ [ax_cv_PTHREAD_PRIO_INHERIT=no])
+ ])
+ AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
+ AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ # More AIX lossage: compile with *_r variant
+ if test "x$GCC" != xyes; then
+ case $host_os in
+ aix*)
+ AS_CASE(["x/$CC"],
+ [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
+ [#handle absolute path differently from PATH based program lookup
+ AS_CASE(["x$CC"],
+ [x/*],
+ [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
+ [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
+ ;;
+ esac
+ fi
+fi
+
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$ax_pthread_ok" = xyes; then
+ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+ :
+else
+ ax_pthread_ok=no
+ $2
+fi
+AC_LANG_POP
+])dnl AX_PTHREAD
diff --git a/compat/snprintf.c b/compat/snprintf.c
index b736175199eb..65959309c9cc 100644
--- a/compat/snprintf.c
+++ b/compat/snprintf.c
@@ -1,792 +1,1036 @@
-#include <config.h>
-
-#ifndef HAVE_SNPRINTF
+/* snprintf - compatibility implementation of snprintf, vsnprintf
+ *
+ * Copyright (c) 2013, NLnet Labs. All rights reserved.
+ *
+ * This software is open source.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of the NLNET LABS nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "config.h"
+#include <stdio.h>
#include <ctype.h>
-#include <sys/types.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <errno.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
-/* Define this as a fall through, HAVE_STDARG_H is probably already set */
+/* for test */
+/* #define SNPRINTF_TEST 1 */
+#ifdef SNPRINTF_TEST
+#define snprintf my_snprintf
+#define vsnprintf my_vsnprintf
+#endif /* SNPRINTF_TEST */
-#define HAVE_VARARGS_H
+int snprintf(char* str, size_t size, const char* format, ...);
+int vsnprintf(char* str, size_t size, const char* format, va_list arg);
-/**************************************************************
- * Original:
- * Patrick Powell Tue Apr 11 09:48:21 PDT 1995
- * A bombproof version of doprnt (dopr) included.
- * Sigh. This sort of thing is always nasty do deal with. Note that
- * the version here does not include floating point...
- *
- * snprintf() is used instead of sprintf() as it does limit checks
- * for string length. This covers a nasty loophole.
+/**
+ * Very portable snprintf implementation, limited in functionality,
+ * esp. for %[capital] %[nonportable] and so on. Reduced float functionality,
+ * mostly in formatting and range (e+-16), for %f and %g.
*
- * The other functions are there to prevent NULL pointers from
- * causing nast effects.
- *
- * More Recently:
- * Brandon Long (blong@fiction.net) 9/15/96 for mutt 0.43
- * This was ugly. It is still ugly. I opted out of floating point
- * numbers, but the formatter understands just about everything
- * from the normal C string format, at least as far as I can tell from
- * the Solaris 2.5 printf(3S) man page.
- *
- * Brandon Long (blong@fiction.net) 10/22/97 for mutt 0.87.1
- * Ok, added some minimal floating point support, which means this
- * probably requires libm on most operating systems. Don't yet
- * support the exponent (e,E) and sigfig (g,G). Also, fmtint()
- * was pretty badly broken, it just wasn't being exercised in ways
- * which showed it, so that's been fixed. Also, formated the code
- * to mutt conventions, and removed dead code left over from the
- * original. Also, there is now a builtin-test, just compile with:
- * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
- * and run snprintf for results.
- *
- * Wouter Wijngaards(wouter@nlnetlabs.nl) 2/09/2010 for unbound.
- * Limited support for %g. Does not do the exponents for the before-dot.
- *
- **************************************************************/
+ * %s, %d, %u, %i, %x, %c, %n and %% are fully supported.
+ * This includes width, precision, flags 0- +, and *(arg for wid,prec).
+ * %f, %g, %m, %p have reduced support, support for wid,prec,flags,*, but
+ * less floating point range, no %e formatting for %g.
+ */
+int snprintf(char* str, size_t size, const char* format, ...)
+{
+ int r;
+ va_list args;
+ va_start(args, format);
+ r = vsnprintf(str, size, format, args);
+ va_end(args);
+ return r;
+}
+/** add padding to string */
+static void
+print_pad(char** at, size_t* left, int* ret, char p, int num)
+{
+ while(num--) {
+ if(*left > 1) {
+ *(*at)++ = p;
+ (*left)--;
+ }
+ (*ret)++;
+ }
+}
-/* varargs declarations: */
+/** get negative symbol, 0 if none */
+static char
+get_negsign(int negative, int plus, int space)
+{
+ if(negative)
+ return '-';
+ if(plus)
+ return '+';
+ if(space)
+ return ' ';
+ return 0;
+}
-#if defined(HAVE_STDARG_H)
-# include <stdarg.h>
-# define HAVE_STDARGS /* let's hope that works everywhere (mj) */
-# define VA_LOCAL_DECL va_list ap
-# define VA_START(f) va_start(ap, f)
-# define VA_SHIFT(v,t) ; /* no-op for ANSI */
-# define VA_END va_end(ap)
-#else
-# if defined(HAVE_VARARGS_H)
-# include <varargs.h>
-# undef HAVE_STDARGS
-# define VA_LOCAL_DECL va_list ap
-# define VA_START(f) va_start(ap) /* f is ignored! */
-# define VA_SHIFT(v,t) v = va_arg(ap,t)
-# define VA_END va_end(ap)
-# else
-/*XX ** NO VARARGS ** XX*/
-# endif
-#endif
+#define PRINT_DEC_BUFSZ 32 /* 20 is enough for 64 bit decimals */
+/** print decimal into buffer, returns length */
+static int
+print_dec(char* buf, int max, unsigned int value)
+{
+ int i = 0;
+ if(value == 0) {
+ if(max > 0) {
+ buf[0] = '0';
+ i = 1;
+ }
+ } else while(value && i < max) {
+ buf[i++] = '0' + value % 10;
+ value /= 10;
+ }
+ return i;
+}
-int snprintf (char *str, size_t count, const char *fmt, ...);
-int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
+/** print long decimal into buffer, returns length */
+static int
+print_dec_l(char* buf, int max, unsigned long value)
+{
+ int i = 0;
+ if(value == 0) {
+ if(max > 0) {
+ buf[0] = '0';
+ i = 1;
+ }
+ } else while(value && i < max) {
+ buf[i++] = '0' + value % 10;
+ value /= 10;
+ }
+ return i;
+}
-static void dopr (char *buffer, size_t maxlen, const char *format,
- va_list args);
-static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
- char *value, int flags, int min, int max);
-static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
- long value, int base, int min, int max, int flags);
-static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
- long double fvalue, int min, int max, int flags, int conv);
-static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c );
+/** print long decimal into buffer, returns length */
+static int
+print_dec_ll(char* buf, int max, unsigned long long value)
+{
+ int i = 0;
+ if(value == 0) {
+ if(max > 0) {
+ buf[0] = '0';
+ i = 1;
+ }
+ } else while(value && i < max) {
+ buf[i++] = '0' + value % 10;
+ value /= 10;
+ }
+ return i;
+}
-int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
+/** print hex into buffer, returns length */
+static int
+print_hex(char* buf, int max, unsigned int value)
{
- str[0] = 0;
- dopr(str, count, fmt, args);
- return(strlen(str));
+ const char* h = "0123456789abcdef";
+ int i = 0;
+ if(value == 0) {
+ if(max > 0) {
+ buf[0] = '0';
+ i = 1;
+ }
+ } else while(value && i < max) {
+ buf[i++] = h[value & 0x0f];
+ value >>= 4;
+ }
+ return i;
}
-/* VARARGS3 */
-#ifdef HAVE_STDARGS
-int snprintf (char *str,size_t count,const char *fmt,...)
+/** print long hex into buffer, returns length */
+static int
+print_hex_l(char* buf, int max, unsigned long value)
+{
+ const char* h = "0123456789abcdef";
+ int i = 0;
+ if(value == 0) {
+ if(max > 0) {
+ buf[0] = '0';
+ i = 1;
+ }
+ } else while(value && i < max) {
+ buf[i++] = h[value & 0x0f];
+ value >>= 4;
+ }
+ return i;
+}
+
+/** print long long hex into buffer, returns length */
+static int
+print_hex_ll(char* buf, int max, unsigned long long value)
+{
+ const char* h = "0123456789abcdef";
+ int i = 0;
+ if(value == 0) {
+ if(max > 0) {
+ buf[0] = '0';
+ i = 1;
+ }
+ } else while(value && i < max) {
+ buf[i++] = h[value & 0x0f];
+ value >>= 4;
+ }
+ return i;
+}
+
+/** copy string into result, reversed */
+static void
+spool_str_rev(char** at, size_t* left, int* ret, const char* buf, int len)
+{
+ int i = len;
+ while(i) {
+ if(*left > 1) {
+ *(*at)++ = buf[--i];
+ (*left)--;
+ } else --i;
+ (*ret)++;
+ }
+}
+
+/** copy string into result */
+static void
+spool_str(char** at, size_t* left, int* ret, const char* buf, int len)
+{
+ int i;
+ for(i=0; i<len; i++) {
+ if(*left > 1) {
+ *(*at)++ = buf[i];
+ (*left)--;
+ }
+ (*ret)++;
+ }
+}
+
+/** print number formatted */
+static void
+print_num(char** at, size_t* left, int* ret, int minw, int precision,
+ int prgiven, int zeropad, int minus, int plus, int space,
+ int zero, int negative, char* buf, int len)
+{
+ int w = len; /* excludes minus sign */
+ char s = get_negsign(negative, plus, space);
+ if(minus) {
+ /* left adjust the number into the field, space padding */
+ /* calc numw = [sign][zeroes][number] */
+ int numw = w;
+ if(precision == 0 && zero) numw = 0;
+ if(numw < precision) numw = precision;
+ if(s) numw++;
+
+ /* sign */
+ if(s) print_pad(at, left, ret, s, 1);
+
+ /* number */
+ if(precision == 0 && zero) {
+ /* "" for the number */
+ } else {
+ if(w < precision)
+ print_pad(at, left, ret, '0', precision - w);
+ spool_str_rev(at, left, ret, buf, len);
+ }
+ /* spaces */
+ if(numw < minw)
+ print_pad(at, left, ret, ' ', minw - numw);
+ } else {
+ /* pad on the left of the number */
+ /* calculate numw has width of [sign][zeroes][number] */
+ int numw = w;
+ if(precision == 0 && zero) numw = 0;
+ if(numw < precision) numw = precision;
+ if(!prgiven && zeropad && numw < minw) numw = minw;
+ else if(s) numw++;
+
+ /* pad with spaces */
+ if(numw < minw)
+ print_pad(at, left, ret, ' ', minw - numw);
+ /* print sign (and one less zeropad if so) */
+ if(s) {
+ print_pad(at, left, ret, s, 1);
+ numw--;
+ }
+ /* pad with zeroes */
+ if(w < numw)
+ print_pad(at, left, ret, '0', numw - w);
+ if(precision == 0 && zero)
+ return;
+ /* print the characters for the value */
+ spool_str_rev(at, left, ret, buf, len);
+ }
+}
+
+/** print %d and %i */
+static void
+print_num_d(char** at, size_t* left, int* ret, int value,
+ int minw, int precision, int prgiven, int zeropad, int minus,
+ int plus, int space)
+{
+ char buf[PRINT_DEC_BUFSZ];
+ int negative = (value < 0);
+ int zero = (value == 0);
+ int len = print_dec(buf, (int)sizeof(buf),
+ (unsigned int)(negative?-value:value));
+ print_num(at, left, ret, minw, precision, prgiven, zeropad, minus,
+ plus, space, zero, negative, buf, len);
+}
+
+/** print %ld and %li */
+static void
+print_num_ld(char** at, size_t* left, int* ret, long value,
+ int minw, int precision, int prgiven, int zeropad, int minus,
+ int plus, int space)
+{
+ char buf[PRINT_DEC_BUFSZ];
+ int negative = (value < 0);
+ int zero = (value == 0);
+ int len = print_dec_l(buf, (int)sizeof(buf),
+ (unsigned long)(negative?-value:value));
+ print_num(at, left, ret, minw, precision, prgiven, zeropad, minus,
+ plus, space, zero, negative, buf, len);
+}
+
+/** print %lld and %lli */
+static void
+print_num_lld(char** at, size_t* left, int* ret, long long value,
+ int minw, int precision, int prgiven, int zeropad, int minus,
+ int plus, int space)
+{
+ char buf[PRINT_DEC_BUFSZ];
+ int negative = (value < 0);
+ int zero = (value == 0);
+ int len = print_dec_ll(buf, (int)sizeof(buf),
+ (unsigned long long)(negative?-value:value));
+ print_num(at, left, ret, minw, precision, prgiven, zeropad, minus,
+ plus, space, zero, negative, buf, len);
+}
+
+/** print %u */
+static void
+print_num_u(char** at, size_t* left, int* ret, unsigned int value,
+ int minw, int precision, int prgiven, int zeropad, int minus,
+ int plus, int space)
+{
+ char buf[PRINT_DEC_BUFSZ];
+ int negative = 0;
+ int zero = (value == 0);
+ int len = print_dec(buf, (int)sizeof(buf), value);
+ print_num(at, left, ret, minw, precision, prgiven, zeropad, minus,
+ plus, space, zero, negative, buf, len);
+}
+
+/** print %lu */
+static void
+print_num_lu(char** at, size_t* left, int* ret, unsigned long value,
+ int minw, int precision, int prgiven, int zeropad, int minus,
+ int plus, int space)
+{
+ char buf[PRINT_DEC_BUFSZ];
+ int negative = 0;
+ int zero = (value == 0);
+ int len = print_dec_l(buf, (int)sizeof(buf), value);
+ print_num(at, left, ret, minw, precision, prgiven, zeropad, minus,
+ plus, space, zero, negative, buf, len);
+}
+
+/** print %llu */
+static void
+print_num_llu(char** at, size_t* left, int* ret, unsigned long long value,
+ int minw, int precision, int prgiven, int zeropad, int minus,
+ int plus, int space)
+{
+ char buf[PRINT_DEC_BUFSZ];
+ int negative = 0;
+ int zero = (value == 0);
+ int len = print_dec_ll(buf, (int)sizeof(buf), value);
+ print_num(at, left, ret, minw, precision, prgiven, zeropad, minus,
+ plus, space, zero, negative, buf, len);
+}
+
+/** print %x */
+static void
+print_num_x(char** at, size_t* left, int* ret, unsigned int value,
+ int minw, int precision, int prgiven, int zeropad, int minus,
+ int plus, int space)
+{
+ char buf[PRINT_DEC_BUFSZ];
+ int negative = 0;
+ int zero = (value == 0);
+ int len = print_hex(buf, (int)sizeof(buf), value);
+ print_num(at, left, ret, minw, precision, prgiven, zeropad, minus,
+ plus, space, zero, negative, buf, len);
+}
+
+/** print %lx */
+static void
+print_num_lx(char** at, size_t* left, int* ret, unsigned long value,
+ int minw, int precision, int prgiven, int zeropad, int minus,
+ int plus, int space)
+{
+ char buf[PRINT_DEC_BUFSZ];
+ int negative = 0;
+ int zero = (value == 0);
+ int len = print_hex_l(buf, (int)sizeof(buf), value);
+ print_num(at, left, ret, minw, precision, prgiven, zeropad, minus,
+ plus, space, zero, negative, buf, len);
+}
+
+/** print %llx */
+static void
+print_num_llx(char** at, size_t* left, int* ret, unsigned long long value,
+ int minw, int precision, int prgiven, int zeropad, int minus,
+ int plus, int space)
+{
+ char buf[PRINT_DEC_BUFSZ];
+ int negative = 0;
+ int zero = (value == 0);
+ int len = print_hex_ll(buf, (int)sizeof(buf), value);
+ print_num(at, left, ret, minw, precision, prgiven, zeropad, minus,
+ plus, space, zero, negative, buf, len);
+}
+
+/** print %llp */
+static void
+print_num_llp(char** at, size_t* left, int* ret, void* value,
+ int minw, int precision, int prgiven, int zeropad, int minus,
+ int plus, int space)
+{
+ char buf[PRINT_DEC_BUFSZ];
+ int negative = 0;
+ int zero = (value == 0);
+#if defined(UINTPTR_MAX) && defined(UINT32_MAX) && (UINTPTR_MAX == UINT32_MAX)
+ /* avoid warning about upcast on 32bit systems */
+ unsigned long long llvalue = (unsigned long)value;
#else
-int snprintf (va_alist) va_dcl
+ unsigned long long llvalue = (unsigned long long)value;
#endif
+ int len = print_hex_ll(buf, (int)sizeof(buf), llvalue);
+ if(zero) {
+ buf[0]=')';
+ buf[1]='l';
+ buf[2]='i';
+ buf[3]='n';
+ buf[4]='(';
+ len = 5;
+ } else {
+ /* put '0x' in front of the (reversed) buffer result */
+ if(len < PRINT_DEC_BUFSZ)
+ buf[len++] = 'x';
+ if(len < PRINT_DEC_BUFSZ)
+ buf[len++] = '0';
+ }
+ print_num(at, left, ret, minw, precision, prgiven, zeropad, minus,
+ plus, space, zero, negative, buf, len);
+}
+
+#define PRINT_FLOAT_BUFSZ 64 /* xx.yy with 20.20 about the max */
+/** spool remainder after the decimal point to buffer, in reverse */
+static int
+print_remainder(char* buf, int max, double r, int prec)
{
-#ifndef HAVE_STDARGS
- char *str;
- size_t count;
- char *fmt;
-#endif
- VA_LOCAL_DECL;
-
- VA_START (fmt);
- VA_SHIFT (str, char *);
- VA_SHIFT (count, size_t );
- VA_SHIFT (fmt, char *);
- (void) vsnprintf(str, count, fmt, ap);
- VA_END;
- return(strlen(str));
-}
-
-/*
- * dopr(): poor man's version of doprintf
- */
+ unsigned long long cap = 1;
+ unsigned long long value;
+ int len, i;
+ if(prec > 19) prec = 19; /* max we can do */
+ if(max < prec) return 0;
+ for(i=0; i<prec; i++) {
+ cap *= 10;
+ }
+ r *= (double)cap;
+ value = (unsigned long long)r;
+ /* see if we need to round up */
+ if(((unsigned long long)((r - (double)value)*10.0)) >= 5) {
+ value++;
+ /* that might carry to numbers before the comma, if so,
+ * just ignore that rounding. failure because 64bitprintout */
+ if(value >= cap)
+ value = cap-1;
+ }
+ len = print_dec_ll(buf, max, value);
+ while(len < prec) { /* pad with zeroes, e.g. if 0.0012 */
+ buf[len++] = '0';
+ }
+ if(len < max)
+ buf[len++] = '.';
+ return len;
+}
-/* format read states */
-#define DP_S_DEFAULT 0
-#define DP_S_FLAGS 1
-#define DP_S_MIN 2
-#define DP_S_DOT 3
-#define DP_S_MAX 4
-#define DP_S_MOD 5
-#define DP_S_CONV 6
-#define DP_S_DONE 7
-
-/* format flags - Bits */
-#define DP_F_MINUS 1
-#define DP_F_PLUS 2
-#define DP_F_SPACE 4
-#define DP_F_NUM 8
-#define DP_F_ZERO 16
-#define DP_F_UP 32
-
-/* Conversion Flags */
-#define DP_C_SHORT 1
-#define DP_C_LONG 2
-#define DP_C_LDOUBLE 3
-
-#define char_to_int(p) (p - '0')
-#ifndef MAX
-#define MAX(p,q) ((p >= q) ? p : q)
-#endif
+/** spool floating point to buffer */
+static int
+print_float(char* buf, int max, double value, int prec)
+{
+ /* as xxx.xxx if prec==0, no '.', with prec decimals after . */
+ /* no conversion for NAN and INF, because we do not want to require
+ linking with -lm. */
+ /* Thus, the conversions use 64bit integers to convert the numbers,
+ * which makes 19 digits before and after the decimal point the max */
+ unsigned long long whole = (unsigned long long)value;
+ double remain = value - (double)whole;
+ int len = 0;
+ if(prec != 0)
+ len = print_remainder(buf, max, remain, prec);
+ len += print_dec_ll(buf+len, max-len, whole);
+ return len;
+}
-static void dopr (char *buffer, size_t maxlen, const char *format, va_list args)
-{
- char ch;
- long value;
- long double fvalue;
- char *strvalue;
- int min;
- int max;
- int state;
- int flags;
- int cflags;
- size_t currlen;
-
- state = DP_S_DEFAULT;
- currlen = flags = cflags = min = 0;
- max = -1;
- ch = *format++;
-
- while (state != DP_S_DONE)
- {
- if ((ch == '\0') || (currlen >= maxlen))
- state = DP_S_DONE;
-
- switch(state)
- {
- case DP_S_DEFAULT:
- if (ch == '%')
- state = DP_S_FLAGS;
- else
- dopr_outch (buffer, &currlen, maxlen, ch);
- ch = *format++;
- break;
- case DP_S_FLAGS:
- switch (ch)
- {
- case '-':
- flags |= DP_F_MINUS;
- ch = *format++;
- break;
- case '+':
- flags |= DP_F_PLUS;
- ch = *format++;
- break;
- case ' ':
- flags |= DP_F_SPACE;
- ch = *format++;
- break;
- case '#':
- flags |= DP_F_NUM;
- ch = *format++;
- break;
- case '0':
- flags |= DP_F_ZERO;
- ch = *format++;
- break;
- default:
- state = DP_S_MIN;
- break;
- }
- break;
- case DP_S_MIN:
- if (isdigit(ch))
- {
- min = 10*min + char_to_int (ch);
- ch = *format++;
- }
- else if (ch == '*')
- {
- min = va_arg (args, int);
- ch = *format++;
- state = DP_S_DOT;
- }
- else
- state = DP_S_DOT;
- break;
- case DP_S_DOT:
- if (ch == '.')
- {
- state = DP_S_MAX;
- ch = *format++;
- }
- else
- state = DP_S_MOD;
- break;
- case DP_S_MAX:
- if (isdigit(ch))
- {
- if (max < 0)
- max = 0;
- max = 10*max + char_to_int (ch);
- ch = *format++;
- }
- else if (ch == '*')
- {
- max = va_arg (args, int);
- ch = *format++;
- state = DP_S_MOD;
- }
- else
- state = DP_S_MOD;
- break;
- case DP_S_MOD:
- /* Currently, we don't support Long Long, bummer */
- switch (ch)
- {
- case 'h':
- cflags = DP_C_SHORT;
- ch = *format++;
- break;
- case 'l':
- cflags = DP_C_LONG;
- ch = *format++;
- break;
- case 'L':
- cflags = DP_C_LDOUBLE;
- ch = *format++;
- break;
- default:
- break;
- }
- state = DP_S_CONV;
- break;
- case DP_S_CONV:
- switch (ch)
- {
- case 'd':
- case 'i':
- if (cflags == DP_C_SHORT)
- value = va_arg (args, int);
- else if (cflags == DP_C_LONG)
- value = va_arg (args, long int);
- else
- value = va_arg (args, int);
- fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
- break;
- case 'o':
- flags &= ~DP_F_PLUS;
- if (cflags == DP_C_SHORT)
- value = va_arg (args, unsigned int);
- else if (cflags == DP_C_LONG)
- value = va_arg (args, unsigned long int);
- else
- value = va_arg (args, unsigned int);
- fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags);
- break;
- case 'u':
- flags &= ~DP_F_PLUS;
- if (cflags == DP_C_SHORT)
- value = va_arg (args, unsigned int);
- else if (cflags == DP_C_LONG)
- value = va_arg (args, unsigned long int);
- else
- value = va_arg (args, unsigned int);
- fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
- break;
- case 'X':
- flags |= DP_F_UP;
- case 'x':
- flags &= ~DP_F_PLUS;
- if (cflags == DP_C_SHORT)
- value = va_arg (args, unsigned int);
- else if (cflags == DP_C_LONG)
- value = va_arg (args, unsigned long int);
- else
- value = va_arg (args, unsigned int);
- fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags);
- break;
- case 'f':
- if (cflags == DP_C_LDOUBLE)
- fvalue = va_arg (args, long double);
- else
- fvalue = va_arg (args, double);
- /* um, floating point? */
- fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags, 'f');
- break;
- case 'E':
- flags |= DP_F_UP;
- case 'e':
- if (cflags == DP_C_LDOUBLE)
- fvalue = va_arg (args, long double);
- else
- fvalue = va_arg (args, double);
- break;
- case 'G':
- flags |= DP_F_UP;
- case 'g':
- if (cflags == DP_C_LDOUBLE)
- fvalue = va_arg (args, long double);
- else
- fvalue = va_arg (args, double);
- fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags, 'g');
- break;
- case 'c':
- dopr_outch (buffer, &currlen, maxlen, va_arg (args, int));
- break;
- case 's':
- strvalue = va_arg (args, char *);
- if (max < 0)
- max = maxlen; /* ie, no max */
- fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max);
- break;
- case 'p':
- strvalue = va_arg (args, void *);
- fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags);
- break;
- case 'n':
- if (cflags == DP_C_SHORT)
- {
- short int *num;
- num = va_arg (args, short int *);
- *num = currlen;
- }
- else if (cflags == DP_C_LONG)
- {
- long int *num;
- num = va_arg (args, long int *);
- *num = currlen;
- }
- else
- {
- int *num;
- num = va_arg (args, int *);
- *num = currlen;
- }
- break;
- case '%':
- dopr_outch (buffer, &currlen, maxlen, ch);
- break;
- case 'w':
- /* not supported yet, treat as next char */
- ch = *format++;
- break;
- default:
- /* Unknown, skip */
- break;
- }
- ch = *format++;
- state = DP_S_DEFAULT;
- flags = cflags = min = 0;
- max = -1;
- break;
- case DP_S_DONE:
- break;
- default:
- /* hmm? */
- break; /* some picky compilers need this */
- }
- }
- if (currlen < maxlen - 1)
- buffer[currlen] = '\0';
- else
- buffer[maxlen - 1] = '\0';
-}
-
-static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
- char *value, int flags, int min, int max)
-{
- int padlen, strln; /* amount to pad */
- int cnt = 0;
-
- if (value == 0)
- {
- value = "<NULL>";
- }
-
- for (strln = 0; value[strln]; ++strln); /* strlen */
- padlen = min - strln;
- if (padlen < 0)
- padlen = 0;
- if (flags & DP_F_MINUS)
- padlen = -padlen; /* Left Justify */
-
- while ((padlen > 0) && (cnt < max))
- {
- dopr_outch (buffer, currlen, maxlen, ' ');
- --padlen;
- ++cnt;
- }
- while (*value && (cnt < max))
- {
- dopr_outch (buffer, currlen, maxlen, *value++);
- ++cnt;
- }
- while ((padlen < 0) && (cnt < max))
- {
- dopr_outch (buffer, currlen, maxlen, ' ');
- ++padlen;
- ++cnt;
- }
-}
-
-/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */
-
-static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
- long value, int base, int min, int max, int flags)
-{
- int signvalue = 0;
- unsigned long uvalue;
- char convert[20];
- int place = 0;
- int spadlen = 0; /* amount to space pad */
- int zpadlen = 0; /* amount to zero pad */
- int caps = 0;
-
- if (max < 0)
- max = 0;
-
- uvalue = value;
- if( value < 0 ) {
- signvalue = '-';
- uvalue = -value;
- }
- else
- if (flags & DP_F_PLUS) /* Do a sign (+/i) */
- signvalue = '+';
- else
- if (flags & DP_F_SPACE)
- signvalue = ' ';
-
- if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
-
- do {
- convert[place++] =
- (caps? "0123456789ABCDEF":"0123456789abcdef")
- [uvalue % (unsigned)base ];
- uvalue = (uvalue / (unsigned)base );
- } while(uvalue && (place < 20));
- if (place == 20) place--;
- convert[place] = 0;
-
- zpadlen = max - place;
- spadlen = min - MAX (max, place) - (signvalue ? 1 : 0);
- if (zpadlen < 0) zpadlen = 0;
- if (spadlen < 0) spadlen = 0;
- if (flags & DP_F_ZERO)
- {
- zpadlen = MAX(zpadlen, spadlen);
- spadlen = 0;
- }
- if (flags & DP_F_MINUS)
- spadlen = -spadlen; /* Left Justifty */
-
-#ifdef DEBUG_SNPRINTF
- dprint (1, (debugfile, "zpad: %d, spad: %d, min: %d, max: %d, place: %d\n",
- zpadlen, spadlen, min, max, place));
-#endif
+/** print %f */
+static void
+print_num_f(char** at, size_t* left, int* ret, double value,
+ int minw, int precision, int prgiven, int zeropad, int minus,
+ int plus, int space)
+{
+ char buf[PRINT_FLOAT_BUFSZ];
+ int negative = (value < 0);
+ int zero = 0;
+ int len;
+ if(!prgiven) precision = 6;
+ len = print_float(buf, (int)sizeof(buf), negative?-value:value,
+ precision);
+ print_num(at, left, ret, minw, 1, 0, zeropad, minus,
+ plus, space, zero, negative, buf, len);
+}
- /* Spaces */
- while (spadlen > 0)
- {
- dopr_outch (buffer, currlen, maxlen, ' ');
- --spadlen;
- }
-
- /* Sign */
- if (signvalue)
- dopr_outch (buffer, currlen, maxlen, signvalue);
-
- /* Zeros */
- if (zpadlen > 0)
- {
- while (zpadlen > 0)
- {
- dopr_outch (buffer, currlen, maxlen, '0');
- --zpadlen;
- }
- }
-
- /* Digits */
- while (place > 0)
- dopr_outch (buffer, currlen, maxlen, convert[--place]);
-
- /* Left Justified spaces */
- while (spadlen < 0) {
- dopr_outch (buffer, currlen, maxlen, ' ');
- ++spadlen;
- }
-}
-
-static long double abs_val (long double value)
-{
- long double result = value;
-
- if (value < 0)
- result = -value;
-
- return result;
-}
-
-static long double compat_pow10 (int exp)
-{
- long double result = 1;
-
- while (exp)
- {
- result *= 10;
- exp--;
- }
-
- return result;
-}
-
-static long compat_round (long double value)
-{
- long intpart;
-
- intpart = value;
- value = value - intpart;
- if (value >= 0.5)
- intpart++;
-
- return intpart;
-}
-
-static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
- long double fvalue, int min, int max, int flags, int conv)
-{
- int signvalue = 0;
- long double ufvalue;
- char iconvert[20];
- char fconvert[20];
- int iplace = 0;
- int fplace = 0;
- int padlen = 0; /* amount to pad */
- int zpadlen = 0;
- int caps = 0;
- long intpart;
- long fracpart;
-
- /*
- * AIX manpage says the default is 0, but Solaris says the default
- * is 6, and sprintf on AIX defaults to 6
- */
- if (max < 0)
- max = 6;
-
- ufvalue = abs_val (fvalue);
-
- if (fvalue < 0)
- signvalue = '-';
- else
- if (flags & DP_F_PLUS) /* Do a sign (+/i) */
- signvalue = '+';
- else
- if (flags & DP_F_SPACE)
- signvalue = ' ';
-
-#if 0
- if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
-#endif
+/* rudimentary %g support */
+static int
+print_float_g(char* buf, int max, double value, int prec)
+{
+ unsigned long long whole = (unsigned long long)value;
+ double remain = value - (double)whole;
+ int before = 0;
+ int len = 0;
+
+ /* number of digits before the decimal point */
+ while(whole > 0) {
+ before++;
+ whole /= 10;
+ }
+ whole = (unsigned long long)value;
+
+ if(prec > before && remain != 0.0) {
+ /* see if the last decimals are zero, if so, skip them */
+ len = print_remainder(buf, max, remain, prec-before);
+ while(len > 0 && buf[0]=='0') {
+ memmove(buf, buf+1, --len);
+ }
+ }
+ len += print_dec_ll(buf+len, max-len, whole);
+ return len;
+}
- intpart = ufvalue;
- /*
- * Sorry, we only support 9 digits past the decimal because of our
- * conversion method
- */
- if (max > 9)
- max = 9;
+/** print %g */
+static void
+print_num_g(char** at, size_t* left, int* ret, double value,
+ int minw, int precision, int prgiven, int zeropad, int minus,
+ int plus, int space)
+{
+ char buf[PRINT_FLOAT_BUFSZ];
+ int negative = (value < 0);
+ int zero = 0;
+ int len;
+ if(!prgiven) precision = 6;
+ if(precision == 0) precision = 1;
+ len = print_float_g(buf, (int)sizeof(buf), negative?-value:value,
+ precision);
+ print_num(at, left, ret, minw, 1, 0, zeropad, minus,
+ plus, space, zero, negative, buf, len);
+}
- /* We "cheat" by converting the fractional part to integer by
- * multiplying by a factor of 10
- */
- fracpart = compat_round ((compat_pow10 (max)) * (ufvalue - intpart));
- if (fracpart >= compat_pow10 (max))
- {
- intpart++;
- fracpart -= compat_pow10 (max);
- }
+/** strnlen (compat implementation) */
+static int
+my_strnlen(const char* s, int max)
+{
+ int i;
+ for(i=0; i<max; i++)
+ if(s[i]==0)
+ return i;
+ return max;
+}
-#ifdef DEBUG_SNPRINTF
- dprint (1, (debugfile, "fmtfp: %f =? %d.%d\n", fvalue, intpart, fracpart));
-#endif
+/** print %s */
+static void
+print_str(char** at, size_t* left, int* ret, char* s,
+ int minw, int precision, int prgiven, int minus)
+{
+ int w;
+ /* with prec: no more than x characters from this string, stop at 0 */
+ if(prgiven)
+ w = my_strnlen(s, precision);
+ else w = (int)strlen(s); /* up to the nul */
+ if(w < minw && !minus)
+ print_pad(at, left, ret, ' ', minw - w);
+ spool_str(at, left, ret, s, w);
+ if(w < minw && minus)
+ print_pad(at, left, ret, ' ', minw - w);
+}
- /* Convert integer part */
- do {
- iconvert[iplace++] =
- (caps? "0123456789ABCDEF":"0123456789abcdef")[intpart % 10];
- intpart = (intpart / 10);
- } while(intpart && (iplace < 20));
- if (iplace == 20) iplace--;
- iconvert[iplace] = 0;
-
- /* Convert fractional part */
- do {
- fconvert[fplace++] =
- (caps? "0123456789ABCDEF":"0123456789abcdef")[fracpart % 10];
- fracpart = (fracpart / 10);
- if(conv == 'g' && fplace == 1 && fconvert[0] == '0') {
- fplace = 0; /* skip trailing zeroes for %g */
- zpadlen ++;
- }
- } while(fracpart && (fplace < 20));
- if (fplace == 20) fplace--;
- fconvert[fplace] = 0;
-
- if(conv == 'f') {
- /* -1 for decimal point, another -1 if we are printing a sign */
- padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
- zpadlen = max - fplace;
- } else if(conv == 'g') {
- /* zpadlen contains number of trailing zeroes removed */
- padlen = min - iplace - (max-zpadlen) - 1 - ((signvalue) ? 1 : 0);
- if(fplace == 0) {
- padlen += 1; /* add the decimal dot suppressed */
- zpadlen = 0;
- } else zpadlen = (max-zpadlen) - fplace;
- }
- if (zpadlen < 0)
- zpadlen = 0;
- if (padlen < 0)
- padlen = 0;
- if (flags & DP_F_MINUS)
- padlen = -padlen; /* Left Justifty */
-
- if ((flags & DP_F_ZERO) && (padlen > 0))
- {
- if (signvalue)
- {
- dopr_outch (buffer, currlen, maxlen, signvalue);
- --padlen;
- signvalue = 0;
- }
- while (padlen > 0)
- {
- dopr_outch (buffer, currlen, maxlen, '0');
- --padlen;
- }
- }
- while (padlen > 0)
- {
- dopr_outch (buffer, currlen, maxlen, ' ');
- --padlen;
- }
- if (signvalue)
- dopr_outch (buffer, currlen, maxlen, signvalue);
-
- while (iplace > 0)
- dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
-
- /* for %g do not output decimal point if no fraction is present */
- if(conv == 'f' || (conv == 'g' && fplace > 0)) {
- /*
- * Decimal point. This should probably use locale to find the correct
- * char to print out.
- */
- dopr_outch (buffer, currlen, maxlen, '.');
- }
-
- while (zpadlen > 0)
- {
- dopr_outch (buffer, currlen, maxlen, '0');
- --zpadlen;
- }
-
- while (fplace > 0)
- dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
-
- while (padlen < 0)
- {
- dopr_outch (buffer, currlen, maxlen, ' ');
- ++padlen;
- }
-}
-
-static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c)
-{
- if (*currlen < maxlen)
- buffer[(*currlen)++] = c;
-}
-
-#ifdef TEST_SNPRINTF
-#ifndef LONG_STRING
-#define LONG_STRING 1024
-#endif
-int main (void)
-{
- char buf1[LONG_STRING];
- char buf2[LONG_STRING];
- char *fp_fmt[] = {
- "%-1.5f",
- "%1.5f",
- "%123.9f",
- "%10.5f",
- "% 10.5f",
- "%+22.9f",
- "%+4.9f",
- "%01.3f",
- "%4f",
- "%3.1f",
- "%3.2f",
- NULL
- };
- double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996,
- 0.9996, 1.996, 4.136, 0};
- char *int_fmt[] = {
- "%-1.5d",
- "%1.5d",
- "%123.9d",
- "%5.5d",
- "%10.5d",
- "% 10.5d",
- "%+22.33d",
- "%01.3d",
- "%4d",
- NULL
- };
- long int_nums[] = { -1, 134, 91340, 341, 0203, 0};
- int x, y;
- int fail = 0;
- int num = 0;
-
- printf ("Testing snprintf format codes against system sprintf...\n");
-
- for (x = 0; fp_fmt[x] != NULL ; x++)
- for (y = 0; fp_nums[y] != 0 ; y++)
- {
- snprintf (buf1, sizeof (buf1), fp_fmt[x], fp_nums[y]);
- sprintf (buf2, fp_fmt[x], fp_nums[y]);
- if (strcmp (buf1, buf2))
- {
- printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
- fp_fmt[x], buf1, buf2);
- fail++;
- }
- num++;
- }
-
- for (x = 0; int_fmt[x] != NULL ; x++)
- for (y = 0; int_nums[y] != 0 ; y++)
- {
- snprintf (buf1, sizeof (buf1), int_fmt[x], int_nums[y]);
- sprintf (buf2, int_fmt[x], int_nums[y]);
- if (strcmp (buf1, buf2))
- {
- printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
- int_fmt[x], buf1, buf2);
- fail++;
- }
- num++;
- }
- printf ("%d tests failed out of %d.\n", fail, num);
+/** print %c */
+static void
+print_char(char** at, size_t* left, int* ret, int c,
+ int minw, int minus)
+{
+ if(1 < minw && !minus)
+ print_pad(at, left, ret, ' ', minw - 1);
+ print_pad(at, left, ret, c, 1);
+ if(1 < minw && minus)
+ print_pad(at, left, ret, ' ', minw - 1);
+}
+
+
+/**
+ * Print to string.
+ * str: string buffer for result. result will be null terminated.
+ * size: size of the buffer. null is put inside buffer.
+ * format: printf format string.
+ * arg: '...' arguments to print.
+ * returns number of characters. a null is printed after this.
+ * return number of bytes that would have been written
+ * if the buffer had been large enough.
+ *
+ * supported format specifiers:
+ * %s, %u, %d, %x, %i, %f, %g, %c, %p, %n.
+ * length: l, ll (for d, u, x).
+ * precision: 6.6d (for d, u, x)
+ * %f, %g precisions, 0.3f
+ * %20s, '.*s'
+ * and %%.
+ */
+int vsnprintf(char* str, size_t size, const char* format, va_list arg)
+{
+ char* at = str;
+ size_t left = size;
+ int ret = 0;
+ const char* fmt = format;
+ int conv, minw, precision, prgiven, zeropad, minus, plus, space, length;
+ while(*fmt) {
+ /* copy string before % */
+ while(*fmt && *fmt!='%') {
+ if(left > 1) {
+ *at++ = *fmt++;
+ left--;
+ } else fmt++;
+ ret++;
+ }
+
+ /* see if we are at end */
+ if(!*fmt) break;
+
+ /* fetch next argument % designation from format string */
+ fmt++; /* skip the '%' */
+
+ /********************************/
+ /* get the argument designation */
+ /********************************/
+ /* we must do this vararg stuff inside this function for
+ * portability. Hence, get_designation, and print_designation
+ * are not their own functions. */
+
+ /* printout designation:
+ * conversion specifier: x, d, u, s, c, n, m, p
+ * flags: # not supported
+ * 0 zeropad (on the left)
+ * - left adjust (right by default)
+ * ' ' printspace for positive number (in - position).
+ * + alwayssign
+ * fieldwidth: [1-9][0-9]* minimum field width.
+ * if this is * then type int next argument specifies the minwidth.
+ * if this is negative, the - flag is set (with positive width).
+ * precision: period[digits]*, %.2x.
+ * if this is * then type int next argument specifies the precision.
+ * just '.' or negative value means precision=0.
+ * this is mindigits to print for d, i, u, x
+ * this is aftercomma digits for f
+ * this is max number significant digits for g
+ * maxnumber characters to be printed for s
+ * length: 0-none (int), 1-l (long), 2-ll (long long)
+ * notsupported: hh (char), h (short), L (long double), q, j, z, t
+ * Does not support %m$ and *m$ argument designation as array indices.
+ * Does not support %#x
+ *
+ */
+ minw = 0;
+ precision = 1;
+ prgiven = 0;
+ zeropad = 0;
+ minus = 0;
+ plus = 0;
+ space = 0;
+ length = 0;
+
+ /* get flags in any order */
+ for(;;) {
+ if(*fmt == '0')
+ zeropad = 1;
+ else if(*fmt == '-')
+ minus = 1;
+ else if(*fmt == '+')
+ plus = 1;
+ else if(*fmt == ' ')
+ space = 1;
+ else break;
+ fmt++;
+ }
+
+ /* field width */
+ if(*fmt == '*') {
+ fmt++; /* skip char */
+ minw = va_arg(arg, int);
+ if(minw < 0) {
+ minus = 1;
+ minw = -minw;
+ }
+ } else while(*fmt >= '0' && *fmt <= '9') {
+ minw = minw*10 + (*fmt++)-'0';
+ }
+
+ /* precision */
+ if(*fmt == '.') {
+ fmt++; /* skip period */
+ prgiven = 1;
+ precision = 0;
+ if(*fmt == '*') {
+ fmt++; /* skip char */
+ precision = va_arg(arg, int);
+ if(precision < 0)
+ precision = 0;
+ } else while(*fmt >= '0' && *fmt <= '9') {
+ precision = precision*10 + (*fmt++)-'0';
+ }
+ }
+
+ /* length */
+ if(*fmt == 'l') {
+ fmt++; /* skip char */
+ length = 1;
+ if(*fmt == 'l') {
+ fmt++; /* skip char */
+ length = 2;
+ }
+ }
+
+ /* get the conversion */
+ if(!*fmt) conv = 0;
+ else conv = *fmt++;
+
+ /***********************************/
+ /* print that argument designation */
+ /***********************************/
+ switch(conv) {
+ case 'i':
+ case 'd':
+ if(length == 0)
+ print_num_d(&at, &left, &ret, va_arg(arg, int),
+ minw, precision, prgiven, zeropad, minus, plus, space);
+ else if(length == 1)
+ print_num_ld(&at, &left, &ret, va_arg(arg, long),
+ minw, precision, prgiven, zeropad, minus, plus, space);
+ else if(length == 2)
+ print_num_lld(&at, &left, &ret,
+ va_arg(arg, long long),
+ minw, precision, prgiven, zeropad, minus, plus, space);
+ break;
+ case 'u':
+ if(length == 0)
+ print_num_u(&at, &left, &ret,
+ va_arg(arg, unsigned int),
+ minw, precision, prgiven, zeropad, minus, plus, space);
+ else if(length == 1)
+ print_num_lu(&at, &left, &ret,
+ va_arg(arg, unsigned long),
+ minw, precision, prgiven, zeropad, minus, plus, space);
+ else if(length == 2)
+ print_num_llu(&at, &left, &ret,
+ va_arg(arg, unsigned long long),
+ minw, precision, prgiven, zeropad, minus, plus, space);
+ break;
+ case 'x':
+ if(length == 0)
+ print_num_x(&at, &left, &ret,
+ va_arg(arg, unsigned int),
+ minw, precision, prgiven, zeropad, minus, plus, space);
+ else if(length == 1)
+ print_num_lx(&at, &left, &ret,
+ va_arg(arg, unsigned long),
+ minw, precision, prgiven, zeropad, minus, plus, space);
+ else if(length == 2)
+ print_num_llx(&at, &left, &ret,
+ va_arg(arg, unsigned long long),
+ minw, precision, prgiven, zeropad, minus, plus, space);
+ break;
+ case 's':
+ print_str(&at, &left, &ret, va_arg(arg, char*),
+ minw, precision, prgiven, minus);
+ break;
+ case 'c':
+ print_char(&at, &left, &ret, va_arg(arg, int),
+ minw, minus);
+ break;
+ case 'n':
+ *va_arg(arg, int*) = ret;
+ break;
+ case 'm':
+ print_str(&at, &left, &ret, strerror(errno),
+ minw, precision, prgiven, minus);
+ break;
+ case 'p':
+ print_num_llp(&at, &left, &ret, va_arg(arg, void*),
+ minw, precision, prgiven, zeropad, minus, plus, space);
+ break;
+ case '%':
+ print_pad(&at, &left, &ret, '%', 1);
+ break;
+ case 'f':
+ print_num_f(&at, &left, &ret, va_arg(arg, double),
+ minw, precision, prgiven, zeropad, minus, plus, space);
+ break;
+ case 'g':
+ print_num_g(&at, &left, &ret, va_arg(arg, double),
+ minw, precision, prgiven, zeropad, minus, plus, space);
+ break;
+ /* unknown */
+ default:
+ case 0: break;
+ }
+ }
+
+ /* zero terminate */
+ if(left > 0)
+ *at = 0;
+ return ret;
}
-#endif /* SNPRINTF_TEST */
-#endif /* !HAVE_SNPRINTF */
+#ifdef SNPRINTF_TEST
+
+/** do tests */
+#undef snprintf
+#define DOTEST(bufsz, result, retval, ...) do { \
+ char buf[bufsz]; \
+ printf("now test %s\n", #__VA_ARGS__); \
+ int r=my_snprintf(buf, sizeof(buf), __VA_ARGS__); \
+ if(r != retval || strcmp(buf, result) != 0) { \
+ printf("error test(%s) was \"%s\":%d\n", \
+ ""#bufsz", "#result", "#retval", "#__VA_ARGS__, \
+ buf, r); \
+ exit(1); \
+ } \
+ r=snprintf(buf, sizeof(buf), __VA_ARGS__); \
+ if(r != retval || strcmp(buf, result) != 0) { \
+ printf("error test(%s) differs with system, \"%s\":%d\n", \
+ ""#bufsz", "#result", "#retval", "#__VA_ARGS__, \
+ buf, r); \
+ exit(1); \
+ } \
+ printf("test(\"%s\":%d) passed\n", buf, r); \
+ } while(0);
+
+/** test program */
+int main(void)
+{
+ int x = 0;
+
+ /* bufsize, expectedstring, expectedretval, snprintf arguments */
+ DOTEST(1024, "hello", 5, "hello");
+ DOTEST(1024, "h", 1, "h");
+ /* warning from gcc for format string, but it does work
+ * DOTEST(1024, "", 0, ""); */
+
+ DOTEST(3, "he", 5, "hello");
+ DOTEST(1, "", 7, "%d", 7823089);
+
+ /* test positive numbers */
+ DOTEST(1024, "0", 1, "%d", 0);
+ DOTEST(1024, "1", 1, "%d", 1);
+ DOTEST(1024, "9", 1, "%d", 9);
+ DOTEST(1024, "15", 2, "%d", 15);
+ DOTEST(1024, "ab15cd", 6, "ab%dcd", 15);
+ DOTEST(1024, "167", 3, "%d", 167);
+ DOTEST(1024, "7823089", 7, "%d", 7823089);
+ DOTEST(1024, " 12", 3, "%3d", 12);
+ DOTEST(1024, "012", 3, "%.3d", 12);
+ DOTEST(1024, "012", 3, "%3.3d", 12);
+ DOTEST(1024, "012", 3, "%03d", 12);
+ DOTEST(1024, " 012", 4, "%4.3d", 12);
+ DOTEST(1024, "", 0, "%.0d", 0);
+
+ /* test negative numbers */
+ DOTEST(1024, "-1", 2, "%d", -1);
+ DOTEST(1024, "-12", 3, "%3d", -12);
+ DOTEST(1024, " -2", 3, "%3d", -2);
+ DOTEST(1024, "-012", 4, "%.3d", -12);
+ DOTEST(1024, "-012", 4, "%3.3d", -12);
+ DOTEST(1024, "-012", 4, "%4.3d", -12);
+ DOTEST(1024, " -012", 5, "%5.3d", -12);
+ DOTEST(1024, "-12", 3, "%03d", -12);
+ DOTEST(1024, "-02", 3, "%03d", -2);
+ DOTEST(1024, "-15", 3, "%d", -15);
+ DOTEST(1024, "-7307", 5, "%d", -7307);
+ DOTEST(1024, "-12 ", 5, "%-5d", -12);
+ DOTEST(1024, "-00012", 6, "%-.5d", -12);
+
+ /* test + and space flags */
+ DOTEST(1024, "+12", 3, "%+d", 12);
+ DOTEST(1024, " 12", 3, "% d", 12);
+
+ /* test %u */
+ DOTEST(1024, "12", 2, "%u", 12);
+ DOTEST(1024, "0", 1, "%u", 0);
+ DOTEST(1024, "4294967295", 10, "%u", 0xffffffff);
+
+ /* test %x */
+ DOTEST(1024, "0", 1, "%x", 0);
+ DOTEST(1024, "c", 1, "%x", 12);
+ DOTEST(1024, "12ab34cd", 8, "%x", 0x12ab34cd);
+
+ /* test %llu, %lld */
+ DOTEST(1024, "18446744073709551615", 20, "%llu",
+ (long long)0xffffffffffffffff);
+ DOTEST(1024, "-9223372036854775808", 20, "%lld",
+ (long long)0x8000000000000000);
+ DOTEST(1024, "9223372036854775808", 19, "%llu",
+ (long long)0x8000000000000000);
+
+ /* test %s */
+ DOTEST(1024, "hello", 5, "%s", "hello");
+ DOTEST(1024, " hello", 10, "%10s", "hello");
+ DOTEST(1024, "hello ", 10, "%-10s", "hello");
+ DOTEST(1024, "he", 2, "%.2s", "hello");
+ DOTEST(1024, " he", 4, "%4.2s", "hello");
+ DOTEST(1024, " h", 4, "%4.2s", "h");
+
+ /* test %c */
+ DOTEST(1024, "a", 1, "%c", 'a');
+ /* warning from gcc for format string, but it does work
+ DOTEST(1024, " a", 5, "%5c", 'a');
+ DOTEST(1024, "a", 1, "%.0c", 'a'); */
+
+ /* test %n */
+ DOTEST(1024, "hello", 5, "hello%n", &x);
+ if(x != 5) { printf("the %%n failed\n"); exit(1); }
+
+ /* test %m */
+ errno = 0;
+ DOTEST(1024, "Success", 7, "%m");
+
+ /* test %p */
+ DOTEST(1024, "0x10", 4, "%p", (void*)0x10);
+ DOTEST(1024, "(nil)", 5, "%p", (void*)0x0);
+
+ /* test %% */
+ DOTEST(1024, "%", 1, "%%");
+
+ /* test %f */
+ DOTEST(1024, "0.000000", 8, "%f", 0.0);
+ DOTEST(1024, "0.00", 4, "%.2f", 0.0);
+ /* differs, "-0.00" DOTEST(1024, "0.00", 4, "%.2f", -0.0); */
+ DOTEST(1024, "234.00", 6, "%.2f", 234.005);
+ DOTEST(1024, "8973497.1246", 12, "%.4f", 8973497.12456);
+ DOTEST(1024, "-12.000000", 10, "%f", -12.0);
+ DOTEST(1024, "6", 1, "%.0f", 6.0);
+
+ DOTEST(1024, "6", 1, "%g", 6.0);
+ DOTEST(1024, "6.1", 3, "%g", 6.1);
+ DOTEST(1024, "6.15", 4, "%g", 6.15);
+
+ /* These format strings are from the code of NSD, Unbound, ldns */
+
+ DOTEST(1024, "abcdef", 6, "%s", "abcdef");
+ DOTEST(1024, "005", 3, "%03u", 5);
+ DOTEST(1024, "12345", 5, "%03u", 12345);
+ DOTEST(1024, "5", 1, "%d", 5);
+ DOTEST(1024, "(nil)", 5, "%p", NULL);
+ DOTEST(1024, "12345", 5, "%ld", (long)12345);
+ DOTEST(1024, "12345", 5, "%lu", (long)12345);
+ DOTEST(1024, " 12345", 12, "%12u", (unsigned)12345);
+ DOTEST(1024, "12345", 5, "%u", (unsigned)12345);
+ DOTEST(1024, "12345", 5, "%llu", (unsigned long long)12345);
+ DOTEST(1024, "12345", 5, "%x", 0x12345);
+ DOTEST(1024, "12345", 5, "%llx", (long long)0x12345);
+ DOTEST(1024, "012345", 6, "%6.6d", 12345);
+ DOTEST(1024, "012345", 6, "%6.6u", 12345);
+ DOTEST(1024, "1234.54", 7, "%g", 1234.54);
+ DOTEST(1024, "123456789.54", 12, "%.12g", 123456789.54);
+ DOTEST(1024, "3456789123456.54", 16, "%.16g", 3456789123456.54);
+ /* %24g does not work with 24 digits, not enough accuracy,
+ * the first 16 digits are correct */
+ DOTEST(1024, "12345", 5, "%3.3d", 12345);
+ DOTEST(1024, "000", 3, "%3.3d", 0);
+ DOTEST(1024, "001", 3, "%3.3d", 1);
+ DOTEST(1024, "012", 3, "%3.3d", 12);
+ DOTEST(1024, "-012", 4, "%3.3d", -12);
+ DOTEST(1024, "he", 2, "%.2s", "hello");
+ DOTEST(1024, "helloworld", 10, "%s%s", "hello", "world");
+ DOTEST(1024, "he", 2, "%.*s", 2, "hello");
+ DOTEST(1024, " hello", 7, "%*s", 7, "hello");
+ DOTEST(1024, "hello ", 7, "%*s", -7, "hello");
+ DOTEST(1024, "0", 1, "%c", '0');
+ DOTEST(1024, "A", 1, "%c", 'A');
+ DOTEST(1024, "", 1, "%c", 0);
+ DOTEST(1024, "\010", 1, "%c", 8);
+ DOTEST(1024, "%", 1, "%%");
+ DOTEST(1024, "0a", 2, "%02x", 0x0a);
+ DOTEST(1024, "bd", 2, "%02x", 0xbd);
+ DOTEST(1024, "12", 2, "%02ld", (long)12);
+ DOTEST(1024, "02", 2, "%02ld", (long)2);
+ DOTEST(1024, "02", 2, "%02u", (unsigned)2);
+ DOTEST(1024, "765432", 6, "%05u", (unsigned)765432);
+ DOTEST(1024, "10.234", 6, "%0.3f", 10.23421);
+ DOTEST(1024, "123456.234", 10, "%0.3f", 123456.23421);
+ DOTEST(1024, "123456789.234", 13, "%0.3f", 123456789.23421);
+ DOTEST(1024, "123456.23", 9, "%.2f", 123456.23421);
+ DOTEST(1024, "123456", 6, "%.0f", 123456.23421);
+ DOTEST(1024, "0123", 4, "%.4x", 0x0123);
+ DOTEST(1024, "00000123", 8, "%.8x", 0x0123);
+ DOTEST(1024, "ffeb0cde", 8, "%.8x", 0xffeb0cde);
+ DOTEST(1024, " 987654321", 10, "%10lu", (unsigned long)987654321);
+ DOTEST(1024, " 987654321", 12, "%12lu", (unsigned long)987654321);
+ DOTEST(1024, "987654321", 9, "%i", 987654321);
+ DOTEST(1024, "-87654321", 9, "%i", -87654321);
+ DOTEST(1024, "hello ", 16, "%-16s", "hello");
+ DOTEST(1024, " ", 16, "%-16s", "");
+ DOTEST(1024, "a ", 16, "%-16s", "a");
+ DOTEST(1024, "foobarfoobar ", 16, "%-16s", "foobarfoobar");
+ DOTEST(1024, "foobarfoobarfoobar", 18, "%-16s", "foobarfoobarfoobar");
+
+ /* combined expressions */
+ DOTEST(1024, "foo 1.0 size 512 edns", 21,
+ "foo %s size %d %s%s", "1.0", 512, "", "edns");
+ DOTEST(15, "foo 1.0 size 5", 21,
+ "foo %s size %d %s%s", "1.0", 512, "", "edns");
+ DOTEST(1024, "packet 1203ceff id", 18,
+ "packet %2.2x%2.2x%2.2x%2.2x id", 0x12, 0x03, 0xce, 0xff);
+ DOTEST(1024, "/tmp/testbound_123abcd.tmp", 26, "/tmp/testbound_%u%s%s.tmp", 123, "ab", "cd");
+
+ return 0;
+}
+#endif /* SNPRINTF_TEST */
diff --git a/config.h.in b/config.h.in
index 7e1a5a34b079..46f38edf35d4 100644
--- a/config.h.in
+++ b/config.h.in
@@ -220,6 +220,9 @@
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
+/* Have PTHREAD_PRIO_INHERIT. */
+#undef HAVE_PTHREAD_PRIO_INHERIT
+
/* Define to 1 if the system has the type `pthread_rwlock_t'. */
#undef HAVE_PTHREAD_RWLOCK_T
@@ -805,7 +808,7 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result);
#endif
-#ifndef HAVE_SLEEP
+#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
#define sleep(x) Sleep((x)*1000) /* on win32 */
#endif /* HAVE_SLEEP */
@@ -871,8 +874,6 @@ char *strptime(const char *s, const char *format, struct tm *tm);
# endif
#endif /* CHECKED_INET6 */
-/* maximum nesting of included files */
-#define MAXINCLUDES 10
#ifndef HAVE_GETADDRINFO
struct sockaddr_storage;
#include "compat/fake-rfc2553.h"
diff --git a/configure b/configure
index 90deeca297a6..e7aeb8d0e687 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for unbound 1.4.20.
+# Generated by GNU Autoconf 2.69 for unbound 1.4.21.
#
# Report bugs to <unbound-bugs@nlnetlabs.nl>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='unbound'
PACKAGE_TARNAME='unbound'
-PACKAGE_VERSION='1.4.20'
-PACKAGE_STRING='unbound 1.4.20'
+PACKAGE_VERSION='1.4.21'
+PACKAGE_STRING='unbound 1.4.21'
PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl'
PACKAGE_URL=''
@@ -677,7 +677,7 @@ PYTHON_VERSION
PTHREAD_CFLAGS
PTHREAD_LIBS
PTHREAD_CC
-acx_pthread_config
+ax_pthread_config
RUNTIME_PATH
LIBOBJS
OTOOL64
@@ -743,6 +743,9 @@ build
LIBUNBOUND_AGE
LIBUNBOUND_REVISION
LIBUNBOUND_CURRENT
+UNBOUND_VERSION_MICRO
+UNBOUND_VERSION_MINOR
+UNBOUND_VERSION_MAJOR
target_alias
host_alias
build_alias
@@ -794,6 +797,7 @@ with_rootcert_file
with_username
enable_checking
enable_debug
+enable_flto
enable_shared
enable_static
with_pic
@@ -1375,7 +1379,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.4.20 to adapt to many kinds of systems.
+\`configure' configures unbound 1.4.21 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1441,7 +1445,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of unbound 1.4.20:";;
+ short | recursive ) echo "Configuration of unbound 1.4.21:";;
esac
cat <<\_ACEOF
@@ -1451,6 +1455,7 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-checking Enable warnings, asserts, makefile-dependencies
--enable-debug same as enable-checking
+ --disable-flto Disable link-time optimization
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
@@ -1609,7 +1614,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-unbound configure 1.4.20
+unbound configure 1.4.21
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2135,7 +2140,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.4.20, which was
+It was created by unbound $as_me 1.4.21, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2483,10 +2488,16 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+UNBOUND_VERSION_MAJOR=1
-LIBUNBOUND_CURRENT=3
-LIBUNBOUND_REVISION=5
-LIBUNBOUND_AGE=1
+UNBOUND_VERSION_MINOR=4
+
+UNBOUND_VERSION_MICRO=21
+
+
+LIBUNBOUND_CURRENT=4
+LIBUNBOUND_REVISION=1
+LIBUNBOUND_AGE=2
# 1.0.0 had 0:12:0
# 1.0.1 had 0:13:0
# 1.0.2 had 0:14:0
@@ -2521,7 +2532,8 @@ LIBUNBOUND_AGE=1
# 1.4.17 had 3:2:1
# 1.4.18 had 3:3:1
# 1.4.19 had 3:4:1
-# 1.4.20 had 4:0:2 # adds libunbound.ttl
+# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
+# 1.4.21 had 4:1:2
# Current -- the number of the binary API that we're implementing
# Revision -- which iteration of the implementation of the binary
@@ -4139,7 +4151,7 @@ _ACEOF
$as_echo "#define WINVER 0x0502" >>confdefs.h
-wnvs=`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*$/\1,\2,\3,0/' `
+wnvs=`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' `
cat >>confdefs.h <<_ACEOF
@@ -4246,7 +4258,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
$as_echo_n "(cached) " >&6
else
-echo 'void f(){}' >conftest.c
+echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -4277,7 +4289,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
$as_echo_n "(cached) " >&6
else
-echo 'void f(){}' >conftest.c
+echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -4867,7 +4879,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
$as_echo_n "(cached) " >&6
else
-echo 'void f(){}' >conftest.c
+echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -4898,7 +4910,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
$as_echo_n "(cached) " >&6
else
-echo 'void f(){}' >conftest.c
+echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -4931,7 +4943,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
$as_echo_n "(cached) " >&6
else
-echo 'void f(){}' >conftest.c
+echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -4962,7 +4974,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
$as_echo_n "(cached) " >&6
else
-echo 'void f(){}' >conftest.c
+echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -5629,7 +5641,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
$as_echo_n "(cached) " >&6
else
-echo 'void f(){}' >conftest.c
+echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -5660,7 +5672,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
$as_echo_n "(cached) " >&6
else
-echo 'void f(){}' >conftest.c
+echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -5691,7 +5703,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
$as_echo_n "(cached) " >&6
else
-echo 'void f(){}' >conftest.c
+echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -5722,7 +5734,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
$as_echo_n "(cached) " >&6
else
-echo 'void f(){}' >conftest.c
+echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -5752,11 +5764,19 @@ $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
# nothing to do.
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
+
+ # Check whether --enable-flto was given.
+if test "${enable_flto+set}" = set; then :
+ enableval=$enable_flto;
+fi
+
+ if test "x$enable_flto" != "xno"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
$as_echo_n "checking if $CC supports -flto... " >&6; }
-BAKCFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -flto"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ BAKCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -flto"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5769,15 +5789,15 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
- CFLAGS="$BAKCFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
+ CFLAGS="$BAKCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- fi
- rm -f conftest conftest.c conftest.o
+ fi
+ rm -f conftest conftest.c conftest.o
else
CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -5786,6 +5806,8 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
@@ -15070,14 +15092,13 @@ ub_have_pthreads=no
if test x_$withval != x_no; then
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-acx_pthread_ok=no
+ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
@@ -15112,13 +15133,13 @@ return pthread_join ();
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- acx_pthread_ok=yes
+ ax_pthread_ok=yes
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
- if test x"$acx_pthread_ok" = xno; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+$as_echo "$ax_pthread_ok" >&6; }
+ if test x"$ax_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
@@ -15136,7 +15157,7 @@ fi
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
@@ -15158,8 +15179,8 @@ acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -m
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
-case "${host_cpu}-${host_os}" in
- *solaris*)
+case ${host_os} in
+ solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
@@ -15169,12 +15190,16 @@ case "${host_cpu}-${host_os}" in
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
- acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+ ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
+ ;;
+
+ darwin*)
+ ax_pthread_flags="-pthread $ax_pthread_flags"
;;
esac
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
+if test x"$ax_pthread_ok" = xno; then
+for flag in $ax_pthread_flags; do
case $flag in
none)
@@ -15188,16 +15213,16 @@ $as_echo_n "checking whether pthreads work with $flag... " >&6; }
PTHREAD_CFLAGS="$flag"
;;
- pthread-config)
- # Extract the first word of "pthread-config", so it can be a program name with args.
+ pthread-config)
+ # Extract the first word of "pthread-config", so it can be a program name with args.
set dummy pthread-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_prog_acx_pthread_config+:} false; then :
+if ${ac_cv_prog_ax_pthread_config+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -n "$acx_pthread_config"; then
- ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
+ if test -n "$ax_pthread_config"; then
+ ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -15206,7 +15231,7 @@ do
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_prog_acx_pthread_config="yes"
+ ac_cv_prog_ax_pthread_config="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -15214,23 +15239,23 @@ done
done
IFS=$as_save_IFS
- test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
+ test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
fi
fi
-acx_pthread_config=$ac_cv_prog_acx_pthread_config
-if test -n "$acx_pthread_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
-$as_echo "$acx_pthread_config" >&6; }
+ax_pthread_config=$ac_cv_prog_ax_pthread_config
+if test -n "$ax_pthread_config"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
+$as_echo "$ax_pthread_config" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
- if test x"$acx_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
+ if test x"$ax_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
@@ -15256,18 +15281,23 @@ $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
+ static void routine(void *a) { *((int*)a) = 0; }
+ static void *start_routine(void *a) { return a; }
int
main ()
{
-pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+pthread_t th; pthread_attr_t attr;
+ pthread_create(&th, 0, start_routine, 0);
+ pthread_join(th, 0);
+ pthread_attr_init(&attr);
+ pthread_cleanup_push(routine, 0);
+ pthread_cleanup_pop(0) /* ; */
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- acx_pthread_ok=yes
+ ax_pthread_ok=yes
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -15275,9 +15305,9 @@ rm -f core conftest.err conftest.$ac_objext \
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
- if test "x$acx_pthread_ok" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+$as_echo "$ax_pthread_ok" >&6; }
+ if test "x$ax_pthread_ok" = xyes; then
break;
fi
@@ -15287,24 +15317,24 @@ done
fi
# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
+if test "x$ax_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
$as_echo_n "checking for joinable pthread attribute... " >&6; }
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
main ()
{
-int attr=$attr; return attr;
+int attr = $attr; return attr /* ; */
;
return 0;
}
@@ -15314,7 +15344,7 @@ if ac_fn_c_try_link "$LINENO"; then :
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- done
+ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
$as_echo "$attr_name" >&6; }
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
@@ -15328,9 +15358,16 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
flag=no
- case "${host_cpu}-${host_os}" in
- *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
- *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+ case ${host_os} in
+ aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
+ osf* | hpux*) flag="-D_REENTRANT";;
+ solaris*)
+ if test "$GCC" = "yes"; then
+ flag="-D_REENTRANT"
+ else
+ flag="-mt -D_REENTRANT"
+ fi
+ ;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
$as_echo "${flag}" >&6; }
@@ -15338,12 +15375,58 @@ $as_echo "${flag}" >&6; }
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
+$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <pthread.h>
+int
+main ()
+{
+int i = PTHREAD_PRIO_INHERIT;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ax_cv_PTHREAD_PRIO_INHERIT=yes
+else
+ ax_cv_PTHREAD_PRIO_INHERIT=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
+$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
+ if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
+
+$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
+
+fi
+
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
- # More AIX lossage: must compile with xlc_r or cc_r
- if test x"$GCC" != xyes; then
- for ac_prog in xlc_r cc_r
+ # More AIX lossage: compile with *_r variant
+ if test "x$GCC" != xyes; then
+ case $host_os in
+ aix*)
+ case "x/$CC" in #(
+ x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
+ #handle absolute path differently from PATH based program lookup
+ case "x$CC" in #(
+ x/*) :
+ if as_fn_executable_p ${CC}_r; then :
+ PTHREAD_CC="${CC}_r"
+fi ;; #(
+ *) :
+ for ac_prog in ${CC}_r
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -15384,21 +15467,25 @@ fi
test -n "$PTHREAD_CC" && break
done
-test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
-
- else
- PTHREAD_CC=$CC
- fi
-else
- PTHREAD_CC="$CC"
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+ ;;
+esac ;; #(
+ *) :
+ ;;
+esac
+ ;;
+ esac
+ fi
fi
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
+if test x"$ax_pthread_ok" = xyes; then
$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
@@ -15431,7 +15518,7 @@ fi
:
else
- acx_pthread_ok=no
+ ax_pthread_ok=no
fi
ac_ext=c
@@ -15525,7 +15612,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
$as_echo_n "(cached) " >&6
else
-echo 'void f(){}' >conftest.c
+echo 'void f(void){}' >conftest.c
if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
eval "cv_prog_cc_flag_$cache=yes"
else
@@ -18690,7 +18777,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.4.20, which was
+This file was extended by unbound $as_me 1.4.21, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -18756,7 +18843,7 @@ _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.4.20
+unbound config.status 1.4.21
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 1f3ac92252c6..8c83fdd7e5b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,15 +2,22 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.56)
sinclude(acx_nlnetlabs.m4)
-sinclude(acx_pthread.m4)
+sinclude(ax_pthread.m4)
sinclude(acx_python.m4)
sinclude(ac_pkg_swig.m4)
-AC_INIT(unbound, 1.4.20, unbound-bugs@nlnetlabs.nl, unbound)
-
-LIBUNBOUND_CURRENT=3
-LIBUNBOUND_REVISION=5
-LIBUNBOUND_AGE=1
+# must be numbers. ac_defun because of later processing
+m4_define([VERSION_MAJOR],[1])
+m4_define([VERSION_MINOR],[4])
+m4_define([VERSION_MICRO],[21])
+AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound)
+AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR])
+AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR])
+AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO])
+
+LIBUNBOUND_CURRENT=4
+LIBUNBOUND_REVISION=1
+LIBUNBOUND_AGE=2
# 1.0.0 had 0:12:0
# 1.0.1 had 0:13:0
# 1.0.2 had 0:14:0
@@ -45,7 +52,8 @@ LIBUNBOUND_AGE=1
# 1.4.17 had 3:2:1
# 1.4.18 had 3:3:1
# 1.4.19 had 3:4:1
-# 1.4.20 had 4:0:2 # adds libunbound.ttl
+# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
+# 1.4.21 had 4:1:2
# Current -- the number of the binary API that we're implementing
# Revision -- which iteration of the implementation of the binary
@@ -384,7 +392,7 @@ AC_ARG_WITH(pthreads, AC_HELP_STRING([--with-pthreads],
[ ],[ withval="yes" ])
ub_have_pthreads=no
if test x_$withval != x_no; then
- ACX_PTHREAD([
+ AX_PTHREAD([
AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
@@ -1206,8 +1214,6 @@ char *strptime(const char *s, const char *format, struct tm *tm);
# endif
#endif /* CHECKED_INET6 */
-/* maximum nesting of included files */
-#define MAXINCLUDES 10
#ifndef HAVE_GETADDRINFO
struct sockaddr_storage;
#include "compat/fake-rfc2553.h"
diff --git a/daemon/cachedump.c b/daemon/cachedump.c
index 46c625f061af..df6a40188bea 100644
--- a/daemon/cachedump.c
+++ b/daemon/cachedump.c
@@ -60,7 +60,7 @@
/** convert to ldns rr */
static ldns_rr*
to_rr(struct ub_packed_rrset_key* k, struct packed_rrset_data* d,
- uint32_t now, size_t i, uint16_t type)
+ time_t now, size_t i, uint16_t type)
{
ldns_rr* rr = ldns_rr_new();
ldns_rdf* rdf;
@@ -96,7 +96,7 @@ to_rr(struct ub_packed_rrset_key* k, struct packed_rrset_data* d,
/** dump one rrset zonefile line */
static int
dump_rrset_line(SSL* ssl, struct ub_packed_rrset_key* k,
- struct packed_rrset_data* d, uint32_t now, size_t i, uint16_t type)
+ struct packed_rrset_data* d, time_t now, size_t i, uint16_t type)
{
char* s;
ldns_rr* rr = to_rr(k, d, now, i, type);
@@ -119,7 +119,7 @@ dump_rrset_line(SSL* ssl, struct ub_packed_rrset_key* k,
/** dump rrset key and data info */
static int
dump_rrset(SSL* ssl, struct ub_packed_rrset_key* k,
- struct packed_rrset_data* d, uint32_t now)
+ struct packed_rrset_data* d, time_t now)
{
size_t i;
/* rd lock held by caller */
@@ -127,9 +127,9 @@ dump_rrset(SSL* ssl, struct ub_packed_rrset_key* k,
if(d->ttl < now) return 1; /* expired */
/* meta line */
- if(!ssl_printf(ssl, ";rrset%s %u %u %u %d %d\n",
+ if(!ssl_printf(ssl, ";rrset%s %lld %u %u %d %d\n",
(k->rk.flags & PACKED_RRSET_NSEC_AT_APEX)?" nsec_apex":"",
- (unsigned)(d->ttl - now),
+ (long long)(d->ttl - now),
(unsigned)d->count, (unsigned)d->rrsig_count,
(int)d->trust, (int)d->security
))
@@ -149,7 +149,7 @@ dump_rrset(SSL* ssl, struct ub_packed_rrset_key* k,
/** dump lruhash rrset cache */
static int
-dump_rrset_lruhash(SSL* ssl, struct lruhash* h, uint32_t now)
+dump_rrset_lruhash(SSL* ssl, struct lruhash* h, time_t now)
{
struct lruhash_entry* e;
/* lruhash already locked by caller */
@@ -225,7 +225,7 @@ dump_msg_ref(SSL* ssl, struct ub_packed_rrset_key* k)
/** dump message entry */
static int
dump_msg(SSL* ssl, struct query_info* k, struct reply_info* d,
- uint32_t now)
+ time_t now)
{
size_t i;
char* nm, *tp, *cl;
@@ -259,10 +259,10 @@ dump_msg(SSL* ssl, struct query_info* k, struct reply_info* d,
}
/* meta line */
- if(!ssl_printf(ssl, "msg %s %s %s %d %d %u %d %u %u %u\n",
+ if(!ssl_printf(ssl, "msg %s %s %s %d %d %lld %d %u %u %u\n",
nm, cl, tp,
(int)d->flags, (int)d->qdcount,
- (unsigned)(d->ttl-now), (int)d->security,
+ (long long)(d->ttl-now), (int)d->security,
(unsigned)d->an_numrrsets,
(unsigned)d->ns_numrrsets,
(unsigned)d->ar_numrrsets)) {
@@ -387,7 +387,7 @@ read_fixed(SSL* ssl, ldns_buffer* buf, const char* str)
static int
load_rr(SSL* ssl, ldns_buffer* buf, struct regional* region,
struct ub_packed_rrset_key* rk, struct packed_rrset_data* d,
- unsigned int i, int is_rrsig, int* go_on, uint32_t now)
+ unsigned int i, int is_rrsig, int* go_on, time_t now)
{
ldns_rr* rr;
ldns_status status;
@@ -489,7 +489,7 @@ move_into_cache(struct ub_packed_rrset_key* k,
return 0;
}
s = sizeof(*ad) + (sizeof(size_t) + sizeof(uint8_t*) +
- sizeof(uint32_t))* num;
+ sizeof(time_t))* num;
for(i=0; i<num; i++)
s += d->rr_len[i];
ad = (struct packed_rrset_data*)malloc(s);
@@ -505,8 +505,8 @@ move_into_cache(struct ub_packed_rrset_key* k,
p += sizeof(size_t)*num;
memmove(p, &d->rr_data[0], sizeof(uint8_t*)*num);
p += sizeof(uint8_t*)*num;
- memmove(p, &d->rr_ttl[0], sizeof(uint32_t)*num);
- p += sizeof(uint32_t)*num;
+ memmove(p, &d->rr_ttl[0], sizeof(time_t)*num);
+ p += sizeof(time_t)*num;
for(i=0; i<num; i++) {
memmove(p, d->rr_data[i], d->rr_len[i]);
p += d->rr_len[i];
@@ -530,7 +530,8 @@ load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
struct regional* region = worker->scratchpad;
struct ub_packed_rrset_key* rk;
struct packed_rrset_data* d;
- unsigned int ttl, rr_count, rrsig_count, trust, security;
+ unsigned int rr_count, rrsig_count, trust, security;
+ long long ttl;
unsigned int i;
int go_on = 1;
regional_free_all(region);
@@ -552,7 +553,7 @@ load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
s += 10;
rk->rk.flags |= PACKED_RRSET_NSEC_AT_APEX;
}
- if(sscanf(s, " %u %u %u %u %u", &ttl, &rr_count, &rrsig_count,
+ if(sscanf(s, " %lld %u %u %u %u", &ttl, &rr_count, &rrsig_count,
&trust, &security) != 5) {
log_warn("error bad rrset spec %s", s);
return 0;
@@ -565,12 +566,12 @@ load_rrset(SSL* ssl, ldns_buffer* buf, struct worker* worker)
d->rrsig_count = (size_t)rrsig_count;
d->security = (enum sec_status)security;
d->trust = (enum rrset_trust)trust;
- d->ttl = (uint32_t)ttl + *worker->env.now;
+ d->ttl = (time_t)ttl + *worker->env.now;
d->rr_len = regional_alloc_zero(region,
sizeof(size_t)*(d->count+d->rrsig_count));
d->rr_ttl = regional_alloc_zero(region,
- sizeof(uint32_t)*(d->count+d->rrsig_count));
+ sizeof(time_t)*(d->count+d->rrsig_count));
d->rr_data = regional_alloc_zero(region,
sizeof(uint8_t*)*(d->count+d->rrsig_count));
if(!d->rr_len || !d->rr_ttl || !d->rr_data) {
@@ -718,7 +719,8 @@ load_msg(SSL* ssl, ldns_buffer* buf, struct worker* worker)
struct query_info qinf;
struct reply_info rep;
char* s = (char*)ldns_buffer_begin(buf);
- unsigned int flags, qdcount, ttl, security, an, ns, ar;
+ unsigned int flags, qdcount, security, an, ns, ar;
+ long long ttl;
size_t i;
int go_on = 1;
@@ -735,14 +737,14 @@ load_msg(SSL* ssl, ldns_buffer* buf, struct worker* worker)
}
/* read remainder of line */
- if(sscanf(s, " %u %u %u %u %u %u %u", &flags, &qdcount, &ttl,
+ if(sscanf(s, " %u %u %lld %u %u %u %u", &flags, &qdcount, &ttl,
&security, &an, &ns, &ar) != 7) {
log_warn("error cannot parse numbers: %s", s);
return 0;
}
rep.flags = (uint16_t)flags;
rep.qdcount = (uint16_t)qdcount;
- rep.ttl = (uint32_t)ttl;
+ rep.ttl = (time_t)ttl;
rep.prefetch_ttl = PREFETCH_TTL_CALC(rep.ttl);
rep.security = (enum sec_status)security;
rep.an_numrrsets = (size_t)an;
@@ -800,8 +802,9 @@ print_dp_details(SSL* ssl, struct worker* worker, struct delegpt* dp)
{
char buf[257];
struct delegpt_addr* a;
- int lame, dlame, rlame, rto, edns_vs, to, delay, entry_ttl,
+ int lame, dlame, rlame, rto, edns_vs, to, delay,
tA = 0, tAAAA = 0, tother = 0;
+ long long entry_ttl;
struct rtt_info ri;
uint8_t edns_lame_known;
for(a = dp->target_list; a; a = a->next_target) {
@@ -840,7 +843,7 @@ print_dp_details(SSL* ssl, struct worker* worker, struct delegpt* dp)
return;
continue; /* skip stuff not in infra cache */
}
- if(!ssl_printf(ssl, "%s%s%s%srto %d msec, ttl %d, ping %d "
+ if(!ssl_printf(ssl, "%s%s%s%srto %d msec, ttl %lld, ping %d "
"var %d rtt %d, tA %d, tAAAA %d, tother %d",
lame?"LAME ":"", dlame?"NoDNSSEC ":"",
a->lame?"AddrWasParentSide ":"",
diff --git a/daemon/remote.c b/daemon/remote.c
index 5dc05c5fa49f..615050225c5f 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -629,8 +629,8 @@ print_stats(SSL* ssl, const char* nm, struct stats_info* s)
if(!ssl_printf(ssl, "%s.requestlist.current.user"SQ"%u\n", nm,
(unsigned)s->mesh_num_reply_states)) return 0;
timeval_divide(&avg, &s->mesh_replies_sum_wait, s->mesh_replies_sent);
- if(!ssl_printf(ssl, "%s.recursion.time.avg"SQ"%d.%6.6d\n", nm,
- (int)avg.tv_sec, (int)avg.tv_usec)) return 0;
+ if(!ssl_printf(ssl, "%s.recursion.time.avg"SQ"%lld.%6.6d\n", nm,
+ (long long)avg.tv_sec, (int)avg.tv_usec)) return 0;
if(!ssl_printf(ssl, "%s.recursion.time.median"SQ"%g\n", nm,
s->mesh_time_median)) return 0;
return 1;
@@ -713,12 +713,12 @@ print_uptime(SSL* ssl, struct worker* worker, int reset)
timeval_subtract(&dt, &now, &worker->daemon->time_last_stat);
if(reset)
worker->daemon->time_last_stat = now;
- if(!ssl_printf(ssl, "time.now"SQ"%d.%6.6d\n",
- (unsigned)now.tv_sec, (unsigned)now.tv_usec)) return 0;
- if(!ssl_printf(ssl, "time.up"SQ"%d.%6.6d\n",
- (unsigned)up.tv_sec, (unsigned)up.tv_usec)) return 0;
- if(!ssl_printf(ssl, "time.elapsed"SQ"%d.%6.6d\n",
- (unsigned)dt.tv_sec, (unsigned)dt.tv_usec)) return 0;
+ if(!ssl_printf(ssl, "time.now"SQ"%lld.%6.6d\n",
+ (long long)now.tv_sec, (unsigned)now.tv_usec)) return 0;
+ if(!ssl_printf(ssl, "time.up"SQ"%lld.%6.6d\n",
+ (long long)up.tv_sec, (unsigned)up.tv_usec)) return 0;
+ if(!ssl_printf(ssl, "time.elapsed"SQ"%lld.%6.6d\n",
+ (long long)dt.tv_sec, (unsigned)dt.tv_usec)) return 0;
return 1;
}
@@ -1118,9 +1118,9 @@ struct del_info {
/** labels */
int labs;
/** now */
- uint32_t now;
+ time_t now;
/** time to invalidate to */
- uint32_t expired;
+ time_t expired;
/** number of rrsets removed */
size_t num_rrsets;
/** number of msgs removed */
@@ -1663,6 +1663,38 @@ do_stub_remove(SSL* ssl, struct worker* worker, char* args)
send_ok(ssl);
}
+/** do the insecure_add command */
+static void
+do_insecure_add(SSL* ssl, struct worker* worker, char* arg)
+{
+ size_t nmlen;
+ int nmlabs;
+ uint8_t* nm = NULL;
+ if(!parse_arg_name(ssl, arg, &nm, &nmlen, &nmlabs))
+ return;
+ if(!anchors_add_insecure(worker->env.anchors, LDNS_RR_CLASS_IN, nm)) {
+ (void)ssl_printf(ssl, "error out of memory\n");
+ free(nm);
+ return;
+ }
+ free(nm);
+ send_ok(ssl);
+}
+
+/** do the insecure_remove command */
+static void
+do_insecure_remove(SSL* ssl, struct worker* worker, char* arg)
+{
+ size_t nmlen;
+ int nmlabs;
+ uint8_t* nm = NULL;
+ if(!parse_arg_name(ssl, arg, &nm, &nmlen, &nmlabs))
+ return;
+ anchors_delete_insecure(worker->env.anchors, LDNS_RR_CLASS_IN, nm);
+ free(nm);
+ send_ok(ssl);
+}
+
/** do the status command */
static void
do_status(SSL* ssl, struct worker* worker)
@@ -1684,7 +1716,7 @@ do_status(SSL* ssl, struct worker* worker)
if(!ssl_printf(ssl, " ]\n"))
return;
uptime = (time_t)time(NULL) - (time_t)worker->daemon->time_boot.tv_sec;
- if(!ssl_printf(ssl, "uptime: %u seconds\n", (unsigned)uptime))
+ if(!ssl_printf(ssl, "uptime: %lld seconds\n", (long long)uptime))
return;
if(!ssl_printf(ssl, "unbound (pid %d) is running...\n",
(int)getpid()))
@@ -1703,7 +1735,7 @@ get_mesh_age(struct mesh_state* m, char* buf, size_t len,
while(r && r->next)
r = r->next;
timeval_subtract(&d, env->now_tv, &r->start_time);
- snprintf(buf, len, "%d.%6.6d", (int)d.tv_sec, (int)d.tv_usec);
+ snprintf(buf, len, "%lld.%6.6d", (long long)d.tv_sec, (int)d.tv_usec);
} else {
snprintf(buf, len, "-");
}
@@ -1804,7 +1836,7 @@ struct infra_arg {
/** the SSL connection */
SSL* ssl;
/** the time now */
- uint32_t now;
+ time_t now;
};
/** callback for every host element in the infra cache */
@@ -2050,6 +2082,16 @@ execute_cmd(struct daemon_remote* rc, SSL* ssl, char* cmd,
if(rc) distribute_cmd(rc, ssl, cmd);
do_forward_remove(ssl, worker, skipwhite(p+14));
return;
+ } else if(cmdcmp(p, "insecure_add", 12)) {
+ /* must always distribute this cmd */
+ if(rc) distribute_cmd(rc, ssl, cmd);
+ do_insecure_add(ssl, worker, skipwhite(p+12));
+ return;
+ } else if(cmdcmp(p, "insecure_remove", 15)) {
+ /* must always distribute this cmd */
+ if(rc) distribute_cmd(rc, ssl, cmd);
+ do_insecure_remove(ssl, worker, skipwhite(p+15));
+ return;
} else if(cmdcmp(p, "forward", 7)) {
/* must always distribute this cmd */
if(rc) distribute_cmd(rc, ssl, cmd);
diff --git a/daemon/unbound.c b/daemon/unbound.c
index cd08c9c3f185..28ea17355bf1 100644
--- a/daemon/unbound.c
+++ b/daemon/unbound.c
@@ -521,7 +521,7 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
/* setusercontext does initgroups, setuid, setgid, and
* also resource limits from login config, but we
* still call setresuid, setresgid to be sure to set all uid*/
- if(setusercontext(NULL, pwd, uid,
+ if(setusercontext(NULL, pwd, uid, (unsigned)
LOGIN_SETALL & ~LOGIN_SETUSER & ~LOGIN_SETGROUP) != 0)
log_warn("unable to setusercontext %s: %s",
cfg->username, strerror(errno));
@@ -714,6 +714,7 @@ main(int argc, char* argv[])
#endif
log_init(NULL, 0, NULL);
+ log_ident_set(strrchr(argv[0],'/')?strrchr(argv[0],'/')+1:argv[0]);
/* parse the options */
while( (c=getopt(argc, argv, "c:dhvw:")) != -1) {
switch(c) {
diff --git a/daemon/worker.c b/daemon/worker.c
index eeb323c8426a..37d019dff0e4 100644
--- a/daemon/worker.c
+++ b/daemon/worker.c
@@ -449,7 +449,7 @@ answer_norec_from_cache(struct worker* worker, struct query_info* qinfo,
*/
uint16_t udpsize = edns->udp_size;
int secure = 0;
- uint32_t timenow = *worker->env.now;
+ time_t timenow = *worker->env.now;
int must_validate = (!(flags&BIT_CD) || worker->env.cfg->ignore_cd)
&& worker->env.need_to_validate;
struct dns_msg *msg = NULL;
@@ -524,7 +524,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
struct reply_info* rep, uint16_t id, uint16_t flags,
struct comm_reply* repinfo, struct edns_data* edns)
{
- uint32_t timenow = *worker->env.now;
+ time_t timenow = *worker->env.now;
uint16_t udpsize = edns->udp_size;
int secure;
int must_validate = (!(flags&BIT_CD) || worker->env.cfg->ignore_cd)
@@ -614,7 +614,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
/** 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, uint32_t leeway)
+ uint16_t flags, struct comm_reply* repinfo, time_t leeway)
{
/* first send answer to client to keep its latency
* as small as a cachereply */
@@ -831,7 +831,15 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
edns.udp_size = NORMAL_UDP_SIZE;
}
- if(edns.edns_present && edns.udp_size < LDNS_HEADER_SIZE) {
+ if(edns.udp_size > worker->daemon->cfg->max_udp_size &&
+ c->type == comm_udp) {
+ verbose(VERB_QUERY,
+ "worker request: max UDP reply size modified"
+ " (%d to max-udp-size)", (int)edns.udp_size);
+ log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
+ edns.udp_size = worker->daemon->cfg->max_udp_size;
+ }
+ if(edns.udp_size < LDNS_HEADER_SIZE) {
verbose(VERB_ALGO, "worker request: edns is too small.");
log_addr(VERB_CLIENT, "from", &repinfo->addr, repinfo->addrlen);
LDNS_QR_SET(ldns_buffer_begin(c->buffer));
@@ -889,7 +897,7 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
/* prefetch it if the prefetch TTL expired */
if(worker->env.cfg->prefetch && *worker->env.now >=
((struct reply_info*)e->data)->prefetch_ttl) {
- uint32_t leeway = ((struct reply_info*)e->
+ time_t leeway = ((struct reply_info*)e->
data)->ttl - *worker->env.now;
lock_rw_unlock(&e->lock);
reply_and_prefetch(worker, &qinfo,
diff --git a/doc/Changelog b/doc/Changelog
index 346f02a764e5..544fbef562b5 100644
--- a/doc/Changelog
+++ b/doc/Changelog
@@ -1,5 +1,158 @@
+16 Sep 2013: Wouter
+ - Fix#524: max-udp-size not effective to non-EDNS0 queries, from
+ Daisuke HIGASHI.
+
+10 Sep 2013: Wouter
+ - MIN_TTL and MAX_TTL also in time_t.
+ - tag 1.4.21rc1 made again.
+
+26 Aug 2013: Wouter
+ - More fixes for bug#519: for the threaded case test if the bg
+ thread has been killed, on ub_ctx_delete, to avoid hangs.
+
+22 Aug 2013: Wouter
+ - more fixes that I overlooked.
+ - review fixes from Willem.
+
+21 Aug 2013: Wouter
+ - Fix#520: Errors found by static analysis from Tomas Hozza(redhat).
+
+20 Aug 2013: Wouter
+ - Fix for 2038, with time_t instead of uint32_t.
+
+19 Aug 2013: Wouter
+ - Fix#519 ub_ctx_delete may hang in some scenarios (libunbound).
+
+14 Aug 2013: Wouter
+ - Fix uninit variable in fix#516.
+
+8 Aug 2013: Wouter
+ - Fix#516 dnssec lameness detection for answers that are improper.
+
+30 Jun 2013: Wouter
+ - tag 1.4.21rc1
+
+29 Jun 2013: Wouter
+ - Fix#512 memleak in testcode for testbound (if it fails).
+ - Fix#512 NSS returned arrays out of setup function to be statics.
+
+26 Jun 2013: Wouter
+ - max include of 100.000 files (depth and globbed at one time).
+ This is to preserve system memory in bug cases, or endless cases.
+ - iana portlist updated.
+
+19 Jun 2013: Wouter
+ - streamtcp man page, contributed by Tomas Hozza.
+ - iana portlist updated.
+ - libunbound documentation on how to avoid openssl race conditions.
+
+25 Jun 2013: Wouter
+ - Squelch sendto-permission denied errors when the network is
+ not connected, to avoid spamming syslog.
+ - configure --disable-flto option (from Robert Edmonds).
+
+18 Jun 2013: Wouter
+ - Fix for const string literals in C++ for libunbound, from Karel
+ Slany.
+ - iana portlist updated.
+
+17 Jun 2013: Wouter
+ - Fixup manpage syntax.
+
+14 Jun 2013: Wouter
+ - get_option and set_option support for log-time-ascii, python-script
+ val-sig-skew-min and val-sig-skew-max. log-time-ascii takes effect
+ immediately. The others are mostly useful for libunbound users.
+
+13 Jun 2013: Wouter
+ - get_option, set_option, unbound-checkconf -o and libunbound
+ getoption and setoption support cache-min-ttl and cache-max-ttl.
+
+10 Jun 2013: Wouter
+ - Fix#501: forward-first does not recurse, when forward name is ".".
+ - iana portlist update.
+ - Max include depth is unlimited.
+
+27 May 2013: Wouter
+ - Update acx_pthreads.m4 to ax_pthreads.4 (2013-03-29), and apply
+ patch to it to not fail when -Werror is also specified, from the
+ autoconf-archives.
+ - iana portlist update.
+
+21 May 2013: Wouter
+ - Explain bogus and secure flags in libunbound more.
+
+16 May 2013: Wouter
+ - Fix#499 use-after-free in out-of-memory handling code (thanks Jake
+ Montgomery).
+ - Fix#500 use on non-initialised values on socket bind failures.
+
+15 May 2013: Wouter
+ - Fix round-robin doesn't work with some Windows clients (from Ilya
+ Bakulin).
+
+3 May 2013: Wouter
+ - update acx_nlnetlabs.m4 to v23, sleep w32 fix.
+
+26 April 2013: Wouter
+ - add unbound-control insecure_add and insecure_remove for the
+ administration of negative trust anchors.
+
+25 April 2013: Wouter
+ - Implement max-udp-size config option, default 4096 (thanks
+ Daisuke Higashi).
+ - Robust checks on dname validity from rdata for dname compare.
+ - updated iana portlist.
+
+19 April 2013: Wouter
+ - Fixup snprintf return value usage, fixed libunbound_get_option.
+
+18 April 2013: Wouter
+ - fix bug #491: pick program name (0th argument) as syslog identity.
+ - own implementation of compat/snprintf.c.
+
+15 April 2013: Wouter
+ - Fix so that for a configuration line of include: "*.conf" it is not
+ an error if there are no files matching the glob pattern.
+ - unbound-anchor review: BIO_write can return 0 successfully if it
+ has successfully appended a zero length string.
+
+11 April 2013: Wouter
+ - Fix queries leaking up for stubs and forwards, if the configured
+ nameservers all fail to answer.
+
+10 April 2013: Wouter
+ - code improve for minimal responses, small speed increase.
+
+9 April 2013: Wouter
+ - updated iana portlist.
+ - Fix crash in previous private address fixup of 22 March.
+
+28 March 2013: Wouter
+ - Make reverse zones easier by documenting the nodefault statements
+ commented-out in the example config file.
+
+26 March 2013: Wouter
+ - more fixes to lookup3.c endianness detection.
+
+25 March 2013: Wouter
+ - #492: Fix endianness detection, revert to older lookup3.c detection
+ and put new detect lines after previous tests, to avoid regressions
+ but allow new detections to succeed.
+ And add detection for machine/endian.h to it.
+
+22 March 2013: Wouter
+ - Fix resolve of names that use a mix of public and private addresses.
+ - iana portlist update.
+ - Fix makedist for new svn for -d option.
+ - unbound.h header file has UNBOUND_VERSION_MAJOR define.
+ - Fix windows RSRC version for long version numbers.
+
21 March 2013: Wouter
- release 1.4.20
+ - trunk has 1.4.21
+ - committed libunbound version 4:1:2 for binary API updated in 1.4.20
+ - install copy of unbound-control.8 man page for unbound-control-setup
14 March 2013: Wouter
- iana portlist update.
diff --git a/doc/FEATURES b/doc/FEATURES
index 93ed2925718c..076988ea9127 100644
--- a/doc/FEATURES
+++ b/doc/FEATURES
@@ -99,4 +99,5 @@ SSHFP type
4701: DHCID
5155: NSEC3, NSEC3PARAM
4408: SPF
+6944: DNSKEY algorithm status
diff --git a/doc/README b/doc/README
index c8c69c1aa2b6..ebd0518cefc0 100644
--- a/doc/README
+++ b/doc/README
@@ -1,4 +1,4 @@
-README for Unbound 1.4.20
+README for Unbound 1.4.21
Copyright 2007 NLnet Labs
http://unbound.net
diff --git a/doc/example.conf.in b/doc/example.conf.in
index aa9a7f7d44da..a0cffd57fef7 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.4.20.
+# See unbound.conf(5) man page, version 1.4.21.
#
# this is a comment.
@@ -89,6 +89,10 @@ server:
# is set with msg-buffer-size). 1480 can solve fragmentation (timeouts).
# edns-buffer-size: 4096
+ # Maximum UDP response size (not applied to TCP response).
+ # Suggested values are 512 to 4096. Default is 4096. 65536 disables it.
+ # max-udp-size: 4096
+
# buffer size for handling DNS data. No messages larger than this
# size can be sent or received, by UDP or TCP. In bytes.
# msg-buffer-size: 65552
@@ -426,6 +430,47 @@ server:
# plain value in bytes or you can append k, m or G. default is "1Mb".
# neg-cache-size: 1m
+ # By default, for a number of zones a small default 'nothing here'
+ # reply is built-in. Query traffic is thus blocked. If you
+ # wish to serve such zone you can unblock them by uncommenting one
+ # of the nodefault statements below.
+ # You may also have to use domain-insecure: zone to make DNSSEC work,
+ # unless you have your own trust anchors for this zone.
+ # local-zone: "localhost." nodefault
+ # local-zone: "127.in-addr.arpa." nodefault
+ # local-zone: "1.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.ip6.arpa." nodefault
+ # local-zone: "10.in-addr.arpa." nodefault
+ # local-zone: "16.172.in-addr.arpa." nodefault
+ # local-zone: "17.172.in-addr.arpa." nodefault
+ # local-zone: "18.172.in-addr.arpa." nodefault
+ # local-zone: "19.172.in-addr.arpa." nodefault
+ # local-zone: "20.172.in-addr.arpa." nodefault
+ # local-zone: "21.172.in-addr.arpa." nodefault
+ # local-zone: "22.172.in-addr.arpa." nodefault
+ # local-zone: "23.172.in-addr.arpa." nodefault
+ # local-zone: "24.172.in-addr.arpa." nodefault
+ # local-zone: "25.172.in-addr.arpa." nodefault
+ # local-zone: "26.172.in-addr.arpa." nodefault
+ # local-zone: "27.172.in-addr.arpa." nodefault
+ # local-zone: "28.172.in-addr.arpa." nodefault
+ # local-zone: "29.172.in-addr.arpa." nodefault
+ # local-zone: "30.172.in-addr.arpa." nodefault
+ # local-zone: "31.172.in-addr.arpa." nodefault
+ # local-zone: "168.192.in-addr.arpa." nodefault
+ # local-zone: "0.in-addr.arpa." nodefault
+ # local-zone: "254.169.in-addr.arpa." nodefault
+ # local-zone: "2.0.192.in-addr.arpa." nodefault
+ # local-zone: "100.51.198.in-addr.arpa." nodefault
+ # local-zone: "113.0.203.in-addr.arpa." nodefault
+ # local-zone: "255.255.255.255.in-addr.arpa." nodefault
+ # local-zone: "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.ip6.arpa." nodefault
+ # local-zone: "d.f.ip6.arpa." nodefault
+ # local-zone: "8.e.f.ip6.arpa." nodefault
+ # local-zone: "9.e.f.ip6.arpa." nodefault
+ # local-zone: "a.e.f.ip6.arpa." nodefault
+ # local-zone: "b.e.f.ip6.arpa." nodefault
+ # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault
+
# a number of locally served zones can be configured.
# local-zone: <zone> <type>
# local-data: "<resource record string>"
diff --git a/doc/libunbound.3.in b/doc/libunbound.3.in
index 0f6f0c6c2947..315a2dff30d2 100644
--- a/doc/libunbound.3.in
+++ b/doc/libunbound.3.in
@@ -1,4 +1,4 @@
-.TH "libunbound" "3" "Mar 21, 2013" "NLnet Labs" "unbound 1.4.20"
+.TH "libunbound" "3" "Sep 19, 2013" "NLnet Labs" "unbound 1.4.21"
.\"
.\" libunbound.3 -- unbound library functions manual
.\"
@@ -42,7 +42,7 @@
.B ub_ctx_zone_remove,
.B ub_ctx_data_add,
.B ub_ctx_data_remove
-\- Unbound DNS validating resolver 1.4.20 functions.
+\- Unbound DNS validating resolver 1.4.21 functions.
.SH "SYNOPSIS"
.LP
.B #include <unbound.h>
@@ -171,6 +171,9 @@ by default. Use
and
.B ub_ctx_hosts
to read them.
+Before you call this, use the openssl functions CRYPTO_set_id_callback and
+CRYPTO_set_locking_callback to set up asyncronous operation if you use
+lib openssl (the application calls these functions once for initialisation).
.TP
.B ub_ctx_delete
Delete validation context and free associated resources.
@@ -364,7 +367,7 @@ The result of the DNS resolution and validation is returned as
.fi
.P
If both secure and bogus are false, security was not enabled for the
-domain of the query.
+domain of the query. Else, they are not both true, one of them is true.
.SH "RETURN VALUES"
Many routines return an error code. The value 0 (zero) denotes no error
happened. Other values can be passed to
diff --git a/doc/unbound-anchor.8.in b/doc/unbound-anchor.8.in
index 0b5e5a0bf2af..8d1a9e523af4 100644
--- a/doc/unbound-anchor.8.in
+++ b/doc/unbound-anchor.8.in
@@ -1,4 +1,4 @@
-.TH "unbound-anchor" "8" "Mar 21, 2013" "NLnet Labs" "unbound 1.4.20"
+.TH "unbound-anchor" "8" "Sep 19, 2013" "NLnet Labs" "unbound 1.4.21"
.\"
.\" unbound-anchor.8 -- unbound anchor maintenance utility manual
.\"
diff --git a/doc/unbound-checkconf.8.in b/doc/unbound-checkconf.8.in
index 4ae174f22559..dddad989d101 100644
--- a/doc/unbound-checkconf.8.in
+++ b/doc/unbound-checkconf.8.in
@@ -1,4 +1,4 @@
-.TH "unbound-checkconf" "8" "Mar 21, 2013" "NLnet Labs" "unbound 1.4.20"
+.TH "unbound-checkconf" "8" "Sep 19, 2013" "NLnet Labs" "unbound 1.4.21"
.\"
.\" unbound-checkconf.8 -- unbound configuration checker manual
.\"
diff --git a/doc/unbound-control.8.in b/doc/unbound-control.8.in
index 669e81dfd75c..dac67214f6a6 100644
--- a/doc/unbound-control.8.in
+++ b/doc/unbound-control.8.in
@@ -1,4 +1,4 @@
-.TH "unbound-control" "8" "Mar 21, 2013" "NLnet Labs" "unbound 1.4.20"
+.TH "unbound-control" "8" "Sep 19, 2013" "NLnet Labs" "unbound 1.4.21"
.\"
.\" unbound-control.8 -- unbound remote control manual
.\"
@@ -170,7 +170,7 @@ harden\-glue, harden\-dnssec\-stripped, harden\-below\-nxdomain,
harden\-referral\-path, prefetch, prefetch\-key, log\-queries,
hide\-identity, hide\-version, identity, version, val\-log\-level,
val\-log\-squelch, ignore\-cd\-flag, add\-holddown, del\-holddown,
-keep\-missing, tcp\-upstream, ssl\-upstream.
+keep\-missing, tcp\-upstream, ssl\-upstream, max\-udp\-size.
.TP
.B get_option \fIopt
Get the value of the option. Give the option name without a trailing ':'.
@@ -196,6 +196,14 @@ List the local zones in use. These are printed one per line with zone type.
.B list_local_data
List the local data RRs in use. The resource records are printed.
.TP
+.B insecure_add \fIzone
+Add a \fBdomain\-insecure\fR for the given zone, like the statement in unbound.conf.
+Adds to the running unbound without affecting the cache contents (which may
+still be bogus, use \fBflush_zone\fR to remove it), does not affect the config file.
+.TP
+.B insecure_remove \fIzone
+Removes domain\-insecure for the given zone.
+.TP
.B forward_add \fR[\fI+i\fR] \fIzone addr ...
Add a new forward zone to running unbound. With +i option also adds a
\fIdomain\-insecure\fR for the zone (so it can resolve insecurely if you have
diff --git a/doc/unbound-host.1 b/doc/unbound-host.1
index 4957705cd88e..631e529d6422 100644
--- a/doc/unbound-host.1
+++ b/doc/unbound-host.1
@@ -1,4 +1,4 @@
-.TH "unbound\-host" "1" "Mar 21, 2013" "NLnet Labs" "unbound 1.4.20"
+.TH "unbound\-host" "1" "Sep 19, 2013" "NLnet Labs" "unbound 1.4.21"
.\"
.\" unbound-host.1 -- unbound DNS lookup utility
.\"
diff --git a/doc/unbound.8.in b/doc/unbound.8.in
index 5d84d9a781b3..60c482cea399 100644
--- a/doc/unbound.8.in
+++ b/doc/unbound.8.in
@@ -1,4 +1,4 @@
-.TH "unbound" "8" "Mar 21, 2013" "NLnet Labs" "unbound 1.4.20"
+.TH "unbound" "8" "Sep 19, 2013" "NLnet Labs" "unbound 1.4.21"
.\"
.\" unbound.8 -- unbound manual
.\"
@@ -10,7 +10,7 @@
.SH "NAME"
.LP
.B unbound
-\- Unbound DNS validating resolver 1.4.20.
+\- Unbound DNS validating resolver 1.4.21.
.SH "SYNOPSIS"
.LP
.B unbound
diff --git a/doc/unbound.conf.5.in b/doc/unbound.conf.5.in
index 6dd0216d0367..6c0cdde46010 100644
--- a/doc/unbound.conf.5.in
+++ b/doc/unbound.conf.5.in
@@ -1,4 +1,4 @@
-.TH "unbound.conf" "5" "Mar 21, 2013" "NLnet Labs" "unbound 1.4.20"
+.TH "unbound.conf" "5" "Sep 19, 2013" "NLnet Labs" "unbound 1.4.21"
.\"
.\" unbound.conf.5 -- unbound.conf manual
.\"
@@ -183,6 +183,11 @@ stringent path MTU problems, but is seen as extreme, since the amount
of TCP fallback generated is excessive (probably also for this resolver,
consider tuning the outgoing tcp number).
.TP
+.B max\-udp\-size: \fI<number>
+Maximum UDP response size (not applied to TCP response). 65536 disables the
+udp response size maximum, and uses the choice from the client, always.
+Suggested values are 512 to 4096. Default is 4096.
+.TP
.B msg\-buffer\-size: \fI<number>
Number of bytes size of the message buffers. Default is 65552 bytes, enough
for 64 Kb packets, the maximum DNS message size. No message larger than this
@@ -492,7 +497,7 @@ 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.
.TP
.B harden\-below\-nxdomain: \fI<yes or no>
-From draft-vixie-dnsext-resimprove, returns nxdomain to queries for a name
+From draft\-vixie\-dnsext\-resimprove, returns nxdomain to queries for a name
below another name that is already known to be nxdomain. DNSSEC mandates
noerror for empty nonterminals, hence this is possible. Very old software
might return nxdomain for empty nonterminals (that usually happen for reverse
diff --git a/iterator/iter_delegpt.c b/iterator/iter_delegpt.c
index d2f5d73335dc..c204ddfec745 100644
--- a/iterator/iter_delegpt.c
+++ b/iterator/iter_delegpt.c
@@ -71,7 +71,7 @@ struct delegpt* delegpt_copy(struct delegpt* dp, struct regional* region)
copy->bogus = dp->bogus;
copy->has_parent_side_NS = dp->has_parent_side_NS;
for(ns = dp->nslist; ns; ns = ns->next) {
- if(!delegpt_add_ns(copy, region, ns->name, (int)ns->lame))
+ if(!delegpt_add_ns(copy, region, ns->name, ns->lame))
return NULL;
copy->nslist->resolved = ns->resolved;
copy->nslist->got4 = ns->got4;
@@ -98,7 +98,7 @@ delegpt_set_name(struct delegpt* dp, struct regional* region, uint8_t* name)
int
delegpt_add_ns(struct delegpt* dp, struct regional* region, uint8_t* name,
- int lame)
+ uint8_t lame)
{
struct delegpt_ns* ns;
size_t len;
@@ -119,7 +119,7 @@ delegpt_add_ns(struct delegpt* dp, struct regional* region, uint8_t* name,
ns->resolved = 0;
ns->got4 = 0;
ns->got6 = 0;
- ns->lame = (uint8_t)lame;
+ ns->lame = lame;
ns->done_pside4 = 0;
ns->done_pside6 = 0;
return ns->name != 0;
@@ -156,7 +156,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, int bogus, int lame)
+ 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,8 +176,8 @@ delegpt_add_target(struct delegpt* dp, struct regional* region,
int
delegpt_add_addr(struct delegpt* dp, struct regional* region,
- struct sockaddr_storage* addr, socklen_t addrlen, int bogus,
- int lame)
+ struct sockaddr_storage* addr, socklen_t addrlen, uint8_t bogus,
+ uint8_t lame)
{
struct delegpt_addr* a;
log_assert(!dp->dp_type_mlc);
@@ -204,6 +204,7 @@ delegpt_add_addr(struct delegpt* dp, struct regional* region,
a->attempts = 0;
a->bogus = bogus;
a->lame = lame;
+ a->dnsseclame = 0;
return 1;
}
@@ -376,7 +377,7 @@ delegpt_from_message(struct dns_msg* msg, struct regional* region)
int
delegpt_rrset_add_ns(struct delegpt* dp, struct regional* region,
- struct ub_packed_rrset_key* ns_rrset, int lame)
+ struct ub_packed_rrset_key* ns_rrset, uint8_t lame)
{
struct packed_rrset_data* nsdata = (struct packed_rrset_data*)
ns_rrset->entry.data;
@@ -398,7 +399,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, int lame)
+ struct ub_packed_rrset_key* ak, uint8_t lame)
{
struct packed_rrset_data* d=(struct packed_rrset_data*)ak->entry.data;
size_t i;
@@ -422,7 +423,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, int lame)
+ struct ub_packed_rrset_key* ak, uint8_t lame)
{
struct packed_rrset_data* d=(struct packed_rrset_data*)ak->entry.data;
size_t i;
@@ -446,7 +447,7 @@ 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, int lame)
+ struct ub_packed_rrset_key* rrset, uint8_t lame)
{
if(!rrset)
return 1;
@@ -548,7 +549,7 @@ int delegpt_set_name_mlc(struct delegpt* dp, uint8_t* name)
return (dp->name != NULL);
}
-int delegpt_add_ns_mlc(struct delegpt* dp, uint8_t* name, int lame)
+int delegpt_add_ns_mlc(struct delegpt* dp, uint8_t* name, uint8_t lame)
{
struct delegpt_ns* ns;
size_t len;
@@ -579,7 +580,7 @@ int delegpt_add_ns_mlc(struct delegpt* dp, uint8_t* name, int lame)
}
int delegpt_add_addr_mlc(struct delegpt* dp, struct sockaddr_storage* addr,
- socklen_t addrlen, int bogus, int lame)
+ socklen_t addrlen, uint8_t bogus, uint8_t lame)
{
struct delegpt_addr* a;
log_assert(dp->dp_type_mlc);
@@ -605,11 +606,13 @@ int delegpt_add_addr_mlc(struct delegpt* dp, struct sockaddr_storage* addr,
a->attempts = 0;
a->bogus = bogus;
a->lame = lame;
+ a->dnsseclame = 0;
return 1;
}
int delegpt_add_target_mlc(struct delegpt* dp, uint8_t* name, size_t namelen,
- struct sockaddr_storage* addr, socklen_t addrlen, int bogus, int lame)
+ struct sockaddr_storage* addr, 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);
diff --git a/iterator/iter_delegpt.h b/iterator/iter_delegpt.h
index 7728031aa999..d7e0767d62eb 100644
--- a/iterator/iter_delegpt.h
+++ b/iterator/iter_delegpt.h
@@ -140,9 +140,13 @@ struct delegpt_addr {
int sel_rtt;
/** if true, the A or AAAA RR was bogus, so this address is bad.
* Also check the dp->bogus to see if everything is bogus. */
- int bogus;
+ uint8_t bogus;
/** if true, this address is dispreferred: it is a lame IP address */
- int lame;
+ uint8_t lame;
+ /** if the address is dnsseclame, but this cannot be cached, this
+ * option is useful to mark the address dnsseclame.
+ * This value is not copied in addr-copy and dp-copy. */
+ uint8_t dnsseclame;
};
/**
@@ -179,7 +183,7 @@ int delegpt_set_name(struct delegpt* dp, struct regional* regional,
* @return false on error.
*/
int delegpt_add_ns(struct delegpt* dp, struct regional* regional,
- uint8_t* name, int lame);
+ uint8_t* name, uint8_t lame);
/**
* Add NS rrset; calls add_ns repeatedly.
@@ -190,7 +194,7 @@ int delegpt_add_ns(struct delegpt* dp, struct regional* regional,
* @return 0 on alloc error.
*/
int delegpt_rrset_add_ns(struct delegpt* dp, struct regional* regional,
- struct ub_packed_rrset_key* ns_rrset, int lame);
+ struct ub_packed_rrset_key* ns_rrset, uint8_t lame);
/**
* Add target address to the delegation point.
@@ -207,7 +211,7 @@ int delegpt_rrset_add_ns(struct delegpt* dp, struct regional* regional,
*/
int delegpt_add_target(struct delegpt* dp, struct regional* regional,
uint8_t* name, size_t namelen, struct sockaddr_storage* addr,
- socklen_t addrlen, int bogus, int lame);
+ socklen_t addrlen, uint8_t bogus, uint8_t lame);
/**
* Add A RRset to delegpt.
@@ -218,7 +222,7 @@ int delegpt_add_target(struct delegpt* dp, struct regional* regional,
* @return 0 on alloc error.
*/
int delegpt_add_rrset_A(struct delegpt* dp, struct regional* regional,
- struct ub_packed_rrset_key* rrset, int lame);
+ struct ub_packed_rrset_key* rrset, uint8_t lame);
/**
* Add AAAA RRset to delegpt.
@@ -229,7 +233,7 @@ int delegpt_add_rrset_A(struct delegpt* dp, struct regional* regional,
* @return 0 on alloc error.
*/
int delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* regional,
- struct ub_packed_rrset_key* rrset, int lame);
+ struct ub_packed_rrset_key* rrset, uint8_t lame);
/**
* Add any RRset to delegpt.
@@ -241,7 +245,7 @@ int delegpt_add_rrset_AAAA(struct delegpt* dp, struct regional* regional,
* @return 0 on alloc error.
*/
int delegpt_add_rrset(struct delegpt* dp, struct regional* regional,
- struct ub_packed_rrset_key* rrset, int lame);
+ struct ub_packed_rrset_key* rrset, uint8_t lame);
/**
* Add address to the delegation point. No servername is associated or checked.
@@ -254,7 +258,8 @@ int delegpt_add_rrset(struct delegpt* dp, struct regional* regional,
* @return false on error.
*/
int delegpt_add_addr(struct delegpt* dp, struct regional* regional,
- struct sockaddr_storage* addr, socklen_t addrlen, int bogus, int lame);
+ struct sockaddr_storage* addr, socklen_t addrlen,
+ uint8_t bogus, uint8_t lame);
/**
* Find NS record in name list of delegation point.
@@ -376,7 +381,7 @@ int delegpt_set_name_mlc(struct delegpt* dp, uint8_t* name);
* @param lame: the name is lame, disprefer.
* @return false on error.
*/
-int delegpt_add_ns_mlc(struct delegpt* dp, uint8_t* name, int lame);
+int delegpt_add_ns_mlc(struct delegpt* dp, uint8_t* name, uint8_t lame);
/**
* add an address to a malloced delegation point.
@@ -388,7 +393,7 @@ int delegpt_add_ns_mlc(struct delegpt* dp, uint8_t* name, int lame);
* @return false on error.
*/
int delegpt_add_addr_mlc(struct delegpt* dp, struct sockaddr_storage* addr,
- socklen_t addrlen, int bogus, int lame);
+ socklen_t addrlen, uint8_t bogus, uint8_t lame);
/**
* Add target address to the delegation point.
@@ -403,7 +408,8 @@ int delegpt_add_addr_mlc(struct delegpt* dp, struct sockaddr_storage* addr,
* @return false on error.
*/
int delegpt_add_target_mlc(struct delegpt* dp, uint8_t* name, size_t namelen,
- struct sockaddr_storage* addr, socklen_t addrlen, int bogus, int lame);
+ struct sockaddr_storage* addr, socklen_t addrlen, uint8_t bogus,
+ uint8_t lame);
/** get memory in use by dp */
size_t delegpt_get_mem(struct delegpt* dp);
diff --git a/iterator/iter_fwd.c b/iterator/iter_fwd.c
index 0b3b6525c26b..b84e5eff60d0 100644
--- a/iterator/iter_fwd.c
+++ b/iterator/iter_fwd.c
@@ -325,6 +325,20 @@ forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg)
}
struct delegpt*
+forwards_find(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass)
+{
+ rbnode_t* res = NULL;
+ struct iter_forward_zone key;
+ key.node.key = &key;
+ key.dclass = qclass;
+ key.name = qname;
+ key.namelabs = dname_count_size_labels(qname, &key.namelen);
+ res = rbtree_search(fwd->tree, &key);
+ if(res) return ((struct iter_forward_zone*)res)->dp;
+ return NULL;
+}
+
+struct delegpt*
forwards_lookup(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass)
{
/* lookup the forward zone in the tree */
diff --git a/iterator/iter_fwd.h b/iterator/iter_fwd.h
index dbb84f226126..62408ad52e2b 100644
--- a/iterator/iter_fwd.h
+++ b/iterator/iter_fwd.h
@@ -105,6 +105,16 @@ void forwards_delete(struct iter_forwards* fwd);
int forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg);
/**
+ * Find forward zone exactly by name
+ * @param fwd: forward storage.
+ * @param qname: The qname of the query.
+ * @param qclass: The qclass of the query.
+ * @return: A delegation point or null.
+ */
+struct delegpt* forwards_find(struct iter_forwards* fwd, uint8_t* qname,
+ uint16_t qclass);
+
+/**
* Find forward zone information
* For this qname/qclass find forward zone information, returns delegation
* point with server names and addresses, or NULL if no forwarding is needed.
diff --git a/iterator/iter_priv.c b/iterator/iter_priv.c
index db7dbe5faa65..572f701f350d 100644
--- a/iterator/iter_priv.c
+++ b/iterator/iter_priv.c
@@ -208,6 +208,28 @@ size_t priv_get_mem(struct iter_priv* priv)
return sizeof(*priv) + regional_get_mem(priv->region);
}
+/** remove RR from msgparse RRset, return true if rrset is entirely bad */
+static int
+remove_rr(const char* str, ldns_buffer* pkt, struct rrset_parse* rrset,
+ struct rr_parse* prev, struct rr_parse** rr, struct sockaddr_storage* addr, socklen_t addrlen)
+{
+ if(verbosity >= VERB_QUERY && rrset->dname_len <= LDNS_MAX_DOMAINLEN && str) {
+ uint8_t buf[LDNS_MAX_DOMAINLEN+1];
+ dname_pkt_copy(pkt, buf, rrset->dname);
+ log_name_addr(VERB_QUERY, str, buf, addr, addrlen);
+ }
+ if(prev)
+ prev->next = (*rr)->next;
+ else rrset->rr_first = (*rr)->next;
+ if(rrset->rr_last == *rr)
+ rrset->rr_last = prev;
+ rrset->rr_count --;
+ rrset->size -= (*rr)->size;
+ /* rr struct still exists, but is unlinked, so that in the for loop
+ * the rr->next works fine to continue. */
+ return rrset->rr_count == 0;
+}
+
int priv_rrset_bad(struct iter_priv* priv, ldns_buffer* pkt,
struct rrset_parse* rrset)
{
@@ -221,7 +243,7 @@ int priv_rrset_bad(struct iter_priv* priv, ldns_buffer* pkt,
} else {
/* so its a public name, check the address */
socklen_t len;
- struct rr_parse* rr;
+ struct rr_parse* rr, *prev = NULL;
if(rrset->type == LDNS_RR_TYPE_A) {
struct sockaddr_storage addr;
struct sockaddr_in sa;
@@ -232,13 +254,19 @@ int priv_rrset_bad(struct iter_priv* priv, ldns_buffer* pkt,
sa.sin_port = (in_port_t)htons(UNBOUND_DNS_PORT);
for(rr = rrset->rr_first; rr; rr = rr->next) {
if(ldns_read_uint16(rr->ttl_data+4)
- != INET_SIZE)
+ != INET_SIZE) {
+ prev = rr;
continue;
+ }
memmove(&sa.sin_addr, rr->ttl_data+4+2,
INET_SIZE);
memmove(&addr, &sa, len);
- if(priv_lookup_addr(priv, &addr, len))
- return 1;
+ if(priv_lookup_addr(priv, &addr, len)) {
+ if(remove_rr("sanitize: removing public name with private address", pkt, rrset, prev, &rr, &addr, len))
+ return 1;
+ continue;
+ }
+ prev = rr;
}
} else if(rrset->type == LDNS_RR_TYPE_AAAA) {
struct sockaddr_storage addr;
@@ -249,13 +277,19 @@ int priv_rrset_bad(struct iter_priv* priv, ldns_buffer* pkt,
sa.sin6_port = (in_port_t)htons(UNBOUND_DNS_PORT);
for(rr = rrset->rr_first; rr; rr = rr->next) {
if(ldns_read_uint16(rr->ttl_data+4)
- != INET6_SIZE)
+ != INET6_SIZE) {
+ prev = rr;
continue;
+ }
memmove(&sa.sin6_addr, rr->ttl_data+4+2,
INET6_SIZE);
memmove(&addr, &sa, len);
- if(priv_lookup_addr(priv, &addr, len))
- return 1;
+ if(priv_lookup_addr(priv, &addr, len)) {
+ if(remove_rr("sanitize: removing public name with private address", pkt, rrset, prev, &rr, &addr, len))
+ return 1;
+ continue;
+ }
+ prev = rr;
}
}
}
diff --git a/iterator/iter_priv.h b/iterator/iter_priv.h
index f6264f8d0c9b..e6e51c159b09 100644
--- a/iterator/iter_priv.h
+++ b/iterator/iter_priv.h
@@ -92,6 +92,8 @@ int priv_apply_cfg(struct iter_priv* priv, struct config_file* cfg);
/**
* See if rrset is bad.
+ * Will remove individual RRs that are bad (if possible) to
+ * sanitize the RRset without removing it completely.
* @param priv: structure for private address storage.
* @param pkt: packet to decompress rrset name in.
* @param rrset: the rrset to examine, A or AAAA.
diff --git a/iterator/iter_scrub.c b/iterator/iter_scrub.c
index 6147c96a9e37..a2407c27c840 100644
--- a/iterator/iter_scrub.c
+++ b/iterator/iter_scrub.c
@@ -62,7 +62,7 @@ static void
remove_rrset(const char* str, ldns_buffer* pkt, struct msg_parse* msg,
struct rrset_parse* prev, struct rrset_parse** rrset)
{
- if(verbosity >= VERB_QUERY
+ if(verbosity >= VERB_QUERY && str
&& (*rrset)->dname_len <= LDNS_MAX_DOMAINLEN) {
uint8_t buf[LDNS_MAX_DOMAINLEN+1];
dname_pkt_copy(pkt, buf, (*rrset)->dname);
@@ -520,7 +520,7 @@ store_rrset(ldns_buffer* pkt, struct msg_parse* msg, struct module_env* env,
struct ub_packed_rrset_key* k;
struct packed_rrset_data* d;
struct rrset_ref ref;
- uint32_t now = *env->now;
+ time_t now = *env->now;
k = alloc_special_obtain(env->alloc);
if(!k)
@@ -646,14 +646,16 @@ scrub_sanitize(ldns_buffer* pkt, struct msg_parse* msg,
/* remove private addresses */
if( (rrset->type == LDNS_RR_TYPE_A ||
- rrset->type == LDNS_RR_TYPE_AAAA) &&
- priv_rrset_bad(ie->priv, pkt, rrset)) {
+ rrset->type == LDNS_RR_TYPE_AAAA)) {
/* do not set servfail since this leads to too
* many drops of other people using rfc1918 space */
- remove_rrset("sanitize: removing public name with "
- "private address", pkt, msg, prev, &rrset);
- continue;
+ /* also do not remove entire rrset, unless all records
+ * in it are bad */
+ if(priv_rrset_bad(ie->priv, pkt, rrset)) {
+ remove_rrset(NULL, pkt, msg, prev, &rrset);
+ continue;
+ }
}
/* skip DNAME records -- they will always be followed by a
diff --git a/iterator/iter_utils.c b/iterator/iter_utils.c
index a500c75e786a..28f7dc2415c1 100644
--- a/iterator/iter_utils.c
+++ b/iterator/iter_utils.c
@@ -177,7 +177,7 @@ iter_apply_cfg(struct iter_env* iter_env, struct config_file* cfg)
*/
static int
iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
- uint8_t* name, size_t namelen, uint16_t qtype, uint32_t now,
+ uint8_t* name, size_t namelen, uint16_t qtype, time_t now,
struct delegpt_addr* a)
{
int rtt, lame, reclame, dnsseclame;
@@ -217,14 +217,16 @@ iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
/* select remainder from worst to best */
else if(reclame)
return rtt+USEFUL_SERVER_TOP_TIMEOUT*3; /* nonpref */
- else if(dnsseclame )
+ else if(dnsseclame || a->dnsseclame)
return rtt+USEFUL_SERVER_TOP_TIMEOUT*2; /* nonpref */
else if(a->lame)
return rtt+USEFUL_SERVER_TOP_TIMEOUT+1; /* nonpref */
else return rtt;
}
/* no server information present */
- if(a->lame)
+ if(a->dnsseclame)
+ return UNKNOWN_SERVER_NICENESS+USEFUL_SERVER_TOP_TIMEOUT*2; /* nonpref */
+ else if(a->lame)
return USEFUL_SERVER_TOP_TIMEOUT+1+UNKNOWN_SERVER_NICENESS; /* nonpref */
return UNKNOWN_SERVER_NICENESS;
}
@@ -232,7 +234,7 @@ iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
/** lookup RTT information, and also store fastest rtt (if any) */
static int
iter_fill_rtt(struct iter_env* iter_env, struct module_env* env,
- uint8_t* name, size_t namelen, uint16_t qtype, uint32_t now,
+ uint8_t* name, size_t namelen, uint16_t qtype, time_t now,
struct delegpt* dp, int* best_rtt, struct sock_list* blacklist)
{
int got_it = 0;
@@ -261,7 +263,7 @@ iter_fill_rtt(struct iter_env* iter_env, struct module_env* env,
* returns number of best targets (or 0, no suitable targets) */
static int
iter_filter_order(struct iter_env* iter_env, struct module_env* env,
- uint8_t* name, size_t namelen, uint16_t qtype, uint32_t now,
+ uint8_t* name, size_t namelen, uint16_t qtype, time_t now,
struct delegpt* dp, int* selected_rtt, int open_target,
struct sock_list* blacklist)
{
@@ -420,7 +422,7 @@ dns_copy_msg(struct dns_msg* from, struct regional* region)
void
iter_dns_store(struct module_env* env, struct query_info* msgqinf,
- struct reply_info* msgrep, int is_referral, uint32_t leeway, int pside,
+ struct reply_info* msgrep, int is_referral, time_t leeway, int pside,
struct regional* region)
{
if(!dns_cache_store(env, msgqinf, msgrep, is_referral, leeway,
@@ -768,7 +770,7 @@ void iter_store_parentside_neg(struct module_env* env,
/* TTL: NS from referral in iq->deleg_msg,
* or first RR from iq->response,
* or servfail5secs if !iq->response */
- uint32_t ttl = NORR_TTL;
+ time_t ttl = NORR_TTL;
struct ub_packed_rrset_key* neg;
struct packed_rrset_data* newd;
if(rep) {
@@ -798,7 +800,7 @@ void iter_store_parentside_neg(struct module_env* env,
neg->entry.hash = rrset_key_hash(&neg->rk);
newd = (struct packed_rrset_data*)regional_alloc_zero(env->scratch,
sizeof(struct packed_rrset_data) + sizeof(size_t) +
- sizeof(uint8_t*) + sizeof(uint32_t) + sizeof(uint16_t));
+ sizeof(uint8_t*) + sizeof(time_t) + sizeof(uint16_t));
if(!newd) {
log_err("out of memory in store_parentside_neg");
return;
diff --git a/iterator/iter_utils.h b/iterator/iter_utils.h
index 8f5a291af678..2070622d4758 100644
--- a/iterator/iter_utils.h
+++ b/iterator/iter_utils.h
@@ -131,7 +131,7 @@ struct dns_msg* dns_copy_msg(struct dns_msg* from, struct regional* regional);
* but the query resolution can continue without cache storage.
*/
void iter_dns_store(struct module_env* env, struct query_info* qinf,
- struct reply_info* rep, int is_referral, uint32_t leeway, int pside,
+ struct reply_info* rep, int is_referral, time_t leeway, int pside,
struct regional* region);
/**
diff --git a/iterator/iterator.c b/iterator/iterator.c
index e3f058fe5122..160489331703 100644
--- a/iterator/iterator.c
+++ b/iterator/iterator.c
@@ -1409,6 +1409,35 @@ query_for_targets(struct module_qstate* qstate, struct iter_qstate* iq,
return 1;
}
+/** see if last resort is possible - does config allow queries to parent */
+static int
+can_have_last_resort(struct module_env* env, struct delegpt* dp,
+ struct iter_qstate* iq)
+{
+ struct delegpt* fwddp;
+ struct iter_hints_stub* stub;
+ /* do not process a last resort (the parent side) if a stub
+ * or forward is configured, because we do not want to go 'above'
+ * the configured servers */
+ if(!dname_is_root(dp->name) && (stub = (struct iter_hints_stub*)
+ name_tree_find(&env->hints->tree, dp->name, dp->namelen,
+ dp->namelabs, iq->qchase.qclass)) &&
+ /* has_parent side is turned off for stub_first, where we
+ * are allowed to go to the parent */
+ stub->dp->has_parent_side_NS) {
+ verbose(VERB_QUERY, "configured stub servers failed -- returning SERVFAIL");
+ return 0;
+ }
+ if((fwddp = forwards_find(env->fwds, dp->name, iq->qchase.qclass)) &&
+ /* has_parent_side is turned off for forward_first, where
+ * we are allowed to go to the parent */
+ fwddp->has_parent_side_NS) {
+ verbose(VERB_QUERY, "configured forward servers failed -- returning SERVFAIL");
+ return 0;
+ }
+ return 1;
+}
+
/**
* Called by processQueryTargets when it would like extra targets to query
* but it seems to be out of options. At last resort some less appealing
@@ -1430,6 +1459,11 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq,
verbose(VERB_ALGO, "No more query targets, attempting last resort");
log_assert(iq->dp);
+ if(!can_have_last_resort(qstate->env, iq->dp, iq)) {
+ /* fail -- no more targets, no more hope of targets, no hope
+ * of a response. */
+ return error_response_cache(qstate, id, LDNS_RCODE_SERVFAIL);
+ }
if(!iq->dp->has_parent_side_NS && dname_is_root(iq->dp->name)) {
struct delegpt* p = hints_lookup_root(qstate->env->hints,
iq->qchase.qclass);
@@ -1439,7 +1473,7 @@ processLastResort(struct module_qstate* qstate, struct iter_qstate* iq,
iq->chase_flags &= ~BIT_RD; /* go to authorities */
for(ns = p->nslist; ns; ns=ns->next) {
(void)delegpt_add_ns(iq->dp, qstate->region,
- ns->name, (int)ns->lame);
+ ns->name, ns->lame);
}
for(a = p->target_list; a; a=a->next_target) {
(void)delegpt_add_addr(iq->dp, qstate->region,
@@ -1880,12 +1914,23 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
&& type != RESPONSE_TYPE_UNTYPED) {
/* a possible answer, see if it is missing DNSSEC */
/* but not when forwarding, so we dont mark fwder lame */
- /* also make sure the answer is from the zone we expected,
- * otherwise, (due to parent,child on same server), we
- * might mark the server,zone lame inappropriately */
- if(!iter_msg_has_dnssec(iq->response) &&
- iter_msg_from_zone(iq->response, iq->dp, type,
- iq->qchase.qclass)) {
+ if(!iter_msg_has_dnssec(iq->response)) {
+ /* Mark this address as dnsseclame in this dp,
+ * because that will make serverselection disprefer
+ * it, but also, once it is the only final option,
+ * use dnssec-lame-bypass if it needs to query there.*/
+ if(qstate->reply) {
+ struct delegpt_addr* a = delegpt_find_addr(
+ iq->dp, &qstate->reply->addr,
+ qstate->reply->addrlen);
+ if(a) a->dnsseclame = 1;
+ }
+ /* test the answer is from the zone we expected,
+ * otherwise, (due to parent,child on same server), we
+ * might mark the server,zone lame inappropriately */
+ if(!iter_msg_from_zone(iq->response, iq->dp, type,
+ iq->qchase.qclass))
+ qstate->reply = NULL;
type = RESPONSE_TYPE_LAME;
dnsseclame = 1;
}
@@ -2117,8 +2162,7 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
*qstate->env->now, dnsseclame, 0,
iq->qchase.qtype))
log_err("mark host lame: out of memory");
- } else log_err("%slame response from cache",
- dnsseclame?"DNSSEC ":"");
+ }
} else if(type == RESPONSE_TYPE_REC_LAME) {
/* Cache the LAMEness. */
verbose(VERB_DETAIL, "query response REC_LAME: "
@@ -2326,12 +2370,12 @@ processTargetResponse(struct module_qstate* qstate, int id,
rrset->rk.dname_len)) {
/* if dpns->lame then set newcname ns lame too */
if(!delegpt_add_ns(foriq->dp, forq->region,
- rrset->rk.dname, (int)dpns->lame))
+ rrset->rk.dname, dpns->lame))
log_err("out of memory adding cnamed-ns");
}
/* if dpns->lame then set the address(es) lame too */
if(!delegpt_add_rrset(foriq->dp, forq->region, rrset,
- (int)dpns->lame))
+ dpns->lame))
log_err("out of memory adding targets");
verbose(VERB_ALGO, "added target response");
delegpt_log(VERB_ALGO, foriq->dp);
diff --git a/libunbound/context.c b/libunbound/context.c
index f28307971b4d..18f34e454143 100644
--- a/libunbound/context.c
+++ b/libunbound/context.c
@@ -124,7 +124,7 @@ find_id(struct ub_ctx* ctx, int* id)
}
struct ctx_query*
-context_new(struct ub_ctx* ctx, char* name, int rrtype, int rrclass,
+context_new(struct ub_ctx* ctx, const char* name, int rrtype, int rrclass,
ub_callback_t cb, void* cbarg)
{
struct ctx_query* q = (struct ctx_query*)calloc(1, sizeof(*q));
diff --git a/libunbound/context.h b/libunbound/context.h
index 8898f3ebfdf9..23db869ac751 100644
--- a/libunbound/context.h
+++ b/libunbound/context.h
@@ -234,7 +234,7 @@ void context_query_delete(struct ctx_query* q);
* @param cbarg: user arg for async queries.
* @return new ctx_query or NULL for malloc failure.
*/
-struct ctx_query* context_new(struct ub_ctx* ctx, char* name, int rrtype,
+struct ctx_query* context_new(struct ub_ctx* ctx, const char* name, int rrtype,
int rrclass, ub_callback_t cb, void* cbarg);
/**
diff --git a/libunbound/libunbound.c b/libunbound/libunbound.c
index 10d00ddc521d..999478ef38a2 100644
--- a/libunbound/libunbound.c
+++ b/libunbound/libunbound.c
@@ -60,6 +60,9 @@
#include "services/localzone.h"
#include "services/cache/infra.h"
#include "services/cache/rrset.h"
+#ifdef HAVE_PTHREAD
+#include <signal.h>
+#endif
#if defined(UB_ON_WINDOWS) && defined (HAVE_WINDOWS_H)
#include <windows.h>
@@ -155,11 +158,9 @@ delq(rbnode_t* n, void* ATTR_UNUSED(arg))
context_query_delete(q);
}
-void
-ub_ctx_delete(struct ub_ctx* ctx)
+/** stop the bg thread */
+static void ub_stop_bg(struct ub_ctx* ctx)
{
- struct alloc_cache* a, *na;
- if(!ctx) return;
/* stop the bg thread */
lock_basic_lock(&ctx->cfglock);
if(ctx->created_bg) {
@@ -195,7 +196,28 @@ ub_ctx_delete(struct ub_ctx* ctx)
else {
lock_basic_unlock(&ctx->cfglock);
}
+}
+
+void
+ub_ctx_delete(struct ub_ctx* ctx)
+{
+ struct alloc_cache* a, *na;
+ int do_stop = 1;
+ if(!ctx) return;
+ /* see if bg thread is created and if threads have been killed */
+ /* no locks, because those may be held by terminated threads */
+ /* for processes the read pipe is closed and we see that on read */
+#ifdef HAVE_PTHREAD
+ if(ctx->created_bg && ctx->dothread) {
+ if(pthread_kill(ctx->bg_tid, 0) == ESRCH) {
+ /* thread has been killed */
+ do_stop = 0;
+ }
+ }
+#endif /* HAVE_PTHREAD */
+ if(do_stop)
+ ub_stop_bg(ctx);
modstack_desetup(&ctx->mods, ctx->env);
a = ctx->alloc_list;
@@ -229,7 +251,7 @@ ub_ctx_delete(struct ub_ctx* ctx)
}
int
-ub_ctx_set_option(struct ub_ctx* ctx, char* opt, char* val)
+ub_ctx_set_option(struct ub_ctx* ctx, const char* opt, const char* val)
{
lock_basic_lock(&ctx->cfglock);
if(ctx->finalized) {
@@ -245,7 +267,7 @@ ub_ctx_set_option(struct ub_ctx* ctx, char* opt, char* val)
}
int
-ub_ctx_get_option(struct ub_ctx* ctx, char* opt, char** str)
+ub_ctx_get_option(struct ub_ctx* ctx, const char* opt, char** str)
{
int r;
lock_basic_lock(&ctx->cfglock);
@@ -258,7 +280,7 @@ ub_ctx_get_option(struct ub_ctx* ctx, char* opt, char** str)
}
int
-ub_ctx_config(struct ub_ctx* ctx, char* fname)
+ub_ctx_config(struct ub_ctx* ctx, const char* fname)
{
lock_basic_lock(&ctx->cfglock);
if(ctx->finalized) {
@@ -274,7 +296,7 @@ ub_ctx_config(struct ub_ctx* ctx, char* fname)
}
int
-ub_ctx_add_ta(struct ub_ctx* ctx, char* ta)
+ub_ctx_add_ta(struct ub_ctx* ctx, const char* ta)
{
char* dup = strdup(ta);
if(!dup) return UB_NOMEM;
@@ -294,7 +316,7 @@ ub_ctx_add_ta(struct ub_ctx* ctx, char* ta)
}
int
-ub_ctx_add_ta_file(struct ub_ctx* ctx, char* fname)
+ub_ctx_add_ta_file(struct ub_ctx* ctx, const char* fname)
{
char* dup = strdup(fname);
if(!dup) return UB_NOMEM;
@@ -314,7 +336,7 @@ ub_ctx_add_ta_file(struct ub_ctx* ctx, char* fname)
}
int
-ub_ctx_trustedkeys(struct ub_ctx* ctx, char* fname)
+ub_ctx_trustedkeys(struct ub_ctx* ctx, const char* fname)
{
char* dup = strdup(fname);
if(!dup) return UB_NOMEM;
@@ -547,7 +569,7 @@ ub_wait(struct ub_ctx* ctx)
}
int
-ub_resolve(struct ub_ctx* ctx, char* name, int rrtype,
+ub_resolve(struct ub_ctx* ctx, const char* name, int rrtype,
int rrclass, struct ub_result** result)
{
struct ctx_query* q;
@@ -591,7 +613,7 @@ ub_resolve(struct ub_ctx* ctx, char* name, int rrtype,
}
int
-ub_resolve_async(struct ub_ctx* ctx, char* name, int rrtype,
+ub_resolve_async(struct ub_ctx* ctx, const char* name, int rrtype,
int rrclass, void* mydata, ub_callback_t callback, int* async_id)
{
struct ctx_query* q;
@@ -732,7 +754,7 @@ ub_strerror(int err)
}
int
-ub_ctx_set_fwd(struct ub_ctx* ctx, char* addr)
+ub_ctx_set_fwd(struct ub_ctx* ctx, const char* addr)
{
struct sockaddr_storage storage;
socklen_t stlen;
@@ -804,7 +826,7 @@ ub_ctx_set_fwd(struct ub_ctx* ctx, char* addr)
}
int
-ub_ctx_resolvconf(struct ub_ctx* ctx, char* fname)
+ub_ctx_resolvconf(struct ub_ctx* ctx, const char* fname)
{
FILE* in;
int numserv = 0;
@@ -890,7 +912,7 @@ ub_ctx_resolvconf(struct ub_ctx* ctx, char* fname)
}
int
-ub_ctx_hosts(struct ub_ctx* ctx, char* fname)
+ub_ctx_hosts(struct ub_ctx* ctx, const char* fname)
{
FILE* in;
char buf[1024], ldata[1024];
@@ -1016,7 +1038,8 @@ int ub_ctx_print_local_zones(struct ub_ctx* ctx)
}
/* Add a new zone */
-int ub_ctx_zone_add(struct ub_ctx* ctx, char *zone_name, char *zone_type)
+int ub_ctx_zone_add(struct ub_ctx* ctx, const char *zone_name,
+ const char *zone_type)
{
enum localzone_type t;
struct local_zone* z;
@@ -1056,7 +1079,7 @@ int ub_ctx_zone_add(struct ub_ctx* ctx, char *zone_name, char *zone_type)
}
/* Remove zone */
-int ub_ctx_zone_remove(struct ub_ctx* ctx, char *zone_name)
+int ub_ctx_zone_remove(struct ub_ctx* ctx, const char *zone_name)
{
struct local_zone* z;
uint8_t* nm;
@@ -1082,7 +1105,7 @@ int ub_ctx_zone_remove(struct ub_ctx* ctx, char *zone_name)
}
/* Add new RR data */
-int ub_ctx_data_add(struct ub_ctx* ctx, char *data)
+int ub_ctx_data_add(struct ub_ctx* ctx, const char *data)
{
ldns_buffer* buf;
int res = ub_ctx_finalize(ctx);
@@ -1100,7 +1123,7 @@ int ub_ctx_data_add(struct ub_ctx* ctx, char *data)
}
/* Remove RR data */
-int ub_ctx_data_remove(struct ub_ctx* ctx, char *data)
+int ub_ctx_data_remove(struct ub_ctx* ctx, const char *data)
{
uint8_t* nm;
int nmlabs;
diff --git a/libunbound/libworker.c b/libunbound/libworker.c
index bd61cea154a2..8f2aa489caf7 100644
--- a/libunbound/libworker.c
+++ b/libunbound/libworker.c
@@ -198,7 +198,10 @@ libworker_setup(struct ub_ctx* ctx, int is_bg)
}
numports = cfg_condense_ports(cfg, &ports);
if(numports == 0) {
+ int locked = !w->is_bg || w->is_bg_thread;
libworker_delete(w);
+ if(locked)
+ lock_basic_unlock(&ctx->cfglock);
return NULL;
}
w->back = outside_network_create(w->base, cfg->msg_buffer_size,
@@ -372,6 +375,11 @@ int libworker_bg(struct ub_ctx* ctx)
case -1:
return UB_FORKFAIL;
default:
+ /* close non-used parts, so that the worker
+ * bgprocess gets 'pipe closed' when the
+ * main process exits */
+ tube_close_read(ctx->qq_pipe);
+ tube_close_write(ctx->rr_pipe);
break;
}
#endif /* HAVE_FORK */
diff --git a/libunbound/unbound.h b/libunbound/unbound.h
index d435bf28d35e..191338706c3d 100644
--- a/libunbound/unbound.h
+++ b/libunbound/unbound.h
@@ -78,6 +78,10 @@
* ... same as async for non-threaded
* ... the callbacks are called in the thread that calls process(ctx)
*
+ * Openssl needs to have locking in place, and the application must set
+ * it up, because a mere library cannot do this, use the calls
+ * CRYPTO_set_id_callback and CRYPTO_set_locking_callback.
+ *
* If no threading is compiled in, the above async example uses fork(2) to
* create a process to perform the work. The forked process exits when the
* calling process exits, or ctx_delete() is called.
@@ -97,6 +101,11 @@
extern "C" {
#endif
+/** the version of this header file */
+#define UNBOUND_VERSION_MAJOR @UNBOUND_VERSION_MAJOR@
+#define UNBOUND_VERSION_MINOR @UNBOUND_VERSION_MINOR@
+#define UNBOUND_VERSION_MICRO @UNBOUND_VERSION_MICRO@
+
/**
* The validation context is created to hold the resolver status,
* validation keys and a small cache (containing messages, rrsets,
@@ -245,7 +254,7 @@ void ub_ctx_delete(struct ub_ctx* ctx);
* @param val: value of the option.
* @return: 0 if OK, else error.
*/
-int ub_ctx_set_option(struct ub_ctx* ctx, char* opt, char* val);
+int ub_ctx_set_option(struct ub_ctx* ctx, const char* opt, const char* val);
/**
* Get an option from the context.
@@ -261,7 +270,7 @@ int ub_ctx_set_option(struct ub_ctx* ctx, char* opt, char* val);
* returned in the string.
* @return 0 if OK else an error code (malloc failure, syntax error).
*/
-int ub_ctx_get_option(struct ub_ctx* ctx, char* opt, char** str);
+int ub_ctx_get_option(struct ub_ctx* ctx, const char* opt, char** str);
/**
* setup configuration for the given context.
@@ -273,7 +282,7 @@ int ub_ctx_get_option(struct ub_ctx* ctx, char* opt, char** str);
* routines exist.
* @return: 0 if OK, else error.
*/
-int ub_ctx_config(struct ub_ctx* ctx, char* fname);
+int ub_ctx_config(struct ub_ctx* ctx, const char* fname);
/**
* Set machine to forward DNS queries to, the caching resolver to use.
@@ -292,7 +301,7 @@ int ub_ctx_config(struct ub_ctx* ctx, char* fname);
* If the addr is NULL, forwarding is disabled.
* @return 0 if OK, else error.
*/
-int ub_ctx_set_fwd(struct ub_ctx* ctx, char* addr);
+int ub_ctx_set_fwd(struct ub_ctx* ctx, const char* addr);
/**
* Read list of nameservers to use from the filename given.
@@ -308,7 +317,7 @@ int ub_ctx_set_fwd(struct ub_ctx* ctx, char* addr);
* @param fname: file name string. If NULL "/etc/resolv.conf" is used.
* @return 0 if OK, else error.
*/
-int ub_ctx_resolvconf(struct ub_ctx* ctx, char* fname);
+int ub_ctx_resolvconf(struct ub_ctx* ctx, const char* fname);
/**
* Read list of hosts from the filename given.
@@ -321,7 +330,7 @@ int ub_ctx_resolvconf(struct ub_ctx* ctx, char* fname);
* @param fname: file name string. If NULL "/etc/hosts" is used.
* @return 0 if OK, else error.
*/
-int ub_ctx_hosts(struct ub_ctx* ctx, char* fname);
+int ub_ctx_hosts(struct ub_ctx* ctx, const char* fname);
/**
* Add a trust anchor to the given context.
@@ -334,7 +343,7 @@ int ub_ctx_hosts(struct ub_ctx* ctx, char* fname);
* [domainname] [TTL optional] [type] [class optional] [rdata contents]
* @return 0 if OK, else error.
*/
-int ub_ctx_add_ta(struct ub_ctx* ctx, char* ta);
+int ub_ctx_add_ta(struct ub_ctx* ctx, const char* ta);
/**
* Add trust anchors to the given context.
@@ -345,7 +354,7 @@ int ub_ctx_add_ta(struct ub_ctx* ctx, char* ta);
* @param fname: filename of file with keyfile with trust anchors.
* @return 0 if OK, else error.
*/
-int ub_ctx_add_ta_file(struct ub_ctx* ctx, char* fname);
+int ub_ctx_add_ta_file(struct ub_ctx* ctx, const char* fname);
/**
* Add trust anchors to the given context.
@@ -357,7 +366,7 @@ int ub_ctx_add_ta_file(struct ub_ctx* ctx, char* fname);
* anchors.
* @return 0 if OK, else error.
*/
-int ub_ctx_trustedkeys(struct ub_ctx* ctx, char* fname);
+int ub_ctx_trustedkeys(struct ub_ctx* ctx, const char* fname);
/**
* Set debug output (and error output) to the specified stream.
@@ -442,7 +451,7 @@ int ub_process(struct ub_ctx* ctx);
* in that case (out of memory).
* @return 0 if OK, else error.
*/
-int ub_resolve(struct ub_ctx* ctx, char* name, int rrtype,
+int ub_resolve(struct ub_ctx* ctx, const char* name, int rrtype,
int rrclass, struct ub_result** result);
/**
@@ -473,7 +482,7 @@ int ub_resolve(struct ub_ctx* ctx, char* name, int rrtype,
* cancel the query.
* @return 0 if OK, else error.
*/
-int ub_resolve_async(struct ub_ctx* ctx, char* name, int rrtype,
+int ub_resolve_async(struct ub_ctx* ctx, const char* name, int rrtype,
int rrclass, void* mydata, ub_callback_t callback, int* async_id);
/**
@@ -520,7 +529,8 @@ int ub_ctx_print_local_zones(struct ub_ctx* ctx);
* @param zone_type: type of the zone (like for unbound.conf) in text.
* @return 0 if OK, else error.
*/
-int ub_ctx_zone_add(struct ub_ctx* ctx, char *zone_name, char *zone_type);
+int ub_ctx_zone_add(struct ub_ctx* ctx, const char *zone_name,
+ const char *zone_type);
/**
* Remove zone from local authority info of the library.
@@ -529,7 +539,7 @@ int ub_ctx_zone_add(struct ub_ctx* ctx, char *zone_name, char *zone_type);
* If it does not exist, nothing happens.
* @return 0 if OK, else error.
*/
-int ub_ctx_zone_remove(struct ub_ctx* ctx, char *zone_name);
+int ub_ctx_zone_remove(struct ub_ctx* ctx, const char *zone_name);
/**
* Add localdata to the library local authority info.
@@ -539,7 +549,7 @@ int ub_ctx_zone_remove(struct ub_ctx* ctx, char *zone_name);
* "www.example.com IN A 127.0.0.1"
* @return 0 if OK, else error.
*/
-int ub_ctx_data_add(struct ub_ctx* ctx, char *data);
+int ub_ctx_data_add(struct ub_ctx* ctx, const char *data);
/**
* Remove localdata from the library local authority info.
@@ -547,7 +557,7 @@ int ub_ctx_data_add(struct ub_ctx* ctx, char *data);
* @param data: the name to delete all data from, like "www.example.com".
* @return 0 if OK, else error.
*/
-int ub_ctx_data_remove(struct ub_ctx* ctx, char *data);
+int ub_ctx_data_remove(struct ub_ctx* ctx, const char *data);
/**
* Get a version string from the libunbound implementation.
diff --git a/services/cache/dns.c b/services/cache/dns.c
index 6e99b7fa4a88..7dadb5c39656 100644
--- a/services/cache/dns.c
+++ b/services/cache/dns.c
@@ -66,8 +66,8 @@
* @param region: for qrep allocs.
*/
static void
-store_rrsets(struct module_env* env, struct reply_info* rep, uint32_t now,
- uint32_t leeway, int pside, struct reply_info* qrep,
+store_rrsets(struct module_env* env, struct reply_info* rep, time_t now,
+ time_t leeway, int pside, struct reply_info* qrep,
struct regional* region)
{
size_t i;
@@ -105,11 +105,11 @@ store_rrsets(struct module_env* env, struct reply_info* rep, uint32_t now,
void
dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
- hashvalue_t hash, struct reply_info* rep, uint32_t leeway, int pside,
+ hashvalue_t hash, struct reply_info* rep, time_t leeway, int pside,
struct reply_info* qrep, struct regional* region)
{
struct msgreply_entry* e;
- uint32_t ttl = rep->ttl;
+ time_t ttl = rep->ttl;
size_t i;
/* store RRsets */
@@ -142,7 +142,7 @@ dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
/** find closest NS or DNAME and returns the rrset (locked) */
static struct ub_packed_rrset_key*
find_closest_of_type(struct module_env* env, uint8_t* qname, size_t qnamelen,
- uint16_t qclass, uint32_t now, uint16_t searchtype, int stripfront)
+ uint16_t qclass, time_t now, uint16_t searchtype, int stripfront)
{
struct ub_packed_rrset_key *rrset;
uint8_t lablen;
@@ -171,7 +171,7 @@ find_closest_of_type(struct module_env* env, uint8_t* qname, size_t qnamelen,
/** add addr to additional section */
static void
addr_to_additional(struct ub_packed_rrset_key* rrset, struct regional* region,
- struct dns_msg* msg, uint32_t now)
+ struct dns_msg* msg, time_t now)
{
if((msg->rep->rrsets[msg->rep->rrset_count] =
packed_rrset_copy_region(rrset, region, now))) {
@@ -183,7 +183,7 @@ addr_to_additional(struct ub_packed_rrset_key* rrset, struct regional* region,
/** lookup message in message cache */
static struct msgreply_entry*
msg_cache_lookup(struct module_env* env, uint8_t* qname, size_t qnamelen,
- uint16_t qtype, uint16_t qclass, uint32_t now, int wr)
+ uint16_t qtype, uint16_t qclass, time_t now, int wr)
{
struct lruhash_entry* e;
struct query_info k;
@@ -207,7 +207,7 @@ msg_cache_lookup(struct module_env* env, uint8_t* qname, size_t qnamelen,
/** find and add A and AAAA records for nameservers in delegpt */
static int
find_add_addrs(struct module_env* env, uint16_t qclass,
- struct regional* region, struct delegpt* dp, uint32_t now,
+ struct regional* region, struct delegpt* dp, time_t now,
struct dns_msg** msg)
{
struct delegpt_ns* ns;
@@ -262,12 +262,12 @@ cache_fill_missing(struct module_env* env, uint16_t qclass,
struct delegpt_ns* ns;
struct msgreply_entry* neg;
struct ub_packed_rrset_key* akey;
- uint32_t now = *env->now;
+ time_t now = *env->now;
for(ns = dp->nslist; ns; ns = ns->next) {
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, (int)ns->lame)) {
+ if(!delegpt_add_rrset_A(dp, region, akey, ns->lame)) {
lock_rw_unlock(&akey->entry.lock);
return 0;
}
@@ -285,7 +285,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, (int)ns->lame)) {
+ if(!delegpt_add_rrset_AAAA(dp, region, akey, ns->lame)) {
lock_rw_unlock(&akey->entry.lock);
return 0;
}
@@ -307,7 +307,7 @@ cache_fill_missing(struct module_env* env, uint16_t qclass,
/** find and add DS or NSEC to delegation msg */
static void
find_add_ds(struct module_env* env, struct regional* region,
- struct dns_msg* msg, struct delegpt* dp, uint32_t now)
+ struct dns_msg* msg, struct delegpt* dp, time_t now)
{
/* Lookup the DS or NSEC at the delegation point. */
struct ub_packed_rrset_key* rrset = rrset_cache_lookup(
@@ -369,7 +369,7 @@ dns_msg_create(uint8_t* qname, size_t qnamelen, uint16_t qtype,
int
dns_msg_authadd(struct dns_msg* msg, struct regional* region,
- struct ub_packed_rrset_key* rrset, uint32_t now)
+ struct ub_packed_rrset_key* rrset, time_t now)
{
if(!(msg->rep->rrsets[msg->rep->rrset_count++] =
packed_rrset_copy_region(rrset, region, now)))
@@ -381,7 +381,7 @@ dns_msg_authadd(struct dns_msg* msg, struct regional* region,
struct delegpt*
dns_cache_find_delegation(struct module_env* env, uint8_t* qname,
size_t qnamelen, uint16_t qtype, uint16_t qclass,
- struct regional* region, struct dns_msg** msg, uint32_t now)
+ struct regional* region, struct dns_msg** msg, time_t now)
{
/* try to find closest NS rrset */
struct ub_packed_rrset_key* nskey;
@@ -455,7 +455,7 @@ gen_dns_msg(struct regional* region, struct query_info* q, size_t num)
/** generate dns_msg from cached message */
static struct dns_msg*
tomsg(struct module_env* env, struct query_info* q, struct reply_info* r,
- struct regional* region, uint32_t now, struct regional* scratch)
+ struct regional* region, time_t now, struct regional* scratch)
{
struct dns_msg* msg;
size_t i;
@@ -506,7 +506,7 @@ tomsg(struct module_env* env, struct query_info* q, struct reply_info* r,
/** synthesize RRset-only response from cached RRset item */
static struct dns_msg*
rrset_msg(struct ub_packed_rrset_key* rrset, struct regional* region,
- uint32_t now, struct query_info* q)
+ time_t now, struct query_info* q)
{
struct dns_msg* msg;
struct packed_rrset_data* d = (struct packed_rrset_data*)
@@ -535,7 +535,7 @@ rrset_msg(struct ub_packed_rrset_key* rrset, struct regional* region,
/** synthesize DNAME+CNAME response from cached DNAME item */
static struct dns_msg*
synth_dname_msg(struct ub_packed_rrset_key* rrset, struct regional* region,
- uint32_t now, struct query_info* q)
+ time_t now, struct query_info* q)
{
struct dns_msg* msg;
struct ub_packed_rrset_key* ck;
@@ -599,7 +599,7 @@ synth_dname_msg(struct ub_packed_rrset_key* rrset, struct regional* region,
ck->entry.hash = rrset_key_hash(&ck->rk);
newd = (struct packed_rrset_data*)regional_alloc_zero(region,
sizeof(struct packed_rrset_data) + sizeof(size_t) +
- sizeof(uint8_t*) + sizeof(uint32_t) + sizeof(uint16_t)
+ sizeof(uint8_t*) + sizeof(time_t) + sizeof(uint16_t)
+ newlen);
if(!newd)
return NULL;
@@ -630,7 +630,7 @@ dns_cache_lookup(struct module_env* env,
struct lruhash_entry* e;
struct query_info k;
hashvalue_t h;
- uint32_t now = *env->now;
+ time_t now = *env->now;
struct ub_packed_rrset_key* rrset;
/* lookup first, this has both NXdomains and ANSWER responses */
@@ -739,7 +739,7 @@ dns_cache_lookup(struct module_env* env,
int
dns_cache_store(struct module_env* env, struct query_info* msgqinf,
- struct reply_info* msgrep, int is_referral, uint32_t leeway, int pside,
+ struct reply_info* msgrep, int is_referral, time_t leeway, int pside,
struct regional* region)
{
struct reply_info* rep = NULL;
diff --git a/services/cache/dns.h b/services/cache/dns.h
index bc9f57c9c0d9..508f34441118 100644
--- a/services/cache/dns.h
+++ b/services/cache/dns.h
@@ -82,7 +82,7 @@ struct dns_msg {
* @return 0 on alloc error (out of memory).
*/
int dns_cache_store(struct module_env* env, struct query_info* qinf,
- struct reply_info* rep, int is_referral, uint32_t leeway, int pside,
+ struct reply_info* rep, int is_referral, time_t leeway, int pside,
struct regional* region);
/**
@@ -105,7 +105,7 @@ int dns_cache_store(struct module_env* env, struct query_info* qinf,
* @param region: to allocate into for qmsg.
*/
void dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
- hashvalue_t hash, struct reply_info* rep, uint32_t leeway, int pside,
+ hashvalue_t hash, struct reply_info* rep, time_t leeway, int pside,
struct reply_info* qrep, struct regional* region);
/**
@@ -123,7 +123,7 @@ void dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
*/
struct delegpt* dns_cache_find_delegation(struct module_env* env,
uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
- struct regional* region, struct dns_msg** msg, uint32_t timenow);
+ struct regional* region, struct dns_msg** msg, time_t timenow);
/**
* Find cached message
@@ -177,6 +177,6 @@ struct dns_msg* dns_msg_create(uint8_t* qname, size_t qnamelen, uint16_t qtype,
* @return true if worked, false on fail
*/
int dns_msg_authadd(struct dns_msg* msg, struct regional* region,
- struct ub_packed_rrset_key* rrset, uint32_t now);
+ struct ub_packed_rrset_key* rrset, time_t now);
#endif /* SERVICES_CACHE_DNS_H */
diff --git a/services/cache/infra.c b/services/cache/infra.c
index c674aca66754..42d6acad1a22 100644
--- a/services/cache/infra.c
+++ b/services/cache/infra.c
@@ -189,7 +189,7 @@ infra_lookup_nottl(struct infra_cache* infra, struct sockaddr_storage* addr,
/** init the data elements */
static void
data_entry_init(struct infra_cache* infra, struct lruhash_entry* e,
- uint32_t timenow)
+ time_t timenow)
{
struct infra_data* data = (struct infra_data*)e->data;
data->ttl = timenow + infra->host_ttl;
@@ -218,7 +218,7 @@ data_entry_init(struct infra_cache* infra, struct lruhash_entry* e,
*/
static struct lruhash_entry*
new_entry(struct infra_cache* infra, struct sockaddr_storage* addr,
- socklen_t addrlen, uint8_t* name, size_t namelen, uint32_t tm)
+ socklen_t addrlen, uint8_t* name, size_t namelen, time_t tm)
{
struct infra_data* data;
struct infra_key* key = (struct infra_key*)malloc(sizeof(*key));
@@ -248,7 +248,7 @@ new_entry(struct infra_cache* infra, struct sockaddr_storage* addr,
int
infra_host(struct infra_cache* infra, struct sockaddr_storage* addr,
- socklen_t addrlen, uint8_t* nm, size_t nmlen, uint32_t timenow,
+ socklen_t addrlen, uint8_t* nm, size_t nmlen, time_t timenow,
int* edns_vs, uint8_t* edns_lame_known, int* to)
{
struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen,
@@ -317,7 +317,7 @@ infra_host(struct infra_cache* infra, struct sockaddr_storage* addr,
int
infra_set_lame(struct infra_cache* infra, struct sockaddr_storage* addr,
- socklen_t addrlen, uint8_t* nm, size_t nmlen, uint32_t timenow,
+ socklen_t addrlen, uint8_t* nm, size_t nmlen, time_t timenow,
int dnsseclame, int reclame, uint16_t qtype)
{
struct infra_data* data;
@@ -374,7 +374,7 @@ infra_update_tcp_works(struct infra_cache* infra,
int
infra_rtt_update(struct infra_cache* infra, struct sockaddr_storage* addr,
socklen_t addrlen, uint8_t* nm, size_t nmlen, int qtype,
- int roundtrip, int orig_rtt, uint32_t timenow)
+ int roundtrip, int orig_rtt, time_t timenow)
{
struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen,
nm, nmlen, 1);
@@ -425,19 +425,19 @@ infra_rtt_update(struct infra_cache* infra, struct sockaddr_storage* addr,
return rto;
}
-int infra_get_host_rto(struct infra_cache* infra,
+long long infra_get_host_rto(struct infra_cache* infra,
struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* nm,
- size_t nmlen, struct rtt_info* rtt, int* delay, uint32_t timenow,
+ size_t nmlen, struct rtt_info* rtt, int* delay, time_t timenow,
int* tA, int* tAAAA, int* tother)
{
struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen,
nm, nmlen, 0);
struct infra_data* data;
- int ttl = -2;
+ long long ttl = -2;
if(!e) return -1;
data = (struct infra_data*)e->data;
if(data->ttl >= timenow) {
- ttl = (int)(data->ttl - timenow);
+ ttl = (long long)(data->ttl - timenow);
memmove(rtt, &data->rtt, sizeof(*rtt));
if(timenow < data->probedelay)
*delay = (int)(data->probedelay - timenow);
@@ -453,7 +453,7 @@ int infra_get_host_rto(struct infra_cache* infra,
int
infra_edns_update(struct infra_cache* infra, struct sockaddr_storage* addr,
socklen_t addrlen, uint8_t* nm, size_t nmlen, int edns_version,
- uint32_t timenow)
+ time_t timenow)
{
struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen,
nm, nmlen, 1);
@@ -485,7 +485,7 @@ int
infra_get_lame_rtt(struct infra_cache* infra,
struct sockaddr_storage* addr, socklen_t addrlen,
uint8_t* name, size_t namelen, uint16_t qtype,
- int* lame, int* dnsseclame, int* reclame, int* rtt, uint32_t timenow)
+ int* lame, int* dnsseclame, int* reclame, int* rtt, time_t timenow)
{
struct infra_data* host;
struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen,
diff --git a/services/cache/infra.h b/services/cache/infra.h
index 161f5ab4319e..d3976aed7113 100644
--- a/services/cache/infra.h
+++ b/services/cache/infra.h
@@ -68,10 +68,10 @@ struct infra_key {
*/
struct infra_data {
/** TTL value for this entry. absolute time. */
- uint32_t ttl;
+ time_t ttl;
/** time in seconds (absolute) when probing re-commences, 0 disabled */
- uint32_t probedelay;
+ time_t probedelay;
/** round trip times for timeout calculation */
struct rtt_info rtt;
@@ -173,7 +173,7 @@ struct lruhash_entry* infra_lookup_nottl(struct infra_cache* infra,
*/
int infra_host(struct infra_cache* infra, struct sockaddr_storage* addr,
socklen_t addrlen, uint8_t* name, size_t namelen,
- uint32_t timenow, int* edns_vs, uint8_t* edns_lame_known, int* to);
+ time_t timenow, int* edns_vs, uint8_t* edns_lame_known, int* to);
/**
* Set a host to be lame for the given zone.
@@ -192,7 +192,7 @@ int infra_host(struct infra_cache* infra, struct sockaddr_storage* addr,
*/
int infra_set_lame(struct infra_cache* infra,
struct sockaddr_storage* addr, socklen_t addrlen,
- uint8_t* name, size_t namelen, uint32_t timenow, int dnsseclame,
+ uint8_t* name, size_t namelen, time_t timenow, int dnsseclame,
int reclame, uint16_t qtype);
/**
@@ -212,7 +212,7 @@ int infra_set_lame(struct infra_cache* infra,
*/
int infra_rtt_update(struct infra_cache* infra, struct sockaddr_storage* addr,
socklen_t addrlen, uint8_t* name, size_t namelen, int qtype,
- int roundtrip, int orig_rtt, uint32_t timenow);
+ int roundtrip, int orig_rtt, time_t timenow);
/**
* Update information for the host, store that a TCP transaction works.
@@ -240,7 +240,7 @@ void infra_update_tcp_works(struct infra_cache* infra,
*/
int infra_edns_update(struct infra_cache* infra,
struct sockaddr_storage* addr, socklen_t addrlen,
- uint8_t* name, size_t namelen, int edns_version, uint32_t timenow);
+ uint8_t* name, size_t namelen, int edns_version, time_t timenow);
/**
* Get Lameness information and average RTT if host is in the cache.
@@ -263,7 +263,7 @@ int infra_edns_update(struct infra_cache* infra,
int infra_get_lame_rtt(struct infra_cache* infra,
struct sockaddr_storage* addr, socklen_t addrlen,
uint8_t* name, size_t namelen, uint16_t qtype,
- int* lame, int* dnsseclame, int* reclame, int* rtt, uint32_t timenow);
+ int* lame, int* dnsseclame, int* reclame, int* rtt, time_t timenow);
/**
* Get additional (debug) info on timing.
@@ -281,9 +281,9 @@ int infra_get_lame_rtt(struct infra_cache* infra,
* @return TTL the infra host element is valid for. If -1: not found in cache.
* TTL -2: found but expired.
*/
-int infra_get_host_rto(struct infra_cache* infra,
+long long infra_get_host_rto(struct infra_cache* infra,
struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* name,
- size_t namelen, struct rtt_info* rtt, int* delay, uint32_t timenow,
+ size_t namelen, struct rtt_info* rtt, int* delay, time_t timenow,
int* tA, int* tAAAA, int* tother);
/**
diff --git a/services/cache/rrset.c b/services/cache/rrset.c
index b9d20db0e5db..642236231121 100644
--- a/services/cache/rrset.c
+++ b/services/cache/rrset.c
@@ -120,7 +120,7 @@ rrset_cache_touch(struct rrset_cache* r, struct ub_packed_rrset_key* key,
/** see if rrset needs to be updated in the cache */
static int
-need_to_update_rrset(void* nd, void* cd, uint32_t timenow, int equal, int ns)
+need_to_update_rrset(void* nd, void* cd, time_t timenow, int equal, int ns)
{
struct packed_rrset_data* newd = (struct packed_rrset_data*)nd;
struct packed_rrset_data* cached = (struct packed_rrset_data*)cd;
@@ -181,7 +181,7 @@ rrset_update_id(struct rrset_ref* ref, struct alloc_cache* alloc)
int
rrset_cache_update(struct rrset_cache* r, struct rrset_ref* ref,
- struct alloc_cache* alloc, uint32_t timenow)
+ struct alloc_cache* alloc, time_t timenow)
{
struct lruhash_entry* e;
struct ub_packed_rrset_key* k = ref->key;
@@ -237,7 +237,7 @@ rrset_cache_update(struct rrset_cache* r, struct rrset_ref* ref,
struct ub_packed_rrset_key*
rrset_cache_lookup(struct rrset_cache* r, uint8_t* qname, size_t qnamelen,
- uint16_t qtype, uint16_t qclass, uint32_t flags, uint32_t timenow,
+ uint16_t qtype, uint16_t qclass, uint32_t flags, time_t timenow,
int wr)
{
struct lruhash_entry* e;
@@ -268,7 +268,7 @@ rrset_cache_lookup(struct rrset_cache* r, uint8_t* qname, size_t qnamelen,
}
int
-rrset_array_lock(struct rrset_ref* ref, size_t count, uint32_t timenow)
+rrset_array_lock(struct rrset_ref* ref, size_t count, time_t timenow)
{
size_t i;
for(i=0; i<count; i++) {
@@ -327,7 +327,7 @@ rrset_array_unlock_touch(struct rrset_cache* r, struct regional* scratch,
void
rrset_update_sec_status(struct rrset_cache* r,
- struct ub_packed_rrset_key* rrset, uint32_t now)
+ struct ub_packed_rrset_key* rrset, time_t now)
{
struct packed_rrset_data* updata =
(struct packed_rrset_data*)rrset->entry.data;
@@ -366,7 +366,7 @@ rrset_update_sec_status(struct rrset_cache* r,
void
rrset_check_sec_status(struct rrset_cache* r,
- struct ub_packed_rrset_key* rrset, uint32_t now)
+ struct ub_packed_rrset_key* rrset, time_t now)
{
struct packed_rrset_data* updata =
(struct packed_rrset_data*)rrset->entry.data;
diff --git a/services/cache/rrset.h b/services/cache/rrset.h
index 22d36719eafc..92ced928b304 100644
--- a/services/cache/rrset.h
+++ b/services/cache/rrset.h
@@ -131,7 +131,7 @@ void rrset_cache_touch(struct rrset_cache* r, struct ub_packed_rrset_key* key,
* also the rdata is equal (but other parameters in cache are superior).
*/
int rrset_cache_update(struct rrset_cache* r, struct rrset_ref* ref,
- struct alloc_cache* alloc, uint32_t timenow);
+ struct alloc_cache* alloc, time_t timenow);
/**
* Lookup rrset. You obtain read/write lock. You must unlock before lookup
@@ -149,7 +149,7 @@ int rrset_cache_update(struct rrset_cache* r, struct rrset_ref* ref,
*/
struct ub_packed_rrset_key* rrset_cache_lookup(struct rrset_cache* r,
uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
- uint32_t flags, uint32_t timenow, int wr);
+ uint32_t flags, time_t timenow, int wr);
/**
* Obtain readlock on a (sorted) list of rrset references.
@@ -163,7 +163,7 @@ struct ub_packed_rrset_key* rrset_cache_lookup(struct rrset_cache* r,
* RRsets have been purged from the cache.
* If true, you hold readlocks on all the ref items.
*/
-int rrset_array_lock(struct rrset_ref* ref, size_t count, uint32_t timenow);
+int rrset_array_lock(struct rrset_ref* ref, size_t count, time_t timenow);
/**
* Unlock array (sorted) of rrset references.
@@ -199,7 +199,7 @@ void rrset_array_unlock_touch(struct rrset_cache* r, struct regional* scratch,
* @param now: current time.
*/
void rrset_update_sec_status(struct rrset_cache* r,
- struct ub_packed_rrset_key* rrset, uint32_t now);
+ struct ub_packed_rrset_key* rrset, time_t now);
/**
* Looks up security status of an rrset. Looks up the rrset.
@@ -211,7 +211,7 @@ void rrset_update_sec_status(struct rrset_cache* r,
* @param now: current time.
*/
void rrset_check_sec_status(struct rrset_cache* r,
- struct ub_packed_rrset_key* rrset, uint32_t now);
+ struct ub_packed_rrset_key* rrset, time_t now);
/**
* Remove an rrset from the cache, by name and type and flags
diff --git a/services/listen_dnsport.c b/services/listen_dnsport.c
index 647cbe07ebd9..368faaea4211 100644
--- a/services/listen_dnsport.c
+++ b/services/listen_dnsport.c
@@ -328,6 +328,8 @@ create_udp_sock(int family, int socktype, struct sockaddr* addr,
# else
closesocket(s);
# endif
+ *noproto = 0;
+ *inuse = 0;
return -1;
}
# elif defined(IP_DONTFRAG)
@@ -341,12 +343,15 @@ create_udp_sock(int family, int socktype, struct sockaddr* addr,
# else
closesocket(s);
# endif
+ *noproto = 0;
+ *inuse = 0;
return -1;
}
# endif /* IPv4 MTU */
}
if(bind(s, (struct sockaddr*)addr, addrlen) != 0) {
*noproto = 0;
+ *inuse = 0;
#ifndef USE_WINSOCK
#ifdef EADDRINUSE
*inuse = (errno == EADDRINUSE);
diff --git a/services/localzone.c b/services/localzone.c
index 9fdab51c1081..4a2187ec4f25 100644
--- a/services/localzone.c
+++ b/services/localzone.c
@@ -225,7 +225,7 @@ lz_enter_zone(struct local_zones* zones, const char* name, const char* type,
/** return name and class and rdata of rr; parses string */
static int
get_rr_content(const char* str, uint8_t** nm, uint16_t* type,
- uint16_t* dclass, uint32_t* ttl, ldns_buffer* rdata)
+ uint16_t* dclass, time_t* ttl, ldns_buffer* rdata)
{
ldns_rr* rr = NULL;
ldns_status status = ldns_rr_new_frm_str(&rr, str, 3600, NULL, NULL);
@@ -244,7 +244,7 @@ get_rr_content(const char* str, uint8_t** nm, uint16_t* type,
}
*dclass = ldns_rr_get_class(rr);
*type = ldns_rr_get_type(rr);
- *ttl = (uint32_t)ldns_rr_ttl(rr);
+ *ttl = (time_t)ldns_rr_ttl(rr);
ldns_buffer_clear(rdata);
ldns_buffer_skip(rdata, 2);
status = ldns_rr_rdata2buffer_wire(rdata, rr);
@@ -356,10 +356,10 @@ new_local_rrset(struct regional* region, struct local_data* node,
/** insert RR into RRset data structure; Wastes a couple of bytes */
static int
insert_rr(struct regional* region, struct packed_rrset_data* pd,
- ldns_buffer* buf, uint32_t ttl)
+ ldns_buffer* buf, time_t ttl)
{
size_t* oldlen = pd->rr_len;
- uint32_t* oldttl = pd->rr_ttl;
+ time_t* oldttl = pd->rr_ttl;
uint8_t** olddata = pd->rr_data;
/* add RR to rrset */
@@ -450,7 +450,7 @@ lz_enter_rr_into_zone(struct local_zone* z, ldns_buffer* buf,
struct local_rrset* rrset;
struct packed_rrset_data* pd;
uint16_t rrtype = 0, rrclass = 0;
- uint32_t ttl = 0;
+ time_t ttl = 0;
if(!get_rr_content(rrstr, &nm, &rrtype, &rrclass, &ttl, buf)) {
log_err("bad local-data: %s", rrstr);
return 0;
diff --git a/services/mesh.c b/services/mesh.c
index 5c66caf3236d..a8cb115ab935 100644
--- a/services/mesh.c
+++ b/services/mesh.c
@@ -321,6 +321,8 @@ void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo,
}
#ifdef UNBOUND_DEBUG
n =
+#else
+ (void)
#endif
rbtree_insert(&mesh->all, &s->node);
log_assert(n != NULL);
@@ -390,6 +392,8 @@ mesh_new_callback(struct mesh_area* mesh, struct query_info* qinfo,
}
#ifdef UNBOUND_DEBUG
n =
+#else
+ (void)
#endif
rbtree_insert(&mesh->all, &s->node);
log_assert(n != NULL);
@@ -422,7 +426,7 @@ mesh_new_callback(struct mesh_area* mesh, struct query_info* qinfo,
}
void mesh_new_prefetch(struct mesh_area* mesh, struct query_info* qinfo,
- uint16_t qflags, uint32_t leeway)
+ uint16_t qflags, time_t leeway)
{
struct mesh_state* s = mesh_area_find(mesh, qinfo, qflags&BIT_RD, 0);
#ifdef UNBOUND_DEBUG
@@ -450,6 +454,8 @@ void mesh_new_prefetch(struct mesh_area* mesh, struct query_info* qinfo,
}
#ifdef UNBOUND_DEBUG
n =
+#else
+ (void)
#endif
rbtree_insert(&mesh->all, &s->node);
log_assert(n != NULL);
@@ -657,6 +663,8 @@ void mesh_detach_subs(struct module_qstate* qstate)
RBTREE_FOR(ref, struct mesh_state_ref*, &qstate->mesh_info->sub_set) {
#ifdef UNBOUND_DEBUG
n =
+#else
+ (void)
#endif
rbtree_delete(&ref->s->super_set, &lookup);
log_assert(n != NULL); /* must have been present */
@@ -693,6 +701,8 @@ int mesh_attach_sub(struct module_qstate* qstate, struct query_info* qinfo,
}
#ifdef UNBOUND_DEBUG
n =
+#else
+ (void)
#endif
rbtree_insert(&mesh->all, &sub->node);
log_assert(n != NULL);
@@ -701,6 +711,8 @@ int mesh_attach_sub(struct module_qstate* qstate, struct query_info* qinfo,
/* set new query state to run */
#ifdef UNBOUND_DEBUG
n =
+#else
+ (void)
#endif
rbtree_insert(&mesh->run, &sub->run_node);
log_assert(n != NULL);
@@ -749,6 +761,8 @@ int mesh_state_attachment(struct mesh_state* super, struct mesh_state* sub)
}
#ifdef UNBOUND_DEBUG
n =
+#else
+ (void)
#endif
rbtree_insert(&super->sub_set, &subref->node);
log_assert(n != NULL); /* we checked above if statement, the reverse
@@ -878,8 +892,8 @@ mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep,
m->s.env->mesh->num_reply_addrs--;
end_time = *m->s.env->now_tv;
timeval_subtract(&duration, &end_time, &r->start_time);
- verbose(VERB_ALGO, "query took %d.%6.6d sec",
- (int)duration.tv_sec, (int)duration.tv_usec);
+ verbose(VERB_ALGO, "query took %lld.%6.6d sec",
+ (long long)duration.tv_sec, (int)duration.tv_usec);
m->s.env->mesh->replies_sent++;
timeval_add(&m->s.env->mesh->replies_sum_wait, &duration);
timehist_insert(m->s.env->mesh->histogram, &duration);
@@ -1124,7 +1138,7 @@ mesh_stats(struct mesh_area* mesh, const char* str)
timeval_divide(&avg, &mesh->replies_sum_wait,
mesh->replies_sent);
log_info("average recursion processing time "
- "%d.%6.6d sec", (int)avg.tv_sec, (int)avg.tv_usec);
+ "%lld.%6.6d sec", (long long)avg.tv_sec, (int)avg.tv_usec);
log_info("histogram of recursion processing times");
timehist_log(mesh->histogram, "recursions");
}
diff --git a/services/mesh.h b/services/mesh.h
index 5f109779a4d2..54a3cafecc9e 100644
--- a/services/mesh.h
+++ b/services/mesh.h
@@ -307,7 +307,7 @@ int mesh_new_callback(struct mesh_area* mesh, struct query_info* qinfo,
* @param leeway: TTL leeway what to expire earlier for this update.
*/
void mesh_new_prefetch(struct mesh_area* mesh, struct query_info* qinfo,
- uint16_t qflags, uint32_t leeway);
+ uint16_t qflags, time_t leeway);
/**
* Handle new event from the wire. A serviced query has returned.
diff --git a/services/outside_network.c b/services/outside_network.c
index e1cd0fd3877f..373d8f353688 100644
--- a/services/outside_network.c
+++ b/services/outside_network.c
@@ -1210,6 +1210,8 @@ serviced_create(struct outside_network* outnet, ldns_buffer* buff, int dnssec,
sq->to_be_deleted = 0;
#ifdef UNBOUND_DEBUG
ins =
+#else
+ (void)
#endif
rbtree_insert(outnet->serviced, &sq->node);
log_assert(ins != NULL); /* must not be already present */
@@ -1361,7 +1363,7 @@ serviced_udp_send(struct serviced_query* sq, ldns_buffer* buff)
{
int rtt, vs;
uint8_t edns_lame_known;
- uint32_t now = *sq->outnet->now_secs;
+ time_t now = *sq->outnet->now_secs;
if(!infra_host(sq->outnet->infra, &sq->addr, sq->addrlen, sq->zone,
sq->zonelen, now, &vs, &edns_lame_known, &rtt))
@@ -1449,6 +1451,8 @@ serviced_callbacks(struct serviced_query* sq, int error, struct comm_point* c,
size_t backlen = 0;
#ifdef UNBOUND_DEBUG
rbnode_t* rem =
+#else
+ (void)
#endif
/* remove from tree, and schedule for deletion, so that callbacks
* can safely deregister themselves and even create new serviced
@@ -1567,7 +1571,7 @@ serviced_tcp_callback(struct comm_point* c, void* arg, int error,
(now.tv_sec == sq->last_sent_time.tv_sec &&
now.tv_usec > sq->last_sent_time.tv_usec)) {
/* convert from microseconds to milliseconds */
- int roundtime = ((int)now.tv_sec - (int)sq->last_sent_time.tv_sec)*1000
+ int roundtime = ((int)(now.tv_sec - sq->last_sent_time.tv_sec))*1000
+ ((int)now.tv_usec - (int)sq->last_sent_time.tv_usec)/1000;
verbose(VERB_ALGO, "measured TCP-time at %d msec", roundtime);
log_assert(roundtime >= 0);
@@ -1576,7 +1580,7 @@ serviced_tcp_callback(struct comm_point* c, void* arg, int error,
if(roundtime < TCP_AUTH_QUERY_TIMEOUT*1000) {
if(!infra_rtt_update(sq->outnet->infra, &sq->addr,
sq->addrlen, sq->zone, sq->zonelen, sq->qtype,
- roundtime, sq->last_rtt, (uint32_t)now.tv_sec))
+ roundtime, sq->last_rtt, (time_t)now.tv_sec))
log_err("out of memory noting rtt.");
}
}
@@ -1668,7 +1672,7 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error,
sq->retry++;
if(!(rto=infra_rtt_update(outnet->infra, &sq->addr, sq->addrlen,
sq->zone, sq->zonelen, sq->qtype, -1, sq->last_rtt,
- (uint32_t)now.tv_sec)))
+ (time_t)now.tv_sec)))
log_err("out of memory in UDP exponential backoff");
if(sq->retry < OUTBOUND_UDP_RETRY) {
log_name_addr(VERB_ALGO, "retry query", sq->qbuf+10,
@@ -1712,7 +1716,7 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error,
/* only store noEDNS in cache if domain is noDNSSEC */
if(!sq->want_dnssec)
if(!infra_edns_update(outnet->infra, &sq->addr, sq->addrlen,
- sq->zone, sq->zonelen, -1, (uint32_t)now.tv_sec)) {
+ sq->zone, sq->zonelen, -1, (time_t)now.tv_sec)) {
log_err("Out of memory caching no edns for host");
}
sq->status = serviced_query_UDP;
@@ -1722,7 +1726,7 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error,
log_addr(VERB_ALGO, "serviced query: EDNS works for",
&sq->addr, sq->addrlen);
if(!infra_edns_update(outnet->infra, &sq->addr, sq->addrlen,
- sq->zone, sq->zonelen, 0, (uint32_t)now.tv_sec)) {
+ sq->zone, sq->zonelen, 0, (time_t)now.tv_sec)) {
log_err("Out of memory caching edns works");
}
sq->edns_lame_known = 1;
@@ -1739,7 +1743,7 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error,
log_addr(VERB_ALGO, "serviced query: EDNS fails for",
&sq->addr, sq->addrlen);
if(!infra_edns_update(outnet->infra, &sq->addr, sq->addrlen,
- sq->zone, sq->zonelen, -1, (uint32_t)now.tv_sec)) {
+ sq->zone, sq->zonelen, -1, (time_t)now.tv_sec)) {
log_err("Out of memory caching no edns for host");
}
} else {
@@ -1753,7 +1757,7 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error,
(now.tv_sec == sq->last_sent_time.tv_sec &&
now.tv_usec > sq->last_sent_time.tv_usec)) {
/* convert from microseconds to milliseconds */
- int roundtime = ((int)now.tv_sec - (int)sq->last_sent_time.tv_sec)*1000
+ int roundtime = ((int)(now.tv_sec - sq->last_sent_time.tv_sec))*1000
+ ((int)now.tv_usec - (int)sq->last_sent_time.tv_usec)/1000;
verbose(VERB_ALGO, "measured roundtrip at %d msec", roundtime);
log_assert(roundtime >= 0);
@@ -1762,7 +1766,7 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error,
if(roundtime < 60000) {
if(!infra_rtt_update(outnet->infra, &sq->addr, sq->addrlen,
sq->zone, sq->zonelen, sq->qtype, roundtime,
- sq->last_rtt, (uint32_t)now.tv_sec))
+ sq->last_rtt, (time_t)now.tv_sec))
log_err("out of memory noting rtt.");
}
}
@@ -1866,6 +1870,8 @@ void outnet_serviced_query_stop(struct serviced_query* sq, void* cb_arg)
if(!sq->cblist && !sq->to_be_deleted) {
#ifdef UNBOUND_DEBUG
rbnode_t* rem =
+#else
+ (void)
#endif
rbtree_delete(sq->outnet->serviced, sq);
log_assert(rem); /* should be present */
diff --git a/services/outside_network.h b/services/outside_network.h
index 9ec81f405e6d..87fe8ff108de 100644
--- a/services/outside_network.h
+++ b/services/outside_network.h
@@ -63,7 +63,7 @@ struct outside_network {
/** Base for select calls */
struct comm_base* base;
/** pointer to time in seconds */
- uint32_t* now_secs;
+ time_t* now_secs;
/** pointer to time in microseconds */
struct timeval* now_tv;
diff --git a/smallapp/unbound-anchor.c b/smallapp/unbound-anchor.c
index ef0031c94316..2b6d4232b177 100644
--- a/smallapp/unbound-anchor.c
+++ b/smallapp/unbound-anchor.c
@@ -1231,7 +1231,7 @@ xml_charhandle(void *userData, const XML_Char *s, int len)
printf("'\n");
}
if(strcasecmp(data->tag, "Zone") == 0) {
- if(BIO_write(data->czone, s, len) <= 0) {
+ if(BIO_write(data->czone, s, len) < 0) {
if(verb) printf("out of memory in BIO_write\n");
exit(0);
}
@@ -1242,7 +1242,7 @@ xml_charhandle(void *userData, const XML_Char *s, int len)
return;
b = xml_selectbio(data, data->tag);
if(b) {
- if(BIO_write(b, s, len) <= 0) {
+ if(BIO_write(b, s, len) < 0) {
if(verb) printf("out of memory in BIO_write\n");
exit(0);
}
@@ -1435,7 +1435,7 @@ xml_startelem(void *userData, const XML_Char *name, const XML_Char **atts)
static void
xml_append_str(BIO* b, const char* s)
{
- if(BIO_write(b, s, (int)strlen(s)) <= 0) {
+ if(BIO_write(b, s, (int)strlen(s)) < 0) {
if(verb) printf("out of memory in BIO_write\n");
exit(0);
}
@@ -1459,7 +1459,7 @@ xml_append_bio(BIO* b, BIO* a)
z[i] = ' ';
}
/* write to BIO */
- if(BIO_write(b, z, len) <= 0) {
+ if(BIO_write(b, z, len) < 0) {
if(verb) printf("out of memory in BIO_write\n");
exit(0);
}
@@ -1545,7 +1545,7 @@ xml_parse_setup(XML_Parser parser, struct xml_data* data, time_t now)
}
snprintf(buf, sizeof(buf), "; created by unbound-anchor on %s",
ctime(&now));
- if(BIO_write(data->ds, buf, (int)strlen(buf)) <= 0) {
+ if(BIO_write(data->ds, buf, (int)strlen(buf)) < 0) {
if(verb) printf("out of memory\n");
exit(0);
}
diff --git a/smallapp/unbound-control.c b/smallapp/unbound-control.c
index cc48866c5dbd..43a52fd49674 100644
--- a/smallapp/unbound-control.c
+++ b/smallapp/unbound-control.c
@@ -106,6 +106,8 @@ usage()
printf(" list_forwards list forward-zones in use\n");
printf(" list_local_zones list local-zones in use\n");
printf(" list_local_data list local-data RRs in use\n");
+ printf(" insecure_add zone add domain-insecure zone\n");
+ printf(" insecure_remove zone remove domain-insecure zone\n");
printf(" forward_add [+i] zone addr.. add forward-zone with servers\n");
printf(" forward_remove [+i] zone remove forward zone\n");
printf(" stub_add [+ip] zone addr.. add stub-zone with servers\n");
diff --git a/testcode/fake_event.c b/testcode/fake_event.c
index 180ff30697e2..085068c67c56 100644
--- a/testcode/fake_event.c
+++ b/testcode/fake_event.c
@@ -478,7 +478,7 @@ time_passes(struct replay_runtime* runtime, struct replay_moment* mom)
#endif
}
timeval_add(&runtime->now_tv, &tv);
- runtime->now_secs = (uint32_t)runtime->now_tv.tv_sec;
+ runtime->now_secs = (time_t)runtime->now_tv.tv_sec;
#ifndef S_SPLINT_S
log_info("elapsed %d.%6.6d now %d.%6.6d",
(int)tv.tv_sec, (int)tv.tv_usec,
@@ -801,7 +801,7 @@ comm_base_delete(struct comm_base* b)
}
void
-comm_base_timept(struct comm_base* b, uint32_t** tt, struct timeval** tv)
+comm_base_timept(struct comm_base* b, time_t** tt, struct timeval** tv)
{
struct replay_runtime* runtime = (struct replay_runtime*)b;
*tt = &runtime->now_secs;
@@ -909,8 +909,10 @@ outside_network_create(struct comm_base* base, size_t bufsize,
runtime->infra = infra;
outnet->base = base;
outnet->udp_buff = ldns_buffer_new(bufsize);
- if(!outnet->udp_buff)
+ if(!outnet->udp_buff) {
+ free(outnet);
return NULL;
+ }
return outnet;
}
diff --git a/testcode/petal.c b/testcode/petal.c
index 14a187e3ff26..61f8250d89ec 100644
--- a/testcode/petal.c
+++ b/testcode/petal.c
@@ -349,13 +349,14 @@ provide_file_10(SSL* ssl, char* fname)
"rb"
#endif
);
- int r;
+ size_t r;
const char* rcode = "200 OK";
if(!in) {
char hdr[1024];
rcode = "404 File not found";
- r = snprintf(hdr, sizeof(hdr), "HTTP/1.1 %s\r\n\r\n", rcode);
- if(SSL_write(ssl, hdr, r) <= 0) {
+ snprintf(hdr, sizeof(hdr), "HTTP/1.1 %s\r\n\r\n", rcode);
+ r = strlen(hdr);
+ if(SSL_write(ssl, hdr, (int)r) <= 0) {
/* write failure */
}
return;
@@ -371,16 +372,20 @@ provide_file_10(SSL* ssl, char* fname)
}
avail = len+header_reserve;
at = buf;
- r = snprintf(at, avail, "HTTP/1.1 %s\r\n", rcode);
+ snprintf(at, avail, "HTTP/1.1 %s\r\n", rcode);
+ r = strlen(at);
at += r;
avail -= r;
- r = snprintf(at, avail, "Server: petal/%s\r\n", PACKAGE_VERSION);
+ snprintf(at, avail, "Server: petal/%s\r\n", PACKAGE_VERSION);
+ r = strlen(at);
at += r;
avail -= r;
- r = snprintf(at, avail, "Content-Length: %u\r\n", (unsigned)len);
+ snprintf(at, avail, "Content-Length: %u\r\n", (unsigned)len);
+ r = strlen(at);
at += r;
avail -= r;
- r = snprintf(at, avail, "\r\n");
+ snprintf(at, avail, "\r\n");
+ r = strlen(at);
at += r;
avail -= r;
if(avail < len) { /* robust */
@@ -409,7 +414,7 @@ provide_file_chunked(SSL* ssl, char* fname)
char buf[16384];
char* at = buf;
size_t avail = sizeof(buf);
- int r;
+ size_t r;
FILE* in = fopen(fname,
#ifndef USE_WINSOCK
"r"
@@ -423,19 +428,24 @@ provide_file_chunked(SSL* ssl, char* fname)
}
/* print headers */
- r = snprintf(at, avail, "HTTP/1.1 %s\r\n", rcode);
+ snprintf(at, avail, "HTTP/1.1 %s\r\n", rcode);
+ r = strlen(at);
at += r;
avail -= r;
- r = snprintf(at, avail, "Server: petal/%s\r\n", PACKAGE_VERSION);
+ snprintf(at, avail, "Server: petal/%s\r\n", PACKAGE_VERSION);
+ r = strlen(at);
at += r;
avail -= r;
- r = snprintf(at, avail, "Transfer-Encoding: chunked\r\n");
+ snprintf(at, avail, "Transfer-Encoding: chunked\r\n");
+ r = strlen(at);
at += r;
avail -= r;
- r = snprintf(at, avail, "Connection: close\r\n");
+ snprintf(at, avail, "Connection: close\r\n");
+ r = strlen(at);
at += r;
avail -= r;
- r = snprintf(at, avail, "\r\n");
+ snprintf(at, avail, "\r\n");
+ r = strlen(at);
at += r;
avail -= r;
if(avail < 16) { /* robust */
@@ -448,7 +458,8 @@ provide_file_chunked(SSL* ssl, char* fname)
/* read chunk; space-16 for xxxxCRLF..CRLF0CRLFCRLF (3 spare)*/
size_t red = in?fread(tmpbuf, 1, avail-16, in):0;
/* prepare chunk */
- r = snprintf(at, avail, "%x\r\n", (unsigned)red);
+ snprintf(at, avail, "%x\r\n", (unsigned)red);
+ r = strlen(at);
if(verb >= 3)
{printf("chunk len %x\n", (unsigned)red); fflush(stdout);}
at += r;
@@ -458,17 +469,20 @@ provide_file_chunked(SSL* ssl, char* fname)
memmove(at, tmpbuf, red);
at += red;
avail -= red;
- r = snprintf(at, avail, "\r\n");
+ snprintf(at, avail, "\r\n");
+ r = strlen(at);
at += r;
avail -= r;
}
if(in && feof(in) && red != 0) {
- r = snprintf(at, avail, "0\r\n");
+ snprintf(at, avail, "0\r\n");
+ r = strlen(at);
at += r;
avail -= r;
}
if(!in || feof(in)) {
- r = snprintf(at, avail, "\r\n");
+ snprintf(at, avail, "\r\n");
+ r = strlen(at);
at += r;
avail -= r;
}
diff --git a/testcode/replay.c b/testcode/replay.c
index 2ce647da1197..ce050ed0ad15 100644
--- a/testcode/replay.c
+++ b/testcode/replay.c
@@ -792,15 +792,15 @@ macro_expand(rbtree_t* store, struct replay_runtime* runtime, char** text)
/* check for functions */
if(strcmp(buf, "time") == 0) {
- snprintf(buf, sizeof(buf), "%u", (unsigned)runtime->now_secs);
+ snprintf(buf, sizeof(buf), "%lld", (long long)runtime->now_secs);
*text += len;
return strdup(buf);
} else if(strcmp(buf, "timeout") == 0) {
- uint32_t res = 0;
+ time_t res = 0;
struct fake_timer* t = first_timer(runtime);
- if(t && (uint32_t)t->tv.tv_sec >= runtime->now_secs)
- res = (uint32_t)t->tv.tv_sec - runtime->now_secs;
- snprintf(buf, sizeof(buf), "%u", (unsigned)res);
+ if(t && (time_t)t->tv.tv_sec >= runtime->now_secs)
+ res = (time_t)t->tv.tv_sec - runtime->now_secs;
+ snprintf(buf, sizeof(buf), "%lld", (long long)res);
*text += len;
return strdup(buf);
} else if(strncmp(buf, "ctime ", 6) == 0 ||
diff --git a/testcode/replay.h b/testcode/replay.h
index 049db4e800b5..beac3ce839d2 100644
--- a/testcode/replay.h
+++ b/testcode/replay.h
@@ -293,7 +293,7 @@ struct replay_runtime {
struct infra_cache* infra;
/** the current time in seconds */
- uint32_t now_secs;
+ time_t now_secs;
/** the current time in microseconds */
struct timeval now_tv;
diff --git a/testcode/streamtcp.1 b/testcode/streamtcp.1
new file mode 100644
index 000000000000..7c738d9d278c
--- /dev/null
+++ b/testcode/streamtcp.1
@@ -0,0 +1,66 @@
+.TH "unbound\-streamtcp" "1" "Mar 21, 2013" "NLnet Labs" "unbound"
+.\"
+.\" unbound-streamtcp.1 -- unbound DNS lookup utility
+.\"
+.SH "NAME"
+.LP
+.B unbound\-streamtcp
+\- unbound DNS lookup utility
+.SH "SYNOPSIS"
+.LP
+.B unbound\-streamtcp
+.RB [ \-unsh ]
+.RB [ \-f
+.IR ipaddr[@port] ]
+.I name
+.I type
+.I class
+.SH "DESCRIPTION"
+.LP
+.B unbound\-streamtcp
+sends a DNS Query of the given \fBtype\fR and \fBclass\fR for the given \fBname\fR
+to the DNS server over TCP and displays the response.
+.P
+If the server to query is not given using the \fB\-f\fR option then localhost
+(127.0.0.1) is used. More queries can be given on one commandline, they
+are resolved in sequence.
+.P
+The available options are:
+.TP
+.I name
+This name is resolved (looked up in the DNS).
+.TP
+.I type
+Specify the type of data to lookup.
+.TP
+.I class
+Specify the class to lookup for.
+.TP
+.B \-u
+Use UDP instead of TCP. No retries are attempted.
+.TP
+.B \-n
+Do not wait for the answer.
+.TP
+.B \-s
+Use SSL.
+.TP
+.B \-h
+Print program usage.
+.TP
+.B \-f \fIipaddr[@port]
+Specify the server to send the queries to. If not specified localhost (127.0.0.1) is used.
+.SH "EXAMPLES"
+.LP
+Some examples of use.
+.P
+$ unbound\-streamtcp www.example.com A IN
+.P
+$ unbound\-streamtcp \-f 192.168.1.1 www.example.com SOA IN
+.P
+$ unbound\-streamtcp \-f 192.168.1.1@1234 153.1.168.192.in\-addr.arpa. PTR IN
+.SH "EXIT CODE"
+The unbound\-streamtcp program exits with status code 1 on error,
+0 on no error.
+.SH "AUTHOR"
+This manual page was written by Tomas Hozza <thozza@redhat.com>.
diff --git a/testcode/streamtcp.c b/testcode/streamtcp.c
index dbdf1408c1d5..06a18e4cfafb 100644
--- a/testcode/streamtcp.c
+++ b/testcode/streamtcp.c
@@ -121,9 +121,9 @@ write_q(int fd, int udp, SSL* ssl, ldns_buffer* buf, uint16_t id,
exit(1);
}
qinfo.qname = memdup(ldns_rdf_data(rdf), ldns_rdf_size(rdf));
+ if(!qinfo.qname) fatal_exit("out of memory");
(void)dname_count_size_labels(qinfo.qname, &qinfo.qname_len);
ldns_rdf_deep_free(rdf);
- if(!qinfo.qname) fatal_exit("out of memory");
/* qtype and qclass */
qinfo.qtype = ldns_get_rr_type_by_name(strtype);
diff --git a/testcode/unitmain.c b/testcode/unitmain.c
index 122f09b86149..be4bed95eeb2 100644
--- a/testcode/unitmain.c
+++ b/testcode/unitmain.c
@@ -411,7 +411,7 @@ rtt_test(void)
/* lookup and get key and data structs easily */
static struct infra_data* infra_lookup_host(struct infra_cache* infra,
struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone,
- size_t zonelen, int wr, uint32_t now, struct infra_key** k)
+ size_t zonelen, int wr, time_t now, struct infra_key** k)
{
struct infra_data* d;
struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen,
@@ -436,7 +436,7 @@ infra_test(void)
size_t zonelen = 13;
struct infra_cache* slab;
struct config_file* cfg = config_create();
- uint32_t now = 0;
+ time_t now = 0;
uint8_t edns_lame;
int vs, to;
struct infra_key* k;
diff --git a/testcode/unitmsgparse.c b/testcode/unitmsgparse.c
index 434239507b47..72f9b63a6e09 100644
--- a/testcode/unitmsgparse.c
+++ b/testcode/unitmsgparse.c
@@ -258,7 +258,7 @@ checkformerr(ldns_buffer* pkt)
/** performance test message encoding */
static void
perf_encode(struct query_info* qi, struct reply_info* rep, uint16_t id,
- uint16_t flags, ldns_buffer* out, uint32_t timenow,
+ uint16_t flags, ldns_buffer* out, time_t timenow,
struct edns_data* edns)
{
static int num = 0;
@@ -299,7 +299,7 @@ perftestpkt(ldns_buffer* pkt, struct alloc_cache* alloc, ldns_buffer* out,
int ret;
uint16_t id;
uint16_t flags;
- uint32_t timenow = 0;
+ time_t timenow = 0;
struct regional* region = regional_create();
struct edns_data edns;
diff --git a/testcode/unitneg.c b/testcode/unitneg.c
index e18aefc34b67..686ad0086362 100644
--- a/testcode/unitneg.c
+++ b/testcode/unitneg.c
@@ -195,7 +195,7 @@ static void add_item(struct val_neg_cache* neg)
struct packed_rrset_data rd;
struct ub_packed_rrset_key nsec;
size_t rr_len;
- uint32_t rr_ttl;
+ time_t rr_ttl;
uint8_t* rr_data;
char* zname = get_random_zone();
char* from, *to;
diff --git a/testcode/unitverify.c b/testcode/unitverify.c
index d3fbf25f5312..d2d268dfdf2d 100644
--- a/testcode/unitverify.c
+++ b/testcode/unitverify.c
@@ -301,7 +301,7 @@ verifytest_file(const char* fname, const char* at_date)
struct entry* list = read_datafile(fname, 1);
struct module_env env;
struct val_env ve;
- uint32_t now = time(NULL);
+ time_t now = time(NULL);
if(!list)
fatal_exit("could not read %s: %s", fname, strerror(errno));
@@ -422,7 +422,7 @@ nsec3_hash_test_entry(struct entry* e, rbtree_t* ct,
struct query_info qinfo;
struct reply_info* rep = NULL;
struct ub_packed_rrset_key* answer, *nsec3;
- struct nsec3_cached_hash* hash;
+ struct nsec3_cached_hash* hash = NULL;
int ret;
uint8_t* qname;
diff --git a/testdata/autotrust_revtp_use.rpl b/testdata/autotrust_revtp_use.rpl
index a96bf1819767..a6ff624ff5a7 100644
--- a/testdata/autotrust_revtp_use.rpl
+++ b/testdata/autotrust_revtp_use.rpl
@@ -89,7 +89,7 @@ example.com. 10800 IN RRSIG DNSKEY 5 2 10800 20091124111500 20091018111500 16614
ENTRY_END
ENTRY_BEGIN
-MATCH opcode subdomain
+MATCH opcode qname qtype
ADJUST copy_id copy_query
REPLY QR
SECTION QUESTION
@@ -97,8 +97,16 @@ www.example.com. IN A
SECTION ANSWER
www.example.com. IN A 10.20.30.40
ENTRY_END
-RANGE_END
+ENTRY_BEGIN
+MATCH opcode qname qtype
+ADJUST copy_id copy_query
+REPLY QR
+SECTION QUESTION
+ns.example.com. IN AAAA
+SECTION ANSWER
+; no AAAA
+ENTRY_END
RANGE_END
STEP 20 QUERY
diff --git a/testdata/iter_fwdfirstequal.rpl b/testdata/iter_fwdfirstequal.rpl
new file mode 100644
index 000000000000..d8da470cf542
--- /dev/null
+++ b/testdata/iter_fwdfirstequal.rpl
@@ -0,0 +1,157 @@
+; config options
+server:
+ target-fetch-policy: "0 0 0 0 0"
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
+
+forward-zone:
+ name: "."
+ forward-addr: 1.2.3.6 # failing resolver
+ forward-first: yes
+
+CONFIG_END
+
+SCENARIO_BEGIN Test forward-first directive with equal stub name configured.
+
+; 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 A
+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 A
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; ns.example.com.
+RANGE_BEGIN 0 100
+ ADDRESS 1.2.3.4
+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.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+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
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; local resolver (that fails a lot)
+RANGE_BEGIN 0 100
+ ADDRESS 1.2.3.6
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR RA SERVFAIL
+SECTION QUESTION
+example.com. IN NS
+SECTION ANSWER
+;example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+;ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR RA SERVFAIL
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+;www.example.com. IN A 10.20.30.50
+SECTION AUTHORITY
+;example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+;ns.example.com. IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+STEP 1 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+; recursion happens here.
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+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 1.2.3.4
+ENTRY_END
+
+SCENARIO_END
diff --git a/testdata/iter_privaddr.rpl b/testdata/iter_privaddr.rpl
index 63fa5331bb20..d0f63c9ab881 100644
--- a/testdata/iter_privaddr.rpl
+++ b/testdata/iter_privaddr.rpl
@@ -163,6 +163,22 @@ example.com. IN NS ns.example.com.
SECTION ADDITIONAL
ns.example.com. IN A 1.2.3.4
ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+toss.example.com. IN A
+SECTION ANSWER
+toss.example.com. IN A 10.20.30.40
+toss.example.com. IN A 1.2.3.4
+toss.example.com. IN A 10.20.30.41
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
RANGE_END
; public address is not scrubbed
@@ -243,4 +259,27 @@ SECTION ANSWER
mail.example.net. IN A 10.20.30.40
ENTRY_END
+; rest of RRset intact, only 10/8 tossed away.
+STEP 60 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+toss.example.com. IN A
+ENTRY_END
+
+STEP 70 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA NOERROR
+SECTION QUESTION
+toss.example.com. IN A
+SECTION ANSWER
+; toss.example.com. IN A 10.20.30.40
+toss.example.com. IN A 1.2.3.4
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
SCENARIO_END
diff --git a/testdata/iter_stublastresort.rpl b/testdata/iter_stublastresort.rpl
new file mode 100644
index 000000000000..b60778910a04
--- /dev/null
+++ b/testdata/iter_stublastresort.rpl
@@ -0,0 +1,259 @@
+; config options
+server:
+ target-fetch-policy: "0 0 0 0 0"
+
+stub-zone:
+ name: "."
+ stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
+
+stub-zone:
+ name: "example.com"
+ stub-addr: 1.2.3.6
+ stub-prime: yes
+
+CONFIG_END
+
+SCENARIO_BEGIN Test stub with stub-prime and last resort fallback
+; the last resort fallback should not activate, as the
+; configured stub must be used for this data, or its primed data.
+
+; 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 A
+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 A
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; ns.example.com.
+RANGE_BEGIN 0 100
+ ADDRESS 1.2.3.4
+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.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+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.4
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+ns.example.com. IN AAAA
+SECTION ANSWER
+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
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ENTRY_END
+RANGE_END
+
+; the stub-prime server.
+; local authority (that fails a lot)
+RANGE_BEGIN 0 100
+ ADDRESS 1.2.3.6
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA
+SECTION QUESTION
+example.com. IN NS
+SECTION ANSWER
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.7
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA SERVFAIL
+SECTION QUESTION
+ns.example.com. IN A
+SECTION ANSWER
+;ns.example.com. IN A 1.2.3.7
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA SERVFAIL
+SECTION QUESTION
+ns.example.com. IN AAAA
+SECTION ANSWER
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA SERVFAIL
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+;www.example.com. IN A 10.20.30.70
+SECTION AUTHORITY
+SECTION ADDITIONAL
+ENTRY_END
+RANGE_END
+
+; the primed server
+RANGE_BEGIN 0 100
+ ADDRESS 1.2.3.7
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA
+SECTION QUESTION
+example.com. IN NS
+SECTION ANSWER
+example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.8
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA
+SECTION QUESTION
+ns.example.com. IN A
+SECTION ANSWER
+ns.example.com. IN A 1.2.3.8
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA
+SECTION QUESTION
+ns.example.com. IN AAAA
+SECTION ANSWER
+ENTRY_END
+
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR AA SERVFAIL
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+;www.example.com. IN A 10.20.30.80
+SECTION AUTHORITY
+SECTION ADDITIONAL
+ENTRY_END
+RANGE_END
+
+; crap server that the primed server refers to.
+RANGE_BEGIN 0 100
+ ADDRESS 1.2.3.8
+
+ENTRY_BEGIN
+MATCH opcode
+ADJUST copy_id copy_query
+REPLY QR SERVFAIL
+SECTION QUESTION
+example.com. IN NS
+SECTION ANSWER
+ENTRY_END
+RANGE_END
+
+
+STEP 1 QUERY
+ENTRY_BEGIN
+REPLY RD
+SECTION QUESTION
+www.example.com. IN A
+ENTRY_END
+
+; recursion happens here.
+STEP 10 CHECK_ANSWER
+ENTRY_BEGIN
+MATCH all
+REPLY QR RD RA SERVFAIL
+SECTION QUESTION
+www.example.com. IN A
+SECTION ANSWER
+;www.example.com. IN A 10.20.30.50
+SECTION AUTHORITY
+;example.com. IN NS ns.example.com.
+SECTION ADDITIONAL
+;ns.example.com. IN A 1.2.3.4
+ENTRY_END
+
+SCENARIO_END
diff --git a/testdata/nss_compile.tpkg b/testdata/nss_compile.tpkg
index 6be7bc46eccd..20b778a1e4ba 100644
--- a/testdata/nss_compile.tpkg
+++ b/testdata/nss_compile.tpkg
Binary files differ
diff --git a/testdata/val_cnametonsec.rpl b/testdata/val_cnametonsec.rpl
index 9e54909389bc..282345307c9f 100644
--- a/testdata/val_cnametonsec.rpl
+++ b/testdata/val_cnametonsec.rpl
@@ -56,11 +56,11 @@ a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
-MATCH opcode qtype qname
-ADJUST copy_id
+MATCH opcode subdomain
+ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
-www.example.com. IN A
+example.com. IN A
SECTION AUTHORITY
example.com. IN NS ns.example.com.
SECTION ADDITIONAL
@@ -85,6 +85,36 @@ ns.example.com. IN A 1.2.3.4
ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
ENTRY_END
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+ns.example.com. IN AAAA
+SECTION ANSWER
+; no NSECs to prove this, not needed in test, but could be there
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
+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.4
+ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+ENTRY_END
+
; response to DNSKEY priming query
ENTRY_BEGIN
MATCH opcode qtype qname
diff --git a/testdata/val_cnametooptin.rpl b/testdata/val_cnametooptin.rpl
index 657dcd11e544..93853a741f1a 100644
--- a/testdata/val_cnametooptin.rpl
+++ b/testdata/val_cnametooptin.rpl
@@ -56,11 +56,11 @@ a.gtld-servers.net. IN A 192.5.6.30
ENTRY_END
ENTRY_BEGIN
-MATCH opcode qtype qname
-ADJUST copy_id
+MATCH opcode subdomain
+ADJUST copy_id copy_query
REPLY QR NOERROR
SECTION QUESTION
-www.example.com. IN A
+example.com. IN A
SECTION AUTHORITY
example.com. IN NS ns.example.com.
SECTION ADDITIONAL
@@ -85,6 +85,36 @@ ns.example.com. IN A 1.2.3.4
ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
ENTRY_END
+ENTRY_BEGIN
+MATCH opcode qtype qname
+ADJUST copy_id
+REPLY QR NOERROR
+SECTION QUESTION
+ns.example.com. IN AAAA
+SECTION ANSWER
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+SECTION ADDITIONAL
+ns.example.com. IN A 1.2.3.4
+ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
+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.4
+ns.example.com. 3600 IN RRSIG A 3 3 3600 20070926135752 20070829135752 2854 example.com. MC0CFQCMSWxVehgOQLoYclB9PIAbNP229AIUeH0vNNGJhjnZiqgIOKvs1EhzqAo= ;{id = 2854}
+SECTION AUTHORITY
+example.com. IN NS ns.example.com.
+example.com. 3600 IN RRSIG NS 3 2 3600 20070926134150 20070829134150 2854 example.com. MC0CFQCN+qHdJxoI/2tNKwsb08pra/G7aAIUAWA5sDdJTbrXA1/3OaesGBAO3sI= ;{id = 2854}
+SECTION ADDITIONAL
+ENTRY_END
+
; response to DNSKEY priming query
ENTRY_BEGIN
MATCH opcode qtype qname
diff --git a/util/config_file.c b/util/config_file.c
index b946f0df0dc5..1e0bd72df833 100644
--- a/util/config_file.c
+++ b/util/config_file.c
@@ -69,6 +69,8 @@ int ub_c_parse(void);
int ub_c_lex(void);
/** wrap function */
int ub_c_wrap(void);
+/** init lex state */
+void init_cfg_parse(void);
/** init ports possible for use */
static void init_outgoing_availports(int* array, int num);
@@ -201,6 +203,7 @@ config_create(void)
cfg->control_port = UNBOUND_CONTROL_PORT;
cfg->minimal_responses = 0;
cfg->rrset_roundrobin = 0;
+ cfg->max_udp_size = 4096;
if(!(cfg->server_key_file = strdup(RUN_DIR"/unbound_server.key")))
goto error_exit;
if(!(cfg->server_cert_file = strdup(RUN_DIR"/unbound_server.pem")))
@@ -327,7 +330,11 @@ int config_set_option(struct config_file* cfg, const char* opt,
cfg->use_syslog = 0;
free(cfg->logfile);
return (cfg->logfile = strdup(val)) != NULL;
- }
+ }
+ else if(strcmp(opt, "log-time-ascii:") == 0)
+ { IS_YES_OR_NO; cfg->log_time_ascii = (strcmp(val, "yes") == 0);
+ log_set_time_asc(cfg->log_time_ascii); }
+ else S_SIZET_NONZERO("max-udp-size:", max_udp_size)
else S_YNO("use-syslog:", use_syslog)
else S_YNO("extended-statistics:", stat_extended)
else S_YNO("statistics-cumulative:", stat_cumulative)
@@ -358,7 +365,10 @@ int config_set_option(struct config_file* cfg, const char* opt,
else S_POW2("rrset-cache-slabs:", rrset_cache_slabs)
else S_YNO("prefetch:", prefetch)
else S_YNO("prefetch-key:", prefetch_key)
- else S_NUMBER_OR_ZERO("cache-max-ttl:", max_ttl)
+ else if(strcmp(opt, "cache-max-ttl:") == 0)
+ { IS_NUMBER_OR_ZERO; cfg->max_ttl = atoi(val); MAX_TTL=(time_t)cfg->max_ttl;}
+ else if(strcmp(opt, "cache-min-ttl:") == 0)
+ { IS_NUMBER_OR_ZERO; cfg->min_ttl = atoi(val); MIN_TTL=(time_t)cfg->min_ttl;}
else S_NUMBER_OR_ZERO("infra-host-ttl:", host_ttl)
else S_POW2("infra-cache-slabs:", infra_cache_slabs)
else S_SIZET_NONZERO("infra-cache-numhosts:", infra_cache_numhosts)
@@ -417,6 +427,12 @@ int config_set_option(struct config_file* cfg, const char* opt,
else S_STR("control-cert-file:", control_cert_file)
else S_STR("module-config:", module_conf)
else S_STR("python-script:", python_script)
+ /* val_sig_skew_min and max are copied into val_env during init,
+ * so this does not update val_env with set_option */
+ else if(strcmp(opt, "val-sig-skew-min:") == 0)
+ { IS_NUMBER_OR_ZERO; cfg->val_sig_skew_min = (int32_t)atoi(val); }
+ else if(strcmp(opt, "val-sig-skew-max:") == 0)
+ { IS_NUMBER_OR_ZERO; cfg->val_sig_skew_max = (int32_t)atoi(val); }
else if (strcmp(opt, "outgoing-interface:") == 0) {
char* d = strdup(val);
char** oi = (char**)malloc((cfg->num_out_ifs+1)*sizeof(char*));
@@ -516,8 +532,9 @@ config_collate_cat(struct config_strlist* list)
return NULL;
}
snprintf(w, left, "%s\n", s->str);
- w += this+1;
- left -= this+1;
+ this = strlen(w);
+ w += this;
+ left -= this;
}
return r;
}
@@ -572,6 +589,7 @@ config_get_option(struct config_file* cfg, const char* opt,
else O_YNO(opt, "statistics-cumulative", stat_cumulative)
else O_YNO(opt, "extended-statistics", stat_extended)
else O_YNO(opt, "use-syslog", use_syslog)
+ else O_YNO(opt, "log-time-ascii", log_time_ascii)
else O_DEC(opt, "num-threads", num_threads)
else O_IFC(opt, "interface", num_ifs, ifs)
else O_IFC(opt, "outgoing-interface", num_out_ifs, out_ifs)
@@ -593,6 +611,7 @@ config_get_option(struct config_file* cfg, const char* opt,
else O_YNO(opt, "prefetch-key", prefetch_key)
else O_YNO(opt, "prefetch", prefetch)
else O_DEC(opt, "cache-max-ttl", max_ttl)
+ else O_DEC(opt, "cache-min-ttl", min_ttl)
else O_DEC(opt, "infra-host-ttl", host_ttl)
else O_DEC(opt, "infra-cache-slabs", infra_cache_slabs)
else O_MEM(opt, "infra-cache-numhosts", infra_cache_numhosts)
@@ -661,6 +680,10 @@ config_get_option(struct config_file* cfg, const char* opt,
else O_UNS(opt, "val-override-date", val_date_override)
else O_YNO(opt, "minimal-responses", minimal_responses)
else O_YNO(opt, "rrset-roundrobin", rrset_roundrobin)
+ else O_DEC(opt, "max-udp-size", max_udp_size)
+ else O_STR(opt, "python-script", python_script)
+ else O_DEC(opt, "val-sig-skew-min", val_sig_skew_min)
+ else O_DEC(opt, "val-sig-skew-max", val_sig_skew_max)
/* not here:
* outgoing-permit, outgoing-avoid - have list of ports
* local-zone - zones and nodefault variables
@@ -684,6 +707,7 @@ create_cfg_parser(struct config_file* cfg, char* filename, const char* chroot)
cfg_parser->errors = 0;
cfg_parser->cfg = cfg;
cfg_parser->chroot = chroot;
+ init_cfg_parse();
}
int
@@ -1040,10 +1064,10 @@ cfg_str2list_insert(struct config_str2list** head, char* item, char* i2)
return 1;
}
-uint32_t
+time_t
cfg_convert_timeval(const char* str)
{
- uint32_t t;
+ time_t t;
struct tm tm;
memset(&tm, 0, sizeof(tm));
if(strlen(str) < 14)
@@ -1147,8 +1171,8 @@ cfg_parse_memsize(const char* str, size_t* res)
void
config_apply(struct config_file* config)
{
- MAX_TTL = (uint32_t)config->max_ttl;
- MIN_TTL = (uint32_t)config->min_ttl;
+ MAX_TTL = (time_t)config->max_ttl;
+ MIN_TTL = (time_t)config->min_ttl;
EDNS_ADVERTISED_SIZE = (uint16_t)config->edns_buffer_size;
MINIMAL_RESPONSES = config->minimal_responses;
RRSET_ROUNDROBIN = config->rrset_roundrobin;
diff --git a/util/config_file.h b/util/config_file.h
index 69595cb50f2e..6161302ecf2e 100644
--- a/util/config_file.h
+++ b/util/config_file.h
@@ -296,6 +296,9 @@ struct config_file {
/* RRSet roundrobin */
int rrset_roundrobin;
+
+ /* maximum UDP response size */
+ size_t max_udp_size;
};
/**
@@ -493,7 +496,7 @@ void config_delstubs(struct config_stub* list);
* @param str: string of 14 digits
* @return time value or 0 for error.
*/
-uint32_t cfg_convert_timeval(const char* str);
+time_t cfg_convert_timeval(const char* str);
/**
* Count number of values in the string.
diff --git a/util/configlexer.c b/util/configlexer.c
index 9ee356660258..3815dd1f2f51 100644
--- a/util/configlexer.c
+++ b/util/configlexer.c
@@ -363,8 +363,8 @@ static void yy_fatal_error (yyconst char msg[] );
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 142
-#define YY_END_OF_BUFFER 143
+#define YY_NUM_RULES 143
+#define YY_END_OF_BUFFER 144
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -372,156 +372,157 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[1343] =
+static yyconst flex_int16_t yy_accept[1355] =
{ 0,
- 1, 1, 124, 124, 128, 128, 132, 132, 136, 136,
- 1, 1, 143, 140, 1, 122, 122, 141, 2, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 141, 124,
- 125, 125, 126, 141, 128, 129, 129, 130, 141, 135,
- 132, 133, 133, 134, 141, 136, 137, 137, 138, 141,
- 139, 123, 2, 127, 139, 141, 140, 0, 1, 2,
- 2, 2, 2, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
-
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 124,
- 0, 128, 0, 135, 0, 132, 136, 0, 139, 0,
- 2, 2, 139, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 139, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
-
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 139,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 62, 140, 140,
- 140, 140, 140, 6, 140, 140, 140, 140, 140, 140,
-
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 139, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
-
- 140, 140, 140, 140, 139, 140, 140, 140, 140, 27,
- 140, 140, 140, 140, 140, 12, 13, 140, 15, 14,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 118, 140, 140, 140, 140,
- 140, 3, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 139, 140, 140, 140, 140, 140, 140, 140, 140, 140,
-
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 131, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 30,
- 140, 140, 140, 140, 140, 140, 140, 140, 31, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 77, 131, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
-
- 140, 140, 140, 140, 140, 140, 140, 76, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 60, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 20, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 28, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 29, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
-
- 140, 140, 140, 22, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 25, 26, 140, 140, 140, 63, 140, 64,
- 140, 61, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 5, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 79,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 104, 103, 140,
-
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 32, 140, 140,
- 140, 140, 140, 140, 140, 66, 65, 140, 140, 140,
- 140, 140, 140, 100, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 51, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 102, 140, 140, 140, 140, 140, 140, 140, 140,
- 4, 140, 140, 140, 140, 140, 140, 140, 140, 140,
-
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 97, 140, 140, 140, 140, 140, 140, 140,
- 112, 98, 140, 21, 140, 140, 140, 140, 68, 140,
- 69, 67, 140, 140, 140, 140, 140, 140, 75, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 99, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 59, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 17, 140, 140, 140, 16,
- 140, 84, 140, 140, 140, 140, 140, 140, 140, 140,
-
- 140, 140, 140, 140, 39, 40, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 70, 140, 140, 140,
- 140, 140, 74, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 78, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 117,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 88, 140, 92, 140, 140,
- 140, 140, 73, 140, 140, 110, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 91,
- 140, 140, 140, 140, 41, 42, 140, 47, 93, 140,
-
- 105, 101, 140, 140, 35, 140, 95, 140, 140, 140,
- 140, 140, 7, 140, 58, 109, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 80, 140, 140, 119, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 94, 140, 34, 36,
- 140, 140, 140, 140, 140, 57, 140, 140, 140, 140,
- 113, 18, 19, 140, 140, 140, 140, 140, 140, 55,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 115,
- 140, 140, 33, 140, 140, 140, 140, 140, 140, 11,
-
- 140, 140, 140, 140, 140, 140, 140, 10, 140, 140,
- 37, 140, 121, 114, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 87, 86, 140, 116, 111, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 43,
- 140, 120, 140, 140, 140, 140, 38, 140, 140, 140,
- 81, 83, 140, 140, 140, 85, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 23, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 108, 140, 140, 140, 140, 140, 140,
- 140, 24, 140, 9, 140, 140, 106, 48, 140, 140,
-
- 140, 90, 140, 71, 140, 140, 140, 50, 54, 49,
- 140, 44, 140, 8, 140, 140, 89, 140, 140, 140,
- 53, 140, 45, 140, 107, 140, 140, 82, 72, 52,
- 46, 140, 140, 140, 140, 56, 140, 140, 140, 140,
- 96, 0
+ 1, 1, 125, 125, 129, 129, 133, 133, 137, 137,
+ 1, 1, 144, 141, 1, 123, 123, 142, 2, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 142, 125,
+ 126, 126, 127, 142, 129, 130, 130, 131, 142, 136,
+ 133, 134, 134, 135, 142, 137, 138, 138, 139, 142,
+ 140, 124, 2, 128, 140, 142, 141, 0, 1, 2,
+ 2, 2, 2, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 125, 0, 129, 0, 136, 0, 133, 137, 0, 140,
+ 0, 2, 2, 140, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 140, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 140, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 62, 141, 141, 141, 141, 141, 6, 141, 141,
+
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 140, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 140,
+ 141, 141, 141, 141, 27, 141, 141, 141, 141, 141,
+ 12, 13, 141, 15, 14, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 118, 141, 141, 141, 141, 141, 3, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 140, 141, 141, 141,
+
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 132, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 30, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 31, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 77, 132, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 76, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 60, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 20, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 28, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 29, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 22, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 25, 26, 141, 141, 141, 63, 141, 64, 141,
+ 61, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 5, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 79, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+
+ 141, 141, 141, 141, 141, 141, 104, 103, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 32, 141, 141,
+ 141, 141, 141, 141, 141, 66, 65, 141, 141, 141,
+ 141, 141, 141, 100, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 51, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 102, 141, 141, 141, 141, 141, 141, 141, 141,
+
+ 141, 4, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 97, 141, 141, 141, 141, 141, 141,
+ 141, 112, 98, 141, 21, 141, 141, 141, 141, 68,
+ 141, 69, 67, 141, 141, 141, 141, 141, 141, 75,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 99,
+ 141, 141, 141, 141, 122, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 59, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 17, 141, 141,
+
+ 141, 16, 141, 84, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 39, 40, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 70, 141,
+ 141, 141, 141, 141, 74, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 78,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 117, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 88, 141, 92,
+ 141, 141, 141, 141, 73, 141, 141, 110, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+
+ 141, 91, 141, 141, 141, 141, 41, 42, 141, 47,
+ 93, 141, 105, 101, 141, 141, 35, 141, 95, 141,
+ 141, 141, 141, 141, 7, 141, 58, 109, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 80, 141, 141, 119, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 94, 141,
+ 34, 36, 141, 141, 141, 141, 141, 57, 141, 141,
+ 141, 141, 113, 18, 19, 141, 141, 141, 141, 141,
+ 141, 55, 141, 141, 141, 141, 141, 141, 141, 141,
+
+ 141, 115, 141, 141, 33, 141, 141, 141, 141, 141,
+ 141, 11, 141, 141, 141, 141, 141, 141, 141, 10,
+ 141, 141, 37, 141, 121, 114, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 141, 87, 86, 141, 116,
+ 111, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 43, 141, 120, 141, 141, 141, 141, 38, 141,
+ 141, 141, 81, 83, 141, 141, 141, 85, 141, 141,
+ 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 23, 141, 141, 141, 141, 141, 141, 141,
+ 141, 141, 141, 141, 141, 108, 141, 141, 141, 141,
+
+ 141, 141, 141, 24, 141, 9, 141, 141, 106, 48,
+ 141, 141, 141, 90, 141, 71, 141, 141, 141, 50,
+ 54, 49, 141, 44, 141, 8, 141, 141, 89, 141,
+ 141, 141, 53, 141, 45, 141, 107, 141, 141, 82,
+ 72, 52, 46, 141, 141, 141, 141, 56, 141, 141,
+ 141, 141, 96, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -567,313 +568,315 @@ static yyconst flex_int32_t yy_meta[66] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int16_t yy_base[1357] =
+static yyconst flex_int16_t yy_base[1369] =
{ 0,
0, 0, 63, 66, 69, 71, 77, 83, 88, 91,
- 129, 135, 483, 443, 95, 3880, 3880, 3880, 107, 110,
- 142, 140, 108, 50, 159, 147, 121, 148, 158, 174,
- 191, 176, 190, 216, 225, 235, 214, 246, 116, 436,
- 3880, 3880, 3880, 94, 402, 3880, 3880, 3880, 96, 335,
- 329, 3880, 3880, 3880, 214, 282, 3880, 3880, 3880, 102,
- 250, 3880, 289, 3880, 184, 293, 239, 297, 111, 0,
- 301, 0, 0, 219, 223, 248, 273, 280, 285, 290,
- 286, 283, 310, 294, 291, 297, 309, 316, 232, 319,
- 338, 303, 334, 345, 326, 347, 349, 342, 350, 360,
-
- 343, 376, 370, 384, 371, 368, 187, 375, 374, 137,
- 387, 403, 378, 390, 401, 386, 405, 400, 407, 229,
- 154, 186, 199, 163, 448, 176, 115, 277, 90, 452,
- 463, 0, 432, 441, 318, 433, 442, 439, 437, 465,
- 462, 469, 493, 471, 455, 473, 453, 479, 490, 477,
- 494, 496, 498, 510, 492, 517, 530, 526, 549, 522,
- 525, 532, 542, 534, 536, 541, 544, 545, 556, 529,
- 558, 552, 560, 559, 568, 578, 574, 561, 582, 591,
- 603, 583, 599, 610, 607, 612, 608, 594, 611, 616,
- 617, 618, 624, 640, 629, 635, 649, 637, 639, 658,
-
- 664, 643, 669, 657, 672, 677, 676, 663, 660, 665,
- 680, 688, 679, 690, 698, 705, 699, 701, 703, 706,
- 710, 738, 674, 720, 734, 716, 733, 736, 739, 752,
- 747, 737, 756, 750, 767, 773, 761, 766, 777, 763,
- 790, 771, 781, 791, 804, 797, 849, 800, 812, 789,
- 814, 820, 809, 830, 826, 828, 839, 847, 831, 866,
- 884, 857, 853, 859, 873, 883, 893, 881, 889, 896,
- 892, 902, 909, 906, 910, 911, 916, 912, 926, 935,
- 920, 937, 938, 948, 951, 934, 957, 3880, 959, 942,
- 962, 965, 954, 3880, 952, 968, 953, 986, 990, 975,
-
- 978, 981, 1000, 992, 1001, 993, 995, 1041, 1012, 994,
- 1033, 1023, 1025, 1019, 1034, 1036, 1046, 1039, 1029, 1050,
- 1059, 1070, 1061, 1068, 1078, 1028, 1075, 1071, 1077, 1092,
- 1081, 1084, 1085, 1098, 1102, 1103, 1113, 1122, 1121, 1124,
- 1126, 1110, 1127, 1129, 1130, 1134, 1136, 1119, 1140, 1142,
- 1148, 1168, 1151, 1154, 1146, 1161, 1166, 1167, 1173, 1178,
- 1175, 1181, 1179, 1193, 1198, 1199, 1191, 1197, 1210, 1213,
- 1212, 1233, 1194, 1218, 1229, 1234, 1239, 1244, 1230, 1231,
- 1236, 1242, 1260, 1243, 1238, 1254, 1263, 1271, 1258, 1282,
- 1280, 1281, 1276, 1269, 1287, 1290, 1289, 1295, 1296, 1307,
-
- 1308, 1311, 1316, 1279, 1327, 1328, 1329, 1309, 1339, 3880,
- 1341, 1338, 1343, 1336, 1335, 3880, 3880, 1347, 3880, 3880,
- 1363, 1367, 1374, 1353, 1404, 1371, 1365, 1357, 1390, 1385,
- 1380, 1401, 1398, 1414, 1394, 1399, 1417, 1410, 1426, 1424,
- 1429, 1425, 1432, 1438, 1445, 1449, 1450, 1452, 1443, 1457,
- 1464, 1467, 1465, 1468, 1459, 3880, 1466, 1476, 1479, 1482,
- 1499, 3880, 1487, 1491, 1484, 1493, 1496, 1492, 1509, 1503,
- 1506, 1518, 1520, 1526, 1524, 1535, 1472, 1537, 1519, 1543,
- 1545, 1536, 1559, 1562, 1553, 1548, 1554, 1573, 1558, 1574,
- 1579, 1575, 1584, 1572, 1568, 1582, 1621, 1594, 1583, 1589,
-
- 1593, 1601, 1600, 1606, 1617, 1639, 1631, 1615, 1634, 1642,
- 1649, 1644, 1641, 1656, 1650, 1658, 3880, 1664, 1677, 1659,
- 1671, 1682, 1679, 1674, 1685, 1676, 1681, 1691, 1698, 3880,
- 1692, 1701, 1694, 1708, 1719, 1720, 1730, 1734, 3880, 1736,
- 1737, 1739, 1718, 1728, 1746, 1723, 1747, 1754, 1756, 1761,
- 1753, 1763, 1760, 1774, 1764, 1765, 1773, 1783, 1780, 1790,
- 1779, 1799, 1787, 1743, 1807, 1800, 1808, 1794, 1804, 1816,
- 337, 1812, 1810, 1814, 1811, 3880, 76, 1834, 1817, 1827,
- 1853, 1854, 1846, 1838, 1842, 1857, 1843, 1849, 1866, 1850,
- 1863, 1877, 1867, 1883, 1873, 1893, 1878, 1881, 1891, 1889,
-
- 1884, 1900, 1880, 1911, 1907, 1909, 1923, 3880, 1875, 1912,
- 1927, 1920, 1936, 1946, 1918, 1928, 1916, 1950, 1947, 1955,
- 1956, 1961, 1958, 1953, 1965, 1969, 1970, 1977, 1991, 1979,
- 3880, 1985, 1986, 1976, 1996, 1992, 1987, 2006, 1997, 2004,
- 2025, 2026, 3880, 2027, 2034, 2016, 2040, 2021, 2044, 2045,
- 2046, 2031, 2054, 2047, 2058, 2042, 2043, 2057, 3880, 2069,
- 2079, 2075, 2083, 2084, 2070, 2077, 2092, 2074, 2072, 2087,
- 2078, 2097, 2082, 2102, 2106, 2107, 2110, 2085, 3880, 2140,
- 2112, 2123, 2137, 2125, 2127, 2144, 2131, 2153, 2104, 2136,
- 2154, 2152, 2155, 2156, 2159, 2176, 2175, 2160, 2170, 2187,
-
- 2198, 2199, 2195, 3880, 2200, 2193, 2182, 2210, 2208, 2194,
- 2197, 2211, 2209, 2202, 2212, 2214, 2225, 2226, 2232, 2227,
- 2234, 2250, 2242, 2252, 2253, 2254, 2235, 2264, 2260, 2280,
- 2268, 2271, 3880, 3880, 2281, 2269, 2272, 3880, 2285, 3880,
- 2289, 3880, 2291, 2299, 2287, 2276, 2304, 2290, 2306, 2303,
- 2318, 2298, 2311, 2330, 2316, 2332, 3880, 2321, 2326, 2341,
- 2324, 2336, 2338, 2350, 2349, 2314, 2353, 2360, 2364, 3880,
- 2367, 2357, 2375, 2328, 2385, 2371, 2369, 2383, 2387, 2381,
- 2390, 2393, 2401, 2400, 2405, 2409, 2397, 2414, 2394, 2427,
- 2415, 2417, 2419, 2424, 2436, 2438, 2432, 3880, 3880, 2449,
-
- 2452, 2441, 2451, 2442, 2471, 2463, 2462, 2473, 2465, 2468,
- 2475, 2477, 2469, 2479, 2500, 2487, 2495, 3880, 2490, 2498,
- 2509, 2505, 2519, 2510, 2526, 3880, 3880, 2525, 2518, 2521,
- 2515, 2528, 2536, 3880, 2537, 2543, 2546, 2560, 2562, 2532,
- 2549, 2564, 2569, 2561, 2568, 2570, 2581, 2571, 2585, 2584,
- 2586, 2593, 2591, 2601, 2589, 2594, 2595, 2599, 2604, 2605,
- 2623, 2624, 2609, 2626, 3880, 2637, 2616, 2639, 2613, 2644,
- 2646, 2641, 2643, 2640, 2649, 2652, 2627, 2658, 2651, 2679,
- 2661, 3880, 2674, 2671, 2684, 2685, 2666, 2689, 2676, 2693,
- 3880, 2695, 2699, 2703, 2698, 2697, 2710, 2719, 2711, 2718,
-
- 2716, 2724, 2734, 2732, 2736, 2744, 2727, 2742, 2738, 2749,
- 2757, 2768, 2758, 2776, 2761, 2774, 2765, 2755, 2785, 2764,
- 2791, 2781, 3880, 2787, 2789, 2794, 2792, 2797, 2800, 2801,
- 3880, 3880, 2784, 3880, 2814, 2804, 2821, 2823, 3880, 2809,
- 3880, 3880, 2820, 2839, 2827, 2837, 2841, 2840, 3880, 2845,
- 2831, 2854, 2835, 2848, 2857, 2861, 2859, 2865, 3880, 2871,
- 2875, 2862, 2881, 2879, 2891, 2868, 2892, 2903, 2904, 2906,
- 2895, 2896, 2914, 2910, 3880, 2907, 2921, 2925, 2917, 2937,
- 2943, 2930, 2938, 2942, 2953, 3880, 2941, 2940, 2955, 3880,
- 2957, 3880, 2969, 2934, 2970, 2928, 2974, 2951, 2972, 2984,
-
- 2987, 2976, 2993, 2986, 3880, 3880, 2995, 3000, 3006, 2996,
- 3012, 3001, 3009, 3020, 3003, 3018, 3880, 3014, 3021, 3022,
- 3030, 3032, 3880, 3046, 3047, 3041, 3045, 3059, 3055, 3061,
- 3049, 3063, 3066, 3052, 3075, 3078, 3064, 3880, 3079, 3092,
- 3076, 3094, 3081, 3090, 3097, 3112, 3104, 3088, 3109, 3880,
- 3114, 3103, 3115, 3111, 3106, 3127, 3110, 3131, 3125, 3143,
- 3134, 3141, 3142, 2999, 3153, 3880, 3140, 3880, 3154, 3164,
- 3168, 3173, 3880, 3170, 3167, 3880, 3169, 3161, 3183, 3194,
- 3186, 3202, 3199, 3187, 3201, 3188, 3206, 3190, 3197, 3880,
- 3220, 3213, 3214, 3217, 3880, 3880, 3226, 3880, 3880, 3223,
-
- 3880, 3880, 3232, 3239, 3880, 3242, 3880, 3224, 3247, 3240,
- 3230, 3238, 3880, 3255, 3880, 3880, 3253, 3259, 3246, 3257,
- 3268, 3271, 3272, 3264, 3263, 3265, 3266, 3282, 3280, 3296,
- 3288, 3275, 3286, 3298, 3290, 3302, 3292, 3307, 3313, 3320,
- 3880, 3304, 3325, 3880, 3330, 3323, 3321, 3317, 3324, 3338,
- 3337, 3346, 3359, 3343, 3341, 3347, 3880, 3352, 3880, 3880,
- 3355, 3363, 3361, 3357, 3362, 3880, 3376, 3373, 3377, 3378,
- 3880, 3880, 3880, 3390, 3374, 3386, 3401, 3403, 3389, 3880,
- 3394, 3405, 3407, 3399, 3411, 3415, 3424, 3425, 3427, 3880,
- 3426, 3417, 3880, 3437, 3430, 3436, 3438, 3448, 3441, 3880,
-
- 3442, 3452, 3446, 3451, 3455, 3454, 3475, 3880, 3457, 3470,
- 3880, 3459, 3880, 3880, 3465, 3489, 3488, 3494, 3495, 3478,
- 3486, 3503, 3501, 3502, 3880, 3880, 3498, 3880, 3880, 3492,
- 3512, 3505, 3507, 3510, 3509, 3522, 3517, 3531, 3525, 3880,
- 3547, 3880, 3528, 3548, 3552, 3551, 3880, 3553, 3549, 3532,
- 3880, 3880, 3558, 3564, 3559, 3880, 3566, 3572, 3575, 3582,
- 3596, 3591, 3585, 3584, 3598, 3599, 3587, 3588, 3605, 3611,
- 3880, 3610, 3602, 3614, 3617, 3619, 3620, 3623, 3625, 3642,
- 3641, 3648, 3632, 3880, 3640, 3650, 3656, 3657, 3658, 3659,
- 3660, 3880, 3669, 3880, 3661, 3666, 3880, 3880, 3665, 3674,
-
- 3684, 3880, 3685, 3880, 3675, 3676, 3700, 3880, 3880, 3880,
- 3679, 3880, 3701, 3880, 3694, 3692, 3880, 3681, 3709, 3710,
- 3880, 3713, 3880, 3714, 3880, 3703, 3717, 3880, 3880, 3880,
- 3880, 3716, 3719, 3723, 3724, 3880, 3734, 3711, 3729, 3735,
- 3880, 3880, 3788, 3795, 3802, 3809, 3816, 82, 3823, 3830,
- 3837, 3844, 3851, 3858, 3865, 3872
+ 129, 135, 498, 454, 95, 3905, 3905, 3905, 107, 110,
+ 142, 140, 108, 50, 159, 147, 121, 148, 158, 182,
+ 193, 169, 204, 218, 232, 254, 189, 238, 116, 425,
+ 3905, 3905, 3905, 94, 352, 3905, 3905, 3905, 96, 338,
+ 371, 3905, 3905, 3905, 212, 295, 3905, 3905, 3905, 102,
+ 288, 3905, 293, 3905, 185, 297, 250, 301, 111, 0,
+ 305, 0, 0, 231, 162, 282, 241, 235, 289, 215,
+ 286, 284, 311, 294, 290, 296, 300, 315, 307, 322,
+ 337, 325, 323, 351, 329, 333, 355, 361, 349, 365,
+
+ 356, 346, 373, 376, 382, 370, 385, 386, 383, 388,
+ 137, 393, 410, 389, 392, 403, 188, 417, 414, 409,
+ 242, 154, 205, 281, 179, 450, 202, 115, 333, 90,
+ 467, 471, 0, 420, 441, 443, 440, 240, 450, 449,
+ 452, 451, 475, 499, 473, 453, 479, 462, 483, 489,
+ 477, 480, 512, 470, 504, 505, 501, 533, 522, 537,
+ 538, 532, 521, 549, 548, 559, 560, 550, 552, 546,
+ 555, 540, 563, 568, 554, 567, 569, 584, 582, 577,
+ 590, 593, 609, 587, 607, 619, 611, 620, 601, 604,
+ 617, 616, 621, 627, 614, 643, 652, 644, 656, 646,
+
+ 648, 658, 664, 665, 660, 653, 675, 672, 669, 666,
+ 679, 684, 685, 680, 682, 702, 719, 707, 704, 701,
+ 708, 699, 709, 711, 737, 730, 748, 735, 727, 744,
+ 733, 754, 757, 741, 743, 765, 767, 768, 769, 762,
+ 785, 782, 778, 783, 781, 793, 784, 816, 803, 861,
+ 807, 812, 805, 823, 809, 818, 820, 832, 839, 840,
+ 851, 843, 867, 862, 865, 870, 879, 860, 881, 889,
+ 878, 897, 905, 906, 904, 913, 910, 831, 912, 916,
+ 922, 924, 841, 907, 920, 938, 926, 957, 954, 939,
+ 962, 3905, 966, 943, 953, 965, 956, 3905, 949, 951,
+
+ 983, 977, 991, 976, 984, 978, 1003, 993, 1001, 996,
+ 994, 1040, 995, 1009, 1042, 1017, 1030, 1018, 1049, 1036,
+ 1053, 1044, 1035, 1033, 1067, 1052, 1068, 1069, 1081, 1093,
+ 1078, 1073, 1088, 1097, 1086, 1092, 1094, 1099, 1103, 1106,
+ 1107, 1114, 1122, 1123, 1131, 1111, 1130, 1133, 1143, 1136,
+ 1139, 1125, 1146, 1142, 1134, 1173, 1150, 1157, 1156, 1152,
+ 1164, 1175, 1174, 1183, 1170, 1177, 1197, 1192, 1191, 1193,
+ 1200, 1204, 1212, 1201, 1208, 1224, 1234, 1213, 1227, 1239,
+ 1241, 1243, 1244, 1232, 1237, 1233, 1238, 1263, 1253, 1259,
+ 1260, 1261, 1248, 1264, 1280, 1288, 1290, 1277, 1279, 1284,
+
+ 1289, 1294, 1302, 1307, 1308, 1300, 1321, 1305, 1316, 1326,
+ 1334, 1329, 1317, 1341, 3905, 1351, 1345, 1336, 1344, 1347,
+ 3905, 3905, 1353, 3905, 3905, 1357, 1340, 1355, 1379, 1405,
+ 1378, 1369, 1363, 1389, 1391, 1393, 1394, 1384, 1401, 1410,
+ 1411, 1406, 1422, 1434, 1426, 1427, 1437, 1443, 1450, 1451,
+ 1452, 1453, 1440, 1457, 1456, 1458, 1464, 1460, 1468, 1470,
+ 1454, 3905, 1485, 1475, 1492, 1479, 1496, 3905, 1483, 1484,
+ 1497, 1486, 1498, 1500, 1510, 1511, 1503, 1519, 1525, 1527,
+ 1520, 1534, 1546, 1547, 1531, 1541, 1538, 1536, 1558, 1566,
+ 1561, 1554, 1556, 1575, 1562, 1576, 1579, 1577, 1583, 1571,
+
+ 1570, 1581, 1620, 1597, 1580, 1585, 1599, 1612, 1616, 1628,
+ 1615, 1640, 1632, 1624, 1642, 1617, 1644, 1645, 1656, 1655,
+ 1635, 1673, 3905, 1682, 1676, 1665, 1672, 1681, 1678, 1669,
+ 1689, 1671, 1693, 1701, 1699, 3905, 1698, 1704, 1708, 1697,
+ 1714, 1725, 1718, 1731, 1737, 3905, 1740, 1738, 1744, 1728,
+ 1733, 1745, 1735, 1746, 1758, 1755, 1762, 1776, 1770, 1759,
+ 1778, 1766, 1772, 1767, 1783, 1793, 1795, 1774, 1799, 1801,
+ 1811, 1813, 1806, 1815, 1797, 1803, 1819, 478, 1814, 1825,
+ 1818, 1822, 3905, 76, 1836, 1838, 1835, 1839, 1840, 1846,
+ 1842, 1843, 1849, 1845, 1864, 1868, 1867, 1862, 1870, 1869,
+
+ 1881, 1873, 1889, 1890, 1894, 1895, 1891, 1904, 1880, 1887,
+ 1918, 1912, 1913, 1902, 3905, 1908, 1920, 1917, 1921, 1937,
+ 1953, 1930, 1946, 1950, 1957, 1951, 1954, 1961, 1963, 1960,
+ 1952, 1949, 1975, 1978, 1986, 1992, 1994, 1984, 3905, 1993,
+ 1989, 1980, 1987, 1990, 2007, 2013, 2011, 2016, 2006, 2026,
+ 3905, 2042, 2039, 2028, 2032, 2030, 2046, 2043, 2049, 2031,
+ 2055, 2053, 2057, 2063, 2058, 2072, 3905, 2056, 2067, 2087,
+ 2069, 2077, 2074, 2084, 2097, 2078, 2080, 2104, 2082, 2090,
+ 2094, 2114, 2096, 2101, 2100, 2109, 3905, 2138, 2120, 2117,
+ 2128, 2122, 2130, 2144, 2134, 2137, 2149, 2139, 2151, 2153,
+
+ 2161, 2164, 2166, 2165, 2167, 2180, 2177, 2194, 2176, 2191,
+ 2188, 3905, 2195, 2192, 2183, 2212, 2205, 2201, 2204, 2208,
+ 2211, 2218, 2221, 2217, 2222, 2227, 2233, 2226, 2216, 2243,
+ 2254, 2251, 2238, 2249, 2250, 2260, 2266, 2267, 2270, 2264,
+ 2275, 3905, 3905, 2283, 2289, 2279, 3905, 2292, 3905, 2295,
+ 3905, 2293, 2297, 2285, 2278, 2299, 2294, 2308, 2312, 2313,
+ 2306, 2307, 2325, 2319, 2337, 3905, 2326, 2333, 2348, 2323,
+ 2331, 2334, 2355, 2358, 2341, 2346, 2353, 2356, 3905, 2372,
+ 2361, 2376, 2391, 2394, 2374, 2378, 2380, 2393, 2385, 2404,
+ 2396, 2405, 2384, 2406, 2414, 2401, 2418, 2425, 2420, 2419,
+
+ 2423, 2427, 2429, 2433, 2446, 2435, 3905, 3905, 2449, 2456,
+ 2463, 2453, 2465, 2445, 2472, 2470, 2467, 2477, 2473, 2475,
+ 2471, 2491, 2482, 2485, 2486, 2494, 2499, 3905, 2523, 2504,
+ 2527, 2518, 2529, 2515, 2530, 3905, 3905, 2532, 2525, 2535,
+ 2542, 2520, 2546, 3905, 2521, 2554, 2565, 2566, 2567, 2568,
+ 2551, 2560, 2576, 2569, 2578, 2588, 2586, 2594, 2589, 2602,
+ 2584, 2609, 2603, 2614, 2593, 2597, 2604, 2599, 2622, 2605,
+ 2628, 2637, 2642, 2640, 3905, 2644, 2629, 2646, 2626, 2648,
+ 2653, 2661, 2665, 2638, 2639, 2656, 2641, 2660, 2664, 2671,
+ 2673, 3905, 2685, 2682, 2680, 2689, 2688, 2675, 2704, 2687,
+
+ 2692, 3905, 2720, 2714, 2706, 2711, 2727, 2724, 2721, 2716,
+ 2719, 2723, 2722, 2733, 2735, 2754, 2755, 2746, 2745, 2762,
+ 2768, 2778, 2779, 2764, 2781, 2771, 2780, 2773, 2763, 2791,
+ 2774, 2797, 2787, 3905, 2801, 2802, 2809, 2807, 2811, 2814,
+ 2808, 3905, 3905, 2810, 3905, 2818, 2815, 2812, 2823, 3905,
+ 2825, 3905, 3905, 2837, 2831, 2836, 2854, 2859, 2856, 3905,
+ 2858, 2842, 2866, 2847, 2860, 2863, 2864, 2869, 2850, 3905,
+ 2874, 2871, 2886, 2896, 3905, 2893, 2908, 2883, 2910, 2912,
+ 2911, 2913, 2899, 2901, 2923, 2919, 3905, 2903, 2933, 2925,
+ 2941, 2945, 2956, 2946, 2949, 2959, 2960, 3905, 2950, 2942,
+
+ 2951, 3905, 2969, 3905, 2973, 2968, 2988, 2929, 2989, 2999,
+ 2982, 3000, 3002, 2990, 3005, 3006, 3905, 3905, 3009, 3008,
+ 3010, 3027, 3016, 3015, 3025, 3017, 3024, 3028, 3905, 3029,
+ 3038, 3037, 3048, 3041, 3905, 3059, 3066, 3063, 3065, 3070,
+ 3061, 3072, 3068, 3073, 3079, 3064, 3082, 3094, 3085, 3905,
+ 3096, 3102, 3088, 3111, 3095, 3108, 3115, 3116, 3119, 3106,
+ 3120, 3905, 3124, 3100, 3129, 3127, 3137, 3134, 3123, 3142,
+ 3141, 3153, 3145, 3156, 3161, 3171, 3169, 3905, 3154, 3905,
+ 3168, 3178, 3175, 3185, 3905, 3176, 3172, 3905, 3187, 3188,
+ 3207, 3204, 3206, 3210, 3211, 3199, 3218, 3203, 3220, 3228,
+
+ 3221, 3905, 3213, 3234, 3224, 3240, 3905, 3905, 3243, 3905,
+ 3905, 3241, 3905, 3905, 3248, 3257, 3905, 3258, 3905, 3264,
+ 3261, 3247, 3250, 3260, 3905, 3273, 3905, 3905, 3271, 3277,
+ 3267, 3278, 3282, 3286, 3293, 3284, 3289, 3285, 3290, 3303,
+ 3294, 3295, 3292, 3299, 3311, 3305, 3309, 3313, 3317, 3332,
+ 3334, 3343, 3905, 3328, 3347, 3905, 3349, 3341, 3336, 3338,
+ 3353, 3363, 3362, 3357, 3373, 3367, 3366, 3368, 3905, 3372,
+ 3905, 3905, 3376, 3383, 3387, 3377, 3384, 3905, 3397, 3398,
+ 3401, 3405, 3905, 3905, 3905, 3406, 3394, 3411, 3421, 3422,
+ 3423, 3905, 3415, 3432, 3434, 3425, 3435, 3436, 3445, 3446,
+
+ 3451, 3905, 3450, 3444, 3905, 3457, 3452, 3459, 3461, 3473,
+ 3466, 3905, 3462, 3471, 3469, 3467, 3480, 3477, 3486, 3905,
+ 3496, 3493, 3905, 3499, 3905, 3905, 3489, 3510, 3512, 3514,
+ 3519, 3503, 3508, 3528, 3525, 3523, 3905, 3905, 3534, 3905,
+ 3905, 3524, 3536, 3526, 3530, 3546, 3542, 3539, 3538, 3551,
+ 3548, 3905, 3553, 3905, 3558, 3577, 3575, 3572, 3905, 3573,
+ 3578, 3567, 3905, 3905, 3583, 3595, 3584, 3905, 3602, 3589,
+ 3594, 3597, 3601, 3605, 3610, 3608, 3622, 3628, 3616, 3617,
+ 3618, 3641, 3905, 3631, 3632, 3629, 3638, 3647, 3643, 3649,
+ 3644, 3648, 3654, 3650, 3653, 3905, 3668, 3678, 3667, 3684,
+
+ 3685, 3681, 3687, 3905, 3689, 3905, 3692, 3691, 3905, 3905,
+ 3693, 3697, 3695, 3905, 3698, 3905, 3706, 3702, 3711, 3905,
+ 3905, 3905, 3704, 3905, 3717, 3905, 3707, 3720, 3905, 3714,
+ 3736, 3737, 3905, 3739, 3905, 3740, 3905, 3731, 3744, 3905,
+ 3905, 3905, 3905, 3742, 3729, 3750, 3748, 3905, 3753, 3738,
+ 3755, 3751, 3905, 3905, 3813, 3820, 3827, 3834, 3841, 82,
+ 3848, 3855, 3862, 3869, 3876, 3883, 3890, 3897
} ;
-static yyconst flex_int16_t yy_def[1357] =
+static yyconst flex_int16_t yy_def[1369] =
{ 0,
- 1342, 1, 1343, 1343, 1344, 1344, 1345, 1345, 1346, 1346,
- 1347, 1347, 1342, 1348, 1342, 1342, 1342, 1342, 1349, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1350,
- 1342, 1342, 1342, 1350, 1351, 1342, 1342, 1342, 1351, 1352,
- 1342, 1342, 1342, 1342, 1352, 1353, 1342, 1342, 1342, 1353,
- 1354, 1342, 1355, 1342, 1354, 1354, 1348, 1348, 1342, 1356,
- 1349, 1356, 1349, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
-
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1350,
- 1350, 1351, 1351, 1352, 1352, 1342, 1353, 1353, 1354, 1354,
- 1355, 1355, 1354, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1354, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
-
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1354,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348,
- 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348,
-
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1354, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
-
- 1348, 1348, 1348, 1348, 1354, 1348, 1348, 1348, 1348, 1342,
- 1348, 1348, 1348, 1348, 1348, 1342, 1342, 1348, 1342, 1342,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348,
- 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1354, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
-
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1342, 1354, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
-
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
-
- 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1342, 1342, 1348, 1348, 1348, 1342, 1348, 1342,
- 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1342, 1348,
-
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1342, 1342, 1348, 1348, 1348,
- 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
-
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1342, 1342, 1348, 1342, 1348, 1348, 1348, 1348, 1342, 1348,
- 1342, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1342,
- 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
-
- 1348, 1348, 1348, 1348, 1342, 1342, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348,
- 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1342, 1348, 1348,
- 1348, 1348, 1342, 1348, 1348, 1342, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
- 1348, 1348, 1348, 1348, 1342, 1342, 1348, 1342, 1342, 1348,
-
- 1342, 1342, 1348, 1348, 1342, 1348, 1342, 1348, 1348, 1348,
- 1348, 1348, 1342, 1348, 1342, 1342, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1342, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1342, 1342,
- 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348,
- 1342, 1342, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
- 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
-
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342, 1348, 1348,
- 1342, 1348, 1342, 1342, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1342, 1342, 1348, 1342, 1342, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1342,
- 1348, 1342, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348,
- 1342, 1342, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1342, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348, 1348, 1348,
- 1348, 1342, 1348, 1342, 1348, 1348, 1342, 1342, 1348, 1348,
-
- 1348, 1342, 1348, 1342, 1348, 1348, 1348, 1342, 1342, 1342,
- 1348, 1342, 1348, 1342, 1348, 1348, 1342, 1348, 1348, 1348,
- 1342, 1348, 1342, 1348, 1342, 1348, 1348, 1342, 1342, 1342,
- 1342, 1348, 1348, 1348, 1348, 1342, 1348, 1348, 1348, 1348,
- 1342, 0, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
- 1342, 1342, 1342, 1342, 1342, 1342
+ 1354, 1, 1355, 1355, 1356, 1356, 1357, 1357, 1358, 1358,
+ 1359, 1359, 1354, 1360, 1354, 1354, 1354, 1354, 1361, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1362,
+ 1354, 1354, 1354, 1362, 1363, 1354, 1354, 1354, 1363, 1364,
+ 1354, 1354, 1354, 1354, 1364, 1365, 1354, 1354, 1354, 1365,
+ 1366, 1354, 1367, 1354, 1366, 1366, 1360, 1360, 1354, 1368,
+ 1361, 1368, 1361, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1362, 1362, 1363, 1363, 1364, 1364, 1354, 1365, 1365, 1366,
+ 1366, 1367, 1367, 1366, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1366, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1366, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360,
+
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1366, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1366,
+ 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360,
+ 1354, 1354, 1360, 1354, 1354, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1366, 1360, 1360, 1360,
+
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1354, 1366, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1354, 1354, 1360, 1360, 1360, 1354, 1360, 1354, 1360,
+ 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+
+ 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1354, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1354, 1354, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+
+ 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1354, 1354, 1360, 1354, 1360, 1360, 1360, 1360, 1354,
+ 1360, 1354, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1354,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354,
+ 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360,
+
+ 1360, 1354, 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1354, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360,
+ 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1354,
+ 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1354, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+
+ 1360, 1354, 1360, 1360, 1360, 1360, 1354, 1354, 1360, 1354,
+ 1354, 1360, 1354, 1354, 1360, 1360, 1354, 1360, 1354, 1360,
+ 1360, 1360, 1360, 1360, 1354, 1360, 1354, 1354, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1354, 1360, 1360, 1354, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1360,
+ 1354, 1354, 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360,
+ 1360, 1360, 1354, 1354, 1354, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+
+ 1360, 1354, 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1354,
+ 1360, 1360, 1354, 1360, 1354, 1354, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1354, 1354, 1360, 1354,
+ 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1354, 1360, 1354, 1360, 1360, 1360, 1360, 1354, 1360,
+ 1360, 1360, 1354, 1354, 1360, 1360, 1360, 1354, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1354, 1360, 1360, 1360, 1360, 1360, 1360, 1360,
+ 1360, 1360, 1360, 1360, 1360, 1354, 1360, 1360, 1360, 1360,
+
+ 1360, 1360, 1360, 1354, 1360, 1354, 1360, 1360, 1354, 1354,
+ 1360, 1360, 1360, 1354, 1360, 1354, 1360, 1360, 1360, 1354,
+ 1354, 1354, 1360, 1354, 1360, 1354, 1360, 1360, 1354, 1360,
+ 1360, 1360, 1354, 1360, 1354, 1360, 1354, 1360, 1360, 1354,
+ 1354, 1354, 1354, 1360, 1360, 1360, 1360, 1354, 1360, 1360,
+ 1360, 1360, 1354, 0, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354
} ;
-static yyconst flex_int16_t yy_nxt[3946] =
+static yyconst flex_int16_t yy_nxt[3971] =
{ 0,
14, 15, 16, 17, 18, 19, 18, 14, 14, 14,
14, 18, 20, 14, 21, 22, 23, 24, 14, 25,
@@ -884,434 +887,436 @@ static yyconst flex_int16_t yy_nxt[3946] =
38, 14, 14, 14, 14, 41, 42, 43, 41, 42,
43, 46, 47, 46, 47, 48, 86, 48, 51, 52,
53, 54, 67, 18, 51, 52, 53, 54, 68, 18,
- 57, 58, 59, 57, 58, 59, 69, 120, 120, 122,
+ 57, 58, 59, 57, 58, 59, 69, 121, 121, 123,
- 70, 44, 122, 86, 44, 127, 127, 49, 72, 49,
- 72, 72, 69, 72, 130, 55, 70, 67, 72, 67,
- 67, 55, 67, 84, 74, 75, 60, 67, 130, 60,
+ 70, 44, 123, 86, 44, 128, 128, 49, 72, 49,
+ 72, 72, 69, 72, 131, 55, 70, 67, 72, 67,
+ 67, 55, 67, 84, 74, 75, 60, 67, 131, 60,
15, 16, 17, 62, 63, 64, 15, 16, 17, 62,
- 63, 64, 76, 85, 176, 73, 68, 92, 68, 65,
- 84, 74, 75, 128, 77, 65, 80, 120, 120, 68,
+ 63, 64, 76, 85, 178, 73, 68, 92, 68, 65,
+ 84, 74, 75, 129, 77, 65, 80, 121, 121, 68,
81, 78, 89, 82, 93, 90, 83, 66, 79, 76,
- 85, 87, 91, 66, 92, 68, 65, 126, 68, 88,
+ 85, 87, 91, 66, 92, 68, 65, 136, 68, 88,
68, 77, 65, 80, 94, 68, 68, 81, 78, 89,
82, 93, 90, 83, 95, 79, 68, 68, 87, 91,
- 96, 125, 122, 98, 97, 122, 88, 99, 101, 133,
- 102, 94, 68, 173, 68, 124, 103, 124, 124, 104,
- 124, 95, 130, 100, 123, 68, 105, 96, 68, 68,
- 98, 97, 106, 134, 99, 101, 133, 102, 135, 116,
- 173, 109, 107, 103, 117, 108, 104, 113, 150, 114,
- 100, 110, 68, 105, 68, 111, 112, 68, 118, 106,
- 134, 68, 119, 68, 115, 135, 116, 121, 109, 107,
- 68, 117, 108, 68, 113, 150, 114, 68, 110, 136,
- 127, 127, 111, 112, 68, 118, 68, 137, 130, 119,
- 72, 115, 72, 72, 129, 72, 129, 129, 67, 129,
-
- 67, 67, 72, 67, 72, 72, 136, 72, 67, 138,
- 139, 68, 72, 140, 137, 141, 142, 143, 68, 145,
- 128, 68, 146, 68, 68, 189, 147, 132, 68, 68,
- 126, 149, 68, 155, 144, 68, 138, 139, 148, 73,
- 140, 68, 141, 142, 151, 663, 145, 68, 68, 146,
- 156, 160, 152, 147, 68, 153, 68, 68, 149, 158,
- 155, 144, 161, 159, 68, 148, 163, 162, 164, 154,
- 157, 151, 68, 125, 166, 68, 68, 156, 160, 152,
- 68, 68, 153, 68, 165, 68, 158, 68, 68, 161,
- 159, 167, 172, 163, 162, 164, 154, 157, 68, 168,
-
- 169, 166, 171, 175, 170, 174, 68, 180, 68, 68,
- 177, 165, 68, 68, 68, 178, 68, 181, 167, 172,
- 183, 184, 68, 185, 68, 68, 168, 169, 68, 171,
- 175, 170, 174, 182, 180, 179, 186, 177, 68, 68,
- 123, 68, 178, 68, 181, 68, 187, 183, 184, 124,
- 185, 124, 124, 129, 124, 129, 129, 188, 129, 190,
- 182, 191, 179, 186, 72, 192, 72, 72, 193, 72,
- 130, 68, 194, 187, 121, 68, 196, 68, 195, 68,
- 68, 68, 1342, 202, 188, 203, 190, 205, 191, 204,
- 1342, 68, 192, 68, 206, 193, 1342, 1342, 1342, 1342,
-
- 68, 132, 208, 68, 1342, 195, 207, 68, 197, 68,
- 202, 68, 203, 198, 205, 68, 204, 68, 199, 210,
- 209, 206, 211, 214, 200, 201, 213, 212, 68, 208,
- 68, 68, 68, 207, 68, 197, 68, 216, 217, 222,
- 198, 224, 220, 225, 215, 199, 210, 209, 68, 211,
- 214, 200, 201, 213, 212, 68, 218, 221, 223, 226,
- 68, 227, 230, 68, 68, 217, 219, 68, 68, 220,
- 68, 215, 68, 229, 68, 234, 228, 231, 232, 68,
- 68, 238, 68, 68, 221, 223, 226, 68, 227, 230,
- 68, 233, 239, 219, 68, 240, 68, 68, 68, 68,
-
- 229, 235, 234, 228, 231, 232, 68, 236, 237, 241,
- 242, 244, 68, 243, 247, 1342, 68, 245, 233, 239,
- 68, 68, 240, 253, 251, 248, 1342, 1342, 235, 68,
- 252, 250, 68, 254, 236, 237, 241, 68, 244, 246,
- 243, 68, 249, 258, 255, 68, 130, 259, 68, 68,
- 68, 251, 248, 256, 68, 68, 68, 252, 250, 257,
- 254, 260, 68, 265, 261, 262, 246, 68, 1342, 249,
- 258, 255, 263, 68, 259, 68, 266, 68, 68, 264,
- 256, 68, 267, 270, 268, 288, 257, 68, 260, 272,
- 265, 261, 262, 269, 271, 68, 68, 273, 68, 263,
-
- 275, 68, 68, 68, 274, 278, 264, 68, 276, 267,
- 68, 268, 68, 277, 68, 68, 272, 68, 68, 279,
- 269, 271, 280, 283, 273, 1342, 68, 275, 68, 281,
- 284, 274, 282, 285, 289, 276, 68, 68, 1342, 68,
- 277, 68, 292, 68, 68, 1342, 279, 294, 68, 280,
- 283, 286, 287, 293, 68, 295, 281, 284, 68, 282,
- 285, 289, 290, 299, 296, 291, 1342, 1342, 298, 292,
- 308, 68, 68, 297, 68, 68, 68, 68, 286, 287,
- 293, 300, 295, 301, 1342, 68, 303, 302, 68, 290,
- 68, 296, 291, 304, 68, 298, 305, 307, 306, 68,
-
- 297, 68, 1342, 310, 68, 68, 309, 1342, 300, 68,
- 301, 68, 311, 303, 302, 68, 312, 1342, 313, 68,
- 304, 325, 315, 305, 307, 306, 323, 130, 68, 68,
- 310, 1342, 324, 309, 314, 68, 1342, 329, 68, 311,
- 328, 1342, 68, 312, 326, 313, 327, 68, 325, 315,
- 68, 1342, 68, 323, 331, 1342, 334, 330, 68, 324,
- 1342, 314, 316, 317, 68, 332, 68, 328, 68, 68,
- 1342, 326, 318, 327, 319, 320, 321, 68, 333, 322,
- 339, 331, 335, 334, 330, 68, 340, 68, 338, 316,
- 317, 68, 332, 336, 337, 68, 342, 68, 341, 318,
-
- 1342, 319, 320, 321, 68, 333, 322, 339, 343, 335,
- 344, 68, 348, 340, 345, 338, 346, 352, 349, 68,
- 1342, 68, 68, 342, 350, 341, 351, 68, 353, 347,
- 68, 68, 354, 1342, 68, 343, 355, 344, 356, 348,
- 68, 345, 357, 346, 68, 349, 1342, 68, 68, 68,
- 68, 350, 358, 351, 68, 353, 347, 359, 68, 354,
- 361, 360, 1342, 355, 68, 356, 363, 362, 1342, 364,
- 1342, 365, 68, 68, 366, 68, 68, 369, 372, 358,
- 68, 367, 375, 370, 359, 368, 68, 361, 360, 68,
- 68, 68, 68, 363, 362, 68, 364, 68, 365, 371,
-
- 68, 366, 373, 68, 369, 372, 68, 376, 367, 374,
- 370, 1342, 368, 68, 377, 378, 68, 380, 379, 68,
- 381, 389, 1342, 1342, 68, 382, 371, 1342, 68, 373,
- 68, 68, 68, 68, 376, 406, 374, 393, 68, 68,
- 390, 377, 378, 388, 380, 379, 395, 381, 389, 391,
- 68, 1342, 382, 383, 392, 394, 1342, 68, 384, 399,
- 385, 68, 396, 68, 393, 398, 68, 68, 386, 397,
- 388, 68, 68, 395, 68, 401, 391, 68, 387, 68,
- 383, 392, 394, 400, 68, 384, 399, 385, 68, 396,
- 402, 403, 398, 405, 404, 386, 397, 68, 407, 68,
-
- 408, 409, 401, 410, 411, 387, 68, 412, 68, 68,
- 400, 413, 414, 68, 416, 68, 130, 402, 403, 68,
- 405, 404, 68, 68, 417, 407, 415, 408, 409, 418,
- 68, 411, 419, 421, 412, 420, 68, 425, 413, 414,
- 68, 68, 422, 423, 424, 1342, 1342, 429, 68, 426,
- 428, 68, 427, 415, 1342, 1342, 1342, 68, 430, 68,
- 68, 436, 68, 435, 68, 68, 437, 68, 68, 422,
- 423, 424, 68, 431, 68, 438, 426, 428, 68, 427,
- 68, 439, 432, 441, 68, 430, 68, 433, 445, 68,
- 435, 434, 68, 437, 443, 1342, 446, 442, 444, 68,
-
- 431, 457, 438, 440, 68, 68, 68, 447, 439, 432,
- 441, 68, 448, 68, 433, 449, 68, 68, 434, 68,
- 450, 443, 451, 446, 442, 444, 452, 453, 454, 68,
- 440, 68, 68, 1342, 447, 68, 68, 68, 458, 448,
- 455, 461, 449, 459, 456, 462, 1342, 450, 68, 451,
- 68, 68, 463, 452, 453, 454, 68, 464, 460, 465,
- 466, 1342, 1342, 470, 471, 458, 467, 68, 68, 68,
- 459, 68, 68, 468, 68, 469, 68, 68, 474, 463,
- 68, 68, 68, 472, 464, 460, 465, 466, 475, 473,
- 470, 471, 68, 467, 476, 477, 68, 478, 68, 480,
-
- 468, 68, 469, 479, 490, 483, 1342, 68, 482, 68,
- 472, 481, 485, 484, 68, 475, 473, 68, 68, 68,
- 68, 476, 477, 486, 478, 68, 480, 68, 68, 488,
- 479, 490, 483, 68, 68, 482, 489, 487, 481, 485,
- 484, 494, 492, 491, 493, 68, 68, 68, 497, 68,
- 486, 495, 1342, 498, 68, 500, 488, 1342, 1342, 496,
- 506, 501, 1342, 489, 487, 130, 68, 68, 494, 492,
- 491, 493, 499, 68, 68, 502, 68, 68, 495, 68,
- 498, 68, 500, 503, 504, 68, 496, 513, 501, 505,
- 1342, 68, 1342, 515, 514, 68, 517, 1342, 518, 499,
-
- 1342, 68, 502, 68, 516, 68, 1342, 1342, 522, 68,
- 503, 504, 68, 519, 513, 1342, 505, 507, 68, 508,
- 515, 514, 509, 68, 520, 518, 521, 510, 68, 525,
- 523, 516, 68, 511, 512, 522, 68, 68, 526, 68,
- 519, 529, 68, 530, 507, 531, 508, 524, 68, 509,
- 527, 520, 68, 521, 510, 68, 525, 523, 528, 532,
- 511, 512, 68, 68, 68, 526, 533, 68, 529, 534,
- 68, 535, 536, 537, 524, 541, 68, 527, 539, 563,
- 543, 68, 538, 68, 540, 528, 532, 68, 68, 542,
- 68, 545, 1342, 533, 1342, 68, 534, 68, 535, 536,
-
- 537, 544, 68, 68, 68, 68, 68, 543, 546, 538,
- 68, 540, 554, 547, 68, 551, 542, 68, 545, 549,
- 68, 548, 68, 550, 555, 68, 552, 553, 544, 68,
- 68, 68, 556, 1342, 68, 546, 557, 68, 558, 554,
- 547, 68, 551, 560, 68, 559, 549, 68, 548, 565,
- 550, 555, 564, 552, 553, 561, 68, 68, 68, 556,
- 562, 567, 68, 557, 68, 558, 566, 571, 568, 570,
- 560, 569, 559, 68, 68, 68, 565, 572, 573, 564,
- 574, 68, 561, 68, 1342, 576, 68, 562, 567, 575,
- 577, 68, 68, 566, 571, 568, 68, 68, 569, 579,
-
- 68, 578, 580, 581, 572, 573, 68, 582, 1342, 588,
- 68, 68, 68, 68, 1342, 590, 575, 130, 591, 589,
- 68, 68, 68, 594, 595, 593, 579, 68, 578, 580,
- 581, 68, 68, 592, 582, 583, 588, 584, 68, 68,
- 601, 585, 590, 586, 68, 591, 589, 600, 587, 1342,
- 594, 596, 593, 68, 603, 68, 597, 602, 598, 68,
- 592, 608, 583, 605, 584, 604, 606, 601, 585, 68,
- 586, 610, 68, 609, 600, 587, 599, 68, 596, 68,
- 68, 603, 68, 597, 602, 598, 607, 68, 68, 612,
- 605, 611, 604, 606, 68, 613, 68, 68, 614, 615,
-
- 609, 617, 68, 599, 616, 621, 619, 618, 1342, 68,
- 624, 620, 68, 607, 68, 68, 612, 68, 611, 68,
- 68, 622, 613, 68, 625, 614, 615, 623, 617, 68,
- 68, 616, 68, 619, 618, 626, 68, 624, 620, 68,
- 627, 629, 628, 630, 635, 1342, 68, 631, 622, 632,
- 656, 625, 633, 634, 623, 638, 68, 68, 68, 636,
- 637, 68, 626, 639, 643, 1342, 68, 627, 68, 628,
- 640, 635, 68, 641, 68, 68, 632, 68, 642, 633,
- 634, 68, 638, 644, 68, 68, 636, 637, 646, 645,
- 639, 68, 68, 647, 68, 648, 651, 640, 68, 68,
-
- 641, 68, 68, 68, 649, 642, 652, 650, 653, 655,
- 644, 68, 68, 654, 657, 646, 645, 68, 68, 659,
- 647, 68, 648, 651, 660, 68, 658, 1342, 68, 661,
- 665, 649, 68, 652, 650, 653, 655, 68, 68, 662,
- 654, 664, 68, 669, 666, 68, 68, 667, 68, 68,
- 68, 660, 68, 658, 68, 68, 661, 665, 670, 668,
- 671, 672, 673, 674, 1342, 68, 662, 675, 664, 677,
- 669, 666, 68, 676, 667, 678, 68, 679, 1342, 680,
- 68, 68, 698, 681, 68, 670, 668, 68, 68, 673,
- 674, 68, 68, 682, 675, 68, 677, 683, 687, 684,
-
- 676, 68, 678, 685, 68, 68, 680, 688, 686, 693,
- 681, 68, 690, 68, 691, 68, 68, 689, 68, 68,
- 682, 68, 68, 707, 683, 687, 684, 68, 694, 68,
- 685, 68, 692, 695, 688, 686, 693, 699, 68, 690,
- 696, 691, 705, 697, 689, 68, 700, 68, 706, 68,
- 68, 701, 702, 703, 68, 694, 68, 704, 68, 692,
- 695, 68, 708, 709, 699, 68, 68, 696, 711, 705,
- 697, 710, 715, 700, 68, 706, 716, 712, 701, 702,
- 1342, 1342, 714, 713, 68, 68, 717, 1342, 68, 708,
- 709, 68, 718, 68, 68, 711, 68, 1342, 710, 68,
-
- 724, 723, 1342, 68, 712, 726, 729, 68, 68, 714,
- 713, 719, 725, 717, 68, 68, 720, 68, 721, 718,
- 722, 727, 728, 68, 68, 68, 731, 724, 723, 68,
- 68, 730, 726, 729, 68, 68, 733, 734, 719, 725,
- 732, 735, 68, 720, 68, 721, 737, 722, 727, 728,
- 736, 738, 739, 731, 68, 740, 1342, 742, 730, 68,
- 748, 741, 743, 68, 68, 68, 745, 732, 735, 68,
- 744, 747, 68, 737, 746, 749, 750, 736, 68, 739,
- 68, 68, 68, 68, 68, 68, 751, 748, 741, 743,
- 753, 752, 68, 745, 760, 68, 68, 744, 747, 756,
-
- 755, 746, 749, 757, 754, 758, 759, 68, 68, 761,
- 68, 763, 68, 68, 764, 68, 68, 68, 752, 768,
- 68, 68, 68, 68, 1342, 68, 756, 755, 762, 779,
- 68, 754, 758, 759, 1342, 68, 761, 765, 763, 767,
- 68, 764, 68, 766, 68, 68, 768, 769, 68, 771,
- 68, 770, 772, 773, 774, 762, 779, 1342, 775, 776,
- 777, 68, 780, 68, 765, 68, 767, 1342, 782, 68,
- 766, 1342, 784, 783, 68, 68, 771, 788, 68, 772,
- 773, 774, 68, 778, 781, 775, 776, 777, 785, 780,
- 68, 68, 68, 68, 68, 782, 786, 68, 68, 784,
-
- 783, 787, 789, 790, 788, 791, 792, 793, 68, 804,
- 778, 781, 796, 68, 68, 785, 794, 797, 795, 799,
- 68, 798, 1342, 786, 800, 68, 803, 801, 787, 789,
- 790, 68, 68, 68, 793, 68, 68, 68, 68, 796,
- 68, 802, 805, 794, 806, 795, 68, 68, 68, 68,
- 68, 800, 68, 803, 801, 807, 808, 809, 813, 810,
- 811, 1342, 812, 68, 68, 68, 817, 814, 802, 805,
- 68, 806, 68, 68, 816, 818, 819, 815, 822, 825,
- 68, 824, 807, 808, 809, 813, 810, 811, 68, 812,
- 68, 68, 68, 817, 814, 820, 826, 823, 68, 821,
-
- 827, 816, 68, 819, 815, 828, 68, 68, 824, 68,
- 68, 829, 831, 830, 68, 1342, 833, 834, 68, 68,
- 832, 850, 820, 68, 823, 68, 821, 68, 68, 68,
- 836, 837, 828, 838, 835, 857, 68, 68, 829, 831,
- 830, 68, 68, 833, 68, 839, 840, 832, 841, 68,
- 842, 843, 68, 844, 68, 845, 68, 836, 837, 68,
- 838, 835, 68, 848, 68, 849, 68, 846, 68, 847,
- 68, 1342, 839, 840, 68, 841, 68, 842, 843, 68,
- 844, 853, 845, 854, 851, 852, 1342, 68, 68, 856,
- 848, 68, 849, 855, 846, 68, 847, 858, 68, 860,
-
- 859, 1342, 68, 862, 865, 68, 864, 68, 853, 68,
- 854, 851, 852, 68, 861, 863, 856, 866, 872, 68,
- 855, 68, 870, 68, 858, 68, 860, 859, 68, 867,
- 862, 68, 68, 864, 873, 68, 868, 871, 68, 68,
- 869, 861, 863, 68, 866, 872, 874, 68, 875, 870,
- 877, 876, 68, 68, 878, 68, 867, 68, 879, 881,
- 882, 880, 68, 868, 871, 68, 883, 869, 884, 890,
- 68, 885, 886, 874, 68, 875, 68, 877, 876, 68,
- 68, 878, 1342, 889, 891, 879, 881, 68, 880, 68,
- 68, 887, 893, 883, 888, 884, 892, 901, 885, 886,
-
- 68, 68, 895, 68, 894, 896, 68, 68, 897, 68,
- 889, 68, 898, 68, 899, 68, 903, 68, 887, 893,
- 1342, 888, 904, 892, 900, 68, 905, 902, 68, 895,
- 1342, 894, 896, 68, 906, 897, 68, 1342, 68, 898,
- 907, 899, 910, 68, 909, 912, 908, 68, 68, 904,
- 911, 900, 920, 68, 902, 913, 68, 68, 916, 68,
- 1342, 906, 917, 68, 68, 914, 68, 907, 915, 910,
- 68, 909, 912, 908, 68, 68, 918, 911, 919, 920,
- 923, 68, 913, 921, 68, 916, 924, 68, 927, 917,
- 922, 925, 914, 926, 928, 915, 935, 931, 68, 68,
-
- 68, 930, 68, 918, 932, 919, 68, 68, 68, 68,
- 921, 933, 934, 924, 929, 939, 943, 922, 925, 68,
- 926, 928, 68, 68, 68, 937, 936, 68, 930, 68,
- 938, 68, 68, 68, 941, 942, 940, 68, 933, 68,
- 944, 929, 68, 68, 945, 946, 947, 68, 951, 948,
- 1342, 68, 937, 936, 68, 949, 1342, 938, 950, 958,
- 1342, 68, 68, 940, 68, 68, 952, 944, 953, 959,
- 1342, 955, 946, 954, 1342, 68, 948, 68, 68, 68,
- 956, 68, 68, 957, 68, 950, 958, 68, 960, 68,
- 68, 961, 962, 952, 963, 953, 68, 964, 955, 68,
-
- 954, 968, 965, 967, 68, 966, 972, 956, 975, 68,
- 957, 971, 68, 969, 68, 960, 974, 68, 961, 962,
- 970, 963, 68, 68, 964, 1342, 976, 68, 968, 965,
- 967, 68, 966, 68, 973, 68, 68, 68, 971, 977,
- 969, 68, 978, 974, 979, 989, 980, 970, 68, 68,
- 981, 982, 983, 976, 68, 986, 68, 68, 984, 987,
- 990, 973, 68, 985, 991, 68, 977, 988, 992, 978,
- 68, 979, 68, 980, 68, 993, 68, 981, 982, 983,
- 68, 994, 68, 995, 996, 984, 987, 68, 998, 997,
- 985, 999, 1000, 68, 988, 68, 68, 1001, 1002, 68,
-
- 1005, 1004, 68, 68, 1003, 1006, 68, 1011, 994, 1007,
- 1342, 996, 68, 1008, 68, 998, 997, 1009, 999, 68,
- 1017, 1010, 68, 68, 1001, 68, 1012, 68, 1004, 68,
- 68, 1003, 68, 1014, 1011, 68, 1007, 1013, 68, 68,
- 1008, 1015, 68, 1016, 1009, 1018, 1019, 68, 1010, 1021,
- 1342, 1023, 68, 1012, 1022, 1020, 1342, 1342, 68, 68,
- 1014, 68, 1025, 1024, 1013, 68, 1026, 1027, 1015, 68,
- 1016, 1028, 1018, 68, 1342, 68, 1021, 68, 68, 68,
- 1029, 1022, 1020, 68, 1030, 1031, 68, 1033, 1034, 1025,
- 1024, 1035, 68, 1026, 1027, 68, 1032, 68, 1028, 68,
-
- 68, 1036, 1038, 68, 1037, 1039, 68, 1029, 1040, 68,
- 1342, 1030, 1031, 68, 1033, 1034, 1041, 68, 1035, 68,
- 1042, 1046, 1043, 1032, 1044, 1342, 1047, 1045, 1036, 68,
- 68, 1037, 1039, 68, 68, 1040, 1050, 1048, 1342, 1066,
- 1051, 68, 68, 1041, 68, 68, 1049, 1042, 68, 1043,
- 1055, 1044, 68, 1047, 1045, 68, 1054, 1052, 1057, 68,
- 1053, 1056, 1068, 68, 1048, 1059, 68, 1051, 68, 1058,
- 1064, 1060, 68, 1049, 1062, 68, 68, 1055, 68, 68,
- 68, 68, 1061, 1054, 1052, 1057, 1063, 1053, 1056, 68,
- 1065, 68, 1059, 68, 1067, 68, 1058, 1064, 1060, 1070,
-
- 1072, 1062, 1069, 1071, 1073, 1074, 1129, 68, 68, 1061,
- 68, 1076, 68, 1063, 68, 1075, 1080, 1065, 1077, 1078,
- 1342, 1067, 68, 1342, 68, 68, 1070, 1072, 1079, 1069,
- 1071, 68, 1074, 68, 68, 1081, 1082, 68, 68, 68,
- 1083, 68, 1075, 1080, 68, 1077, 1078, 68, 1084, 1085,
- 68, 1086, 68, 1088, 1087, 1079, 68, 1090, 68, 68,
- 68, 1091, 1081, 1082, 1089, 1092, 1095, 1083, 68, 1093,
- 68, 1094, 1096, 1097, 1098, 1084, 1085, 1099, 1086, 68,
- 1088, 1087, 1100, 68, 68, 68, 1101, 68, 1091, 1102,
- 68, 1089, 1092, 68, 1103, 1104, 1093, 68, 1094, 68,
-
- 1097, 68, 68, 1105, 68, 1107, 1106, 1109, 1342, 1100,
- 1108, 1110, 1342, 68, 68, 1113, 68, 68, 1114, 68,
- 1115, 1103, 1104, 1342, 1111, 1116, 68, 1118, 68, 1120,
- 68, 1119, 68, 1106, 1109, 68, 1342, 1108, 1110, 1112,
- 1117, 68, 68, 1121, 68, 1114, 1122, 68, 68, 68,
- 68, 1111, 68, 68, 1118, 1123, 1120, 1124, 1119, 1125,
- 1126, 1127, 1128, 68, 1342, 68, 1112, 1117, 1130, 68,
- 1121, 1131, 68, 1122, 1132, 1134, 1133, 1140, 68, 68,
- 68, 68, 1123, 1139, 1124, 1135, 1125, 1126, 1127, 1128,
- 1138, 68, 68, 1136, 1141, 1130, 1137, 1150, 1131, 68,
-
- 1143, 1132, 68, 1133, 1140, 68, 68, 68, 68, 1142,
- 1139, 68, 1135, 1144, 1151, 1145, 1147, 1138, 1146, 1148,
- 1136, 68, 1149, 1137, 68, 68, 68, 1143, 68, 1153,
- 1155, 1161, 68, 1154, 1157, 68, 1142, 68, 1156, 68,
- 68, 1151, 1145, 1147, 68, 1146, 1148, 1152, 1158, 1149,
- 1159, 68, 68, 1160, 1165, 68, 1153, 1155, 68, 1162,
- 1154, 68, 68, 1164, 68, 1156, 1166, 1163, 68, 1167,
- 68, 1169, 1168, 1170, 1152, 1158, 68, 68, 68, 1171,
- 68, 1165, 1172, 1173, 68, 68, 1162, 1174, 1176, 1177,
- 1164, 68, 1175, 68, 1163, 68, 1167, 68, 1169, 1168,
-
- 1170, 68, 68, 68, 68, 1178, 68, 1180, 1181, 68,
- 68, 1179, 1182, 68, 1174, 1176, 1177, 1183, 68, 1175,
- 68, 1187, 1184, 1188, 68, 1185, 68, 1186, 68, 1189,
- 68, 1190, 1178, 1191, 68, 1181, 68, 1192, 1179, 1182,
- 68, 1193, 68, 1194, 1183, 68, 1196, 1195, 1187, 1184,
- 1188, 68, 1185, 1197, 1186, 68, 1189, 1200, 68, 68,
- 1191, 68, 68, 68, 1192, 1198, 1201, 1199, 68, 1202,
- 1194, 1203, 1208, 1196, 1195, 68, 68, 1207, 1204, 68,
- 1197, 68, 1205, 1209, 68, 68, 1206, 1211, 1213, 1214,
- 68, 1210, 1198, 68, 1199, 68, 1202, 68, 1203, 68,
-
- 68, 68, 1215, 1212, 1207, 1204, 1217, 1216, 1220, 1205,
- 1209, 68, 68, 1206, 68, 68, 68, 1218, 1210, 1219,
- 1221, 1222, 1225, 1223, 68, 1224, 1226, 68, 68, 1215,
- 1212, 1227, 68, 1217, 1216, 1220, 1228, 68, 1229, 68,
- 1231, 68, 1230, 68, 1218, 68, 1219, 1221, 1222, 68,
- 1223, 1232, 1224, 68, 1233, 68, 1234, 1240, 1235, 1342,
- 1236, 1237, 68, 68, 68, 68, 1242, 1231, 68, 1230,
- 1247, 1241, 1238, 1243, 68, 68, 68, 1245, 1232, 68,
- 68, 1233, 1239, 1234, 68, 1235, 68, 1236, 1237, 68,
- 68, 1244, 68, 68, 1246, 68, 1248, 68, 1241, 1238,
-
- 1243, 1249, 1250, 68, 1245, 1251, 1252, 1253, 68, 1239,
- 1255, 1254, 1256, 68, 1342, 1258, 68, 1257, 1244, 1262,
- 1342, 1246, 1259, 1248, 68, 1264, 68, 68, 1249, 1250,
- 68, 1260, 68, 68, 1253, 1261, 68, 1263, 1254, 68,
- 68, 68, 1258, 68, 1257, 68, 1262, 68, 68, 1259,
- 68, 1267, 1264, 1265, 1266, 68, 1268, 1270, 1260, 1271,
- 68, 1269, 1261, 68, 1263, 1342, 68, 1272, 1276, 68,
- 68, 1273, 1275, 1274, 1277, 1342, 1278, 1342, 1267, 1279,
- 1265, 1266, 1280, 1268, 1270, 68, 68, 68, 1269, 68,
- 68, 68, 1281, 1342, 1272, 1276, 68, 68, 1273, 1275,
-
- 1274, 1277, 68, 1278, 68, 1282, 1279, 1284, 1283, 1280,
- 68, 1285, 1286, 68, 1287, 1289, 1292, 1288, 1291, 1281,
- 68, 1294, 68, 68, 1290, 68, 68, 1293, 1297, 68,
- 1298, 1342, 1282, 1295, 68, 1283, 68, 68, 1285, 1286,
- 68, 1287, 1289, 68, 1288, 1291, 1300, 1296, 68, 68,
- 1299, 1290, 68, 1302, 1293, 68, 1301, 68, 68, 1304,
- 1295, 68, 1305, 68, 1303, 1306, 1307, 1308, 1309, 1310,
- 68, 1312, 1314, 1300, 1296, 1311, 1342, 1299, 68, 68,
- 68, 1313, 1315, 1301, 1316, 1317, 68, 1321, 68, 1305,
- 1323, 1303, 1306, 1307, 68, 68, 68, 68, 68, 68,
-
- 1318, 1319, 1311, 68, 68, 1325, 1320, 68, 1313, 1315,
- 1327, 1316, 68, 68, 68, 1322, 1324, 68, 1326, 68,
- 1328, 1329, 68, 68, 1330, 1331, 1332, 1318, 1319, 1333,
- 68, 1334, 68, 1320, 1336, 1342, 1339, 1327, 68, 68,
- 1342, 68, 1322, 1324, 1337, 1326, 1341, 68, 68, 68,
- 1335, 68, 68, 1332, 68, 68, 1333, 68, 1334, 1340,
- 1338, 68, 68, 1339, 1342, 1342, 1342, 68, 1342, 1342,
- 1342, 1337, 68, 68, 1342, 1342, 1342, 1335, 1342, 1342,
- 1342, 1342, 1342, 1342, 1342, 1342, 1340, 1338, 40, 40,
- 40, 40, 40, 40, 40, 45, 45, 45, 45, 45,
-
- 45, 45, 50, 50, 50, 50, 50, 50, 50, 56,
- 56, 56, 56, 56, 56, 56, 61, 61, 61, 61,
- 61, 61, 61, 71, 71, 1342, 71, 71, 71, 71,
- 120, 120, 1342, 1342, 1342, 120, 120, 122, 122, 1342,
- 1342, 122, 1342, 122, 124, 1342, 1342, 1342, 1342, 1342,
- 124, 127, 127, 1342, 1342, 1342, 127, 127, 129, 1342,
- 1342, 1342, 1342, 1342, 129, 131, 131, 1342, 131, 131,
- 131, 131, 72, 72, 1342, 72, 72, 72, 72, 13,
- 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
- 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
-
- 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
- 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
- 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
- 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
- 1342, 1342, 1342, 1342, 1342
+ 68, 102, 96, 127, 136, 99, 88, 68, 97, 100,
+ 134, 94, 98, 125, 117, 125, 125, 126, 125, 118,
+ 68, 95, 185, 131, 103, 101, 68, 68, 102, 96,
+ 104, 68, 99, 105, 107, 97, 100, 134, 141, 98,
+ 106, 117, 68, 124, 108, 135, 118, 109, 110, 185,
+ 119, 103, 101, 68, 120, 138, 68, 104, 111, 193,
+ 105, 107, 112, 113, 139, 141, 114, 106, 115, 68,
+ 68, 108, 135, 68, 109, 110, 68, 119, 68, 68,
+ 122, 120, 138, 116, 123, 111, 193, 123, 68, 112,
+ 113, 139, 68, 114, 72, 115, 72, 72, 130, 72,
+
+ 130, 130, 67, 130, 67, 67, 72, 67, 72, 72,
+ 116, 72, 67, 137, 140, 142, 72, 143, 144, 146,
+ 68, 147, 68, 151, 68, 148, 131, 68, 68, 149,
+ 150, 133, 68, 129, 68, 145, 128, 128, 68, 157,
+ 137, 140, 142, 73, 143, 68, 146, 152, 147, 68,
+ 151, 153, 148, 68, 154, 156, 149, 150, 162, 158,
+ 68, 68, 145, 68, 161, 159, 157, 68, 155, 160,
+ 163, 68, 127, 165, 152, 68, 126, 168, 153, 164,
+ 167, 154, 156, 166, 68, 162, 158, 68, 169, 68,
+ 124, 161, 159, 68, 68, 155, 160, 163, 171, 68,
+
+ 165, 173, 172, 68, 168, 170, 164, 167, 68, 174,
+ 166, 68, 175, 176, 68, 169, 179, 177, 182, 183,
+ 68, 68, 180, 68, 68, 171, 68, 68, 173, 172,
+ 68, 68, 170, 186, 189, 184, 174, 187, 188, 175,
+ 176, 68, 181, 179, 177, 182, 183, 68, 68, 180,
+ 191, 125, 68, 125, 125, 68, 125, 190, 131, 196,
+ 186, 189, 184, 122, 187, 188, 192, 197, 130, 181,
+ 130, 130, 72, 130, 72, 72, 194, 72, 68, 68,
+ 195, 68, 198, 205, 190, 204, 671, 68, 68, 68,
+ 68, 68, 68, 192, 197, 206, 207, 1354, 208, 214,
+
+ 68, 1354, 210, 194, 1354, 209, 211, 195, 68, 133,
+ 205, 68, 204, 68, 199, 68, 68, 68, 68, 200,
+ 215, 68, 206, 207, 201, 208, 214, 68, 217, 210,
+ 202, 203, 209, 211, 219, 212, 216, 68, 213, 68,
+ 218, 199, 68, 68, 220, 222, 200, 215, 1354, 1354,
+ 68, 201, 223, 224, 221, 217, 225, 202, 203, 68,
+ 68, 219, 212, 216, 226, 213, 227, 228, 229, 230,
+ 68, 68, 232, 233, 1354, 68, 68, 231, 68, 223,
+ 224, 221, 234, 237, 68, 236, 68, 68, 68, 241,
+ 68, 226, 68, 68, 235, 229, 230, 68, 68, 232,
+
+ 233, 68, 238, 243, 231, 68, 68, 68, 242, 234,
+ 237, 244, 236, 239, 240, 68, 245, 246, 250, 247,
+ 68, 235, 68, 256, 253, 68, 248, 1354, 68, 238,
+ 243, 68, 1354, 251, 254, 242, 255, 257, 244, 131,
+ 239, 240, 68, 259, 246, 68, 247, 68, 249, 68,
+ 252, 253, 68, 258, 68, 68, 262, 68, 68, 68,
+ 251, 254, 260, 255, 257, 68, 261, 269, 263, 1354,
+ 259, 1354, 266, 264, 265, 249, 273, 252, 270, 267,
+ 258, 68, 68, 262, 68, 268, 68, 271, 272, 260,
+ 68, 68, 278, 261, 68, 263, 68, 274, 68, 266,
+
+ 264, 265, 68, 68, 68, 270, 267, 68, 275, 277,
+ 68, 279, 268, 68, 271, 272, 276, 68, 68, 278,
+ 68, 282, 68, 68, 274, 280, 281, 283, 286, 284,
+ 1354, 287, 285, 288, 289, 275, 277, 68, 279, 68,
+ 68, 292, 68, 276, 298, 68, 68, 68, 282, 68,
+ 290, 291, 280, 296, 283, 286, 284, 68, 287, 285,
+ 288, 289, 293, 294, 297, 68, 295, 301, 68, 300,
+ 299, 68, 303, 68, 302, 68, 1354, 290, 291, 68,
+ 296, 68, 68, 306, 305, 312, 68, 307, 1354, 293,
+ 294, 297, 68, 295, 301, 68, 300, 299, 304, 313,
+
+ 68, 302, 311, 68, 1354, 68, 68, 68, 1354, 316,
+ 306, 305, 308, 314, 307, 309, 68, 310, 1354, 68,
+ 68, 68, 68, 68, 315, 304, 313, 333, 319, 311,
+ 317, 68, 328, 327, 1354, 331, 316, 329, 356, 308,
+ 314, 68, 309, 131, 310, 68, 318, 68, 361, 332,
+ 68, 315, 1354, 330, 68, 319, 68, 317, 68, 328,
+ 327, 68, 331, 334, 329, 335, 336, 1354, 338, 68,
+ 68, 340, 341, 318, 320, 321, 332, 68, 68, 68,
+ 330, 68, 337, 339, 322, 345, 323, 324, 325, 68,
+ 334, 326, 335, 336, 346, 338, 342, 343, 68, 68,
+
+ 68, 320, 321, 68, 347, 68, 344, 348, 68, 337,
+ 339, 322, 345, 323, 324, 325, 68, 68, 326, 68,
+ 353, 346, 349, 342, 343, 350, 352, 68, 354, 357,
+ 355, 347, 358, 344, 348, 68, 360, 1354, 351, 362,
+ 363, 365, 68, 68, 68, 68, 359, 353, 68, 349,
+ 68, 68, 350, 352, 68, 354, 357, 355, 68, 358,
+ 68, 364, 68, 360, 68, 351, 362, 363, 365, 366,
+ 367, 368, 372, 359, 369, 371, 68, 68, 370, 374,
+ 375, 68, 376, 380, 1354, 373, 1354, 68, 364, 68,
+ 1354, 68, 68, 378, 68, 68, 366, 367, 368, 372,
+
+ 68, 369, 371, 68, 68, 370, 374, 375, 377, 376,
+ 379, 382, 373, 381, 68, 68, 68, 385, 383, 384,
+ 378, 68, 68, 386, 387, 1354, 393, 1354, 1354, 68,
+ 1354, 68, 68, 68, 68, 377, 394, 379, 382, 68,
+ 381, 68, 398, 1354, 385, 383, 384, 68, 397, 395,
+ 386, 387, 388, 393, 399, 68, 68, 389, 396, 390,
+ 1354, 400, 401, 394, 1354, 404, 405, 391, 68, 398,
+ 403, 68, 407, 68, 68, 397, 402, 392, 68, 388,
+ 68, 399, 68, 406, 389, 396, 390, 68, 400, 401,
+ 68, 68, 404, 405, 391, 409, 410, 403, 408, 407,
+
+ 411, 412, 413, 402, 392, 68, 68, 68, 415, 416,
+ 406, 68, 414, 419, 1354, 417, 68, 421, 422, 131,
+ 418, 423, 409, 410, 68, 408, 68, 420, 412, 413,
+ 68, 68, 68, 424, 425, 68, 416, 68, 426, 414,
+ 419, 68, 417, 427, 68, 68, 428, 418, 429, 68,
+ 430, 431, 68, 434, 420, 432, 433, 1354, 435, 436,
+ 68, 68, 440, 68, 441, 1354, 443, 1354, 68, 68,
+ 427, 68, 68, 428, 68, 429, 442, 68, 431, 444,
+ 68, 68, 432, 433, 68, 435, 436, 437, 68, 440,
+ 68, 446, 438, 443, 68, 68, 439, 449, 447, 448,
+
+ 450, 445, 68, 442, 451, 453, 444, 454, 68, 452,
+ 1354, 68, 68, 68, 437, 68, 455, 458, 446, 438,
+ 463, 68, 459, 439, 449, 447, 448, 450, 445, 68,
+ 68, 68, 453, 456, 454, 68, 452, 457, 68, 68,
+ 460, 461, 68, 455, 458, 462, 68, 464, 467, 459,
+ 68, 68, 468, 465, 1354, 480, 469, 470, 1354, 1354,
+ 456, 471, 68, 473, 457, 68, 472, 460, 466, 474,
+ 68, 68, 68, 476, 464, 68, 68, 68, 475, 68,
+ 465, 68, 68, 469, 470, 477, 68, 479, 471, 478,
+ 473, 68, 482, 472, 481, 466, 474, 68, 68, 68,
+
+ 476, 68, 68, 483, 485, 475, 484, 488, 487, 486,
+ 489, 1354, 477, 1354, 479, 68, 478, 68, 68, 482,
+ 490, 481, 68, 491, 492, 495, 68, 68, 68, 493,
+ 483, 485, 68, 484, 488, 487, 486, 489, 68, 494,
+ 68, 496, 497, 68, 499, 68, 68, 490, 498, 500,
+ 491, 492, 495, 501, 68, 68, 493, 510, 503, 68,
+ 504, 502, 1354, 506, 131, 505, 494, 68, 496, 497,
+ 511, 499, 68, 507, 68, 498, 500, 509, 68, 68,
+ 501, 508, 68, 68, 510, 68, 512, 504, 502, 68,
+ 506, 68, 505, 68, 519, 68, 1354, 511, 520, 521,
+
+ 507, 68, 523, 522, 509, 1354, 525, 68, 508, 1354,
+ 526, 524, 1354, 527, 1354, 1354, 68, 68, 513, 1354,
+ 514, 519, 68, 515, 528, 520, 521, 68, 516, 68,
+ 522, 68, 68, 525, 517, 518, 530, 526, 524, 68,
+ 527, 531, 529, 68, 68, 513, 532, 514, 68, 68,
+ 515, 528, 533, 535, 536, 516, 534, 537, 538, 541,
+ 68, 517, 518, 530, 68, 68, 539, 1354, 531, 529,
+ 540, 546, 68, 532, 544, 68, 542, 548, 68, 533,
+ 535, 68, 545, 534, 549, 543, 541, 547, 68, 68,
+ 68, 68, 68, 539, 68, 68, 68, 540, 68, 550,
+
+ 551, 544, 68, 542, 552, 553, 68, 1354, 68, 545,
+ 554, 549, 543, 68, 547, 556, 557, 68, 555, 559,
+ 561, 68, 68, 68, 68, 562, 550, 551, 558, 560,
+ 68, 552, 553, 564, 68, 68, 68, 554, 68, 565,
+ 563, 68, 556, 557, 567, 555, 559, 561, 68, 68,
+ 566, 568, 562, 570, 574, 558, 560, 68, 68, 569,
+ 564, 572, 571, 68, 573, 68, 565, 563, 575, 68,
+ 576, 567, 68, 577, 68, 578, 68, 566, 568, 68,
+ 580, 574, 581, 579, 68, 68, 569, 583, 572, 571,
+ 584, 573, 68, 582, 68, 575, 68, 576, 586, 68,
+
+ 68, 587, 578, 585, 68, 588, 589, 580, 68, 68,
+ 579, 597, 595, 68, 68, 68, 596, 131, 68, 68,
+ 582, 68, 602, 68, 598, 586, 1354, 1354, 587, 610,
+ 585, 1354, 588, 589, 590, 68, 591, 68, 597, 595,
+ 592, 600, 593, 596, 599, 601, 615, 594, 607, 608,
+ 68, 598, 603, 68, 68, 68, 610, 604, 68, 605,
+ 611, 590, 68, 591, 612, 609, 68, 592, 600, 593,
+ 68, 599, 601, 68, 594, 607, 608, 606, 68, 603,
+ 68, 613, 68, 68, 604, 614, 605, 611, 616, 617,
+ 618, 612, 609, 68, 68, 619, 620, 621, 622, 623,
+
+ 1354, 1354, 625, 68, 606, 624, 628, 68, 613, 68,
+ 68, 68, 614, 632, 68, 616, 68, 618, 626, 68,
+ 68, 627, 619, 620, 621, 622, 623, 68, 629, 625,
+ 633, 68, 624, 630, 631, 68, 68, 68, 635, 68,
+ 632, 634, 68, 636, 637, 626, 68, 638, 627, 1354,
+ 640, 639, 68, 641, 643, 629, 68, 633, 642, 645,
+ 630, 631, 647, 68, 644, 635, 68, 646, 634, 68,
+ 636, 68, 649, 68, 648, 68, 68, 640, 68, 650,
+ 641, 643, 68, 68, 68, 642, 645, 651, 653, 647,
+ 652, 644, 654, 68, 646, 655, 68, 68, 657, 649,
+
+ 68, 648, 656, 661, 68, 68, 650, 658, 68, 659,
+ 68, 660, 68, 662, 68, 653, 68, 652, 664, 654,
+ 665, 68, 655, 663, 1354, 657, 667, 668, 669, 656,
+ 661, 68, 666, 68, 658, 68, 659, 68, 660, 68,
+ 662, 68, 670, 672, 68, 673, 679, 680, 674, 68,
+ 663, 68, 68, 68, 668, 669, 68, 68, 675, 666,
+ 68, 676, 681, 68, 677, 684, 678, 682, 683, 670,
+ 672, 685, 673, 68, 68, 674, 68, 68, 68, 687,
+ 68, 68, 689, 68, 68, 675, 690, 68, 676, 681,
+ 686, 677, 684, 678, 682, 683, 688, 692, 685, 691,
+
+ 68, 1354, 68, 693, 694, 68, 68, 68, 68, 689,
+ 695, 68, 700, 690, 698, 706, 701, 686, 68, 68,
+ 696, 697, 705, 688, 692, 68, 691, 68, 68, 68,
+ 693, 694, 68, 68, 699, 702, 708, 695, 703, 700,
+ 68, 698, 68, 701, 704, 707, 68, 696, 697, 705,
+ 68, 68, 709, 710, 713, 68, 68, 715, 68, 68,
+ 711, 699, 702, 708, 712, 703, 714, 717, 68, 716,
+ 718, 704, 707, 719, 1354, 68, 721, 722, 723, 709,
+ 710, 713, 724, 720, 68, 725, 1354, 68, 68, 68,
+ 68, 68, 68, 714, 717, 68, 716, 718, 68, 68,
+
+ 719, 68, 726, 721, 722, 723, 732, 727, 733, 735,
+ 720, 1354, 736, 68, 728, 734, 68, 742, 68, 729,
+ 737, 730, 68, 731, 68, 68, 738, 68, 68, 726,
+ 68, 68, 68, 732, 727, 733, 735, 743, 739, 736,
+ 740, 728, 734, 747, 68, 68, 729, 737, 730, 68,
+ 731, 68, 741, 738, 68, 745, 744, 749, 746, 750,
+ 751, 748, 752, 759, 68, 739, 68, 740, 68, 68,
+ 68, 753, 754, 755, 760, 757, 762, 68, 1354, 741,
+ 68, 68, 745, 744, 68, 746, 750, 68, 748, 752,
+ 758, 68, 756, 68, 68, 68, 68, 763, 753, 754,
+
+ 755, 68, 757, 761, 764, 68, 765, 68, 766, 767,
+ 68, 769, 68, 770, 768, 68, 68, 758, 68, 756,
+ 68, 771, 68, 772, 763, 68, 773, 774, 68, 776,
+ 761, 764, 68, 765, 68, 68, 767, 775, 68, 68,
+ 770, 768, 68, 777, 782, 778, 781, 68, 771, 779,
+ 772, 783, 68, 773, 774, 68, 776, 780, 68, 785,
+ 68, 784, 1354, 786, 775, 789, 68, 787, 68, 791,
+ 777, 782, 68, 781, 788, 68, 68, 68, 783, 792,
+ 793, 790, 68, 800, 780, 795, 785, 68, 784, 68,
+ 786, 68, 789, 796, 787, 794, 791, 797, 801, 68,
+
+ 802, 788, 68, 68, 68, 68, 792, 793, 790, 798,
+ 799, 803, 795, 805, 68, 68, 808, 804, 68, 806,
+ 796, 68, 794, 807, 797, 1354, 68, 802, 814, 68,
+ 68, 809, 68, 68, 810, 813, 798, 799, 803, 68,
+ 805, 812, 68, 68, 804, 811, 68, 815, 820, 68,
+ 68, 819, 816, 824, 68, 68, 68, 817, 809, 68,
+ 68, 810, 813, 818, 68, 68, 822, 823, 812, 821,
+ 826, 68, 811, 825, 815, 820, 68, 828, 819, 816,
+ 824, 68, 832, 829, 817, 830, 835, 68, 68, 68,
+ 818, 827, 68, 822, 823, 831, 821, 826, 68, 833,
+
+ 825, 834, 68, 836, 68, 68, 837, 838, 68, 839,
+ 829, 840, 830, 68, 841, 842, 68, 68, 827, 844,
+ 843, 68, 831, 68, 1354, 846, 833, 68, 834, 848,
+ 68, 68, 68, 68, 838, 68, 839, 68, 840, 847,
+ 849, 841, 842, 845, 68, 68, 68, 843, 860, 850,
+ 68, 68, 846, 851, 855, 852, 848, 68, 853, 1354,
+ 854, 68, 856, 68, 68, 857, 847, 849, 858, 68,
+ 845, 68, 68, 863, 859, 68, 850, 861, 862, 68,
+ 851, 855, 852, 1354, 68, 853, 68, 854, 864, 856,
+ 866, 68, 857, 68, 68, 858, 68, 865, 867, 68,
+
+ 863, 859, 1354, 869, 861, 862, 868, 875, 870, 872,
+ 68, 871, 68, 877, 68, 864, 68, 866, 68, 873,
+ 874, 876, 68, 68, 865, 1354, 880, 883, 1354, 68,
+ 869, 68, 68, 868, 68, 870, 872, 878, 871, 68,
+ 877, 881, 68, 68, 68, 879, 873, 874, 876, 882,
+ 884, 888, 68, 880, 885, 887, 68, 68, 68, 886,
+ 892, 68, 891, 68, 878, 68, 889, 68, 881, 890,
+ 893, 68, 879, 68, 901, 897, 882, 884, 888, 894,
+ 895, 885, 887, 68, 68, 896, 886, 68, 902, 891,
+ 900, 68, 898, 889, 68, 899, 890, 893, 909, 904,
+
+ 905, 68, 897, 68, 903, 68, 894, 895, 68, 68,
+ 68, 68, 896, 68, 908, 68, 906, 900, 907, 898,
+ 68, 910, 899, 68, 68, 909, 904, 905, 911, 68,
+ 912, 903, 68, 913, 914, 915, 916, 68, 1354, 917,
+ 1354, 908, 68, 906, 918, 907, 1354, 924, 910, 921,
+ 919, 920, 926, 68, 1354, 911, 68, 1354, 68, 68,
+ 913, 68, 915, 68, 922, 68, 917, 68, 68, 927,
+ 68, 918, 923, 68, 924, 925, 921, 919, 920, 926,
+ 68, 928, 929, 930, 68, 932, 933, 934, 931, 68,
+ 1354, 922, 68, 938, 935, 942, 927, 1354, 68, 923,
+
+ 946, 936, 925, 68, 68, 68, 68, 68, 928, 929,
+ 930, 937, 932, 933, 68, 931, 68, 939, 940, 941,
+ 943, 935, 68, 944, 68, 945, 68, 68, 936, 947,
+ 949, 68, 68, 950, 948, 68, 951, 68, 937, 952,
+ 68, 68, 68, 68, 939, 940, 941, 68, 953, 954,
+ 944, 956, 68, 958, 955, 1354, 947, 949, 957, 960,
+ 68, 948, 959, 951, 68, 961, 68, 68, 962, 966,
+ 967, 970, 1354, 969, 1354, 68, 68, 68, 68, 68,
+ 68, 955, 68, 972, 68, 957, 68, 968, 963, 959,
+ 964, 68, 961, 975, 68, 965, 966, 967, 68, 68,
+
+ 969, 971, 68, 68, 973, 974, 976, 977, 978, 68,
+ 972, 68, 979, 68, 968, 963, 980, 964, 68, 982,
+ 68, 984, 965, 68, 981, 68, 68, 68, 971, 986,
+ 68, 973, 974, 976, 977, 978, 983, 985, 987, 979,
+ 988, 989, 68, 980, 68, 991, 982, 990, 993, 68,
+ 994, 981, 68, 992, 68, 995, 986, 68, 68, 68,
+ 68, 68, 68, 983, 985, 68, 998, 988, 989, 1001,
+ 1000, 68, 991, 68, 990, 993, 996, 994, 999, 1002,
+ 992, 997, 995, 68, 68, 1003, 1005, 1006, 1007, 1004,
+ 1354, 1354, 68, 68, 1008, 1009, 1010, 1000, 1012, 1011,
+
+ 68, 68, 68, 996, 1014, 999, 68, 1013, 997, 68,
+ 1015, 68, 68, 1017, 1006, 1016, 68, 68, 68, 68,
+ 1018, 1008, 1009, 1010, 1019, 68, 1011, 1020, 1022, 68,
+ 1024, 1021, 1027, 1023, 1013, 68, 1029, 1015, 1031, 68,
+ 68, 1025, 1016, 1028, 1026, 68, 68, 68, 68, 68,
+ 68, 1019, 68, 68, 1020, 1022, 68, 1024, 1021, 1027,
+ 1023, 68, 1030, 68, 1032, 1354, 1033, 1035, 1025, 68,
+ 1028, 1026, 1034, 1037, 68, 68, 1036, 1354, 1038, 1039,
+ 68, 1044, 1354, 1040, 1046, 68, 1041, 1042, 68, 1030,
+ 1045, 1032, 68, 1033, 68, 1043, 68, 68, 68, 1034,
+
+ 1037, 68, 68, 1036, 68, 1038, 1039, 68, 1044, 68,
+ 1040, 1046, 68, 1041, 1042, 1047, 1048, 1045, 1049, 1050,
+ 1051, 68, 1043, 1354, 68, 1053, 1052, 1054, 1056, 1055,
+ 1058, 68, 1057, 1060, 68, 1059, 1062, 68, 1354, 68,
+ 1078, 68, 1047, 1048, 1354, 1049, 68, 1051, 68, 68,
+ 68, 68, 1053, 1052, 1054, 1056, 1055, 68, 1061, 1057,
+ 1060, 68, 1059, 68, 1063, 1064, 1067, 68, 1065, 1066,
+ 1354, 68, 1068, 1072, 1071, 1069, 1070, 1354, 1073, 68,
+ 68, 1354, 1354, 68, 68, 1061, 1074, 68, 68, 68,
+ 1075, 1063, 1064, 1067, 68, 1065, 1066, 68, 68, 1068,
+
+ 1072, 1071, 1069, 1070, 1076, 1073, 68, 68, 1077, 1079,
+ 1080, 68, 1081, 1074, 1084, 1082, 1085, 1075, 1083, 1088,
+ 68, 1354, 1089, 1354, 1354, 1086, 68, 68, 68, 1087,
+ 1092, 1076, 1091, 1094, 1354, 1077, 1079, 68, 68, 1081,
+ 68, 1084, 1082, 68, 68, 1083, 68, 68, 68, 1089,
+ 1090, 1093, 1086, 68, 68, 68, 1087, 1092, 1096, 1091,
+ 1094, 1095, 68, 68, 1097, 68, 68, 68, 1098, 1099,
+ 1102, 1100, 1107, 1101, 1354, 68, 68, 1090, 1093, 68,
+ 1103, 1354, 1106, 1108, 1110, 1096, 68, 1104, 1095, 1105,
+ 1111, 1097, 1109, 1113, 1112, 1098, 1099, 68, 1100, 68,
+
+ 1101, 68, 68, 68, 68, 1114, 68, 1103, 68, 1106,
+ 68, 68, 1116, 1117, 1104, 1115, 1105, 68, 1118, 1109,
+ 68, 1112, 1119, 68, 1120, 1121, 68, 1354, 1123, 1122,
+ 1125, 1127, 68, 68, 68, 1128, 1126, 1129, 68, 1116,
+ 68, 1130, 1115, 1124, 68, 1118, 68, 1131, 1354, 68,
+ 1133, 1120, 1121, 68, 68, 1123, 1122, 68, 68, 1134,
+ 1132, 68, 68, 1126, 1129, 68, 1135, 68, 1130, 1137,
+ 1124, 1138, 68, 1136, 1131, 68, 1139, 1133, 1141, 68,
+ 68, 1140, 1146, 68, 1142, 1143, 1134, 1132, 1144, 1354,
+ 1145, 68, 68, 1135, 68, 1150, 1137, 1147, 1138, 68,
+
+ 1136, 1151, 1149, 1139, 1152, 1148, 68, 68, 1140, 68,
+ 68, 1142, 1143, 68, 68, 1144, 68, 1145, 1153, 1154,
+ 1155, 1156, 1150, 68, 1147, 68, 68, 1157, 1151, 1149,
+ 1158, 1152, 1148, 1159, 1160, 1162, 1161, 68, 1163, 1354,
+ 1164, 68, 68, 1166, 68, 68, 1154, 1155, 68, 68,
+ 1165, 68, 1169, 1167, 1157, 1168, 68, 1158, 68, 68,
+ 1159, 1160, 68, 1161, 1170, 1163, 68, 1164, 1171, 1172,
+ 1166, 1173, 68, 1174, 1175, 1354, 1177, 1165, 68, 68,
+ 1167, 68, 1168, 1176, 1178, 68, 68, 1179, 68, 1354,
+ 1180, 1170, 1181, 1183, 1182, 68, 68, 1184, 68, 68,
+
+ 1174, 1175, 68, 1177, 1185, 68, 1192, 1186, 1188, 68,
+ 1176, 68, 1193, 1189, 1179, 68, 68, 1180, 1187, 1181,
+ 68, 1182, 68, 68, 68, 1191, 1190, 68, 68, 1196,
+ 68, 68, 68, 68, 1186, 1188, 1194, 68, 1198, 1193,
+ 1189, 68, 1195, 68, 1197, 1187, 1199, 68, 1200, 68,
+ 1201, 68, 1191, 1190, 1202, 68, 1196, 1203, 1354, 1204,
+ 1205, 1206, 1207, 1194, 1354, 1198, 68, 1208, 1212, 1195,
+ 68, 1197, 68, 1199, 68, 1200, 68, 1201, 1354, 68,
+ 1213, 68, 1209, 1354, 1203, 68, 1204, 68, 1206, 1207,
+ 1210, 68, 1211, 1214, 1208, 68, 1215, 1219, 1220, 1216,
+
+ 68, 68, 1217, 1221, 68, 68, 68, 1218, 1223, 1209,
+ 68, 68, 1225, 1222, 68, 68, 1226, 1210, 1227, 1211,
+ 1214, 68, 68, 1215, 1219, 68, 1216, 1228, 1224, 1217,
+ 1221, 1229, 68, 1354, 1218, 68, 68, 1230, 1231, 68,
+ 1222, 1233, 1232, 68, 68, 1227, 1237, 1238, 1234, 68,
+ 1235, 1236, 1239, 68, 1228, 1224, 1354, 1240, 1229, 68,
+ 68, 68, 1241, 68, 1230, 1231, 1242, 1243, 1233, 1232,
+ 68, 1244, 68, 68, 68, 1234, 1245, 1235, 1236, 1246,
+ 1252, 1247, 68, 68, 68, 1248, 1249, 1253, 68, 68,
+ 68, 1254, 1250, 1242, 1243, 68, 1255, 68, 1244, 68,
+
+ 68, 1251, 1256, 1245, 68, 68, 1246, 68, 1247, 68,
+ 1259, 68, 1248, 1249, 1253, 68, 1257, 1258, 68, 1250,
+ 1260, 1354, 1261, 1255, 68, 1263, 1262, 68, 1251, 1256,
+ 1264, 68, 1265, 1266, 68, 1267, 1268, 68, 1269, 1354,
+ 1354, 68, 1274, 1257, 1258, 1354, 68, 1260, 68, 1261,
+ 68, 1270, 68, 1262, 1271, 1272, 1273, 68, 1276, 1265,
+ 1266, 68, 68, 68, 68, 1269, 68, 1281, 68, 1274,
+ 1277, 1279, 68, 1275, 68, 1278, 68, 68, 1270, 1280,
+ 68, 1271, 1272, 1273, 68, 1276, 68, 1282, 1283, 68,
+ 1284, 68, 1285, 1286, 1281, 1354, 68, 1277, 1279, 1289,
+
+ 1275, 1287, 1278, 1288, 1291, 68, 1280, 1290, 1354, 1293,
+ 68, 68, 1296, 68, 1282, 68, 68, 1284, 1292, 1285,
+ 1286, 68, 68, 1295, 1294, 1297, 1289, 68, 1287, 1304,
+ 1288, 1291, 68, 68, 1290, 68, 1293, 1298, 1299, 68,
+ 68, 1300, 1306, 68, 1301, 1292, 68, 1303, 68, 1309,
+ 1295, 1294, 1297, 1302, 68, 68, 68, 1305, 1310, 1314,
+ 68, 1316, 1308, 1307, 1298, 1299, 68, 68, 1300, 68,
+ 68, 1301, 1312, 1311, 1303, 1313, 68, 1315, 1320, 68,
+ 1302, 68, 68, 1317, 1305, 68, 68, 68, 68, 1308,
+ 1307, 68, 68, 1318, 1319, 1321, 1322, 1323, 1324, 1312,
+
+ 1311, 1325, 1313, 1326, 1315, 68, 68, 1327, 1329, 1354,
+ 1317, 1330, 1328, 1333, 1331, 1335, 68, 1354, 1337, 68,
+ 1318, 1319, 68, 68, 1323, 68, 1334, 68, 1325, 68,
+ 68, 68, 1336, 68, 1327, 68, 68, 1332, 1330, 1328,
+ 68, 1331, 68, 1339, 68, 68, 1338, 1340, 1341, 68,
+ 1342, 1343, 68, 1334, 1344, 68, 1345, 1346, 68, 1336,
+ 1347, 1348, 1353, 1351, 1332, 1354, 1354, 68, 1349, 68,
+ 1339, 1354, 1354, 1338, 68, 68, 68, 68, 68, 1350,
+ 68, 1344, 68, 1345, 1346, 1352, 68, 1347, 68, 68,
+ 1351, 68, 1354, 68, 1354, 1349, 1354, 1354, 1354, 1354,
+
+ 1354, 1354, 1354, 1354, 1354, 1354, 1350, 1354, 1354, 1354,
+ 1354, 1354, 1352, 40, 40, 40, 40, 40, 40, 40,
+ 45, 45, 45, 45, 45, 45, 45, 50, 50, 50,
+ 50, 50, 50, 50, 56, 56, 56, 56, 56, 56,
+ 56, 61, 61, 61, 61, 61, 61, 61, 71, 71,
+ 1354, 71, 71, 71, 71, 121, 121, 1354, 1354, 1354,
+ 121, 121, 123, 123, 1354, 1354, 123, 1354, 123, 125,
+ 1354, 1354, 1354, 1354, 1354, 125, 128, 128, 1354, 1354,
+ 1354, 128, 128, 130, 1354, 1354, 1354, 1354, 1354, 130,
+ 132, 132, 1354, 132, 132, 132, 132, 72, 72, 1354,
+
+ 72, 72, 72, 72, 13, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354
} ;
-static yyconst flex_int16_t yy_chk[3946] =
+static yyconst flex_int16_t yy_chk[3971] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -1321,432 +1326,434 @@ static yyconst flex_int16_t yy_chk[3946] =
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, 24, 6, 7, 7,
- 7, 7, 1348, 7, 8, 8, 8, 8, 24, 8,
+ 7, 7, 1360, 7, 8, 8, 8, 8, 24, 8,
9, 9, 9, 10, 10, 10, 15, 44, 44, 49,
15, 3, 49, 24, 4, 60, 60, 5, 19, 6,
- 19, 19, 69, 19, 577, 7, 69, 39, 19, 39,
- 39, 8, 39, 23, 20, 20, 9, 39, 129, 10,
+ 19, 19, 69, 19, 584, 7, 69, 39, 19, 39,
+ 39, 8, 39, 23, 20, 20, 9, 39, 130, 10,
11, 11, 11, 11, 11, 11, 12, 12, 12, 12,
- 12, 12, 20, 23, 110, 19, 23, 27, 20, 11,
- 23, 20, 20, 127, 21, 12, 22, 121, 121, 27,
+ 12, 12, 20, 23, 111, 19, 23, 27, 20, 11,
+ 23, 20, 20, 128, 21, 12, 22, 122, 122, 27,
22, 21, 26, 22, 28, 26, 22, 11, 21, 20,
- 23, 25, 26, 12, 27, 110, 11, 126, 22, 25,
+ 23, 25, 26, 12, 27, 111, 11, 75, 22, 25,
21, 21, 12, 22, 29, 26, 28, 22, 21, 26,
22, 28, 26, 22, 30, 21, 29, 25, 25, 26,
- 30, 124, 123, 31, 30, 123, 25, 31, 32, 65,
- 33, 29, 30, 107, 32, 55, 33, 55, 55, 33,
- 55, 30, 65, 31, 122, 107, 33, 30, 33, 31,
- 31, 30, 34, 74, 31, 32, 65, 33, 75, 37,
- 107, 35, 34, 33, 37, 34, 33, 36, 89, 36,
- 31, 35, 37, 33, 34, 35, 35, 74, 38, 34,
- 74, 75, 38, 35, 36, 75, 37, 120, 35, 34,
- 89, 37, 34, 36, 36, 89, 36, 67, 35, 76,
- 128, 128, 35, 35, 38, 38, 76, 77, 61, 38,
- 63, 36, 63, 63, 66, 63, 66, 66, 68, 66,
-
- 68, 68, 71, 68, 71, 71, 76, 71, 68, 78,
- 79, 77, 71, 80, 77, 81, 82, 83, 78, 84,
- 56, 82, 85, 79, 81, 135, 86, 63, 80, 85,
- 51, 88, 84, 92, 83, 86, 78, 79, 87, 71,
- 80, 92, 81, 82, 90, 571, 84, 87, 83, 85,
- 93, 95, 91, 86, 88, 91, 135, 90, 88, 94,
- 92, 83, 96, 94, 95, 87, 98, 97, 99, 91,
- 93, 90, 93, 50, 101, 571, 91, 93, 95, 91,
- 98, 101, 91, 94, 100, 96, 94, 97, 99, 96,
- 94, 102, 106, 98, 97, 99, 91, 93, 100, 103,
-
- 104, 101, 105, 109, 104, 108, 106, 113, 103, 105,
- 111, 100, 109, 108, 102, 112, 113, 114, 102, 106,
- 116, 117, 104, 118, 116, 111, 103, 104, 114, 105,
- 109, 104, 108, 115, 113, 112, 119, 111, 118, 115,
- 45, 112, 112, 117, 114, 119, 133, 116, 117, 125,
- 118, 125, 125, 130, 125, 130, 130, 134, 130, 136,
- 115, 137, 112, 119, 131, 138, 131, 131, 139, 131,
- 133, 136, 140, 133, 40, 139, 142, 138, 141, 134,
- 137, 14, 13, 144, 134, 145, 136, 147, 137, 146,
- 0, 147, 138, 145, 148, 139, 0, 0, 0, 0,
-
- 141, 131, 150, 140, 0, 141, 149, 142, 143, 144,
- 144, 146, 145, 143, 147, 150, 146, 148, 143, 152,
- 151, 148, 152, 155, 143, 143, 154, 153, 149, 150,
- 155, 143, 151, 149, 152, 143, 153, 157, 158, 162,
- 143, 164, 160, 165, 156, 143, 152, 151, 154, 152,
- 155, 143, 143, 154, 153, 156, 159, 161, 163, 166,
- 160, 167, 170, 161, 158, 158, 159, 170, 157, 160,
- 162, 156, 164, 169, 165, 174, 168, 171, 172, 166,
- 163, 177, 167, 168, 161, 163, 166, 159, 167, 170,
- 172, 173, 178, 159, 169, 179, 171, 174, 173, 178,
-
- 169, 175, 174, 168, 171, 172, 175, 176, 176, 180,
- 181, 183, 177, 182, 185, 0, 176, 184, 173, 178,
- 179, 182, 179, 190, 188, 186, 0, 0, 175, 180,
- 189, 187, 188, 191, 176, 176, 180, 183, 183, 184,
- 182, 181, 186, 195, 192, 185, 187, 196, 184, 189,
- 186, 188, 186, 193, 190, 191, 192, 189, 187, 194,
- 191, 197, 193, 202, 198, 199, 184, 195, 0, 186,
- 195, 192, 200, 196, 196, 198, 203, 199, 194, 201,
- 193, 202, 204, 207, 205, 223, 194, 197, 197, 209,
- 202, 198, 199, 206, 208, 204, 200, 210, 209, 200,
-
- 212, 208, 201, 210, 211, 215, 201, 203, 213, 204,
- 205, 205, 223, 214, 207, 206, 209, 213, 211, 216,
- 206, 208, 217, 219, 210, 0, 212, 212, 214, 218,
- 220, 211, 218, 221, 224, 213, 215, 217, 0, 218,
- 214, 219, 226, 216, 220, 0, 216, 228, 221, 217,
- 219, 222, 222, 227, 226, 229, 218, 220, 224, 218,
- 221, 224, 225, 233, 230, 225, 0, 0, 232, 226,
- 240, 227, 225, 231, 228, 232, 222, 229, 222, 222,
- 227, 234, 229, 235, 0, 231, 237, 236, 234, 225,
- 230, 230, 225, 238, 233, 232, 238, 239, 238, 237,
-
- 231, 240, 0, 242, 238, 235, 241, 0, 234, 242,
- 235, 236, 243, 237, 236, 239, 244, 0, 245, 243,
- 238, 250, 246, 238, 239, 238, 248, 250, 241, 244,
- 242, 0, 249, 241, 245, 246, 0, 254, 248, 243,
- 253, 0, 245, 244, 251, 245, 252, 253, 250, 246,
- 249, 0, 251, 248, 256, 0, 259, 255, 252, 249,
- 0, 245, 247, 247, 255, 257, 256, 253, 254, 259,
- 0, 251, 247, 252, 247, 247, 247, 257, 258, 247,
- 263, 256, 260, 259, 255, 258, 264, 247, 262, 247,
- 247, 263, 257, 261, 261, 262, 266, 264, 265, 247,
-
- 0, 247, 247, 247, 260, 258, 247, 263, 267, 260,
- 268, 265, 271, 264, 269, 262, 270, 275, 272, 268,
- 0, 266, 261, 266, 273, 265, 274, 269, 276, 270,
- 271, 267, 277, 0, 270, 267, 278, 268, 279, 271,
- 272, 269, 280, 270, 274, 272, 0, 273, 275, 276,
- 278, 273, 281, 274, 277, 276, 270, 282, 281, 277,
- 284, 283, 0, 278, 279, 279, 286, 285, 0, 287,
- 0, 289, 286, 280, 290, 282, 283, 293, 297, 281,
- 290, 291, 300, 295, 282, 292, 284, 284, 283, 285,
- 295, 297, 293, 286, 285, 287, 287, 289, 289, 296,
-
- 291, 290, 298, 292, 293, 297, 296, 301, 291, 299,
- 295, 0, 292, 300, 302, 303, 301, 305, 304, 302,
- 306, 310, 0, 0, 298, 307, 296, 0, 299, 298,
- 304, 306, 310, 307, 301, 326, 299, 313, 303, 305,
- 311, 302, 303, 309, 305, 304, 315, 306, 310, 311,
- 309, 0, 307, 308, 312, 314, 0, 314, 308, 319,
- 308, 312, 316, 313, 313, 318, 326, 319, 308, 317,
- 309, 311, 315, 315, 316, 321, 311, 318, 308, 308,
- 308, 312, 314, 320, 317, 308, 319, 308, 320, 316,
- 322, 323, 318, 325, 324, 308, 317, 321, 327, 323,
-
- 328, 329, 321, 330, 331, 308, 324, 332, 322, 328,
- 320, 333, 334, 327, 336, 329, 325, 322, 323, 331,
- 325, 324, 332, 333, 337, 327, 335, 328, 329, 338,
- 330, 331, 339, 341, 332, 340, 334, 345, 333, 334,
- 335, 336, 342, 343, 344, 0, 0, 349, 342, 346,
- 348, 337, 347, 335, 0, 0, 0, 348, 350, 339,
- 338, 354, 340, 353, 341, 343, 355, 344, 345, 342,
- 343, 344, 346, 351, 347, 356, 346, 348, 349, 347,
- 350, 357, 352, 358, 355, 350, 351, 352, 362, 353,
- 353, 352, 354, 355, 360, 0, 363, 359, 361, 356,
-
- 351, 373, 356, 357, 357, 358, 352, 364, 357, 352,
- 358, 359, 365, 361, 352, 366, 360, 363, 352, 362,
- 367, 360, 368, 363, 359, 361, 369, 370, 371, 367,
- 357, 364, 373, 0, 364, 368, 365, 366, 374, 365,
- 372, 376, 366, 375, 372, 376, 0, 367, 369, 368,
- 371, 370, 377, 369, 370, 371, 374, 378, 375, 379,
- 380, 0, 0, 384, 385, 374, 381, 375, 379, 380,
- 375, 372, 376, 382, 381, 383, 385, 377, 388, 377,
- 382, 384, 378, 386, 378, 375, 379, 380, 389, 387,
- 384, 385, 386, 381, 390, 391, 389, 392, 383, 394,
-
- 382, 387, 383, 393, 404, 397, 0, 394, 396, 388,
- 386, 395, 399, 398, 393, 389, 387, 404, 391, 392,
- 390, 390, 391, 400, 392, 395, 394, 397, 396, 402,
- 393, 404, 397, 398, 399, 396, 403, 401, 395, 399,
- 398, 408, 406, 405, 407, 400, 401, 408, 411, 402,
- 400, 409, 0, 412, 403, 414, 402, 0, 0, 409,
- 424, 415, 0, 403, 401, 405, 406, 407, 408, 406,
- 405, 407, 413, 415, 414, 418, 412, 409, 409, 411,
- 412, 413, 414, 421, 422, 418, 409, 426, 415, 423,
- 0, 424, 0, 428, 427, 428, 430, 0, 431, 413,
-
- 0, 421, 418, 427, 429, 422, 0, 0, 435, 426,
- 421, 422, 423, 432, 426, 0, 423, 425, 431, 425,
- 428, 427, 425, 430, 433, 431, 434, 425, 429, 438,
- 436, 429, 435, 425, 425, 435, 433, 436, 439, 432,
- 432, 442, 425, 443, 425, 444, 425, 437, 438, 425,
- 440, 433, 434, 434, 425, 437, 438, 436, 441, 445,
- 425, 425, 440, 442, 439, 439, 446, 441, 442, 447,
- 443, 448, 449, 450, 437, 454, 444, 440, 452, 477,
- 457, 449, 451, 445, 453, 441, 445, 446, 447, 455,
- 448, 459, 0, 446, 0, 450, 447, 455, 448, 449,
-
- 450, 458, 451, 453, 457, 452, 454, 457, 460, 451,
- 477, 453, 468, 461, 458, 465, 455, 459, 459, 463,
- 460, 461, 465, 464, 469, 463, 466, 467, 458, 464,
- 468, 466, 470, 0, 467, 460, 471, 461, 472, 468,
- 461, 470, 465, 474, 471, 473, 463, 469, 461, 479,
- 464, 469, 478, 466, 467, 475, 472, 479, 473, 470,
- 476, 481, 475, 471, 474, 472, 480, 485, 482, 484,
- 474, 483, 473, 476, 482, 478, 479, 486, 487, 478,
- 488, 480, 475, 481, 0, 490, 486, 476, 481, 489,
- 491, 485, 487, 480, 485, 482, 489, 483, 483, 493,
-
- 484, 492, 494, 495, 486, 487, 495, 496, 0, 498,
- 494, 488, 490, 492, 0, 500, 489, 491, 501, 499,
- 496, 499, 493, 504, 505, 503, 493, 500, 492, 494,
- 495, 501, 498, 502, 496, 497, 498, 497, 503, 502,
- 508, 497, 500, 497, 504, 501, 499, 507, 497, 0,
- 504, 506, 503, 508, 510, 505, 506, 509, 506, 497,
- 502, 515, 497, 512, 497, 511, 513, 508, 497, 507,
- 497, 518, 509, 516, 507, 497, 506, 506, 506, 513,
- 510, 510, 512, 506, 509, 506, 514, 511, 515, 520,
- 512, 519, 511, 513, 514, 521, 516, 520, 522, 523,
-
- 516, 525, 518, 506, 524, 529, 527, 526, 0, 521,
- 533, 528, 524, 514, 526, 519, 520, 523, 519, 527,
- 522, 531, 521, 525, 534, 522, 523, 532, 525, 528,
- 531, 524, 533, 527, 526, 535, 529, 533, 528, 532,
- 536, 538, 537, 540, 543, 0, 534, 540, 531, 541,
- 564, 534, 541, 542, 532, 546, 543, 535, 536, 544,
- 545, 546, 535, 547, 551, 0, 544, 536, 537, 537,
- 548, 543, 538, 549, 540, 541, 541, 542, 550, 541,
- 542, 564, 546, 552, 545, 547, 544, 545, 554, 553,
- 547, 551, 548, 555, 549, 556, 559, 548, 553, 550,
-
- 549, 552, 555, 556, 557, 550, 560, 558, 561, 563,
- 552, 557, 554, 562, 565, 554, 553, 561, 559, 567,
- 555, 558, 556, 559, 568, 563, 566, 0, 560, 569,
- 573, 557, 568, 560, 558, 561, 563, 562, 566, 570,
- 562, 572, 569, 579, 574, 565, 567, 575, 573, 575,
- 572, 568, 574, 566, 570, 579, 569, 573, 580, 578,
- 581, 582, 583, 584, 0, 580, 570, 585, 572, 587,
- 579, 574, 578, 586, 575, 588, 584, 589, 0, 590,
- 585, 587, 609, 591, 583, 580, 578, 588, 590, 583,
- 584, 581, 582, 592, 585, 586, 587, 593, 597, 594,
-
- 586, 591, 588, 595, 589, 593, 590, 598, 596, 603,
- 591, 595, 600, 609, 601, 592, 597, 599, 603, 598,
- 592, 594, 601, 617, 593, 597, 594, 600, 604, 599,
- 595, 596, 602, 605, 598, 596, 603, 610, 602, 600,
- 606, 601, 615, 607, 599, 605, 611, 606, 616, 604,
- 610, 612, 613, 614, 617, 604, 615, 614, 612, 602,
- 605, 607, 618, 619, 610, 611, 616, 606, 621, 615,
- 607, 620, 625, 611, 613, 616, 626, 622, 612, 613,
- 0, 0, 624, 623, 614, 619, 627, 0, 618, 618,
- 619, 624, 628, 620, 621, 621, 623, 0, 620, 622,
-
- 632, 630, 0, 625, 622, 634, 637, 626, 627, 624,
- 623, 629, 633, 627, 634, 628, 629, 630, 629, 628,
- 629, 635, 636, 632, 633, 637, 639, 632, 630, 629,
- 636, 638, 634, 637, 635, 639, 641, 642, 629, 633,
- 640, 644, 640, 629, 638, 629, 646, 629, 635, 636,
- 645, 647, 648, 639, 646, 649, 0, 651, 638, 648,
- 657, 650, 652, 641, 642, 644, 654, 640, 644, 652,
- 653, 656, 645, 646, 655, 658, 660, 645, 647, 648,
- 656, 657, 649, 650, 651, 654, 661, 657, 650, 652,
- 663, 662, 653, 654, 670, 658, 655, 653, 656, 666,
-
- 665, 655, 658, 667, 664, 668, 669, 660, 665, 671,
- 669, 673, 668, 662, 674, 666, 671, 661, 662, 678,
- 673, 663, 664, 678, 0, 670, 666, 665, 672, 689,
- 667, 664, 668, 669, 0, 672, 671, 675, 673, 677,
- 674, 674, 689, 676, 675, 676, 678, 680, 677, 681,
- 681, 680, 682, 683, 684, 672, 689, 0, 685, 686,
- 687, 682, 690, 684, 675, 685, 677, 0, 692, 687,
- 676, 0, 694, 693, 690, 683, 681, 698, 680, 682,
- 683, 684, 686, 688, 691, 685, 686, 687, 695, 690,
- 692, 688, 691, 693, 694, 692, 696, 695, 698, 694,
-
- 693, 697, 699, 700, 698, 701, 702, 703, 699, 714,
- 688, 691, 707, 697, 696, 695, 705, 708, 706, 709,
- 707, 708, 0, 696, 710, 700, 713, 711, 697, 699,
- 700, 706, 710, 703, 703, 711, 701, 702, 705, 707,
- 714, 712, 715, 705, 716, 706, 709, 713, 708, 712,
- 715, 710, 716, 713, 711, 717, 718, 719, 723, 720,
- 721, 0, 722, 717, 718, 720, 727, 724, 712, 715,
- 719, 716, 721, 727, 726, 728, 729, 725, 732, 737,
- 723, 736, 717, 718, 719, 723, 720, 721, 722, 722,
- 724, 725, 726, 727, 724, 730, 739, 735, 729, 731,
-
- 741, 726, 728, 729, 725, 743, 731, 736, 736, 732,
- 737, 744, 746, 745, 746, 0, 748, 749, 730, 735,
- 747, 766, 730, 739, 735, 745, 731, 741, 748, 743,
- 751, 752, 743, 753, 750, 774, 752, 744, 744, 746,
- 745, 750, 747, 748, 749, 754, 755, 747, 756, 753,
- 758, 759, 766, 760, 755, 761, 751, 751, 752, 758,
- 753, 750, 761, 764, 759, 765, 774, 762, 754, 763,
- 756, 0, 754, 755, 762, 756, 763, 758, 759, 760,
- 760, 769, 761, 771, 767, 768, 0, 765, 764, 773,
- 764, 767, 765, 772, 762, 772, 763, 775, 768, 777,
-
- 776, 0, 769, 779, 782, 771, 781, 777, 769, 776,
- 771, 767, 768, 773, 778, 780, 773, 783, 789, 780,
- 772, 778, 787, 775, 775, 779, 777, 776, 781, 784,
- 779, 782, 789, 781, 790, 787, 785, 788, 784, 783,
- 786, 778, 780, 785, 783, 789, 791, 786, 792, 787,
- 794, 793, 788, 791, 795, 792, 784, 793, 796, 797,
- 800, 796, 794, 785, 788, 790, 801, 786, 802, 807,
- 797, 803, 804, 791, 795, 792, 796, 794, 793, 802,
- 804, 795, 0, 806, 808, 796, 797, 800, 796, 803,
- 801, 805, 810, 801, 805, 802, 809, 819, 803, 804,
-
- 807, 806, 812, 809, 811, 813, 810, 813, 814, 805,
- 806, 808, 815, 811, 816, 812, 821, 814, 805, 810,
- 0, 805, 822, 809, 817, 816, 823, 820, 819, 812,
- 0, 811, 813, 817, 824, 814, 820, 0, 815, 815,
- 825, 816, 829, 822, 828, 831, 825, 821, 824, 822,
- 830, 817, 840, 831, 820, 832, 829, 823, 836, 830,
- 0, 824, 837, 828, 825, 833, 832, 825, 835, 829,
- 840, 828, 831, 825, 833, 835, 838, 830, 839, 840,
- 843, 836, 832, 841, 837, 836, 844, 841, 847, 837,
- 842, 845, 833, 846, 848, 835, 855, 851, 838, 844,
-
- 839, 850, 842, 838, 852, 839, 845, 843, 846, 848,
- 841, 853, 854, 844, 849, 859, 863, 842, 845, 847,
- 846, 848, 850, 849, 851, 857, 856, 855, 850, 853,
- 858, 852, 856, 857, 861, 862, 860, 858, 853, 854,
- 864, 849, 859, 860, 866, 867, 868, 863, 872, 869,
- 0, 869, 857, 856, 867, 870, 0, 858, 871, 877,
- 0, 861, 862, 860, 864, 877, 873, 864, 873, 878,
- 0, 874, 867, 873, 0, 866, 869, 868, 874, 872,
- 875, 873, 870, 876, 871, 871, 877, 875, 879, 879,
- 876, 880, 881, 873, 883, 873, 878, 884, 874, 881,
-
- 873, 888, 885, 887, 887, 886, 893, 875, 896, 884,
- 876, 892, 883, 889, 889, 879, 895, 880, 880, 881,
- 890, 883, 885, 886, 884, 0, 897, 888, 888, 885,
- 887, 890, 886, 892, 894, 896, 895, 893, 892, 898,
- 889, 894, 899, 895, 900, 909, 901, 890, 897, 899,
- 902, 903, 904, 897, 901, 906, 900, 898, 905, 907,
- 910, 894, 902, 905, 911, 907, 898, 908, 911, 899,
- 904, 900, 903, 901, 905, 912, 909, 902, 903, 904,
- 908, 913, 906, 914, 915, 905, 907, 910, 917, 916,
- 905, 918, 919, 918, 908, 911, 913, 920, 921, 915,
-
- 925, 924, 920, 917, 922, 926, 912, 933, 913, 927,
- 0, 915, 916, 928, 914, 917, 916, 929, 918, 922,
- 940, 930, 933, 919, 920, 924, 935, 925, 924, 921,
- 927, 922, 926, 936, 933, 928, 927, 935, 929, 930,
- 928, 937, 936, 938, 929, 943, 944, 940, 930, 946,
- 0, 948, 935, 935, 947, 945, 0, 0, 943, 937,
- 936, 938, 951, 950, 935, 945, 952, 953, 937, 951,
- 938, 954, 943, 953, 0, 946, 946, 944, 948, 947,
- 955, 947, 945, 950, 956, 957, 954, 960, 961, 951,
- 950, 962, 952, 952, 953, 955, 958, 957, 954, 956,
-
- 962, 963, 965, 958, 964, 966, 966, 955, 967, 960,
- 0, 956, 957, 961, 960, 961, 968, 964, 962, 963,
- 969, 973, 970, 958, 971, 0, 974, 972, 963, 965,
- 967, 964, 966, 971, 972, 967, 978, 976, 0, 996,
- 979, 968, 969, 968, 970, 976, 977, 969, 974, 970,
- 982, 971, 973, 974, 972, 979, 981, 980, 984, 977,
- 980, 983, 998, 978, 976, 987, 996, 979, 982, 985,
- 994, 988, 994, 977, 991, 980, 983, 982, 988, 987,
- 984, 981, 989, 981, 980, 984, 993, 980, 983, 998,
- 995, 985, 987, 989, 997, 991, 985, 994, 988, 1000,
-
- 1002, 991, 999, 1001, 1003, 1004, 1064, 993, 995, 989,
- 999, 1008, 997, 993, 1002, 1007, 1012, 995, 1009, 1010,
- 0, 997, 1000, 0, 1004, 1001, 1000, 1002, 1011, 999,
- 1001, 1003, 1004, 1007, 1010, 1013, 1014, 1064, 1008, 1012,
- 1015, 1015, 1007, 1012, 1009, 1009, 1010, 1013, 1016, 1018,
- 1011, 1019, 1018, 1021, 1020, 1011, 1016, 1024, 1014, 1019,
- 1020, 1025, 1013, 1014, 1022, 1026, 1029, 1015, 1021, 1027,
- 1022, 1028, 1030, 1031, 1032, 1016, 1018, 1033, 1019, 1026,
- 1021, 1020, 1034, 1027, 1024, 1025, 1035, 1031, 1025, 1036,
- 1034, 1022, 1026, 1029, 1037, 1039, 1027, 1028, 1028, 1030,
-
- 1031, 1032, 1037, 1040, 1033, 1042, 1041, 1044, 0, 1034,
- 1043, 1045, 0, 1035, 1041, 1047, 1036, 1039, 1048, 1043,
- 1049, 1037, 1039, 0, 1046, 1051, 1048, 1053, 1044, 1055,
- 1040, 1054, 1042, 1041, 1044, 1045, 0, 1043, 1045, 1046,
- 1052, 1052, 1047, 1056, 1055, 1048, 1057, 1049, 1057, 1054,
- 1046, 1046, 1051, 1053, 1053, 1058, 1055, 1059, 1054, 1060,
- 1061, 1062, 1063, 1059, 0, 1056, 1046, 1052, 1065, 1058,
- 1056, 1067, 1061, 1057, 1069, 1071, 1070, 1078, 1067, 1062,
- 1063, 1060, 1058, 1077, 1059, 1072, 1060, 1061, 1062, 1063,
- 1075, 1065, 1069, 1072, 1079, 1065, 1074, 1088, 1067, 1078,
-
- 1081, 1069, 1070, 1070, 1078, 1075, 1071, 1077, 1074, 1080,
- 1077, 1072, 1072, 1082, 1089, 1083, 1085, 1075, 1084, 1086,
- 1072, 1079, 1087, 1074, 1081, 1084, 1086, 1081, 1088, 1092,
- 1094, 1108, 1080, 1093, 1100, 1089, 1080, 1083, 1097, 1085,
- 1082, 1089, 1083, 1085, 1087, 1084, 1086, 1091, 1103, 1087,
- 1104, 1092, 1093, 1106, 1112, 1094, 1092, 1094, 1091, 1109,
- 1093, 1100, 1108, 1111, 1097, 1097, 1114, 1110, 1111, 1117,
- 1103, 1119, 1118, 1120, 1091, 1103, 1112, 1104, 1110, 1121,
- 1106, 1112, 1122, 1123, 1119, 1109, 1109, 1124, 1126, 1127,
- 1111, 1117, 1125, 1114, 1110, 1120, 1117, 1118, 1119, 1118,
-
- 1120, 1125, 1124, 1126, 1127, 1128, 1121, 1130, 1131, 1122,
- 1123, 1129, 1132, 1132, 1124, 1126, 1127, 1133, 1129, 1125,
- 1128, 1137, 1134, 1138, 1133, 1135, 1131, 1136, 1135, 1139,
- 1137, 1140, 1128, 1142, 1130, 1131, 1134, 1143, 1129, 1132,
- 1136, 1145, 1142, 1146, 1133, 1138, 1148, 1147, 1137, 1134,
- 1138, 1139, 1135, 1149, 1136, 1148, 1139, 1152, 1140, 1147,
- 1142, 1146, 1149, 1143, 1143, 1150, 1153, 1151, 1145, 1154,
- 1146, 1155, 1163, 1148, 1147, 1151, 1150, 1162, 1156, 1155,
- 1149, 1154, 1158, 1164, 1152, 1156, 1161, 1167, 1169, 1170,
- 1158, 1165, 1150, 1161, 1151, 1164, 1154, 1153, 1155, 1163,
-
- 1165, 1162, 1174, 1168, 1162, 1156, 1176, 1175, 1179, 1158,
- 1164, 1168, 1175, 1161, 1167, 1169, 1170, 1177, 1165, 1178,
- 1181, 1182, 1185, 1183, 1176, 1184, 1186, 1179, 1174, 1174,
- 1168, 1187, 1181, 1176, 1175, 1179, 1188, 1184, 1189, 1177,
- 1192, 1178, 1191, 1182, 1177, 1183, 1178, 1181, 1182, 1185,
- 1183, 1194, 1184, 1186, 1195, 1192, 1196, 1203, 1197, 0,
- 1198, 1199, 1187, 1188, 1191, 1189, 1205, 1192, 1195, 1191,
- 1212, 1204, 1201, 1206, 1196, 1194, 1197, 1209, 1194, 1199,
- 1201, 1195, 1202, 1196, 1203, 1197, 1198, 1198, 1199, 1204,
- 1202, 1207, 1206, 1205, 1210, 1209, 1215, 1212, 1204, 1201,
-
- 1206, 1216, 1217, 1215, 1209, 1218, 1219, 1220, 1210, 1202,
- 1222, 1221, 1223, 1207, 0, 1227, 1220, 1224, 1207, 1233,
- 0, 1210, 1230, 1215, 1221, 1235, 1217, 1216, 1216, 1217,
- 1230, 1231, 1218, 1219, 1220, 1232, 1227, 1234, 1221, 1223,
- 1224, 1222, 1227, 1232, 1224, 1233, 1233, 1235, 1234, 1230,
- 1231, 1238, 1235, 1236, 1237, 1237, 1239, 1243, 1231, 1244,
- 1236, 1241, 1232, 1239, 1234, 0, 1243, 1245, 1250, 1238,
- 1250, 1246, 1249, 1248, 1253, 0, 1254, 0, 1238, 1255,
- 1236, 1237, 1257, 1239, 1243, 1241, 1244, 1249, 1241, 1246,
- 1245, 1248, 1258, 0, 1245, 1250, 1253, 1255, 1246, 1249,
-
- 1248, 1253, 1254, 1254, 1257, 1259, 1255, 1261, 1260, 1257,
- 1258, 1262, 1263, 1259, 1264, 1266, 1269, 1265, 1268, 1258,
- 1260, 1272, 1264, 1263, 1267, 1267, 1268, 1270, 1275, 1262,
- 1276, 0, 1259, 1273, 1261, 1260, 1265, 1266, 1262, 1263,
- 1273, 1264, 1266, 1269, 1265, 1268, 1278, 1274, 1272, 1270,
- 1277, 1267, 1274, 1280, 1270, 1275, 1279, 1276, 1277, 1282,
- 1273, 1278, 1283, 1279, 1281, 1285, 1286, 1287, 1288, 1289,
- 1283, 1291, 1295, 1278, 1274, 1290, 0, 1277, 1285, 1281,
- 1280, 1293, 1296, 1279, 1299, 1300, 1282, 1306, 1286, 1283,
- 1311, 1281, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1295,
-
- 1301, 1303, 1290, 1299, 1296, 1315, 1305, 1293, 1293, 1296,
- 1318, 1299, 1300, 1305, 1306, 1307, 1313, 1311, 1316, 1318,
- 1319, 1320, 1301, 1303, 1322, 1324, 1326, 1301, 1303, 1327,
- 1316, 1332, 1315, 1305, 1334, 0, 1338, 1318, 1307, 1313,
- 0, 1326, 1307, 1313, 1335, 1316, 1340, 1319, 1320, 1338,
- 1333, 1322, 1324, 1326, 1332, 1327, 1327, 1333, 1332, 1339,
- 1337, 1334, 1335, 1338, 0, 0, 0, 1339, 0, 0,
- 0, 1335, 1337, 1340, 0, 0, 0, 1333, 0, 0,
- 0, 0, 0, 0, 0, 0, 1339, 1337, 1343, 1343,
- 1343, 1343, 1343, 1343, 1343, 1344, 1344, 1344, 1344, 1344,
-
- 1344, 1344, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1346,
- 1346, 1346, 1346, 1346, 1346, 1346, 1347, 1347, 1347, 1347,
- 1347, 1347, 1347, 1349, 1349, 0, 1349, 1349, 1349, 1349,
- 1350, 1350, 0, 0, 0, 1350, 1350, 1351, 1351, 0,
- 0, 1351, 0, 1351, 1352, 0, 0, 0, 0, 0,
- 1352, 1353, 1353, 0, 0, 0, 1353, 1353, 1354, 0,
- 0, 0, 0, 0, 1354, 1355, 1355, 0, 1355, 1355,
- 1355, 1355, 1356, 1356, 0, 1356, 1356, 1356, 1356, 1342,
- 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
- 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
-
- 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
- 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
- 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
- 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342, 1342,
- 1342, 1342, 1342, 1342, 1342
+ 75, 32, 30, 127, 75, 31, 25, 32, 30, 31,
+ 65, 29, 30, 55, 37, 55, 55, 125, 55, 37,
+ 30, 30, 117, 65, 33, 31, 117, 37, 32, 30,
+ 33, 31, 31, 33, 34, 30, 31, 65, 80, 30,
+ 33, 37, 33, 123, 34, 74, 37, 34, 35, 117,
+ 38, 33, 31, 80, 38, 77, 34, 33, 35, 138,
+ 33, 34, 35, 35, 78, 80, 36, 33, 36, 74,
+ 35, 34, 74, 78, 34, 35, 38, 38, 138, 77,
+ 121, 38, 77, 36, 124, 35, 138, 124, 67, 35,
+ 35, 78, 36, 36, 63, 36, 63, 63, 66, 63,
+
+ 66, 66, 68, 66, 68, 68, 71, 68, 71, 71,
+ 36, 71, 68, 76, 79, 81, 71, 82, 83, 84,
+ 76, 85, 82, 89, 81, 86, 61, 79, 85, 87,
+ 88, 63, 84, 56, 86, 83, 129, 129, 87, 93,
+ 76, 79, 81, 71, 82, 89, 84, 90, 85, 83,
+ 89, 91, 86, 88, 91, 92, 87, 88, 96, 93,
+ 90, 93, 83, 92, 95, 94, 93, 95, 91, 94,
+ 97, 96, 51, 99, 90, 91, 50, 102, 91, 98,
+ 101, 91, 92, 100, 102, 96, 93, 99, 103, 94,
+ 45, 95, 94, 97, 101, 91, 94, 97, 105, 98,
+
+ 99, 106, 105, 100, 102, 104, 98, 101, 106, 107,
+ 100, 103, 108, 109, 104, 103, 112, 110, 114, 115,
+ 105, 109, 113, 107, 108, 105, 110, 114, 106, 105,
+ 115, 112, 104, 118, 134, 116, 107, 119, 120, 108,
+ 109, 116, 113, 112, 110, 114, 115, 120, 113, 113,
+ 136, 126, 119, 126, 126, 118, 126, 135, 134, 141,
+ 118, 134, 116, 40, 119, 120, 137, 142, 131, 113,
+ 131, 131, 132, 131, 132, 132, 139, 132, 137, 135,
+ 140, 136, 143, 146, 135, 145, 578, 140, 139, 142,
+ 141, 146, 14, 137, 142, 147, 148, 13, 149, 154,
+
+ 148, 0, 151, 139, 0, 150, 152, 140, 154, 132,
+ 146, 145, 145, 143, 144, 151, 578, 147, 152, 144,
+ 155, 149, 147, 148, 144, 149, 154, 150, 157, 151,
+ 144, 144, 150, 152, 159, 153, 156, 144, 153, 157,
+ 158, 144, 155, 156, 160, 161, 144, 155, 0, 0,
+ 153, 144, 162, 163, 160, 157, 164, 144, 144, 163,
+ 159, 159, 153, 156, 165, 153, 166, 167, 168, 169,
+ 162, 158, 171, 172, 0, 160, 161, 170, 172, 162,
+ 163, 160, 173, 176, 170, 175, 165, 164, 168, 179,
+ 169, 165, 175, 171, 174, 168, 169, 166, 167, 171,
+
+ 172, 173, 177, 181, 170, 176, 174, 177, 180, 173,
+ 176, 182, 175, 178, 178, 180, 183, 184, 187, 185,
+ 179, 174, 178, 192, 189, 184, 186, 0, 181, 177,
+ 181, 182, 0, 188, 190, 180, 191, 193, 182, 189,
+ 178, 178, 190, 195, 184, 185, 185, 183, 186, 187,
+ 188, 189, 195, 194, 192, 191, 198, 186, 188, 193,
+ 188, 190, 196, 191, 193, 194, 197, 205, 199, 0,
+ 195, 0, 202, 200, 201, 186, 209, 188, 206, 203,
+ 194, 196, 198, 198, 200, 204, 201, 207, 208, 196,
+ 197, 206, 214, 197, 199, 199, 202, 210, 205, 202,
+
+ 200, 201, 203, 204, 210, 206, 203, 209, 211, 213,
+ 208, 215, 204, 207, 207, 208, 212, 211, 214, 214,
+ 215, 218, 212, 213, 210, 216, 217, 219, 221, 220,
+ 0, 222, 220, 223, 224, 211, 213, 222, 215, 220,
+ 216, 226, 219, 212, 231, 218, 221, 223, 218, 224,
+ 225, 225, 216, 229, 219, 221, 220, 217, 222, 220,
+ 223, 224, 227, 228, 230, 229, 228, 234, 226, 233,
+ 232, 231, 236, 228, 235, 225, 0, 225, 225, 234,
+ 229, 235, 230, 239, 238, 243, 227, 240, 0, 227,
+ 228, 230, 232, 228, 234, 233, 233, 232, 237, 244,
+
+ 240, 235, 242, 236, 0, 237, 238, 239, 0, 247,
+ 239, 238, 241, 245, 240, 241, 243, 241, 0, 245,
+ 242, 244, 247, 241, 246, 237, 244, 257, 249, 242,
+ 248, 246, 252, 251, 0, 255, 247, 253, 278, 241,
+ 245, 249, 241, 253, 241, 251, 248, 255, 283, 256,
+ 252, 246, 0, 254, 248, 249, 256, 248, 257, 252,
+ 251, 254, 255, 258, 253, 259, 260, 0, 262, 278,
+ 258, 264, 264, 248, 250, 250, 256, 259, 260, 283,
+ 254, 262, 261, 263, 250, 268, 250, 250, 250, 261,
+ 258, 250, 259, 260, 269, 262, 265, 266, 268, 250,
+
+ 264, 250, 250, 265, 270, 263, 267, 271, 266, 261,
+ 263, 250, 268, 250, 250, 250, 271, 267, 250, 269,
+ 275, 269, 272, 265, 266, 273, 274, 270, 276, 279,
+ 277, 270, 280, 267, 271, 272, 282, 0, 273, 284,
+ 285, 287, 275, 273, 274, 284, 281, 275, 277, 272,
+ 279, 276, 273, 274, 280, 276, 279, 277, 285, 280,
+ 281, 286, 282, 282, 287, 273, 284, 285, 287, 288,
+ 289, 290, 295, 281, 291, 294, 286, 290, 293, 297,
+ 299, 294, 300, 304, 0, 296, 0, 299, 286, 300,
+ 0, 295, 289, 302, 297, 288, 288, 289, 290, 295,
+
+ 291, 291, 294, 296, 293, 293, 297, 299, 301, 300,
+ 303, 306, 296, 305, 304, 302, 306, 309, 307, 308,
+ 302, 301, 305, 310, 311, 0, 313, 0, 0, 303,
+ 0, 308, 311, 313, 310, 301, 314, 303, 306, 309,
+ 305, 307, 317, 0, 309, 307, 308, 314, 316, 315,
+ 310, 311, 312, 313, 318, 316, 318, 312, 315, 312,
+ 0, 319, 320, 314, 0, 323, 324, 312, 317, 317,
+ 322, 324, 326, 323, 320, 316, 321, 312, 312, 312,
+ 315, 318, 322, 325, 312, 315, 312, 319, 319, 320,
+ 326, 321, 323, 324, 312, 328, 329, 322, 327, 326,
+
+ 330, 331, 332, 321, 312, 325, 327, 328, 334, 335,
+ 325, 332, 333, 338, 0, 336, 331, 340, 341, 329,
+ 337, 342, 328, 329, 335, 327, 333, 339, 331, 332,
+ 336, 330, 337, 343, 344, 334, 335, 338, 345, 333,
+ 338, 339, 336, 346, 340, 341, 347, 337, 348, 346,
+ 349, 350, 342, 353, 339, 351, 352, 0, 354, 355,
+ 343, 344, 357, 352, 358, 0, 360, 0, 347, 345,
+ 346, 348, 355, 347, 350, 348, 359, 351, 350, 361,
+ 354, 349, 351, 352, 353, 354, 355, 356, 357, 357,
+ 360, 362, 356, 360, 359, 358, 356, 365, 363, 364,
+
+ 366, 361, 361, 359, 367, 369, 361, 370, 365, 368,
+ 0, 356, 363, 362, 356, 366, 371, 374, 362, 356,
+ 378, 364, 375, 356, 365, 363, 364, 366, 361, 369,
+ 368, 370, 369, 372, 370, 367, 368, 373, 371, 374,
+ 376, 377, 372, 371, 374, 377, 375, 379, 381, 375,
+ 373, 378, 381, 380, 0, 393, 382, 383, 0, 0,
+ 372, 384, 376, 386, 373, 379, 385, 376, 380, 387,
+ 384, 386, 377, 389, 379, 385, 387, 380, 388, 381,
+ 380, 382, 383, 382, 383, 390, 393, 392, 384, 391,
+ 386, 389, 395, 385, 394, 380, 387, 390, 391, 392,
+
+ 389, 388, 394, 396, 398, 388, 397, 401, 400, 399,
+ 402, 0, 390, 0, 392, 398, 391, 399, 395, 395,
+ 403, 394, 400, 404, 405, 408, 396, 401, 397, 406,
+ 396, 398, 402, 397, 401, 400, 399, 402, 406, 407,
+ 403, 409, 410, 408, 412, 404, 405, 403, 411, 413,
+ 404, 405, 408, 414, 409, 413, 406, 427, 416, 407,
+ 417, 414, 0, 419, 410, 418, 407, 412, 409, 410,
+ 428, 412, 411, 420, 418, 411, 413, 426, 427, 414,
+ 414, 423, 419, 417, 427, 420, 429, 417, 414, 416,
+ 419, 423, 418, 428, 431, 426, 0, 428, 432, 433,
+
+ 420, 433, 435, 434, 426, 0, 437, 432, 423, 0,
+ 438, 436, 0, 439, 0, 0, 431, 429, 430, 0,
+ 430, 431, 438, 430, 440, 432, 433, 434, 430, 435,
+ 434, 436, 437, 437, 430, 430, 442, 438, 436, 439,
+ 439, 443, 441, 430, 442, 430, 444, 430, 440, 441,
+ 430, 440, 445, 447, 448, 430, 446, 449, 450, 453,
+ 443, 430, 430, 442, 445, 446, 451, 0, 443, 441,
+ 452, 458, 444, 444, 456, 447, 454, 460, 453, 445,
+ 447, 448, 457, 446, 461, 455, 453, 459, 449, 450,
+ 451, 452, 461, 451, 455, 454, 456, 452, 458, 463,
+
+ 464, 456, 457, 454, 465, 466, 459, 0, 460, 457,
+ 467, 461, 455, 464, 459, 469, 470, 466, 467, 472,
+ 474, 469, 470, 463, 472, 475, 463, 464, 471, 473,
+ 465, 465, 466, 477, 467, 471, 473, 467, 474, 478,
+ 476, 477, 469, 470, 480, 467, 472, 474, 475, 476,
+ 479, 481, 475, 483, 487, 471, 473, 478, 481, 482,
+ 477, 485, 484, 479, 486, 480, 478, 476, 488, 485,
+ 489, 480, 482, 490, 488, 491, 487, 479, 481, 486,
+ 493, 487, 494, 492, 483, 484, 482, 496, 485, 484,
+ 497, 486, 492, 495, 493, 488, 489, 489, 499, 491,
+
+ 495, 500, 491, 498, 490, 501, 502, 493, 501, 500,
+ 492, 506, 504, 494, 496, 498, 505, 497, 505, 502,
+ 495, 499, 511, 506, 507, 499, 0, 0, 500, 516,
+ 498, 0, 501, 502, 503, 504, 503, 507, 506, 504,
+ 503, 509, 503, 505, 508, 510, 521, 503, 513, 514,
+ 508, 507, 512, 511, 509, 516, 516, 512, 503, 512,
+ 517, 503, 514, 503, 518, 515, 510, 503, 509, 503,
+ 513, 508, 510, 521, 503, 513, 514, 512, 512, 512,
+ 515, 519, 517, 518, 512, 520, 512, 517, 522, 524,
+ 525, 518, 515, 520, 519, 526, 527, 528, 529, 530,
+
+ 0, 0, 532, 526, 512, 531, 535, 530, 519, 532,
+ 527, 522, 520, 540, 525, 522, 529, 525, 533, 528,
+ 524, 534, 526, 527, 528, 529, 530, 531, 537, 532,
+ 541, 533, 531, 538, 539, 540, 537, 535, 543, 534,
+ 540, 542, 538, 544, 545, 533, 539, 547, 534, 0,
+ 548, 547, 541, 548, 550, 537, 543, 541, 549, 552,
+ 538, 539, 554, 542, 551, 543, 550, 553, 542, 544,
+ 544, 551, 556, 553, 555, 545, 548, 548, 547, 557,
+ 548, 550, 549, 552, 554, 549, 552, 558, 560, 554,
+ 559, 551, 561, 556, 553, 562, 555, 560, 564, 556,
+
+ 557, 555, 563, 568, 562, 564, 557, 565, 559, 566,
+ 563, 567, 568, 569, 558, 560, 561, 559, 571, 561,
+ 572, 565, 562, 570, 0, 564, 574, 575, 576, 563,
+ 568, 566, 573, 567, 565, 575, 566, 569, 567, 570,
+ 569, 576, 577, 579, 573, 580, 588, 589, 581, 571,
+ 570, 572, 579, 574, 575, 576, 581, 577, 582, 573,
+ 582, 585, 590, 580, 586, 593, 587, 591, 592, 577,
+ 579, 594, 580, 587, 585, 581, 586, 588, 589, 596,
+ 591, 592, 598, 594, 590, 582, 599, 593, 585, 590,
+ 595, 586, 593, 587, 591, 592, 597, 601, 594, 600,
+
+ 598, 0, 595, 602, 603, 597, 596, 600, 599, 598,
+ 604, 602, 609, 599, 607, 616, 610, 595, 609, 601,
+ 605, 606, 614, 597, 601, 610, 600, 603, 604, 607,
+ 602, 603, 605, 606, 608, 611, 618, 604, 612, 609,
+ 614, 607, 608, 610, 613, 617, 616, 605, 606, 614,
+ 612, 613, 619, 620, 622, 618, 611, 624, 617, 619,
+ 621, 608, 611, 618, 621, 612, 623, 626, 622, 625,
+ 627, 613, 617, 628, 0, 620, 630, 631, 632, 619,
+ 620, 622, 633, 629, 623, 634, 0, 632, 624, 626,
+ 631, 621, 627, 623, 626, 625, 625, 627, 630, 628,
+
+ 628, 629, 635, 630, 631, 632, 638, 636, 640, 642,
+ 629, 0, 643, 633, 637, 641, 634, 649, 642, 637,
+ 644, 637, 638, 637, 635, 643, 645, 641, 644, 635,
+ 636, 640, 637, 638, 636, 640, 642, 650, 646, 643,
+ 647, 637, 641, 655, 649, 645, 637, 644, 637, 647,
+ 637, 646, 648, 645, 648, 653, 652, 657, 654, 658,
+ 659, 656, 660, 668, 650, 646, 654, 647, 656, 660,
+ 655, 661, 662, 663, 669, 665, 671, 653, 0, 648,
+ 652, 658, 653, 652, 657, 654, 658, 659, 656, 660,
+ 666, 662, 664, 661, 668, 663, 665, 672, 661, 662,
+
+ 663, 664, 665, 670, 673, 669, 674, 671, 675, 676,
+ 666, 678, 673, 679, 677, 672, 676, 666, 677, 664,
+ 679, 680, 674, 681, 672, 670, 682, 683, 680, 685,
+ 670, 673, 681, 674, 683, 675, 676, 684, 685, 684,
+ 679, 677, 678, 686, 691, 688, 690, 686, 680, 688,
+ 681, 692, 682, 682, 683, 690, 685, 689, 689, 694,
+ 692, 693, 0, 695, 684, 698, 691, 696, 693, 700,
+ 686, 691, 695, 690, 697, 696, 688, 698, 692, 701,
+ 702, 699, 694, 709, 689, 704, 694, 697, 693, 699,
+ 695, 700, 698, 705, 696, 703, 700, 706, 710, 701,
+
+ 711, 697, 702, 704, 703, 705, 701, 702, 699, 707,
+ 708, 713, 704, 715, 709, 707, 717, 714, 706, 716,
+ 705, 715, 703, 716, 706, 0, 711, 711, 723, 710,
+ 714, 718, 708, 713, 719, 722, 707, 708, 713, 718,
+ 715, 721, 719, 717, 714, 720, 720, 724, 729, 721,
+ 716, 728, 725, 733, 729, 724, 722, 726, 718, 723,
+ 725, 719, 722, 727, 728, 726, 731, 732, 721, 730,
+ 735, 727, 720, 734, 724, 729, 733, 737, 728, 725,
+ 733, 730, 741, 738, 726, 739, 746, 734, 735, 732,
+ 727, 736, 731, 731, 732, 740, 730, 735, 736, 744,
+
+ 734, 745, 740, 748, 737, 738, 750, 752, 739, 753,
+ 738, 754, 739, 741, 755, 756, 755, 746, 736, 758,
+ 757, 744, 740, 754, 0, 760, 744, 745, 745, 762,
+ 748, 752, 757, 750, 752, 753, 753, 756, 754, 761,
+ 763, 755, 756, 759, 761, 762, 758, 757, 775, 764,
+ 759, 760, 760, 765, 770, 767, 762, 764, 768, 0,
+ 769, 770, 771, 763, 767, 772, 761, 763, 773, 771,
+ 759, 768, 772, 778, 774, 765, 764, 776, 777, 775,
+ 765, 770, 767, 0, 776, 768, 769, 769, 780, 771,
+ 782, 777, 772, 773, 778, 773, 774, 781, 783, 781,
+
+ 778, 774, 0, 785, 776, 777, 784, 791, 786, 788,
+ 780, 787, 785, 793, 782, 780, 786, 782, 787, 789,
+ 790, 792, 793, 789, 781, 0, 796, 799, 0, 783,
+ 785, 788, 784, 784, 791, 786, 788, 794, 787, 796,
+ 793, 797, 790, 792, 794, 795, 789, 790, 792, 798,
+ 800, 804, 795, 796, 801, 803, 797, 800, 799, 802,
+ 809, 801, 806, 798, 794, 802, 805, 803, 797, 805,
+ 810, 804, 795, 806, 817, 814, 798, 800, 804, 811,
+ 812, 801, 803, 814, 805, 813, 802, 809, 818, 806,
+ 816, 812, 815, 805, 810, 815, 805, 810, 825, 820,
+
+ 821, 811, 814, 813, 819, 817, 811, 812, 816, 821,
+ 815, 819, 813, 820, 824, 818, 822, 816, 823, 815,
+ 823, 826, 815, 824, 825, 825, 820, 821, 827, 822,
+ 829, 819, 826, 830, 831, 832, 833, 827, 0, 834,
+ 0, 824, 830, 822, 835, 823, 0, 842, 826, 839,
+ 835, 838, 845, 834, 0, 827, 832, 0, 842, 845,
+ 830, 829, 832, 839, 840, 831, 834, 833, 835, 846,
+ 838, 835, 841, 840, 842, 843, 839, 835, 838, 845,
+ 841, 847, 848, 849, 843, 851, 852, 853, 850, 851,
+ 0, 840, 846, 857, 854, 861, 846, 0, 852, 841,
+
+ 865, 855, 843, 847, 848, 849, 850, 854, 847, 848,
+ 849, 856, 851, 852, 853, 850, 855, 858, 859, 860,
+ 862, 854, 861, 863, 857, 864, 856, 859, 855, 866,
+ 868, 865, 858, 869, 867, 866, 870, 868, 856, 871,
+ 860, 863, 867, 870, 858, 859, 860, 862, 872, 873,
+ 863, 876, 864, 878, 874, 0, 866, 868, 877, 880,
+ 869, 867, 879, 870, 879, 881, 871, 877, 882, 884,
+ 885, 888, 0, 887, 0, 872, 884, 885, 874, 887,
+ 873, 874, 876, 890, 878, 877, 880, 886, 883, 879,
+ 883, 881, 881, 894, 886, 883, 884, 885, 888, 882,
+
+ 887, 889, 889, 883, 891, 893, 895, 896, 897, 890,
+ 890, 891, 898, 898, 886, 883, 899, 883, 895, 901,
+ 894, 904, 883, 893, 900, 900, 897, 896, 889, 906,
+ 901, 891, 893, 895, 896, 897, 903, 905, 907, 898,
+ 908, 909, 899, 899, 905, 911, 901, 910, 913, 906,
+ 914, 900, 904, 912, 910, 915, 906, 911, 903, 909,
+ 913, 912, 908, 903, 905, 907, 917, 908, 909, 920,
+ 919, 914, 911, 915, 910, 913, 916, 914, 918, 921,
+ 912, 916, 915, 919, 918, 922, 923, 924, 925, 922,
+ 0, 0, 916, 917, 926, 927, 928, 919, 930, 929,
+
+ 920, 929, 924, 916, 932, 918, 921, 931, 916, 926,
+ 933, 928, 931, 936, 924, 935, 922, 923, 927, 925,
+ 937, 926, 927, 928, 938, 933, 929, 939, 941, 930,
+ 946, 940, 948, 944, 931, 932, 951, 933, 955, 935,
+ 936, 946, 935, 949, 947, 938, 941, 937, 944, 939,
+ 948, 938, 940, 947, 939, 941, 946, 946, 940, 948,
+ 944, 949, 954, 951, 956, 0, 957, 959, 946, 955,
+ 949, 947, 958, 962, 956, 954, 961, 0, 963, 964,
+ 962, 969, 0, 965, 972, 964, 966, 967, 969, 954,
+ 971, 956, 957, 957, 959, 968, 961, 958, 965, 958,
+
+ 962, 966, 967, 961, 963, 963, 964, 968, 969, 972,
+ 965, 972, 971, 966, 967, 973, 974, 971, 976, 977,
+ 978, 978, 968, 0, 973, 980, 979, 981, 983, 982,
+ 985, 976, 984, 988, 974, 986, 990, 983, 0, 984,
+ 1008, 988, 973, 974, 0, 976, 977, 978, 979, 981,
+ 980, 982, 980, 979, 981, 983, 982, 986, 989, 984,
+ 988, 985, 986, 990, 991, 992, 994, 1008, 992, 993,
+ 0, 989, 995, 1000, 999, 996, 997, 0, 1001, 991,
+ 1000, 0, 0, 992, 994, 989, 1003, 995, 999, 1001,
+ 1005, 991, 992, 994, 993, 992, 993, 996, 997, 995,
+
+ 1000, 999, 996, 997, 1006, 1001, 1006, 1003, 1007, 1009,
+ 1010, 1005, 1011, 1003, 1014, 1012, 1015, 1005, 1013, 1020,
+ 1011, 0, 1021, 0, 0, 1016, 1007, 1009, 1014, 1019,
+ 1024, 1006, 1023, 1026, 0, 1007, 1009, 1010, 1012, 1011,
+ 1013, 1014, 1012, 1015, 1016, 1013, 1020, 1019, 1021, 1021,
+ 1022, 1025, 1016, 1024, 1023, 1026, 1019, 1024, 1028, 1023,
+ 1026, 1027, 1027, 1025, 1030, 1022, 1028, 1030, 1031, 1032,
+ 1036, 1033, 1041, 1034, 0, 1032, 1031, 1022, 1025, 1034,
+ 1037, 0, 1040, 1042, 1044, 1028, 1033, 1038, 1027, 1039,
+ 1045, 1030, 1043, 1047, 1046, 1031, 1032, 1036, 1033, 1041,
+
+ 1034, 1038, 1046, 1039, 1037, 1048, 1043, 1037, 1040, 1040,
+ 1042, 1044, 1051, 1052, 1038, 1049, 1039, 1045, 1053, 1043,
+ 1047, 1046, 1054, 1049, 1055, 1056, 1053, 0, 1058, 1057,
+ 1059, 1061, 1048, 1055, 1051, 1063, 1060, 1064, 1064, 1051,
+ 1052, 1065, 1049, 1058, 1060, 1053, 1056, 1066, 0, 1054,
+ 1068, 1055, 1056, 1057, 1058, 1058, 1057, 1059, 1061, 1069,
+ 1067, 1069, 1063, 1060, 1064, 1066, 1070, 1065, 1065, 1072,
+ 1058, 1073, 1068, 1071, 1066, 1067, 1074, 1068, 1076, 1071,
+ 1070, 1075, 1083, 1073, 1077, 1079, 1069, 1067, 1081, 0,
+ 1082, 1072, 1079, 1070, 1074, 1087, 1072, 1084, 1073, 1075,
+
+ 1071, 1089, 1086, 1074, 1090, 1084, 1081, 1077, 1075, 1076,
+ 1087, 1077, 1079, 1083, 1086, 1081, 1082, 1082, 1091, 1092,
+ 1093, 1094, 1087, 1084, 1084, 1089, 1090, 1095, 1089, 1086,
+ 1096, 1090, 1084, 1097, 1098, 1100, 1099, 1096, 1101, 0,
+ 1103, 1098, 1092, 1105, 1093, 1091, 1092, 1093, 1094, 1095,
+ 1104, 1103, 1112, 1106, 1095, 1109, 1097, 1096, 1099, 1101,
+ 1097, 1098, 1105, 1099, 1115, 1101, 1100, 1103, 1116, 1118,
+ 1105, 1120, 1104, 1121, 1122, 0, 1124, 1104, 1106, 1112,
+ 1106, 1109, 1109, 1123, 1126, 1122, 1115, 1129, 1123, 0,
+ 1130, 1115, 1131, 1133, 1132, 1116, 1118, 1134, 1124, 1121,
+
+ 1121, 1122, 1120, 1124, 1135, 1131, 1142, 1136, 1138, 1129,
+ 1123, 1126, 1143, 1139, 1129, 1130, 1132, 1130, 1137, 1131,
+ 1133, 1132, 1136, 1138, 1134, 1141, 1140, 1137, 1139, 1146,
+ 1143, 1135, 1141, 1142, 1136, 1138, 1144, 1144, 1148, 1143,
+ 1139, 1140, 1145, 1146, 1147, 1137, 1149, 1147, 1150, 1145,
+ 1151, 1148, 1141, 1140, 1152, 1149, 1146, 1154, 0, 1155,
+ 1157, 1158, 1159, 1144, 0, 1148, 1154, 1160, 1164, 1145,
+ 1150, 1147, 1151, 1149, 1159, 1150, 1160, 1151, 0, 1158,
+ 1165, 1152, 1161, 0, 1154, 1155, 1155, 1157, 1158, 1159,
+ 1162, 1161, 1163, 1166, 1160, 1164, 1167, 1174, 1175, 1168,
+
+ 1163, 1162, 1170, 1176, 1167, 1166, 1168, 1173, 1179, 1161,
+ 1170, 1165, 1181, 1177, 1173, 1176, 1182, 1162, 1186, 1163,
+ 1166, 1174, 1177, 1167, 1174, 1175, 1168, 1187, 1180, 1170,
+ 1176, 1188, 1187, 0, 1173, 1179, 1180, 1189, 1190, 1181,
+ 1177, 1193, 1191, 1182, 1186, 1186, 1197, 1198, 1194, 1188,
+ 1195, 1196, 1199, 1193, 1187, 1180, 0, 1200, 1188, 1189,
+ 1190, 1191, 1201, 1196, 1189, 1190, 1203, 1204, 1193, 1191,
+ 1194, 1206, 1195, 1197, 1198, 1194, 1207, 1195, 1196, 1208,
+ 1215, 1209, 1204, 1199, 1200, 1210, 1211, 1216, 1203, 1201,
+ 1207, 1217, 1213, 1203, 1204, 1206, 1218, 1208, 1206, 1209,
+
+ 1213, 1214, 1219, 1207, 1211, 1216, 1208, 1215, 1209, 1214,
+ 1224, 1210, 1210, 1211, 1216, 1218, 1221, 1222, 1217, 1213,
+ 1227, 0, 1228, 1218, 1219, 1230, 1229, 1227, 1214, 1219,
+ 1231, 1222, 1232, 1233, 1221, 1234, 1235, 1224, 1236, 0,
+ 0, 1232, 1245, 1221, 1222, 0, 1233, 1227, 1228, 1228,
+ 1229, 1239, 1230, 1229, 1242, 1243, 1244, 1231, 1247, 1232,
+ 1233, 1236, 1242, 1235, 1244, 1236, 1234, 1253, 1245, 1245,
+ 1248, 1250, 1239, 1246, 1243, 1249, 1249, 1248, 1239, 1251,
+ 1247, 1242, 1243, 1244, 1246, 1247, 1251, 1255, 1256, 1250,
+ 1257, 1253, 1258, 1260, 1253, 0, 1255, 1248, 1250, 1265,
+
+ 1246, 1261, 1249, 1262, 1267, 1262, 1251, 1266, 0, 1270,
+ 1258, 1260, 1273, 1257, 1255, 1256, 1261, 1257, 1269, 1258,
+ 1260, 1265, 1267, 1272, 1271, 1274, 1265, 1270, 1261, 1281,
+ 1262, 1267, 1271, 1266, 1266, 1272, 1270, 1275, 1276, 1273,
+ 1269, 1277, 1284, 1274, 1278, 1269, 1276, 1280, 1275, 1287,
+ 1272, 1271, 1274, 1279, 1279, 1280, 1281, 1282, 1288, 1292,
+ 1277, 1294, 1286, 1285, 1275, 1276, 1278, 1286, 1277, 1284,
+ 1285, 1278, 1290, 1289, 1280, 1291, 1287, 1293, 1299, 1282,
+ 1279, 1289, 1291, 1295, 1282, 1288, 1292, 1290, 1294, 1286,
+ 1285, 1295, 1293, 1297, 1298, 1300, 1301, 1302, 1303, 1290,
+
+ 1289, 1305, 1291, 1307, 1293, 1299, 1297, 1308, 1312, 0,
+ 1295, 1313, 1311, 1318, 1315, 1323, 1298, 0, 1327, 1302,
+ 1297, 1298, 1300, 1301, 1302, 1303, 1319, 1305, 1305, 1308,
+ 1307, 1311, 1325, 1313, 1308, 1312, 1315, 1317, 1313, 1311,
+ 1318, 1315, 1323, 1330, 1317, 1327, 1328, 1331, 1332, 1319,
+ 1334, 1336, 1330, 1319, 1338, 1325, 1339, 1344, 1328, 1325,
+ 1345, 1346, 1352, 1350, 1317, 0, 0, 1345, 1347, 1338,
+ 1330, 0, 0, 1328, 1331, 1332, 1350, 1334, 1336, 1349,
+ 1344, 1338, 1339, 1339, 1344, 1351, 1347, 1345, 1346, 1352,
+ 1350, 1349, 0, 1351, 0, 1347, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 1349, 0, 0, 0,
+ 0, 0, 1351, 1355, 1355, 1355, 1355, 1355, 1355, 1355,
+ 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1357, 1357, 1357,
+ 1357, 1357, 1357, 1357, 1358, 1358, 1358, 1358, 1358, 1358,
+ 1358, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1361, 1361,
+ 0, 1361, 1361, 1361, 1361, 1362, 1362, 0, 0, 0,
+ 1362, 1362, 1363, 1363, 0, 0, 1363, 0, 1363, 1364,
+ 0, 0, 0, 0, 0, 1364, 1365, 1365, 0, 0,
+ 0, 1365, 1365, 1366, 0, 0, 0, 0, 0, 1366,
+ 1367, 1367, 0, 1367, 1367, 1367, 1367, 1368, 1368, 0,
+
+ 1368, 1368, 1368, 1368, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354,
+ 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354
} ;
static yy_state_type yy_last_accepting_state;
@@ -1807,43 +1814,67 @@ void ub_c_error(const char *message);
struct inc_state {
char* filename;
int line;
+ YY_BUFFER_STATE buffer;
+ struct inc_state* next;
};
-static struct inc_state parse_stack[MAXINCLUDES];
-static YY_BUFFER_STATE include_stack[MAXINCLUDES];
-static int config_include_stack_ptr = 0;
+static struct inc_state* config_include_stack = NULL;
+static int inc_depth = 0;
static int inc_prev = 0;
static int num_args = 0;
+void init_cfg_parse(void)
+{
+ config_include_stack = NULL;
+ inc_depth = 0;
+ inc_prev = 0;
+ num_args = 0;
+}
static void config_start_include(const char* filename)
{
FILE *input;
+ struct inc_state* s;
+ char* nm;
+ if(inc_depth++ > 100000) {
+ ub_c_error_msg("too many include files");
+ return;
+ }
if(strlen(filename) == 0) {
ub_c_error_msg("empty include file name");
return;
}
- if(config_include_stack_ptr >= MAXINCLUDES) {
- ub_c_error_msg("includes nested too deeply, skipped (>%d)", MAXINCLUDES);
+ s = (struct inc_state*)malloc(sizeof(*s));
+ if(!s) {
+ ub_c_error_msg("include %s: malloc failure", filename);
return;
}
if(cfg_parser->chroot && strncmp(filename, cfg_parser->chroot,
strlen(cfg_parser->chroot)) == 0) {
filename += strlen(cfg_parser->chroot);
}
+ nm = strdup(filename);
+ if(!nm) {
+ ub_c_error_msg("include %s: strdup failure", filename);
+ free(s);
+ return;
+ }
input = fopen(filename, "r");
if(!input) {
ub_c_error_msg("cannot open include file '%s': %s",
filename, strerror(errno));
+ free(s);
+ free(nm);
return;
}
- LEXOUT(("switch_to_include_file(%s) ", filename));
- parse_stack[config_include_stack_ptr].filename = cfg_parser->filename;
- parse_stack[config_include_stack_ptr].line = cfg_parser->line;
- include_stack[config_include_stack_ptr] = YY_CURRENT_BUFFER;
- cfg_parser->filename = strdup(filename);
+ LEXOUT(("switch_to_include_file(%s)\n", filename));
+ s->filename = cfg_parser->filename;
+ s->line = cfg_parser->line;
+ s->buffer = YY_CURRENT_BUFFER;
+ s->next = config_include_stack;
+ config_include_stack = s;
+ cfg_parser->filename = nm;
cfg_parser->line = 1;
yy_switch_to_buffer(yy_create_buffer(input,YY_BUF_SIZE));
- ++config_include_stack_ptr;
}
static void config_start_include_glob(const char* filename)
@@ -1875,6 +1906,8 @@ static void config_start_include_glob(const char* filename)
if(r) {
/* some error */
globfree(&g);
+ if(r == GLOB_NOMATCH)
+ return; /* no matches for pattern */
config_start_include(filename); /* let original deal with it */
return;
}
@@ -1892,12 +1925,16 @@ static void config_start_include_glob(const char* filename)
static void config_end_include(void)
{
- --config_include_stack_ptr;
+ struct inc_state* s = config_include_stack;
+ --inc_depth;
+ if(!s) return;
free(cfg_parser->filename);
- cfg_parser->filename = parse_stack[config_include_stack_ptr].filename;
- cfg_parser->line = parse_stack[config_include_stack_ptr].line;
+ cfg_parser->filename = s->filename;
+ cfg_parser->line = s->line;
yy_delete_buffer(YY_CURRENT_BUFFER);
- yy_switch_to_buffer(include_stack[config_include_stack_ptr]);
+ yy_switch_to_buffer(s->buffer);
+ config_include_stack = s->next;
+ free(s);
}
#ifndef yy_set_bol /* compat definition, for flex 2.4.6 */
@@ -1910,7 +1947,7 @@ static void config_end_include(void)
#endif
#define YY_NO_INPUT 1
-#line 148 "util/configlexer.lex"
+#line 178 "util/configlexer.lex"
#ifndef YY_NO_UNPUT
#define YY_NO_UNPUT 1
#endif
@@ -1918,7 +1955,7 @@ static void config_end_include(void)
#define YY_NO_INPUT 1
#endif
-#line 1920 "<stdout>"
+#line 1957 "<stdout>"
#define INITIAL 0
#define quotedstring 1
@@ -2103,9 +2140,9 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 168 "util/configlexer.lex"
+#line 198 "util/configlexer.lex"
-#line 2107 "<stdout>"
+#line 2144 "<stdout>"
if ( !(yy_init) )
{
@@ -2164,13 +2201,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 >= 1343 )
+ if ( yy_current_state >= 1355 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 3880 );
+ while ( yy_base[yy_current_state] != 3905 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -2196,648 +2233,653 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 169 "util/configlexer.lex"
+#line 199 "util/configlexer.lex"
{
LEXOUT(("SP ")); /* ignore */ }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 171 "util/configlexer.lex"
+#line 201 "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 174 "util/configlexer.lex"
+#line 204 "util/configlexer.lex"
{ YDVAR(0, VAR_SERVER) }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 175 "util/configlexer.lex"
+#line 205 "util/configlexer.lex"
{ YDVAR(1, VAR_NUM_THREADS) }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 176 "util/configlexer.lex"
+#line 206 "util/configlexer.lex"
{ YDVAR(1, VAR_VERBOSITY) }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 177 "util/configlexer.lex"
+#line 207 "util/configlexer.lex"
{ YDVAR(1, VAR_PORT) }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 178 "util/configlexer.lex"
+#line 208 "util/configlexer.lex"
{ YDVAR(1, VAR_OUTGOING_RANGE) }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 179 "util/configlexer.lex"
+#line 209 "util/configlexer.lex"
{ YDVAR(1, VAR_OUTGOING_PORT_PERMIT) }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 180 "util/configlexer.lex"
+#line 210 "util/configlexer.lex"
{ YDVAR(1, VAR_OUTGOING_PORT_AVOID) }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 181 "util/configlexer.lex"
+#line 211 "util/configlexer.lex"
{ YDVAR(1, VAR_OUTGOING_NUM_TCP) }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 182 "util/configlexer.lex"
+#line 212 "util/configlexer.lex"
{ YDVAR(1, VAR_INCOMING_NUM_TCP) }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 183 "util/configlexer.lex"
+#line 213 "util/configlexer.lex"
{ YDVAR(1, VAR_DO_IP4) }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 184 "util/configlexer.lex"
+#line 214 "util/configlexer.lex"
{ YDVAR(1, VAR_DO_IP6) }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 185 "util/configlexer.lex"
+#line 215 "util/configlexer.lex"
{ YDVAR(1, VAR_DO_UDP) }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 186 "util/configlexer.lex"
+#line 216 "util/configlexer.lex"
{ YDVAR(1, VAR_DO_TCP) }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 187 "util/configlexer.lex"
+#line 217 "util/configlexer.lex"
{ YDVAR(1, VAR_TCP_UPSTREAM) }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 188 "util/configlexer.lex"
+#line 218 "util/configlexer.lex"
{ YDVAR(1, VAR_SSL_UPSTREAM) }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 189 "util/configlexer.lex"
+#line 219 "util/configlexer.lex"
{ YDVAR(1, VAR_SSL_SERVICE_KEY) }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 190 "util/configlexer.lex"
+#line 220 "util/configlexer.lex"
{ YDVAR(1, VAR_SSL_SERVICE_PEM) }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 191 "util/configlexer.lex"
+#line 221 "util/configlexer.lex"
{ YDVAR(1, VAR_SSL_PORT) }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 192 "util/configlexer.lex"
+#line 222 "util/configlexer.lex"
{ YDVAR(1, VAR_DO_DAEMONIZE) }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 193 "util/configlexer.lex"
+#line 223 "util/configlexer.lex"
{ YDVAR(1, VAR_INTERFACE) }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 194 "util/configlexer.lex"
+#line 224 "util/configlexer.lex"
{ YDVAR(1, VAR_OUTGOING_INTERFACE) }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 195 "util/configlexer.lex"
+#line 225 "util/configlexer.lex"
{ YDVAR(1, VAR_INTERFACE_AUTOMATIC) }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 196 "util/configlexer.lex"
+#line 226 "util/configlexer.lex"
{ YDVAR(1, VAR_SO_RCVBUF) }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 197 "util/configlexer.lex"
+#line 227 "util/configlexer.lex"
{ YDVAR(1, VAR_SO_SNDBUF) }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 198 "util/configlexer.lex"
+#line 228 "util/configlexer.lex"
{ YDVAR(1, VAR_CHROOT) }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 199 "util/configlexer.lex"
+#line 229 "util/configlexer.lex"
{ YDVAR(1, VAR_USERNAME) }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 200 "util/configlexer.lex"
+#line 230 "util/configlexer.lex"
{ YDVAR(1, VAR_DIRECTORY) }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 201 "util/configlexer.lex"
+#line 231 "util/configlexer.lex"
{ YDVAR(1, VAR_LOGFILE) }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 202 "util/configlexer.lex"
+#line 232 "util/configlexer.lex"
{ YDVAR(1, VAR_PIDFILE) }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 203 "util/configlexer.lex"
+#line 233 "util/configlexer.lex"
{ YDVAR(1, VAR_ROOT_HINTS) }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 204 "util/configlexer.lex"
+#line 234 "util/configlexer.lex"
{ YDVAR(1, VAR_EDNS_BUFFER_SIZE) }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 205 "util/configlexer.lex"
+#line 235 "util/configlexer.lex"
{ YDVAR(1, VAR_MSG_BUFFER_SIZE) }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 206 "util/configlexer.lex"
+#line 236 "util/configlexer.lex"
{ YDVAR(1, VAR_MSG_CACHE_SIZE) }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 207 "util/configlexer.lex"
+#line 237 "util/configlexer.lex"
{ YDVAR(1, VAR_MSG_CACHE_SLABS) }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 208 "util/configlexer.lex"
+#line 238 "util/configlexer.lex"
{ YDVAR(1, VAR_RRSET_CACHE_SIZE) }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 209 "util/configlexer.lex"
+#line 239 "util/configlexer.lex"
{ YDVAR(1, VAR_RRSET_CACHE_SLABS) }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 210 "util/configlexer.lex"
+#line 240 "util/configlexer.lex"
{ YDVAR(1, VAR_CACHE_MAX_TTL) }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 211 "util/configlexer.lex"
+#line 241 "util/configlexer.lex"
{ YDVAR(1, VAR_CACHE_MIN_TTL) }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 212 "util/configlexer.lex"
+#line 242 "util/configlexer.lex"
{ YDVAR(1, VAR_INFRA_HOST_TTL) }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 213 "util/configlexer.lex"
+#line 243 "util/configlexer.lex"
{ YDVAR(1, VAR_INFRA_LAME_TTL) }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 214 "util/configlexer.lex"
+#line 244 "util/configlexer.lex"
{ YDVAR(1, VAR_INFRA_CACHE_SLABS) }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 215 "util/configlexer.lex"
+#line 245 "util/configlexer.lex"
{ YDVAR(1, VAR_INFRA_CACHE_NUMHOSTS) }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 216 "util/configlexer.lex"
+#line 246 "util/configlexer.lex"
{ YDVAR(1, VAR_INFRA_CACHE_LAME_SIZE) }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 217 "util/configlexer.lex"
+#line 247 "util/configlexer.lex"
{ YDVAR(1, VAR_NUM_QUERIES_PER_THREAD) }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 218 "util/configlexer.lex"
+#line 248 "util/configlexer.lex"
{ YDVAR(1, VAR_JOSTLE_TIMEOUT) }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 219 "util/configlexer.lex"
+#line 249 "util/configlexer.lex"
{ YDVAR(1, VAR_TARGET_FETCH_POLICY) }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 220 "util/configlexer.lex"
+#line 250 "util/configlexer.lex"
{ YDVAR(1, VAR_HARDEN_SHORT_BUFSIZE) }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 221 "util/configlexer.lex"
+#line 251 "util/configlexer.lex"
{ YDVAR(1, VAR_HARDEN_LARGE_QUERIES) }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 222 "util/configlexer.lex"
+#line 252 "util/configlexer.lex"
{ YDVAR(1, VAR_HARDEN_GLUE) }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 223 "util/configlexer.lex"
+#line 253 "util/configlexer.lex"
{ YDVAR(1, VAR_HARDEN_DNSSEC_STRIPPED) }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 224 "util/configlexer.lex"
+#line 254 "util/configlexer.lex"
{ YDVAR(1, VAR_HARDEN_BELOW_NXDOMAIN) }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 225 "util/configlexer.lex"
+#line 255 "util/configlexer.lex"
{ YDVAR(1, VAR_HARDEN_REFERRAL_PATH) }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 226 "util/configlexer.lex"
+#line 256 "util/configlexer.lex"
{ YDVAR(1, VAR_USE_CAPS_FOR_ID) }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 227 "util/configlexer.lex"
+#line 257 "util/configlexer.lex"
{ YDVAR(1, VAR_UNWANTED_REPLY_THRESHOLD) }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 228 "util/configlexer.lex"
+#line 258 "util/configlexer.lex"
{ YDVAR(1, VAR_PRIVATE_ADDRESS) }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 229 "util/configlexer.lex"
+#line 259 "util/configlexer.lex"
{ YDVAR(1, VAR_PRIVATE_DOMAIN) }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 230 "util/configlexer.lex"
+#line 260 "util/configlexer.lex"
{ YDVAR(1, VAR_PREFETCH_KEY) }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 231 "util/configlexer.lex"
+#line 261 "util/configlexer.lex"
{ YDVAR(1, VAR_PREFETCH) }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 232 "util/configlexer.lex"
+#line 262 "util/configlexer.lex"
{ YDVAR(0, VAR_STUB_ZONE) }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 233 "util/configlexer.lex"
+#line 263 "util/configlexer.lex"
{ YDVAR(1, VAR_NAME) }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 234 "util/configlexer.lex"
+#line 264 "util/configlexer.lex"
{ YDVAR(1, VAR_STUB_ADDR) }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 235 "util/configlexer.lex"
+#line 265 "util/configlexer.lex"
{ YDVAR(1, VAR_STUB_HOST) }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 236 "util/configlexer.lex"
+#line 266 "util/configlexer.lex"
{ YDVAR(1, VAR_STUB_PRIME) }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 237 "util/configlexer.lex"
+#line 267 "util/configlexer.lex"
{ YDVAR(1, VAR_STUB_FIRST) }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 238 "util/configlexer.lex"
+#line 268 "util/configlexer.lex"
{ YDVAR(0, VAR_FORWARD_ZONE) }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 239 "util/configlexer.lex"
+#line 269 "util/configlexer.lex"
{ YDVAR(1, VAR_FORWARD_ADDR) }
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 240 "util/configlexer.lex"
+#line 270 "util/configlexer.lex"
{ YDVAR(1, VAR_FORWARD_HOST) }
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 241 "util/configlexer.lex"
+#line 271 "util/configlexer.lex"
{ YDVAR(1, VAR_FORWARD_FIRST) }
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 242 "util/configlexer.lex"
+#line 272 "util/configlexer.lex"
{ YDVAR(1, VAR_DO_NOT_QUERY_ADDRESS) }
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 243 "util/configlexer.lex"
+#line 273 "util/configlexer.lex"
{ YDVAR(1, VAR_DO_NOT_QUERY_LOCALHOST) }
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 244 "util/configlexer.lex"
+#line 274 "util/configlexer.lex"
{ YDVAR(2, VAR_ACCESS_CONTROL) }
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 245 "util/configlexer.lex"
+#line 275 "util/configlexer.lex"
{ YDVAR(1, VAR_HIDE_IDENTITY) }
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 246 "util/configlexer.lex"
+#line 276 "util/configlexer.lex"
{ YDVAR(1, VAR_HIDE_VERSION) }
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 247 "util/configlexer.lex"
+#line 277 "util/configlexer.lex"
{ YDVAR(1, VAR_IDENTITY) }
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 248 "util/configlexer.lex"
+#line 278 "util/configlexer.lex"
{ YDVAR(1, VAR_VERSION) }
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 249 "util/configlexer.lex"
+#line 279 "util/configlexer.lex"
{ YDVAR(1, VAR_MODULE_CONF) }
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 250 "util/configlexer.lex"
+#line 280 "util/configlexer.lex"
{ YDVAR(1, VAR_DLV_ANCHOR) }
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 251 "util/configlexer.lex"
+#line 281 "util/configlexer.lex"
{ YDVAR(1, VAR_DLV_ANCHOR_FILE) }
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 252 "util/configlexer.lex"
+#line 282 "util/configlexer.lex"
{ YDVAR(1, VAR_TRUST_ANCHOR_FILE) }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 253 "util/configlexer.lex"
+#line 283 "util/configlexer.lex"
{ YDVAR(1, VAR_AUTO_TRUST_ANCHOR_FILE) }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 254 "util/configlexer.lex"
+#line 284 "util/configlexer.lex"
{ YDVAR(1, VAR_TRUSTED_KEYS_FILE) }
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 255 "util/configlexer.lex"
+#line 285 "util/configlexer.lex"
{ YDVAR(1, VAR_TRUST_ANCHOR) }
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 256 "util/configlexer.lex"
+#line 286 "util/configlexer.lex"
{ YDVAR(1, VAR_VAL_OVERRIDE_DATE) }
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 257 "util/configlexer.lex"
+#line 287 "util/configlexer.lex"
{ YDVAR(1, VAR_VAL_SIG_SKEW_MIN) }
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 258 "util/configlexer.lex"
+#line 288 "util/configlexer.lex"
{ YDVAR(1, VAR_VAL_SIG_SKEW_MAX) }
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 259 "util/configlexer.lex"
+#line 289 "util/configlexer.lex"
{ YDVAR(1, VAR_BOGUS_TTL) }
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 260 "util/configlexer.lex"
+#line 290 "util/configlexer.lex"
{ YDVAR(1, VAR_VAL_CLEAN_ADDITIONAL) }
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 261 "util/configlexer.lex"
+#line 291 "util/configlexer.lex"
{ YDVAR(1, VAR_VAL_PERMISSIVE_MODE) }
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 262 "util/configlexer.lex"
+#line 292 "util/configlexer.lex"
{ YDVAR(1, VAR_IGNORE_CD_FLAG) }
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 263 "util/configlexer.lex"
+#line 293 "util/configlexer.lex"
{ YDVAR(1, VAR_VAL_LOG_LEVEL) }
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 264 "util/configlexer.lex"
+#line 294 "util/configlexer.lex"
{ YDVAR(1, VAR_KEY_CACHE_SIZE) }
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 265 "util/configlexer.lex"
+#line 295 "util/configlexer.lex"
{ YDVAR(1, VAR_KEY_CACHE_SLABS) }
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 266 "util/configlexer.lex"
+#line 296 "util/configlexer.lex"
{ YDVAR(1, VAR_NEG_CACHE_SIZE) }
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 267 "util/configlexer.lex"
+#line 297 "util/configlexer.lex"
{
YDVAR(1, VAR_VAL_NSEC3_KEYSIZE_ITERATIONS) }
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 269 "util/configlexer.lex"
+#line 299 "util/configlexer.lex"
{ YDVAR(1, VAR_ADD_HOLDDOWN) }
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 270 "util/configlexer.lex"
+#line 300 "util/configlexer.lex"
{ YDVAR(1, VAR_DEL_HOLDDOWN) }
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 271 "util/configlexer.lex"
+#line 301 "util/configlexer.lex"
{ YDVAR(1, VAR_KEEP_MISSING) }
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 272 "util/configlexer.lex"
+#line 302 "util/configlexer.lex"
{ YDVAR(1, VAR_USE_SYSLOG) }
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 273 "util/configlexer.lex"
+#line 303 "util/configlexer.lex"
{ YDVAR(1, VAR_LOG_TIME_ASCII) }
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 274 "util/configlexer.lex"
+#line 304 "util/configlexer.lex"
{ YDVAR(1, VAR_LOG_QUERIES) }
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 275 "util/configlexer.lex"
+#line 305 "util/configlexer.lex"
{ YDVAR(2, VAR_LOCAL_ZONE) }
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 276 "util/configlexer.lex"
+#line 306 "util/configlexer.lex"
{ YDVAR(1, VAR_LOCAL_DATA) }
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 277 "util/configlexer.lex"
+#line 307 "util/configlexer.lex"
{ YDVAR(1, VAR_LOCAL_DATA_PTR) }
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 278 "util/configlexer.lex"
+#line 308 "util/configlexer.lex"
{ YDVAR(1, VAR_STATISTICS_INTERVAL) }
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 279 "util/configlexer.lex"
+#line 309 "util/configlexer.lex"
{ YDVAR(1, VAR_STATISTICS_CUMULATIVE) }
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 280 "util/configlexer.lex"
+#line 310 "util/configlexer.lex"
{ YDVAR(1, VAR_EXTENDED_STATISTICS) }
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 281 "util/configlexer.lex"
+#line 311 "util/configlexer.lex"
{ YDVAR(0, VAR_REMOTE_CONTROL) }
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 282 "util/configlexer.lex"
+#line 312 "util/configlexer.lex"
{ YDVAR(1, VAR_CONTROL_ENABLE) }
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 283 "util/configlexer.lex"
+#line 313 "util/configlexer.lex"
{ YDVAR(1, VAR_CONTROL_INTERFACE) }
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 284 "util/configlexer.lex"
+#line 314 "util/configlexer.lex"
{ YDVAR(1, VAR_CONTROL_PORT) }
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 285 "util/configlexer.lex"
+#line 315 "util/configlexer.lex"
{ YDVAR(1, VAR_SERVER_KEY_FILE) }
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 286 "util/configlexer.lex"
+#line 316 "util/configlexer.lex"
{ YDVAR(1, VAR_SERVER_CERT_FILE) }
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 287 "util/configlexer.lex"
+#line 317 "util/configlexer.lex"
{ YDVAR(1, VAR_CONTROL_KEY_FILE) }
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 288 "util/configlexer.lex"
+#line 318 "util/configlexer.lex"
{ YDVAR(1, VAR_CONTROL_CERT_FILE) }
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 289 "util/configlexer.lex"
+#line 319 "util/configlexer.lex"
{ YDVAR(1, VAR_PYTHON_SCRIPT) }
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 290 "util/configlexer.lex"
+#line 320 "util/configlexer.lex"
{ YDVAR(0, VAR_PYTHON) }
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 291 "util/configlexer.lex"
+#line 321 "util/configlexer.lex"
{ YDVAR(1, VAR_DOMAIN_INSECURE) }
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 292 "util/configlexer.lex"
+#line 322 "util/configlexer.lex"
{ YDVAR(1, VAR_MINIMAL_RESPONSES) }
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 293 "util/configlexer.lex"
+#line 323 "util/configlexer.lex"
{ YDVAR(1, VAR_RRSET_ROUNDROBIN) }
YY_BREAK
case 122:
-/* rule 122 can match eol */
YY_RULE_SETUP
-#line 294 "util/configlexer.lex"
+#line 324 "util/configlexer.lex"
+{ YDVAR(1, VAR_MAX_UDP_SIZE) }
+ YY_BREAK
+case 123:
+/* rule 123 can match eol */
+YY_RULE_SETUP
+#line 325 "util/configlexer.lex"
{ LEXOUT(("NL\n")); cfg_parser->line++; }
YY_BREAK
/* Quoted strings. Strip leading and ending quotes */
-case 123:
+case 124:
YY_RULE_SETUP
-#line 297 "util/configlexer.lex"
+#line 328 "util/configlexer.lex"
{ BEGIN(quotedstring); LEXOUT(("QS ")); }
YY_BREAK
case YY_STATE_EOF(quotedstring):
-#line 298 "util/configlexer.lex"
+#line 329 "util/configlexer.lex"
{
yyerror("EOF inside quoted string");
if(--num_args == 0) { BEGIN(INITIAL); }
else { BEGIN(val); }
}
YY_BREAK
-case 124:
+case 125:
YY_RULE_SETUP
-#line 303 "util/configlexer.lex"
+#line 334 "util/configlexer.lex"
{ LEXOUT(("STR(%s) ", yytext)); yymore(); }
YY_BREAK
-case 125:
-/* rule 125 can match eol */
+case 126:
+/* rule 126 can match eol */
YY_RULE_SETUP
-#line 304 "util/configlexer.lex"
+#line 335 "util/configlexer.lex"
{ yyerror("newline inside quoted string, no end \"");
cfg_parser->line++; BEGIN(INITIAL); }
YY_BREAK
-case 126:
+case 127:
YY_RULE_SETUP
-#line 306 "util/configlexer.lex"
+#line 337 "util/configlexer.lex"
{
LEXOUT(("QE "));
if(--num_args == 0) { BEGIN(INITIAL); }
@@ -2850,34 +2892,34 @@ YY_RULE_SETUP
}
YY_BREAK
/* Single Quoted strings. Strip leading and ending quotes */
-case 127:
+case 128:
YY_RULE_SETUP
-#line 318 "util/configlexer.lex"
+#line 349 "util/configlexer.lex"
{ BEGIN(singlequotedstr); LEXOUT(("SQS ")); }
YY_BREAK
case YY_STATE_EOF(singlequotedstr):
-#line 319 "util/configlexer.lex"
+#line 350 "util/configlexer.lex"
{
yyerror("EOF inside quoted string");
if(--num_args == 0) { BEGIN(INITIAL); }
else { BEGIN(val); }
}
YY_BREAK
-case 128:
+case 129:
YY_RULE_SETUP
-#line 324 "util/configlexer.lex"
+#line 355 "util/configlexer.lex"
{ LEXOUT(("STR(%s) ", yytext)); yymore(); }
YY_BREAK
-case 129:
-/* rule 129 can match eol */
+case 130:
+/* rule 130 can match eol */
YY_RULE_SETUP
-#line 325 "util/configlexer.lex"
+#line 356 "util/configlexer.lex"
{ yyerror("newline inside quoted string, no end '");
cfg_parser->line++; BEGIN(INITIAL); }
YY_BREAK
-case 130:
+case 131:
YY_RULE_SETUP
-#line 327 "util/configlexer.lex"
+#line 358 "util/configlexer.lex"
{
LEXOUT(("SQE "));
if(--num_args == 0) { BEGIN(INITIAL); }
@@ -2890,38 +2932,38 @@ YY_RULE_SETUP
}
YY_BREAK
/* include: directive */
-case 131:
+case 132:
YY_RULE_SETUP
-#line 339 "util/configlexer.lex"
+#line 370 "util/configlexer.lex"
{
LEXOUT(("v(%s) ", yytext)); inc_prev = YYSTATE; BEGIN(include); }
YY_BREAK
case YY_STATE_EOF(include):
-#line 341 "util/configlexer.lex"
+#line 372 "util/configlexer.lex"
{
yyerror("EOF inside include directive");
BEGIN(inc_prev);
}
YY_BREAK
-case 132:
+case 133:
YY_RULE_SETUP
-#line 345 "util/configlexer.lex"
+#line 376 "util/configlexer.lex"
{ LEXOUT(("ISP ")); /* ignore */ }
YY_BREAK
-case 133:
-/* rule 133 can match eol */
+case 134:
+/* rule 134 can match eol */
YY_RULE_SETUP
-#line 346 "util/configlexer.lex"
+#line 377 "util/configlexer.lex"
{ LEXOUT(("NL\n")); cfg_parser->line++;}
YY_BREAK
-case 134:
+case 135:
YY_RULE_SETUP
-#line 347 "util/configlexer.lex"
+#line 378 "util/configlexer.lex"
{ LEXOUT(("IQS ")); BEGIN(include_quoted); }
YY_BREAK
-case 135:
+case 136:
YY_RULE_SETUP
-#line 348 "util/configlexer.lex"
+#line 379 "util/configlexer.lex"
{
LEXOUT(("Iunquotedstr(%s) ", yytext));
config_start_include_glob(yytext);
@@ -2929,27 +2971,27 @@ YY_RULE_SETUP
}
YY_BREAK
case YY_STATE_EOF(include_quoted):
-#line 353 "util/configlexer.lex"
+#line 384 "util/configlexer.lex"
{
yyerror("EOF inside quoted string");
BEGIN(inc_prev);
}
YY_BREAK
-case 136:
+case 137:
YY_RULE_SETUP
-#line 357 "util/configlexer.lex"
+#line 388 "util/configlexer.lex"
{ LEXOUT(("ISTR(%s) ", yytext)); yymore(); }
YY_BREAK
-case 137:
-/* rule 137 can match eol */
+case 138:
+/* rule 138 can match eol */
YY_RULE_SETUP
-#line 358 "util/configlexer.lex"
+#line 389 "util/configlexer.lex"
{ yyerror("newline before \" in include name");
cfg_parser->line++; BEGIN(inc_prev); }
YY_BREAK
-case 138:
+case 139:
YY_RULE_SETUP
-#line 360 "util/configlexer.lex"
+#line 391 "util/configlexer.lex"
{
LEXOUT(("IQE "));
yytext[yyleng - 1] = '\0';
@@ -2959,10 +3001,11 @@ YY_RULE_SETUP
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(val):
-#line 366 "util/configlexer.lex"
+#line 397 "util/configlexer.lex"
{
+ LEXOUT(("LEXEOF "));
yy_set_bol(1); /* Set beginning of line, so "^" rules match. */
- if (config_include_stack_ptr == 0) {
+ if (!config_include_stack) {
yyterminate();
} else {
fclose(yyin);
@@ -2970,33 +3013,33 @@ case YY_STATE_EOF(val):
}
}
YY_BREAK
-case 139:
+case 140:
YY_RULE_SETUP
-#line 376 "util/configlexer.lex"
+#line 408 "util/configlexer.lex"
{ LEXOUT(("unquotedstr(%s) ", yytext));
if(--num_args == 0) { BEGIN(INITIAL); }
yylval.str = strdup(yytext); return STRING_ARG; }
YY_BREAK
-case 140:
+case 141:
YY_RULE_SETUP
-#line 380 "util/configlexer.lex"
+#line 412 "util/configlexer.lex"
{
ub_c_error_msg("unknown keyword '%s'", yytext);
}
YY_BREAK
-case 141:
+case 142:
YY_RULE_SETUP
-#line 384 "util/configlexer.lex"
+#line 416 "util/configlexer.lex"
{
ub_c_error_msg("stray '%s'", yytext);
}
YY_BREAK
-case 142:
+case 143:
YY_RULE_SETUP
-#line 388 "util/configlexer.lex"
+#line 420 "util/configlexer.lex"
ECHO;
YY_BREAK
-#line 2998 "<stdout>"
+#line 3041 "<stdout>"
case YY_END_OF_BUFFER:
{
@@ -3286,7 +3329,7 @@ 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 >= 1343 )
+ if ( yy_current_state >= 1355 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -3314,11 +3357,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 >= 1343 )
+ if ( yy_current_state >= 1355 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 1342);
+ yy_is_jam = (yy_current_state == 1354);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -3951,7 +3994,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 388 "util/configlexer.lex"
+#line 420 "util/configlexer.lex"
diff --git a/util/configlexer.lex b/util/configlexer.lex
index 4694cdd821e7..d3b081342011 100644
--- a/util/configlexer.lex
+++ b/util/configlexer.lex
@@ -39,43 +39,67 @@ void ub_c_error(const char *message);
struct inc_state {
char* filename;
int line;
+ YY_BUFFER_STATE buffer;
+ struct inc_state* next;
};
-static struct inc_state parse_stack[MAXINCLUDES];
-static YY_BUFFER_STATE include_stack[MAXINCLUDES];
-static int config_include_stack_ptr = 0;
+static struct inc_state* config_include_stack = NULL;
+static int inc_depth = 0;
static int inc_prev = 0;
static int num_args = 0;
+void init_cfg_parse(void)
+{
+ config_include_stack = NULL;
+ inc_depth = 0;
+ inc_prev = 0;
+ num_args = 0;
+}
static void config_start_include(const char* filename)
{
FILE *input;
+ struct inc_state* s;
+ char* nm;
+ if(inc_depth++ > 100000) {
+ ub_c_error_msg("too many include files");
+ return;
+ }
if(strlen(filename) == 0) {
ub_c_error_msg("empty include file name");
return;
}
- if(config_include_stack_ptr >= MAXINCLUDES) {
- ub_c_error_msg("includes nested too deeply, skipped (>%d)", MAXINCLUDES);
+ s = (struct inc_state*)malloc(sizeof(*s));
+ if(!s) {
+ ub_c_error_msg("include %s: malloc failure", filename);
return;
}
if(cfg_parser->chroot && strncmp(filename, cfg_parser->chroot,
strlen(cfg_parser->chroot)) == 0) {
filename += strlen(cfg_parser->chroot);
}
+ nm = strdup(filename);
+ if(!nm) {
+ ub_c_error_msg("include %s: strdup failure", filename);
+ free(s);
+ return;
+ }
input = fopen(filename, "r");
if(!input) {
ub_c_error_msg("cannot open include file '%s': %s",
filename, strerror(errno));
+ free(s);
+ free(nm);
return;
}
- LEXOUT(("switch_to_include_file(%s) ", filename));
- parse_stack[config_include_stack_ptr].filename = cfg_parser->filename;
- parse_stack[config_include_stack_ptr].line = cfg_parser->line;
- include_stack[config_include_stack_ptr] = YY_CURRENT_BUFFER;
- cfg_parser->filename = strdup(filename);
+ LEXOUT(("switch_to_include_file(%s)\n", filename));
+ s->filename = cfg_parser->filename;
+ s->line = cfg_parser->line;
+ s->buffer = YY_CURRENT_BUFFER;
+ s->next = config_include_stack;
+ config_include_stack = s;
+ cfg_parser->filename = nm;
cfg_parser->line = 1;
yy_switch_to_buffer(yy_create_buffer(input, YY_BUF_SIZE));
- ++config_include_stack_ptr;
}
static void config_start_include_glob(const char* filename)
@@ -107,6 +131,8 @@ static void config_start_include_glob(const char* filename)
if(r) {
/* some error */
globfree(&g);
+ if(r == GLOB_NOMATCH)
+ return; /* no matches for pattern */
config_start_include(filename); /* let original deal with it */
return;
}
@@ -124,12 +150,16 @@ static void config_start_include_glob(const char* filename)
static void config_end_include(void)
{
- --config_include_stack_ptr;
+ struct inc_state* s = config_include_stack;
+ --inc_depth;
+ if(!s) return;
free(cfg_parser->filename);
- cfg_parser->filename = parse_stack[config_include_stack_ptr].filename;
- cfg_parser->line = parse_stack[config_include_stack_ptr].line;
+ cfg_parser->filename = s->filename;
+ cfg_parser->line = s->line;
yy_delete_buffer(YY_CURRENT_BUFFER);
- yy_switch_to_buffer(include_stack[config_include_stack_ptr]);
+ yy_switch_to_buffer(s->buffer);
+ config_include_stack = s->next;
+ free(s);
}
#ifndef yy_set_bol /* compat definition, for flex 2.4.6 */
@@ -291,6 +321,7 @@ python{COLON} { YDVAR(0, VAR_PYTHON) }
domain-insecure{COLON} { YDVAR(1, VAR_DOMAIN_INSECURE) }
minimal-responses{COLON} { YDVAR(1, VAR_MINIMAL_RESPONSES) }
rrset-roundrobin{COLON} { YDVAR(1, VAR_RRSET_ROUNDROBIN) }
+max-udp-size{COLON} { YDVAR(1, VAR_MAX_UDP_SIZE) }
<INITIAL,val>{NEWLINE} { LEXOUT(("NL\n")); cfg_parser->line++; }
/* Quoted strings. Strip leading and ending quotes */
@@ -364,8 +395,9 @@ rrset-roundrobin{COLON} { YDVAR(1, VAR_RRSET_ROUNDROBIN) }
BEGIN(inc_prev);
}
<INITIAL,val><<EOF>> {
+ LEXOUT(("LEXEOF "));
yy_set_bol(1); /* Set beginning of line, so "^" rules match. */
- if (config_include_stack_ptr == 0) {
+ if (!config_include_stack) {
yyterminate();
} else {
fclose(yyin);
diff --git a/util/configparser.c b/util/configparser.c
index 70de0ccb3e31..f5d04f216efe 100644
--- a/util/configparser.c
+++ b/util/configparser.c
@@ -253,7 +253,8 @@ extern int yydebug;
VAR_FORWARD_FIRST = 381,
VAR_STUB_FIRST = 382,
VAR_MINIMAL_RESPONSES = 383,
- VAR_RRSET_ROUNDROBIN = 384
+ VAR_RRSET_ROUNDROBIN = 384,
+ VAR_MAX_UDP_SIZE = 385
};
#endif
/* Tokens. */
@@ -384,6 +385,7 @@ extern int yydebug;
#define VAR_STUB_FIRST 382
#define VAR_MINIMAL_RESPONSES 383
#define VAR_RRSET_ROUNDROBIN 384
+#define VAR_MAX_UDP_SIZE 385
@@ -397,7 +399,7 @@ typedef union YYSTYPE
/* Line 350 of yacc.c */
-#line 401 "util/configparser.c"
+#line 403 "util/configparser.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -425,7 +427,7 @@ int yyparse ();
/* Copy the second part of user declarations. */
/* Line 353 of yacc.c */
-#line 429 "util/configparser.c"
+#line 431 "util/configparser.c"
#ifdef short
# undef short
@@ -645,20 +647,20 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 237
+#define YYLAST 239
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 130
+#define YYNTOKENS 131
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 133
+#define YYNNTS 134
/* YYNRULES -- Number of rules. */
-#define YYNRULES 253
+#define YYNRULES 255
/* YYNRULES -- Number of states. */
-#define YYNSTATES 371
+#define YYNSTATES 374
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 384
+#define YYMAXUTOK 385
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -704,7 +706,7 @@ static const yytype_uint8 yytranslate[] =
95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
- 125, 126, 127, 128, 129
+ 125, 126, 127, 128, 129, 130
};
#if YYDEBUG
@@ -723,120 +725,121 @@ static const yytype_uint16 yyprhs[] =
164, 166, 168, 170, 172, 174, 176, 178, 180, 182,
184, 186, 188, 190, 192, 194, 196, 198, 200, 202,
204, 206, 208, 210, 212, 214, 216, 218, 220, 222,
- 224, 226, 229, 230, 232, 234, 236, 238, 240, 242,
- 245, 246, 248, 250, 252, 254, 257, 260, 263, 266,
- 269, 272, 275, 278, 281, 284, 287, 290, 293, 296,
- 299, 302, 305, 308, 311, 314, 317, 320, 323, 326,
- 329, 332, 335, 338, 341, 344, 347, 350, 353, 356,
- 359, 362, 365, 368, 371, 374, 377, 380, 383, 386,
- 389, 392, 395, 398, 401, 404, 407, 410, 413, 416,
- 419, 422, 425, 428, 431, 434, 437, 440, 443, 446,
- 449, 452, 455, 458, 461, 464, 467, 470, 473, 476,
- 480, 483, 486, 489, 492, 495, 498, 501, 504, 507,
- 510, 513, 516, 519, 522, 525, 528, 531, 534, 538,
- 541, 544, 547, 550, 553, 556, 559, 562, 565, 568,
- 571, 574, 577, 579, 582, 583, 585, 587, 589, 591,
- 593, 595, 597, 600, 603, 606, 609, 612, 615, 618,
- 620, 623, 624, 626
+ 224, 226, 228, 231, 232, 234, 236, 238, 240, 242,
+ 244, 247, 248, 250, 252, 254, 256, 259, 262, 265,
+ 268, 271, 274, 277, 280, 283, 286, 289, 292, 295,
+ 298, 301, 304, 307, 310, 313, 316, 319, 322, 325,
+ 328, 331, 334, 337, 340, 343, 346, 349, 352, 355,
+ 358, 361, 364, 367, 370, 373, 376, 379, 382, 385,
+ 388, 391, 394, 397, 400, 403, 406, 409, 412, 415,
+ 418, 421, 424, 427, 430, 433, 436, 439, 442, 445,
+ 448, 451, 454, 457, 460, 463, 466, 469, 472, 475,
+ 478, 482, 485, 488, 491, 494, 497, 500, 503, 506,
+ 509, 512, 515, 518, 521, 524, 527, 530, 533, 536,
+ 540, 543, 546, 549, 552, 555, 558, 561, 564, 567,
+ 570, 573, 576, 579, 582, 584, 587, 588, 590, 592,
+ 594, 596, 598, 600, 602, 605, 608, 611, 614, 617,
+ 620, 623, 625, 628, 629, 631
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
- 131, 0, -1, -1, 131, 132, -1, 133, 134, -1,
- 136, 137, -1, 139, 140, -1, 259, 260, -1, 249,
- 250, -1, 11, -1, 134, 135, -1, -1, 142, -1,
- 143, -1, 147, -1, 150, -1, 156, -1, 157, -1,
- 158, -1, 159, -1, 148, -1, 169, -1, 170, -1,
- 171, -1, 172, -1, 173, -1, 190, -1, 191, -1,
- 192, -1, 194, -1, 195, -1, 153, -1, 196, -1,
- 197, -1, 200, -1, 198, -1, 199, -1, 201, -1,
- 202, -1, 203, -1, 214, -1, 182, -1, 183, -1,
- 184, -1, 185, -1, 204, -1, 217, -1, 178, -1,
- 180, -1, 218, -1, 223, -1, 224, -1, 225, -1,
- 154, -1, 189, -1, 232, -1, 233, -1, 179, -1,
- 228, -1, 166, -1, 149, -1, 174, -1, 215, -1,
- 221, -1, 205, -1, 216, -1, 235, -1, 236, -1,
- 155, -1, 144, -1, 165, -1, 208, -1, 145, -1,
- 151, -1, 152, -1, 175, -1, 176, -1, 234, -1,
- 207, -1, 209, -1, 210, -1, 146, -1, 237, -1,
- 193, -1, 213, -1, 167, -1, 181, -1, 219, -1,
- 220, -1, 222, -1, 227, -1, 177, -1, 229, -1,
- 230, -1, 231, -1, 186, -1, 188, -1, 211, -1,
- 212, -1, 187, -1, 206, -1, 226, -1, 168, -1,
- 160, -1, 161, -1, 162, -1, 163, -1, 164, -1,
- 238, -1, 239, -1, 38, -1, 137, 138, -1, -1,
- 240, -1, 241, -1, 242, -1, 244, -1, 243, -1,
- 44, -1, 140, 141, -1, -1, 245, -1, 246, -1,
- 247, -1, 248, -1, 13, 10, -1, 12, 10, -1,
- 76, 10, -1, 79, 10, -1, 96, 10, -1, 14,
- 10, -1, 16, 10, -1, 67, 10, -1, 15, 10,
- -1, 80, 10, -1, 81, 10, -1, 31, 10, -1,
- 60, 10, -1, 75, 10, -1, 17, 10, -1, 18,
- 10, -1, 19, 10, -1, 20, 10, -1, 121, 10,
- -1, 122, 10, -1, 123, 10, -1, 124, 10, -1,
- 125, 10, -1, 77, 10, -1, 66, 10, -1, 101,
- 10, -1, 120, 10, -1, 21, 10, -1, 22, 10,
- -1, 23, 10, -1, 24, 10, -1, 25, 10, -1,
- 68, 10, -1, 82, 10, -1, 83, 10, -1, 109,
- 10, -1, 54, 10, -1, 64, 10, -1, 55, 10,
- -1, 102, 10, -1, 48, 10, -1, 49, 10, -1,
- 50, 10, -1, 51, 10, -1, 113, 10, -1, 117,
- 10, -1, 114, 10, -1, 61, 10, -1, 26, 10,
- -1, 27, 10, -1, 28, 10, -1, 98, 10, -1,
- 29, 10, -1, 30, 10, -1, 32, 10, -1, 33,
- 10, -1, 35, 10, -1, 36, 10, -1, 34, 10,
- -1, 41, 10, -1, 42, 10, -1, 43, 10, -1,
- 52, 10, -1, 71, 10, -1, 118, 10, -1, 85,
- 10, -1, 78, 10, -1, 86, 10, -1, 87, 10,
- -1, 115, 10, -1, 116, 10, -1, 100, 10, -1,
- 47, 10, -1, 69, 10, -1, 72, 10, 10, -1,
- 53, 10, -1, 56, 10, -1, 105, 10, -1, 106,
- 10, -1, 70, 10, -1, 107, 10, -1, 57, 10,
- -1, 58, 10, -1, 59, 10, -1, 119, 10, -1,
- 108, 10, -1, 65, 10, -1, 111, 10, -1, 112,
- 10, -1, 110, 10, -1, 62, 10, -1, 63, 10,
- -1, 84, 10, -1, 73, 10, 10, -1, 74, 10,
- -1, 97, 10, -1, 128, 10, -1, 129, 10, -1,
- 37, 10, -1, 39, 10, -1, 40, 10, -1, 127,
- 10, -1, 99, 10, -1, 37, 10, -1, 45, 10,
- -1, 46, 10, -1, 126, 10, -1, 88, -1, 250,
- 251, -1, -1, 252, -1, 254, -1, 253, -1, 255,
- -1, 256, -1, 257, -1, 258, -1, 89, 10, -1,
- 91, 10, -1, 90, 10, -1, 92, 10, -1, 93,
- 10, -1, 94, 10, -1, 95, 10, -1, 103, -1,
- 260, 261, -1, -1, 262, -1, 104, 10, -1
+ 132, 0, -1, -1, 132, 133, -1, 134, 135, -1,
+ 137, 138, -1, 140, 141, -1, 261, 262, -1, 251,
+ 252, -1, 11, -1, 135, 136, -1, -1, 143, -1,
+ 144, -1, 148, -1, 151, -1, 157, -1, 158, -1,
+ 159, -1, 160, -1, 149, -1, 170, -1, 171, -1,
+ 172, -1, 173, -1, 174, -1, 191, -1, 192, -1,
+ 193, -1, 195, -1, 196, -1, 154, -1, 197, -1,
+ 198, -1, 201, -1, 199, -1, 200, -1, 202, -1,
+ 203, -1, 204, -1, 215, -1, 183, -1, 184, -1,
+ 185, -1, 186, -1, 205, -1, 218, -1, 179, -1,
+ 181, -1, 219, -1, 224, -1, 225, -1, 226, -1,
+ 155, -1, 190, -1, 233, -1, 234, -1, 180, -1,
+ 229, -1, 167, -1, 150, -1, 175, -1, 216, -1,
+ 222, -1, 206, -1, 217, -1, 236, -1, 237, -1,
+ 156, -1, 145, -1, 166, -1, 209, -1, 146, -1,
+ 152, -1, 153, -1, 176, -1, 177, -1, 235, -1,
+ 208, -1, 210, -1, 211, -1, 147, -1, 238, -1,
+ 194, -1, 214, -1, 168, -1, 182, -1, 220, -1,
+ 221, -1, 223, -1, 228, -1, 178, -1, 230, -1,
+ 231, -1, 232, -1, 187, -1, 189, -1, 212, -1,
+ 213, -1, 188, -1, 207, -1, 227, -1, 169, -1,
+ 161, -1, 162, -1, 163, -1, 164, -1, 165, -1,
+ 239, -1, 240, -1, 241, -1, 38, -1, 138, 139,
+ -1, -1, 242, -1, 243, -1, 244, -1, 246, -1,
+ 245, -1, 44, -1, 141, 142, -1, -1, 247, -1,
+ 248, -1, 249, -1, 250, -1, 13, 10, -1, 12,
+ 10, -1, 76, 10, -1, 79, 10, -1, 96, 10,
+ -1, 14, 10, -1, 16, 10, -1, 67, 10, -1,
+ 15, 10, -1, 80, 10, -1, 81, 10, -1, 31,
+ 10, -1, 60, 10, -1, 75, 10, -1, 17, 10,
+ -1, 18, 10, -1, 19, 10, -1, 20, 10, -1,
+ 121, 10, -1, 122, 10, -1, 123, 10, -1, 124,
+ 10, -1, 125, 10, -1, 77, 10, -1, 66, 10,
+ -1, 101, 10, -1, 120, 10, -1, 21, 10, -1,
+ 22, 10, -1, 23, 10, -1, 24, 10, -1, 25,
+ 10, -1, 68, 10, -1, 82, 10, -1, 83, 10,
+ -1, 109, 10, -1, 54, 10, -1, 64, 10, -1,
+ 55, 10, -1, 102, 10, -1, 48, 10, -1, 49,
+ 10, -1, 50, 10, -1, 51, 10, -1, 113, 10,
+ -1, 117, 10, -1, 114, 10, -1, 61, 10, -1,
+ 26, 10, -1, 27, 10, -1, 28, 10, -1, 98,
+ 10, -1, 29, 10, -1, 30, 10, -1, 32, 10,
+ -1, 33, 10, -1, 35, 10, -1, 36, 10, -1,
+ 34, 10, -1, 41, 10, -1, 42, 10, -1, 43,
+ 10, -1, 52, 10, -1, 71, 10, -1, 118, 10,
+ -1, 85, 10, -1, 78, 10, -1, 86, 10, -1,
+ 87, 10, -1, 115, 10, -1, 116, 10, -1, 100,
+ 10, -1, 47, 10, -1, 69, 10, -1, 72, 10,
+ 10, -1, 53, 10, -1, 56, 10, -1, 105, 10,
+ -1, 106, 10, -1, 70, 10, -1, 107, 10, -1,
+ 57, 10, -1, 58, 10, -1, 59, 10, -1, 119,
+ 10, -1, 108, 10, -1, 65, 10, -1, 111, 10,
+ -1, 112, 10, -1, 110, 10, -1, 62, 10, -1,
+ 63, 10, -1, 84, 10, -1, 73, 10, 10, -1,
+ 74, 10, -1, 97, 10, -1, 128, 10, -1, 129,
+ 10, -1, 130, 10, -1, 37, 10, -1, 39, 10,
+ -1, 40, 10, -1, 127, 10, -1, 99, 10, -1,
+ 37, 10, -1, 45, 10, -1, 46, 10, -1, 126,
+ 10, -1, 88, -1, 252, 253, -1, -1, 254, -1,
+ 256, -1, 255, -1, 257, -1, 258, -1, 259, -1,
+ 260, -1, 89, 10, -1, 91, 10, -1, 90, 10,
+ -1, 92, 10, -1, 93, 10, -1, 94, 10, -1,
+ 95, 10, -1, 103, -1, 262, 263, -1, -1, 264,
+ -1, 104, 10, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 110, 110, 110, 111, 111, 112, 112, 113, 117,
- 122, 123, 124, 124, 124, 125, 125, 126, 126, 126,
- 127, 127, 127, 128, 128, 128, 129, 129, 130, 130,
- 131, 131, 132, 132, 133, 133, 134, 134, 135, 135,
- 136, 136, 137, 137, 137, 138, 138, 138, 139, 139,
- 139, 140, 140, 141, 141, 142, 142, 143, 143, 144,
- 144, 144, 145, 145, 146, 146, 147, 147, 147, 148,
- 148, 149, 149, 150, 150, 151, 151, 151, 152, 152,
- 153, 153, 154, 154, 155, 155, 156, 156, 157, 157,
- 157, 158, 158, 159, 159, 159, 160, 160, 160, 161,
- 161, 161, 162, 162, 162, 163, 163, 163, 164, 164,
- 166, 178, 179, 180, 180, 180, 180, 180, 182, 194,
- 195, 196, 196, 196, 196, 198, 207, 216, 227, 236,
- 245, 254, 267, 282, 291, 300, 309, 318, 327, 336,
- 345, 354, 363, 372, 381, 390, 397, 404, 413, 422,
- 436, 445, 454, 461, 468, 475, 483, 490, 497, 504,
- 511, 519, 527, 535, 542, 549, 558, 567, 574, 581,
- 589, 597, 610, 621, 629, 642, 651, 660, 668, 681,
- 690, 698, 707, 715, 728, 735, 745, 755, 765, 775,
- 785, 795, 805, 812, 819, 828, 837, 846, 853, 863,
- 877, 884, 902, 915, 928, 937, 946, 955, 965, 975,
- 984, 993, 1000, 1009, 1018, 1027, 1035, 1048, 1056, 1078,
- 1085, 1100, 1110, 1120, 1130, 1137, 1144, 1153, 1163, 1173,
- 1180, 1187, 1196, 1201, 1202, 1203, 1203, 1203, 1204, 1204,
- 1204, 1205, 1207, 1217, 1226, 1233, 1240, 1247, 1254, 1261,
- 1266, 1267, 1268, 1270
+ 0, 111, 111, 111, 112, 112, 113, 113, 114, 118,
+ 123, 124, 125, 125, 125, 126, 126, 127, 127, 127,
+ 128, 128, 128, 129, 129, 129, 130, 130, 131, 131,
+ 132, 132, 133, 133, 134, 134, 135, 135, 136, 136,
+ 137, 137, 138, 138, 138, 139, 139, 139, 140, 140,
+ 140, 141, 141, 142, 142, 143, 143, 144, 144, 145,
+ 145, 145, 146, 146, 147, 147, 148, 148, 148, 149,
+ 149, 150, 150, 151, 151, 152, 152, 152, 153, 153,
+ 154, 154, 155, 155, 156, 156, 157, 157, 158, 158,
+ 158, 159, 159, 160, 160, 160, 161, 161, 161, 162,
+ 162, 162, 163, 163, 163, 164, 164, 164, 165, 165,
+ 165, 167, 179, 180, 181, 181, 181, 181, 181, 183,
+ 195, 196, 197, 197, 197, 197, 199, 208, 217, 228,
+ 237, 246, 255, 268, 283, 292, 301, 310, 319, 328,
+ 337, 346, 355, 364, 373, 382, 391, 398, 405, 414,
+ 423, 437, 446, 455, 462, 469, 476, 484, 491, 498,
+ 505, 512, 520, 528, 536, 543, 550, 559, 568, 575,
+ 582, 590, 598, 611, 622, 630, 643, 652, 661, 669,
+ 682, 691, 699, 708, 716, 729, 736, 746, 756, 766,
+ 776, 786, 796, 806, 813, 820, 829, 838, 847, 854,
+ 864, 878, 885, 903, 916, 929, 938, 947, 956, 966,
+ 976, 985, 994, 1001, 1010, 1019, 1028, 1036, 1049, 1057,
+ 1079, 1086, 1101, 1111, 1121, 1128, 1138, 1145, 1152, 1161,
+ 1171, 1181, 1188, 1195, 1204, 1209, 1210, 1211, 1211, 1211,
+ 1212, 1212, 1212, 1213, 1215, 1225, 1234, 1241, 1248, 1255,
+ 1262, 1269, 1274, 1275, 1276, 1278
};
#endif
@@ -886,17 +889,17 @@ static const char *const yytname[] =
"VAR_LOG_QUERIES", "VAR_TCP_UPSTREAM", "VAR_SSL_UPSTREAM",
"VAR_SSL_SERVICE_KEY", "VAR_SSL_SERVICE_PEM", "VAR_SSL_PORT",
"VAR_FORWARD_FIRST", "VAR_STUB_FIRST", "VAR_MINIMAL_RESPONSES",
- "VAR_RRSET_ROUNDROBIN", "$accept", "toplevelvars", "toplevelvar",
- "serverstart", "contents_server", "content_server", "stubstart",
- "contents_stub", "content_stub", "forwardstart", "contents_forward",
- "content_forward", "server_num_threads", "server_verbosity",
- "server_statistics_interval", "server_statistics_cumulative",
- "server_extended_statistics", "server_port", "server_interface",
- "server_outgoing_interface", "server_outgoing_range",
- "server_outgoing_port_permit", "server_outgoing_port_avoid",
- "server_outgoing_num_tcp", "server_incoming_num_tcp",
- "server_interface_automatic", "server_do_ip4", "server_do_ip6",
- "server_do_udp", "server_do_tcp", "server_tcp_upstream",
+ "VAR_RRSET_ROUNDROBIN", "VAR_MAX_UDP_SIZE", "$accept", "toplevelvars",
+ "toplevelvar", "serverstart", "contents_server", "content_server",
+ "stubstart", "contents_stub", "content_stub", "forwardstart",
+ "contents_forward", "content_forward", "server_num_threads",
+ "server_verbosity", "server_statistics_interval",
+ "server_statistics_cumulative", "server_extended_statistics",
+ "server_port", "server_interface", "server_outgoing_interface",
+ "server_outgoing_range", "server_outgoing_port_permit",
+ "server_outgoing_port_avoid", "server_outgoing_num_tcp",
+ "server_incoming_num_tcp", "server_interface_automatic", "server_do_ip4",
+ "server_do_ip6", "server_do_udp", "server_do_tcp", "server_tcp_upstream",
"server_ssl_upstream", "server_ssl_service_key",
"server_ssl_service_pem", "server_ssl_port", "server_do_daemonize",
"server_use_syslog", "server_log_time_ascii", "server_log_queries",
@@ -930,13 +933,13 @@ static const char *const yytname[] =
"server_del_holddown", "server_keep_missing", "server_key_cache_size",
"server_key_cache_slabs", "server_neg_cache_size", "server_local_zone",
"server_local_data", "server_local_data_ptr", "server_minimal_responses",
- "server_rrset_roundrobin", "stub_name", "stub_host", "stub_addr",
- "stub_first", "stub_prime", "forward_name", "forward_host",
- "forward_addr", "forward_first", "rcstart", "contents_rc", "content_rc",
- "rc_control_enable", "rc_control_port", "rc_control_interface",
- "rc_server_key_file", "rc_server_cert_file", "rc_control_key_file",
- "rc_control_cert_file", "pythonstart", "contents_py", "content_py",
- "py_script", YY_NULL
+ "server_rrset_roundrobin", "server_max_udp_size", "stub_name",
+ "stub_host", "stub_addr", "stub_first", "stub_prime", "forward_name",
+ "forward_host", "forward_addr", "forward_first", "rcstart",
+ "contents_rc", "content_rc", "rc_control_enable", "rc_control_port",
+ "rc_control_interface", "rc_server_key_file", "rc_server_cert_file",
+ "rc_control_key_file", "rc_control_cert_file", "pythonstart",
+ "contents_py", "content_py", "py_script", YY_NULL
};
#endif
@@ -957,26 +960,27 @@ static const yytype_uint16 yytoknum[] =
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
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 130, 131, 131, 132, 132, 132, 132, 132, 133,
- 134, 134, 135, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
- 136, 137, 137, 138, 138, 138, 138, 138, 139, 140,
- 140, 141, 141, 141, 141, 142, 143, 144, 145, 146,
+ 0, 131, 132, 132, 133, 133, 133, 133, 133, 134,
+ 135, 135, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 137, 138, 138, 139, 139, 139, 139, 139, 140,
+ 141, 141, 142, 142, 142, 142, 143, 144, 145, 146,
147, 148, 149, 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,
@@ -987,9 +991,9 @@ static const yytype_uint16 yyr1[] =
217, 218, 219, 220, 221, 222, 223, 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, 250, 251, 251, 251, 251, 251,
- 251, 251, 252, 253, 254, 255, 256, 257, 258, 259,
- 260, 260, 261, 262
+ 247, 248, 249, 250, 251, 252, 252, 253, 253, 253,
+ 253, 253, 253, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 262, 263, 264
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -1006,21 +1010,21 @@ 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, 2, 0, 1, 1, 1, 1, 1, 1, 2,
- 0, 1, 1, 1, 1, 2, 2, 2, 2, 2,
+ 1, 1, 2, 0, 1, 1, 1, 1, 1, 1,
+ 2, 0, 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, 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, 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, 3, 2,
+ 3, 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,
- 2, 2, 1, 2, 0, 1, 1, 1, 1, 1,
- 1, 1, 2, 2, 2, 2, 2, 2, 2, 1,
- 2, 0, 1, 2
+ 2, 2, 2, 2, 1, 2, 0, 1, 1, 1,
+ 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
+ 2, 1, 2, 0, 1, 2
};
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
@@ -1028,8 +1032,8 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 2, 0, 1, 9, 110, 118, 232, 249, 3, 11,
- 112, 120, 234, 251, 4, 5, 6, 8, 7, 0,
+ 2, 0, 1, 9, 111, 119, 234, 251, 3, 11,
+ 113, 121, 236, 253, 4, 5, 6, 8, 7, 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,
@@ -1039,52 +1043,52 @@ static const yytype_uint8 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, 0, 0, 0, 0, 10, 12, 13,
- 69, 72, 81, 14, 20, 60, 15, 73, 74, 31,
- 53, 68, 16, 17, 18, 19, 103, 104, 105, 106,
- 107, 70, 59, 85, 102, 21, 22, 23, 24, 25,
- 61, 75, 76, 91, 47, 57, 48, 86, 41, 42,
- 43, 44, 95, 99, 96, 54, 26, 27, 28, 83,
- 29, 30, 32, 33, 35, 36, 34, 37, 38, 39,
- 45, 64, 100, 78, 71, 79, 80, 97, 98, 84,
- 40, 62, 65, 46, 49, 87, 88, 63, 89, 50,
- 51, 52, 101, 90, 58, 92, 93, 94, 55, 56,
- 77, 66, 67, 82, 108, 109, 0, 0, 0, 0,
- 0, 111, 113, 114, 115, 117, 116, 0, 0, 0,
- 0, 119, 121, 122, 123, 124, 0, 0, 0, 0,
- 0, 0, 0, 233, 235, 237, 236, 238, 239, 240,
- 241, 0, 250, 252, 126, 125, 130, 133, 131, 139,
- 140, 141, 142, 152, 153, 154, 155, 156, 173, 174,
- 175, 177, 178, 136, 179, 180, 183, 181, 182, 184,
- 185, 186, 197, 165, 166, 167, 168, 187, 200, 161,
- 163, 201, 206, 207, 208, 137, 172, 215, 216, 162,
- 211, 149, 132, 157, 198, 204, 188, 0, 0, 219,
- 138, 127, 148, 191, 128, 134, 135, 158, 159, 217,
- 190, 192, 193, 129, 220, 176, 196, 150, 164, 202,
- 203, 205, 210, 160, 214, 212, 213, 169, 171, 194,
- 195, 170, 189, 209, 151, 143, 144, 145, 146, 147,
- 221, 222, 223, 224, 225, 227, 226, 228, 229, 230,
- 231, 242, 244, 243, 245, 246, 247, 248, 253, 199,
- 218
+ 0, 0, 0, 0, 0, 0, 0, 0, 10, 12,
+ 13, 69, 72, 81, 14, 20, 60, 15, 73, 74,
+ 31, 53, 68, 16, 17, 18, 19, 103, 104, 105,
+ 106, 107, 70, 59, 85, 102, 21, 22, 23, 24,
+ 25, 61, 75, 76, 91, 47, 57, 48, 86, 41,
+ 42, 43, 44, 95, 99, 96, 54, 26, 27, 28,
+ 83, 29, 30, 32, 33, 35, 36, 34, 37, 38,
+ 39, 45, 64, 100, 78, 71, 79, 80, 97, 98,
+ 84, 40, 62, 65, 46, 49, 87, 88, 63, 89,
+ 50, 51, 52, 101, 90, 58, 92, 93, 94, 55,
+ 56, 77, 66, 67, 82, 108, 109, 110, 0, 0,
+ 0, 0, 0, 112, 114, 115, 116, 118, 117, 0,
+ 0, 0, 0, 120, 122, 123, 124, 125, 0, 0,
+ 0, 0, 0, 0, 0, 235, 237, 239, 238, 240,
+ 241, 242, 243, 0, 252, 254, 127, 126, 131, 134,
+ 132, 140, 141, 142, 143, 153, 154, 155, 156, 157,
+ 174, 175, 176, 178, 179, 137, 180, 181, 184, 182,
+ 183, 185, 186, 187, 198, 166, 167, 168, 169, 188,
+ 201, 162, 164, 202, 207, 208, 209, 138, 173, 216,
+ 217, 163, 212, 150, 133, 158, 199, 205, 189, 0,
+ 0, 220, 139, 128, 149, 192, 129, 135, 136, 159,
+ 160, 218, 191, 193, 194, 130, 221, 177, 197, 151,
+ 165, 203, 204, 206, 211, 161, 215, 213, 214, 170,
+ 172, 195, 196, 171, 190, 210, 152, 144, 145, 146,
+ 147, 148, 222, 223, 224, 225, 226, 227, 229, 228,
+ 230, 231, 232, 233, 244, 246, 245, 247, 248, 249,
+ 250, 255, 200, 219
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 1, 8, 9, 14, 117, 10, 15, 221, 11,
- 16, 231, 118, 119, 120, 121, 122, 123, 124, 125,
- 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
- 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
- 146, 147, 148, 149, 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, 188, 189, 190, 191, 192, 193, 194, 195,
- 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
- 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
- 222, 223, 224, 225, 226, 232, 233, 234, 235, 12,
- 17, 243, 244, 245, 246, 247, 248, 249, 250, 13,
- 18, 252, 253
+ -1, 1, 8, 9, 14, 118, 10, 15, 223, 11,
+ 16, 233, 119, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 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, 188, 189, 190, 191, 192, 193, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 217, 224, 225, 226, 227, 228, 234, 235, 236, 237,
+ 12, 17, 245, 246, 247, 248, 249, 250, 251, 252,
+ 13, 18, 254, 255
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
@@ -1094,17 +1098,16 @@ static const yytype_int16 yypact[] =
{
-80, 76, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -12, 40, 46, 32, -79, 16,
- 17, 18, 22, 23, 24, 68, 71, 72, 105, 108,
- 109, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 130, 131, 132, 133, 134, 135, 136, 137,
- 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
- 148, 149, 150, 151, 152, 153, 155, 156, 158, 159,
- 160, 161, 163, 164, 165, 166, 167, 168, 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,
- 202, 203, 204, 205, 206, 207, 208, -80, -80, -80,
- -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ 17, 18, 22, 23, 24, 68, 71, 72, 105, 109,
+ 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+ 128, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
+ 149, 150, 151, 152, 153, 155, 156, 158, 159, 160,
+ 161, 163, 164, 165, 166, 167, 168, 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, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
@@ -1113,23 +1116,24 @@ static const yytype_int16 yypact[] =
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
- -80, -80, -80, -80, -80, -80, 209, 210, 211, 212,
- 213, -80, -80, -80, -80, -80, -80, 214, 215, 216,
- 217, -80, -80, -80, -80, -80, 218, 219, 220, 221,
- 222, 223, 224, -80, -80, -80, -80, -80, -80, -80,
- -80, 225, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, 211, 212,
+ 213, 214, 215, -80, -80, -80, -80, -80, -80, 216,
+ 217, 218, 219, -80, -80, -80, -80, -80, 220, 221,
+ 222, 223, 224, 225, 226, -80, -80, -80, -80, -80,
+ -80, -80, -80, 227, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
- -80, -80, -80, -80, -80, -80, -80, 226, 227, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, 228,
+ 229, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
- -80
+ -80, -80, -80, -80
};
/* YYPGOTO[NTERM-NUM]. */
@@ -1148,7 +1152,7 @@ static const yytype_int8 yypgoto[] =
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
-80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
- -80, -80, -80
+ -80, -80, -80, -80
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -1159,28 +1163,28 @@ static const yytype_uint16 yytable[] =
{
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 251, 254, 255, 256, 44,
- 45, 46, 257, 258, 259, 47, 48, 49, 50, 51,
+ 39, 40, 41, 42, 43, 253, 256, 257, 258, 44,
+ 45, 46, 259, 260, 261, 47, 48, 49, 50, 51,
52, 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, 2, 216, 260, 217,
- 218, 261, 262, 227, 88, 89, 90, 3, 91, 92,
- 93, 228, 229, 94, 95, 96, 97, 98, 99, 100,
+ 82, 83, 84, 85, 86, 87, 2, 218, 262, 219,
+ 220, 263, 264, 229, 88, 89, 90, 3, 91, 92,
+ 93, 230, 231, 94, 95, 96, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
- 111, 112, 113, 114, 4, 263, 115, 116, 264, 265,
- 5, 236, 237, 238, 239, 240, 241, 242, 266, 267,
- 268, 269, 270, 271, 272, 273, 274, 275, 276, 219,
- 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
- 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
- 297, 298, 299, 300, 6, 301, 302, 220, 303, 304,
- 305, 306, 230, 307, 308, 309, 310, 311, 312, 7,
- 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
+ 111, 112, 113, 114, 4, 265, 115, 116, 117, 266,
+ 5, 238, 239, 240, 241, 242, 243, 244, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 221,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 6, 302, 303, 222, 304, 305,
+ 306, 307, 232, 308, 309, 310, 311, 312, 313, 7,
+ 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
};
#define yypact_value_is_default(yystate) \
@@ -1202,7 +1206,7 @@ static const yytype_uint8 yycheck[] =
40, 10, 10, 37, 96, 97, 98, 11, 100, 101,
102, 45, 46, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
- 122, 123, 124, 125, 38, 10, 128, 129, 10, 10,
+ 122, 123, 124, 125, 38, 10, 128, 129, 130, 10,
44, 89, 90, 91, 92, 93, 94, 95, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 99,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
@@ -1214,15 +1218,15 @@ static const yytype_uint8 yycheck[] =
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, 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, 131, 0, 11, 38, 44, 88, 103, 132, 133,
- 136, 139, 249, 259, 134, 137, 140, 250, 260, 12,
+ 0, 132, 0, 11, 38, 44, 88, 103, 133, 134,
+ 137, 140, 251, 261, 135, 138, 141, 252, 262, 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, 41, 42, 43, 47, 48, 49,
@@ -1232,7 +1236,7 @@ static const yytype_uint16 yystos[] =
80, 81, 82, 83, 84, 85, 86, 87, 96, 97,
98, 100, 101, 102, 105, 106, 107, 108, 109, 110,
111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
- 121, 122, 123, 124, 125, 128, 129, 135, 142, 143,
+ 121, 122, 123, 124, 125, 128, 129, 130, 136, 143,
144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
@@ -1242,11 +1246,11 @@ static const yytype_uint16 yystos[] =
204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
- 234, 235, 236, 237, 238, 239, 37, 39, 40, 99,
- 127, 138, 240, 241, 242, 243, 244, 37, 45, 46,
- 126, 141, 245, 246, 247, 248, 89, 90, 91, 92,
- 93, 94, 95, 251, 252, 253, 254, 255, 256, 257,
- 258, 104, 261, 262, 10, 10, 10, 10, 10, 10,
+ 234, 235, 236, 237, 238, 239, 240, 241, 37, 39,
+ 40, 99, 127, 139, 242, 243, 244, 245, 246, 37,
+ 45, 46, 126, 142, 247, 248, 249, 250, 89, 90,
+ 91, 92, 93, 94, 95, 253, 254, 255, 256, 257,
+ 258, 259, 260, 104, 263, 264, 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,
@@ -1258,7 +1262,7 @@ static const yytype_uint16 yystos[] =
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, 10
};
#define yyerrok (yyerrstatus = 0)
@@ -2083,15 +2087,15 @@ yyreduce:
{
case 9:
/* Line 1787 of yacc.c */
-#line 118 "util/configparser.y"
+#line 119 "util/configparser.y"
{
OUTYY(("\nP(server:)\n"));
}
break;
- case 110:
+ case 111:
/* Line 1787 of yacc.c */
-#line 167 "util/configparser.y"
+#line 168 "util/configparser.y"
{
struct config_stub* s;
OUTYY(("\nP(stub_zone:)\n"));
@@ -2104,9 +2108,9 @@ yyreduce:
}
break;
- case 118:
+ case 119:
/* Line 1787 of yacc.c */
-#line 183 "util/configparser.y"
+#line 184 "util/configparser.y"
{
struct config_stub* s;
OUTYY(("\nP(forward_zone:)\n"));
@@ -2119,9 +2123,9 @@ yyreduce:
}
break;
- case 125:
+ case 126:
/* Line 1787 of yacc.c */
-#line 199 "util/configparser.y"
+#line 200 "util/configparser.y"
{
OUTYY(("P(server_num_threads:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -2131,9 +2135,9 @@ yyreduce:
}
break;
- case 126:
+ case 127:
/* Line 1787 of yacc.c */
-#line 208 "util/configparser.y"
+#line 209 "util/configparser.y"
{
OUTYY(("P(server_verbosity:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -2143,9 +2147,9 @@ yyreduce:
}
break;
- case 127:
+ case 128:
/* Line 1787 of yacc.c */
-#line 217 "util/configparser.y"
+#line 218 "util/configparser.y"
{
OUTYY(("P(server_statistics_interval:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "") == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0)
@@ -2157,9 +2161,9 @@ yyreduce:
}
break;
- case 128:
+ case 129:
/* Line 1787 of yacc.c */
-#line 228 "util/configparser.y"
+#line 229 "util/configparser.y"
{
OUTYY(("P(server_statistics_cumulative:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2169,9 +2173,9 @@ yyreduce:
}
break;
- case 129:
+ case 130:
/* Line 1787 of yacc.c */
-#line 237 "util/configparser.y"
+#line 238 "util/configparser.y"
{
OUTYY(("P(server_extended_statistics:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2181,9 +2185,9 @@ yyreduce:
}
break;
- case 130:
+ case 131:
/* Line 1787 of yacc.c */
-#line 246 "util/configparser.y"
+#line 247 "util/configparser.y"
{
OUTYY(("P(server_port:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
@@ -2193,9 +2197,9 @@ yyreduce:
}
break;
- case 131:
+ case 132:
/* Line 1787 of yacc.c */
-#line 255 "util/configparser.y"
+#line 256 "util/configparser.y"
{
OUTYY(("P(server_interface:%s)\n", (yyvsp[(2) - (2)].str)));
if(cfg_parser->cfg->num_ifs == 0)
@@ -2209,9 +2213,9 @@ yyreduce:
}
break;
- case 132:
+ case 133:
/* Line 1787 of yacc.c */
-#line 268 "util/configparser.y"
+#line 269 "util/configparser.y"
{
OUTYY(("P(server_outgoing_interface:%s)\n", (yyvsp[(2) - (2)].str)));
if(cfg_parser->cfg->num_out_ifs == 0)
@@ -2227,9 +2231,9 @@ yyreduce:
}
break;
- case 133:
+ case 134:
/* Line 1787 of yacc.c */
-#line 283 "util/configparser.y"
+#line 284 "util/configparser.y"
{
OUTYY(("P(server_outgoing_range:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
@@ -2239,9 +2243,9 @@ yyreduce:
}
break;
- case 134:
+ case 135:
/* Line 1787 of yacc.c */
-#line 292 "util/configparser.y"
+#line 293 "util/configparser.y"
{
OUTYY(("P(server_outgoing_port_permit:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_mark_ports((yyvsp[(2) - (2)].str), 1,
@@ -2251,9 +2255,9 @@ yyreduce:
}
break;
- case 135:
+ case 136:
/* Line 1787 of yacc.c */
-#line 301 "util/configparser.y"
+#line 302 "util/configparser.y"
{
OUTYY(("P(server_outgoing_port_avoid:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_mark_ports((yyvsp[(2) - (2)].str), 0,
@@ -2263,9 +2267,9 @@ yyreduce:
}
break;
- case 136:
+ case 137:
/* Line 1787 of yacc.c */
-#line 310 "util/configparser.y"
+#line 311 "util/configparser.y"
{
OUTYY(("P(server_outgoing_num_tcp:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -2275,9 +2279,9 @@ yyreduce:
}
break;
- case 137:
+ case 138:
/* Line 1787 of yacc.c */
-#line 319 "util/configparser.y"
+#line 320 "util/configparser.y"
{
OUTYY(("P(server_incoming_num_tcp:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -2287,9 +2291,9 @@ yyreduce:
}
break;
- case 138:
+ case 139:
/* Line 1787 of yacc.c */
-#line 328 "util/configparser.y"
+#line 329 "util/configparser.y"
{
OUTYY(("P(server_interface_automatic:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2299,9 +2303,9 @@ yyreduce:
}
break;
- case 139:
+ case 140:
/* Line 1787 of yacc.c */
-#line 337 "util/configparser.y"
+#line 338 "util/configparser.y"
{
OUTYY(("P(server_do_ip4:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2311,9 +2315,9 @@ yyreduce:
}
break;
- case 140:
+ case 141:
/* Line 1787 of yacc.c */
-#line 346 "util/configparser.y"
+#line 347 "util/configparser.y"
{
OUTYY(("P(server_do_ip6:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2323,9 +2327,9 @@ yyreduce:
}
break;
- case 141:
+ case 142:
/* Line 1787 of yacc.c */
-#line 355 "util/configparser.y"
+#line 356 "util/configparser.y"
{
OUTYY(("P(server_do_udp:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2335,9 +2339,9 @@ yyreduce:
}
break;
- case 142:
+ case 143:
/* Line 1787 of yacc.c */
-#line 364 "util/configparser.y"
+#line 365 "util/configparser.y"
{
OUTYY(("P(server_do_tcp:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2347,9 +2351,9 @@ yyreduce:
}
break;
- case 143:
+ case 144:
/* Line 1787 of yacc.c */
-#line 373 "util/configparser.y"
+#line 374 "util/configparser.y"
{
OUTYY(("P(server_tcp_upstream:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2359,9 +2363,9 @@ yyreduce:
}
break;
- case 144:
+ case 145:
/* Line 1787 of yacc.c */
-#line 382 "util/configparser.y"
+#line 383 "util/configparser.y"
{
OUTYY(("P(server_ssl_upstream:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2371,9 +2375,9 @@ yyreduce:
}
break;
- case 145:
+ case 146:
/* Line 1787 of yacc.c */
-#line 391 "util/configparser.y"
+#line 392 "util/configparser.y"
{
OUTYY(("P(server_ssl_service_key:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->ssl_service_key);
@@ -2381,9 +2385,9 @@ yyreduce:
}
break;
- case 146:
+ case 147:
/* Line 1787 of yacc.c */
-#line 398 "util/configparser.y"
+#line 399 "util/configparser.y"
{
OUTYY(("P(server_ssl_service_pem:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->ssl_service_pem);
@@ -2391,9 +2395,9 @@ yyreduce:
}
break;
- case 147:
+ case 148:
/* Line 1787 of yacc.c */
-#line 405 "util/configparser.y"
+#line 406 "util/configparser.y"
{
OUTYY(("P(server_ssl_port:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
@@ -2403,9 +2407,9 @@ yyreduce:
}
break;
- case 148:
+ case 149:
/* Line 1787 of yacc.c */
-#line 414 "util/configparser.y"
+#line 415 "util/configparser.y"
{
OUTYY(("P(server_do_daemonize:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2415,9 +2419,9 @@ yyreduce:
}
break;
- case 149:
+ case 150:
/* Line 1787 of yacc.c */
-#line 423 "util/configparser.y"
+#line 424 "util/configparser.y"
{
OUTYY(("P(server_use_syslog:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2432,9 +2436,9 @@ yyreduce:
}
break;
- case 150:
+ case 151:
/* Line 1787 of yacc.c */
-#line 437 "util/configparser.y"
+#line 438 "util/configparser.y"
{
OUTYY(("P(server_log_time_ascii:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2444,9 +2448,9 @@ yyreduce:
}
break;
- case 151:
+ case 152:
/* Line 1787 of yacc.c */
-#line 446 "util/configparser.y"
+#line 447 "util/configparser.y"
{
OUTYY(("P(server_log_queries:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2456,9 +2460,9 @@ yyreduce:
}
break;
- case 152:
+ case 153:
/* Line 1787 of yacc.c */
-#line 455 "util/configparser.y"
+#line 456 "util/configparser.y"
{
OUTYY(("P(server_chroot:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->chrootdir);
@@ -2466,9 +2470,9 @@ yyreduce:
}
break;
- case 153:
+ case 154:
/* Line 1787 of yacc.c */
-#line 462 "util/configparser.y"
+#line 463 "util/configparser.y"
{
OUTYY(("P(server_username:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->username);
@@ -2476,9 +2480,9 @@ yyreduce:
}
break;
- case 154:
+ case 155:
/* Line 1787 of yacc.c */
-#line 469 "util/configparser.y"
+#line 470 "util/configparser.y"
{
OUTYY(("P(server_directory:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->directory);
@@ -2486,9 +2490,9 @@ yyreduce:
}
break;
- case 155:
+ case 156:
/* Line 1787 of yacc.c */
-#line 476 "util/configparser.y"
+#line 477 "util/configparser.y"
{
OUTYY(("P(server_logfile:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->logfile);
@@ -2497,9 +2501,9 @@ yyreduce:
}
break;
- case 156:
+ case 157:
/* Line 1787 of yacc.c */
-#line 484 "util/configparser.y"
+#line 485 "util/configparser.y"
{
OUTYY(("P(server_pidfile:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->pidfile);
@@ -2507,9 +2511,9 @@ yyreduce:
}
break;
- case 157:
+ case 158:
/* Line 1787 of yacc.c */
-#line 491 "util/configparser.y"
+#line 492 "util/configparser.y"
{
OUTYY(("P(server_root_hints:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->root_hints, (yyvsp[(2) - (2)].str)))
@@ -2517,9 +2521,9 @@ yyreduce:
}
break;
- case 158:
+ case 159:
/* Line 1787 of yacc.c */
-#line 498 "util/configparser.y"
+#line 499 "util/configparser.y"
{
OUTYY(("P(server_dlv_anchor_file:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->dlv_anchor_file);
@@ -2527,9 +2531,9 @@ yyreduce:
}
break;
- case 159:
+ case 160:
/* Line 1787 of yacc.c */
-#line 505 "util/configparser.y"
+#line 506 "util/configparser.y"
{
OUTYY(("P(server_dlv_anchor:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->dlv_anchor_list, (yyvsp[(2) - (2)].str)))
@@ -2537,9 +2541,9 @@ yyreduce:
}
break;
- case 160:
+ case 161:
/* Line 1787 of yacc.c */
-#line 512 "util/configparser.y"
+#line 513 "util/configparser.y"
{
OUTYY(("P(server_auto_trust_anchor_file:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->
@@ -2548,9 +2552,9 @@ yyreduce:
}
break;
- case 161:
+ case 162:
/* Line 1787 of yacc.c */
-#line 520 "util/configparser.y"
+#line 521 "util/configparser.y"
{
OUTYY(("P(server_trust_anchor_file:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->
@@ -2559,9 +2563,9 @@ yyreduce:
}
break;
- case 162:
+ case 163:
/* Line 1787 of yacc.c */
-#line 528 "util/configparser.y"
+#line 529 "util/configparser.y"
{
OUTYY(("P(server_trusted_keys_file:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->
@@ -2570,9 +2574,9 @@ yyreduce:
}
break;
- case 163:
+ case 164:
/* Line 1787 of yacc.c */
-#line 536 "util/configparser.y"
+#line 537 "util/configparser.y"
{
OUTYY(("P(server_trust_anchor:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->trust_anchor_list, (yyvsp[(2) - (2)].str)))
@@ -2580,9 +2584,9 @@ yyreduce:
}
break;
- case 164:
+ case 165:
/* Line 1787 of yacc.c */
-#line 543 "util/configparser.y"
+#line 544 "util/configparser.y"
{
OUTYY(("P(server_domain_insecure:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->domain_insecure, (yyvsp[(2) - (2)].str)))
@@ -2590,9 +2594,9 @@ yyreduce:
}
break;
- case 165:
+ case 166:
/* Line 1787 of yacc.c */
-#line 550 "util/configparser.y"
+#line 551 "util/configparser.y"
{
OUTYY(("P(server_hide_identity:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2602,9 +2606,9 @@ yyreduce:
}
break;
- case 166:
+ case 167:
/* Line 1787 of yacc.c */
-#line 559 "util/configparser.y"
+#line 560 "util/configparser.y"
{
OUTYY(("P(server_hide_version:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2614,9 +2618,9 @@ yyreduce:
}
break;
- case 167:
+ case 168:
/* Line 1787 of yacc.c */
-#line 568 "util/configparser.y"
+#line 569 "util/configparser.y"
{
OUTYY(("P(server_identity:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->identity);
@@ -2624,9 +2628,9 @@ yyreduce:
}
break;
- case 168:
+ case 169:
/* Line 1787 of yacc.c */
-#line 575 "util/configparser.y"
+#line 576 "util/configparser.y"
{
OUTYY(("P(server_version:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->version);
@@ -2634,9 +2638,9 @@ yyreduce:
}
break;
- case 169:
+ case 170:
/* Line 1787 of yacc.c */
-#line 582 "util/configparser.y"
+#line 583 "util/configparser.y"
{
OUTYY(("P(server_so_rcvbuf:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->so_rcvbuf))
@@ -2645,9 +2649,9 @@ yyreduce:
}
break;
- case 170:
+ case 171:
/* Line 1787 of yacc.c */
-#line 590 "util/configparser.y"
+#line 591 "util/configparser.y"
{
OUTYY(("P(server_so_sndbuf:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->so_sndbuf))
@@ -2656,9 +2660,9 @@ yyreduce:
}
break;
- case 171:
+ case 172:
/* Line 1787 of yacc.c */
-#line 598 "util/configparser.y"
+#line 599 "util/configparser.y"
{
OUTYY(("P(server_edns_buffer_size:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
@@ -2672,9 +2676,9 @@ yyreduce:
}
break;
- case 172:
+ case 173:
/* Line 1787 of yacc.c */
-#line 611 "util/configparser.y"
+#line 612 "util/configparser.y"
{
OUTYY(("P(server_msg_buffer_size:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
@@ -2686,9 +2690,9 @@ yyreduce:
}
break;
- case 173:
+ case 174:
/* Line 1787 of yacc.c */
-#line 622 "util/configparser.y"
+#line 623 "util/configparser.y"
{
OUTYY(("P(server_msg_cache_size:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->msg_cache_size))
@@ -2697,9 +2701,9 @@ yyreduce:
}
break;
- case 174:
+ case 175:
/* Line 1787 of yacc.c */
-#line 630 "util/configparser.y"
+#line 631 "util/configparser.y"
{
OUTYY(("P(server_msg_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
@@ -2713,9 +2717,9 @@ yyreduce:
}
break;
- case 175:
+ case 176:
/* Line 1787 of yacc.c */
-#line 643 "util/configparser.y"
+#line 644 "util/configparser.y"
{
OUTYY(("P(server_num_queries_per_thread:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
@@ -2725,9 +2729,9 @@ yyreduce:
}
break;
- case 176:
+ case 177:
/* Line 1787 of yacc.c */
-#line 652 "util/configparser.y"
+#line 653 "util/configparser.y"
{
OUTYY(("P(server_jostle_timeout:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -2737,9 +2741,9 @@ yyreduce:
}
break;
- case 177:
+ case 178:
/* Line 1787 of yacc.c */
-#line 661 "util/configparser.y"
+#line 662 "util/configparser.y"
{
OUTYY(("P(server_rrset_cache_size:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->rrset_cache_size))
@@ -2748,9 +2752,9 @@ yyreduce:
}
break;
- case 178:
+ case 179:
/* Line 1787 of yacc.c */
-#line 669 "util/configparser.y"
+#line 670 "util/configparser.y"
{
OUTYY(("P(server_rrset_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
@@ -2764,9 +2768,9 @@ yyreduce:
}
break;
- case 179:
+ case 180:
/* Line 1787 of yacc.c */
-#line 682 "util/configparser.y"
+#line 683 "util/configparser.y"
{
OUTYY(("P(server_infra_host_ttl:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -2776,9 +2780,9 @@ yyreduce:
}
break;
- case 180:
+ case 181:
/* Line 1787 of yacc.c */
-#line 691 "util/configparser.y"
+#line 692 "util/configparser.y"
{
OUTYY(("P(server_infra_lame_ttl:%s)\n", (yyvsp[(2) - (2)].str)));
verbose(VERB_DETAIL, "ignored infra-lame-ttl: %s (option "
@@ -2787,9 +2791,9 @@ yyreduce:
}
break;
- case 181:
+ case 182:
/* Line 1787 of yacc.c */
-#line 699 "util/configparser.y"
+#line 700 "util/configparser.y"
{
OUTYY(("P(server_infra_cache_numhosts:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
@@ -2799,9 +2803,9 @@ yyreduce:
}
break;
- case 182:
+ case 183:
/* Line 1787 of yacc.c */
-#line 708 "util/configparser.y"
+#line 709 "util/configparser.y"
{
OUTYY(("P(server_infra_cache_lame_size:%s)\n", (yyvsp[(2) - (2)].str)));
verbose(VERB_DETAIL, "ignored infra-cache-lame-size: %s "
@@ -2810,9 +2814,9 @@ yyreduce:
}
break;
- case 183:
+ case 184:
/* Line 1787 of yacc.c */
-#line 716 "util/configparser.y"
+#line 717 "util/configparser.y"
{
OUTYY(("P(server_infra_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
@@ -2826,9 +2830,9 @@ yyreduce:
}
break;
- case 184:
+ case 185:
/* Line 1787 of yacc.c */
-#line 729 "util/configparser.y"
+#line 730 "util/configparser.y"
{
OUTYY(("P(server_target_fetch_policy:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->target_fetch_policy);
@@ -2836,9 +2840,9 @@ yyreduce:
}
break;
- case 185:
+ case 186:
/* Line 1787 of yacc.c */
-#line 736 "util/configparser.y"
+#line 737 "util/configparser.y"
{
OUTYY(("P(server_harden_short_bufsize:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2849,9 +2853,9 @@ yyreduce:
}
break;
- case 186:
+ case 187:
/* Line 1787 of yacc.c */
-#line 746 "util/configparser.y"
+#line 747 "util/configparser.y"
{
OUTYY(("P(server_harden_large_queries:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2862,9 +2866,9 @@ yyreduce:
}
break;
- case 187:
+ case 188:
/* Line 1787 of yacc.c */
-#line 756 "util/configparser.y"
+#line 757 "util/configparser.y"
{
OUTYY(("P(server_harden_glue:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2875,9 +2879,9 @@ yyreduce:
}
break;
- case 188:
+ case 189:
/* Line 1787 of yacc.c */
-#line 766 "util/configparser.y"
+#line 767 "util/configparser.y"
{
OUTYY(("P(server_harden_dnssec_stripped:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2888,9 +2892,9 @@ yyreduce:
}
break;
- case 189:
+ case 190:
/* Line 1787 of yacc.c */
-#line 776 "util/configparser.y"
+#line 777 "util/configparser.y"
{
OUTYY(("P(server_harden_below_nxdomain:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2901,9 +2905,9 @@ yyreduce:
}
break;
- case 190:
+ case 191:
/* Line 1787 of yacc.c */
-#line 786 "util/configparser.y"
+#line 787 "util/configparser.y"
{
OUTYY(("P(server_harden_referral_path:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2914,9 +2918,9 @@ yyreduce:
}
break;
- case 191:
+ case 192:
/* Line 1787 of yacc.c */
-#line 796 "util/configparser.y"
+#line 797 "util/configparser.y"
{
OUTYY(("P(server_use_caps_for_id:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2927,9 +2931,9 @@ yyreduce:
}
break;
- case 192:
+ case 193:
/* Line 1787 of yacc.c */
-#line 806 "util/configparser.y"
+#line 807 "util/configparser.y"
{
OUTYY(("P(server_private_address:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->private_address, (yyvsp[(2) - (2)].str)))
@@ -2937,9 +2941,9 @@ yyreduce:
}
break;
- case 193:
+ case 194:
/* Line 1787 of yacc.c */
-#line 813 "util/configparser.y"
+#line 814 "util/configparser.y"
{
OUTYY(("P(server_private_domain:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->private_domain, (yyvsp[(2) - (2)].str)))
@@ -2947,9 +2951,9 @@ yyreduce:
}
break;
- case 194:
+ case 195:
/* Line 1787 of yacc.c */
-#line 820 "util/configparser.y"
+#line 821 "util/configparser.y"
{
OUTYY(("P(server_prefetch:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2959,9 +2963,9 @@ yyreduce:
}
break;
- case 195:
+ case 196:
/* Line 1787 of yacc.c */
-#line 829 "util/configparser.y"
+#line 830 "util/configparser.y"
{
OUTYY(("P(server_prefetch_key:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -2971,9 +2975,9 @@ yyreduce:
}
break;
- case 196:
+ case 197:
/* Line 1787 of yacc.c */
-#line 838 "util/configparser.y"
+#line 839 "util/configparser.y"
{
OUTYY(("P(server_unwanted_reply_threshold:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -2983,9 +2987,9 @@ yyreduce:
}
break;
- case 197:
+ case 198:
/* Line 1787 of yacc.c */
-#line 847 "util/configparser.y"
+#line 848 "util/configparser.y"
{
OUTYY(("P(server_do_not_query_address:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->donotqueryaddrs, (yyvsp[(2) - (2)].str)))
@@ -2993,9 +2997,9 @@ yyreduce:
}
break;
- case 198:
+ case 199:
/* Line 1787 of yacc.c */
-#line 854 "util/configparser.y"
+#line 855 "util/configparser.y"
{
OUTYY(("P(server_do_not_query_localhost:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -3006,9 +3010,9 @@ yyreduce:
}
break;
- case 199:
+ case 200:
/* Line 1787 of yacc.c */
-#line 864 "util/configparser.y"
+#line 865 "util/configparser.y"
{
OUTYY(("P(server_access_control:%s %s)\n", (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)));
if(strcmp((yyvsp[(3) - (3)].str), "deny")!=0 && strcmp((yyvsp[(3) - (3)].str), "refuse")!=0 &&
@@ -3023,9 +3027,9 @@ yyreduce:
}
break;
- case 200:
+ case 201:
/* Line 1787 of yacc.c */
-#line 878 "util/configparser.y"
+#line 879 "util/configparser.y"
{
OUTYY(("P(server_module_conf:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->module_conf);
@@ -3033,9 +3037,9 @@ yyreduce:
}
break;
- case 201:
+ case 202:
/* Line 1787 of yacc.c */
-#line 885 "util/configparser.y"
+#line 886 "util/configparser.y"
{
OUTYY(("P(server_val_override_date:%s)\n", (yyvsp[(2) - (2)].str)));
if(strlen((yyvsp[(2) - (2)].str)) == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) {
@@ -3054,9 +3058,9 @@ yyreduce:
}
break;
- case 202:
+ case 203:
/* Line 1787 of yacc.c */
-#line 903 "util/configparser.y"
+#line 904 "util/configparser.y"
{
OUTYY(("P(server_val_sig_skew_min:%s)\n", (yyvsp[(2) - (2)].str)));
if(strlen((yyvsp[(2) - (2)].str)) == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) {
@@ -3070,9 +3074,9 @@ yyreduce:
}
break;
- case 203:
+ case 204:
/* Line 1787 of yacc.c */
-#line 916 "util/configparser.y"
+#line 917 "util/configparser.y"
{
OUTYY(("P(server_val_sig_skew_max:%s)\n", (yyvsp[(2) - (2)].str)));
if(strlen((yyvsp[(2) - (2)].str)) == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) {
@@ -3086,9 +3090,9 @@ yyreduce:
}
break;
- case 204:
+ case 205:
/* Line 1787 of yacc.c */
-#line 929 "util/configparser.y"
+#line 930 "util/configparser.y"
{
OUTYY(("P(server_cache_max_ttl:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -3098,9 +3102,9 @@ yyreduce:
}
break;
- case 205:
+ case 206:
/* Line 1787 of yacc.c */
-#line 938 "util/configparser.y"
+#line 939 "util/configparser.y"
{
OUTYY(("P(server_cache_min_ttl:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -3110,9 +3114,9 @@ yyreduce:
}
break;
- case 206:
+ case 207:
/* Line 1787 of yacc.c */
-#line 947 "util/configparser.y"
+#line 948 "util/configparser.y"
{
OUTYY(("P(server_bogus_ttl:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -3122,9 +3126,9 @@ yyreduce:
}
break;
- case 207:
+ case 208:
/* Line 1787 of yacc.c */
-#line 956 "util/configparser.y"
+#line 957 "util/configparser.y"
{
OUTYY(("P(server_val_clean_additional:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -3135,9 +3139,9 @@ yyreduce:
}
break;
- case 208:
+ case 209:
/* Line 1787 of yacc.c */
-#line 966 "util/configparser.y"
+#line 967 "util/configparser.y"
{
OUTYY(("P(server_val_permissive_mode:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -3148,9 +3152,9 @@ yyreduce:
}
break;
- case 209:
+ case 210:
/* Line 1787 of yacc.c */
-#line 976 "util/configparser.y"
+#line 977 "util/configparser.y"
{
OUTYY(("P(server_ignore_cd_flag:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -3160,9 +3164,9 @@ yyreduce:
}
break;
- case 210:
+ case 211:
/* Line 1787 of yacc.c */
-#line 985 "util/configparser.y"
+#line 986 "util/configparser.y"
{
OUTYY(("P(server_val_log_level:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -3172,9 +3176,9 @@ yyreduce:
}
break;
- case 211:
+ case 212:
/* Line 1787 of yacc.c */
-#line 994 "util/configparser.y"
+#line 995 "util/configparser.y"
{
OUTYY(("P(server_val_nsec3_keysize_iterations:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->val_nsec3_key_iterations);
@@ -3182,9 +3186,9 @@ yyreduce:
}
break;
- case 212:
+ case 213:
/* Line 1787 of yacc.c */
-#line 1001 "util/configparser.y"
+#line 1002 "util/configparser.y"
{
OUTYY(("P(server_add_holddown:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -3194,9 +3198,9 @@ yyreduce:
}
break;
- case 213:
+ case 214:
/* Line 1787 of yacc.c */
-#line 1010 "util/configparser.y"
+#line 1011 "util/configparser.y"
{
OUTYY(("P(server_del_holddown:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -3206,9 +3210,9 @@ yyreduce:
}
break;
- case 214:
+ case 215:
/* Line 1787 of yacc.c */
-#line 1019 "util/configparser.y"
+#line 1020 "util/configparser.y"
{
OUTYY(("P(server_keep_missing:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
@@ -3218,9 +3222,9 @@ yyreduce:
}
break;
- case 215:
+ case 216:
/* Line 1787 of yacc.c */
-#line 1028 "util/configparser.y"
+#line 1029 "util/configparser.y"
{
OUTYY(("P(server_key_cache_size:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->key_cache_size))
@@ -3229,9 +3233,9 @@ yyreduce:
}
break;
- case 216:
+ case 217:
/* Line 1787 of yacc.c */
-#line 1036 "util/configparser.y"
+#line 1037 "util/configparser.y"
{
OUTYY(("P(server_key_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
@@ -3245,9 +3249,9 @@ yyreduce:
}
break;
- case 217:
+ case 218:
/* Line 1787 of yacc.c */
-#line 1049 "util/configparser.y"
+#line 1050 "util/configparser.y"
{
OUTYY(("P(server_neg_cache_size:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->neg_cache_size))
@@ -3256,9 +3260,9 @@ yyreduce:
}
break;
- case 218:
+ case 219:
/* Line 1787 of yacc.c */
-#line 1057 "util/configparser.y"
+#line 1058 "util/configparser.y"
{
OUTYY(("P(server_local_zone:%s %s)\n", (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)));
if(strcmp((yyvsp[(3) - (3)].str), "static")!=0 && strcmp((yyvsp[(3) - (3)].str), "deny")!=0 &&
@@ -3281,9 +3285,9 @@ yyreduce:
}
break;
- case 219:
+ case 220:
/* Line 1787 of yacc.c */
-#line 1079 "util/configparser.y"
+#line 1080 "util/configparser.y"
{
OUTYY(("P(server_local_data:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->local_data, (yyvsp[(2) - (2)].str)))
@@ -3291,9 +3295,9 @@ yyreduce:
}
break;
- case 220:
+ case 221:
/* Line 1787 of yacc.c */
-#line 1086 "util/configparser.y"
+#line 1087 "util/configparser.y"
{
char* ptr;
OUTYY(("P(server_local_data_ptr:%s)\n", (yyvsp[(2) - (2)].str)));
@@ -3309,9 +3313,9 @@ yyreduce:
}
break;
- case 221:
+ case 222:
/* Line 1787 of yacc.c */
-#line 1101 "util/configparser.y"
+#line 1102 "util/configparser.y"
{
OUTYY(("P(server_minimal_responses:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -3322,9 +3326,9 @@ yyreduce:
}
break;
- case 222:
+ case 223:
/* Line 1787 of yacc.c */
-#line 1111 "util/configparser.y"
+#line 1112 "util/configparser.y"
{
OUTYY(("P(server_rrset_roundrobin:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -3335,9 +3339,19 @@ yyreduce:
}
break;
- case 223:
+ case 224:
+/* Line 1787 of yacc.c */
+#line 1122 "util/configparser.y"
+ {
+ OUTYY(("P(server_max_udp_size:%s)\n", (yyvsp[(2) - (2)].str)));
+ cfg_parser->cfg->max_udp_size = atoi((yyvsp[(2) - (2)].str));
+ free((yyvsp[(2) - (2)].str));
+ }
+ break;
+
+ case 225:
/* Line 1787 of yacc.c */
-#line 1121 "util/configparser.y"
+#line 1129 "util/configparser.y"
{
OUTYY(("P(name:%s)\n", (yyvsp[(2) - (2)].str)));
if(cfg_parser->cfg->stubs->name)
@@ -3348,9 +3362,9 @@ yyreduce:
}
break;
- case 224:
+ case 226:
/* Line 1787 of yacc.c */
-#line 1131 "util/configparser.y"
+#line 1139 "util/configparser.y"
{
OUTYY(("P(stub-host:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->hosts, (yyvsp[(2) - (2)].str)))
@@ -3358,9 +3372,9 @@ yyreduce:
}
break;
- case 225:
+ case 227:
/* Line 1787 of yacc.c */
-#line 1138 "util/configparser.y"
+#line 1146 "util/configparser.y"
{
OUTYY(("P(stub-addr:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->addrs, (yyvsp[(2) - (2)].str)))
@@ -3368,9 +3382,9 @@ yyreduce:
}
break;
- case 226:
+ case 228:
/* Line 1787 of yacc.c */
-#line 1145 "util/configparser.y"
+#line 1153 "util/configparser.y"
{
OUTYY(("P(stub-first:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -3380,9 +3394,9 @@ yyreduce:
}
break;
- case 227:
+ case 229:
/* Line 1787 of yacc.c */
-#line 1154 "util/configparser.y"
+#line 1162 "util/configparser.y"
{
OUTYY(("P(stub-prime:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -3393,9 +3407,9 @@ yyreduce:
}
break;
- case 228:
+ case 230:
/* Line 1787 of yacc.c */
-#line 1164 "util/configparser.y"
+#line 1172 "util/configparser.y"
{
OUTYY(("P(name:%s)\n", (yyvsp[(2) - (2)].str)));
if(cfg_parser->cfg->forwards->name)
@@ -3406,9 +3420,9 @@ yyreduce:
}
break;
- case 229:
+ case 231:
/* Line 1787 of yacc.c */
-#line 1174 "util/configparser.y"
+#line 1182 "util/configparser.y"
{
OUTYY(("P(forward-host:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->hosts, (yyvsp[(2) - (2)].str)))
@@ -3416,9 +3430,9 @@ yyreduce:
}
break;
- case 230:
+ case 232:
/* Line 1787 of yacc.c */
-#line 1181 "util/configparser.y"
+#line 1189 "util/configparser.y"
{
OUTYY(("P(forward-addr:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->addrs, (yyvsp[(2) - (2)].str)))
@@ -3426,9 +3440,9 @@ yyreduce:
}
break;
- case 231:
+ case 233:
/* Line 1787 of yacc.c */
-#line 1188 "util/configparser.y"
+#line 1196 "util/configparser.y"
{
OUTYY(("P(forward-first:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -3438,17 +3452,17 @@ yyreduce:
}
break;
- case 232:
+ case 234:
/* Line 1787 of yacc.c */
-#line 1197 "util/configparser.y"
+#line 1205 "util/configparser.y"
{
OUTYY(("\nP(remote-control:)\n"));
}
break;
- case 242:
+ case 244:
/* Line 1787 of yacc.c */
-#line 1208 "util/configparser.y"
+#line 1216 "util/configparser.y"
{
OUTYY(("P(control_enable:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
@@ -3459,9 +3473,9 @@ yyreduce:
}
break;
- case 243:
+ case 245:
/* Line 1787 of yacc.c */
-#line 1218 "util/configparser.y"
+#line 1226 "util/configparser.y"
{
OUTYY(("P(control_port:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
@@ -3471,9 +3485,9 @@ yyreduce:
}
break;
- case 244:
+ case 246:
/* Line 1787 of yacc.c */
-#line 1227 "util/configparser.y"
+#line 1235 "util/configparser.y"
{
OUTYY(("P(control_interface:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->control_ifs, (yyvsp[(2) - (2)].str)))
@@ -3481,9 +3495,9 @@ yyreduce:
}
break;
- case 245:
+ case 247:
/* Line 1787 of yacc.c */
-#line 1234 "util/configparser.y"
+#line 1242 "util/configparser.y"
{
OUTYY(("P(rc_server_key_file:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->server_key_file);
@@ -3491,9 +3505,9 @@ yyreduce:
}
break;
- case 246:
+ case 248:
/* Line 1787 of yacc.c */
-#line 1241 "util/configparser.y"
+#line 1249 "util/configparser.y"
{
OUTYY(("P(rc_server_cert_file:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->server_cert_file);
@@ -3501,9 +3515,9 @@ yyreduce:
}
break;
- case 247:
+ case 249:
/* Line 1787 of yacc.c */
-#line 1248 "util/configparser.y"
+#line 1256 "util/configparser.y"
{
OUTYY(("P(rc_control_key_file:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->control_key_file);
@@ -3511,9 +3525,9 @@ yyreduce:
}
break;
- case 248:
+ case 250:
/* Line 1787 of yacc.c */
-#line 1255 "util/configparser.y"
+#line 1263 "util/configparser.y"
{
OUTYY(("P(rc_control_cert_file:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->control_cert_file);
@@ -3521,17 +3535,17 @@ yyreduce:
}
break;
- case 249:
+ case 251:
/* Line 1787 of yacc.c */
-#line 1262 "util/configparser.y"
+#line 1270 "util/configparser.y"
{
OUTYY(("\nP(python:)\n"));
}
break;
- case 253:
+ case 255:
/* Line 1787 of yacc.c */
-#line 1271 "util/configparser.y"
+#line 1279 "util/configparser.y"
{
OUTYY(("P(python-script:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->python_script);
@@ -3541,7 +3555,7 @@ yyreduce:
/* Line 1787 of yacc.c */
-#line 3545 "util/configparser.c"
+#line 3559 "util/configparser.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3771,7 +3785,7 @@ yyreturn:
/* Line 2048 of yacc.c */
-#line 1276 "util/configparser.y"
+#line 1284 "util/configparser.y"
/* parse helper routines could be here */
diff --git a/util/configparser.h b/util/configparser.h
index 8d9c3c4826eb..b59fe311edbc 100644
--- a/util/configparser.h
+++ b/util/configparser.h
@@ -172,7 +172,8 @@ extern int yydebug;
VAR_FORWARD_FIRST = 381,
VAR_STUB_FIRST = 382,
VAR_MINIMAL_RESPONSES = 383,
- VAR_RRSET_ROUNDROBIN = 384
+ VAR_RRSET_ROUNDROBIN = 384,
+ VAR_MAX_UDP_SIZE = 385
};
#endif
/* Tokens. */
@@ -303,6 +304,7 @@ extern int yydebug;
#define VAR_STUB_FIRST 382
#define VAR_MINIMAL_RESPONSES 383
#define VAR_RRSET_ROUNDROBIN 384
+#define VAR_MAX_UDP_SIZE 385
@@ -316,7 +318,7 @@ typedef union YYSTYPE
/* Line 2049 of yacc.c */
-#line 320 "util/configparser.h"
+#line 322 "util/configparser.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/util/configparser.y b/util/configparser.y
index 0dbee2b498c5..4a0cc1697a7d 100644
--- a/util/configparser.y
+++ b/util/configparser.y
@@ -105,6 +105,7 @@ extern struct config_parser_state* cfg_parser;
%token VAR_IGNORE_CD_FLAG VAR_LOG_QUERIES VAR_TCP_UPSTREAM VAR_SSL_UPSTREAM
%token VAR_SSL_SERVICE_KEY VAR_SSL_SERVICE_PEM VAR_SSL_PORT VAR_FORWARD_FIRST
%token VAR_STUB_FIRST VAR_MINIMAL_RESPONSES VAR_RRSET_ROUNDROBIN
+%token VAR_MAX_UDP_SIZE
%%
toplevelvars: /* empty */ | toplevelvars toplevelvar ;
@@ -161,7 +162,7 @@ content_server: server_num_threads | server_verbosity | server_port |
server_so_sndbuf | server_harden_below_nxdomain | server_ignore_cd_flag |
server_log_queries | server_tcp_upstream | server_ssl_upstream |
server_ssl_service_key | server_ssl_service_pem | server_ssl_port |
- server_minimal_responses | server_rrset_roundrobin
+ server_minimal_responses | server_rrset_roundrobin | server_max_udp_size
;
stubstart: VAR_STUB_ZONE
{
@@ -1117,6 +1118,13 @@ server_rrset_roundrobin: VAR_RRSET_ROUNDROBIN STRING_ARG
free($2);
}
;
+server_max_udp_size: VAR_MAX_UDP_SIZE STRING_ARG
+ {
+ OUTYY(("P(server_max_udp_size:%s)\n", $2));
+ cfg_parser->cfg->max_udp_size = atoi($2);
+ free($2);
+ }
+ ;
stub_name: VAR_NAME STRING_ARG
{
OUTYY(("P(name:%s)\n", $2));
diff --git a/util/data/msgencode.c b/util/data/msgencode.c
index 157796deb95b..33f14b4dacc8 100644
--- a/util/data/msgencode.c
+++ b/util/data/msgencode.c
@@ -441,7 +441,7 @@ rrset_belongs_in_reply(ldns_pkt_section s, uint16_t rrtype, uint16_t qtype,
/** store rrset in buffer in wireformat, return RETVAL_* */
static int
packed_rrset_encode(struct ub_packed_rrset_key* key, ldns_buffer* pkt,
- uint16_t* num_rrs, uint32_t timenow, struct regional* region,
+ uint16_t* num_rrs, time_t timenow, struct regional* region,
int do_data, int do_sig, struct compress_tree_node** tree,
ldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset)
{
@@ -528,7 +528,7 @@ packed_rrset_encode(struct ub_packed_rrset_key* key, ldns_buffer* pkt,
/** store msg section in wireformat buffer, return RETVAL_* */
static int
insert_section(struct reply_info* rep, size_t num_rrsets, uint16_t* num_rrs,
- ldns_buffer* pkt, size_t rrsets_before, uint32_t timenow,
+ ldns_buffer* pkt, size_t rrsets_before, time_t timenow,
struct regional* region, struct compress_tree_node** tree,
ldns_pkt_section s, uint16_t qtype, int dnssec, size_t rr_offset)
{
@@ -624,7 +624,7 @@ positive_answer(struct reply_info* rep, uint16_t qtype) {
int
reply_info_encode(struct query_info* qinfo, struct reply_info* rep,
- uint16_t id, uint16_t flags, ldns_buffer* buffer, uint32_t timenow,
+ uint16_t id, uint16_t flags, ldns_buffer* buffer, time_t timenow,
struct regional* region, uint16_t udpsize, int dnssec)
{
uint16_t ancount=0, nscount=0, arcount=0;
@@ -658,8 +658,9 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep,
return 0;
}
}
- /* roundrobin offset. using query id for random number */
- rr_offset = RRSET_ROUNDROBIN?id:0;
+ /* roundrobin offset. using query id for random number. With ntohs
+ * for different roundrobins for sequential id client senders. */
+ rr_offset = RRSET_ROUNDROBIN?ntohs(id):0;
/* insert answer section */
if((r=insert_section(rep, rep->an_numrrsets, &ancount, buffer,
@@ -708,9 +709,6 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep,
return 0;
}
ldns_buffer_write_u16_at(buffer, 10, arcount);
- } else {
- ldns_buffer_write_u16_at(buffer, 8, nscount);
- ldns_buffer_write_u16_at(buffer, 10, arcount);
}
ldns_buffer_flip(buffer);
return 1;
@@ -750,7 +748,7 @@ attach_edns_record(ldns_buffer* pkt, struct edns_data* edns)
int
reply_info_answer_encode(struct query_info* qinf, struct reply_info* rep,
- uint16_t id, uint16_t qflags, ldns_buffer* pkt, uint32_t timenow,
+ uint16_t id, uint16_t qflags, ldns_buffer* pkt, time_t timenow,
int cached, struct regional* region, uint16_t udpsize,
struct edns_data* edns, int dnssec, int secure)
{
diff --git a/util/data/msgencode.h b/util/data/msgencode.h
index 74d6c1fb2dd6..13f0c1b4d334 100644
--- a/util/data/msgencode.h
+++ b/util/data/msgencode.h
@@ -66,7 +66,7 @@ struct edns_data;
* @return: 0 on error (server failure).
*/
int reply_info_answer_encode(struct query_info* qinf, struct reply_info* rep,
- uint16_t id, uint16_t qflags, ldns_buffer* dest, uint32_t timenow,
+ uint16_t id, uint16_t qflags, ldns_buffer* dest, time_t timenow,
int cached, struct regional* region, uint16_t udpsize,
struct edns_data* edns, int dnssec, int secure);
@@ -88,7 +88,7 @@ int reply_info_answer_encode(struct query_info* qinf, struct reply_info* rep,
* 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, ldns_buffer* buffer, uint32_t timenow,
+ uint16_t id, uint16_t flags, ldns_buffer* buffer, time_t timenow,
struct regional* region, uint16_t udpsize, int dnssec);
/**
diff --git a/util/data/msgparse.h b/util/data/msgparse.h
index 830d68e16cd6..83d2aaaa6ea7 100644
--- a/util/data/msgparse.h
+++ b/util/data/msgparse.h
@@ -71,9 +71,9 @@ struct regional;
/** number of buckets in parse rrset hash table. Must be power of 2. */
#define PARSE_TABLE_SIZE 32
/** Maximum TTL that is allowed. */
-extern uint32_t MAX_TTL;
+extern time_t MAX_TTL;
/** Minimum TTL that is allowed. */
-extern uint32_t MIN_TTL;
+extern time_t MIN_TTL;
/** Negative cache time (for entries without any RRs.) */
#define NORR_TTL 5 /* seconds */
diff --git a/util/data/msgreply.c b/util/data/msgreply.c
index 6d711fff3a27..004d6c928f57 100644
--- a/util/data/msgreply.c
+++ b/util/data/msgreply.c
@@ -53,9 +53,9 @@
#include "util/data/msgencode.h"
/** MAX TTL default for messages and rrsets */
-uint32_t MAX_TTL = 3600 * 24 * 10; /* ten days */
+time_t MAX_TTL = 3600 * 24 * 10; /* ten days */
/** MIN TTL default for messages and rrsets */
-uint32_t MIN_TTL = 0;
+time_t MIN_TTL = 0;
/** allocate qinfo, return 0 on error */
static int
@@ -79,7 +79,7 @@ parse_create_qinfo(ldns_buffer* pkt, struct msg_parse* msg,
/** constructor for replyinfo */
static struct reply_info*
construct_reply_info_base(struct regional* region, uint16_t flags, size_t qd,
- uint32_t ttl, uint32_t prettl, size_t an, size_t ns, size_t ar,
+ time_t ttl, time_t prettl, size_t an, size_t ns, size_t ar,
size_t total, enum sec_status sec)
{
struct reply_info* rep;
@@ -154,7 +154,7 @@ repinfo_alloc_rrset_keys(struct reply_info* rep, struct alloc_cache* alloc,
/** do the rdata copy */
static int
rdata_copy(ldns_buffer* pkt, struct packed_rrset_data* data, uint8_t* to,
- struct rr_parse* rr, uint32_t* rr_ttl, uint16_t type)
+ struct rr_parse* rr, time_t* rr_ttl, uint16_t type)
{
uint16_t pkt_len;
const ldns_rr_descriptor* desc;
@@ -245,7 +245,7 @@ parse_rr_copy(ldns_buffer* pkt, struct rrset_parse* pset,
data->rr_len = (size_t*)((uint8_t*)data +
sizeof(struct packed_rrset_data));
data->rr_data = (uint8_t**)&(data->rr_len[total]);
- data->rr_ttl = (uint32_t*)&(data->rr_data[total]);
+ data->rr_ttl = (time_t*)&(data->rr_data[total]);
nextrdata = (uint8_t*)&(data->rr_ttl[total]);
for(i=0; i<data->count; i++) {
data->rr_len[i] = rr->size;
@@ -278,7 +278,7 @@ parse_create_rrset(ldns_buffer* pkt, struct rrset_parse* pset,
/* allocate */
size_t s = sizeof(struct packed_rrset_data) +
(pset->rr_count + pset->rrsig_count) *
- (sizeof(size_t)+sizeof(uint8_t*)+sizeof(uint32_t)) +
+ (sizeof(size_t)+sizeof(uint8_t*)+sizeof(time_t)) +
pset->size;
if(region)
*data = regional_alloc(region, s);
@@ -465,7 +465,7 @@ reply_info_sortref(struct reply_info* rep)
}
void
-reply_info_set_ttls(struct reply_info* rep, uint32_t timenow)
+reply_info_set_ttls(struct reply_info* rep, time_t timenow)
{
size_t i, j;
rep->ttl += timenow;
diff --git a/util/data/msgreply.h b/util/data/msgreply.h
index a32f2b1edab4..6087c6b2057c 100644
--- a/util/data/msgreply.h
+++ b/util/data/msgreply.h
@@ -116,21 +116,21 @@ struct reply_info {
*/
uint8_t qdcount;
+ /** 32 bit padding to pad struct member alignment to 64 bits. */
+ uint32_t padding;
+
/**
* TTL of the entire reply (for negative caching).
* only for use when there are 0 RRsets in this message.
* if there are RRsets, check those instead.
*/
- uint32_t ttl;
+ time_t ttl;
/**
* TTL for prefetch. After it has expired, a prefetch is suitable.
* Smaller than the TTL, otherwise the prefetch would not happen.
*/
- uint32_t prefetch_ttl;
-
- /** 32 bit padding to pad struct member alignment to 64 bits. */
- uint32_t padding;
+ time_t prefetch_ttl;
/**
* The security status from DNSSEC validation of this message.
@@ -253,7 +253,7 @@ void reply_info_sortref(struct reply_info* rep);
* Also refs must be filled in.
* @param timenow: the current time.
*/
-void reply_info_set_ttls(struct reply_info* rep, uint32_t timenow);
+void reply_info_set_ttls(struct reply_info* rep, time_t timenow);
/**
* Delete reply_info and packed_rrsets (while they are not yet added to the
diff --git a/util/data/packed_rrset.c b/util/data/packed_rrset.c
index e1fc2e5291ea..1bf2e8f00b81 100644
--- a/util/data/packed_rrset.c
+++ b/util/data/packed_rrset.c
@@ -183,7 +183,7 @@ packed_rrset_ptr_fixup(struct packed_rrset_data* data)
data->rr_len = (size_t*)((uint8_t*)data +
sizeof(struct packed_rrset_data));
data->rr_data = (uint8_t**)&(data->rr_len[total]);
- data->rr_ttl = (uint32_t*)&(data->rr_data[total]);
+ data->rr_ttl = (time_t*)&(data->rr_data[total]);
nextrdata = (uint8_t*)&(data->rr_ttl[total]);
for(i=0; i<total; i++) {
data->rr_data[i] = nextrdata;
@@ -215,7 +215,7 @@ get_cname_target(struct ub_packed_rrset_key* rrset, uint8_t** dname,
}
void
-packed_rrset_ttl_add(struct packed_rrset_data* data, uint32_t add)
+packed_rrset_ttl_add(struct packed_rrset_data* data, time_t add)
{
size_t i;
size_t total = data->count + data->rrsig_count;
@@ -266,7 +266,7 @@ void log_rrset_key(enum verbosity_value v, const char* str,
ntohs(rrset->rk.type), ntohs(rrset->rk.rrset_class));
}
-uint32_t
+time_t
ub_packed_rrset_ttl(struct ub_packed_rrset_key* key)
{
struct packed_rrset_data* d = (struct packed_rrset_data*)key->
@@ -276,7 +276,7 @@ ub_packed_rrset_ttl(struct ub_packed_rrset_key* key)
struct ub_packed_rrset_key*
packed_rrset_copy_region(struct ub_packed_rrset_key* key,
- struct regional* region, uint32_t now)
+ struct regional* region, time_t now)
{
struct ub_packed_rrset_key* ck = regional_alloc(region,
sizeof(struct ub_packed_rrset_key));
@@ -315,7 +315,7 @@ packed_rrset_copy_region(struct ub_packed_rrset_key* key,
struct ub_packed_rrset_key*
packed_rrset_copy_alloc(struct ub_packed_rrset_key* key,
- struct alloc_cache* alloc, uint32_t now)
+ struct alloc_cache* alloc, time_t now)
{
struct packed_rrset_data* fd, *dd;
struct ub_packed_rrset_key* dk = alloc_special_obtain(alloc);
@@ -386,7 +386,7 @@ packed_rrset_heap_data(ldns_rr_list* rrset)
/* allocate */
total = count + rrsig_count;
- len += sizeof(*data) + total*(sizeof(size_t) + sizeof(uint32_t) +
+ len += sizeof(*data) + total*(sizeof(size_t) + sizeof(time_t) +
sizeof(uint8_t*));
data = (struct packed_rrset_data*)calloc(1, len);
if(!data)
@@ -399,7 +399,7 @@ packed_rrset_heap_data(ldns_rr_list* rrset)
data->rr_len = (size_t*)((uint8_t*)data +
sizeof(struct packed_rrset_data));
data->rr_data = (uint8_t**)&(data->rr_len[total]);
- data->rr_ttl = (uint32_t*)&(data->rr_data[total]);
+ data->rr_ttl = (time_t*)&(data->rr_data[total]);
nextrdata = (uint8_t*)&(data->rr_ttl[total]);
/* fill out len, ttl, fields */
diff --git a/util/data/packed_rrset.h b/util/data/packed_rrset.h
index ad11a804226d..9530aa604f12 100644
--- a/util/data/packed_rrset.h
+++ b/util/data/packed_rrset.h
@@ -215,7 +215,7 @@ enum sec_status {
struct packed_rrset_data {
/** TTL (in seconds like time()) of the rrset.
* Same for all RRs see rfc2181(5.2). */
- uint32_t ttl;
+ time_t ttl;
/** number of rrs. */
size_t count;
/** number of rrsigs, if 0 no rrsigs */
@@ -227,7 +227,7 @@ struct packed_rrset_data {
/** length of every rr's rdata, rr_len[i] is size of rr_data[i]. */
size_t* rr_len;
/** ttl of every rr. rr_ttl[i] ttl of rr i. */
- uint32_t *rr_ttl;
+ time_t *rr_ttl;
/**
* Array of pointers to every rr's rdata.
* The rr_data[i] rdata is stored in uncompressed wireformat.
@@ -281,7 +281,7 @@ size_t packed_rrset_sizeof(struct packed_rrset_data* data);
* @param key: rrset key, with data to examine.
* @return ttl value.
*/
-uint32_t ub_packed_rrset_ttl(struct ub_packed_rrset_key* key);
+time_t ub_packed_rrset_ttl(struct ub_packed_rrset_key* key);
/**
* Calculate memory size of rrset entry. For hash table usage.
@@ -343,7 +343,7 @@ void packed_rrset_ptr_fixup(struct packed_rrset_data* data);
* @param data: rrset data structure. Otherwise correctly filled in.
* @param add: how many seconds to add, pass time(0) for example.
*/
-void packed_rrset_ttl_add(struct packed_rrset_data* data, uint32_t add);
+void packed_rrset_ttl_add(struct packed_rrset_data* data, time_t add);
/**
* Utility procedure to extract CNAME target name from its rdata.
@@ -392,7 +392,7 @@ void log_rrset_key(enum verbosity_value v, const char* str,
*/
struct ub_packed_rrset_key* packed_rrset_copy_region(
struct ub_packed_rrset_key* key, struct regional* region,
- uint32_t now);
+ time_t now);
/**
* Allocate rrset with malloc (from region or you are holding the lock).
@@ -403,7 +403,7 @@ struct ub_packed_rrset_key* packed_rrset_copy_region(
*/
struct ub_packed_rrset_key* packed_rrset_copy_alloc(
struct ub_packed_rrset_key* key, struct alloc_cache* alloc,
- uint32_t now);
+ time_t now);
/**
* Create a ub_packed_rrset_key allocated on the heap.
diff --git a/util/iana_ports.inc b/util/iana_ports.inc
index c2c7a2156403..3d607a7d4680 100644
--- a/util/iana_ports.inc
+++ b/util/iana_ports.inc
@@ -33,7 +33,6 @@
48,
49,
50,
-51,
52,
53,
54,
@@ -694,9 +693,6 @@
1026,
1027,
1029,
-1030,
-1031,
-1032,
1033,
1034,
1035,
@@ -3968,6 +3964,7 @@
4753,
4784,
4785,
+4789,
4800,
4801,
4802,
@@ -4095,6 +4092,7 @@
5111,
5112,
5116,
+5120,
5133,
5136,
5137,
@@ -4173,6 +4171,7 @@
5361,
5362,
5363,
+5364,
5397,
5398,
5399,
@@ -4276,6 +4275,7 @@
5681,
5682,
5683,
+5684,
5688,
5689,
5713,
@@ -4479,6 +4479,7 @@
6627,
6628,
6633,
+6653,
6657,
6670,
6671,
@@ -4599,6 +4600,7 @@
7401,
7402,
7410,
+7411,
7421,
7426,
7427,
@@ -4794,7 +4796,6 @@
8614,
8675,
8686,
-8699,
8732,
8733,
8763,
@@ -5026,6 +5027,7 @@
11000,
11001,
11106,
+11108,
11111,
11112,
11161,
@@ -5285,7 +5287,10 @@
29167,
30001,
30002,
+30003,
+30004,
30260,
+30832,
30999,
31029,
31416,
@@ -5371,6 +5376,7 @@
47624,
47806,
47808,
+47809,
48000,
48001,
48002,
diff --git a/util/log.c b/util/log.c
index 8c09c7ce3122..9b2daea3208f 100644
--- a/util/log.c
+++ b/util/log.c
@@ -73,7 +73,7 @@ static const char* ident="unbound";
static int logging_to_syslog = 0;
#endif /* HAVE_SYSLOG_H */
/** time to print in log, if NULL, use time(2) */
-static uint32_t* log_now = NULL;
+static time_t* log_now = NULL;
/** print time in UTC or in secondsfrom1970 */
static int log_time_asc = 0;
@@ -151,7 +151,7 @@ void log_ident_set(const char* id)
ident = id;
}
-void log_set_time(uint32_t* t)
+void log_set_time(time_t* t)
{
log_now = t;
}
@@ -228,7 +228,7 @@ log_vmsg(int pri, const char* type,
ident, (int)getpid(), tid?*tid:0, type, message);
} else
#endif
- fprintf(logfile, "[%u] %s[%d:%x] %s: %s\n", (unsigned)now,
+ fprintf(logfile, "[%lld] %s[%d:%x] %s: %s\n", (long long)now,
ident, (int)getpid(), tid?*tid:0, type, message);
#ifdef UB_ON_WINDOWS
/* line buffering does not work on windows */
diff --git a/util/log.h b/util/log.h
index 270ffc5c180a..5ba1a0bc4d73 100644
--- a/util/log.h
+++ b/util/log.h
@@ -108,7 +108,7 @@ void log_ident_set(const char* id);
* @param t: the point is copied and used to find the time.
* if NULL, time(2) is used.
*/
-void log_set_time(uint32_t* t);
+void log_set_time(time_t* t);
/**
* Set if the time value is printed ascii or decimal in log entries.
diff --git a/util/mini_event.c b/util/mini_event.c
index f66214ddb8fa..a03edf1b3c7b 100644
--- a/util/mini_event.c
+++ b/util/mini_event.c
@@ -79,13 +79,13 @@ settime(struct event_base* base)
return -1;
}
#ifndef S_SPLINT_S
- *base->time_secs = (uint32_t)base->time_tv->tv_sec;
+ *base->time_secs = (time_t)base->time_tv->tv_sec;
#endif
return 0;
}
/** create event base */
-void *event_init(uint32_t* time_secs, struct timeval* time_tv)
+void *event_init(time_t* time_secs, struct timeval* time_tv)
{
struct event_base* base = (struct event_base*)malloc(
sizeof(struct event_base));
diff --git a/util/mini_event.h b/util/mini_event.h
index 248468ada84a..b04419123f8d 100644
--- a/util/mini_event.h
+++ b/util/mini_event.h
@@ -103,7 +103,7 @@ struct event_base
/** if we need to exit */
int need_to_exit;
/** where to store time in seconds */
- uint32_t* time_secs;
+ time_t* time_secs;
/** where to store time in microseconds */
struct timeval* time_tv;
};
@@ -134,7 +134,7 @@ struct event {
/* function prototypes (some are as they appear in event.h) */
/** create event base */
-void *event_init(uint32_t* time_secs, struct timeval* time_tv);
+void *event_init(time_t* time_secs, struct timeval* time_tv);
/** get version */
const char *event_get_version(void);
/** get polling method, select */
diff --git a/util/module.h b/util/module.h
index 8fa4ec25960a..3ec25524b03b 100644
--- a/util/module.h
+++ b/util/module.h
@@ -186,7 +186,7 @@ struct module_env {
/** random table to generate random numbers */
struct ub_randstate* rnd;
/** time in seconds, converted to integer */
- uint32_t* now;
+ time_t* now;
/** time in microseconds. Relatively recent. */
struct timeval* now_tv;
/** is validation required for messages, controls client-facing
@@ -309,7 +309,7 @@ struct module_qstate {
/** mesh related information for this query */
struct mesh_state* mesh_info;
/** how many seconds before expiry is this prefetched (0 if not) */
- uint32_t prefetch_leeway;
+ time_t prefetch_leeway;
};
/**
diff --git a/util/netevent.c b/util/netevent.c
index c5a7d8029f86..193fa8714a7e 100644
--- a/util/netevent.c
+++ b/util/netevent.c
@@ -122,7 +122,7 @@ struct internal_base {
/** libevent event_base type. */
struct event_base* base;
/** seconds time pointer points here */
- uint32_t secs;
+ time_t secs;
/** timeval with current time */
struct timeval now;
/** the event used for slow_accept timeouts */
@@ -171,7 +171,7 @@ comm_base_now(struct comm_base* b)
if(gettimeofday(&b->eb->now, NULL) < 0) {
log_err("gettimeofday: %s", strerror(errno));
}
- b->eb->secs = (uint32_t)b->eb->now.tv_sec;
+ b->eb->secs = (time_t)b->eb->now.tv_sec;
}
#endif /* USE_MINI_EVENT */
@@ -258,7 +258,7 @@ comm_base_delete(struct comm_base* b)
}
void
-comm_base_timept(struct comm_base* b, uint32_t** tt, struct timeval** tv)
+comm_base_timept(struct comm_base* b, time_t** tt, struct timeval** tv)
{
*tt = &b->eb->secs;
*tv = &b->eb->now;
@@ -320,6 +320,10 @@ udp_send_errno_needs_log(struct sockaddr* addr, socklen_t addrlen)
break;
}
#endif
+ /* permission denied is gotten for every send if the
+ * network is disconnected (on some OS), squelch it */
+ if(errno == EPERM && verbosity < VERB_DETAIL)
+ return 0;
/* squelch errors where people deploy AAAA ::ffff:bla for
* authority servers, which we try for intranets. */
if(errno == EINVAL && addr_is_ip4mapped(
diff --git a/util/netevent.h b/util/netevent.h
index 0ea4cf04145e..86fa28569c70 100644
--- a/util/netevent.h
+++ b/util/netevent.h
@@ -308,7 +308,7 @@ void comm_base_delete(struct comm_base* b);
* @param tt: pointer to time in seconds is returned.
* @param tv: pointer to time in microseconds is returned.
*/
-void comm_base_timept(struct comm_base* b, uint32_t** tt, struct timeval** tv);
+void comm_base_timept(struct comm_base* b, time_t** tt, struct timeval** tv);
/**
* Dispatch the comm base events.
diff --git a/util/storage/lookup3.c b/util/storage/lookup3.c
index 845cc388624b..7596033bdee2 100644
--- a/util/storage/lookup3.c
+++ b/util/storage/lookup3.c
@@ -50,6 +50,9 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy.
#include <time.h> /* defines time_t for timings in the test */
/*#include <stdint.h> defines uint32_t etc (from config.h) */
#include <sys/param.h> /* attempt to define endianness */
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h> /* attempt to define endianness (solaris) */
+#endif
#ifdef linux
# include <endian.h> /* attempt to define endianness */
#endif
@@ -61,7 +64,7 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy.
#endif
/* random initial value */
-static uint32_t raninit = 0xdeadbeef;
+static uint32_t raninit = (uint32_t)0xdeadbeef;
void
hash_set_raninit(uint32_t v)
@@ -75,22 +78,25 @@ hash_set_raninit(uint32_t v)
*/
#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \
__BYTE_ORDER == __LITTLE_ENDIAN) || \
- (defined(_BYTE_ORDER) && defined(_LITTLE_ENDIAN) && \
- _BYTE_ORDER == _LITTLE_ENDIAN) || \
(defined(i386) || defined(__i386__) || defined(__i486__) || \
- defined(__i586__) || defined(__i686__) || defined(vax) || defined(MIPSEL))
+ defined(__i586__) || defined(__i686__) || defined(vax) || defined(MIPSEL) || defined(__x86))
# define HASH_LITTLE_ENDIAN 1
# define HASH_BIG_ENDIAN 0
-#elif (!defined(_BYTE_ORDER) && !defined(__BYTE_ORDER) && defined(_BIG_ENDIAN))
-# define HASH_LITTLE_ENDIAN 0
-# define HASH_BIG_ENDIAN 1
#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && \
__BYTE_ORDER == __BIG_ENDIAN) || \
- (defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) && \
- _BYTE_ORDER == _BIG_ENDIAN) || \
- (defined(sparc) || defined(POWERPC) || defined(mc68000) || defined(sel))
+ (defined(sparc) || defined(__sparc) || defined(__sparc__) || defined(POWERPC) || defined(mc68000) || defined(sel))
# define HASH_LITTLE_ENDIAN 0
# define HASH_BIG_ENDIAN 1
+#elif defined(_MACHINE_ENDIAN_H_)
+/* test for machine_endian_h protects failure if some are empty strings */
+# if defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) && _BYTE_ORDER == _BIG_ENDIAN
+# define HASH_LITTLE_ENDIAN 0
+# define HASH_BIG_ENDIAN 1
+# endif
+# if defined(_BYTE_ORDER) && defined(_LITTLE_ENDIAN) && _BYTE_ORDER == _LITTLE_ENDIAN
+# define HASH_LITTLE_ENDIAN 1
+# define HASH_BIG_ENDIAN 0
+# endif /* _MACHINE_ENDIAN_H_ */
#else
# define HASH_LITTLE_ENDIAN 0
# define HASH_BIG_ENDIAN 0
diff --git a/util/tube.c b/util/tube.c
index 28c51d79d16d..fde84967fda6 100644
--- a/util/tube.c
+++ b/util/tube.c
@@ -368,7 +368,7 @@ int tube_read_msg(struct tube* tube, uint8_t** buf, uint32_t* len,
return 0;
}
d = 0;
- while(d != (ssize_t)*len) {
+ while(d < (ssize_t)*len) {
if((r=read(fd, (*buf)+d, (size_t)((ssize_t)*len)-d)) == -1) {
log_err("tube msg read failed: %s", strerror(errno));
(void)fd_set_nonblock(fd);
diff --git a/util/winsock_event.c b/util/winsock_event.c
index ff5c9b0939d1..82e9ab06a382 100644
--- a/util/winsock_event.c
+++ b/util/winsock_event.c
@@ -71,7 +71,7 @@ settime(struct event_base* base)
return -1;
}
#ifndef S_SPLINT_S
- *base->time_secs = (uint32_t)base->time_tv->tv_sec;
+ *base->time_secs = (time_t)base->time_tv->tv_sec;
#endif
return 0;
}
@@ -108,7 +108,7 @@ zero_waitfor(WSAEVENT waitfor[], WSAEVENT x)
}
}
-void *event_init(uint32_t* time_secs, struct timeval* time_tv)
+void *event_init(time_t* time_secs, struct timeval* time_tv)
{
struct event_base* base = (struct event_base*)malloc(
sizeof(struct event_base));
@@ -181,8 +181,8 @@ static void handle_timeouts(struct event_base* base, struct timeval* now,
wait->tv_usec = p->ev_timeout.tv_usec
- now->tv_usec;
}
- verbose(VERB_CLIENT, "winsock_event wait=%d.%6.6d",
- (int)wait->tv_sec, (int)wait->tv_usec);
+ verbose(VERB_CLIENT, "winsock_event wait=%lld.%6.6d",
+ (long long)wait->tv_sec, (int)wait->tv_usec);
return;
}
#endif
@@ -488,9 +488,9 @@ int event_base_set(struct event_base *base, struct event *ev)
int event_add(struct event *ev, struct timeval *tv)
{
- verbose(VERB_ALGO, "event_add %p added=%d fd=%d tv=%d %s%s%s",
+ verbose(VERB_ALGO, "event_add %p added=%d fd=%d tv=%lld %s%s%s",
ev, ev->added, ev->ev_fd,
- (tv?(int)tv->tv_sec*1000+(int)tv->tv_usec/1000:-1),
+ (tv?(long long)tv->tv_sec*1000+(long long)tv->tv_usec/1000:-1),
(ev->ev_events&EV_READ)?" EV_READ":"",
(ev->ev_events&EV_WRITE)?" EV_WRITE":"",
(ev->ev_events&EV_TIMEOUT)?" EV_TIMEOUT":"");
@@ -569,10 +569,10 @@ int event_add(struct event *ev, struct timeval *tv)
int event_del(struct event *ev)
{
- verbose(VERB_ALGO, "event_del %p added=%d fd=%d tv=%d %s%s%s",
+ verbose(VERB_ALGO, "event_del %p added=%d fd=%d tv=%lld %s%s%s",
ev, ev->added, ev->ev_fd,
- (ev->ev_events&EV_TIMEOUT)?(int)ev->ev_timeout.tv_sec*1000+
- (int)ev->ev_timeout.tv_usec/1000:-1,
+ (ev->ev_events&EV_TIMEOUT)?(long long)ev->ev_timeout.tv_sec*1000+
+ (long long)ev->ev_timeout.tv_usec/1000:-1,
(ev->ev_events&EV_READ)?" EV_READ":"",
(ev->ev_events&EV_WRITE)?" EV_WRITE":"",
(ev->ev_events&EV_TIMEOUT)?" EV_TIMEOUT":"");
diff --git a/util/winsock_event.h b/util/winsock_event.h
index 088283e128aa..f51f53478e93 100644
--- a/util/winsock_event.h
+++ b/util/winsock_event.h
@@ -129,7 +129,7 @@ struct event_base
/** if we need to exit */
int need_to_exit;
/** where to store time in seconds */
- uint32_t* time_secs;
+ time_t* time_secs;
/** where to store time in microseconds */
struct timeval* time_tv;
/**
@@ -194,7 +194,7 @@ struct event {
};
/** create event base */
-void *event_init(uint32_t* time_secs, struct timeval* time_tv);
+void *event_init(time_t* time_secs, struct timeval* time_tv);
/** get version */
const char *event_get_version(void);
/** get polling method (select,epoll) */
diff --git a/validator/autotrust.c b/validator/autotrust.c
index 99537d18aeeb..3d22637b8c2e 100644
--- a/validator/autotrust.c
+++ b/validator/autotrust.c
@@ -242,7 +242,7 @@ parse_comments(char* str, struct autr_ta* ta)
if (pos < 0 || !timestamp)
ta->last_change = 0;
else
- ta->last_change = (uint32_t)timestamp;
+ ta->last_change = (time_t)timestamp;
free(comment);
return 1;
@@ -677,12 +677,12 @@ parse_var_line(char* line, struct val_anchors* anchors,
} else if(strncmp(line, ";;query_interval: ", 18) == 0) {
if(!tp) return -1;
lock_basic_lock(&tp->lock);
- tp->autr->query_interval = (uint32_t)parse_int(line+18, &r);
+ tp->autr->query_interval = (time_t)parse_int(line+18, &r);
lock_basic_unlock(&tp->lock);
} else if(strncmp(line, ";;retry_time: ", 14) == 0) {
if(!tp) return -1;
lock_basic_lock(&tp->lock);
- tp->autr->retry_time = (uint32_t)parse_int(line+14, &r);
+ tp->autr->retry_time = (time_t)parse_int(line+14, &r);
lock_basic_unlock(&tp->lock);
}
return r;
@@ -881,6 +881,8 @@ print_id(FILE* out, char* fname, struct module_env* env,
ldns_buffer_clear(env->scratch_buffer);
#ifdef UNBOUND_DEBUG
s =
+#else
+ (void)
#endif
ldns_rdf2buffer_str_dname(env->scratch_buffer, &rdf);
log_assert(s == LDNS_STATUS_OK);
@@ -976,9 +978,13 @@ void autr_write_file(struct module_env* env, struct trust_anchor* tp)
char* fname = tp->autr->file;
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&&env->worker?*(int*)env->worker:0);
+ env->worker?*(int*)env->worker:0);
verbose(VERB_ALGO, "autotrust: write to disk: %s", tempf);
out = fopen(tempf, "w");
if(!out) {
@@ -1031,23 +1037,23 @@ verify_dnskey(struct module_env* env, struct val_env* ve,
}
/** Find minimum expiration interval from signatures */
-static uint32_t
+static time_t
min_expiry(struct module_env* env, ldns_rr_list* rrset)
{
size_t i;
- uint32_t t, r = 15 * 24 * 3600; /* 15 days max */
+ int32_t t, r = 15 * 24 * 3600; /* 15 days max */
for(i=0; i<ldns_rr_list_rr_count(rrset); i++) {
ldns_rr* rr = ldns_rr_list_rr(rrset, i);
if(ldns_rr_get_type(rr) != LDNS_RR_TYPE_RRSIG)
continue;
t = ldns_rdf2native_int32(ldns_rr_rrsig_expiration(rr));
- if(t - *env->now > 0) {
+ if((int32_t)t - (int32_t)*env->now > 0) {
t -= *env->now;
if(t < r)
r = t;
}
}
- return r;
+ return (time_t)r;
}
/** Is rr self-signed revoked key */
@@ -1239,7 +1245,7 @@ add_key(struct trust_anchor* tp, ldns_rr* rr)
}
/** get TTL from DNSKEY rrset */
-static uint32_t
+static time_t
key_ttl(struct ub_packed_rrset_key* k)
{
struct packed_rrset_data* d = (struct packed_rrset_data*)k->entry.data;
@@ -1248,10 +1254,10 @@ key_ttl(struct ub_packed_rrset_key* k)
/** update the time values for the trustpoint */
static void
-set_tp_times(struct trust_anchor* tp, uint32_t rrsig_exp_interval,
- uint32_t origttl, int* changed)
+set_tp_times(struct trust_anchor* tp, time_t rrsig_exp_interval,
+ time_t origttl, int* changed)
{
- uint32_t x, qi = tp->autr->query_interval, rt = tp->autr->retry_time;
+ time_t x, qi = tp->autr->query_interval, rt = tp->autr->retry_time;
/* x = MIN(15days, ttl/2, expire/2) */
x = 15 * 24 * 3600;
@@ -1444,21 +1450,21 @@ update_events(struct module_env* env, struct val_env* ve,
* @param holddown: the timer value
* @return number of seconds the holddown has passed.
*/
-static int
-check_holddown(struct module_env* env, struct autr_ta* ta,
+static time_t
+check_holddown(struct module_env* env, struct autr_ta* ta,
unsigned int holddown)
{
- unsigned int elapsed;
- if((unsigned)*env->now < (unsigned)ta->last_change) {
+ time_t elapsed;
+ if(*env->now < ta->last_change) {
log_warn("time goes backwards. delaying key holddown");
return 0;
}
- elapsed = (unsigned)*env->now - (unsigned)ta->last_change;
- if (elapsed > holddown) {
- return (int) (elapsed-holddown);
+ elapsed = *env->now - ta->last_change;
+ if (elapsed > (time_t)holddown) {
+ return elapsed-(time_t)holddown;
}
- verbose_key(ta, VERB_ALGO, "holddown time %d seconds to go",
- (int) (holddown-elapsed));
+ verbose_key(ta, VERB_ALGO, "holddown time %lld seconds to go",
+ (long long) ((time_t)holddown-elapsed));
return 0;
}
@@ -1498,11 +1504,11 @@ do_addtime(struct module_env* env, struct autr_ta* anchor, int* c)
/* This not according to RFC, this is 30 days, but the RFC demands
* MAX(30days, TTL expire time of first DNSKEY set with this key),
* The value may be too small if a very large TTL was used. */
- int exceeded = check_holddown(env, anchor, env->cfg->add_holddown);
+ time_t exceeded = check_holddown(env, anchor, env->cfg->add_holddown);
if (exceeded && anchor->s == AUTR_STATE_ADDPEND) {
verbose_key(anchor, VERB_ALGO, "add-holddown time exceeded "
- "%d seconds ago, and pending-count %d", exceeded,
- anchor->pending_count);
+ "%lld seconds ago, and pending-count %d",
+ (long long)exceeded, anchor->pending_count);
if(anchor->pending_count >= MIN_PENDINGCOUNT) {
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
anchor->pending_count = 0;
@@ -1517,10 +1523,10 @@ do_addtime(struct module_env* env, struct autr_ta* anchor, int* c)
static void
do_remtime(struct module_env* env, struct autr_ta* anchor, int* c)
{
- int exceeded = check_holddown(env, anchor, env->cfg->del_holddown);
+ time_t exceeded = check_holddown(env, anchor, env->cfg->del_holddown);
if(exceeded && anchor->s == AUTR_STATE_REVOKED) {
verbose_key(anchor, VERB_ALGO, "del-holddown time exceeded "
- "%d seconds ago", exceeded);
+ "%lld seconds ago", (long long)exceeded);
set_trustanchor_state(env, anchor, c, AUTR_STATE_REMOVED);
}
}
@@ -1649,7 +1655,7 @@ remove_missing_trustanchors(struct module_env* env, struct trust_anchor* tp,
int* changed)
{
struct autr_ta* anchor;
- int exceeded;
+ time_t exceeded;
int valid = 0;
/* see if we have anchors that are valid */
for(anchor = tp->autr->keys; anchor; anchor = anchor->next) {
@@ -1697,8 +1703,8 @@ remove_missing_trustanchors(struct module_env* env, struct trust_anchor* tp,
* one valid KSK: remove missing trust anchor */
if (exceeded && valid > 0) {
verbose_key(anchor, VERB_ALGO, "keep-missing time "
- "exceeded %d seconds ago, [%d key(s) VALID]",
- exceeded, valid);
+ "exceeded %lld seconds ago, [%d key(s) VALID]",
+ (long long)exceeded, valid);
set_trustanchor_state(env, anchor, changed,
AUTR_STATE_REMOVED);
}
@@ -1762,15 +1768,15 @@ autr_cleanup_keys(struct trust_anchor* tp)
/** calculate next probe time */
static time_t
-calc_next_probe(struct module_env* env, uint32_t wait)
+calc_next_probe(struct module_env* env, time_t wait)
{
/* make it random, 90-100% */
- uint32_t rnd, rest;
+ time_t rnd, rest;
if(wait < 3600)
wait = 3600;
rnd = wait/10;
rest = wait-rnd;
- rnd = (uint32_t)ub_random_max(env->rnd, (long int)rnd);
+ rnd = (time_t)ub_random_max(env->rnd, (long int)rnd);
return (time_t)(*env->now + rest + rnd);
}
@@ -1790,7 +1796,7 @@ reset_worker_timer(struct module_env* env)
{
struct timeval tv;
#ifndef S_SPLINT_S
- uint32_t next = (uint32_t)wait_probe_time(env->anchors);
+ time_t next = (time_t)wait_probe_time(env->anchors);
/* in case this is libunbound, no timer */
if(!env->probe_timer)
return;
@@ -1800,7 +1806,7 @@ reset_worker_timer(struct module_env* env)
#endif
tv.tv_usec = 0;
comm_timer_set(env->probe_timer, &tv);
- verbose(VERB_ALGO, "scheduled next probe in %d sec", (int)tv.tv_sec);
+ verbose(VERB_ALGO, "scheduled next probe in %lld sec", (long long)tv.tv_sec);
}
/** set next probe for trust anchor */
@@ -2156,7 +2162,7 @@ probe_anchor(struct module_env* env, struct trust_anchor* tp)
/** fetch first to-probe trust-anchor and lock it and set retrytime */
static struct trust_anchor*
-todo_probe(struct module_env* env, uint32_t* next)
+todo_probe(struct module_env* env, time_t* next)
{
struct trust_anchor* tp;
rbnode_t* el;
@@ -2171,9 +2177,9 @@ todo_probe(struct module_env* env, uint32_t* next)
lock_basic_lock(&tp->lock);
/* is it eligible? */
- if((uint32_t)tp->autr->next_probe_time > *env->now) {
+ if((time_t)tp->autr->next_probe_time > *env->now) {
/* no more to probe */
- *next = (uint32_t)tp->autr->next_probe_time - *env->now;
+ *next = (time_t)tp->autr->next_probe_time - *env->now;
lock_basic_unlock(&tp->lock);
lock_basic_unlock(&env->anchors->lock);
return NULL;
@@ -2188,11 +2194,11 @@ todo_probe(struct module_env* env, uint32_t* next)
return tp;
}
-uint32_t
+time_t
autr_probe_timer(struct module_env* env)
{
struct trust_anchor* tp;
- uint32_t next_probe = 3600;
+ time_t next_probe = 3600;
int num = 0;
verbose(VERB_ALGO, "autotrust probe timer callback");
/* while there are still anchors to probe */
diff --git a/validator/autotrust.h b/validator/autotrust.h
index 4e88ed32042a..193135cb66e6 100644
--- a/validator/autotrust.h
+++ b/validator/autotrust.h
@@ -104,9 +104,9 @@ struct autr_point_data {
time_t next_probe_time;
/** when to query if !failed */
- uint32_t query_interval;
+ time_t query_interval;
/** when to retry if failed */
- uint32_t retry_time;
+ time_t retry_time;
/**
* How many times did it fail. diagnostic only (has no effect).
@@ -151,7 +151,7 @@ size_t autr_get_num_anchors(struct val_anchors* anchors);
* @return time of next probe (in seconds from now).
* If 0, then there is no next probe anymore (trust points deleted).
*/
-uint32_t autr_probe_timer(struct module_env* env);
+time_t autr_probe_timer(struct module_env* env);
/** probe tree compare function */
int probetree_cmp(const void* x, const void* y);
diff --git a/validator/val_anchor.c b/validator/val_anchor.c
index cc551f83320f..e710f2f24083 100644
--- a/validator/val_anchor.c
+++ b/validator/val_anchor.c
@@ -242,6 +242,8 @@ anchor_new_ta(struct val_anchors* anchors, uint8_t* name, int namelabs,
}
#ifdef UNBOUND_DEBUG
r =
+#else
+ (void)
#endif
rbtree_insert(anchors->tree, &ta->node);
if(lockit) {
@@ -900,7 +902,7 @@ assemble_it(struct trust_anchor* ta, size_t num, uint16_t type)
free(pkey);
return NULL;
}
- pd->rr_ttl = (uint32_t*)malloc(num*sizeof(uint32_t));
+ pd->rr_ttl = (time_t*)malloc(num*sizeof(time_t));
if(!pd->rr_ttl) {
free(pd->rr_len);
free(pd);
diff --git a/validator/val_kcache.c b/validator/val_kcache.c
index 68e8c3f619b6..6d4ad8f32a14 100644
--- a/validator/val_kcache.c
+++ b/validator/val_kcache.c
@@ -126,7 +126,7 @@ key_cache_search(struct key_cache* kcache, uint8_t* name, size_t namelen,
struct key_entry_key*
key_cache_obtain(struct key_cache* kcache, uint8_t* name, size_t namelen,
- uint16_t key_class, struct regional* region, uint32_t now)
+ uint16_t key_class, struct regional* region, time_t now)
{
/* keep looking until we find a nonexpired entry */
while(1) {
diff --git a/validator/val_kcache.h b/validator/val_kcache.h
index c37cf1ecbafc..8f562109621a 100644
--- a/validator/val_kcache.h
+++ b/validator/val_kcache.h
@@ -106,7 +106,7 @@ void key_cache_remove(struct key_cache* kcache,
*/
struct key_entry_key* key_cache_obtain(struct key_cache* kcache,
uint8_t* name, size_t namelen, uint16_t key_class,
- struct regional* region, uint32_t now);
+ struct regional* region, time_t now);
/**
* Get memory in use by the key cache.
diff --git a/validator/val_kentry.c b/validator/val_kentry.c
index ddac140d316f..e9144838feb8 100644
--- a/validator/val_kentry.c
+++ b/validator/val_kentry.c
@@ -275,8 +275,8 @@ key_entry_setup(struct regional* region,
struct key_entry_key*
key_entry_create_null(struct regional* region,
- uint8_t* name, size_t namelen, uint16_t dclass, uint32_t ttl,
- uint32_t now)
+ uint8_t* name, size_t namelen, uint16_t dclass, time_t ttl,
+ time_t now)
{
struct key_entry_key* k;
struct key_entry_data* d;
@@ -294,7 +294,7 @@ key_entry_create_null(struct regional* region,
struct key_entry_key*
key_entry_create_rrset(struct regional* region,
uint8_t* name, size_t namelen, uint16_t dclass,
- struct ub_packed_rrset_key* rrset, uint8_t* sigalg, uint32_t now)
+ struct ub_packed_rrset_key* rrset, uint8_t* sigalg, time_t now)
{
struct key_entry_key* k;
struct key_entry_data* d;
@@ -321,8 +321,8 @@ key_entry_create_rrset(struct regional* region,
struct key_entry_key*
key_entry_create_bad(struct regional* region,
- uint8_t* name, size_t namelen, uint16_t dclass, uint32_t ttl,
- uint32_t now)
+ uint8_t* name, size_t namelen, uint16_t dclass, time_t ttl,
+ time_t now)
{
struct key_entry_key* k;
struct key_entry_data* d;
diff --git a/validator/val_kentry.h b/validator/val_kentry.h
index d14ffe588016..6a308f160f24 100644
--- a/validator/val_kentry.h
+++ b/validator/val_kentry.h
@@ -75,7 +75,7 @@ struct key_entry_key {
*/
struct key_entry_data {
/** the TTL of this entry (absolute time) */
- uint32_t ttl;
+ time_t ttl;
/** the key rrdata. can be NULL to signal keyless name. */
struct packed_rrset_data* rrset_data;
/** not NULL sometimes to give reason why bogus */
@@ -169,8 +169,8 @@ char* key_entry_get_reason(struct key_entry_key* kkey);
* @return new key entry or NULL on alloc failure
*/
struct key_entry_key* key_entry_create_null(struct regional* region,
- uint8_t* name, size_t namelen, uint16_t dclass, uint32_t ttl,
- uint32_t now);
+ uint8_t* name, size_t namelen, uint16_t dclass, time_t ttl,
+ time_t now);
/**
* Create a key entry from an rrset, in the given region.
@@ -185,7 +185,7 @@ struct key_entry_key* key_entry_create_null(struct regional* region,
*/
struct key_entry_key* key_entry_create_rrset(struct regional* region,
uint8_t* name, size_t namelen, uint16_t dclass,
- struct ub_packed_rrset_key* rrset, uint8_t* sigalg, uint32_t now);
+ struct ub_packed_rrset_key* rrset, uint8_t* sigalg, time_t now);
/**
* Create a bad entry, in the given region.
@@ -198,8 +198,8 @@ struct key_entry_key* key_entry_create_rrset(struct regional* region,
* @return new key entry or NULL on alloc failure
*/
struct key_entry_key* key_entry_create_bad(struct regional* region,
- uint8_t* name, size_t namelen, uint16_t dclass, uint32_t ttl,
- uint32_t now);
+ uint8_t* name, size_t namelen, uint16_t dclass, time_t ttl,
+ time_t now);
/**
* Obtain rrset from a key entry, allocated in region.
diff --git a/validator/val_neg.c b/validator/val_neg.c
index eec2eb1b6bb7..e8d9d56ad6fa 100644
--- a/validator/val_neg.c
+++ b/validator/val_neg.c
@@ -494,8 +494,8 @@ static struct val_neg_zone* neg_zone_chain(
struct val_neg_zone* p=first, *np;
while(p) {
np = p->parent;
- free(p);
free(p->name);
+ free(p);
p = np;
}
return NULL;
@@ -640,8 +640,8 @@ static struct val_neg_data* neg_data_chain(
struct val_neg_data* p = first, *np;
while(p) {
np = p->parent;
- free(p);
free(p->name);
+ free(p);
p = np;
}
return NULL;
@@ -917,7 +917,7 @@ static int neg_closest_data(struct val_neg_zone* zone,
}
int val_neg_dlvlookup(struct val_neg_cache* neg, uint8_t* qname, size_t len,
- uint16_t qclass, struct rrset_cache* rrset_cache, uint32_t now)
+ uint16_t qclass, struct rrset_cache* rrset_cache, time_t now)
{
/* lookup closest zone */
struct val_neg_zone* zone;
@@ -1138,7 +1138,7 @@ static struct ub_packed_rrset_key*
grab_nsec(struct rrset_cache* rrset_cache, uint8_t* qname, size_t qname_len,
uint16_t qtype, uint16_t qclass, uint32_t flags,
struct regional* region, int checkbit, uint16_t checktype,
- uint32_t now)
+ time_t now)
{
struct ub_packed_rrset_key* r, *k = rrset_cache_lookup(rrset_cache,
qname, qname_len, qtype, qclass, flags, now, 0);
@@ -1225,7 +1225,7 @@ neg_params_ok(struct val_neg_zone* zone, struct ub_packed_rrset_key* rrset)
static struct ub_packed_rrset_key*
neg_nsec3_getnc(struct val_neg_zone* zone, uint8_t* hashnc, size_t nclen,
struct rrset_cache* rrset_cache, struct regional* region,
- uint32_t now, uint8_t* b32, size_t maxb32)
+ time_t now, uint8_t* b32, size_t maxb32)
{
struct ub_packed_rrset_key* nc_rrset;
struct val_neg_data* data;
@@ -1258,7 +1258,7 @@ neg_nsec3_getnc(struct val_neg_zone* zone, uint8_t* hashnc, size_t nclen,
static struct dns_msg*
neg_nsec3_proof_ds(struct val_neg_zone* zone, uint8_t* qname, size_t qname_len,
int qlabs, ldns_buffer* buf, struct rrset_cache* rrset_cache,
- struct regional* region, uint32_t now, uint8_t* topname)
+ struct regional* region, time_t now, uint8_t* topname)
{
struct dns_msg* msg;
struct val_neg_data* data;
@@ -1356,7 +1356,7 @@ neg_nsec3_proof_ds(struct val_neg_zone* zone, uint8_t* qname, size_t qname_len,
* @param zone: val_neg_zone if we have one.
* @return false on lookup or alloc failure.
*/
-static int add_soa(struct rrset_cache* rrset_cache, uint32_t now,
+static int add_soa(struct rrset_cache* rrset_cache, time_t now,
struct regional* region, struct dns_msg* msg, struct val_neg_zone* zone)
{
struct ub_packed_rrset_key* soa;
@@ -1388,7 +1388,7 @@ static int add_soa(struct rrset_cache* rrset_cache, uint32_t now,
struct dns_msg*
val_neg_getmsg(struct val_neg_cache* neg, struct query_info* qinfo,
struct regional* region, struct rrset_cache* rrset_cache,
- ldns_buffer* buf, uint32_t now, int addsoa, uint8_t* topname)
+ ldns_buffer* buf, time_t now, int addsoa, uint8_t* topname)
{
struct dns_msg* msg;
struct ub_packed_rrset_key* rrset;
diff --git a/validator/val_neg.h b/validator/val_neg.h
index 01b423e1afb3..ec4f42f6ab7d 100644
--- a/validator/val_neg.h
+++ b/validator/val_neg.h
@@ -229,7 +229,7 @@ void val_neg_addreferral(struct val_neg_cache* neg, struct reply_info* rep,
* thus, qname DLV qclass does not exist.
*/
int val_neg_dlvlookup(struct val_neg_cache* neg, uint8_t* qname, size_t len,
- uint16_t qclass, struct rrset_cache* rrset_cache, uint32_t now);
+ uint16_t qclass, struct rrset_cache* rrset_cache, time_t now);
/**
* For the given query, try to get a reply out of the negative cache.
@@ -255,7 +255,7 @@ int val_neg_dlvlookup(struct val_neg_cache* neg, uint8_t* qname, size_t len,
*/
struct dns_msg* val_neg_getmsg(struct val_neg_cache* neg,
struct query_info* qinfo, struct regional* region,
- struct rrset_cache* rrset_cache, ldns_buffer* buf, uint32_t now,
+ struct rrset_cache* rrset_cache, ldns_buffer* buf, time_t now,
int addsoa, uint8_t* topname);
diff --git a/validator/val_nsec.c b/validator/val_nsec.c
index 8bda8dabc937..e377ca4b9401 100644
--- a/validator/val_nsec.c
+++ b/validator/val_nsec.c
@@ -197,7 +197,7 @@ nsec_verify_rrset(struct module_env* env, struct val_env* ve,
enum sec_status
val_nsec_prove_nodata_dsreply(struct module_env* env, struct val_env* ve,
struct query_info* qinfo, struct reply_info* rep,
- struct key_entry_key* kkey, uint32_t* proof_ttl, char** reason)
+ struct key_entry_key* kkey, time_t* proof_ttl, char** reason)
{
struct ub_packed_rrset_key* nsec = reply_find_rrset_section_ns(
rep, qinfo->qname, qinfo->qname_len, LDNS_RR_TYPE_NSEC,
diff --git a/validator/val_nsec.h b/validator/val_nsec.h
index 34f7f63b40ef..2e86fa978f74 100644
--- a/validator/val_nsec.h
+++ b/validator/val_nsec.h
@@ -73,7 +73,7 @@ struct key_entry_key;
enum sec_status val_nsec_prove_nodata_dsreply(struct module_env* env,
struct val_env* ve, struct query_info* qinfo,
struct reply_info* rep, struct key_entry_key* kkey,
- uint32_t* proof_ttl, char** reason);
+ time_t* proof_ttl, char** reason);
/**
* nsec typemap check, takes an NSEC-type bitmap as argument, checks for type.
diff --git a/validator/val_nsec3.c b/validator/val_nsec3.c
index 4b48e7beed60..20580c0d755f 100644
--- a/validator/val_nsec3.c
+++ b/validator/val_nsec3.c
@@ -713,6 +713,8 @@ nsec3_hash_name(rbtree_t* table, struct regional* region, ldns_buffer* buf,
return r;
#ifdef UNBOUND_DEBUG
n =
+#else
+ (void)
#endif
rbtree_insert(table, &c->node);
log_assert(n); /* cannot be duplicate, just did lookup */
diff --git a/validator/val_secalgo.c b/validator/val_secalgo.c
index 5cca578b1be1..92fd0cc4c8c2 100644
--- a/validator/val_secalgo.c
+++ b/validator/val_secalgo.c
@@ -669,12 +669,12 @@ static SECKEYPublicKey* nss_buf2ecdsa(unsigned char* key, size_t len, int algo)
SECKEYPublicKey* pk;
SECItem pub = {siBuffer, NULL, 0};
SECItem params = {siBuffer, NULL, 0};
- unsigned char param256[] = {
+ static unsigned char param256[] = {
/* OBJECTIDENTIFIER 1.2.840.10045.3.1.7 (P-256)
* {iso(1) member-body(2) us(840) ansi-x962(10045) curves(3) prime(1) prime256v1(7)} */
0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07
};
- unsigned char param384[] = {
+ static unsigned char param384[] = {
/* OBJECTIDENTIFIER 1.3.132.0.34 (P-384)
* {iso(1) identified-organization(3) certicom(132) curve(0) ansip384r1(34)} */
0x06, 0x05, 0x2b, 0x81, 0x04, 0x00, 0x22
@@ -845,19 +845,19 @@ nss_setup_key_digest(int algo, SECKEYPublicKey** pubkey, HASH_HashType* htype,
/* uses libNSS */
/* hash prefix for md5, RFC2537 */
- unsigned char p_md5[] = {0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a,
+ static unsigned char p_md5[] = {0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10};
/* hash prefix to prepend to hash output, from RFC3110 */
- unsigned char p_sha1[] = {0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B,
+ static unsigned char p_sha1[] = {0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B,
0x0E, 0x03, 0x02, 0x1A, 0x05, 0x00, 0x04, 0x14};
/* from RFC5702 */
- unsigned char p_sha256[] = {0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60,
+ static unsigned char p_sha256[] = {0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60,
0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x04, 0x20};
- unsigned char p_sha512[] = {0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60,
+ static unsigned char p_sha512[] = {0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60,
0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, 0x00, 0x04, 0x40};
/* from RFC6234 */
/* for future RSASHA384 ..
- unsigned char p_sha384[] = {0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60,
+ static unsigned char p_sha384[] = {0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60,
0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00, 0x04, 0x30};
*/
diff --git a/validator/val_sigcrypt.c b/validator/val_sigcrypt.c
index 79d5e45a2379..37e1ce14e21a 100644
--- a/validator/val_sigcrypt.c
+++ b/validator/val_sigcrypt.c
@@ -579,7 +579,7 @@ dnskey_verify_rrset(struct module_env* env, struct val_env* ve,
enum sec_status
dnskeyset_verify_rrset_sig(struct module_env* env, struct val_env* ve,
- uint32_t now, struct ub_packed_rrset_key* rrset,
+ time_t now, struct ub_packed_rrset_key* rrset,
struct ub_packed_rrset_key* dnskey, size_t sig_idx,
struct rbtree_t** sortree, char** reason)
{
@@ -808,7 +808,12 @@ canonical_compare(struct ub_packed_rrset_key* rrset, size_t i, size_t j)
case LDNS_RR_TYPE_MR:
case LDNS_RR_TYPE_PTR:
case LDNS_RR_TYPE_DNAME:
- return query_dname_compare(d->rr_data[i]+2,
+ /* the wireread function has already checked these
+ * dname's for correctness, and this double checks */
+ if(!dname_valid(d->rr_data[i]+2, d->rr_len[i]-2) ||
+ !dname_valid(d->rr_data[j]+2, d->rr_len[j]-2))
+ return 0;
+ return query_dname_compare(d->rr_data[i]+2,
d->rr_data[j]+2);
/* These RR types have STR and fixed size rdata fields
@@ -1215,12 +1220,12 @@ adjust_ttl(struct val_env* ve, uint32_t unow,
*
* Use the smallest of these.
*/
- if(d->ttl > (uint32_t)origttl) {
+ if(d->ttl > (time_t)origttl) {
verbose(VERB_QUERY, "rrset TTL larger than original TTL,"
" adjusting TTL downwards");
d->ttl = origttl;
}
- if(expittl > 0 && d->ttl > (uint32_t)expittl) {
+ if(expittl > 0 && d->ttl > (time_t)expittl) {
verbose(VERB_ALGO, "rrset TTL larger than sig expiration ttl,"
" adjusting TTL downwards");
d->ttl = expittl;
@@ -1229,7 +1234,7 @@ adjust_ttl(struct val_env* ve, uint32_t unow,
enum sec_status
dnskey_verify_rrset_sig(struct regional* region, ldns_buffer* buf,
- struct val_env* ve, uint32_t now,
+ struct val_env* ve, time_t now,
struct ub_packed_rrset_key* rrset, struct ub_packed_rrset_key* dnskey,
size_t dnskey_idx, size_t sig_idx,
struct rbtree_t** sortree, int* buf_canon, char** reason)
diff --git a/validator/val_sigcrypt.h b/validator/val_sigcrypt.h
index c220b0083ac3..9859d3c39087 100644
--- a/validator/val_sigcrypt.h
+++ b/validator/val_sigcrypt.h
@@ -274,7 +274,7 @@ enum sec_status dnskey_verify_rrset(struct module_env* env,
* or unchecked on error.
*/
enum sec_status dnskeyset_verify_rrset_sig(struct module_env* env,
- struct val_env* ve, uint32_t now, struct ub_packed_rrset_key* rrset,
+ struct val_env* ve, time_t now, struct ub_packed_rrset_key* rrset,
struct ub_packed_rrset_key* dnskey, size_t sig_idx,
struct rbtree_t** sortree, char** reason);
@@ -298,7 +298,7 @@ enum sec_status dnskeyset_verify_rrset_sig(struct module_env* env,
* bogus if it did not validate.
*/
enum sec_status dnskey_verify_rrset_sig(struct regional* region,
- ldns_buffer* buf, struct val_env* ve, uint32_t now,
+ ldns_buffer* buf, struct val_env* ve, time_t now,
struct ub_packed_rrset_key* rrset, struct ub_packed_rrset_key* dnskey,
size_t dnskey_idx, size_t sig_idx,
struct rbtree_t** sortree, int* buf_canon, char** reason);
diff --git a/validator/val_utils.c b/validator/val_utils.c
index d4a64464d808..73e7dbd9020f 100644
--- a/validator/val_utils.c
+++ b/validator/val_utils.c
@@ -486,7 +486,7 @@ val_verify_DNSKEY_with_DS(struct module_env* env, struct val_env* ve,
/* Once we see a single DS with a known digestID and
* algorithm, we cannot return INSECURE (with a
* "null" KeyEntry). */
- has_useful_ds = true;
+ has_useful_ds = 1;
sec = verify_dnskeys_with_ds_rr(env, ve, dnskey_rrset,
ds_rrset, i, reason);
@@ -596,7 +596,7 @@ val_verify_DNSKEY_with_TA(struct module_env* env, struct val_env* ve,
/* Once we see a single DS with a known digestID and
* algorithm, we cannot return INSECURE (with a
* "null" KeyEntry). */
- has_useful_ta = true;
+ has_useful_ta = 1;
sec = verify_dnskeys_with_ds_rr(env, ve, dnskey_rrset,
ta_ds, i, reason);
@@ -622,7 +622,7 @@ val_verify_DNSKEY_with_TA(struct module_env* env, struct val_env* ve,
continue;
/* we saw a useful TA */
- has_useful_ta = true;
+ has_useful_ta = 1;
sec = dnskey_verify_rrset(env, ve, dnskey_rrset,
ta_dnskey, i, reason);
@@ -773,6 +773,8 @@ rrset_has_signer(struct ub_packed_rrset_key* rrset, uint8_t* name, size_t len)
for(i = d->count; i< d->count+d->rrsig_count; i++) {
if(d->rr_len[i] > 2+18+len) {
/* at least rdatalen + signature + signame (+1 sig)*/
+ if(!dname_valid(d->rr_data[i]+2+18, d->rr_len[i]-2-18))
+ continue;
if(query_dname_compare(name, d->rr_data[i]+2+18) == 0)
{
return 1;
diff --git a/validator/validator.c b/validator/validator.c
index 10b0a243cdf0..ad472cc6a953 100644
--- a/validator/validator.c
+++ b/validator/validator.c
@@ -2398,7 +2398,7 @@ ds_response_to_ke(struct module_qstate* qstate, struct val_qstate* vq,
subtype == VAL_CLASS_NAMEERROR) {
/* NODATA means that the qname exists, but that there was
* no DS. This is a pretty normal case. */
- uint32_t proof_ttl = 0;
+ time_t proof_ttl = 0;
enum sec_status sec;
/* make sure there are NSECs or NSEC3s with signatures */