Your message dated Sat, 11 Apr 2015 17:47:01 +0200 with message-id <20150411154701.GC5982@ugent.be> and subject line Re: Bug#781097: unblock: knot/1.6.2-1 has caused the Debian Bug report #781097, regarding unblock: knot/1.6.2-1 to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 781097: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=781097 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: unblock: knot/1.6.2-1
- From: Ondřej Surý <ondrej@debian.org>
- Date: Tue, 24 Mar 2015 14:05:21 +0100
- Message-id: <20150324130521.8735.29448.reportbug@lettie.nic.cz>
Package: release.debian.org Severity: normal User: release.debian.org@packages.debian.org Usertags: unblock -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Please unblock package knot Hi, please unblock new upstream Knot DNS 1.6.2, since it contain some important bugfixes: Knot DNS 1.6.1 contains fix for journal files outgrowing the hard limit that could lead to (unlikely) resource (disk space) depletion on rare occasions. Knot DNS 1.6.2 contains fixes related to TCP connection exhaustion prevention (new max tcp connection limit and better inactive tcp client cleanup). Cheers, Ondrej P.S.: This is a sort of personal request as I also act as a upstream for this package. Also 1.6.x release is a Long Term Support, so it will make my life easier. Upstream changelog: Knot DNS 1.6.2 (2015-02-19) =========================== Features: - --------- - Limiting number of parallel TCP clients (max-tcp-clients config option) Bugfixes: - --------- - Ignore refresh and transfer events on non-slave zones - Compilation with Dnstap support on FreeBSD - Possible file descriptor leak when terminating inactive TCP clients Knot DNS 1.6.1 (2014-12-13) =========================== Bugfixes: - --------- - Journal file would sometimes outgrow its limit (ixfr-fslimit in configuration) - Fixed incompatibility with OpenSSL 0.9.8 - Proper handling when hostname cannot be retreived (for NSID and CH) Features: - --------- - DNSSEC Single Type Signing Scheme is now supported debdiff is attached unblock knot/1.6.2-1 - -- System Information: Debian Release: 8.0 APT prefers testing APT policy: (990, 'testing'), (700, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQJ8BAEBCgBmBQJVEWERXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzMEI5MzNEODBGQ0UzRDk4MUEyRDM4RkIw Qzk5QjcwRUY0RkNCQjA3AAoJEAyZtw70/LsHvGEP/A2+xlPJKTRIbYuX/YrwHL3r uWkmQIPKf0MAvv4ZTMPvDxHqPCPFMElFhK67F4sqGeDzW34tAfAYkLlyfVrkFW0G btaZl3to8RgWgluO3l/30ILxpUfEgUGDeuGImgFLH84jRnQ+uNovELZvpwZS/xQW KDG5A370QGOZ9Ir4/Oau4MEveCUfwzEkG6R922BnIDOZQK1EKmL823x0zy4z+mDo c9IVW7KPEqg/NzmqXvDRTGuF6uLN2s6Bc+TD6kKCMsZKxitV9QeH4MixYtchWV+Q gE2bpNjgxNhq1c3iYTDi1zlBTSTLQ5U0tWWQVfBtG8AnfgRnO1gdqshse3vdZJns 60EcjUw32Y7/SSLArw9qO2xFiQbR4CWqXfjvP1VIGLk4d9INQ+/ETHgqd4fYlXKi ancBAUYwztCSX9eq838XWRo+Yo9i6WzPKG6mUMo33p6VpZBO5iPUO9lOdMI7qPzI zmkttsiKmfSvzfD46Y4Sm8EkC+Su+3tbya6YksVGrDV3Ny5Hs3WZAdGE+VF+DJgD 6MIDPZeJIe+rj/97a+uUjDB4ztDc/dg8W8RsiCTmOpTRHNNH1/wqTaTpMPgBAKWZ Ojiq8S1T1Ygk9NoCVf3rMOmsI1SHA5R4ZQ/ILxe7bJww7LEk0v1+tYiI+GOfIKOH dnvx06kXNOzdQSSx3Vim =YpCA -----END PGP SIGNATURE-----diff -Nru knot-1.6.0/aclocal.m4 knot-1.6.2/aclocal.m4 --- knot-1.6.0/aclocal.m4 2014-10-23 16:25:32.000000000 +0200 +++ knot-1.6.2/aclocal.m4 2015-02-19 10:44:04.000000000 +0100 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.13.4 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. @@ -247,10 +247,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.13' +[am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.4], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -266,7 +266,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.13.4])dnl +[AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -291,7 +291,8 @@ : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], - [am_cv_ar_interface=ar + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) @@ -308,7 +309,7 @@ fi rm -f conftest.lib libconftest.a ]) - ]) + AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) @@ -692,6 +693,12 @@ # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -800,7 +807,48 @@ AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <http://www.gnu.org/software/coreutils/>. + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further @@ -808,7 +856,6 @@ m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -938,38 +985,6 @@ rm -f confinc confmf ]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. @@ -1040,6 +1055,70 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. diff -Nru knot-1.6.0/configure knot-1.6.2/configure --- knot-1.6.0/configure 2014-10-23 16:25:33.000000000 +0200 +++ knot-1.6.2/configure 2015-02-19 10:44:05.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for knot 1.6.0. +# Generated by GNU Autoconf 2.69 for knot 1.6.2. # # Report bugs to <knot-dns@labs.nic.cz>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='knot' PACKAGE_TARNAME='knot' -PACKAGE_VERSION='1.6.0' -PACKAGE_STRING='knot 1.6.0' +PACKAGE_VERSION='1.6.2' +PACKAGE_STRING='knot 1.6.2' PACKAGE_BUGREPORT='knot-dns@labs.nic.cz' PACKAGE_URL='' @@ -1391,7 +1391,7 @@ # 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 knot 1.6.0 to adapt to many kinds of systems. +\`configure' configures knot 1.6.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1461,7 +1461,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of knot 1.6.0:";; + short | recursive ) echo "Configuration of knot 1.6.2:";; esac cat <<\_ACEOF @@ -1627,7 +1627,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -knot configure 1.6.0 +knot configure 1.6.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2050,7 +2050,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by knot $as_me 1.6.0, which was +It was created by knot $as_me 1.6.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2406,7 +2406,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version='1.13' +am__api_version='1.14' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2921,7 +2921,7 @@ # Define the identity of the package. PACKAGE='knot' - VERSION='1.6.0' + VERSION='1.6.2' cat >>confdefs.h <<_ACEOF @@ -2972,6 +2972,47 @@ +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <http://www.gnu.org/software/coreutils/>. + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; @@ -3867,6 +3908,65 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +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 + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -4717,131 +4817,6 @@ fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - ac_c_preproc_warn_flag=yes @@ -4956,7 +4931,13 @@ if ${am_cv_ar_interface+:} false; then : $as_echo_n "(cached) " >&6 else - am_cv_ar_interface=ar + 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 + + am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; @@ -4987,6 +4968,11 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 @@ -15480,7 +15466,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by knot $as_me 1.6.0, which was +This file was extended by knot $as_me 1.6.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15546,7 +15532,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -knot config.status 1.6.0 +knot config.status 1.6.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru knot-1.6.0/configure.ac knot-1.6.2/configure.ac --- knot-1.6.0/configure.ac 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/configure.ac 2015-02-19 10:43:56.000000000 +0100 @@ -1,7 +1,7 @@ # -*- Autoconf -*- AC_PREREQ([2.60]) -AC_INIT([knot], [1.6.0], [knot-dns@labs.nic.cz]) +AC_INIT([knot], [1.6.2], [knot-dns@labs.nic.cz]) AM_INIT_AUTOMAKE([gnits subdir-objects dist-xz -Wall -Werror]) AM_SILENT_RULES([yes]) AC_CONFIG_SRCDIR([src/knot/main.c]) diff -Nru knot-1.6.0/debian/changelog knot-1.6.2/debian/changelog --- knot-1.6.0/debian/changelog 2014-10-24 12:41:48.000000000 +0200 +++ knot-1.6.2/debian/changelog 2015-02-20 11:10:40.000000000 +0100 @@ -1,3 +1,28 @@ +knot (1.6.2-1) unstable; urgency=medium + + * New upstream version 1.6.2 + + Features: + - Limiting number of parallel TCP clients (max-tcp-clients config option) + + Bugfixes: + - Ignore refresh and transfer events on non-slave zones + - Compilation with Dnstap support on FreeBSD + - Possible file descriptor leak when terminating inactive TCP clients + * Update patches for 1.6.2 release + + -- Ondřej Surý <ondrej@debian.org> Fri, 20 Feb 2015 11:09:34 +0100 + +knot (1.6.1-1) unstable; urgency=medium + + * New upstream version 1.6.1 + + Bugfixes: + - Journal file would sometimes outgrow its limit (ixfr-fslimit in configuration) + - Fixed incompatibility with OpenSSL 0.9.8 + - Proper handling when hostname cannot be retreived (for NSID and CH) + + Features: + - DNSSEC Single Type Signing Scheme is now supported + + -- Ondřej Surý <ondrej@debian.org> Tue, 30 Dec 2014 09:50:54 +0100 + knot (1.6.0-1) unstable; urgency=medium * New upstream version 1.6.0 diff -Nru knot-1.6.0/debian/patches/0001-loosen-openssl-dependency.patch knot-1.6.2/debian/patches/0001-loosen-openssl-dependency.patch --- knot-1.6.0/debian/patches/0001-loosen-openssl-dependency.patch 2014-10-24 12:41:48.000000000 +0200 +++ knot-1.6.2/debian/patches/0001-loosen-openssl-dependency.patch 2015-02-20 11:10:40.000000000 +0100 @@ -1,6 +1,6 @@ --- knot.orig/configure +++ knot/configure -@@ -13603,23 +13603,6 @@ if test "$with_openssl" = "no"; then : +@@ -13589,23 +13589,6 @@ if test "$with_openssl" = "no"; then : fi diff -Nru knot-1.6.0/doc/configuration.rst knot-1.6.2/doc/configuration.rst --- knot-1.6.0/doc/configuration.rst 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/doc/configuration.rst 2015-02-19 10:43:56.000000000 +0100 @@ -293,7 +293,6 @@ (even for verification only). * There cannot be more than eight keys per zone. Keys which are not published are not included in this number. -* Single-Type Signing Scheme is not supported. Example how to generate NSEC3 capable zone signing key (ZSK) and key signing key (KSK) for zone ``example.com``:: @@ -325,8 +324,9 @@ for any keys that are present in keydir, but missing in zone file. * Removing expired signatures, invalid signatures, signatures expiring in a short time, and signatures with unknown key. -* Creating any missing signatures. ``DNSKEY`` records are signed by - both ZSK and KSK keys, other records are signed only by ZSK keys. +* Creating missing signatures. Unless the Single-Type Signing Scheme + is used, ``DNSKEY`` records in a zone apex are signed by KSK keys and + all other records are signed by ZSK keys. * SOA record is updated and resigned if any changes were performed. The zone signing is performed when the zone is loaded into server, on diff -Nru knot-1.6.0/doc/Makefile.in knot-1.6.2/doc/Makefile.in --- knot-1.6.0/doc/Makefile.in 2014-10-23 16:25:35.000000000 +0200 +++ knot-1.6.2/doc/Makefile.in 2015-02-19 10:44:07.000000000 +0100 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -390,9 +390,9 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +@HAVE_SPHINXBUILD_FALSE@html-local: @HAVE_PDFLATEX_FALSE@pdf-local: @HAVE_SPHINXBUILD_FALSE@pdf-local: -@HAVE_SPHINXBUILD_FALSE@html-local: @HAVE_MAKEINFO_FALSE@info-local: @HAVE_SPHINXBUILD_FALSE@info-local: clean: clean-am diff -Nru knot-1.6.0/doc/reference.rst knot-1.6.2/doc/reference.rst --- knot-1.6.0/doc/reference.rst 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/doc/reference.rst 2015-02-19 10:43:56.000000000 +0100 @@ -35,6 +35,7 @@ [ max-conn-idle ( integer | integer(s | m | h | d); ) ] [ max-conn-handshake ( integer | integer(s | m | h | d); ) ] [ max-conn-reply ( integer | integer(s | m | h | d); ) ] + [ max-tcp-clients integer; ] [ transfers integer; ] [ rate-limit integer; ] [ rate-limit-size integer; ] @@ -227,6 +228,13 @@ Maximum time to wait for a reply to an issued SOA query. +.. _max-tcp-clients: + +max-tcp-clients +^^^^^^^^^^^^^^^ + +Maximum number of TCP clients connected in parallel, set this below file descriptor limit to avoid resource exhaustion. + .. _transfers: transfers diff -Nru knot-1.6.0/INSTALL knot-1.6.2/INSTALL --- knot-1.6.0/INSTALL 2014-10-23 16:25:34.000000000 +0200 +++ knot-1.6.2/INSTALL 2015-02-19 10:44:07.000000000 +0100 @@ -12,8 +12,8 @@ Basic Installation ================== - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented diff -Nru knot-1.6.0/libtap/Makefile.in knot-1.6.2/libtap/Makefile.in --- knot-1.6.0/libtap/Makefile.in 2014-10-23 16:25:35.000000000 +0200 +++ knot-1.6.2/libtap/Makefile.in 2015-02-19 10:44:07.000000000 +0100 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff -Nru knot-1.6.0/Makefile.in knot-1.6.2/Makefile.in --- knot-1.6.0/Makefile.in 2014-10-23 16:25:35.000000000 +0200 +++ knot-1.6.2/Makefile.in 2015-02-19 10:44:07.000000000 +0100 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -595,10 +595,16 @@ $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -640,9 +646,10 @@ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ diff -Nru knot-1.6.0/man/kdig.1 knot-1.6.2/man/kdig.1 --- knot-1.6.0/man/kdig.1 2014-10-23 16:25:44.000000000 +0200 +++ knot-1.6.2/man/kdig.1 2015-02-19 10:44:15.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "kdig" "1" "2014-10-23" "CZ.NIC Labs" "Knot DNS, version 1.6.0" +.TH "kdig" "1" "2015-02-19" "CZ.NIC Labs" "Knot DNS, version 1.6.2" .SH NAME .TP 5 .B kdig diff -Nru knot-1.6.0/man/khost.1 knot-1.6.2/man/khost.1 --- knot-1.6.0/man/khost.1 2014-10-23 16:25:44.000000000 +0200 +++ knot-1.6.2/man/khost.1 2015-02-19 10:44:15.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "khost" "1" "2014-10-23" "CZ.NIC Labs" "Knot DNS, version 1.6.0" +.TH "khost" "1" "2015-02-19" "CZ.NIC Labs" "Knot DNS, version 1.6.2" .SH NAME .TP 6 .B khost diff -Nru knot-1.6.0/man/knotc.8 knot-1.6.2/man/knotc.8 --- knot-1.6.0/man/knotc.8 2014-10-23 16:25:44.000000000 +0200 +++ knot-1.6.2/man/knotc.8 2015-02-19 10:44:15.000000000 +0100 @@ -1,4 +1,4 @@ -.TH knotc "8" "2014-10-23" "CZ.NIC Labs" "Knot DNS, version 1.6.0" +.TH knotc "8" "2015-02-19" "CZ.NIC Labs" "Knot DNS, version 1.6.2" .SH NAME .B knotc \- Knot DNS control utility diff -Nru knot-1.6.0/man/knot.conf.5 knot-1.6.2/man/knot.conf.5 --- knot-1.6.0/man/knot.conf.5 2014-10-23 16:25:44.000000000 +0200 +++ knot-1.6.2/man/knot.conf.5 2015-02-19 10:44:15.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "knot.conf" "5" "2014-10-23" "CZ.NIC Labs" "Knot DNS, version 1.6.0" +.TH "knot.conf" "5" "2015-02-19" "CZ.NIC Labs" "Knot DNS, version 1.6.2" .SH NAME .B knot.conf \- Configuration file manual for Knot DNS server. @@ -67,15 +67,15 @@ # Maximum idle time between requests on a TCP connection # It is also possible to suffix with unit size [s/m/h/d] # f.e. 1s = 1 second, 1m = 1 minute, 1h = 1 hour, 1d = 1 day - # Default: 60s - max-conn-idle 60s; + # Default: 20s + max-conn-idle 20s; # Maximum time between newly accepted TCP connection and first query # This is useful to disconnect inactive connections faster # It is also possible to suffix with unit size [s/m/h/d] # f.e. 1s = 1 second, 1m = 1 minute, 1h = 1 hour, 1d = 1 day - # Default: 10s - max-conn-handshake 10s; + # Default: 5s + max-conn-handshake 5s; # Maximum time to wait for a reply to SOA query # It is also possible to suffix with unit size [s/m/h/d] @@ -83,6 +83,11 @@ # Default: 10s max-conn-reply 10s; + # Number of parallel TCP clients + # Set this below the descriptor limit to avoid resource exhaustion + # Default: 100 + max-tcp-clients 100; + # Number of parallel transfers # This number also includes pending SOA queries # Minimal value is number of CPUs diff -Nru knot-1.6.0/man/knot.conf.5.in knot-1.6.2/man/knot.conf.5.in --- knot-1.6.0/man/knot.conf.5.in 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/man/knot.conf.5.in 2015-02-19 10:43:56.000000000 +0100 @@ -67,15 +67,15 @@ # Maximum idle time between requests on a TCP connection # It is also possible to suffix with unit size [s/m/h/d] # f.e. 1s = 1 second, 1m = 1 minute, 1h = 1 hour, 1d = 1 day - # Default: 60s - max-conn-idle 60s; + # Default: 20s + max-conn-idle 20s; # Maximum time between newly accepted TCP connection and first query # This is useful to disconnect inactive connections faster # It is also possible to suffix with unit size [s/m/h/d] # f.e. 1s = 1 second, 1m = 1 minute, 1h = 1 hour, 1d = 1 day - # Default: 10s - max-conn-handshake 10s; + # Default: 5s + max-conn-handshake 5s; # Maximum time to wait for a reply to SOA query # It is also possible to suffix with unit size [s/m/h/d] @@ -83,6 +83,11 @@ # Default: 10s max-conn-reply 10s; + # Number of parallel TCP clients + # Set this below the descriptor limit to avoid resource exhaustion + # Default: 100 + max-tcp-clients 100; + # Number of parallel transfers # This number also includes pending SOA queries # Minimal value is number of CPUs diff -Nru knot-1.6.0/man/knotd.8 knot-1.6.2/man/knotd.8 --- knot-1.6.0/man/knotd.8 2014-10-23 16:25:44.000000000 +0200 +++ knot-1.6.2/man/knotd.8 2015-02-19 10:44:15.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "knotd" "8" "2014-10-23" "CZ.NIC Labs" "Knot DNS, version 1.6.0" +.TH "knotd" "8" "2015-02-19" "CZ.NIC Labs" "Knot DNS, version 1.6.2" .SH NAME .B knotd \- Knot DNS server daemon diff -Nru knot-1.6.0/man/knsec3hash.1 knot-1.6.2/man/knsec3hash.1 --- knot-1.6.0/man/knsec3hash.1 2014-10-23 16:25:44.000000000 +0200 +++ knot-1.6.2/man/knsec3hash.1 2015-02-19 10:44:15.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "knsec3hash" "1" "2014-10-23" "CZ.NIC Labs" "Knot DNS, version 1.6.0" +.TH "knsec3hash" "1" "2015-02-19" "CZ.NIC Labs" "Knot DNS, version 1.6.2" .SH NAME .B knsec3hash \- Simple utility to compute NSEC3 hash (libknot equivalent of ISC nsec3hash) diff -Nru knot-1.6.0/man/knsupdate.1 knot-1.6.2/man/knsupdate.1 --- knot-1.6.0/man/knsupdate.1 2014-10-23 16:25:44.000000000 +0200 +++ knot-1.6.2/man/knsupdate.1 2015-02-19 10:44:15.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "knsupdate" "1" "2014-10-23" "CZ.NIC Labs" "Knot DNS, version 1.6.0" +.TH "knsupdate" "1" "2015-02-19" "CZ.NIC Labs" "Knot DNS, version 1.6.2" .SH NAME .TP 10 .B knsupdate diff -Nru knot-1.6.0/man/Makefile.in knot-1.6.2/man/Makefile.in --- knot-1.6.0/man/Makefile.in 2014-10-23 16:25:35.000000000 +0200 +++ knot-1.6.2/man/Makefile.in 2015-02-19 10:44:07.000000000 +0100 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff -Nru knot-1.6.0/missing knot-1.6.2/missing --- knot-1.6.0/missing 2014-10-23 16:25:34.000000000 +0200 +++ knot-1.6.2/missing 2015-02-19 10:44:06.000000000 +0100 @@ -1,7 +1,7 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. @@ -160,7 +160,7 @@ ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff -Nru knot-1.6.0/NEWS knot-1.6.2/NEWS --- knot-1.6.0/NEWS 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/NEWS 2015-02-19 10:43:56.000000000 +0100 @@ -1,3 +1,29 @@ +Knot DNS 1.6.2 (2015-02-19) +=========================== + +Features: +--------- + - Limiting number of parallel TCP clients (max-tcp-clients config option) + +Bugfixes: +--------- + - Ignore refresh and transfer events on non-slave zones + - Compilation with Dnstap support on FreeBSD + - Possible file descriptor leak when terminating inactive TCP clients + +Knot DNS 1.6.1 (2014-12-13) +=========================== + +Bugfixes: +--------- + - Journal file would sometimes outgrow its limit (ixfr-fslimit in configuration) + - Fixed incompatibility with OpenSSL 0.9.8 + - Proper handling when hostname cannot be retreived (for NSID and CH) + +Features: +--------- + - DNSSEC Single Type Signing Scheme is now supported + Knot DNS 1.6.0 (2014-10-23) =========================== diff -Nru knot-1.6.0/patches/Makefile.in knot-1.6.2/patches/Makefile.in --- knot-1.6.0/patches/Makefile.in 2014-10-23 16:25:35.000000000 +0200 +++ knot-1.6.2/patches/Makefile.in 2015-02-19 10:44:07.000000000 +0100 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff -Nru knot-1.6.0/README knot-1.6.2/README --- knot-1.6.0/README 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/README 2015-02-19 10:43:56.000000000 +0100 @@ -85,8 +85,8 @@ Running ======= -1) Each server needs configuration file. Please see samples/knot.sample.conf -for reference or samples/knot.full.conf for more examples. +1) Each server needs configuration file. Please see samples/knot.sample.conf, +project documentation, or man 5 knot.conf for more details. Configuration file has to specify: - storage for PID files, journal files etc. - network interfaces diff -Nru knot-1.6.0/samples/Makefile.in knot-1.6.2/samples/Makefile.in --- knot-1.6.0/samples/Makefile.in 2014-10-23 16:25:35.000000000 +0200 +++ knot-1.6.2/samples/Makefile.in 2015-02-19 10:44:07.000000000 +0100 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff -Nru knot-1.6.0/src/common-knot/crc.h knot-1.6.2/src/common-knot/crc.h --- knot-1.6.0/src/common-knot/crc.h 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/common-knot/crc.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,77 +0,0 @@ -/* Copyright (C) 2011 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> - * - * 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/>. - */ -/*! - * \file crc.h - * - * \author UFO - * - * \brief Dummy interface to CRC function of libz library. Should be removed - * - * \addtogroup common_lib - * @{ - */ - -#pragma once - -#include <zlib.h> -#include <stdint.h> - - -/** - * The type of the CRC values. - * - * This type must be big enough to contain at least 32 bits. - *****************************************************************************/ -typedef uint32_t crc_t; - - -/** - * Calculate the initial crc value. - * - * \return The initial crc value. - *****************************************************************************/ -static inline crc_t crc_init(void) -{ - return adler32(0L, NULL, 0); -} - - -/** - * Update the crc value with new data. - * - * \param crc The current crc value. - * \param data Pointer to a buffer of \a data_len bytes. - * \param data_len Number of bytes in the \a data buffer. - * \return The updated crc value. - *****************************************************************************/ -static inline crc_t crc_update(crc_t crc, const unsigned char *data, size_t data_len) -{ - return adler32(crc, data, data_len); -} - - -/** - * Calculate the final crc value. - * - * \param crc The current crc value. - * \return The final crc value. - *****************************************************************************/ -static inline crc_t crc_finalize(crc_t crc) -{ - return crc; -} - -/*! @} */ diff -Nru knot-1.6.0/src/config.h.in knot-1.6.2/src/config.h.in --- knot-1.6.0/src/config.h.in 2014-10-23 16:25:34.000000000 +0200 +++ knot-1.6.2/src/config.h.in 2015-02-19 10:44:06.000000000 +0100 @@ -178,9 +178,6 @@ */ #undef LT_OBJDIR -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* Name of package */ #undef PACKAGE diff -Nru knot-1.6.0/src/dnstap/convert.c knot-1.6.2/src/dnstap/convert.c --- knot-1.6.0/src/dnstap/convert.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/dnstap/convert.c 2015-02-19 10:43:56.000000000 +0100 @@ -15,6 +15,8 @@ */ #include <sys/socket.h> +#include <sys/types.h> +#include <netinet/in.h> #include <netinet/ip.h> #include "dnstap/convert.h" diff -Nru knot-1.6.0/src/dnstap/Makefile.in knot-1.6.2/src/dnstap/Makefile.in --- knot-1.6.0/src/dnstap/Makefile.in 2014-10-23 16:25:35.000000000 +0200 +++ knot-1.6.2/src/dnstap/Makefile.in 2015-02-19 10:44:07.000000000 +0100 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff -Nru knot-1.6.0/src/knot/conf/cf-lex.l knot-1.6.2/src/knot/conf/cf-lex.l --- knot-1.6.0/src/knot/conf/cf-lex.l 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/conf/cf-lex.l 2015-02-19 10:43:56.000000000 +0100 @@ -127,6 +127,7 @@ max-conn-idle { lval.t = yytext; return MAX_CONN_IDLE; } max-conn-handshake { lval.t = yytext; return MAX_CONN_HS; } max-conn-reply { lval.t = yytext; return MAX_CONN_REPLY; } +max-tcp-clients { lval.t = yytext; return MAX_TCP_CLIENTS; } rate-limit { lval.t = yytext; return RATE_LIMIT; } rate-limit-size { lval.t = yytext; return RATE_LIMIT_SIZE; } rate-limit-slip { lval.t = yytext; return RATE_LIMIT_SLIP; } diff -Nru knot-1.6.0/src/knot/conf/cf-parse.y knot-1.6.2/src/knot/conf/cf-parse.y --- knot-1.6.0/src/knot/conf/cf-parse.y 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/conf/cf-parse.y 2015-02-19 10:43:56.000000000 +0100 @@ -43,6 +43,7 @@ extern int cf_lex (YYSTYPE *lvalp, void *scanner); extern void cf_error(void *scanner, const char *format, ...); +extern void cf_warning(void *scanner, const char *format, ...); extern conf_t *new_config; static conf_iface_t *this_iface = 0; static conf_iface_t *this_remote = 0; @@ -53,6 +54,8 @@ static conf_log_map_t *this_logmap = 0; //#define YYERROR_VERBOSE 1 +static char *cache_hostname = NULL; + #define SET_NUM(out, in, min, max, name) \ { \ if (in < min || in > max) { \ @@ -67,6 +70,11 @@ #define SET_INT(out, in, name) SET_NUM(out, in, 0, INT_MAX, name); #define SET_SIZE(out, in, name) SET_NUM(out, in, 0, SIZE_MAX, name); +static void conf_start(void *scanner) +{ + cache_hostname = NULL; +} + static void conf_init_iface(void *scanner, char* ifname) { this_iface = malloc(sizeof(conf_iface_t)); @@ -419,18 +427,35 @@ } } +static char *get_hostname(void *scanner) +{ + if (cache_hostname) { + return strdup(cache_hostname); + } + + char *fqdn = sockaddr_hostname(); + if (!fqdn) { + cf_warning(scanner, "cannot retrieve host FQDN"); + return NULL; + } + + cache_hostname = fqdn; + + return fqdn; +} + /*! \brief Generate automatic defaults for server identity, version and NSID. */ -static void ident_auto(int tok, conf_t *conf, bool val) +static void ident_auto(void *scanner, int tok, conf_t *conf, bool val) { switch(tok) { case SVERSION: opt_replace(&conf->version, strdup("Knot DNS " PACKAGE_VERSION), val); break; case IDENTITY: - opt_replace(&conf->identity, sockaddr_hostname(), val); + opt_replace(&conf->identity, get_hostname(scanner), val); break; case NSID: - opt_replace(&conf->nsid, sockaddr_hostname(), val); + opt_replace(&conf->nsid, get_hostname(scanner), val); if (conf->nsid) { conf->nsid_len = strlen(conf->nsid); } @@ -493,6 +518,7 @@ %token <tok> MAX_CONN_IDLE %token <tok> MAX_CONN_HS %token <tok> MAX_CONN_REPLY +%token <tok> MAX_TCP_CLIENTS %token <tok> RATE_LIMIT %token <tok> RATE_LIMIT_SIZE %token <tok> RATE_LIMIT_SLIP @@ -519,7 +545,7 @@ %% -config: conf_entries END { return 0; } ; +config: { conf_start(scanner); } conf_entries END { return 0; } ; conf_entries: /* EMPTY */ @@ -569,31 +595,30 @@ system: SYSTEM '{' | system SVERSION TEXT ';' { new_config->version = $3.t; } - | system SVERSION BOOL ';' { ident_auto(SVERSION, new_config, $3.i); } + | system SVERSION BOOL ';' { ident_auto(scanner, SVERSION, new_config, $3.i); } | system IDENTITY TEXT ';' { new_config->identity = $3.t; } - | system IDENTITY BOOL ';' { ident_auto(IDENTITY, new_config, $3.i); } + | system IDENTITY BOOL ';' { ident_auto(scanner, IDENTITY, new_config, $3.i); } | system HOSTNAME TEXT ';' { - fprintf(stderr, "warning: Config option 'system.hostname' is deprecated. " - "Use 'system.identity' instead.\n"); + cf_warning(scanner, "option 'system.hostname' is deprecated, " + "use 'system.identity' instead"); free($3.t); } | system NSID HEXSTR ';' { new_config->nsid = $3.t; new_config->nsid_len = $3.l; } | system NSID TEXT ';' { new_config->nsid = $3.t; new_config->nsid_len = strlen(new_config->nsid); } - | system NSID BOOL ';' { ident_auto(NSID, new_config, $3.i); } + | system NSID BOOL ';' { ident_auto(scanner, NSID, new_config, $3.i); } | system MAX_UDP_PAYLOAD NUM ';' { SET_NUM(new_config->max_udp_payload, $3.i, KNOT_EDNS_MIN_UDP_PAYLOAD, KNOT_EDNS_MAX_UDP_PAYLOAD, "max-udp-payload"); } | system STORAGE TEXT ';' { - fprintf(stderr, "warning: Config option 'system.storage' was relocated. " - "Use 'zones.storage' instead.\n"); + cf_warning(scanner, "option 'system.storage' was relocated, " + "use 'zones.storage' instead"); new_config->storage = $3.t; } | system RUNDIR TEXT ';' { new_config->rundir = $3.t; } | system PIDFILE TEXT ';' { new_config->pidfile = $3.t; } | system KEY TSIG_ALGO_NAME TEXT ';' { - fprintf(stderr, "warning: Config option 'system.key' is deprecated " - "and has no effect.\n"); + cf_warning(scanner, "option 'system.key' is deprecated and it has no effect"); free($4.t); } | system WORKERS NUM ';' { @@ -635,6 +660,9 @@ | system MAX_CONN_REPLY INTERVAL ';' { SET_INT(new_config->max_conn_reply, $3.i, "max-conn-reply"); } + | system MAX_TCP_CLIENTS NUM ';' { + SET_INT(new_config->max_tcp_clients, $3.i, "max-tcp-clients"); + } | system RATE_LIMIT NUM ';' { SET_INT(new_config->rrl, $3.i, "rate-limit"); } @@ -983,8 +1011,8 @@ log_prios: log_prios_start | log_prios LOG_LEVEL ',' { this_logmap->prios |= $2.i; - fprintf(stderr, "Warning: more log severities per statement is deprecated. " - "Using the least serious one.\n"); + cf_warning(scanner, "multiple log severities are deprecated, " + "using the least serious one"); } | log_prios LOG_LEVEL ';' { this_logmap->prios |= $2.i; } ; diff -Nru knot-1.6.0/src/knot/conf/conf.c knot-1.6.2/src/knot/conf/conf.c --- knot-1.6.0/src/knot/conf/conf.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/conf/conf.c 2015-02-19 10:43:56.000000000 +0100 @@ -59,7 +59,7 @@ static volatile int _parser_res = 0; /*!< \brief Parser result. */ static pthread_mutex_t _parser_lock = PTHREAD_MUTEX_INITIALIZER; -static void cf_print_error(void *scanner, const char *msg) +static void cf_print_error(void *scanner, int priority, const char *msg) { conf_extra_t *extra = NULL; int lineno = -1; @@ -84,10 +84,8 @@ filename = new_config->filename; } - log_error("config error, file '%s', line %d, token '%s' (%s)", - filename, lineno, text, msg); - - _parser_res = KNOT_EPARSEFAIL; + log_msg(priority, "config, file '%s', line %d, token '%s', %s", + filename, lineno, text, msg); } /*! \brief Config error report. */ @@ -100,7 +98,21 @@ vsnprintf(buffer, sizeof(buffer), format, ap); va_end(ap); - cf_print_error(scanner, buffer); + cf_print_error(scanner, LOG_ERR, buffer); + _parser_res = KNOT_EPARSEFAIL; +} + +/*! \brief Config warning report. */ +void cf_warning(void *scanner, const char *format, ...) +{ + char buffer[ERROR_BUFFER_SIZE]; + va_list ap; + + va_start(ap, format); + vsnprintf(buffer, sizeof(buffer), format, ap); + va_end(ap); + + cf_print_error(scanner, LOG_WARNING, buffer); } /*! @@ -199,6 +211,9 @@ if (conf->max_conn_reply < 1) { conf->max_conn_reply = CONFIG_REPLY_WD; } + if (conf->max_tcp_clients < 1) { + conf->max_tcp_clients = CONFIG_MAXTCP; + } /* Default interface. */ conf_iface_t *ctl_if = conf->ctl.iface; diff -Nru knot-1.6.0/src/knot/conf/conf.h knot-1.6.2/src/knot/conf/conf.h --- knot-1.6.0/src/knot/conf/conf.h 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/conf/conf.h 2015-02-19 10:43:56.000000000 +0100 @@ -50,8 +50,9 @@ #define CONFIG_NOTIFY_TIMEOUT 60 /*!< 60s (suggested in RFC1996) */ #define CONFIG_DBSYNC_TIMEOUT 0 /*!< Sync immediately. */ #define CONFIG_REPLY_WD 10 /*!< SOA/NOTIFY query timeout [s]. */ -#define CONFIG_HANDSHAKE_WD 10 /*!< [secs] for connection to make a request.*/ -#define CONFIG_IDLE_WD 60 /*!< [secs] of allowed inactivity between requests */ +#define CONFIG_HANDSHAKE_WD 5 /*!< [secs] for connection to make a request.*/ +#define CONFIG_IDLE_WD 20 /*!< [secs] of allowed inactivity between requests */ +#define CONFIG_MAXTCP 100 /*!< Default limit on incoming TCP clients. */ #define CONFIG_RRL_SLIP 1 /*!< Default slip value. */ #define CONFIG_RRL_SIZE 393241 /*!< Htable default size. */ #define CONFIG_XFERS 10 @@ -219,6 +220,7 @@ int max_conn_idle; /*!< TCP idle timeout. */ int max_conn_hs; /*!< TCP of inactivity before first query. */ int max_conn_reply; /*!< TCP/UDP query timeout. */ + int max_tcp_clients; /*!< TCP client limit. */ int rrl; /*!< Rate limit (in responses per second). */ size_t rrl_size; /*!< Rate limit htable size. */ int rrl_slip; /*!< Rate limit SLIP. */ diff -Nru knot-1.6.0/src/knot/conf/libknotd_la-cf-lex.c knot-1.6.2/src/knot/conf/libknotd_la-cf-lex.c --- knot-1.6.0/src/knot/conf/libknotd_la-cf-lex.c 2014-10-23 16:25:45.000000000 +0200 +++ knot-1.6.2/src/knot/conf/libknotd_la-cf-lex.c 2015-02-19 10:44:16.000000000 +0100 @@ -363,8 +363,8 @@ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 93 -#define YY_END_OF_BUFFER 94 +#define YY_NUM_RULES 94 +#define YY_END_OF_BUFFER 95 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -372,70 +372,71 @@ flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[569] = +static yyconst flex_int16_t yy_accept[580] = { 0, - 0, 0, 0, 0, 94, 93, 2, 3, 93, 93, - 3, 88, 74, 74, 89, 88, 93, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 90, 93, 2, 0, 87, 86, 0, 1, 88, - 88, 74, 0, 88, 73, 72, 72, 88, 0, 77, - 0, 0, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 70, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - - 88, 88, 88, 88, 88, 88, 88, 88, 88, 90, - 0, 92, 91, 88, 78, 0, 77, 77, 77, 0, - 0, 88, 68, 88, 55, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 11, 88, 54, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 50, 88, 88, 88, - 88, 91, 88, 0, 0, 77, 77, 77, 0, 0, - 0, 0, 76, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 16, 88, 88, 88, 88, 88, - - 88, 88, 63, 88, 88, 12, 88, 88, 88, 8, - 88, 49, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 31, 88, - 88, 88, 88, 58, 88, 0, 0, 0, 0, 0, - 0, 88, 52, 88, 88, 88, 88, 88, 62, 88, - 88, 66, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 15, - 88, 0, 0, 88, 88, 88, 88, 88, 88, 88, - - 88, 14, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 64, 88, 88, 88, 88, 88, - 33, 88, 88, 56, 88, 60, 59, 88, 61, 4, - 88, 88, 88, 88, 88, 88, 23, 88, 88, 75, - 0, 0, 48, 88, 88, 88, 51, 88, 88, 88, - 88, 88, 88, 88, 88, 71, 88, 88, 88, 88, - 88, 88, 88, 88, 32, 88, 88, 13, 88, 88, - 88, 10, 88, 88, 88, 7, 65, 28, 24, 88, - 0, 0, 88, 88, 88, 67, 88, 88, 88, 79, - 80, 88, 6, 5, 88, 88, 88, 88, 88, 88, - - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 69, 88, 88, 77, 0, 57, 88, 88, 88, - 88, 88, 81, 88, 88, 88, 88, 88, 88, 53, - 88, 88, 26, 88, 88, 88, 88, 88, 88, 88, - 88, 42, 25, 88, 0, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 47, 88, 88, 88, 88, 88, - 88, 27, 88, 88, 88, 39, 88, 88, 88, 88, - 88, 88, 17, 88, 88, 82, 83, 84, 85, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 22, 88, - - 88, 88, 88, 88, 88, 46, 88, 88, 88, 88, - 88, 88, 88, 43, 44, 88, 88, 36, 88, 88, - 88, 88, 88, 88, 88, 35, 88, 21, 88, 88, - 88, 88, 38, 88, 19, 20, 88, 88, 88, 88, - 88, 88, 88, 88, 9, 40, 41, 18, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 30, - 29, 88, 37, 45, 88, 88, 34, 0 + 0, 0, 0, 0, 95, 94, 2, 3, 94, 94, + 3, 89, 75, 75, 90, 89, 94, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 91, 94, 2, 0, 88, 87, 0, 1, 89, + 89, 75, 0, 89, 74, 73, 73, 89, 0, 78, + 0, 0, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 71, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + + 89, 89, 89, 89, 89, 89, 89, 89, 89, 91, + 0, 93, 92, 89, 79, 0, 78, 78, 78, 0, + 0, 89, 69, 89, 56, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 11, 89, 55, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 51, 89, 89, 89, + 89, 92, 89, 0, 0, 78, 78, 78, 0, 0, + 0, 0, 77, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 16, 89, 89, 89, 89, 89, + + 89, 89, 64, 89, 89, 12, 89, 89, 89, 8, + 89, 50, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 31, 89, + 89, 89, 89, 59, 89, 0, 0, 0, 0, 0, + 0, 89, 53, 89, 89, 89, 89, 89, 63, 89, + 89, 67, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 15, 89, 0, 0, 89, 89, 89, 89, 89, 89, + + 89, 89, 14, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 65, 89, 89, 89, + 89, 89, 33, 89, 89, 57, 89, 61, 60, 89, + 62, 4, 89, 89, 89, 89, 89, 89, 23, 89, + 89, 76, 0, 0, 49, 89, 89, 89, 52, 89, + 89, 89, 89, 89, 89, 89, 89, 72, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 32, 89, 89, + 13, 89, 89, 89, 10, 89, 89, 89, 7, 66, + 28, 24, 89, 0, 0, 89, 89, 89, 68, 89, + 89, 89, 80, 81, 89, 6, 5, 89, 89, 89, + + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 70, 89, 89, 78, 0, + 58, 89, 89, 89, 89, 89, 82, 89, 89, 89, + 89, 89, 89, 54, 89, 89, 89, 26, 89, 89, + 89, 89, 89, 89, 89, 89, 43, 25, 89, 0, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 48, + 89, 89, 89, 89, 89, 89, 89, 27, 89, 89, + 89, 40, 89, 89, 89, 89, 89, 89, 17, 89, + 89, 83, 84, 85, 86, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + + 89, 89, 89, 89, 89, 22, 89, 89, 89, 89, + 89, 89, 89, 47, 89, 89, 89, 89, 89, 89, + 89, 44, 45, 89, 89, 36, 89, 89, 89, 89, + 89, 89, 89, 89, 35, 89, 21, 89, 89, 89, + 89, 38, 89, 89, 19, 20, 89, 89, 89, 89, + 89, 89, 89, 89, 39, 9, 41, 42, 18, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 30, 29, 89, 37, 46, 89, 89, 34, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -479,346 +480,352 @@ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } ; -static yyconst flex_int16_t yy_base[587] = +static yyconst flex_int16_t yy_base[598] = { 0, - 0, 0, 49, 53, 806, 807, 57, 807, 58, 802, - 0, 0, 57, 756, 785, 99, 784, 95, 775, 79, - 102, 758, 765, 38, 83, 105, 768, 23, 771, 96, - 106, 107, 751, 119, 117, 753, 112, 124, 130, 763, - 754, 157, 160, 165, 167, 807, 807, 789, 807, 0, - 164, 743, 772, 0, 0, 0, 0, 173, 771, 196, - 770, 769, 757, 749, 99, 735, 755, 744, 747, 753, - 736, 735, 735, 740, 736, 731, 747, 729, 741, 187, - 739, 720, 725, 735, 718, 721, 730, 732, 0, 733, - 719, 730, 715, 721, 719, 120, 724, 190, 712, 728, - - 719, 723, 721, 708, 723, 706, 705, 704, 707, 189, - 191, 807, 725, 735, 0, 724, 733, 223, 722, 721, - 246, 696, 698, 689, 0, 697, 699, 689, 688, 686, - 704, 686, 689, 697, 681, 718, 696, 679, 684, 206, - 682, 690, 677, 675, 673, 0, 709, 681, 685, 682, - 668, 669, 680, 670, 679, 681, 233, 668, 191, 663, - 184, 666, 655, 676, 659, 657, 0, 661, 663, 690, - 666, 807, 271, 677, 0, 686, 0, 675, 674, 683, - 280, 303, 807, 660, 642, 658, 659, 654, 643, 650, - 651, 655, 651, 638, 0, 639, 634, 670, 638, 631, - - 629, 643, 0, 630, 664, 0, 640, 277, 167, 0, - 635, 0, 619, 660, 622, 631, 626, 637, 632, 635, - 618, 614, 632, 618, 626, 612, 610, 609, 0, 618, - 617, 620, 287, 292, 641, 640, 629, 0, 638, 0, - 327, 602, 0, 602, 610, 600, 602, 612, 0, 603, - 610, 0, 594, 593, 228, 609, 600, 604, 595, 600, - 599, 591, 589, 598, 596, 576, 588, 598, 586, 591, - 578, 575, 582, 575, 572, 573, 570, 581, 580, 574, - 579, 575, 578, 568, 568, 563, 566, 558, 568, 0, - 336, 0, 593, 557, 565, 556, 558, 560, 569, 564, - - 586, 0, 558, 562, 557, 552, 544, 557, 556, 559, - 202, 577, 545, 542, 0, 574, 550, 542, 544, 534, - 0, 542, 568, 0, 529, 0, 0, 543, 0, 0, - 542, 534, 563, 531, 536, 524, 0, 522, 529, 0, - 556, 0, 0, 525, 523, 516, 0, 524, 552, 294, - 526, 543, 530, 525, 505, 0, 515, 524, 512, 514, - 510, 510, 540, 320, 0, 507, 508, 0, 516, 503, - 500, 0, 499, 510, 505, 0, 0, 0, 0, 508, - 0, 529, 504, 497, 496, 0, 507, 494, 501, 0, - 0, 320, 0, 0, 486, 499, 491, 493, 488, 518, - - 484, 485, 477, 491, 486, 490, 484, 510, 477, 485, - 471, 0, 475, 505, 0, 0, 0, 472, 481, 471, - 482, 458, 0, 288, 489, 495, 461, 496, 465, 0, - 323, 475, 0, 456, 455, 461, 452, 452, 467, 458, - 486, 0, 0, 449, 467, 445, 482, 439, 460, 457, - 472, 469, 470, 471, 0, 452, 446, 453, 449, 447, - 427, 0, 433, 444, 437, 465, 438, 436, 433, 419, - 424, 419, 0, 429, 430, 0, 0, 0, 0, 429, - 418, 423, 424, 419, 422, 423, 417, 425, 411, 423, - 424, 417, 412, 442, 409, 417, 404, 414, 0, 415, - - 413, 406, 402, 410, 394, 0, 267, 410, 388, 405, - 407, 391, 391, 0, 0, 401, 388, 0, 381, 403, - 385, 383, 376, 391, 389, 0, 393, 0, 378, 386, - 390, 386, 0, 389, 0, 0, 387, 376, 372, 370, - 387, 382, 369, 357, 0, 0, 0, 0, 329, 319, - 318, 328, 320, 296, 284, 284, 287, 248, 239, 0, - 0, 240, 0, 0, 217, 203, 0, 807, 365, 370, - 375, 379, 382, 385, 390, 393, 396, 399, 214, 402, - 405, 194, 168, 120, 73, 50 + 0, 0, 49, 53, 817, 818, 57, 818, 58, 813, + 0, 0, 57, 767, 796, 99, 795, 95, 786, 79, + 102, 769, 776, 38, 83, 105, 779, 23, 782, 96, + 106, 107, 762, 119, 117, 764, 112, 124, 130, 774, + 765, 157, 160, 165, 167, 818, 818, 800, 818, 0, + 164, 754, 783, 0, 0, 0, 0, 173, 782, 196, + 781, 780, 768, 760, 99, 746, 766, 755, 758, 764, + 747, 746, 746, 751, 747, 742, 758, 740, 752, 187, + 750, 731, 736, 746, 729, 732, 741, 743, 0, 744, + 730, 741, 726, 732, 730, 120, 735, 190, 723, 739, + + 730, 734, 732, 719, 734, 717, 716, 715, 718, 189, + 191, 818, 736, 746, 0, 735, 744, 223, 733, 732, + 246, 707, 709, 700, 0, 708, 710, 700, 699, 697, + 715, 697, 700, 708, 692, 729, 707, 690, 695, 206, + 693, 701, 688, 686, 684, 0, 720, 692, 696, 693, + 679, 680, 691, 681, 690, 692, 233, 679, 191, 674, + 184, 677, 666, 687, 670, 668, 0, 672, 674, 701, + 677, 818, 271, 688, 0, 697, 0, 686, 685, 694, + 280, 303, 818, 671, 653, 669, 670, 665, 654, 661, + 662, 666, 662, 649, 0, 650, 645, 681, 649, 642, + + 640, 654, 0, 641, 675, 0, 651, 277, 167, 0, + 646, 0, 630, 671, 633, 642, 637, 648, 643, 646, + 629, 625, 643, 629, 637, 623, 621, 620, 0, 629, + 628, 631, 289, 293, 652, 651, 640, 0, 649, 0, + 328, 613, 0, 613, 621, 611, 613, 623, 0, 614, + 621, 0, 605, 604, 228, 620, 611, 615, 606, 611, + 610, 602, 600, 610, 608, 606, 586, 598, 608, 596, + 601, 588, 585, 592, 585, 582, 583, 580, 591, 590, + 584, 589, 585, 588, 578, 578, 573, 576, 568, 578, + 0, 337, 0, 603, 567, 575, 566, 568, 570, 579, + + 574, 596, 0, 568, 572, 567, 562, 554, 567, 566, + 569, 202, 587, 555, 552, 551, 0, 583, 559, 551, + 553, 543, 0, 551, 577, 0, 538, 0, 0, 552, + 0, 0, 551, 543, 572, 540, 545, 533, 0, 531, + 538, 0, 565, 0, 0, 534, 532, 525, 0, 533, + 561, 295, 535, 552, 539, 534, 514, 0, 524, 533, + 521, 523, 519, 519, 549, 548, 321, 0, 515, 516, + 0, 524, 511, 508, 0, 507, 518, 513, 0, 0, + 0, 0, 516, 0, 537, 512, 505, 504, 0, 515, + 502, 509, 0, 0, 321, 0, 0, 494, 507, 499, + + 501, 496, 526, 504, 491, 492, 484, 498, 493, 497, + 491, 517, 484, 492, 478, 0, 482, 512, 0, 0, + 0, 479, 488, 478, 489, 465, 0, 288, 496, 502, + 468, 503, 472, 0, 324, 472, 481, 0, 462, 461, + 467, 458, 458, 473, 464, 492, 0, 0, 455, 473, + 451, 488, 445, 466, 463, 478, 475, 476, 477, 0, + 458, 452, 459, 455, 453, 448, 432, 0, 438, 449, + 442, 470, 443, 441, 438, 424, 429, 424, 0, 434, + 435, 0, 0, 0, 0, 434, 423, 428, 429, 424, + 433, 426, 427, 421, 429, 415, 427, 428, 421, 416, + + 446, 413, 421, 408, 418, 0, 419, 417, 410, 407, + 405, 413, 397, 0, 267, 413, 391, 408, 410, 394, + 394, 0, 0, 404, 391, 0, 384, 388, 405, 387, + 385, 378, 393, 391, 0, 395, 0, 380, 388, 392, + 388, 0, 377, 390, 0, 0, 388, 377, 373, 371, + 388, 383, 370, 358, 0, 0, 0, 0, 0, 330, + 320, 319, 329, 321, 297, 285, 284, 288, 248, 239, + 0, 0, 240, 0, 0, 217, 203, 0, 818, 366, + 371, 376, 380, 383, 386, 391, 394, 397, 400, 214, + 403, 406, 194, 168, 120, 73, 50 + } ; -static yyconst flex_int16_t yy_def[587] = +static yyconst flex_int16_t yy_def[598] = { 0, - 568, 1, 569, 569, 568, 568, 568, 568, 570, 571, - 572, 572, 568, 13, 573, 572, 574, 16, 16, 16, - 16, 16, 16, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 568, 575, 568, 570, 568, 568, 571, 568, 572, - 572, 13, 573, 16, 572, 16, 572, 572, 573, 568, - 574, 576, 16, 572, 572, 572, 16, 572, 572, 16, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - - 572, 572, 572, 572, 572, 572, 572, 572, 572, 568, - 575, 568, 568, 51, 58, 577, 60, 568, 578, 576, - 568, 16, 572, 572, 572, 572, 16, 572, 572, 16, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 568, 572, 577, 579, 118, 118, 580, 581, 121, - 568, 121, 568, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 173, 579, 581, 582, 181, 181, - 181, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 583, 582, 572, 572, 572, 572, 572, 572, 572, - - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 291, - 583, 584, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 585, 584, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 585, 586, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 586, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 0, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568 + 579, 1, 580, 580, 579, 579, 579, 579, 581, 582, + 583, 583, 579, 13, 584, 583, 585, 16, 16, 16, + 16, 16, 16, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 579, 586, 579, 581, 579, 579, 582, 579, 583, + 583, 13, 584, 16, 583, 16, 583, 583, 584, 579, + 585, 587, 16, 583, 583, 583, 16, 583, 583, 16, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + + 583, 583, 583, 583, 583, 583, 583, 583, 583, 579, + 586, 579, 579, 51, 58, 588, 60, 579, 589, 587, + 579, 16, 583, 583, 583, 583, 16, 583, 583, 16, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 579, 583, 588, 590, 118, 118, 591, 592, 121, + 579, 121, 579, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 173, 590, 592, 593, 181, 181, + 181, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 594, 593, 583, 583, 583, 583, 583, 583, + + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 292, 594, 595, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 596, 595, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 596, 597, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 597, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 583, 583, 583, 583, 583, 583, 0, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 579, 579, 579, 579, 579 + } ; -static yyconst flex_int16_t yy_nxt[858] = +static yyconst flex_int16_t yy_nxt[869] = { 0, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15, 8, 16, 12, 12, 17, 6, 12, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 12, 41, - 42, 42, 445, 43, 42, 42, 83, 43, 44, 44, + 42, 42, 450, 43, 42, 42, 83, 43, 44, 44, 46, 84, 47, 50, 51, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 53, 415, 54, 55, 50, 75, + 52, 52, 52, 52, 53, 419, 54, 55, 50, 75, 76, 50, 54, 54, 54, 56, 54, 54, 50, 57, 50, 55, 50, 57, 50, 50, 50, 50, 50, 57, 50, 50, 50, 50, 58, 50, 50, 54, 54, 54, 54, 54, 54, 54, 54, 54, 53, 68, 54, 77, - 69, 78, 382, 63, 54, 54, 54, 54, 54, 54, + 69, 78, 385, 63, 54, 54, 54, 54, 54, 54, 64, 70, 65, 79, 86, 71, 88, 66, 87, 72, 90, 124, 80, 89, 93, 91, 96, 125, 94, 101, 97, 102, 81, 104, 103, 106, 156, 105, 110, 110, 98, 157, 112, 95, 113, 99, 44, 44, 107, 46, - 341, 47, 114, 114, 114, 114, 114, 114, 114, 114, + 343, 47, 114, 114, 114, 114, 114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 110, 110, 115, 112, 265, 113, 293, 266, 115, 115, + 110, 110, 115, 112, 266, 113, 294, 267, 115, 115, 115, 115, 115, 115, 117, 117, 117, 117, 117, 117, 117, 117, 117, 118, 140, 119, 236, 141, 159, 224, 221, 119, 119, 119, 119, 119, 119, 225, 160, 222, 142, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 177, 201, 178, 359, 360, 567, 566, 202, 178, 178, + 177, 201, 178, 361, 362, 578, 577, 202, 178, 178, 178, 178, 178, 178, 180, 180, 180, 180, 180, 180, - 180, 180, 180, 181, 304, 182, 218, 565, 564, 183, - 305, 182, 182, 182, 182, 182, 182, 563, 219, 235, + 180, 180, 180, 181, 305, 182, 218, 576, 575, 183, + 306, 182, 182, 182, 182, 182, 182, 574, 219, 235, 235, 235, 235, 235, 235, 235, 235, 235, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 240, 451, 241, + 239, 239, 239, 239, 239, 239, 239, 240, 456, 241, - 523, 452, 524, 183, 263, 241, 241, 241, 241, 241, + 532, 457, 533, 183, 263, 241, 241, 241, 241, 241, 241, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 287, 264, 289, 388, 562, 288, 561, 560, 389, 423, - 424, 425, 559, 426, 290, 241, 241, 241, 241, 241, - 241, 241, 241, 241, 340, 340, 340, 340, 340, 340, - 340, 340, 340, 402, 558, 458, 459, 557, 403, 556, - 555, 404, 554, 405, 460, 6, 6, 6, 6, 6, - 45, 45, 45, 45, 45, 48, 48, 48, 48, 48, - 50, 50, 553, 50, 59, 59, 59, 61, 61, 61, - 111, 111, 111, 111, 111, 120, 120, 120, 174, 174, - - 174, 119, 119, 119, 178, 178, 178, 237, 237, 237, - 552, 551, 550, 549, 548, 547, 546, 545, 544, 543, - 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, - 532, 531, 530, 529, 528, 527, 526, 525, 522, 521, - 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, - 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, - 500, 499, 498, 497, 496, 495, 494, 493, 492, 491, - 490, 489, 488, 487, 486, 485, 484, 483, 482, 481, - 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, - 183, 470, 469, 468, 467, 466, 465, 464, 463, 462, - - 461, 457, 456, 455, 454, 453, 450, 449, 448, 447, - 446, 444, 443, 442, 441, 440, 439, 438, 437, 436, - 435, 434, 433, 432, 431, 430, 429, 428, 427, 412, - 422, 421, 420, 419, 418, 417, 416, 414, 413, 412, - 411, 410, 409, 408, 407, 406, 401, 400, 399, 398, - 397, 396, 395, 394, 393, 392, 391, 390, 387, 386, - 385, 384, 383, 381, 380, 379, 378, 377, 376, 375, - 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, - 364, 363, 362, 361, 358, 357, 356, 355, 354, 353, - 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, - - 342, 339, 338, 337, 336, 335, 334, 333, 332, 331, - 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, - 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, - 310, 309, 308, 307, 306, 303, 302, 301, 300, 299, - 298, 297, 296, 295, 294, 238, 181, 292, 291, 286, - 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, - 275, 274, 273, 272, 271, 270, 269, 268, 267, 262, - 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, - 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, - 238, 181, 177, 175, 118, 234, 233, 232, 231, 230, - - 229, 228, 227, 226, 223, 220, 217, 216, 215, 214, - 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, - 203, 200, 199, 198, 197, 196, 195, 194, 193, 192, - 191, 190, 189, 188, 187, 186, 185, 184, 179, 118, - 175, 118, 173, 172, 171, 170, 169, 168, 167, 166, - 165, 164, 163, 162, 161, 158, 155, 154, 153, 152, - 151, 150, 89, 149, 148, 147, 146, 145, 144, 143, - 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, - 129, 128, 127, 126, 123, 122, 121, 62, 116, 60, - 50, 49, 109, 108, 100, 92, 85, 82, 74, 73, - - 67, 62, 60, 50, 49, 568, 5, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568 + 264, 265, 288, 290, 391, 573, 572, 289, 571, 392, + 427, 428, 429, 570, 430, 291, 241, 241, 241, 241, + 241, 241, 241, 241, 241, 342, 342, 342, 342, 342, + 342, 342, 342, 342, 406, 569, 463, 464, 568, 407, + 567, 566, 408, 565, 409, 465, 6, 6, 6, 6, + 6, 45, 45, 45, 45, 45, 48, 48, 48, 48, + 48, 50, 50, 564, 50, 59, 59, 59, 61, 61, + 61, 111, 111, 111, 111, 111, 120, 120, 120, 174, + + 174, 174, 119, 119, 119, 178, 178, 178, 237, 237, + 237, 563, 562, 561, 560, 559, 558, 557, 556, 555, + 554, 553, 552, 551, 550, 549, 548, 547, 546, 545, + 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, + 534, 531, 530, 529, 528, 527, 526, 525, 524, 523, + 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, + 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, + 502, 501, 500, 499, 498, 497, 496, 495, 494, 493, + 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, + 482, 481, 480, 479, 478, 477, 183, 476, 475, 474, + + 473, 472, 471, 470, 469, 468, 467, 466, 462, 461, + 460, 459, 458, 455, 454, 453, 452, 451, 449, 448, + 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, + 437, 436, 435, 434, 433, 432, 431, 416, 426, 425, + 424, 423, 422, 421, 420, 418, 417, 416, 415, 414, + 413, 412, 411, 410, 405, 404, 403, 402, 401, 400, + 399, 398, 397, 396, 395, 394, 393, 390, 389, 388, + 387, 386, 384, 383, 382, 381, 380, 379, 378, 377, + 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, + 366, 365, 364, 363, 360, 359, 358, 357, 356, 355, + + 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, + 344, 341, 340, 339, 338, 337, 336, 335, 334, 333, + 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, + 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, + 312, 311, 310, 309, 308, 307, 304, 303, 302, 301, + 300, 299, 298, 297, 296, 295, 238, 181, 293, 292, + 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, + 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, + 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, + 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, + + 242, 238, 181, 177, 175, 118, 234, 233, 232, 231, + 230, 229, 228, 227, 226, 223, 220, 217, 216, 215, + 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, + 204, 203, 200, 199, 198, 197, 196, 195, 194, 193, + 192, 191, 190, 189, 188, 187, 186, 185, 184, 179, + 118, 175, 118, 173, 172, 171, 170, 169, 168, 167, + 166, 165, 164, 163, 162, 161, 158, 155, 154, 153, + 152, 151, 150, 89, 149, 148, 147, 146, 145, 144, + 143, 139, 138, 137, 136, 135, 134, 133, 132, 131, + 130, 129, 128, 127, 126, 123, 122, 121, 62, 116, + + 60, 50, 49, 109, 108, 100, 92, 85, 82, 74, + 73, 67, 62, 60, 50, 49, 579, 5, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579 } ; -static yyconst flex_int16_t yy_chk[858] = +static yyconst flex_int16_t yy_chk[869] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 3, 586, 3, 4, 4, 28, 4, 7, 7, + 3, 3, 597, 3, 4, 4, 28, 4, 7, 7, 9, 28, 9, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 585, 13, 13, 13, 24, + 13, 13, 13, 13, 13, 596, 13, 13, 13, 24, 24, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 20, 16, 25, - 20, 25, 584, 18, 16, 16, 16, 16, 16, 16, + 20, 25, 595, 18, 16, 16, 16, 16, 16, 16, 18, 21, 18, 26, 30, 21, 31, 18, 30, 21, 32, 65, 26, 31, 34, 32, 35, 65, 34, 37, 35, 37, 26, 38, 37, 39, 96, 38, 42, 42, 35, 96, 43, 34, 43, 35, 44, 44, 39, 45, - 583, 45, 51, 51, 51, 51, 51, 51, 51, 51, + 594, 45, 51, 51, 51, 51, 51, 51, 51, 51, 51, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 110, 110, 58, 111, 209, 111, 582, 209, 58, 58, + 110, 110, 58, 111, 209, 111, 593, 209, 58, 58, 58, 58, 58, 58, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 80, 60, 579, 80, 98, 161, + 60, 60, 60, 60, 80, 60, 590, 80, 98, 161, 159, 60, 60, 60, 60, 60, 60, 161, 98, 159, 80, 118, 118, 118, 118, 118, 118, 118, 118, 118, - 118, 140, 118, 311, 311, 566, 565, 140, 118, 118, + 118, 140, 118, 312, 312, 577, 576, 140, 118, 118, 118, 118, 118, 118, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 255, 121, 157, 562, 559, 121, - 255, 121, 121, 121, 121, 121, 121, 558, 157, 173, + 121, 121, 121, 121, 255, 121, 157, 573, 570, 121, + 255, 121, 121, 121, 121, 121, 121, 569, 157, 173, 173, 173, 173, 173, 173, 173, 173, 173, 181, 181, - 181, 181, 181, 181, 181, 181, 181, 181, 424, 181, + 181, 181, 181, 181, 181, 181, 181, 181, 428, 181, - 507, 424, 507, 181, 208, 181, 181, 181, 181, 181, + 515, 428, 515, 181, 208, 181, 181, 181, 181, 181, 181, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 233, 208, 234, 350, 557, 233, 556, 555, 350, 392, - 392, 392, 554, 392, 234, 241, 241, 241, 241, 241, - 241, 241, 241, 241, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 364, 553, 431, 431, 552, 364, 551, - 550, 364, 549, 364, 431, 569, 569, 569, 569, 569, - 570, 570, 570, 570, 570, 571, 571, 571, 571, 571, - 572, 572, 544, 572, 573, 573, 573, 574, 574, 574, - 575, 575, 575, 575, 575, 576, 576, 576, 577, 577, - - 577, 578, 578, 578, 580, 580, 580, 581, 581, 581, - 543, 542, 541, 540, 539, 538, 537, 534, 532, 531, - 530, 529, 527, 525, 524, 523, 522, 521, 520, 519, - 517, 516, 513, 512, 511, 510, 509, 508, 505, 504, - 503, 502, 501, 500, 498, 497, 496, 495, 494, 493, - 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, - 482, 481, 480, 475, 474, 472, 471, 470, 469, 468, - 467, 466, 465, 464, 463, 461, 460, 459, 458, 457, - 456, 454, 453, 452, 451, 450, 449, 448, 447, 446, - 445, 444, 441, 440, 439, 438, 437, 436, 435, 434, - - 432, 429, 428, 427, 426, 425, 422, 421, 420, 419, - 418, 414, 413, 411, 410, 409, 408, 407, 406, 405, - 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, - 389, 388, 387, 385, 384, 383, 382, 380, 375, 374, - 373, 371, 370, 369, 367, 366, 363, 362, 361, 360, - 359, 358, 357, 355, 354, 353, 352, 351, 349, 348, - 346, 345, 344, 341, 339, 338, 336, 335, 334, 333, - 332, 331, 328, 325, 323, 322, 320, 319, 318, 317, - 316, 314, 313, 312, 310, 309, 308, 307, 306, 305, - 304, 303, 301, 300, 299, 298, 297, 296, 295, 294, - - 293, 289, 288, 287, 286, 285, 284, 283, 282, 281, - 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, - 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, - 260, 259, 258, 257, 256, 254, 253, 251, 250, 248, - 247, 246, 245, 244, 242, 239, 237, 236, 235, 232, - 231, 230, 228, 227, 226, 225, 224, 223, 222, 221, - 220, 219, 218, 217, 216, 215, 214, 213, 211, 207, - 205, 204, 202, 201, 200, 199, 198, 197, 196, 194, - 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, - 180, 179, 178, 176, 174, 171, 170, 169, 168, 166, - - 165, 164, 163, 162, 160, 158, 156, 155, 154, 153, - 152, 151, 150, 149, 148, 147, 145, 144, 143, 142, - 141, 139, 138, 137, 136, 135, 134, 133, 132, 131, - 130, 129, 128, 127, 126, 124, 123, 122, 120, 119, - 117, 116, 114, 113, 109, 108, 107, 106, 105, 104, - 103, 102, 101, 100, 99, 97, 95, 94, 93, 92, - 91, 90, 88, 87, 86, 85, 84, 83, 82, 81, - 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, - 69, 68, 67, 66, 64, 63, 62, 61, 59, 53, - 52, 48, 41, 40, 36, 33, 29, 27, 23, 22, - - 19, 17, 15, 14, 10, 5, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568 + 208, 208, 233, 234, 352, 568, 567, 233, 566, 352, + 395, 395, 395, 565, 395, 234, 241, 241, 241, 241, + 241, 241, 241, 241, 241, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 367, 564, 435, 435, 563, 367, + 562, 561, 367, 560, 367, 435, 580, 580, 580, 580, + 580, 581, 581, 581, 581, 581, 582, 582, 582, 582, + 582, 583, 583, 554, 583, 584, 584, 584, 585, 585, + 585, 586, 586, 586, 586, 586, 587, 587, 587, 588, + + 588, 588, 589, 589, 589, 591, 591, 591, 592, 592, + 592, 553, 552, 551, 550, 549, 548, 547, 544, 543, + 541, 540, 539, 538, 536, 534, 533, 532, 531, 530, + 529, 528, 527, 525, 524, 521, 520, 519, 518, 517, + 516, 513, 512, 511, 510, 509, 508, 507, 505, 504, + 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, + 493, 492, 491, 490, 489, 488, 487, 486, 481, 480, + 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, + 467, 466, 465, 464, 463, 462, 461, 459, 458, 457, + 456, 455, 454, 453, 452, 451, 450, 449, 446, 445, + + 444, 443, 442, 441, 440, 439, 437, 436, 433, 432, + 431, 430, 429, 426, 425, 424, 423, 422, 418, 417, + 415, 414, 413, 412, 411, 410, 409, 408, 407, 406, + 405, 404, 403, 402, 401, 400, 399, 398, 392, 391, + 390, 388, 387, 386, 385, 383, 378, 377, 376, 374, + 373, 372, 370, 369, 366, 365, 364, 363, 362, 361, + 360, 359, 357, 356, 355, 354, 353, 351, 350, 348, + 347, 346, 343, 341, 340, 338, 337, 336, 335, 334, + 333, 330, 327, 325, 324, 322, 321, 320, 319, 318, + 316, 315, 314, 313, 311, 310, 309, 308, 307, 306, + + 305, 304, 302, 301, 300, 299, 298, 297, 296, 295, + 294, 290, 289, 288, 287, 286, 285, 284, 283, 282, + 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, + 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, + 261, 260, 259, 258, 257, 256, 254, 253, 251, 250, + 248, 247, 246, 245, 244, 242, 239, 237, 236, 235, + 232, 231, 230, 228, 227, 226, 225, 224, 223, 222, + 221, 220, 219, 218, 217, 216, 215, 214, 213, 211, + 207, 205, 204, 202, 201, 200, 199, 198, 197, 196, + 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, + + 184, 180, 179, 178, 176, 174, 171, 170, 169, 168, + 166, 165, 164, 163, 162, 160, 158, 156, 155, 154, + 153, 152, 151, 150, 149, 148, 147, 145, 144, 143, + 142, 141, 139, 138, 137, 136, 135, 134, 133, 132, + 131, 130, 129, 128, 127, 126, 124, 123, 122, 120, + 119, 117, 116, 114, 113, 109, 108, 107, 106, 105, + 104, 103, 102, 101, 100, 99, 97, 95, 94, 93, + 92, 91, 90, 88, 87, 86, 85, 84, 83, 82, + 81, 79, 78, 77, 76, 75, 74, 73, 72, 71, + 70, 69, 68, 67, 66, 64, 63, 62, 61, 59, + + 53, 52, 48, 41, 40, 36, 33, 29, 27, 23, + 22, 19, 17, 15, 14, 10, 5, 579, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579 } ; /* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[94] = +static yyconst flex_int32_t yy_rule_can_match_eol[95] = { 0, 1, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, }; + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, }; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -898,7 +905,7 @@ #define YY_NO_INPUT 1 -#line 902 "knot/conf/libknotd_la-cf-lex.c" +#line 909 "knot/conf/libknotd_la-cf-lex.c" #define INITIAL 0 #define include 1 @@ -1134,7 +1141,7 @@ #line 90 "knot/conf/cf-lex.l" -#line 1138 "knot/conf/libknotd_la-cf-lex.c" +#line 1145 "knot/conf/libknotd_la-cf-lex.c" yylval = yylval_param; @@ -1189,13 +1196,13 @@ 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 >= 569 ) + if ( yy_current_state >= 580 ) 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] != 807 ); + while ( yy_base[yy_current_state] != 818 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1426,96 +1433,101 @@ case 39: YY_RULE_SETUP #line 130 "knot/conf/cf-lex.l" -{ lval.t = yytext; return RATE_LIMIT; } +{ lval.t = yytext; return MAX_TCP_CLIENTS; } YY_BREAK case 40: YY_RULE_SETUP #line 131 "knot/conf/cf-lex.l" -{ lval.t = yytext; return RATE_LIMIT_SIZE; } +{ lval.t = yytext; return RATE_LIMIT; } YY_BREAK case 41: YY_RULE_SETUP #line 132 "knot/conf/cf-lex.l" -{ lval.t = yytext; return RATE_LIMIT_SLIP; } +{ lval.t = yytext; return RATE_LIMIT_SIZE; } YY_BREAK case 42: YY_RULE_SETUP #line 133 "knot/conf/cf-lex.l" -{ lval.t = yytext; return TRANSFERS; } +{ lval.t = yytext; return RATE_LIMIT_SLIP; } YY_BREAK case 43: YY_RULE_SETUP #line 134 "knot/conf/cf-lex.l" -{ lval.t = yytext; return DNSSEC_ENABLE; } +{ lval.t = yytext; return TRANSFERS; } YY_BREAK case 44: YY_RULE_SETUP #line 135 "knot/conf/cf-lex.l" -{ lval.t = yytext; return DNSSEC_KEYDIR; } +{ lval.t = yytext; return DNSSEC_ENABLE; } YY_BREAK case 45: YY_RULE_SETUP #line 136 "knot/conf/cf-lex.l" -{ lval.t = yytext; return SIGNATURE_LIFETIME; } +{ lval.t = yytext; return DNSSEC_KEYDIR; } YY_BREAK case 46: YY_RULE_SETUP #line 137 "knot/conf/cf-lex.l" -{ lval.t = yytext; return QUERY_MODULE; } +{ lval.t = yytext; return SIGNATURE_LIFETIME; } YY_BREAK case 47: YY_RULE_SETUP -#line 139 "knot/conf/cf-lex.l" -{ lval.t = yytext; return INTERFACES; } +#line 138 "knot/conf/cf-lex.l" +{ lval.t = yytext; return QUERY_MODULE; } YY_BREAK case 48: YY_RULE_SETUP #line 140 "knot/conf/cf-lex.l" -{ lval.t = yytext; return ADDRESS; } +{ lval.t = yytext; return INTERFACES; } YY_BREAK case 49: YY_RULE_SETUP #line 141 "knot/conf/cf-lex.l" -{ lval.t = yytext; return PORT; } +{ lval.t = yytext; return ADDRESS; } YY_BREAK case 50: YY_RULE_SETUP #line 142 "knot/conf/cf-lex.l" -{ lval.t = yytext; return VIA; } +{ lval.t = yytext; return PORT; } YY_BREAK case 51: YY_RULE_SETUP -#line 144 "knot/conf/cf-lex.l" -{ lval.t = yytext; return CONTROL; } +#line 143 "knot/conf/cf-lex.l" +{ lval.t = yytext; return VIA; } YY_BREAK case 52: YY_RULE_SETUP #line 145 "knot/conf/cf-lex.l" -{ lval.t = yytext; return ALLOW; } +{ lval.t = yytext; return CONTROL; } YY_BREAK case 53: YY_RULE_SETUP #line 146 "knot/conf/cf-lex.l" -{ lval.t = yytext; return LISTEN_ON; } +{ lval.t = yytext; return ALLOW; } YY_BREAK case 54: YY_RULE_SETUP -#line 148 "knot/conf/cf-lex.l" -{ lval.t = yytext; return LOG; } +#line 147 "knot/conf/cf-lex.l" +{ lval.t = yytext; return LISTEN_ON; } YY_BREAK case 55: YY_RULE_SETUP -#line 150 "knot/conf/cf-lex.l" -{ lval.t = yytext; lval.i = LOG_ANY; return LOG_SRC; } +#line 149 "knot/conf/cf-lex.l" +{ lval.t = yytext; return LOG; } YY_BREAK case 56: YY_RULE_SETUP #line 151 "knot/conf/cf-lex.l" -{ lval.t = yytext; lval.i = LOG_SERVER; return LOG_SRC; } +{ lval.t = yytext; lval.i = LOG_ANY; return LOG_SRC; } YY_BREAK case 57: YY_RULE_SETUP #line 152 "knot/conf/cf-lex.l" +{ lval.t = yytext; lval.i = LOG_SERVER; return LOG_SRC; } + YY_BREAK +case 58: +YY_RULE_SETUP +#line 153 "knot/conf/cf-lex.l" { lval.t = yytext; lval.i = LOG_SERVER; @@ -1524,59 +1536,59 @@ return LOG_SRC; } YY_BREAK -case 58: -YY_RULE_SETUP -#line 159 "knot/conf/cf-lex.l" -{ lval.t = yytext; lval.i = LOG_ZONE; return LOG_SRC; } - YY_BREAK case 59: YY_RULE_SETUP #line 160 "knot/conf/cf-lex.l" -{ lval.t = yytext; lval.i = LOGT_STDOUT; return LOG_DEST; } +{ lval.t = yytext; lval.i = LOG_ZONE; return LOG_SRC; } YY_BREAK case 60: YY_RULE_SETUP #line 161 "knot/conf/cf-lex.l" -{ lval.t = yytext; lval.i = LOGT_STDERR; return LOG_DEST; } +{ lval.t = yytext; lval.i = LOGT_STDOUT; return LOG_DEST; } YY_BREAK case 61: YY_RULE_SETUP #line 162 "knot/conf/cf-lex.l" -{ lval.t = yytext; lval.i = LOGT_SYSLOG; return LOG_DEST; } +{ lval.t = yytext; lval.i = LOGT_STDERR; return LOG_DEST; } YY_BREAK case 62: YY_RULE_SETUP #line 163 "knot/conf/cf-lex.l" -{ lval.t = yytext; lval.i = LOG_UPTO(LOG_DEBUG); return LOG_LEVEL; } +{ lval.t = yytext; lval.i = LOGT_SYSLOG; return LOG_DEST; } YY_BREAK case 63: YY_RULE_SETUP #line 164 "knot/conf/cf-lex.l" -{ lval.t = yytext; lval.i = LOG_UPTO(LOG_INFO); return LOG_LEVEL; } +{ lval.t = yytext; lval.i = LOG_UPTO(LOG_DEBUG); return LOG_LEVEL; } YY_BREAK case 64: YY_RULE_SETUP #line 165 "knot/conf/cf-lex.l" -{ lval.t = yytext; lval.i = LOG_UPTO(LOG_NOTICE); return LOG_LEVEL; } +{ lval.t = yytext; lval.i = LOG_UPTO(LOG_INFO); return LOG_LEVEL; } YY_BREAK case 65: YY_RULE_SETUP #line 166 "knot/conf/cf-lex.l" -{ lval.t = yytext; lval.i = LOG_UPTO(LOG_WARNING); return LOG_LEVEL; } +{ lval.t = yytext; lval.i = LOG_UPTO(LOG_NOTICE); return LOG_LEVEL; } YY_BREAK case 66: YY_RULE_SETUP #line 167 "knot/conf/cf-lex.l" -{ lval.t = yytext; lval.i = LOG_UPTO(LOG_ERR); return LOG_LEVEL; } +{ lval.t = yytext; lval.i = LOG_UPTO(LOG_WARNING); return LOG_LEVEL; } YY_BREAK case 67: YY_RULE_SETUP #line 168 "knot/conf/cf-lex.l" -{ lval.t = yytext; lval.i = LOG_UPTO(LOG_CRIT); return LOG_LEVEL; } +{ lval.t = yytext; lval.i = LOG_UPTO(LOG_ERR); return LOG_LEVEL; } YY_BREAK case 68: YY_RULE_SETUP #line 169 "knot/conf/cf-lex.l" +{ lval.t = yytext; lval.i = LOG_UPTO(LOG_CRIT); return LOG_LEVEL; } + YY_BREAK +case 69: +YY_RULE_SETUP +#line 170 "knot/conf/cf-lex.l" { lval.t = yytext; lval.i = LOG_UPTO(LOG_INFO); @@ -1585,9 +1597,9 @@ return LOG_LEVEL; } YY_BREAK -case 69: +case 70: YY_RULE_SETUP -#line 177 "knot/conf/cf-lex.l" +#line 178 "knot/conf/cf-lex.l" { lval.t = yytext; if (strcmp(yytext, "increment") == 0) { @@ -1598,9 +1610,9 @@ return SERIAL_POLICY_VAL; } YY_BREAK -case 70: +case 71: YY_RULE_SETUP -#line 187 "knot/conf/cf-lex.l" +#line 188 "knot/conf/cf-lex.l" { lval.t = yytext; lval.i = 0; @@ -1610,14 +1622,14 @@ return BOOL; } YY_BREAK -case 71: +case 72: YY_RULE_SETUP -#line 196 "knot/conf/cf-lex.l" +#line 197 "knot/conf/cf-lex.l" BEGIN(include); YY_BREAK -case 72: +case 73: YY_RULE_SETUP -#line 198 "knot/conf/cf-lex.l" +#line 199 "knot/conf/cf-lex.l" { size_t mpos = strlen(yytext) - 1; char multiplier = yytext[mpos]; @@ -1640,9 +1652,9 @@ return INTERVAL; } YY_BREAK -case 73: +case 74: YY_RULE_SETUP -#line 220 "knot/conf/cf-lex.l" +#line 221 "knot/conf/cf-lex.l" { size_t mpos = strlen(yytext) - 1; char multiplier = yytext[mpos]; @@ -1664,17 +1676,17 @@ return SIZE; } YY_BREAK -case 74: +case 75: YY_RULE_SETUP -#line 241 "knot/conf/cf-lex.l" +#line 242 "knot/conf/cf-lex.l" { lval.i = atol(yytext); return NUM; } YY_BREAK -case 75: +case 76: YY_RULE_SETUP -#line 246 "knot/conf/cf-lex.l" +#line 247 "knot/conf/cf-lex.l" { unsigned char buf[sizeof(struct in_addr)]; if (inet_pton(AF_INET, yytext, buf)) { @@ -1684,9 +1696,9 @@ cf_error(yyscanner, "Invalid IP address."); } YY_BREAK -case 76: +case 77: YY_RULE_SETUP -#line 255 "knot/conf/cf-lex.l" +#line 256 "knot/conf/cf-lex.l" { unsigned char buf[sizeof(struct in6_addr)]; yytext[strlen(yytext)-1] = '\0'; @@ -1697,9 +1709,9 @@ cf_error(yyscanner, "Invalid IPv6 address."); } YY_BREAK -case 77: +case 78: YY_RULE_SETUP -#line 265 "knot/conf/cf-lex.l" +#line 266 "knot/conf/cf-lex.l" { unsigned char buf[sizeof(struct in6_addr)]; if (inet_pton(AF_INET6, yytext, buf)) { @@ -1709,9 +1721,9 @@ cf_error(yyscanner, "Invalid IPv6 address."); } YY_BREAK -case 78: +case 79: YY_RULE_SETUP -#line 274 "knot/conf/cf-lex.l" +#line 275 "knot/conf/cf-lex.l" { lval.t = NULL; lval.l = 0; @@ -1737,72 +1749,72 @@ return HEXSTR; } YY_BREAK -case 79: -YY_RULE_SETUP -#line 299 "knot/conf/cf-lex.l" -{ lval.alg = KNOT_TSIG_ALG_GSS_TSIG; return TSIG_ALGO_NAME; } - YY_BREAK case 80: YY_RULE_SETUP #line 300 "knot/conf/cf-lex.l" -{ lval.alg = KNOT_TSIG_ALG_HMAC_MD5; return TSIG_ALGO_NAME; } +{ lval.alg = KNOT_TSIG_ALG_GSS_TSIG; return TSIG_ALGO_NAME; } YY_BREAK case 81: YY_RULE_SETUP #line 301 "knot/conf/cf-lex.l" -{ lval.alg = KNOT_TSIG_ALG_HMAC_SHA1; return TSIG_ALGO_NAME; } +{ lval.alg = KNOT_TSIG_ALG_HMAC_MD5; return TSIG_ALGO_NAME; } YY_BREAK case 82: YY_RULE_SETUP #line 302 "knot/conf/cf-lex.l" -{ lval.alg = KNOT_TSIG_ALG_HMAC_SHA224; return TSIG_ALGO_NAME; } +{ lval.alg = KNOT_TSIG_ALG_HMAC_SHA1; return TSIG_ALGO_NAME; } YY_BREAK case 83: YY_RULE_SETUP #line 303 "knot/conf/cf-lex.l" -{ lval.alg = KNOT_TSIG_ALG_HMAC_SHA256; return TSIG_ALGO_NAME; } +{ lval.alg = KNOT_TSIG_ALG_HMAC_SHA224; return TSIG_ALGO_NAME; } YY_BREAK case 84: YY_RULE_SETUP #line 304 "knot/conf/cf-lex.l" -{ lval.alg = KNOT_TSIG_ALG_HMAC_SHA384; return TSIG_ALGO_NAME; } +{ lval.alg = KNOT_TSIG_ALG_HMAC_SHA256; return TSIG_ALGO_NAME; } YY_BREAK case 85: YY_RULE_SETUP #line 305 "knot/conf/cf-lex.l" -{ lval.alg = KNOT_TSIG_ALG_HMAC_SHA512; return TSIG_ALGO_NAME; } +{ lval.alg = KNOT_TSIG_ALG_HMAC_SHA384; return TSIG_ALGO_NAME; } YY_BREAK case 86: YY_RULE_SETUP -#line 307 "knot/conf/cf-lex.l" +#line 306 "knot/conf/cf-lex.l" +{ lval.alg = KNOT_TSIG_ALG_HMAC_SHA512; return TSIG_ALGO_NAME; } + YY_BREAK +case 87: +YY_RULE_SETUP +#line 308 "knot/conf/cf-lex.l" { yytext[yyleng-1] = 0; lval.t = strdup(yytext + 1); return TEXT; } YY_BREAK -case 87: -/* rule 87 can match eol */ +case 88: +/* rule 88 can match eol */ YY_RULE_SETUP -#line 313 "knot/conf/cf-lex.l" +#line 314 "knot/conf/cf-lex.l" cf_error(yyscanner, "Unterminated string."); YY_BREAK -case 88: +case 89: YY_RULE_SETUP -#line 315 "knot/conf/cf-lex.l" +#line 316 "knot/conf/cf-lex.l" { lval.t = strdup(yytext); return TEXT /* Last resort, alphanumeric word. */; } YY_BREAK -case 89: +case 90: YY_RULE_SETUP -#line 320 "knot/conf/cf-lex.l" +#line 321 "knot/conf/cf-lex.l" /* Optional : in assignments. */; YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(include): -#line 322 "knot/conf/cf-lex.l" +#line 323 "knot/conf/cf-lex.l" { conf_includes_remove(yyextra->includes); @@ -1813,15 +1825,15 @@ } } YY_BREAK -case 90: -/* rule 90 can match eol */ +case 91: +/* rule 91 can match eol */ YY_RULE_SETUP -#line 332 "knot/conf/cf-lex.l" +#line 333 "knot/conf/cf-lex.l" YY_BREAK -case 91: +case 92: YY_RULE_SETUP -#line 333 "knot/conf/cf-lex.l" +#line 334 "knot/conf/cf-lex.l" { BEGIN(INITIAL); @@ -1926,18 +1938,18 @@ } } YY_BREAK -case 92: -/* rule 92 can match eol */ +case 93: +/* rule 93 can match eol */ YY_RULE_SETUP -#line 439 "knot/conf/cf-lex.l" +#line 440 "knot/conf/cf-lex.l" cf_error(yyscanner, "Unterminated string."); YY_BREAK -case 93: +case 94: YY_RULE_SETUP -#line 441 "knot/conf/cf-lex.l" +#line 442 "knot/conf/cf-lex.l" ECHO; YY_BREAK -#line 1941 "knot/conf/libknotd_la-cf-lex.c" +#line 1953 "knot/conf/libknotd_la-cf-lex.c" case YY_END_OF_BUFFER: { @@ -2229,7 +2241,7 @@ 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 >= 569 ) + if ( yy_current_state >= 580 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2258,11 +2270,11 @@ 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 >= 569 ) + if ( yy_current_state >= 580 ) 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 == 568); + yy_is_jam = (yy_current_state == 579); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -3068,7 +3080,7 @@ #define YYTABLES_NAME "yytables" -#line 441 "knot/conf/cf-lex.l" +#line 442 "knot/conf/cf-lex.l" diff -Nru knot-1.6.0/src/knot/conf/libknotd_la-cf-parse.c knot-1.6.2/src/knot/conf/libknotd_la-cf-parse.c --- knot-1.6.0/src/knot/conf/libknotd_la-cf-parse.c 2014-10-23 16:25:45.000000000 +0200 +++ knot-1.6.2/src/knot/conf/libknotd_la-cf-parse.c 2015-02-19 10:44:17.000000000 +0100 @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by 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/>. */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.7" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -63,14 +63,12 @@ #define yyparse cf_parse #define yylex cf_lex #define yyerror cf_error -#define yylval cf_lval -#define yychar cf_char #define yydebug cf_debug #define yynerrs cf_nerrs + /* Copy the first part of user declarations. */ -/* Line 371 of yacc.c */ -#line 23 "knot/conf/cf-parse.y" +#line 23 "knot/conf/cf-parse.y" /* yacc.c:339 */ #include <config.h> @@ -94,6 +92,7 @@ extern int cf_lex (YYSTYPE *lvalp, void *scanner); extern void cf_error(void *scanner, const char *format, ...); +extern void cf_warning(void *scanner, const char *format, ...); extern conf_t *new_config; static conf_iface_t *this_iface = 0; static conf_iface_t *this_remote = 0; @@ -104,6 +103,8 @@ static conf_log_map_t *this_logmap = 0; //#define YYERROR_VERBOSE 1 +static char *cache_hostname = NULL; + #define SET_NUM(out, in, min, max, name) \ { \ if (in < min || in > max) { \ @@ -118,6 +119,11 @@ #define SET_INT(out, in, name) SET_NUM(out, in, 0, INT_MAX, name); #define SET_SIZE(out, in, name) SET_NUM(out, in, 0, SIZE_MAX, name); +static void conf_start(void *scanner) +{ + cache_hostname = NULL; +} + static void conf_init_iface(void *scanner, char* ifname) { this_iface = malloc(sizeof(conf_iface_t)); @@ -470,18 +476,35 @@ } } +static char *get_hostname(void *scanner) +{ + if (cache_hostname) { + return strdup(cache_hostname); + } + + char *fqdn = sockaddr_hostname(); + if (!fqdn) { + cf_warning(scanner, "cannot retrieve host FQDN"); + return NULL; + } + + cache_hostname = fqdn; + + return fqdn; +} + /*! \brief Generate automatic defaults for server identity, version and NSID. */ -static void ident_auto(int tok, conf_t *conf, bool val) +static void ident_auto(void *scanner, int tok, conf_t *conf, bool val) { switch(tok) { case SVERSION: opt_replace(&conf->version, strdup("Knot DNS " PACKAGE_VERSION), val); break; case IDENTITY: - opt_replace(&conf->identity, sockaddr_hostname(), val); + opt_replace(&conf->identity, get_hostname(scanner), val); break; case NSID: - opt_replace(&conf->nsid, sockaddr_hostname(), val); + opt_replace(&conf->nsid, get_hostname(scanner), val); if (conf->nsid) { conf->nsid_len = strlen(conf->nsid); } @@ -492,14 +515,13 @@ } -/* Line 371 of yacc.c */ -#line 497 "knot/conf/libknotd_la-cf-parse.c" +#line 519 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:339 */ -# ifndef YY_NULL +# ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr +# define YY_NULLPTR nullptr # else -# define YY_NULL 0 +# define YY_NULLPTR 0 # endif # endif @@ -515,7 +537,7 @@ by #include "y.tab.h". */ #ifndef YY_CF_KNOT_CONF_LIBKNOTD_LA_CF_PARSE_H_INCLUDED # define YY_CF_KNOT_CONF_LIBKNOTD_LA_CF_PARSE_H_INCLUDED -/* Enabling traces. */ +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif @@ -523,79 +545,79 @@ extern int cf_debug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - END = 258, - INVALID_TOKEN = 259, - TEXT = 260, - HEXSTR = 261, - NUM = 262, - INTERVAL = 263, - SIZE = 264, - BOOL = 265, - SYSTEM = 266, - IDENTITY = 267, - HOSTNAME = 268, - SVERSION = 269, - NSID = 270, - KEY = 271, - KEYS = 272, - MAX_UDP_PAYLOAD = 273, - TSIG_ALGO_NAME = 274, - WORKERS = 275, - BACKGROUND_WORKERS = 276, - ASYNC_START = 277, - USER = 278, - RUNDIR = 279, - PIDFILE = 280, - REMOTES = 281, - GROUPS = 282, - ZONES = 283, - FILENAME = 284, - DISABLE_ANY = 285, - SEMANTIC_CHECKS = 286, - NOTIFY_RETRIES = 287, - NOTIFY_TIMEOUT = 288, - DBSYNC_TIMEOUT = 289, - IXFR_FSLIMIT = 290, - XFR_IN = 291, - XFR_OUT = 292, - UPDATE_IN = 293, - NOTIFY_IN = 294, - NOTIFY_OUT = 295, - BUILD_DIFFS = 296, - MAX_CONN_IDLE = 297, - MAX_CONN_HS = 298, - MAX_CONN_REPLY = 299, - RATE_LIMIT = 300, - RATE_LIMIT_SIZE = 301, - RATE_LIMIT_SLIP = 302, - TRANSFERS = 303, - STORAGE = 304, - DNSSEC_ENABLE = 305, - DNSSEC_KEYDIR = 306, - SIGNATURE_LIFETIME = 307, - SERIAL_POLICY = 308, - SERIAL_POLICY_VAL = 309, - QUERY_MODULE = 310, - INTERFACES = 311, - ADDRESS = 312, - PORT = 313, - IPA = 314, - IPA6 = 315, - VIA = 316, - CONTROL = 317, - ALLOW = 318, - LISTEN_ON = 319, - LOG = 320, - LOG_DEST = 321, - LOG_SRC = 322, - LOG_LEVEL = 323 - }; + enum yytokentype + { + END = 258, + INVALID_TOKEN = 259, + TEXT = 260, + HEXSTR = 261, + NUM = 262, + INTERVAL = 263, + SIZE = 264, + BOOL = 265, + SYSTEM = 266, + IDENTITY = 267, + HOSTNAME = 268, + SVERSION = 269, + NSID = 270, + KEY = 271, + KEYS = 272, + MAX_UDP_PAYLOAD = 273, + TSIG_ALGO_NAME = 274, + WORKERS = 275, + BACKGROUND_WORKERS = 276, + ASYNC_START = 277, + USER = 278, + RUNDIR = 279, + PIDFILE = 280, + REMOTES = 281, + GROUPS = 282, + ZONES = 283, + FILENAME = 284, + DISABLE_ANY = 285, + SEMANTIC_CHECKS = 286, + NOTIFY_RETRIES = 287, + NOTIFY_TIMEOUT = 288, + DBSYNC_TIMEOUT = 289, + IXFR_FSLIMIT = 290, + XFR_IN = 291, + XFR_OUT = 292, + UPDATE_IN = 293, + NOTIFY_IN = 294, + NOTIFY_OUT = 295, + BUILD_DIFFS = 296, + MAX_CONN_IDLE = 297, + MAX_CONN_HS = 298, + MAX_CONN_REPLY = 299, + MAX_TCP_CLIENTS = 300, + RATE_LIMIT = 301, + RATE_LIMIT_SIZE = 302, + RATE_LIMIT_SLIP = 303, + TRANSFERS = 304, + STORAGE = 305, + DNSSEC_ENABLE = 306, + DNSSEC_KEYDIR = 307, + SIGNATURE_LIFETIME = 308, + SERIAL_POLICY = 309, + SERIAL_POLICY_VAL = 310, + QUERY_MODULE = 311, + INTERFACES = 312, + ADDRESS = 313, + PORT = 314, + IPA = 315, + IPA6 = 316, + VIA = 317, + CONTROL = 318, + ALLOW = 319, + LISTEN_ON = 320, + LOG = 321, + LOG_DEST = 322, + LOG_SRC = 323, + LOG_LEVEL = 324 + }; #endif /* Tokens. */ #define END 258 @@ -640,38 +662,38 @@ #define MAX_CONN_IDLE 297 #define MAX_CONN_HS 298 #define MAX_CONN_REPLY 299 -#define RATE_LIMIT 300 -#define RATE_LIMIT_SIZE 301 -#define RATE_LIMIT_SLIP 302 -#define TRANSFERS 303 -#define STORAGE 304 -#define DNSSEC_ENABLE 305 -#define DNSSEC_KEYDIR 306 -#define SIGNATURE_LIFETIME 307 -#define SERIAL_POLICY 308 -#define SERIAL_POLICY_VAL 309 -#define QUERY_MODULE 310 -#define INTERFACES 311 -#define ADDRESS 312 -#define PORT 313 -#define IPA 314 -#define IPA6 315 -#define VIA 316 -#define CONTROL 317 -#define ALLOW 318 -#define LISTEN_ON 319 -#define LOG 320 -#define LOG_DEST 321 -#define LOG_SRC 322 -#define LOG_LEVEL 323 - - +#define MAX_TCP_CLIENTS 300 +#define RATE_LIMIT 301 +#define RATE_LIMIT_SIZE 302 +#define RATE_LIMIT_SLIP 303 +#define TRANSFERS 304 +#define STORAGE 305 +#define DNSSEC_ENABLE 306 +#define DNSSEC_KEYDIR 307 +#define SIGNATURE_LIFETIME 308 +#define SERIAL_POLICY 309 +#define SERIAL_POLICY_VAL 310 +#define QUERY_MODULE 311 +#define INTERFACES 312 +#define ADDRESS 313 +#define PORT 314 +#define IPA 315 +#define IPA6 316 +#define VIA 317 +#define CONTROL 318 +#define ALLOW 319 +#define LISTEN_ON 320 +#define LOG 321 +#define LOG_DEST 322 +#define LOG_SRC 323 +#define LOG_LEVEL 324 +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { -/* Line 387 of yacc.c */ -#line 450 "knot/conf/cf-parse.y" +#line 475 "knot/conf/cf-parse.y" /* yacc.c:355 */ struct { char *t; @@ -680,36 +702,21 @@ knot_tsig_algorithm_t alg; } tok; - -/* Line 387 of yacc.c */ -#line 686 "knot/conf/libknotd_la-cf-parse.c" -} YYSTYPE; +#line 706 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:355 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int cf_parse (void *YYPARSE_PARAM); -#else -int cf_parse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus + int cf_parse (void *scanner); -#else -int cf_parse (); -#endif -#endif /* ! YYPARSE_PARAM */ #endif /* !YY_CF_KNOT_CONF_LIBKNOTD_LA_CF_PARSE_H_INCLUDED */ /* Copy the second part of user declarations. */ -/* Line 390 of yacc.c */ -#line 713 "knot/conf/libknotd_la-cf-parse.c" +#line 720 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:358 */ #ifdef short # undef short @@ -723,11 +730,8 @@ #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -747,8 +751,7 @@ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -770,6 +773,33 @@ # endif #endif +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) +# endif +#endif + /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -777,24 +807,26 @@ # define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif + #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -812,8 +844,7 @@ # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS @@ -825,8 +856,8 @@ # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -842,7 +873,7 @@ # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -850,15 +881,13 @@ # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -868,7 +897,7 @@ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -893,16 +922,16 @@ elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif @@ -921,7 +950,7 @@ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -929,40 +958,42 @@ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 342 +#define YYLAST 346 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 75 +#define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 39 +#define YYNNTS 40 /* YYNRULES -- Number of rules. */ -#define YYNRULES 173 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 358 +#define YYNRULES 175 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 362 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 323 +#define YYMAXUTOK 324 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 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, 74, 2, 2, 73, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 69, - 2, 2, 2, 2, 70, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 75, 2, 2, 74, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 70, + 2, 2, 2, 2, 71, 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, 71, 2, 72, 2, 2, 2, 2, + 2, 2, 2, 72, 2, 73, 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, @@ -982,126 +1013,31 @@ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68 + 65, 66, 67, 68, 69 }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 6, 7, 10, 11, 13, 15, 17, - 19, 21, 23, 24, 29, 34, 41, 46, 53, 56, - 62, 65, 70, 75, 80, 85, 90, 95, 100, 105, - 110, 115, 120, 125, 131, 136, 141, 146, 151, 156, - 161, 166, 171, 176, 181, 186, 191, 194, 200, 201, - 203, 205, 207, 209, 211, 212, 217, 222, 229, 236, - 241, 248, 255, 260, 265, 270, 275, 278, 284, 286, - 287, 289, 293, 295, 298, 304, 306, 308, 310, 312, - 314, 315, 317, 319, 321, 323, 325, 326, 330, 334, - 335, 339, 342, 343, 347, 348, 350, 352, 354, 356, - 358, 360, 364, 366, 369, 375, 379, 384, 389, 394, - 399, 404, 409, 414, 419, 424, 429, 434, 439, 444, - 449, 454, 459, 465, 468, 469, 473, 476, 480, 485, - 490, 495, 500, 505, 510, 515, 520, 525, 530, 535, - 540, 545, 550, 555, 561, 562, 564, 568, 572, 573, - 577, 579, 582, 583, 584, 590, 596, 597, 603, 605, - 607, 610, 616, 621, 627, 631, 633, 636, 639, 642, - 645, 648, 651, 654 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 76, 0, -1, 77, 3, -1, -1, 77, 113, -1, - -1, 5, -1, 26, -1, 67, -1, 65, -1, 68, - -1, 62, -1, -1, 79, 58, 7, 69, -1, 79, - 57, 59, 69, -1, 79, 57, 59, 70, 7, 69, - -1, 79, 57, 60, 69, -1, 79, 57, 60, 70, - 7, 69, -1, 56, 71, -1, 80, 78, 71, 79, - 72, -1, 11, 71, -1, 81, 14, 5, 69, -1, - 81, 14, 10, 69, -1, 81, 12, 5, 69, -1, - 81, 12, 10, 69, -1, 81, 13, 5, 69, -1, - 81, 15, 6, 69, -1, 81, 15, 5, 69, -1, - 81, 15, 10, 69, -1, 81, 18, 7, 69, -1, - 81, 49, 5, 69, -1, 81, 24, 5, 69, -1, - 81, 25, 5, 69, -1, 81, 16, 19, 5, 69, - -1, 81, 20, 7, 69, -1, 81, 21, 7, 69, - -1, 81, 22, 10, 69, -1, 81, 23, 5, 69, - -1, 81, 42, 8, 69, -1, 81, 43, 8, 69, - -1, 81, 44, 8, 69, -1, 81, 45, 7, 69, - -1, 81, 46, 9, 69, -1, 81, 46, 7, 69, - -1, 81, 47, 7, 69, -1, 81, 48, 7, 69, - -1, 17, 71, -1, 82, 5, 19, 5, 69, -1, - -1, 5, -1, 67, -1, 65, -1, 68, -1, 62, - -1, -1, 84, 58, 7, 69, -1, 84, 57, 59, - 69, -1, 84, 57, 59, 73, 7, 69, -1, 84, - 57, 59, 70, 7, 69, -1, 84, 57, 60, 69, - -1, 84, 57, 60, 73, 7, 69, -1, 84, 57, - 60, 70, 7, 69, -1, 84, 16, 5, 69, -1, - 84, 61, 59, 69, -1, 84, 61, 60, 69, -1, - 84, 61, 5, 69, -1, 26, 71, -1, 85, 83, - 71, 84, 72, -1, 5, -1, -1, 86, -1, 87, - 74, 86, -1, 5, -1, 27, 71, -1, 89, 88, - 71, 87, 72, -1, 36, -1, 37, -1, 39, -1, - 40, -1, 38, -1, -1, 5, -1, 67, -1, 65, - -1, 68, -1, 62, -1, -1, 92, 91, 74, -1, - 92, 91, 69, -1, -1, 93, 5, 69, -1, 5, - 5, -1, -1, 94, 69, 95, -1, -1, 23, -1, - 26, -1, 67, -1, 65, -1, 68, -1, 62, -1, - 7, 73, 5, -1, 5, -1, 96, 71, -1, 97, - 90, 71, 93, 72, -1, 97, 90, 92, -1, 97, - 29, 5, 69, -1, 97, 41, 10, 69, -1, 97, - 31, 10, 69, -1, 97, 49, 5, 69, -1, 97, - 51, 5, 69, -1, 97, 30, 10, 69, -1, 97, - 34, 7, 69, -1, 97, 34, 8, 69, -1, 97, - 35, 9, 69, -1, 97, 35, 7, 69, -1, 97, - 32, 7, 69, -1, 97, 33, 7, 69, -1, 97, - 50, 10, 69, -1, 97, 52, 7, 69, -1, 97, - 52, 8, 69, -1, 97, 53, 54, 69, -1, 97, - 55, 71, 95, 72, -1, 5, 5, -1, -1, 98, - 69, 99, -1, 28, 71, -1, 100, 97, 72, -1, - 100, 30, 10, 69, -1, 100, 41, 10, 69, -1, - 100, 31, 10, 69, -1, 100, 35, 9, 69, -1, - 100, 35, 7, 69, -1, 100, 32, 7, 69, -1, - 100, 33, 7, 69, -1, 100, 34, 7, 69, -1, - 100, 34, 8, 69, -1, 100, 49, 5, 69, -1, - 100, 50, 10, 69, -1, 100, 51, 5, 69, -1, - 100, 52, 7, 69, -1, 100, 52, 8, 69, -1, - 100, 53, 54, 69, -1, 100, 55, 71, 99, 72, - -1, -1, 101, -1, 102, 68, 74, -1, 102, 68, - 69, -1, -1, 103, 67, 102, -1, 66, -1, 29, - 5, -1, -1, -1, 107, 104, 71, 103, 72, -1, - 107, 105, 71, 103, 72, -1, -1, 65, 109, 71, - 107, 106, -1, 64, -1, 63, -1, 62, 71, -1, - 112, 110, 71, 79, 72, -1, 112, 110, 5, 69, - -1, 112, 111, 71, 93, 72, -1, 112, 111, 92, - -1, 69, -1, 81, 72, -1, 80, 72, -1, 82, - 72, -1, 85, 72, -1, 89, 72, -1, 100, 72, - -1, 108, 72, -1, 112, 72, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 522, 522, 524, 526, 529, 530, 531, 532, 533, - 534, 535, 538, 539, 546, 549, 552, 555, 561, 562, - 570, 571, 572, 573, 574, 575, 580, 581, 582, 583, - 587, 592, 593, 594, 599, 602, 605, 608, 629, 632, - 635, 638, 641, 644, 647, 650, 656, 657, 706, 707, - 708, 709, 710, 711, 714, 715, 722, 726, 730, 734, - 738, 742, 746, 754, 757, 760, 767, 768, 776, 779, - 781, 782, 786, 790, 791, 795, 798, 801, 804, 807, - 812, 813, 814, 815, 816, 817, 820, 821, 822, 825, - 826, 855, 858, 859, 862, 863, 864, 865, 866, 867, - 868, 869, 885, 889, 890, 891, 892, 893, 894, 895, - 896, 897, 898, 901, 904, 907, 910, 913, 916, 917, - 920, 923, 926, 930, 932, 933, 937, 938, 939, 940, - 941, 942, 945, 948, 951, 954, 957, 960, 961, 962, - 963, 966, 969, 972, 975, 984, 985, 989, 992, 993, - 999, 1021, 1047, 1051, 1052, 1053, 1056, 1056, 1060, 1064, - 1070, 1071, 1078, 1083, 1084, 1087, 1087, 1087, 1087, 1087, - 1087, 1087, 1087, 1087 + 0, 548, 548, 548, 550, 552, 555, 556, 557, 558, + 559, 560, 561, 564, 565, 572, 575, 578, 581, 587, + 588, 596, 597, 598, 599, 600, 601, 606, 607, 608, + 609, 613, 618, 619, 620, 624, 627, 630, 633, 654, + 657, 660, 663, 666, 669, 672, 675, 678, 684, 685, + 734, 735, 736, 737, 738, 739, 742, 743, 750, 754, + 758, 762, 766, 770, 774, 782, 785, 788, 795, 796, + 804, 807, 809, 810, 814, 818, 819, 823, 826, 829, + 832, 835, 840, 841, 842, 843, 844, 845, 848, 849, + 850, 853, 854, 883, 886, 887, 890, 891, 892, 893, + 894, 895, 896, 897, 913, 917, 918, 919, 920, 921, + 922, 923, 924, 925, 926, 929, 932, 935, 938, 941, + 944, 945, 948, 951, 954, 958, 960, 961, 965, 966, + 967, 968, 969, 970, 973, 976, 979, 982, 985, 988, + 989, 990, 991, 994, 997, 1000, 1003, 1012, 1013, 1017, + 1020, 1021, 1027, 1049, 1075, 1079, 1080, 1081, 1084, 1084, + 1088, 1092, 1098, 1099, 1106, 1111, 1112, 1115, 1115, 1115, + 1115, 1115, 1115, 1115, 1115, 1115 }; #endif @@ -1118,26 +1054,26 @@ "SEMANTIC_CHECKS", "NOTIFY_RETRIES", "NOTIFY_TIMEOUT", "DBSYNC_TIMEOUT", "IXFR_FSLIMIT", "XFR_IN", "XFR_OUT", "UPDATE_IN", "NOTIFY_IN", "NOTIFY_OUT", "BUILD_DIFFS", "MAX_CONN_IDLE", "MAX_CONN_HS", - "MAX_CONN_REPLY", "RATE_LIMIT", "RATE_LIMIT_SIZE", "RATE_LIMIT_SLIP", - "TRANSFERS", "STORAGE", "DNSSEC_ENABLE", "DNSSEC_KEYDIR", - "SIGNATURE_LIFETIME", "SERIAL_POLICY", "SERIAL_POLICY_VAL", - "QUERY_MODULE", "INTERFACES", "ADDRESS", "PORT", "IPA", "IPA6", "VIA", - "CONTROL", "ALLOW", "LISTEN_ON", "LOG", "LOG_DEST", "LOG_SRC", - "LOG_LEVEL", "';'", "'@'", "'{'", "'}'", "'/'", "','", "$accept", - "config", "conf_entries", "interface_start", "interface", "interfaces", - "system", "keys", "remote_start", "remote", "remotes", "group_member", - "group", "group_start", "groups", "zone_acl_start", "zone_acl_item", - "zone_acl_list", "zone_acl", "query_module", "query_module_list", - "zone_start", "zone", "query_genmodule", "query_genmodule_list", "zones", - "log_prios_start", "log_prios", "log_src", "log_dest", "log_file", - "log_end", "log_start", "log", "$@1", "ctl_listen_start", - "ctl_allow_start", "control", "conf", YY_NULL + "MAX_CONN_REPLY", "MAX_TCP_CLIENTS", "RATE_LIMIT", "RATE_LIMIT_SIZE", + "RATE_LIMIT_SLIP", "TRANSFERS", "STORAGE", "DNSSEC_ENABLE", + "DNSSEC_KEYDIR", "SIGNATURE_LIFETIME", "SERIAL_POLICY", + "SERIAL_POLICY_VAL", "QUERY_MODULE", "INTERFACES", "ADDRESS", "PORT", + "IPA", "IPA6", "VIA", "CONTROL", "ALLOW", "LISTEN_ON", "LOG", "LOG_DEST", + "LOG_SRC", "LOG_LEVEL", "';'", "'@'", "'{'", "'}'", "'/'", "','", + "$accept", "config", "$@1", "conf_entries", "interface_start", + "interface", "interfaces", "system", "keys", "remote_start", "remote", + "remotes", "group_member", "group", "group_start", "groups", + "zone_acl_start", "zone_acl_item", "zone_acl_list", "zone_acl", + "query_module", "query_module_list", "zone_start", "zone", + "query_genmodule", "query_genmodule_list", "zones", "log_prios_start", + "log_prios", "log_src", "log_dest", "log_file", "log_end", "log_start", + "log", "$@2", "ctl_listen_start", "ctl_allow_start", "control", "conf", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -1146,315 +1082,306 @@ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 59, - 64, 123, 125, 47, 44 + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 59, 64, 123, 125, 47, 44 }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 75, 76, 77, 77, 78, 78, 78, 78, 78, - 78, 78, 79, 79, 79, 79, 79, 79, 80, 80, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 82, 82, 83, 83, - 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 85, 85, 86, 87, - 87, 87, 88, 89, 89, 90, 90, 90, 90, 90, - 91, 91, 91, 91, 91, 91, 92, 92, 92, 93, - 93, 94, 95, 95, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 98, 99, 99, 100, 100, 100, 100, - 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 101, 102, 102, 102, 103, 103, - 104, 105, 106, 107, 107, 107, 109, 108, 110, 111, - 112, 112, 112, 112, 112, 113, 113, 113, 113, 113, - 113, 113, 113, 113 -}; +#define YYPACT_NINF -71 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-71))) + +#define YYTABLE_NINF -83 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = { - 0, 2, 2, 0, 2, 0, 1, 1, 1, 1, - 1, 1, 0, 4, 4, 6, 4, 6, 2, 5, - 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 2, 5, 0, 1, - 1, 1, 1, 1, 0, 4, 4, 6, 6, 4, - 6, 6, 4, 4, 4, 4, 2, 5, 1, 0, - 1, 3, 1, 2, 5, 1, 1, 1, 1, 1, - 0, 1, 1, 1, 1, 1, 0, 3, 3, 0, - 3, 2, 0, 3, 0, 1, 1, 1, 1, 1, - 1, 3, 1, 2, 5, 3, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 5, 2, 0, 3, 2, 3, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 5, 0, 1, 3, 3, 0, 3, - 1, 2, 0, 0, 5, 5, 0, 5, 1, 1, - 2, 5, 4, 5, 3, 1, 2, 2, 2, 2, - 2, 2, 2, 2 + -71, 9, -71, -71, 75, -71, -70, -54, -48, -40, + -33, 58, 63, -71, -71, 14, 104, 0, 22, 1, + 3, 8, -42, -71, -71, -71, -71, -71, -71, -71, + -71, 65, -71, -71, -71, -71, -71, -71, -71, 72, + 7, 89, 38, 15, 96, 167, 168, 169, 101, 178, + 180, 181, 179, 182, 183, 185, 186, 105, 187, 188, + 184, -71, 177, -71, -71, -71, -71, -71, -71, -71, + 116, -71, -71, 125, -71, 126, -71, -71, 189, 192, + 191, 196, 43, 114, 194, 200, 197, 201, 92, 153, + 137, -71, -71, -71, -71, -71, 138, 128, -71, -71, + -71, -71, -4, 139, -71, -71, 142, 143, 144, 145, + 146, 147, 148, 149, 215, 151, 152, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 170, 171, 218, -71, 232, 233, 172, 173, 174, 175, + 176, 190, 193, 195, 198, 199, 202, 203, 204, 205, + 206, 234, -71, 242, 238, 239, 243, 244, 99, 124, + -71, -71, -71, -71, -71, 245, 247, 246, 248, 132, + 207, 208, -71, 209, 212, -71, -71, -5, -25, -45, + -71, -71, -71, -71, -71, -71, -71, -71, 213, -71, + -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, + -71, -71, -71, -71, -71, -71, 214, -13, -71, -71, + 61, -71, -71, -71, -71, -71, -71, -71, -71, -71, + -71, -71, -71, -71, -71, -71, -71, 249, 216, 217, + 219, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 235, 236, 237, 240, 252, -71, -5, -71, + -43, 2, -71, -71, -71, -71, -71, -23, 253, -71, + 241, 250, -71, 82, 254, -71, -71, -71, 259, 95, + 260, 36, -71, -71, 232, -71, 234, -71, -71, -71, + -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, + -71, -71, -71, -71, 261, 251, 255, 6, -71, 256, + -71, -71, -71, -71, -71, -71, 100, 102, 257, 262, + 34, 39, 263, 264, 265, 266, -71, -71, -71, 252, + -71, -71, -71, -6, 16, -71, 270, -71, 271, -71, + -71, -71, 272, 278, -71, 280, 281, -71, -71, -71, + -71, -71, -71, -71, -71, 267, 268, 269, 273, 274, + 275, -71, 277, -71, -71, -71, -71, -71, -71, 23, + -71, -71 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_uint8 yydefact[] = { - 3, 0, 0, 1, 2, 0, 0, 0, 0, 0, - 0, 0, 156, 165, 5, 0, 0, 48, 0, 94, - 0, 0, 4, 20, 46, 66, 73, 126, 18, 160, - 0, 6, 7, 11, 9, 8, 10, 167, 0, 0, + 2, 0, 4, 1, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 158, 167, 6, 0, 0, 50, 0, + 96, 0, 0, 5, 21, 48, 68, 75, 128, 19, + 162, 0, 7, 8, 12, 10, 9, 11, 169, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 168, 0, 170, 51, 55, 53, 52, 54, 171, + 0, 74, 172, 0, 104, 0, 97, 98, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 102, 100, 99, 101, 173, 0, 0, 174, 161, + 160, 175, 0, 88, 155, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, - 0, 168, 49, 53, 51, 50, 52, 169, 0, 72, - 170, 0, 102, 0, 95, 96, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, - 98, 97, 99, 171, 0, 0, 172, 159, 158, 173, - 0, 86, 153, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 56, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 54, 69, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 124, 103, - 0, 0, 0, 0, 0, 0, 0, 75, 76, 79, - 77, 78, 0, 0, 0, 0, 0, 0, 0, 127, - 86, 0, 12, 89, 164, 152, 0, 23, 24, 25, - 21, 22, 27, 26, 28, 0, 29, 34, 35, 36, - 37, 31, 32, 38, 39, 40, 41, 43, 42, 44, - 45, 30, 0, 0, 68, 70, 0, 101, 128, 130, - 133, 134, 135, 136, 132, 131, 129, 137, 138, 139, - 140, 141, 142, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 105, 0, 0, 0, 0, 0, 0, 0, + 77, 78, 81, 79, 80, 0, 0, 0, 0, 0, + 0, 0, 129, 88, 0, 13, 91, 166, 154, 0, + 24, 25, 26, 22, 23, 28, 27, 29, 0, 30, + 35, 36, 37, 38, 32, 33, 39, 40, 41, 42, + 43, 45, 44, 46, 47, 31, 0, 0, 70, 72, + 0, 103, 130, 132, 135, 136, 137, 138, 134, 133, + 131, 139, 140, 141, 142, 143, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 92, 89, 105, 162, 0, 0, 81, 85, - 83, 82, 84, 0, 0, 150, 0, 0, 157, 0, - 0, 19, 33, 47, 0, 0, 0, 0, 67, 74, - 0, 123, 124, 143, 106, 111, 108, 116, 117, 112, - 113, 115, 114, 107, 109, 118, 110, 119, 120, 121, - 0, 0, 0, 0, 161, 0, 163, 88, 87, 151, - 148, 148, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 71, 125, 91, 92, 122, 104, 90, 0, - 0, 14, 0, 16, 0, 13, 62, 56, 0, 0, - 59, 0, 0, 55, 65, 63, 64, 93, 144, 154, - 155, 0, 0, 0, 0, 0, 0, 145, 149, 15, - 17, 58, 57, 61, 60, 0, 147, 146 + 0, 0, 0, 0, 0, 0, 94, 91, 107, 164, + 0, 0, 83, 87, 85, 84, 86, 0, 0, 152, + 0, 0, 159, 0, 0, 20, 34, 49, 0, 0, + 0, 0, 69, 76, 0, 125, 126, 145, 108, 113, + 110, 118, 119, 114, 115, 117, 116, 109, 111, 120, + 112, 121, 122, 123, 0, 0, 0, 0, 163, 0, + 165, 90, 89, 153, 150, 150, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 73, 127, 93, 94, + 124, 106, 92, 0, 0, 15, 0, 17, 0, 14, + 64, 58, 0, 0, 61, 0, 0, 57, 67, 65, + 66, 95, 146, 156, 157, 0, 0, 0, 0, 0, + 0, 147, 151, 16, 18, 60, 59, 63, 62, 0, + 149, 148 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = { - -1, 1, 2, 38, 176, 14, 15, 16, 68, 203, - 17, 205, 206, 71, 18, 170, 253, 174, 247, 291, - 292, 94, 95, 224, 225, 19, 347, 348, 319, 256, - 257, 258, 175, 20, 30, 100, 101, 21, 22 + -71, -71, -71, -71, -71, 84, -71, -71, -71, -71, + -71, -71, -3, -71, -71, -71, -71, -71, 97, 55, + -71, -16, -71, -71, -71, 28, -71, -71, -71, 4, + -71, -71, -71, -71, -71, -71, -71, -71, -71, -71 }; -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -55 -static const yytype_int16 yypact[] = + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = { - -55, 9, 74, -55, -55, -40, -12, 12, 17, 24, - 60, 62, -55, -55, 14, 102, 0, 22, 1, 3, - 8, -48, -55, -55, -55, -55, -55, -55, -55, -55, - 71, -55, -55, -55, -55, -55, -55, -55, 83, 7, - 105, 36, 15, 87, 165, 166, 173, 172, 178, 179, - 180, 181, 182, 183, 185, 23, 186, 187, 190, -55, - 167, -55, -55, -55, -55, -55, -55, -55, 116, -55, - -55, 117, -55, 123, -55, -55, 189, 191, 193, 195, - 41, 96, 194, 192, 196, 198, 127, 151, 136, -55, - -55, -55, -55, -55, 137, 126, -55, -55, -55, -55, - -4, 138, -55, -55, 141, 142, 143, 144, 145, 146, - 147, 148, 213, 150, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 168, 169, 215, - -55, 229, 230, 170, 171, 174, 175, 176, 177, 184, - 188, 197, 199, 200, 201, 202, 203, 204, 231, -55, - 236, 232, 237, 241, 242, 130, 104, -55, -55, -55, - -55, -55, 240, 246, 244, 247, 133, 205, 206, -55, - 207, 210, -55, -55, -5, -27, -54, -55, -55, -55, - -55, -55, -55, -55, -55, 211, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, 212, 35, -55, -55, 47, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, 250, 214, 216, 217, 218, 220, 221, - 222, 223, 224, 225, 226, 227, 228, 233, 234, 235, - 238, 239, 251, -55, -5, -55, -44, 2, -55, -55, - -55, -55, -55, -24, 253, -55, 243, 245, -55, -37, - 254, -55, -55, -55, 255, 93, 256, 38, -55, -55, - 229, -55, 231, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - 257, 248, 249, 6, -55, 258, -55, -55, -55, -55, - -55, -55, 99, 101, 259, 260, 39, 59, 261, 262, - 263, 264, -55, -55, -55, 251, -55, -55, -55, -25, - -6, -55, 267, -55, 268, -55, -55, -55, 269, 275, - -55, 277, 278, -55, -55, -55, -55, -55, -55, -55, - -55, 265, 266, 270, 271, 272, 273, -55, 252, -55, - -55, -55, -55, -55, -55, 30, -55, -55 + -1, 1, 2, 4, 39, 179, 15, 16, 17, 70, + 207, 18, 209, 210, 73, 19, 173, 257, 177, 251, + 295, 296, 96, 97, 228, 229, 20, 351, 352, 323, + 260, 261, 262, 178, 21, 31, 102, 103, 22, 23 }; -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_int16 yytable[] = { - -55, -55, -55, -55, 92, -55, -55, -55, -55, -55, - -55, -3, -55, -55, -55, -55, -55, 95, 55, -55, - -16, -55, -55, -55, 28, -55, -55, -55, 4, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55 + 252, 174, 24, 268, 258, 62, 71, 299, 74, 3, + 75, 299, 106, 263, 264, 263, 264, 107, 25, 32, + 111, 112, 99, 100, 26, 113, 76, 64, 265, 77, + 298, 101, 27, 78, 79, 80, 81, 82, 83, 28, + 33, 313, 259, 109, 84, 269, 270, 301, 110, 271, + 140, 141, 302, 85, 86, 87, 88, 89, 253, 90, + 272, 254, 342, 255, 256, -82, 91, 343, 175, 92, + -82, 93, 94, 63, 72, 300, 95, 34, 5, 321, + 35, 98, 36, 37, 342, 65, 6, 38, 66, 344, + 67, 68, 7, 360, 108, 69, 314, 315, 361, 148, + 149, 8, 9, 10, 331, 332, 235, 236, 333, 334, + 335, 118, 127, 336, 128, 114, 40, 41, 42, 43, + 44, 142, 45, 143, 46, 47, 48, 49, 50, 51, + 29, 237, 11, 238, 273, 30, 274, 104, 12, 243, + 244, 13, 306, 307, 105, 14, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 310, 311, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 325, 326, 327, 328, 115, 116, 117, 61, 166, 167, + 168, 169, 170, 119, 171, 120, 121, 122, 133, 131, + 123, 124, 125, 126, 129, 130, 132, 134, 138, 136, + 135, 172, 137, 139, 144, 145, 147, 146, 150, 151, + 152, 176, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 206, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 208, 211, 227, + 204, 205, 212, 213, 214, 215, 216, 230, 231, 232, + 233, 234, 240, 242, 275, 239, 241, 294, 303, 250, + 217, 308, 245, 218, 309, 219, 318, 312, 220, 221, + 248, 316, 222, 223, 224, 225, 226, 345, 346, 347, + 246, 247, 249, 266, 267, 348, 276, 349, 350, 278, + 277, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 297, 341, 317, 290, 291, 292, 0, 324, + 293, 0, 0, 304, 0, 0, 0, 0, 0, 0, + 0, 319, 305, 0, 0, 0, 322, 329, 320, 0, + 0, 0, 330, 337, 338, 339, 340, 353, 354, 355, + 0, 0, 0, 356, 357, 358, 359 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -81 -static const yytype_int16 yytable[] = +static const yytype_int16 yycheck[] = { - 248, 171, 254, 259, 260, 60, 69, 295, 72, 3, - 73, 295, 104, 259, 260, 97, 98, 105, 261, 31, - 109, 110, 302, 303, 99, 111, 74, 62, 294, 75, - 124, 23, 125, 76, 77, 78, 79, 80, 81, 255, - 32, 107, 338, 309, 82, 297, 108, 339, 137, 138, - 298, 264, 83, 84, 85, 86, 87, 249, 88, 24, - 250, 338, 251, 252, -80, 89, 340, 172, 90, -80, - 91, 92, 61, 70, 296, 93, 33, 4, 317, 34, - 96, 35, 36, 25, 63, 5, 37, 64, 26, 65, - 66, 6, 265, 266, 67, 27, 267, 310, 311, 356, - 7, 8, 9, 139, 357, 140, 112, 268, 327, 328, - 106, 233, 329, 234, 39, 40, 41, 42, 43, 269, - 44, 270, 45, 46, 47, 48, 49, 50, 330, 331, - 10, 28, 332, 29, 145, 146, 11, 231, 232, 12, - 239, 240, 102, 13, 51, 52, 53, 54, 55, 56, - 57, 58, 306, 307, 103, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 321, 322, - 323, 324, 113, 114, 59, 163, 164, 165, 166, 167, - 115, 168, 116, 117, 118, 119, 129, 130, 131, 120, - 121, 122, 123, 126, 127, 128, 132, 142, 169, 133, - 135, 134, 136, 144, 141, 147, 143, 148, 149, 173, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 202, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 204, 207, 223, 200, 201, 208, - 209, 226, 227, 210, 211, 212, 213, 228, 229, 230, - 235, 236, 238, 214, 237, 271, 290, 215, 299, 241, - 305, 304, 314, 308, 246, 244, 216, 312, 217, 218, - 219, 220, 221, 222, 341, 342, 343, 242, 243, 245, - 262, 263, 344, 272, 345, 346, 274, 275, 273, 276, - 277, 278, 279, 280, 281, 282, 283, 284, 293, 337, - 313, 0, 285, 286, 287, 320, 0, 288, 289, 0, - 0, 0, 0, 0, 300, 0, 301, 315, 0, 0, - 355, 316, 0, 0, 0, 0, 0, 318, 325, 326, - 333, 334, 335, 336, 349, 350, 0, 0, 0, 351, - 352, 353, 354 + 5, 5, 72, 16, 29, 5, 5, 5, 5, 0, + 7, 5, 5, 58, 59, 58, 59, 10, 72, 5, + 5, 6, 64, 65, 72, 10, 23, 5, 73, 26, + 73, 73, 72, 30, 31, 32, 33, 34, 35, 72, + 26, 5, 67, 5, 41, 58, 59, 70, 10, 62, + 7, 8, 75, 50, 51, 52, 53, 54, 63, 56, + 73, 66, 68, 68, 69, 70, 63, 73, 72, 66, + 75, 68, 69, 73, 73, 73, 73, 63, 3, 73, + 66, 73, 68, 69, 68, 63, 11, 73, 66, 73, + 68, 69, 17, 70, 5, 73, 60, 61, 75, 7, + 8, 26, 27, 28, 70, 71, 7, 8, 74, 70, + 71, 10, 7, 74, 9, 19, 12, 13, 14, 15, + 16, 7, 18, 9, 20, 21, 22, 23, 24, 25, + 72, 7, 57, 9, 73, 72, 75, 72, 63, 7, + 8, 66, 60, 61, 72, 70, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 60, 61, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 70, 71, 70, 71, 7, 7, 7, 73, 50, 51, + 52, 53, 54, 5, 56, 5, 5, 8, 72, 5, + 8, 8, 7, 7, 7, 7, 19, 72, 7, 10, + 74, 73, 10, 7, 10, 5, 5, 10, 55, 72, + 72, 72, 70, 70, 70, 70, 70, 70, 70, 70, + 5, 70, 70, 5, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 5, 5, 5, + 70, 70, 70, 70, 70, 70, 70, 5, 10, 10, + 7, 7, 5, 5, 5, 10, 10, 5, 5, 175, + 70, 7, 55, 70, 5, 70, 5, 7, 70, 70, + 173, 274, 70, 70, 70, 70, 70, 7, 7, 7, + 72, 72, 70, 70, 70, 7, 70, 7, 7, 70, + 73, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 247, 319, 276, 70, 70, 70, -1, 305, + 70, -1, -1, 72, -1, -1, -1, -1, -1, -1, + -1, 70, 72, -1, -1, -1, 70, 70, 73, -1, + -1, -1, 70, 70, 70, 70, 70, 70, 70, 70, + -1, -1, -1, 70, 70, 70, 69 }; -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-55))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 77, 78, 0, 79, 3, 11, 17, 26, 27, + 28, 57, 63, 66, 70, 82, 83, 84, 87, 91, + 102, 110, 114, 115, 72, 72, 72, 72, 72, 72, + 72, 111, 5, 26, 63, 66, 68, 69, 73, 80, + 12, 13, 14, 15, 16, 18, 20, 21, 22, 23, + 24, 25, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 73, 5, 73, 5, 63, 66, 68, 69, 73, + 85, 5, 73, 90, 5, 7, 23, 26, 30, 31, + 32, 33, 34, 35, 41, 50, 51, 52, 53, 54, + 56, 63, 66, 68, 69, 73, 98, 99, 73, 64, + 65, 73, 112, 113, 72, 72, 5, 10, 5, 5, + 10, 5, 6, 10, 19, 7, 7, 7, 10, 5, + 5, 5, 8, 8, 8, 7, 7, 7, 9, 7, + 7, 5, 19, 72, 72, 74, 10, 10, 7, 7, + 7, 8, 7, 9, 10, 5, 10, 5, 7, 8, + 55, 72, 72, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 50, 51, 52, 53, + 54, 56, 73, 92, 5, 72, 72, 94, 109, 81, + 70, 70, 70, 70, 70, 70, 70, 70, 5, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 5, 86, 5, 88, + 89, 5, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 5, 100, 101, + 5, 10, 10, 7, 7, 7, 8, 7, 9, 10, + 5, 10, 5, 7, 8, 55, 72, 72, 94, 70, + 81, 95, 5, 63, 66, 68, 69, 93, 29, 67, + 106, 107, 108, 58, 59, 73, 70, 70, 16, 58, + 59, 62, 73, 73, 75, 5, 70, 73, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 5, 96, 97, 95, 73, 5, + 73, 70, 75, 5, 72, 72, 60, 61, 7, 5, + 60, 61, 7, 5, 60, 61, 88, 101, 5, 70, + 73, 73, 70, 105, 105, 70, 71, 70, 71, 70, + 70, 70, 71, 74, 70, 71, 74, 70, 70, 70, + 70, 97, 68, 73, 73, 7, 7, 7, 7, 7, + 7, 103, 104, 70, 70, 70, 70, 70, 70, 69, + 70, 75 +}; -static const yytype_int16 yycheck[] = + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = { - 5, 5, 29, 57, 58, 5, 5, 5, 5, 0, - 7, 5, 5, 57, 58, 63, 64, 10, 72, 5, - 5, 6, 59, 60, 72, 10, 23, 5, 72, 26, - 7, 71, 9, 30, 31, 32, 33, 34, 35, 66, - 26, 5, 67, 5, 41, 69, 10, 72, 7, 8, - 74, 16, 49, 50, 51, 52, 53, 62, 55, 71, - 65, 67, 67, 68, 69, 62, 72, 71, 65, 74, - 67, 68, 72, 72, 72, 72, 62, 3, 72, 65, - 72, 67, 68, 71, 62, 11, 72, 65, 71, 67, - 68, 17, 57, 58, 72, 71, 61, 59, 60, 69, - 26, 27, 28, 7, 74, 9, 19, 72, 69, 70, - 5, 7, 73, 9, 12, 13, 14, 15, 16, 72, - 18, 74, 20, 21, 22, 23, 24, 25, 69, 70, - 56, 71, 73, 71, 7, 8, 62, 7, 8, 65, - 7, 8, 71, 69, 42, 43, 44, 45, 46, 47, - 48, 49, 59, 60, 71, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 69, 70, - 69, 70, 7, 7, 72, 49, 50, 51, 52, 53, - 7, 55, 10, 5, 5, 5, 19, 71, 71, 8, - 8, 8, 7, 7, 7, 5, 73, 5, 72, 10, - 7, 10, 7, 5, 10, 54, 10, 71, 71, 71, - 69, 69, 69, 69, 69, 69, 69, 69, 5, 69, - 5, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 5, 5, 5, 69, 69, 69, - 69, 5, 10, 69, 69, 69, 69, 10, 7, 7, - 10, 5, 5, 69, 10, 5, 5, 69, 5, 54, - 5, 7, 5, 7, 172, 170, 69, 270, 69, 69, - 69, 69, 69, 69, 7, 7, 7, 71, 71, 69, - 69, 69, 7, 69, 7, 7, 69, 69, 72, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 243, 315, - 272, -1, 69, 69, 69, 301, -1, 69, 69, -1, - -1, -1, -1, -1, 71, -1, 71, 69, -1, -1, - 68, 72, -1, -1, -1, -1, -1, 69, 69, 69, - 69, 69, 69, 69, 69, 69, -1, -1, -1, 69, - 69, 69, 69 + 0, 76, 78, 77, 79, 79, 80, 80, 80, 80, + 80, 80, 80, 81, 81, 81, 81, 81, 81, 82, + 82, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 84, 84, + 85, 85, 85, 85, 85, 85, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 87, 87, + 88, 89, 89, 89, 90, 91, 91, 92, 92, 92, + 92, 92, 93, 93, 93, 93, 93, 93, 94, 94, + 94, 95, 95, 96, 97, 97, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 100, 101, 101, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 103, 104, 104, 104, + 105, 105, 106, 107, 108, 109, 109, 109, 111, 110, + 112, 113, 114, 114, 114, 114, 114, 115, 115, 115, + 115, 115, 115, 115, 115, 115 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = { - 0, 76, 77, 0, 3, 11, 17, 26, 27, 28, - 56, 62, 65, 69, 80, 81, 82, 85, 89, 100, - 108, 112, 113, 71, 71, 71, 71, 71, 71, 71, - 109, 5, 26, 62, 65, 67, 68, 72, 78, 12, - 13, 14, 15, 16, 18, 20, 21, 22, 23, 24, - 25, 42, 43, 44, 45, 46, 47, 48, 49, 72, - 5, 72, 5, 62, 65, 67, 68, 72, 83, 5, - 72, 88, 5, 7, 23, 26, 30, 31, 32, 33, - 34, 35, 41, 49, 50, 51, 52, 53, 55, 62, - 65, 67, 68, 72, 96, 97, 72, 63, 64, 72, - 110, 111, 71, 71, 5, 10, 5, 5, 10, 5, - 6, 10, 19, 7, 7, 7, 10, 5, 5, 5, - 8, 8, 8, 7, 7, 9, 7, 7, 5, 19, - 71, 71, 73, 10, 10, 7, 7, 7, 8, 7, - 9, 10, 5, 10, 5, 7, 8, 54, 71, 71, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 49, 50, 51, 52, 53, 55, 72, - 90, 5, 71, 71, 92, 107, 79, 69, 69, 69, - 69, 69, 69, 69, 69, 5, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 5, 84, 5, 86, 87, 5, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 5, 98, 99, 5, 10, 10, 7, - 7, 7, 8, 7, 9, 10, 5, 10, 5, 7, - 8, 54, 71, 71, 92, 69, 79, 93, 5, 62, - 65, 67, 68, 91, 29, 66, 104, 105, 106, 57, - 58, 72, 69, 69, 16, 57, 58, 61, 72, 72, - 74, 5, 69, 72, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 5, 94, 95, 93, 72, 5, 72, 69, 74, 5, - 71, 71, 59, 60, 7, 5, 59, 60, 7, 5, - 59, 60, 86, 99, 5, 69, 72, 72, 69, 103, - 103, 69, 70, 69, 70, 69, 69, 69, 70, 73, - 69, 70, 73, 69, 69, 69, 69, 95, 67, 72, - 72, 7, 7, 7, 7, 7, 7, 101, 102, 69, - 69, 69, 69, 69, 69, 68, 69, 74 + 0, 2, 0, 3, 0, 2, 0, 1, 1, 1, + 1, 1, 1, 0, 4, 4, 6, 4, 6, 2, + 5, 2, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 2, 5, + 0, 1, 1, 1, 1, 1, 0, 4, 4, 6, + 6, 4, 6, 6, 4, 4, 4, 4, 2, 5, + 1, 0, 1, 3, 1, 2, 5, 1, 1, 1, + 1, 1, 0, 1, 1, 1, 1, 1, 0, 3, + 3, 0, 3, 2, 0, 3, 0, 1, 1, 1, + 1, 1, 1, 3, 1, 2, 5, 3, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 5, 2, 0, 3, 2, 3, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 5, 0, 1, 3, 3, + 0, 3, 1, 2, 0, 0, 5, 5, 0, 5, + 1, 1, 2, 5, 4, 5, 3, 1, 2, 2, + 2, 2, 2, 2, 2, 2 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + #define YYRECOVERING() (!!yyerrstatus) @@ -1471,27 +1398,15 @@ else \ { \ yyerror (scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) /* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +#define YYTERROR 1 +#define YYERRCODE 256 -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, scanner) -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -1501,58 +1416,47 @@ # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - void *scanner; -#endif { FILE *yyo = yyoutput; YYUSE (yyo); + YYUSE (scanner); if (!yyvaluep) return; - YYUSE (scanner); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -1560,23 +1464,11 @@ | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *scanner) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, scanner) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - void *scanner; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner); YYFPRINTF (yyoutput, ")"); @@ -1587,16 +1479,8 @@ | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -1607,50 +1491,42 @@ YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void *scanner) -#else static void -yy_reduce_print (yyvsp, yyrule, scanner) - YYSTYPE *yyvsp; - int yyrule; - void *scanner; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, void *scanner) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , scanner); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , scanner); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule, scanner); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, scanner); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1664,7 +1540,7 @@ /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1687,15 +1563,8 @@ # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1711,16 +1580,8 @@ # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1750,27 +1611,27 @@ char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1793,11 +1654,11 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULL; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1805,10 +1666,6 @@ int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1858,7 +1715,7 @@ } yyarg[yycount++] = yytname[yyx]; { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; @@ -1925,33 +1782,18 @@ | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void *scanner) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, scanner) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - void *scanner; -#endif { YYUSE (yyvaluep); YYUSE (scanner); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1961,56 +1803,18 @@ | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (void *scanner) -#else -int -yyparse (scanner) - void *scanner; -#endif -#endif { /* The lookahead symbol. */ int yychar; -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else +/* The semantic value of the lookahead symbol. */ /* Default value used for initialization, for pacifying older GCCs or non-GCC compilers. */ -static YYSTYPE yyval_default; -# define YY_INITIAL_VALUE(Value) = Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Number of syntax errors so far. */ int yynerrs; @@ -2020,8 +1824,8 @@ int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ @@ -2089,23 +1893,23 @@ #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); - yyss = yyss1; - yyvs = yyvs1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -2113,22 +1917,22 @@ # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -2137,10 +1941,10 @@ yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -2169,7 +1973,7 @@ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (&yylval, scanner); } if (yychar <= YYEOF) @@ -2234,7 +2038,7 @@ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -2248,224 +2052,228 @@ switch (yyn) { case 2: -/* Line 1792 of yacc.c */ -#line 522 "knot/conf/cf-parse.y" - { return 0; } +#line 548 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start(scanner); } +#line 2058 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 6: -/* Line 1792 of yacc.c */ -#line 530 "knot/conf/cf-parse.y" - { conf_start_iface(scanner, (yyvsp[(1) - (1)].tok).t); } + case 3: +#line 548 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { return 0; } +#line 2064 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 7: -/* Line 1792 of yacc.c */ -#line 531 "knot/conf/cf-parse.y" - { conf_start_iface(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 556 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start_iface(scanner, (yyvsp[0].tok).t); } +#line 2070 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 8: -/* Line 1792 of yacc.c */ -#line 532 "knot/conf/cf-parse.y" - { conf_start_iface(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 557 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start_iface(scanner, strdup((yyvsp[0].tok).t)); } +#line 2076 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 9: -/* Line 1792 of yacc.c */ -#line 533 "knot/conf/cf-parse.y" - { conf_start_iface(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 558 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start_iface(scanner, strdup((yyvsp[0].tok).t)); } +#line 2082 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 10: -/* Line 1792 of yacc.c */ -#line 534 "knot/conf/cf-parse.y" - { conf_start_iface(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 559 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start_iface(scanner, strdup((yyvsp[0].tok).t)); } +#line 2088 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 11: -/* Line 1792 of yacc.c */ -#line 535 "knot/conf/cf-parse.y" - { conf_start_iface(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 560 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start_iface(scanner, strdup((yyvsp[0].tok).t)); } +#line 2094 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ + break; + + case 12: +#line 561 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start_iface(scanner, strdup((yyvsp[0].tok).t)); } +#line 2100 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 13: -/* Line 1792 of yacc.c */ -#line 539 "knot/conf/cf-parse.y" + case 14: +#line 565 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { if (this_iface->addr.ss_family == AF_UNSPEC) { cf_error(scanner, "can't set port number before interface address\n"); } else { - sockaddr_port_set(&this_iface->addr, (yyvsp[(3) - (4)].tok).i); + sockaddr_port_set(&this_iface->addr, (yyvsp[-1].tok).i); } } +#line 2112 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 14: -/* Line 1792 of yacc.c */ -#line 546 "knot/conf/cf-parse.y" + case 15: +#line 572 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_set_iface(scanner, &this_iface->addr, AF_INET, (yyvsp[(3) - (4)].tok).t, CONFIG_DEFAULT_PORT); + conf_set_iface(scanner, &this_iface->addr, AF_INET, (yyvsp[-1].tok).t, CONFIG_DEFAULT_PORT); } +#line 2120 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 15: -/* Line 1792 of yacc.c */ -#line 549 "knot/conf/cf-parse.y" + case 16: +#line 575 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_set_iface(scanner, &this_iface->addr, AF_INET, (yyvsp[(3) - (6)].tok).t, (yyvsp[(5) - (6)].tok).i); + conf_set_iface(scanner, &this_iface->addr, AF_INET, (yyvsp[-3].tok).t, (yyvsp[-1].tok).i); } +#line 2128 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 16: -/* Line 1792 of yacc.c */ -#line 552 "knot/conf/cf-parse.y" + case 17: +#line 578 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_set_iface(scanner, &this_iface->addr, AF_INET6, (yyvsp[(3) - (4)].tok).t, CONFIG_DEFAULT_PORT); + conf_set_iface(scanner, &this_iface->addr, AF_INET6, (yyvsp[-1].tok).t, CONFIG_DEFAULT_PORT); } +#line 2136 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 17: -/* Line 1792 of yacc.c */ -#line 555 "knot/conf/cf-parse.y" + case 18: +#line 581 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_set_iface(scanner, &this_iface->addr, AF_INET6, (yyvsp[(3) - (6)].tok).t, (yyvsp[(5) - (6)].tok).i); + conf_set_iface(scanner, &this_iface->addr, AF_INET6, (yyvsp[-3].tok).t, (yyvsp[-1].tok).i); } +#line 2144 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 19: -/* Line 1792 of yacc.c */ -#line 562 "knot/conf/cf-parse.y" + case 20: +#line 588 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { if (this_iface->addr.ss_family == AF_UNSPEC) { cf_error(scanner, "interface '%s' has no defined address", this_iface->name); } } - break; - - case 21: -/* Line 1792 of yacc.c */ -#line 571 "knot/conf/cf-parse.y" - { new_config->version = (yyvsp[(3) - (4)].tok).t; } +#line 2154 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 22: -/* Line 1792 of yacc.c */ -#line 572 "knot/conf/cf-parse.y" - { ident_auto(SVERSION, new_config, (yyvsp[(3) - (4)].tok).i); } +#line 597 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { new_config->version = (yyvsp[-1].tok).t; } +#line 2160 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 23: -/* Line 1792 of yacc.c */ -#line 573 "knot/conf/cf-parse.y" - { new_config->identity = (yyvsp[(3) - (4)].tok).t; } +#line 598 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { ident_auto(scanner, SVERSION, new_config, (yyvsp[-1].tok).i); } +#line 2166 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 24: -/* Line 1792 of yacc.c */ -#line 574 "knot/conf/cf-parse.y" - { ident_auto(IDENTITY, new_config, (yyvsp[(3) - (4)].tok).i); } +#line 599 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { new_config->identity = (yyvsp[-1].tok).t; } +#line 2172 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 25: -/* Line 1792 of yacc.c */ -#line 575 "knot/conf/cf-parse.y" - { - fprintf(stderr, "warning: Config option 'system.hostname' is deprecated. " - "Use 'system.identity' instead.\n"); - free((yyvsp[(3) - (4)].tok).t); - } +#line 600 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { ident_auto(scanner, IDENTITY, new_config, (yyvsp[-1].tok).i); } +#line 2178 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 26: -/* Line 1792 of yacc.c */ -#line 580 "knot/conf/cf-parse.y" - { new_config->nsid = (yyvsp[(3) - (4)].tok).t; new_config->nsid_len = (yyvsp[(3) - (4)].tok).l; } +#line 601 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { + cf_warning(scanner, "option 'system.hostname' is deprecated, " + "use 'system.identity' instead"); + free((yyvsp[-1].tok).t); + } +#line 2188 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 27: -/* Line 1792 of yacc.c */ -#line 581 "knot/conf/cf-parse.y" - { new_config->nsid = (yyvsp[(3) - (4)].tok).t; new_config->nsid_len = strlen(new_config->nsid); } +#line 606 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { new_config->nsid = (yyvsp[-1].tok).t; new_config->nsid_len = (yyvsp[-1].tok).l; } +#line 2194 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 28: -/* Line 1792 of yacc.c */ -#line 582 "knot/conf/cf-parse.y" - { ident_auto(NSID, new_config, (yyvsp[(3) - (4)].tok).i); } +#line 607 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { new_config->nsid = (yyvsp[-1].tok).t; new_config->nsid_len = strlen(new_config->nsid); } +#line 2200 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 29: -/* Line 1792 of yacc.c */ -#line 583 "knot/conf/cf-parse.y" - { - SET_NUM(new_config->max_udp_payload, (yyvsp[(3) - (4)].tok).i, KNOT_EDNS_MIN_UDP_PAYLOAD, - KNOT_EDNS_MAX_UDP_PAYLOAD, "max-udp-payload"); - } +#line 608 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { ident_auto(scanner, NSID, new_config, (yyvsp[-1].tok).i); } +#line 2206 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 30: -/* Line 1792 of yacc.c */ -#line 587 "knot/conf/cf-parse.y" +#line 609 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - fprintf(stderr, "warning: Config option 'system.storage' was relocated. " - "Use 'zones.storage' instead.\n"); - new_config->storage = (yyvsp[(3) - (4)].tok).t; + SET_NUM(new_config->max_udp_payload, (yyvsp[-1].tok).i, KNOT_EDNS_MIN_UDP_PAYLOAD, + KNOT_EDNS_MAX_UDP_PAYLOAD, "max-udp-payload"); } +#line 2215 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 31: -/* Line 1792 of yacc.c */ -#line 592 "knot/conf/cf-parse.y" - { new_config->rundir = (yyvsp[(3) - (4)].tok).t; } +#line 613 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { + cf_warning(scanner, "option 'system.storage' was relocated, " + "use 'zones.storage' instead"); + new_config->storage = (yyvsp[-1].tok).t; + } +#line 2225 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 32: -/* Line 1792 of yacc.c */ -#line 593 "knot/conf/cf-parse.y" - { new_config->pidfile = (yyvsp[(3) - (4)].tok).t; } +#line 618 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { new_config->rundir = (yyvsp[-1].tok).t; } +#line 2231 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 33: -/* Line 1792 of yacc.c */ -#line 594 "knot/conf/cf-parse.y" - { - fprintf(stderr, "warning: Config option 'system.key' is deprecated " - "and has no effect.\n"); - free((yyvsp[(4) - (5)].tok).t); - } +#line 619 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { new_config->pidfile = (yyvsp[-1].tok).t; } +#line 2237 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 34: -/* Line 1792 of yacc.c */ -#line 599 "knot/conf/cf-parse.y" +#line 620 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_NUM(new_config->workers, (yyvsp[(3) - (4)].tok).i, 1, 255, "workers"); + cf_warning(scanner, "option 'system.key' is deprecated and it has no effect"); + free((yyvsp[-1].tok).t); } +#line 2246 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 35: -/* Line 1792 of yacc.c */ -#line 602 "knot/conf/cf-parse.y" +#line 624 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_NUM(new_config->bg_workers, (yyvsp[(3) - (4)].tok).i, 1, 255, "background-workers"); + SET_NUM(new_config->workers, (yyvsp[-1].tok).i, 1, 255, "workers"); } +#line 2254 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 36: -/* Line 1792 of yacc.c */ -#line 605 "knot/conf/cf-parse.y" +#line 627 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - new_config->async_start = (yyvsp[(3) - (4)].tok).i; + SET_NUM(new_config->bg_workers, (yyvsp[-1].tok).i, 1, 255, "background-workers"); } +#line 2262 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 37: -/* Line 1792 of yacc.c */ -#line 608 "knot/conf/cf-parse.y" +#line 630 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { + new_config->async_start = (yyvsp[-1].tok).i; + } +#line 2270 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ + break; + + case 38: +#line 633 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { new_config->uid = new_config->gid = -1; // Invalidate - char* dpos = strchr((yyvsp[(3) - (4)].tok).t, '.'); // Find uid.gid format + char* dpos = strchr((yyvsp[-1].tok).t, '.'); // Find uid.gid format if (dpos != NULL) { struct group *grp = getgrnam(dpos + 1); // Skip dot if (grp != NULL) { @@ -2475,92 +2283,100 @@ } *dpos = '\0'; // Cut off } - struct passwd* pwd = getpwnam((yyvsp[(3) - (4)].tok).t); + struct passwd* pwd = getpwnam((yyvsp[-1].tok).t); if (pwd != NULL) { new_config->uid = pwd->pw_uid; } else { - cf_error(scanner, "invalid user name '%s'", (yyvsp[(3) - (4)].tok).t); + cf_error(scanner, "invalid user name '%s'", (yyvsp[-1].tok).t); } - free((yyvsp[(3) - (4)].tok).t); - } - break; - - case 38: -/* Line 1792 of yacc.c */ -#line 629 "knot/conf/cf-parse.y" - { - SET_INT(new_config->max_conn_idle, (yyvsp[(3) - (4)].tok).i, "max-conn-idle"); + free((yyvsp[-1].tok).t); } +#line 2296 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 39: -/* Line 1792 of yacc.c */ -#line 632 "knot/conf/cf-parse.y" +#line 654 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_INT(new_config->max_conn_hs, (yyvsp[(3) - (4)].tok).i, "max-conn-handshake"); + SET_INT(new_config->max_conn_idle, (yyvsp[-1].tok).i, "max-conn-idle"); } +#line 2304 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 40: -/* Line 1792 of yacc.c */ -#line 635 "knot/conf/cf-parse.y" +#line 657 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_INT(new_config->max_conn_reply, (yyvsp[(3) - (4)].tok).i, "max-conn-reply"); + SET_INT(new_config->max_conn_hs, (yyvsp[-1].tok).i, "max-conn-handshake"); } +#line 2312 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 41: -/* Line 1792 of yacc.c */ -#line 638 "knot/conf/cf-parse.y" +#line 660 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_INT(new_config->rrl, (yyvsp[(3) - (4)].tok).i, "rate-limit"); + SET_INT(new_config->max_conn_reply, (yyvsp[-1].tok).i, "max-conn-reply"); } +#line 2320 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 42: -/* Line 1792 of yacc.c */ -#line 641 "knot/conf/cf-parse.y" +#line 663 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_SIZE(new_config->rrl_size, (yyvsp[(3) - (4)].tok).l, "rate-limit-size"); + SET_INT(new_config->max_tcp_clients, (yyvsp[-1].tok).i, "max-tcp-clients"); } +#line 2328 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 43: -/* Line 1792 of yacc.c */ -#line 644 "knot/conf/cf-parse.y" +#line 666 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_SIZE(new_config->rrl_size, (yyvsp[(3) - (4)].tok).i, "rate-limit-size"); + SET_INT(new_config->rrl, (yyvsp[-1].tok).i, "rate-limit"); } +#line 2336 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 44: -/* Line 1792 of yacc.c */ -#line 647 "knot/conf/cf-parse.y" +#line 669 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_NUM(new_config->rrl_slip, (yyvsp[(3) - (4)].tok).i, 1, RRL_SLIP_MAX, "rate-limit-slip"); + SET_SIZE(new_config->rrl_size, (yyvsp[-1].tok).l, "rate-limit-size"); } +#line 2344 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 45: -/* Line 1792 of yacc.c */ -#line 650 "knot/conf/cf-parse.y" +#line 672 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { + SET_SIZE(new_config->rrl_size, (yyvsp[-1].tok).i, "rate-limit-size"); + } +#line 2352 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ + break; + + case 46: +#line 675 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_INT(new_config->xfers, (yyvsp[(3) - (4)].tok).i, "transfers"); + SET_NUM(new_config->rrl_slip, (yyvsp[-1].tok).i, 1, RRL_SLIP_MAX, "rate-limit-slip"); } +#line 2360 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 47: -/* Line 1792 of yacc.c */ -#line 657 "knot/conf/cf-parse.y" +#line 678 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { + SET_INT(new_config->xfers, (yyvsp[-1].tok).i, "transfers"); + } +#line 2368 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ + break; + + case 49: +#line 685 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { /* Check algorithm length. */ - if (knot_tsig_digest_length((yyvsp[(3) - (5)].tok).alg) == 0) { + if (knot_tsig_digest_length((yyvsp[-2].tok).alg) == 0) { cf_error(scanner, "unsupported digest algorithm"); } /* Normalize to FQDN */ - char *fqdn = (yyvsp[(2) - (5)].tok).t; + char *fqdn = (yyvsp[-3].tok).t; size_t fqdnl = strlen(fqdn); if (fqdn[fqdnl - 1] != '.') { fqdnl = ((fqdnl + 2)/4+1)*4; /* '.', '\0' */ @@ -2587,9 +2403,9 @@ conf_key_t *k = malloc(sizeof(conf_key_t)); memset(k, 0, sizeof(conf_key_t)); k->k.name = dname; - k->k.algorithm = (yyvsp[(3) - (5)].tok).alg; - if (knot_binary_from_base64((yyvsp[(4) - (5)].tok).t, &(k->k.secret)) != 0) { - cf_error(scanner, "invalid key secret '%s'", (yyvsp[(4) - (5)].tok).t); + k->k.algorithm = (yyvsp[-2].tok).alg; + if (knot_binary_from_base64((yyvsp[-1].tok).t, &(k->k.secret)) != 0) { + cf_error(scanner, "invalid key secret '%s'", (yyvsp[-1].tok).t); knot_dname_free(&dname, NULL); free(k); } else { @@ -2598,245 +2414,245 @@ } } - free((yyvsp[(4) - (5)].tok).t); + free((yyvsp[-1].tok).t); free(fqdn); } - break; - - case 49: -/* Line 1792 of yacc.c */ -#line 707 "knot/conf/cf-parse.y" - { conf_start_remote(scanner, (yyvsp[(1) - (1)].tok).t); } - break; - - case 50: -/* Line 1792 of yacc.c */ -#line 708 "knot/conf/cf-parse.y" - { conf_start_remote(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 2421 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 51: -/* Line 1792 of yacc.c */ -#line 709 "knot/conf/cf-parse.y" - { conf_start_remote(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 735 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start_remote(scanner, (yyvsp[0].tok).t); } +#line 2427 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 52: -/* Line 1792 of yacc.c */ -#line 710 "knot/conf/cf-parse.y" - { conf_start_remote(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 736 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start_remote(scanner, strdup((yyvsp[0].tok).t)); } +#line 2433 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 53: -/* Line 1792 of yacc.c */ -#line 711 "knot/conf/cf-parse.y" - { conf_start_remote(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 737 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start_remote(scanner, strdup((yyvsp[0].tok).t)); } +#line 2439 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ + break; + + case 54: +#line 738 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start_remote(scanner, strdup((yyvsp[0].tok).t)); } +#line 2445 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 55: -/* Line 1792 of yacc.c */ -#line 715 "knot/conf/cf-parse.y" +#line 739 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start_remote(scanner, strdup((yyvsp[0].tok).t)); } +#line 2451 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ + break; + + case 57: +#line 743 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { if (this_remote->addr.ss_family == AF_UNSPEC) { cf_error(scanner, "can't set port number before interface address\n"); } else { - sockaddr_port_set(&this_remote->addr, (yyvsp[(3) - (4)].tok).i); + sockaddr_port_set(&this_remote->addr, (yyvsp[-1].tok).i); } } +#line 2463 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 56: -/* Line 1792 of yacc.c */ -#line 722 "knot/conf/cf-parse.y" + case 58: +#line 750 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_set_iface(scanner, &this_remote->addr, AF_INET, (yyvsp[(3) - (4)].tok).t, CONFIG_DEFAULT_PORT); + conf_set_iface(scanner, &this_remote->addr, AF_INET, (yyvsp[-1].tok).t, CONFIG_DEFAULT_PORT); this_remote->prefix = IPV4_PREFIXLEN; } +#line 2472 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 57: -/* Line 1792 of yacc.c */ -#line 726 "knot/conf/cf-parse.y" + case 59: +#line 754 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_set_iface(scanner, &this_remote->addr, AF_INET, (yyvsp[(3) - (6)].tok).t, 0); - SET_NUM(this_remote->prefix, (yyvsp[(5) - (6)].tok).i, 0, IPV4_PREFIXLEN, "prefix length"); + conf_set_iface(scanner, &this_remote->addr, AF_INET, (yyvsp[-3].tok).t, 0); + SET_NUM(this_remote->prefix, (yyvsp[-1].tok).i, 0, IPV4_PREFIXLEN, "prefix length"); } +#line 2481 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 58: -/* Line 1792 of yacc.c */ -#line 730 "knot/conf/cf-parse.y" + case 60: +#line 758 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_set_iface(scanner, &this_remote->addr, AF_INET, (yyvsp[(3) - (6)].tok).t, (yyvsp[(5) - (6)].tok).i); + conf_set_iface(scanner, &this_remote->addr, AF_INET, (yyvsp[-3].tok).t, (yyvsp[-1].tok).i); this_remote->prefix = IPV4_PREFIXLEN; } +#line 2490 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 59: -/* Line 1792 of yacc.c */ -#line 734 "knot/conf/cf-parse.y" + case 61: +#line 762 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_set_iface(scanner, &this_remote->addr, AF_INET6, (yyvsp[(3) - (4)].tok).t, CONFIG_DEFAULT_PORT); + conf_set_iface(scanner, &this_remote->addr, AF_INET6, (yyvsp[-1].tok).t, CONFIG_DEFAULT_PORT); this_remote->prefix = IPV6_PREFIXLEN; } +#line 2499 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 60: -/* Line 1792 of yacc.c */ -#line 738 "knot/conf/cf-parse.y" + case 62: +#line 766 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_set_iface(scanner, &this_remote->addr, AF_INET6, (yyvsp[(3) - (6)].tok).t, 0); - SET_NUM(this_remote->prefix, (yyvsp[(5) - (6)].tok).i, 0, IPV6_PREFIXLEN, "prefix length"); + conf_set_iface(scanner, &this_remote->addr, AF_INET6, (yyvsp[-3].tok).t, 0); + SET_NUM(this_remote->prefix, (yyvsp[-1].tok).i, 0, IPV6_PREFIXLEN, "prefix length"); } +#line 2508 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 61: -/* Line 1792 of yacc.c */ -#line 742 "knot/conf/cf-parse.y" + case 63: +#line 770 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_set_iface(scanner, &this_remote->addr, AF_INET6, (yyvsp[(3) - (6)].tok).t, (yyvsp[(5) - (6)].tok).i); + conf_set_iface(scanner, &this_remote->addr, AF_INET6, (yyvsp[-3].tok).t, (yyvsp[-1].tok).i); this_remote->prefix = IPV6_PREFIXLEN; } +#line 2517 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 62: -/* Line 1792 of yacc.c */ -#line 746 "knot/conf/cf-parse.y" + case 64: +#line 774 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { if (this_remote->key != 0) { cf_error(scanner, "only one TSIG key definition is allowed in remote section\n"); } else { - conf_key_add(scanner, &this_remote->key, (yyvsp[(3) - (4)].tok).t); + conf_key_add(scanner, &this_remote->key, (yyvsp[-1].tok).t); } - free((yyvsp[(3) - (4)].tok).t); + free((yyvsp[-1].tok).t); } +#line 2530 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 63: -/* Line 1792 of yacc.c */ -#line 754 "knot/conf/cf-parse.y" + case 65: +#line 782 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_set_iface(scanner, &this_remote->via, AF_INET, (yyvsp[(3) - (4)].tok).t, 0); + conf_set_iface(scanner, &this_remote->via, AF_INET, (yyvsp[-1].tok).t, 0); } +#line 2538 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 64: -/* Line 1792 of yacc.c */ -#line 757 "knot/conf/cf-parse.y" + case 66: +#line 785 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_set_iface(scanner, &this_remote->via, AF_INET6, (yyvsp[(3) - (4)].tok).t, 0); + conf_set_iface(scanner, &this_remote->via, AF_INET6, (yyvsp[-1].tok).t, 0); } +#line 2546 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 65: -/* Line 1792 of yacc.c */ -#line 760 "knot/conf/cf-parse.y" + case 67: +#line 788 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - conf_remote_set_via(scanner, (yyvsp[(3) - (4)].tok).t); - free((yyvsp[(3) - (4)].tok).t); + conf_remote_set_via(scanner, (yyvsp[-1].tok).t); + free((yyvsp[-1].tok).t); } +#line 2555 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 67: -/* Line 1792 of yacc.c */ -#line 768 "knot/conf/cf-parse.y" + case 69: +#line 796 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { if (this_remote->addr.ss_family == AF_UNSPEC) { cf_error(scanner, "remote '%s' has no defined address", this_remote->name); } } +#line 2565 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 68: -/* Line 1792 of yacc.c */ -#line 776 "knot/conf/cf-parse.y" - { conf_add_member_into_group(scanner, (yyvsp[(1) - (1)].tok).t); } + case 70: +#line 804 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_add_member_into_group(scanner, (yyvsp[0].tok).t); } +#line 2571 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 72: -/* Line 1792 of yacc.c */ -#line 786 "knot/conf/cf-parse.y" - { conf_start_group(scanner, (yyvsp[(1) - (1)].tok).t); } + case 74: +#line 814 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_start_group(scanner, (yyvsp[0].tok).t); } +#line 2577 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 75: -/* Line 1792 of yacc.c */ -#line 795 "knot/conf/cf-parse.y" + case 77: +#line 823 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { this_list = &this_zone->acl.xfr_in; } +#line 2585 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 76: -/* Line 1792 of yacc.c */ -#line 798 "knot/conf/cf-parse.y" + case 78: +#line 826 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { this_list = &this_zone->acl.xfr_out; } +#line 2593 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 77: -/* Line 1792 of yacc.c */ -#line 801 "knot/conf/cf-parse.y" + case 79: +#line 829 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { this_list = &this_zone->acl.notify_in; } +#line 2601 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 78: -/* Line 1792 of yacc.c */ -#line 804 "knot/conf/cf-parse.y" + case 80: +#line 832 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { this_list = &this_zone->acl.notify_out; } +#line 2609 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 79: -/* Line 1792 of yacc.c */ -#line 807 "knot/conf/cf-parse.y" + case 81: +#line 835 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { this_list = &this_zone->acl.update_in; } +#line 2617 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 81: -/* Line 1792 of yacc.c */ -#line 813 "knot/conf/cf-parse.y" - { conf_acl_item(scanner, (yyvsp[(1) - (1)].tok).t); } + case 83: +#line 841 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_acl_item(scanner, (yyvsp[0].tok).t); } +#line 2623 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 82: -/* Line 1792 of yacc.c */ -#line 814 "knot/conf/cf-parse.y" - { conf_acl_item(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } + case 84: +#line 842 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_acl_item(scanner, strdup((yyvsp[0].tok).t)); } +#line 2629 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 83: -/* Line 1792 of yacc.c */ -#line 815 "knot/conf/cf-parse.y" - { conf_acl_item(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } + case 85: +#line 843 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_acl_item(scanner, strdup((yyvsp[0].tok).t)); } +#line 2635 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 84: -/* Line 1792 of yacc.c */ -#line 816 "knot/conf/cf-parse.y" - { conf_acl_item(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } + case 86: +#line 844 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_acl_item(scanner, strdup((yyvsp[0].tok).t)); } +#line 2641 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 85: -/* Line 1792 of yacc.c */ -#line 817 "knot/conf/cf-parse.y" - { conf_acl_item(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } + case 87: +#line 845 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_acl_item(scanner, strdup((yyvsp[0].tok).t)); } +#line 2647 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 90: -/* Line 1792 of yacc.c */ -#line 826 "knot/conf/cf-parse.y" + case 92: +#line 854 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { /* Find existing node in remotes. */ node_t* r = 0; conf_iface_t* found = 0; WALK_LIST (r, new_config->remotes) { - if (strcmp(((conf_iface_t*)r)->name, (yyvsp[(2) - (3)].tok).t) == 0) { + if (strcmp(((conf_iface_t*)r)->name, (yyvsp[-1].tok).t) == 0) { found = (conf_iface_t*)r; break; } @@ -2844,7 +2660,7 @@ /* Append to list if found. */ if (!found) { - cf_error(scanner, "remote '%s' is not defined", (yyvsp[(2) - (3)].tok).t); + cf_error(scanner, "remote '%s' is not defined", (yyvsp[-1].tok).t); } else { conf_remote_t *remote = malloc(sizeof(conf_remote_t)); if (!remote) { @@ -2856,352 +2672,352 @@ } /* Free text token. */ - free((yyvsp[(2) - (3)].tok).t); + free((yyvsp[-1].tok).t); } +#line 2678 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 91: -/* Line 1792 of yacc.c */ -#line 855 "knot/conf/cf-parse.y" - { query_module_create(scanner, (yyvsp[(1) - (2)].tok).t, (yyvsp[(2) - (2)].tok).t, true); free((yyvsp[(1) - (2)].tok).t); free((yyvsp[(2) - (2)].tok).t); } - break; - - case 95: -/* Line 1792 of yacc.c */ -#line 863 "knot/conf/cf-parse.y" - { conf_zone_start(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } - break; - - case 96: -/* Line 1792 of yacc.c */ -#line 864 "knot/conf/cf-parse.y" - { conf_zone_start(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } + case 93: +#line 883 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { query_module_create(scanner, (yyvsp[-1].tok).t, (yyvsp[0].tok).t, true); free((yyvsp[-1].tok).t); free((yyvsp[0].tok).t); } +#line 2684 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 97: -/* Line 1792 of yacc.c */ -#line 865 "knot/conf/cf-parse.y" - { conf_zone_start(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 891 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_zone_start(scanner, strdup((yyvsp[0].tok).t)); } +#line 2690 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 98: -/* Line 1792 of yacc.c */ -#line 866 "knot/conf/cf-parse.y" - { conf_zone_start(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 892 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_zone_start(scanner, strdup((yyvsp[0].tok).t)); } +#line 2696 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 99: -/* Line 1792 of yacc.c */ -#line 867 "knot/conf/cf-parse.y" - { conf_zone_start(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 893 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_zone_start(scanner, strdup((yyvsp[0].tok).t)); } +#line 2702 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 100: -/* Line 1792 of yacc.c */ -#line 868 "knot/conf/cf-parse.y" - { conf_zone_start(scanner, strdup((yyvsp[(1) - (1)].tok).t)); } +#line 894 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_zone_start(scanner, strdup((yyvsp[0].tok).t)); } +#line 2708 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 101: -/* Line 1792 of yacc.c */ -#line 869 "knot/conf/cf-parse.y" +#line 895 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_zone_start(scanner, strdup((yyvsp[0].tok).t)); } +#line 2714 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ + break; + + case 102: +#line 896 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_zone_start(scanner, strdup((yyvsp[0].tok).t)); } +#line 2720 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ + break; + + case 103: +#line 897 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { unsigned prefix_len = 0; - SET_NUM(prefix_len, (yyvsp[(1) - (3)].tok).i, 0, 255, "origin prefix length"); - size_t len = 3 + 1 + strlen((yyvsp[(3) - (3)].tok).t) + 1; /* <0,255> '/' rest */ + SET_NUM(prefix_len, (yyvsp[-2].tok).i, 0, 255, "origin prefix length"); + size_t len = 3 + 1 + strlen((yyvsp[0].tok).t) + 1; /* <0,255> '/' rest */ char *name = malloc(len * sizeof(char)); if (name == NULL) { cf_error(scanner, "out of memory"); } else { name[0] = '\0'; - if (snprintf(name, len, "%u/%s", prefix_len, (yyvsp[(3) - (3)].tok).t) < 0) { + if (snprintf(name, len, "%u/%s", prefix_len, (yyvsp[0].tok).t) < 0) { cf_error(scanner,"failed to convert rfc2317 origin to string"); } } - free((yyvsp[(3) - (3)].tok).t); + free((yyvsp[0].tok).t); conf_zone_start(scanner, name); } +#line 2741 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 102: -/* Line 1792 of yacc.c */ -#line 885 "knot/conf/cf-parse.y" - { conf_zone_start(scanner, (yyvsp[(1) - (1)].tok).t); } - break; - - case 106: -/* Line 1792 of yacc.c */ -#line 892 "knot/conf/cf-parse.y" - { this_zone->file = (yyvsp[(3) - (4)].tok).t; } - break; - - case 107: -/* Line 1792 of yacc.c */ -#line 893 "knot/conf/cf-parse.y" - { this_zone->build_diffs = (yyvsp[(3) - (4)].tok).i; } + case 104: +#line 913 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { conf_zone_start(scanner, (yyvsp[0].tok).t); } +#line 2747 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 108: -/* Line 1792 of yacc.c */ -#line 894 "knot/conf/cf-parse.y" - { this_zone->enable_checks = (yyvsp[(3) - (4)].tok).i; } +#line 920 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { this_zone->file = (yyvsp[-1].tok).t; } +#line 2753 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 109: -/* Line 1792 of yacc.c */ -#line 895 "knot/conf/cf-parse.y" - { this_zone->storage = (yyvsp[(3) - (4)].tok).t; } +#line 921 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { this_zone->build_diffs = (yyvsp[-1].tok).i; } +#line 2759 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 110: -/* Line 1792 of yacc.c */ -#line 896 "knot/conf/cf-parse.y" - { this_zone->dnssec_keydir = (yyvsp[(3) - (4)].tok).t; } +#line 922 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { this_zone->enable_checks = (yyvsp[-1].tok).i; } +#line 2765 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 111: -/* Line 1792 of yacc.c */ -#line 897 "knot/conf/cf-parse.y" - { this_zone->disable_any = (yyvsp[(3) - (4)].tok).i; } +#line 923 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { this_zone->storage = (yyvsp[-1].tok).t; } +#line 2771 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 112: -/* Line 1792 of yacc.c */ -#line 898 "knot/conf/cf-parse.y" - { - SET_INT(this_zone->dbsync_timeout, (yyvsp[(3) - (4)].tok).i, "zonefile-sync"); - } +#line 924 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { this_zone->dnssec_keydir = (yyvsp[-1].tok).t; } +#line 2777 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 113: -/* Line 1792 of yacc.c */ -#line 901 "knot/conf/cf-parse.y" - { - SET_INT(this_zone->dbsync_timeout, (yyvsp[(3) - (4)].tok).i, "zonefile-sync"); - } +#line 925 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { this_zone->disable_any = (yyvsp[-1].tok).i; } +#line 2783 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 114: -/* Line 1792 of yacc.c */ -#line 904 "knot/conf/cf-parse.y" +#line 926 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_SIZE(new_config->ixfr_fslimit, (yyvsp[(3) - (4)].tok).l, "ixfr-fslimit"); + SET_INT(this_zone->dbsync_timeout, (yyvsp[-1].tok).i, "zonefile-sync"); } +#line 2791 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 115: -/* Line 1792 of yacc.c */ -#line 907 "knot/conf/cf-parse.y" +#line 929 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_SIZE(this_zone->ixfr_fslimit, (yyvsp[(3) - (4)].tok).i, "ixfr-fslimit"); + SET_INT(this_zone->dbsync_timeout, (yyvsp[-1].tok).i, "zonefile-sync"); } +#line 2799 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 116: -/* Line 1792 of yacc.c */ -#line 910 "knot/conf/cf-parse.y" +#line 932 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_NUM(this_zone->notify_retries, (yyvsp[(3) - (4)].tok).i, 1, INT_MAX, "notify-retries"); - } + SET_SIZE(new_config->ixfr_fslimit, (yyvsp[-1].tok).l, "ixfr-fslimit"); + } +#line 2807 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 117: -/* Line 1792 of yacc.c */ -#line 913 "knot/conf/cf-parse.y" +#line 935 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_NUM(this_zone->notify_timeout, (yyvsp[(3) - (4)].tok).i, 1, INT_MAX, "notify-timeout"); - } + SET_SIZE(this_zone->ixfr_fslimit, (yyvsp[-1].tok).i, "ixfr-fslimit"); + } +#line 2815 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 118: -/* Line 1792 of yacc.c */ -#line 916 "knot/conf/cf-parse.y" - { this_zone->dnssec_enable = (yyvsp[(3) - (4)].tok).i; } +#line 938 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { + SET_NUM(this_zone->notify_retries, (yyvsp[-1].tok).i, 1, INT_MAX, "notify-retries"); + } +#line 2823 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 119: -/* Line 1792 of yacc.c */ -#line 917 "knot/conf/cf-parse.y" +#line 941 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_NUM(this_zone->sig_lifetime, (yyvsp[(3) - (4)].tok).i, 10800, INT_MAX, "signature-lifetime"); - } + SET_NUM(this_zone->notify_timeout, (yyvsp[-1].tok).i, 1, INT_MAX, "notify-timeout"); + } +#line 2831 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 120: -/* Line 1792 of yacc.c */ -#line 920 "knot/conf/cf-parse.y" - { - SET_NUM(this_zone->sig_lifetime, (yyvsp[(3) - (4)].tok).i, 10800, INT_MAX, "signature-lifetime"); - } +#line 944 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { this_zone->dnssec_enable = (yyvsp[-1].tok).i; } +#line 2837 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 121: -/* Line 1792 of yacc.c */ -#line 923 "knot/conf/cf-parse.y" +#line 945 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - this_zone->serial_policy = (yyvsp[(3) - (4)].tok).i; + SET_NUM(this_zone->sig_lifetime, (yyvsp[-1].tok).i, 10800, INT_MAX, "signature-lifetime"); } +#line 2845 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 123: -/* Line 1792 of yacc.c */ -#line 930 "knot/conf/cf-parse.y" - { query_module_create(scanner, (yyvsp[(1) - (2)].tok).t, (yyvsp[(2) - (2)].tok).t, false); free((yyvsp[(1) - (2)].tok).t); free((yyvsp[(2) - (2)].tok).t); } + case 122: +#line 948 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { + SET_NUM(this_zone->sig_lifetime, (yyvsp[-1].tok).i, 10800, INT_MAX, "signature-lifetime"); + } +#line 2853 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 128: -/* Line 1792 of yacc.c */ -#line 939 "knot/conf/cf-parse.y" - { new_config->disable_any = (yyvsp[(3) - (4)].tok).i; } + case 123: +#line 951 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { + this_zone->serial_policy = (yyvsp[-1].tok).i; + } +#line 2861 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 129: -/* Line 1792 of yacc.c */ -#line 940 "knot/conf/cf-parse.y" - { new_config->build_diffs = (yyvsp[(3) - (4)].tok).i; } + case 125: +#line 958 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { query_module_create(scanner, (yyvsp[-1].tok).t, (yyvsp[0].tok).t, false); free((yyvsp[-1].tok).t); free((yyvsp[0].tok).t); } +#line 2867 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 130: -/* Line 1792 of yacc.c */ -#line 941 "knot/conf/cf-parse.y" - { new_config->zone_checks = (yyvsp[(3) - (4)].tok).i; } +#line 967 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { new_config->disable_any = (yyvsp[-1].tok).i; } +#line 2873 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 131: -/* Line 1792 of yacc.c */ -#line 942 "knot/conf/cf-parse.y" - { - SET_SIZE(new_config->ixfr_fslimit, (yyvsp[(3) - (4)].tok).l, "ixfr-fslimit"); - } +#line 968 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { new_config->build_diffs = (yyvsp[-1].tok).i; } +#line 2879 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 132: -/* Line 1792 of yacc.c */ -#line 945 "knot/conf/cf-parse.y" - { - SET_SIZE(new_config->ixfr_fslimit, (yyvsp[(3) - (4)].tok).i, "ixfr-fslimit"); - } +#line 969 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { new_config->zone_checks = (yyvsp[-1].tok).i; } +#line 2885 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 133: -/* Line 1792 of yacc.c */ -#line 948 "knot/conf/cf-parse.y" +#line 970 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_NUM(new_config->notify_retries, (yyvsp[(3) - (4)].tok).i, 1, INT_MAX, "notify-retries"); - } + SET_SIZE(new_config->ixfr_fslimit, (yyvsp[-1].tok).l, "ixfr-fslimit"); + } +#line 2893 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 134: -/* Line 1792 of yacc.c */ -#line 951 "knot/conf/cf-parse.y" +#line 973 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_NUM(new_config->notify_timeout, (yyvsp[(3) - (4)].tok).i, 1, INT_MAX, "notify-timeout"); - } + SET_SIZE(new_config->ixfr_fslimit, (yyvsp[-1].tok).i, "ixfr-fslimit"); + } +#line 2901 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 135: -/* Line 1792 of yacc.c */ -#line 954 "knot/conf/cf-parse.y" +#line 976 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_NUM(new_config->dbsync_timeout, (yyvsp[(3) - (4)].tok).i, 0, INT_MAX, "zonefile-sync"); - } + SET_NUM(new_config->notify_retries, (yyvsp[-1].tok).i, 1, INT_MAX, "notify-retries"); + } +#line 2909 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 136: -/* Line 1792 of yacc.c */ -#line 957 "knot/conf/cf-parse.y" +#line 979 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_NUM(new_config->dbsync_timeout, (yyvsp[(3) - (4)].tok).i, 0, INT_MAX, "zonefile-sync"); - } + SET_NUM(new_config->notify_timeout, (yyvsp[-1].tok).i, 1, INT_MAX, "notify-timeout"); + } +#line 2917 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 137: -/* Line 1792 of yacc.c */ -#line 960 "knot/conf/cf-parse.y" - { new_config->storage = (yyvsp[(3) - (4)].tok).t; } +#line 982 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { + SET_NUM(new_config->dbsync_timeout, (yyvsp[-1].tok).i, 0, INT_MAX, "zonefile-sync"); + } +#line 2925 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 138: -/* Line 1792 of yacc.c */ -#line 961 "knot/conf/cf-parse.y" - { new_config->dnssec_enable = (yyvsp[(3) - (4)].tok).i; } +#line 985 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { + SET_NUM(new_config->dbsync_timeout, (yyvsp[-1].tok).i, 0, INT_MAX, "zonefile-sync"); + } +#line 2933 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 139: -/* Line 1792 of yacc.c */ -#line 962 "knot/conf/cf-parse.y" - { new_config->dnssec_keydir = (yyvsp[(3) - (4)].tok).t; } +#line 988 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { new_config->storage = (yyvsp[-1].tok).t; } +#line 2939 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 140: -/* Line 1792 of yacc.c */ -#line 963 "knot/conf/cf-parse.y" - { - SET_NUM(new_config->sig_lifetime, (yyvsp[(3) - (4)].tok).i, 10800, INT_MAX, "signature-lifetime"); - } +#line 989 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { new_config->dnssec_enable = (yyvsp[-1].tok).i; } +#line 2945 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 141: -/* Line 1792 of yacc.c */ -#line 966 "knot/conf/cf-parse.y" +#line 990 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { new_config->dnssec_keydir = (yyvsp[-1].tok).t; } +#line 2951 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ + break; + + case 142: +#line 991 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - SET_NUM(new_config->sig_lifetime, (yyvsp[(3) - (4)].tok).i, 10800, INT_MAX, "signature-lifetime"); + SET_NUM(new_config->sig_lifetime, (yyvsp[-1].tok).i, 10800, INT_MAX, "signature-lifetime"); } +#line 2959 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 142: -/* Line 1792 of yacc.c */ -#line 969 "knot/conf/cf-parse.y" + case 143: +#line 994 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - new_config->serial_policy = (yyvsp[(3) - (4)].tok).i; + SET_NUM(new_config->sig_lifetime, (yyvsp[-1].tok).i, 10800, INT_MAX, "signature-lifetime"); } +#line 2967 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; case 144: -/* Line 1792 of yacc.c */ -#line 975 "knot/conf/cf-parse.y" +#line 997 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { + new_config->serial_policy = (yyvsp[-1].tok).i; + } +#line 2975 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ + break; + + case 146: +#line 1003 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { this_logmap = malloc(sizeof(conf_log_map_t)); this_logmap->source = 0; this_logmap->prios = 0; add_tail(&this_log->map, &this_logmap->n); } +#line 2986 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 146: -/* Line 1792 of yacc.c */ -#line 985 "knot/conf/cf-parse.y" - { this_logmap->prios |= (yyvsp[(2) - (3)].tok).i; - fprintf(stderr, "Warning: more log severities per statement is deprecated. " - "Using the least serious one.\n"); + case 148: +#line 1013 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { this_logmap->prios |= (yyvsp[-1].tok).i; + cf_warning(scanner, "multiple log severities are deprecated, " + "using the least serious one"); } +#line 2995 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 147: -/* Line 1792 of yacc.c */ -#line 989 "knot/conf/cf-parse.y" - { this_logmap->prios |= (yyvsp[(2) - (3)].tok).i; } + case 149: +#line 1017 "knot/conf/cf-parse.y" /* yacc.c:1646 */ + { this_logmap->prios |= (yyvsp[-1].tok).i; } +#line 3001 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 149: -/* Line 1792 of yacc.c */ -#line 993 "knot/conf/cf-parse.y" + case 151: +#line 1021 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - this_logmap->source = (yyvsp[(2) - (3)].tok).i; + this_logmap->source = (yyvsp[-1].tok).i; this_logmap = 0; } +#line 3010 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 150: -/* Line 1792 of yacc.c */ -#line 999 "knot/conf/cf-parse.y" + case 152: +#line 1027 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { /* Find already existing rule. */ this_log = 0; node_t *n = 0; WALK_LIST(n, new_config->logs) { conf_log_t* log = (conf_log_t*)n; - if (log->type == (yyvsp[(1) - (1)].tok).i) { + if (log->type == (yyvsp[0].tok).i) { this_log = log; break; } @@ -3209,17 +3025,17 @@ if (!this_log) { this_log = malloc(sizeof(conf_log_t)); - this_log->type = (yyvsp[(1) - (1)].tok).i; + this_log->type = (yyvsp[0].tok).i; this_log->file = 0; init_list(&this_log->map); add_tail(&new_config->logs, &this_log->n); } } +#line 3035 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 151: -/* Line 1792 of yacc.c */ -#line 1021 "knot/conf/cf-parse.y" + case 153: +#line 1049 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { /* Find already existing rule. */ this_log = 0; @@ -3227,9 +3043,9 @@ WALK_LIST(n, new_config->logs) { conf_log_t* log = (conf_log_t*)n; if (log->type == LOGT_FILE) { - if (strcmp((yyvsp[(2) - (2)].tok).t, log->file) == 0) { + if (strcmp((yyvsp[0].tok).t, log->file) == 0) { this_log = log; - free((yyvsp[(2) - (2)].tok).t); + free((yyvsp[0].tok).t); break; } } @@ -3239,49 +3055,49 @@ if (!this_log) { this_log = malloc(sizeof(conf_log_t)); this_log->type = LOGT_FILE; - this_log->file = strcpath((yyvsp[(2) - (2)].tok).t); + this_log->file = strcpath((yyvsp[0].tok).t); init_list(&this_log->map); add_tail(&new_config->logs, &this_log->n); } } +#line 3064 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 152: -/* Line 1792 of yacc.c */ -#line 1047 "knot/conf/cf-parse.y" + case 154: +#line 1075 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { } +#line 3071 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 156: -/* Line 1792 of yacc.c */ -#line 1056 "knot/conf/cf-parse.y" + case 158: +#line 1084 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { } +#line 3077 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 158: -/* Line 1792 of yacc.c */ -#line 1060 "knot/conf/cf-parse.y" + case 160: +#line 1088 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { conf_init_iface(scanner, NULL); } +#line 3083 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 159: -/* Line 1792 of yacc.c */ -#line 1064 "knot/conf/cf-parse.y" + case 161: +#line 1092 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { this_list = &new_config->ctl.allow; } +#line 3091 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 160: -/* Line 1792 of yacc.c */ -#line 1070 "knot/conf/cf-parse.y" + case 162: +#line 1098 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { new_config->ctl.have = true; } +#line 3097 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 161: -/* Line 1792 of yacc.c */ -#line 1071 "knot/conf/cf-parse.y" + case 163: +#line 1099 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { if (this_iface->addr.ss_family == AF_UNSPEC) { cf_error(scanner, "control interface has no defined address"); @@ -3289,21 +3105,21 @@ new_config->ctl.iface = this_iface; } } +#line 3109 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; - case 162: -/* Line 1792 of yacc.c */ -#line 1078 "knot/conf/cf-parse.y" + case 164: +#line 1106 "knot/conf/cf-parse.y" /* yacc.c:1646 */ { - sockaddr_set(&this_iface->addr, AF_UNIX, (yyvsp[(3) - (4)].tok).t, 0); + sockaddr_set(&this_iface->addr, AF_UNIX, (yyvsp[-1].tok).t, 0); new_config->ctl.iface = this_iface; - free((yyvsp[(3) - (4)].tok).t); + free((yyvsp[-1].tok).t); } +#line 3119 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ break; -/* Line 1792 of yacc.c */ -#line 3307 "knot/conf/libknotd_la-cf-parse.c" +#line 3123 "knot/conf/libknotd_la-cf-parse.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -3325,7 +3141,7 @@ *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -3340,9 +3156,9 @@ goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -3393,20 +3209,20 @@ if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, scanner); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, scanner); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -3425,7 +3241,7 @@ if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -3438,29 +3254,29 @@ | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp, scanner); + yystos[yystate], yyvsp, scanner); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -3511,14 +3327,14 @@ yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, scanner); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, scanner); + yystos[*yyssp], yyvsp, scanner); YYPOPSTACK (1); } #ifndef yyoverflow @@ -3529,11 +3345,7 @@ if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - -/* Line 2055 of yacc.c */ -#line 1089 "knot/conf/cf-parse.y" +#line 1117 "knot/conf/cf-parse.y" /* yacc.c:1906 */ diff -Nru knot-1.6.0/src/knot/conf/libknotd_la-cf-parse.h knot-1.6.2/src/knot/conf/libknotd_la-cf-parse.h --- knot-1.6.0/src/knot/conf/libknotd_la-cf-parse.h 2014-10-23 16:25:45.000000000 +0200 +++ knot-1.6.2/src/knot/conf/libknotd_la-cf-parse.h 2015-02-19 10:44:17.000000000 +0100 @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by 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/>. */ @@ -26,13 +26,13 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ #ifndef YY_CF_KNOT_CONF_LIBKNOTD_LA_CF_PARSE_H_INCLUDED # define YY_CF_KNOT_CONF_LIBKNOTD_LA_CF_PARSE_H_INCLUDED -/* Enabling traces. */ +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif @@ -40,79 +40,79 @@ extern int cf_debug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - END = 258, - INVALID_TOKEN = 259, - TEXT = 260, - HEXSTR = 261, - NUM = 262, - INTERVAL = 263, - SIZE = 264, - BOOL = 265, - SYSTEM = 266, - IDENTITY = 267, - HOSTNAME = 268, - SVERSION = 269, - NSID = 270, - KEY = 271, - KEYS = 272, - MAX_UDP_PAYLOAD = 273, - TSIG_ALGO_NAME = 274, - WORKERS = 275, - BACKGROUND_WORKERS = 276, - ASYNC_START = 277, - USER = 278, - RUNDIR = 279, - PIDFILE = 280, - REMOTES = 281, - GROUPS = 282, - ZONES = 283, - FILENAME = 284, - DISABLE_ANY = 285, - SEMANTIC_CHECKS = 286, - NOTIFY_RETRIES = 287, - NOTIFY_TIMEOUT = 288, - DBSYNC_TIMEOUT = 289, - IXFR_FSLIMIT = 290, - XFR_IN = 291, - XFR_OUT = 292, - UPDATE_IN = 293, - NOTIFY_IN = 294, - NOTIFY_OUT = 295, - BUILD_DIFFS = 296, - MAX_CONN_IDLE = 297, - MAX_CONN_HS = 298, - MAX_CONN_REPLY = 299, - RATE_LIMIT = 300, - RATE_LIMIT_SIZE = 301, - RATE_LIMIT_SLIP = 302, - TRANSFERS = 303, - STORAGE = 304, - DNSSEC_ENABLE = 305, - DNSSEC_KEYDIR = 306, - SIGNATURE_LIFETIME = 307, - SERIAL_POLICY = 308, - SERIAL_POLICY_VAL = 309, - QUERY_MODULE = 310, - INTERFACES = 311, - ADDRESS = 312, - PORT = 313, - IPA = 314, - IPA6 = 315, - VIA = 316, - CONTROL = 317, - ALLOW = 318, - LISTEN_ON = 319, - LOG = 320, - LOG_DEST = 321, - LOG_SRC = 322, - LOG_LEVEL = 323 - }; + enum yytokentype + { + END = 258, + INVALID_TOKEN = 259, + TEXT = 260, + HEXSTR = 261, + NUM = 262, + INTERVAL = 263, + SIZE = 264, + BOOL = 265, + SYSTEM = 266, + IDENTITY = 267, + HOSTNAME = 268, + SVERSION = 269, + NSID = 270, + KEY = 271, + KEYS = 272, + MAX_UDP_PAYLOAD = 273, + TSIG_ALGO_NAME = 274, + WORKERS = 275, + BACKGROUND_WORKERS = 276, + ASYNC_START = 277, + USER = 278, + RUNDIR = 279, + PIDFILE = 280, + REMOTES = 281, + GROUPS = 282, + ZONES = 283, + FILENAME = 284, + DISABLE_ANY = 285, + SEMANTIC_CHECKS = 286, + NOTIFY_RETRIES = 287, + NOTIFY_TIMEOUT = 288, + DBSYNC_TIMEOUT = 289, + IXFR_FSLIMIT = 290, + XFR_IN = 291, + XFR_OUT = 292, + UPDATE_IN = 293, + NOTIFY_IN = 294, + NOTIFY_OUT = 295, + BUILD_DIFFS = 296, + MAX_CONN_IDLE = 297, + MAX_CONN_HS = 298, + MAX_CONN_REPLY = 299, + MAX_TCP_CLIENTS = 300, + RATE_LIMIT = 301, + RATE_LIMIT_SIZE = 302, + RATE_LIMIT_SLIP = 303, + TRANSFERS = 304, + STORAGE = 305, + DNSSEC_ENABLE = 306, + DNSSEC_KEYDIR = 307, + SIGNATURE_LIFETIME = 308, + SERIAL_POLICY = 309, + SERIAL_POLICY_VAL = 310, + QUERY_MODULE = 311, + INTERFACES = 312, + ADDRESS = 313, + PORT = 314, + IPA = 315, + IPA6 = 316, + VIA = 317, + CONTROL = 318, + ALLOW = 319, + LISTEN_ON = 320, + LOG = 321, + LOG_DEST = 322, + LOG_SRC = 323, + LOG_LEVEL = 324 + }; #endif /* Tokens. */ #define END 258 @@ -157,38 +157,38 @@ #define MAX_CONN_IDLE 297 #define MAX_CONN_HS 298 #define MAX_CONN_REPLY 299 -#define RATE_LIMIT 300 -#define RATE_LIMIT_SIZE 301 -#define RATE_LIMIT_SLIP 302 -#define TRANSFERS 303 -#define STORAGE 304 -#define DNSSEC_ENABLE 305 -#define DNSSEC_KEYDIR 306 -#define SIGNATURE_LIFETIME 307 -#define SERIAL_POLICY 308 -#define SERIAL_POLICY_VAL 309 -#define QUERY_MODULE 310 -#define INTERFACES 311 -#define ADDRESS 312 -#define PORT 313 -#define IPA 314 -#define IPA6 315 -#define VIA 316 -#define CONTROL 317 -#define ALLOW 318 -#define LISTEN_ON 319 -#define LOG 320 -#define LOG_DEST 321 -#define LOG_SRC 322 -#define LOG_LEVEL 323 - - +#define MAX_TCP_CLIENTS 300 +#define RATE_LIMIT 301 +#define RATE_LIMIT_SIZE 302 +#define RATE_LIMIT_SLIP 303 +#define TRANSFERS 304 +#define STORAGE 305 +#define DNSSEC_ENABLE 306 +#define DNSSEC_KEYDIR 307 +#define SIGNATURE_LIFETIME 308 +#define SERIAL_POLICY 309 +#define SERIAL_POLICY_VAL 310 +#define QUERY_MODULE 311 +#define INTERFACES 312 +#define ADDRESS 313 +#define PORT 314 +#define IPA 315 +#define IPA6 316 +#define VIA 317 +#define CONTROL 318 +#define ALLOW 319 +#define LISTEN_ON 320 +#define LOG 321 +#define LOG_DEST 322 +#define LOG_SRC 323 +#define LOG_LEVEL 324 +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { -/* Line 2058 of yacc.c */ -#line 450 "knot/conf/cf-parse.y" +#line 475 "knot/conf/cf-parse.y" /* yacc.c:1909 */ struct { char *t; @@ -197,28 +197,14 @@ knot_tsig_algorithm_t alg; } tok; - -/* Line 2058 of yacc.c */ -#line 203 "knot/conf/libknotd_la-cf-parse.h" -} YYSTYPE; +#line 201 "knot/conf/libknotd_la-cf-parse.h" /* yacc.c:1909 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int cf_parse (void *YYPARSE_PARAM); -#else -int cf_parse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus + int cf_parse (void *scanner); -#else -int cf_parse (); -#endif -#endif /* ! YYPARSE_PARAM */ #endif /* !YY_CF_KNOT_CONF_LIBKNOTD_LA_CF_PARSE_H_INCLUDED */ diff -Nru knot-1.6.0/src/knot/dnssec/zone-keys.c knot-1.6.2/src/knot/dnssec/zone-keys.c --- knot-1.6.0/src/knot/dnssec/zone-keys.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/dnssec/zone-keys.c 2015-02-19 10:43:56.000000000 +0100 @@ -98,6 +98,7 @@ key->next_event = next_event; key->is_ksk = params->flags & KNOT_RDATA_DNSKEY_FLAG_KSK; + key->is_zsk = !key->is_ksk; key->is_active = params->time_activate <= now && (params->time_inactive == 0 || now < params->time_inactive); @@ -107,58 +108,96 @@ } /*! - * \brief Check if there is a functional KSK and ZSK for each used algorithm. + * \brief Algorithm usage information. */ -static int check_keys_validity(const knot_zone_keys_t *keys) +typedef struct algorithm_usage { + unsigned ksk_count; //!< Available KSK count. + unsigned zsk_count; //!< Available ZSK count. + + bool is_public; //!< DNSKEY is published. + bool is_stss; //!< Used to sign all types of records. + bool is_ksk_active; //!< Used to sign DNSKEY records. + bool is_zsk_active; //!< Used to sign non-DNSKEY records. +} algorithm_usage_t; + +/*! + * \brief Check correct key usage, enable Single-Type Signing Scheme if needed. + * + * Each record in the zone has to be signed at least by one key for each + * algorithm published in the DNSKEY RR set in the zone apex. + * + * Therefore, publishing a DNSKEY creates a requirement on active keys with + * the same algorithm. At least one KSK key and one ZSK has to be enabled. + * If one key type is unavailable (not just inactive and not-published), the + * algorithm is switched to Single-Type Signing Scheme. + */ +static int prepare_and_check_keys(const knot_dname_t *zone_name, + knot_zone_keys_t *keys) { + assert(zone_name); assert(keys); - const int MAX_ALGORITHMS = KNOT_DNSSEC_ALG_ECDSAP384SHA384 + 1; - struct { - bool published; - bool ksk_enabled; - bool zsk_enabled; - } algorithms[MAX_ALGORITHMS]; - memset(algorithms, 0, sizeof(algorithms)); + const size_t max_algorithms = KNOT_DNSSEC_ALG_ECDSAP384SHA384 + 1; + algorithm_usage_t usage[max_algorithms]; + memset(usage, 0, max_algorithms * sizeof(algorithm_usage_t)); - /* Make a list of used algorithms */ + // count available keys - const knot_zone_key_t *key = NULL; + knot_zone_key_t *key = NULL; WALK_LIST(key, keys->list) { - knot_dnssec_algorithm_t a = key->dnssec_key.algorithm; - assert(a < MAX_ALGORITHMS); + assert(key->dnssec_key.algorithm < max_algorithms); + algorithm_usage_t *u = &usage[key->dnssec_key.algorithm]; - if (key->is_public) { - // public key creates a requirement for an algorithm - algorithms[a].published = true; - - // need fully enabled ZSK and KSK for each algorithm - if (key->is_active) { - if (key->is_ksk) { - algorithms[a].ksk_enabled = true; - } else { - algorithms[a].zsk_enabled = true; - } - } + if (key->is_ksk) { u->ksk_count += 1; } + if (key->is_zsk) { u->zsk_count += 1; } + } + + // enable Single-Type Signing scheme if applicable + + for (int i = 0; i < max_algorithms; i++) { + algorithm_usage_t *u = &usage[i]; + + // either KSK or ZSK keys are available + if ((u->ksk_count == 0) != (u->zsk_count == 0)) { + u->is_stss = true; + log_zone_info(zone_name, "DNSSEC, Single-Type Signing " + "scheme enabled, algorithm '%d'", i); } } - /* Validate enabled algorithms */ + // update key flags for STSS, collect information about usage - int enabled_count = 0; - for (int a = 0; a < MAX_ALGORITHMS; a++) { - if (!algorithms[a].published) { - continue; + WALK_LIST(key, keys->list) { + assert(key->dnssec_key.algorithm < max_algorithms); + algorithm_usage_t *u = &usage[key->dnssec_key.algorithm]; + + if (u->is_stss) { + key->is_ksk = true; + key->is_zsk = true; } - if (!algorithms[a].ksk_enabled || !algorithms[a].zsk_enabled) { - return KNOT_DNSSEC_EMISSINGKEYTYPE; + if (key->is_public) { u->is_public = true; } + if (key->is_active) { + if (key->is_ksk) { u->is_ksk_active = true; } + if (key->is_zsk) { u->is_zsk_active = true; } } + } + + // validate conditions for used algorithms - enabled_count += 1; + unsigned public_count = 0; + + for (int i = 0; i < max_algorithms; i++) { + algorithm_usage_t *u = &usage[i]; + if (u->is_public) { + public_count += 1; + if (!u->is_ksk_active || !u->is_zsk_active) { + return KNOT_DNSSEC_EMISSINGKEYTYPE; + } + } } - if (enabled_count == 0) { + if (public_count == 0) { return KNOT_DNSSEC_ENOKEY; } @@ -167,8 +206,6 @@ /*! * \brief Load zone keys from a key directory. - * - * \todo Maybe use dynamic list instead of fixed size array. */ int knot_load_zone_keys(const char *keydir_name, const knot_dname_t *zone_name, bool nsec3_enabled, knot_zone_keys_t *keys) @@ -285,7 +322,7 @@ closedir(keydir); if (result == KNOT_EOK) { - result = check_keys_validity(keys); + result = prepare_and_check_keys(zone_name, keys); } if (result == KNOT_EOK) { diff -Nru knot-1.6.0/src/knot/dnssec/zone-keys.h knot-1.6.2/src/knot/dnssec/zone-keys.h --- knot-1.6.0/src/knot/dnssec/zone-keys.h 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/dnssec/zone-keys.h 2015-02-19 10:43:56.000000000 +0100 @@ -40,7 +40,8 @@ knot_dnssec_key_t dnssec_key; knot_dnssec_sign_context_t *context; uint32_t next_event; //!< Timestamp of next key event. - bool is_ksk; //!< Is KSK key. + bool is_ksk; //!< Is key-signing. + bool is_zsk; //!< Is zone-signing. bool is_public; //!< Currently in zone. bool is_active; //!< Currently used for signing. } knot_zone_key_t; diff -Nru knot-1.6.0/src/knot/dnssec/zone-sign.c knot-1.6.2/src/knot/dnssec/zone-sign.c --- knot-1.6.0/src/knot/dnssec/zone-sign.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/dnssec/zone-sign.c 2015-02-19 10:43:56.000000000 +0100 @@ -110,18 +110,10 @@ return false; } - if (key->is_ksk) { - if (covered->type != KNOT_RRTYPE_DNSKEY) { - return false; - } + bool is_zone_key = covered->type == KNOT_RRTYPE_DNSKEY && + knot_dname_is_equal(key->dnssec_key.name, covered->owner); - // use KSK only in the zone apex - if (!knot_dname_is_equal(key->dnssec_key.name, covered->owner)) { - return false; - } - } - - return true; + return (key->is_ksk && is_zone_key) || (key->is_zsk && !is_zone_key); } /*! diff -Nru knot-1.6.0/src/knot/nameserver/ixfr.c knot-1.6.2/src/knot/nameserver/ixfr.c --- knot-1.6.0/src/knot/nameserver/ixfr.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/nameserver/ixfr.c 2015-02-19 10:43:56.000000000 +0100 @@ -162,7 +162,7 @@ #undef IXFR_SAFE_PUT /*! \brief Loads IXFRs from journal. */ -static int ixfr_load_chsets(list_t *chgsets, const zone_t *zone, +static int ixfr_load_chsets(list_t *chgsets, zone_t *zone, const knot_rrset_t *their_soa) { assert(chgsets); @@ -176,7 +176,10 @@ return KNOT_EUPTODATE; } + pthread_mutex_lock(&zone->journal_lock); ret = journal_load_changesets(zone, chgsets, serial_from, serial_to); + pthread_mutex_unlock(&zone->journal_lock); + if (ret != KNOT_EOK) { changesets_free(chgsets); } @@ -241,7 +244,7 @@ const knot_rrset_t *their_soa = &knot_pkt_section(qdata->query, KNOT_AUTHORITY)->rr[0]; list_t chgsets; init_list(&chgsets); - int ret = ixfr_load_chsets(&chgsets, qdata->zone, their_soa); + int ret = ixfr_load_chsets(&chgsets, (zone_t *)qdata->zone, their_soa); if (ret != KNOT_EOK) { dbg_ns("%s: failed to load changesets => %d\n", __func__, ret); return ret; diff -Nru knot-1.6.0/src/knot/server/journal.c knot-1.6.2/src/knot/server/journal.c --- knot-1.6.0/src/knot/server/journal.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/server/journal.c 2015-02-19 10:43:56.000000000 +0100 @@ -24,7 +24,6 @@ #include <sys/mman.h> #include <assert.h> -#include "common-knot/crc.h" #include "libknot/common.h" #include "knot/other/debug.h" #include "knot/server/journal.h" @@ -34,15 +33,17 @@ /*! \brief Infinite file size limit. */ #define FSLIMIT_INF (~((size_t)0)) -/*! \brief Node classification macros. */ -#define jnode_flags(j, i) ((j)->nodes[(i)].flags) - /*! \brief Next node. */ #define jnode_next(j, i) (((i) + 1) % (j)->max_nodes) /*! \brief Previous node. */ #define jnode_prev(j, i) (((i) == 0) ? (j)->max_nodes - 1 : (i) - 1) +/*! \bref Starting node data position. */ +#define jnode_base_pos(max_nodes) (JOURNAL_HSIZE + (max_nodes + 1) * sizeof(journal_node_t)) + +static const uint32_t CRC_PLACEHOLDER = 0; + static inline int sfread(void *dst, size_t len, int fd) { return read(fd, dst, len) == len; @@ -53,10 +54,6 @@ return write(fd, src, len) == len; } -static inline journal_node_t *journal_end(journal_t *journal) { - return journal->nodes + journal->qtail; -} - /*! \brief Equality compare function. */ static inline int journal_cmp_eq(uint64_t k1, uint64_t k2) { @@ -96,108 +93,6 @@ return (((uint64_t)to) << ((uint64_t)32)) | ((uint64_t)from); } -/*! \brief Recover metadata from journal. */ -static int journal_recover(journal_t *j) -{ - if (j == NULL) { - return KNOT_EINVAL; - } - - /* Attempt to recover queue. */ - int qstate[2] = { -1, -1 }; - unsigned c = 0, p = j->max_nodes - 1; - while (1) { - - /* Fetch previous and current node. */ - journal_node_t *np = j->nodes + p; - journal_node_t *nc = j->nodes + c; - - /* Check flags - * p c (0 = free, 1 = non-free) - * 0 0 - in free segment - * 0 1 - c-node is qhead - * 1 0 - c-node is qtail - * 1 1 - in full segment - */ - unsigned c_set = (nc->flags > JOURNAL_FREE); - unsigned p_set = (np->flags > JOURNAL_FREE); - if (!p_set && c_set && qstate[0] < 0) { - qstate[0] = c; /* Recovered qhead. */ - dbg_journal_verb("journal: recovered qhead=%u\n", - qstate[0]); - } - if (p_set && !c_set && qstate[1] < 0) {\ - qstate[1] = c; /* Recovered qtail. */ - dbg_journal_verb("journal: recovered qtail=%u\n", - qstate[1]); - } - - /* Both qstates set. */ - if (qstate[0] > -1 && qstate[1] > -1) { - break; - } - - /* Set prev and next. */ - p = c; - c = (c + 1) % j->max_nodes; - - /* All nodes probed. */ - if (c == 0) { - dbg_journal("journal: failed to recover node queue\n"); - break; - } - } - - /* Evaluate */ - if (qstate[0] < 0 || qstate[1] < 0) { - return KNOT_ERANGE; - } - - /* Write back. */ - int seek_ret = lseek(j->fd, JOURNAL_HSIZE - 2 * sizeof(uint16_t), SEEK_SET); - if (seek_ret < 0 || !sfwrite(qstate, 2 * sizeof(uint16_t), j->fd)) { - dbg_journal("journal: failed to write back queue state\n"); - return KNOT_ERROR; - } - - /* Reset queue state. */ - j->qhead = qstate[0]; - j->qtail = qstate[1]; - dbg_journal("journal: node queue=<%u,%u> recovered\n", - qstate[0], qstate[1]); - - - return KNOT_EOK; -} - -/* Recalculate CRC. */ -static int journal_update_crc(int fd) -{ - if (fcntl(fd, F_GETFL) < 0) { - return KNOT_EINVAL; - } - - char buf[4096]; - ssize_t rb = 0; - crc_t crc = crc_init(); - if (lseek(fd, MAGIC_LENGTH + sizeof(crc_t), SEEK_SET) < 0) { - return KNOT_ERROR; - } - while((rb = read(fd, buf, sizeof(buf))) > 0) { - crc = crc_update(crc, (const unsigned char *)buf, rb); - } - if (lseek(fd, MAGIC_LENGTH, SEEK_SET) < 0) { - return KNOT_ERROR; - } - if (!sfwrite(&crc, sizeof(crc_t), fd)) { - dbg_journal("journal: couldn't write CRC to fd=%d\n", fd); - return KNOT_ERROR; - } - - return KNOT_EOK; -} - - /*! \brief Create new journal. */ static int journal_create_file(const char *fn, uint16_t max_nodes) { @@ -231,8 +126,8 @@ remove(fn); return KNOT_ERROR; } - crc_t crc = crc_init(); - if (!sfwrite(&crc, sizeof(crc_t), fd)) { + + if (!sfwrite(&CRC_PLACEHOLDER, sizeof(CRC_PLACEHOLDER), fd)) { close(fd); remove(fn); return KNOT_ERROR; @@ -268,7 +163,7 @@ memset(&jn, 0, sizeof(journal_node_t)); jn.id = 0; jn.flags = JOURNAL_VALID; - jn.pos = JOURNAL_HSIZE + (max_nodes + 1) * sizeof(journal_node_t); + jn.pos = jnode_base_pos(max_nodes); jn.len = 0; if (!sfwrite(&jn, sizeof(journal_node_t), fd)) { close(fd); @@ -289,15 +184,6 @@ } } - /* Recalculate CRC. */ - if (journal_update_crc(fd) != KNOT_EOK) { - close(fd); - if(remove(fn) < 0) { - dbg_journal("journal: failed to remove journal file after error\n"); - } - return KNOT_ERROR; - } - /* Unlock and close. */ close(fd); @@ -355,40 +241,15 @@ } return ret; } - crc_t crc = 0; - if (!sfread(&crc, sizeof(crc_t), j->fd)) { - dbg_journal_verb("journal: cannot read CRC\n"); - goto open_file_error; - } - - /* Recalculate CRC. */ - char buf[4096]; - ssize_t rb = 0; - crc_t crc_calc = crc_init(); - while((rb = read(j->fd, buf, sizeof(buf))) > 0) { - crc_calc = crc_update(crc_calc, (const unsigned char *)buf, rb); - } - /* Compare */ - if (crc == crc_calc) { - /* Rewind. */ - if (lseek(j->fd, MAGIC_LENGTH + sizeof(crc_t), SEEK_SET) < 0) { - goto open_file_error; - } - } else { - log_warning("journal '%s', CRC error, purging", j->path); - close(j->fd); - j->fd = -1; - ret = journal_create_file(j->path, JOURNAL_NCOUNT); - if(ret == KNOT_EOK) { - return journal_open_file(j); - } - return ret; + /* Skip CRC */ + if (lseek(j->fd, MAGIC_LENGTH + sizeof(CRC_PLACEHOLDER), SEEK_SET) < 0) { + goto open_file_error; } /* Get journal file size. */ struct stat st; - if (stat(j->path, &st) < 0) { + if (fstat(j->fd, &st) < 0) { dbg_journal_verb("journal: cannot get journal fsize\n"); goto open_file_error; } @@ -408,6 +269,13 @@ goto open_file_error; } + /* Check minimum fsize limit. */ + size_t fslimit_min = jnode_base_pos(j->max_nodes) + 1024; /* At least 1K block */ + if (j->fslimit < fslimit_min) { + log_error("journal '%s', filesize limit smaller than '%zu'", j->path, fslimit_min); + goto open_file_error; + } + /* Allocate nodes. */ const size_t node_len = sizeof(journal_node_t); j->nodes = malloc(j->max_nodes * node_len); @@ -452,23 +320,6 @@ dbg_journal("journal: opened journal size=%u, queue=<%u, %u>, fd=%d\n", j->max_nodes, j->qhead, j->qtail, j->fd); - /* Check node queue. */ - unsigned qtail_free = (jnode_flags(j, j->qtail) <= JOURNAL_FREE); - unsigned qhead_free = j->max_nodes - 1; /* Left of qhead must be free.*/ - if (j->qhead > 0) { - qhead_free = (j->qhead - 1); - } - qhead_free = (jnode_flags(j, qhead_free) <= JOURNAL_FREE); - if ((j->qhead != j->qtail) && (!qtail_free || !qhead_free)) { - log_warning("journal '%s', recovering metadata after crash", j->path); - ret = journal_recover(j); - if (ret != KNOT_EOK) { - log_error("journal '%s', unrecoverable corruption (%s)", - j->path, knot_strerror(ret)); - goto open_file_error; - } - } - /* Save file lock and return. */ return KNOT_EOK; @@ -489,9 +340,6 @@ return KNOT_EINVAL; } - /* Recalculate CRC. */ - int ret = journal_update_crc(journal->fd); - /* Close file. */ if (journal->fd > 0) { close(journal->fd); @@ -502,7 +350,7 @@ free(journal->nodes); journal->nodes = NULL; - return ret; + return KNOT_EOK; } /*! \brief Sync node state to permanent storage. */ @@ -515,9 +363,7 @@ /* Calculate node offset. */ const size_t node_len = sizeof(journal_node_t); size_t i = n - journal->nodes; - if (i > journal->max_nodes) { - return KNOT_EINVAL; - } + assert(i < journal->max_nodes); /* Calculate node position in permanent storage. */ long jn_fpos = JOURNAL_HSIZE + (i + 1) * node_len; @@ -541,58 +387,53 @@ const size_t node_len = sizeof(journal_node_t); *rn = NULL; - /* Find next free node. */ - uint16_t jnext = (j->qtail + 1) % j->max_nodes; - dbg_journal("journal: will write id=%llu, node=%u, size=%zu, fsize=%zu\n", (unsigned long long)id, j->qtail, len, j->fsize); - /* Calculate remaining bytes to reach file size limit. */ - size_t fs_remaining = j->fslimit - j->fsize; - int seek_ret = 0; - - /* Increase free segment if on the end of file. */ - dbg_journal("journal: free.pos = %u free.len = %u\n", - j->free.pos, j->free.len); - journal_node_t *n = j->nodes + j->qtail; - if (j->free.pos + j->free.len == j->fsize) { - - dbg_journal_verb("journal: * is last node\n"); + /* Count rewinds. */ + bool already_rewound = false; - /* Grow journal file until the size limit. */ - if(j->free.len < len && len <= fs_remaining) { - size_t diff = len - j->free.len; - dbg_journal("journal: * growing by +%zu, pos=%u, " - "new fsize=%zu\n", - diff, j->free.pos, - j->fsize + diff); - j->fsize += diff; /* Appending increases file size. */ - j->free.len += diff; - - } + /* Evict occupied nodes if necessary. */ + while (j->free.len < len || jnode_next(j, j->qtail) == j->qhead) { - /* Rewind if resize is needed, but the limit is reached. */ - if(j->free.len < len && len > fs_remaining) { - journal_node_t *head = j->nodes + j->qhead; - j->fsize = j->free.pos; - j->free.pos = head->pos; - j->free.len = 0; - dbg_journal_verb("journal: * fslimit reached, " - "rewinding to %u\n", - head->pos); - dbg_journal_verb("journal: * file size trimmed to %zu\n", - j->fsize); - } - } + /* Increase free segment if on the end of file. */ + bool is_empty = (j->qtail == j->qhead); + journal_node_t *head = j->nodes + j->qhead; + journal_node_t *last = j->nodes + jnode_prev(j, j->qtail); + if (is_empty || (head->pos <= last->pos && j->free.pos > last->pos)) { - /* Count node visits to prevent looping. */ - uint16_t visit_count = 0; + dbg_journal_verb("journal: * is last node\n"); - /* Evict occupied nodes if necessary. */ - while (j->free.len < len || j->nodes[jnext].flags > JOURNAL_FREE) { + /* Grow journal file until the size limit. */ + if(j->free.pos + len < j->fslimit && jnode_next(j, j->qtail) != j->qhead) { + size_t diff = len - j->free.len; + dbg_journal("journal: * growing by +%zu, pos=%u, " + "new fsize=%zu\n", + diff, j->free.pos, + j->fsize + diff); + j->fsize += diff; /* Appending increases file size. */ + j->free.len += diff; + continue; + + } else if (!already_rewound) { + /* Rewind if resize is needed, but the limit is reached. */ + j->free.pos = jnode_base_pos(j->max_nodes); + j->free.len = 0; + if (!is_empty) { + j->free.len = head->pos - j->free.pos; + } + dbg_journal_verb("journal: * fslimit/nodelimit reached, " + "rewinding to %u\n", + j->free.pos); + already_rewound = true; + } else { + /* Already rewound, but couldn't collect enough free space. */ + return KNOT_ESPACE; + } - /* Evict least recent node if not empty. */ - journal_node_t *head = j->nodes + j->qhead; + /* Continue until enough free space is collected. */ + continue; + } /* Check if it has been synced to disk. */ if ((head->flags & JOURNAL_DIRTY) && (head->flags & JOURNAL_VALID)) { @@ -601,7 +442,7 @@ /* Write back evicted node. */ head->flags = JOURNAL_FREE; - seek_ret = lseek(j->fd, JOURNAL_HSIZE + (j->qhead + 1) * node_len, SEEK_SET); + int seek_ret = lseek(j->fd, JOURNAL_HSIZE + (j->qhead + 1) * node_len, SEEK_SET); if (seek_ret < 0 || !sfwrite(head, node_len, j->fd)) { return KNOT_ERROR; } @@ -619,20 +460,14 @@ /* Increase free segment. */ j->free.len += head->len; - - /* Update node visit count. */ - visit_count += 1; - if (visit_count >= j->max_nodes) { - return KNOT_ESPACE; - } } - /* Invalidate node and write back. */ + /* Invalidate tail node and write back. */ + journal_node_t *n = j->nodes + j->qtail; n->id = id; n->pos = j->free.pos; n->len = len; n->flags = JOURNAL_FREE; - n->next = jnext; journal_update(j, n); *rn = n; return KNOT_EOK; @@ -641,30 +476,15 @@ int journal_write_out(journal_t *journal, journal_node_t *n) { /* Mark node as valid and write back. */ - uint16_t jnext = n->next; + uint16_t jnext = (journal->qtail + 1) % journal->max_nodes; size_t size = n->len; const size_t node_len = sizeof(journal_node_t); n->flags = JOURNAL_VALID | journal->bflags; - n->next = 0; journal_update(journal, n); - /* Handle free segment on node rotation. */ - if (journal->qtail > jnext && journal->fslimit == FSLIMIT_INF) { - /* Trim free space. */ - journal->fsize -= journal->free.len; - dbg_journal_verb("journal: * trimmed filesize to %zu\n", - journal->fsize); - - /* Rewind free segment. */ - journal_node_t *n = journal->nodes + jnext; - journal->free.pos = n->pos; - journal->free.len = 0; - - } else { - /* Mark used space. */ - journal->free.pos += size; - journal->free.len -= size; - } + /* Mark used space. */ + journal->free.pos += size; + journal->free.len -= size; dbg_journal("journal: finishing node=%u id=%llu flags=0x%x, " "data=<%u, %u> free=<%u, %u>\n", @@ -762,6 +582,12 @@ size_t endp = jnode_prev(journal, journal->qhead); for(; i != endp; i = jnode_prev(journal, i)) { journal_node_t *n = journal->nodes + i; + + /* Skip invalid nodes. */ + if (!(n->flags & JOURNAL_VALID)) { + continue; + } + if (cf(n->id, id) == 0) { *dst = journal->nodes + i; return KNOT_EOK; @@ -803,12 +629,13 @@ /* Check if entry exists. */ journal_node_t *n = NULL; int ret = journal_fetch(journal, id, journal_cmp_eq, &n); - if (ret != KNOT_EOK) { - /* Return error if read only. */ - if (rdonly) { + + /* Return if read-only, invalidate if rewritten to avoid duplicates. */ + if (rdonly) { + if (ret != KNOT_EOK) { return ret; } - + } else { /* Prepare journal write. */ ret = journal_write_in(journal, &n, id, size); if (ret != KNOT_EOK) { @@ -831,11 +658,6 @@ } size -= wb; } - } else { - /* Entry resizing is not really supported now. */ - if (n->len < size) { - return KNOT_ESPACE; - } } /* Align offset to page size (required). */ @@ -1119,26 +941,28 @@ if (ret != KNOT_EOK) { goto finish; } + + size_t i = n - journal->nodes; + assert(i < journal->max_nodes); - while (n != 0 && n != journal_end(journal)) { - /* Check for history end. */ - if (to == found_to) { - break; - } + for (; i != journal->qtail; i = jnode_next(journal, i)) { + journal_node_t *n = journal->nodes + i; - /* Skip wrong changesets. */ + /* Skip invalid nodes. */ if (!(n->flags & JOURNAL_VALID)) { - ++n; continue; } + /* Check for history end. */ + if (to == found_to) { + break; + } + /* Callback. */ ret = cb(journal, n, zone, chgs); if (ret != KNOT_EOK) { break; } - - ++n; } finish: @@ -1175,8 +999,7 @@ return KNOT_EOK; } -int journal_load_changesets(const zone_t *zone, list_t *dst, - uint32_t from, uint32_t to) +int journal_load_changesets(const zone_t *zone, list_t *dst, uint32_t from, uint32_t to) { int ret = journal_walk(zone->conf->ixfr_db, from, to, &load_changeset, zone, dst); if (ret != KNOT_EOK) { @@ -1272,7 +1095,7 @@ } size_t i = journal->qhead; - for(; i != journal->qtail; i = (i + 1) % journal->max_nodes) { + for(; i != journal->qtail; i = jnode_next(journal, i)) { mark_synced(journal, journal->nodes + i); } diff -Nru knot-1.6.0/src/knot/server/journal.h knot-1.6.2/src/knot/server/journal.h --- knot-1.6.0/src/knot/server/journal.h 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/server/journal.h 2015-02-19 10:43:56.000000000 +0100 @@ -67,7 +67,7 @@ { uint64_t id; /*!< Node ID. */ uint16_t flags; /*!< Node flags. */ - uint16_t next; /*!< Next node ptr. */ + uint16_t next; /*!< UNUSED */ uint32_t pos; /*!< Position in journal file. */ uint32_t len; /*!< Entry data length. */ } journal_node_t; @@ -103,7 +103,7 @@ #define JOURNAL_MAGIC {'k', 'n', 'o', 't', '1', '5', '2'} #define MAGIC_LENGTH 7 /* HEADER = magic, crc, max_entries, qhead, qtail */ -#define JOURNAL_HSIZE (MAGIC_LENGTH + sizeof(crc_t) + sizeof(uint16_t) * 3) +#define JOURNAL_HSIZE (MAGIC_LENGTH + sizeof(uint32_t) + sizeof(uint16_t) * 3) /*! * \brief Open journal. diff -Nru knot-1.6.0/src/knot/server/tcp-handler.c knot-1.6.2/src/knot/server/tcp-handler.c --- knot-1.6.0/src/knot/server/tcp-handler.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/server/tcp-handler.c 2015-02-19 10:43:56.000000000 +0100 @@ -48,6 +48,7 @@ struct iovec iov[2]; /*!< TX/RX buffers. */ unsigned client_threshold; /*!< Index of first TCP client. */ timev_t last_poll_time; /*!< Time of the last socket poll. */ + timev_t throttle_end; /*!< End of accept() throttling. */ fdset_t set; /*!< Set of server/client sockets. */ unsigned thread_id; /*!< Thread identifier. */ } tcp_context_t; @@ -55,8 +56,8 @@ /* * Forward decls. */ -#define TCP_THROTTLE_LO 5 /*!< Minimum recovery time on errors. */ -#define TCP_THROTTLE_HI 50 /*!< Maximum recovery time on errors. */ +#define TCP_THROTTLE_LO 0 /*!< Minimum recovery time on errors. */ +#define TCP_THROTTLE_HI 2 /*!< Maximum recovery time on errors. */ /*! \brief Calculate TCP throttle time (random). */ static inline int tcp_throttle() { @@ -68,23 +69,19 @@ { UNUSED(data); assert(set && i < set->n && i >= 0); - int fd = set->pfd[i].fd; + /* Best-effort, name and shame. */ struct sockaddr_storage ss; socklen_t len = sizeof(struct sockaddr_storage); - memset(&ss, 0, len); - if (getpeername(fd, (struct sockaddr*)&ss, &len) < 0) { - dbg_net("tcp: sweep getpeername() on invalid socket=%d\n", fd); - return FDSET_SWEEP; + if (getpeername(fd, (struct sockaddr*)&ss, &len) == 0) { + char addr_str[SOCKADDR_STRLEN] = {0}; + sockaddr_tostr(&ss, addr_str, sizeof(addr_str)); + log_notice("TCP, terminated inactive client, address '%s'", addr_str); } - /* Translate */ - char addr_str[SOCKADDR_STRLEN] = {0}; - sockaddr_tostr(&ss, addr_str, sizeof(addr_str)); - - log_notice("connection terminated due to inactivity, address '%s'", addr_str); close(fd); + return FDSET_SWEEP; } @@ -112,7 +109,9 @@ } /* Timeout. */ + rcu_read_lock(); struct timeval tmout = { conf()->max_conn_reply, 0 }; + rcu_read_unlock(); /* Receive data. */ int ret = tcp_recv_msg(fd, rx->iov_base, rx->iov_len, &tmout); @@ -122,9 +121,8 @@ rcu_read_lock(); char addr_str[SOCKADDR_STRLEN] = {0}; sockaddr_tostr(&ss, addr_str, sizeof(addr_str)); - log_warning("connection timed out, address '%s', " - "timeout %d seconds", - addr_str, conf()->max_conn_idle); + log_warning("TCP, connection timed out, address '%s'", + addr_str); rcu_read_unlock(); } return KNOT_ECONNREFUSED; @@ -168,17 +166,9 @@ if (incoming < 0) { int en = errno; if (en != EINTR && en != EAGAIN) { - log_error("cannot accept connection (%d)", errno); - if (en == EMFILE || en == ENFILE || - en == ENOBUFS || en == ENOMEM) { - int throttle = tcp_throttle(); - log_error("throttling TCP connection pool for " - "%d seconds, too many allocated " - "resources", throttle); - sleep(throttle); - } - + return KNOT_EBUSY; } + return KNOT_ERROR; } else { dbg_net("tcp: accepted connection fd=%d\n", incoming); /* Set recv() timeout. */ @@ -189,8 +179,8 @@ rcu_read_unlock(); tv.tv_usec = 0; if (setsockopt(incoming, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) < 0) { - log_warning("cannot set up TCP connection watchdog " - "timer, fd %d", incoming); + log_warning("TCP, failed to set up watchdog timer" + ", fd %d", incoming); } #endif } @@ -234,7 +224,7 @@ if (errno == EAGAIN || errno == EINTR) { /* Continue only if timeout didn't expire. */ ret = tcp_wait_for_data(fd, timeout); - if (ret) { + if (ret > 0) { continue; } else { return KNOT_ETIMEOUT; @@ -315,9 +305,11 @@ rcu_read_lock(); fdset_set_watchdog(&tcp->set, next_id, conf()->max_conn_hs); rcu_read_unlock(); + + return KNOT_EOK; } - return KNOT_EOK; + return client; } static int tcp_event_serve(tcp_context_t *tcp, unsigned i) @@ -346,41 +338,47 @@ /* Mark the time of last poll call. */ time_now(&tcp->last_poll_time); + bool is_throttled = (tcp->last_poll_time.tv_sec < tcp->throttle_end.tv_sec); + if (!is_throttled) { + /* Configuration limit, infer maximal pool size. */ + rcu_read_lock(); + unsigned max_per_set = MAX(conf()->max_tcp_clients / conf_tcp_threads(conf()), 1); + rcu_read_unlock(); + /* Subtract master sockets check limits. */ + is_throttled = (set->n - tcp->client_threshold) >= max_per_set; + } /* Process events. */ unsigned i = 0; while (nfds > 0 && i < set->n) { - - /* Terminate faulty connections. */ + bool should_close = false; int fd = set->pfd[i].fd; - - /* Active sockets. */ - if (set->pfd[i].revents & POLLIN) { - --nfds; /* One less active event. */ - - /* Indexes <0, client_threshold) are master sockets. */ + if (set->pfd[i].revents & (POLLERR|POLLHUP|POLLNVAL)) { + should_close = (i >= tcp->client_threshold); + --nfds; + } else if (set->pfd[i].revents & (POLLIN)) { + /* Master sockets */ if (i < tcp->client_threshold) { - /* Faulty master sockets shall be sorted later. */ - (void) tcp_event_accept(tcp, i); + if (!is_throttled && tcp_event_accept(tcp, i) == KNOT_EBUSY) { + time_now(&tcp->throttle_end); + tcp->throttle_end.tv_sec += tcp_throttle(); + } + /* Client sockets */ } else { if (tcp_event_serve(tcp, i) != KNOT_EOK) { - fdset_remove(set, i); - close(fd); - continue; /* Stay on the same index. */ + should_close = true; } } - + --nfds; } - if (set->pfd[i].revents & (POLLERR|POLLHUP|POLLNVAL)) { - --nfds; /* One less active event. */ + /* Evaluate */ + if (should_close) { fdset_remove(set, i); close(fd); - continue; /* Stay on the same index. */ + } else { + ++i; } - - /* Next socket. */ - ++i; } return nfds; diff -Nru knot-1.6.0/src/knot/zone/events/handlers.c knot-1.6.2/src/knot/zone/events/handlers.c --- knot-1.6.0/src/knot/zone/events/handlers.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/zone/events/handlers.c 2015-02-19 10:43:56.000000000 +0100 @@ -303,15 +303,18 @@ { assert(zone); + const conf_iface_t *master = zone_master(zone); + if (master == NULL) { + /* If not slave zone, ignore. */ + return KNOT_EOK; + } + if (zone_contents_is_empty(zone->contents)) { /* No contents, schedule retransfer now. */ zone_events_schedule(zone, ZONE_EVENT_XFER, ZONE_EVENT_NOW); return KNOT_EOK; } - const conf_iface_t *master = zone_master(zone); - assert(master); - int ret = zone_query_execute(zone, KNOT_QUERY_NORMAL, master); const knot_rdataset_t *soa = zone_soa(zone); if (ret != KNOT_EOK) { @@ -335,6 +338,12 @@ { assert(zone); + const conf_iface_t *master = zone_master(zone); + if (master == NULL) { + /* If not slave zone, ignore. */ + return KNOT_EOK; + } + /* Determine transfer type. */ bool is_boostrap = zone_contents_is_empty(zone->contents); uint16_t pkt_type = KNOT_QUERY_IXFR; @@ -343,7 +352,7 @@ } /* Execute zone transfer and reschedule timers. */ - int ret = zone_query_transfer(zone, zone_master(zone), pkt_type); + int ret = zone_query_transfer(zone, master, pkt_type); /* Handle failure during transfer. */ if (ret != KNOT_EOK) { diff -Nru knot-1.6.0/src/knot/zone/semantic-check.c knot-1.6.2/src/knot/zone/semantic-check.c --- knot-1.6.0/src/knot/zone/semantic-check.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/zone/semantic-check.c 2015-02-19 10:43:56.000000000 +0100 @@ -31,7 +31,6 @@ #include "libknot/rrtype/nsec.h" #include "libknot/rrtype/nsec3.h" #include "common/base32hex.h" -#include "common-knot/crc.h" #include "libknot/descriptor.h" #include "libknot/mempattern.h" #include "knot/dnssec/zone-nsec.h" diff -Nru knot-1.6.0/src/knot/zone/zone.c knot-1.6.2/src/knot/zone/zone.c --- knot-1.6.0/src/knot/zone/zone.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/zone/zone.c 2015-02-19 10:43:56.000000000 +0100 @@ -76,6 +76,9 @@ zone->ddns_queue_size = 0; init_list(&zone->ddns_queue); + // Journal lock + pthread_mutex_init(&zone->journal_lock, NULL); + // Initialize events zone_events_init(zone); @@ -96,6 +99,7 @@ free_ddns_queue(zone); pthread_mutex_destroy(&zone->ddns_lock); + pthread_mutex_destroy(&zone->journal_lock); /* Free assigned config. */ conf_free_zone(zone->conf); @@ -114,18 +118,18 @@ conf_zone_t *conf = zone->conf; + pthread_mutex_lock(&zone->journal_lock); int ret = journal_store_changeset(change, conf->ixfr_db, conf->ixfr_fslimit); if (ret == KNOT_EBUSY) { log_zone_notice(zone->name, "journal is full, flushing"); /* Transaction rolled back, journal released, we may flush. */ ret = zone_flush_journal(zone); - if (ret != KNOT_EOK) { - return ret; + if (ret == KNOT_EOK) { + ret = journal_store_changeset(change, conf->ixfr_db, conf->ixfr_fslimit); } - - return journal_store_changeset(change, conf->ixfr_db, conf->ixfr_fslimit); } + pthread_mutex_unlock(&zone->journal_lock); return ret; } @@ -137,18 +141,19 @@ conf_zone_t *conf = zone->conf; + pthread_mutex_lock(&zone->journal_lock); int ret = journal_store_changesets(chgs, conf->ixfr_db, conf->ixfr_fslimit); + if (ret == KNOT_EBUSY) { log_zone_notice(zone->name, "journal is full, flushing"); /* Transaction rolled back, journal released, we may flush. */ ret = zone_flush_journal(zone); - if (ret != KNOT_EOK) { - return ret; + if (ret == KNOT_EOK) { + ret = journal_store_changesets(chgs, conf->ixfr_db, conf->ixfr_fslimit); } - - return journal_store_changesets(chgs, conf->ixfr_db, conf->ixfr_fslimit); } + pthread_mutex_unlock(&zone->journal_lock); return ret; } diff -Nru knot-1.6.0/src/knot/zone/zonedb.c knot-1.6.2/src/knot/zone/zonedb.c --- knot-1.6.0/src/knot/zone/zonedb.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/zone/zonedb.c 2015-02-19 10:43:56.000000000 +0100 @@ -41,7 +41,11 @@ { /* Flush bootstrapped zones. */ if (zone->zonefile_mtime == 0) { + + pthread_mutex_lock(&zone->journal_lock); zone_flush_journal(zone); + pthread_mutex_unlock(&zone->journal_lock); + } zone_free(&zone); } diff -Nru knot-1.6.0/src/knot/zone/zonefile.c knot-1.6.2/src/knot/zone/zonefile.c --- knot-1.6.0/src/knot/zone/zonefile.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/zone/zonefile.c 2015-02-19 10:43:56.000000000 +0100 @@ -26,7 +26,6 @@ #include <unistd.h> #include <inttypes.h> -#include "common-knot/crc.h" #include "common-knot/strlcat.h" #include "common-knot/strlcpy.h" #include "libknot/common.h" diff -Nru knot-1.6.0/src/knot/zone/zone.h knot-1.6.2/src/knot/zone/zone.h --- knot-1.6.0/src/knot/zone/zone.h 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/zone/zone.h 2015-02-19 10:43:56.000000000 +0100 @@ -61,6 +61,9 @@ pthread_mutex_t ddns_lock; size_t ddns_queue_size; list_t ddns_queue; + + /*! \brief Journal access lock. */ + pthread_mutex_t journal_lock; /*! \brief Zone events. */ zone_events_t events; /*!< Zone events timers. */ diff -Nru knot-1.6.0/src/knot/zone/zone-load.c knot-1.6.2/src/knot/zone/zone-load.c --- knot-1.6.0/src/knot/zone/zone-load.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/knot/zone/zone-load.c 2015-02-19 10:43:56.000000000 +0100 @@ -97,7 +97,11 @@ /*! \todo Check what should be the upper bound. */ list_t chgs; init_list(&chgs); + + pthread_mutex_lock(&zone->journal_lock); int ret = journal_load_changesets(zone, &chgs, serial, serial - 1); + pthread_mutex_unlock(&zone->journal_lock); + if ((ret != KNOT_EOK && ret != KNOT_ERANGE) || EMPTY_LIST(chgs)) { changesets_free(&chgs); /* Absence of records is not an error. */ diff -Nru knot-1.6.0/src/libknot/dnssec/key.c knot-1.6.2/src/libknot/dnssec/key.c --- knot-1.6.0/src/libknot/dnssec/key.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/libknot/dnssec/key.c 2015-02-19 10:43:56.000000000 +0100 @@ -145,7 +145,8 @@ free(buffer); fclose(keyfile); - if (scanner->r_type != KNOT_RRTYPE_DNSKEY) { + if (scanner->r_type != KNOT_RRTYPE_DNSKEY && + scanner->r_type != KNOT_RRTYPE_KEY) { zs_scanner_free(scanner); return KNOT_KEY_EPUBLIC_KEY_INVALID; } diff -Nru knot-1.6.0/src/libknot/dnssec/sign.c knot-1.6.2/src/libknot/dnssec/sign.c --- knot-1.6.0/src/libknot/dnssec/sign.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/libknot/dnssec/sign.c 2015-02-19 10:43:56.000000000 +0100 @@ -147,12 +147,7 @@ // check target size - unsigned int max_write = 0; - int result = EVP_SignFinal(digest_ctx, NULL, &max_write, private_key); - if (!result) { - return KNOT_DNSSEC_ESIGN; - } - + unsigned int max_write = EVP_PKEY_size(private_key); if (max_write > max_size) { return KNOT_DNSSEC_EUNEXPECTED_SIGNATURE_SIZE; } @@ -160,7 +155,7 @@ // write signature unsigned int written = 0; - result = EVP_SignFinal(digest_ctx, signature, &written, private_key); + int result = EVP_SignFinal(digest_ctx, signature, &written, private_key); if (!result) { return KNOT_DNSSEC_ESIGN; } diff -Nru knot-1.6.0/src/libknot/errcode.c knot-1.6.2/src/libknot/errcode.c --- knot-1.6.0/src/libknot/errcode.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/libknot/errcode.c 2015-02-19 10:43:56.000000000 +0100 @@ -115,7 +115,7 @@ { KNOT_DNSSEC_ESIGN, "cannot create the signature" }, { KNOT_DNSSEC_ENOKEY, "no keys for signing" }, { KNOT_DNSSEC_ENOKEYDIR, "keydir does not exist" }, - { KNOT_DNSSEC_EMISSINGKEYTYPE, "missing KSK or ZSK for used algorithm" }, + { KNOT_DNSSEC_EMISSINGKEYTYPE, "missing active KSK or ZSK" }, /* NSEC3 errors. */ { KNOT_NSEC3_ECOMPUTE_HASH, "cannot compute NSEC3 hash" }, diff -Nru knot-1.6.0/src/Makefile.am knot-1.6.2/src/Makefile.am --- knot-1.6.0/src/Makefile.am 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/src/Makefile.am 2015-02-19 10:43:56.000000000 +0100 @@ -64,7 +64,6 @@ libknots_la_SOURCES = \ common-knot/array-sort.h \ common-knot/binsearch.h \ - common-knot/crc.h \ common-knot/evsched.c \ common-knot/evsched.h \ common-knot/fdset.c \ diff -Nru knot-1.6.0/src/Makefile.in knot-1.6.2/src/Makefile.in --- knot-1.6.0/src/Makefile.in 2014-10-23 16:25:35.000000000 +0200 +++ knot-1.6.2/src/Makefile.in 2015-02-19 10:44:07.000000000 +0100 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -676,7 +676,6 @@ libknots_la_SOURCES = \ common-knot/array-sort.h \ common-knot/binsearch.h \ - common-knot/crc.h \ common-knot/evsched.c \ common-knot/evsched.h \ common-knot/fdset.c \ @@ -938,8 +937,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 diff -Nru knot-1.6.0/src/zscanner/Makefile.in knot-1.6.2/src/zscanner/Makefile.in --- knot-1.6.0/src/zscanner/Makefile.in 2014-10-23 16:25:35.000000000 +0200 +++ knot-1.6.2/src/zscanner/Makefile.in 2015-02-19 10:44:07.000000000 +0100 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff -Nru knot-1.6.0/tests/journal.c knot-1.6.2/tests/journal.c --- knot-1.6.0/tests/journal.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/tests/journal.c 2015-02-19 10:43:56.000000000 +0100 @@ -19,10 +19,15 @@ #include <stdio.h> #include <limits.h> #include <unistd.h> +#include <sys/stat.h> #include <tap/basic.h> #include "knot/server/journal.h" -#include "knot/knot.h" +#include "knot/zone/zone-diff.h" + +#define RAND_RR_LABEL 16 +#define RAND_RR_PAYLOAD 64 +#define MIN_SOA_SIZE 22 /*! \brief Generate random string with given length. */ static int randstr(char* dst, size_t len) @@ -35,12 +40,252 @@ return 0; } +/*! \brief Init RRSet with type SOA and given serial. */ +static void init_soa(knot_rrset_t *rr, const uint32_t serial, const knot_dname_t *apex) +{ + knot_rrset_init(rr, knot_dname_copy(apex, NULL), KNOT_RRTYPE_SOA, KNOT_CLASS_IN); + + assert(serial < 256); + uint8_t soa_data[MIN_SOA_SIZE] = { 0, 0, 0, 0, 0, serial }; + int ret = knot_rrset_add_rdata(rr, soa_data, sizeof(soa_data), 3600, NULL); + assert(ret == KNOT_EOK); +} + +/*! \brief Init RRSet with type TXT, random owner and random payload. */ +static void init_random_rr(knot_rrset_t *rr , const knot_dname_t *apex) +{ + /* Create random label. */ + char owner[RAND_RR_LABEL + knot_dname_size(apex)]; + owner[0] = RAND_RR_LABEL - 1; + randstr(owner + 1, RAND_RR_LABEL); + + /* Append zone apex. */ + memcpy(owner + RAND_RR_LABEL, apex, knot_dname_size(apex)); + knot_rrset_init(rr, knot_dname_copy((knot_dname_t *)owner, NULL), KNOT_RRTYPE_TXT, KNOT_CLASS_IN); + + /* Create random RDATA. */ + uint8_t txt[RAND_RR_PAYLOAD + 1]; + txt[0] = RAND_RR_PAYLOAD - 1; + randstr((char *)(txt + 1), RAND_RR_PAYLOAD); + + int ret = knot_rrset_add_rdata(rr, txt, RAND_RR_PAYLOAD, 3600, NULL); + assert(ret == KNOT_EOK); +} + +/*! \brief Init changeset with random changes. */ +static void init_random_changeset(changeset_t *ch, const uint32_t from, const uint32_t to, const size_t size, const knot_dname_t *apex) +{ + int ret = changeset_init(ch, apex); + assert(ret == KNOT_EOK); + + // Add SOAs + knot_rrset_t soa; + init_soa(&soa, from, apex); + + ch->soa_from = knot_rrset_copy(&soa, NULL); + assert(ch->soa_from); + knot_rrset_clear(&soa, NULL); + + init_soa(&soa, to, apex); + ch->soa_to = knot_rrset_copy(&soa, NULL); + assert(ch->soa_to); + knot_rrset_clear(&soa, NULL); + + // Add RRs to add section + for (size_t i = 0; i < size / 2; ++i) { + knot_rrset_t rr; + init_random_rr(&rr, apex); + int ret = changeset_add_rrset(ch, &rr); + assert(ret == KNOT_EOK); + knot_rrset_clear(&rr, NULL); + } + + // Add RRs to remove section + for (size_t i = 0; i < size / 2; ++i) { + knot_rrset_t rr; + init_random_rr(&rr, apex); + int ret = changeset_rem_rrset(ch, &rr); + assert(ret == KNOT_EOK); + knot_rrset_clear(&rr, NULL); + } +} + +/*! \brief Compare two changesets for equality. */ +static bool changesets_eq(const changeset_t *ch1, changeset_t *ch2) +{ + if (changeset_size(ch1) != changeset_size(ch2)) { + return false; + } + + changeset_iter_t it1; + changeset_iter_all(&it1, ch1, true); + changeset_iter_t it2; + changeset_iter_all(&it2, ch2, true); + + knot_rrset_t rr1 = changeset_iter_next(&it1); + knot_rrset_t rr2 = changeset_iter_next(&it2); + bool ret = true; + while (!knot_rrset_empty(&rr1)) { + if (!knot_rrset_equal(&rr1, &rr2, KNOT_RRSET_COMPARE_WHOLE)) { + ret = false; + break; + } + rr1 = changeset_iter_next(&it1); + rr2 = changeset_iter_next(&it2); + } + + changeset_iter_clear(&it1); + changeset_iter_clear(&it2); + + return ret; +} + +/*! \brief Journal fillup test with size check. */ +static void test_fillup(journal_t *journal, size_t fsize, unsigned iter, size_t chunk_size) +{ + int ret = KNOT_EOK; + char *mptr = NULL; + char *large_entry = malloc(chunk_size); + randstr(large_entry, chunk_size); + assert(large_entry); + + unsigned i = 0; + bool read_passed = true; + for (; i < 2 * JOURNAL_NCOUNT; ++i) { + uint64_t chk_key = 0xBEBE + i; + size_t entry_len = chunk_size/2 + rand() % (chunk_size/2); + + /* Write */ + ret = journal_map(journal, chk_key, &mptr, entry_len, false); + if (ret != KNOT_EOK) { + break; + } + memcpy(mptr, large_entry, entry_len); + ret = journal_unmap(journal, chk_key, mptr, 1); + if (ret != KNOT_EOK) { + diag("journal_unmap = %s", knot_strerror(ret)); + read_passed = true; + break; + } + + /* Read */ + ret = journal_map(journal, chk_key, &mptr, entry_len, true); + if (ret == KNOT_EOK) { + ret = memcmp(large_entry, mptr, entry_len); + if (ret != 0) { + diag("integrity check failed"); + read_passed = false; + } else { + ret = journal_unmap(journal, chk_key, mptr, 0); + if (ret != KNOT_EOK) { + diag("journal_unmap(rdonly) = %s", knot_strerror(ret)); + read_passed = false; + } + } + } else { + diag("journal_map(rdonly) = %s", knot_strerror(ret)); + read_passed = false; + } + + if (!read_passed) { + break; + } + } + ok(read_passed, "journal: fillup #%u, reading written entries", iter); + ok(ret != KNOT_EOK, "journal: fillup #%u (%d entries)", iter, i); + free(large_entry); + + /* Check file size. */ + struct stat st; + fstat(journal->fd, &st); + ok(st.st_size < fsize + chunk_size, "journal: fillup / size check #%u", iter); + if (st.st_size > fsize + chunk_size) { + diag("journal: fillup / size check #%u fsize(%zu) > max(%zu)", + iter, (size_t)st.st_size, fsize + chunk_size); + } +} + +/*! \brief Test behavior with real changesets. */ +static void test_store_load(const char *jfilename) +{ + const size_t filesize = 100 * 1024; + uint8_t *apex = (uint8_t *)"\4test"; + + /* Create fake zone. */ + conf_zone_t zconf = { .ixfr_db = (char *)jfilename, .ixfr_fslimit = filesize }; + zone_t z = { .name = apex, .conf = &zconf }; + + /* Save and load changeset. */ + changeset_t ch; + init_random_changeset(&ch, 0, 1, 128, apex); + int ret = journal_store_changeset(&ch, jfilename, filesize); + ok(ret == KNOT_EOK, "journal: store changeset"); + list_t l; + init_list(&l); + ret = journal_load_changesets(&z, &l, 0, 1); + ok(ret == KNOT_EOK && changesets_eq(TAIL(l), &ch), "journal: load changeset"); + changeset_clear(&ch); + changesets_free(&l); + init_list(&l); + + /* Fill the journal. */ + ret = KNOT_EOK; + uint32_t serial = 1; + for (; ret == KNOT_EOK; ++serial) { + init_random_changeset(&ch, serial, serial + 1, 128, apex); + ret = journal_store_changeset(&ch, jfilename, filesize); + changeset_clear(&ch); + } + ok(ret == KNOT_EBUSY, "journal: overfill with changesets"); + + /* Load all changesets stored until now. */ + serial--; + ret = journal_load_changesets(&z, &l, 0, serial); + changesets_free(&l); + ok(ret == KNOT_EOK, "journal: load changesets"); + + /* Flush the journal. */ + ret = journal_mark_synced(jfilename); + ok(ret == KNOT_EOK, "journal: flush"); + + /* Store next changeset. */ + init_random_changeset(&ch, serial, serial + 1, 128, apex); + ret = journal_store_changeset(&ch, jfilename, filesize); + changeset_clear(&ch); + ok(ret == KNOT_EOK, "journal: store after flush"); + + /* Load all changesets, except the first one that got evicted. */ + init_list(&l); + ret = journal_load_changesets(&z, &l, 1, serial + 1); + changesets_free(&l); + ok(ret == KNOT_EOK, "journal: load changesets after flush"); +} + +/*! \brief Test behavior when writing to jurnal and flushing it. */ +static void test_stress(const char *jfilename) +{ + uint8_t *apex = (uint8_t *)"\4test"; + const size_t filesize = 100 * 1024; + int ret = KNOT_EOK; + uint32_t serial = 0; + size_t update_size = 3; + for (; ret == KNOT_EOK && serial < 32; ++serial) { + changeset_t ch; + init_random_changeset(&ch, serial, serial + 1, update_size, apex); + update_size *= 1.5; + ret = journal_store_changeset(&ch, jfilename, filesize); + changeset_clear(&ch); + journal_mark_synced(jfilename); + } + ok(ret == KNOT_ESPACE, "journal: does not overfill under load"); +} + int main(int argc, char *argv[]) { - plan(10); + plan_lazy(); /* Create tmpdir */ - int fsize = 10 * 1024 * 1024; + size_t fsize = 10 * 1024 * 1024; char *tmpdir = test_tmpdir(); char jfilename[256]; snprintf(jfilename, sizeof(jfilename), "%s/%s", tmpdir, "journal.XXXXXX"); @@ -54,8 +299,12 @@ close(tmp_fd); remove(jfilename); + /* Try to open journal with too small fsize. */ + journal_t *journal = journal_open(jfilename, 1024); + ok(journal == NULL, "journal: open too small"); + /* Open/create new journal. */ - journal_t *journal = journal_open(jfilename, fsize); + journal = journal_open(jfilename, fsize); ok(journal != NULL, "journal: open journal '%s'", jfilename); if (journal == NULL) { goto skip_all; @@ -96,10 +345,9 @@ is_int(KNOT_EOK, ret, "journal: data integrity check after close/open"); /* Write random data. */ - ret = 0; - uint64_t tskey = 0xDEAD0000; + ret = KNOT_EOK; for (int i = 0; i < 512; ++i) { - chk_key = tskey + i; + chk_key = 0xDEAD0000 + i; ret = journal_map(journal, chk_key, &mptr, sizeof(chk_buf), false); if (ret != KNOT_EOK) { diag("journal_map failed: %s", knot_strerror(ret)); @@ -113,11 +361,36 @@ } is_int(KNOT_EOK, ret, "journal: sustained mmap r/w"); + /* Overfill (yields ESPACE/EBUSY) */ + ret = journal_map(journal, chk_key, &mptr, fsize, false); + ok(ret != KNOT_EOK, "journal: overfill"); + + /* Fillup */ + size_t sizes[] = {16, 64, 1024, 4096, 512 * 1024, 1024 * 1024 }; + const int num_sizes = sizeof(sizes)/sizeof(size_t); + for (unsigned i = 0; i < 2 * num_sizes; ++i) { + /* Journal flush. */ + journal_close(journal); + ret = journal_mark_synced(jfilename); + is_int(KNOT_EOK, ret, "journal: flush after fillup #%u", i); + journal = journal_open(jfilename, fsize); + ok(journal != NULL, "journal: reopen after flush #%u", i); + /* Journal fillup. */ + test_fillup(journal, fsize, i, sizes[i % num_sizes]); + } + /* Close journal. */ journal_close(journal); /* Delete journal. */ remove(jfilename); + + test_store_load(jfilename); + remove(jfilename); + + test_stress(jfilename); + remove(jfilename); + free(tmpdir); skip_all: diff -Nru knot-1.6.0/tests/Makefile.in knot-1.6.2/tests/Makefile.in --- knot-1.6.0/tests/Makefile.in 2014-10-23 16:25:36.000000000 +0200 +++ knot-1.6.2/tests/Makefile.in 2015-02-19 10:44:07.000000000 +0100 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff -Nru knot-1.6.0/tests/namedb.c knot-1.6.2/tests/namedb.c --- knot-1.6.0/tests/namedb.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/tests/namedb.c 2015-02-19 10:43:56.000000000 +0100 @@ -14,6 +14,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <dirent.h> #include <string.h> #include <time.h> #include <unistd.h> @@ -172,7 +173,22 @@ namedb_test_set(nkeys, keys, dbid, namedb_lmdb_api(), &pool); namedb_test_set(nkeys, keys, NULL, namedb_trie_api(), &pool); - /* Cleanup */ + /* Cleanup. */ mp_delete(pool.ctx); + + /* Cleanup temporary DB. */ + DIR *dir = opendir(dbid); + struct dirent *dp; + while ((dp = readdir(dir)) != NULL) { + if (dp->d_name[0] == '.') { + continue; + } + char *file = sprintf_alloc("%s/%s", dbid, dp->d_name); + remove(file); + free(file); + } + closedir(dir); + remove(dbid); + return 0; } diff -Nru knot-1.6.0/tests/zone_timers.c knot-1.6.2/tests/zone_timers.c --- knot-1.6.0/tests/zone_timers.c 2014-10-23 16:25:24.000000000 +0200 +++ knot-1.6.2/tests/zone_timers.c 2015-02-19 10:43:56.000000000 +0100 @@ -14,11 +14,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <dirent.h> #include <stdlib.h> #include <time.h> #include <tap/basic.h> #include "libknot/common.h" +#include "common/mem.h" #include "common/namedb/namedb.h" #include "common/namedb/namedb_lmdb.h" #include "knot/zone/timers.h" @@ -119,6 +121,23 @@ zone_free(&zone_2); close_timers_db(db); + // Cleanup temporary DB. + char *timers_dir = sprintf_alloc("%s/timers", dbid); + DIR *dir = opendir(timers_dir); + struct dirent *dp; + while ((dp = readdir(dir)) != NULL) { + if (dp->d_name[0] == '.') { + continue; + } + char *file = sprintf_alloc("%s/%s", timers_dir, dp->d_name); + remove(file); + free(file); + } + closedir(dir); + remove(timers_dir); + free(timers_dir); + remove(dbid); + return EXIT_SUCCESS; } diff -Nru knot-1.6.0/ylwrap knot-1.6.2/ylwrap --- knot-1.6.0/ylwrap 2014-10-23 16:25:35.000000000 +0200 +++ knot-1.6.2/ylwrap 2015-02-19 10:44:07.000000000 +0100 @@ -1,7 +1,7 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -scriptversion=2012-12-21.17; # UTC +scriptversion=2013-01-12.17; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # @@ -40,7 +40,7 @@ # guard FILE # ---------- # The CPP macro used to guard inclusion of FILE. -guard() +guard () { printf '%s\n' "$1" \ | sed \ @@ -96,17 +96,17 @@ # The input. -input="$1" +input=$1 shift # We'll later need for a correct munging of "#line" directives. input_sub_rx=`get_dirname "$input" | quote_for_sed` -case "$input" in +case $input in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. - input="`pwd`/$input" + input=`pwd`/$input ;; esac input_rx=`get_dirname "$input" | quote_for_sed` @@ -132,8 +132,8 @@ # guard in its implementation file. sed_fix_header_guards= -while test "$#" -ne 0; do - if test "$1" = "--"; then +while test $# -ne 0; do + if test x"$1" = x"--"; then shift break fi @@ -153,16 +153,14 @@ done # The program to run. -prog="$1" +prog=$1 shift # Make any relative path in $prog absolute. -case "$prog" in +case $prog in [\\/]* | ?:[\\/]*) ;; - *[\\/]*) prog="`pwd`/$prog" ;; + *[\\/]*) prog=`pwd`/$prog ;; esac -# FIXME: add hostname here for parallel makes that run commands on -# other machines. But that might take us over the 14-char limit. dirname=ylwrap$$ do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' trap "ret=129; $do_exit" 1 @@ -188,7 +186,7 @@ # otherwise prepend '../'. case $to in [\\/]* | ?:[\\/]*) target=$to;; - *) target="../$to";; + *) target=../$to;; esac # Do not overwrite unchanged header files to avoid useless @@ -197,7 +195,7 @@ # output of all other files to a temporary file so we can # compare them to existing versions. if test $from != $parser; then - realtarget="$target" + realtarget=$target target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` fi-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 3.0 (quilt) Source: knot Binary: knot, knot-libs, knot-dbg, knot-dnsutils, knot-host, knot-doc Architecture: any all Version: 1.6.2-1 Maintainer: Ondřej Surý <ondrej@debian.org> Homepage: http://www.knot-dns.cz/ Standards-Version: 3.9.6 Vcs-Browser: http://anonscm.debian.org/?p=users/ondrej/knot.git Vcs-Git: git://anonscm.debian.org/users/ondrej/knot.git Build-Depends: debhelper (>= 9), liburcu-dev (>= 0.4), libssl-dev, libidn11-dev, dh-systemd, dh-autoreconf, autotools-dev, flex, bison, pkg-config, libsystemd-daemon-dev [linux-any], libsystemd-journal-dev [linux-any], liblmdb-dev Build-Depends-Indep: texinfo, texlive, texlive-latex-extra, texlive-font-utils, ghostscript, python-sphinx Package-List: knot deb net optional arch=any knot-dbg deb debug extra arch=any knot-dnsutils deb net optional arch=any knot-doc deb doc optional arch=all knot-host deb net optional arch=any knot-libs deb libs optional arch=any Checksums-Sha1: a4b1879ea768c2944439f8779688a82bbdd67bf1 782416 knot_1.6.2.orig.tar.xz 95d38ea8a46a5b4767a4f6e74ea3dfcfebfeb959 17240 knot_1.6.2-1.debian.tar.xz Checksums-Sha256: 01fe0ae8081992c8b378045e31a2d03452d0ae6d8afaa1905fd767f7e2376ad4 782416 knot_1.6.2.orig.tar.xz 50c2633ba610199bad432fbfd1d94eb40e7d481785ed47e165dd2a55471a86a4 17240 knot_1.6.2-1.debian.tar.xz Files: a1859b9e89c1719a764d95bcb8232197 782416 knot_1.6.2.orig.tar.xz ea0638f58b8c3f31e29c39de77b41593 17240 knot_1.6.2-1.debian.tar.xz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQJ8BAEBCgBmBQJU5wwiXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzMEI5MzNEODBGQ0UzRDk4MUEyRDM4RkIw Qzk5QjcwRUY0RkNCQjA3AAoJEAyZtw70/LsHukUP/3K52QlrGKPMnYzpj08Ga2VO g70KscP1C25HSk8hWrDIM6eZAnLHMcrwJxFgO4HF3A4sWLE5UPxt2DRVpBJ7lWlz cGwF1JATtBDHHhXgJ4jYqY+GHKexsw4gJBmobGBeND+Q025OrXj2H1s8A9uTOOwt TSBYARk3h8K3DFE1JYRyO4ieyh92mGnXQyTIxxS6ERbdjck72p4+/urFLr4Fc2v2 oB8/GT+m0Mn9jgcVZpqkC1aOhzP1jH1JgnsrFjR1KaucooPaoTFk+tDEgnuebMeF SF7lUL0c0j1ArLRexLXgsuhDTlhu7NF24FNRC1YN8mxLq9kaYlFeNyKiGYlpAzqW pqVm3abHlL0hV/HHQUAZ77o3lqMTpZnXXt0VkmpBPyRUxrblSsyxI5K0yuNU/JGL EWcx5WGS6MdrbiHiAE7tdRwQ09BgErN4a8p9RQjB2N+lP7DKaAd9G/H4+epA+DHr aVQLMSxyU7i8f8d1cZFi6Q+diWvMRIXr8zTeROP3czuD7LMioSM4W4wkmzdyAVbO 5qLjYVEfKgenafApCDQ+iLTUPpIn4Sdm3zmdBNs2ZfbR/IXcSvYj/47OSQaTrzUk eJhHPmIy31Et0qDvMZuQ7Z7S4T+x3Az1P7oCoCTLSJacSQkpp0dbhrUI7vw6ZV5/ K6Z+T4GjytuxioG3lF+8 =it+X -----END PGP SIGNATURE----------BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 1.8 Date: Fri, 20 Feb 2015 11:09:34 +0100 Source: knot Binary: knot knot-libs knot-dbg knot-dnsutils knot-host knot-doc Architecture: source all Version: 1.6.2-1 Distribution: unstable Urgency: medium Maintainer: Ondřej Surý <ondrej@debian.org> Changed-By: Ondřej Surý <ondrej@debian.org> Description: knot - authoritative domain name server knot-dbg - Debug symbols for Knot DNS knot-dnsutils - Clients provided with Knot DNS (kdig, knslookup, knsupdate) knot-doc - Documentation for Knot DNS knot-host - Version of 'host' bundled with Knot DNS knot-libs - authoritative domain name server Changes: knot (1.6.2-1) unstable; urgency=medium . * New upstream version 1.6.2 + Features: - Limiting number of parallel TCP clients (max-tcp-clients config option) + Bugfixes: - Ignore refresh and transfer events on non-slave zones - Compilation with Dnstap support on FreeBSD - Possible file descriptor leak when terminating inactive TCP clients * Update patches for 1.6.2 release Checksums-Sha1: fc6943194f7864f043461736bcfefe9fd3bf6ff9 2451 knot_1.6.2-1.dsc a4b1879ea768c2944439f8779688a82bbdd67bf1 782416 knot_1.6.2.orig.tar.xz 95d38ea8a46a5b4767a4f6e74ea3dfcfebfeb959 17240 knot_1.6.2-1.debian.tar.xz 9c23934b793ed8014cdef8153c4b60fef21764fd 448936 knot-doc_1.6.2-1_all.deb Checksums-Sha256: b98c72d554d250f5df276ee159c24fa5343311269c7bbc4d7fe535616ac338ac 2451 knot_1.6.2-1.dsc 01fe0ae8081992c8b378045e31a2d03452d0ae6d8afaa1905fd767f7e2376ad4 782416 knot_1.6.2.orig.tar.xz 50c2633ba610199bad432fbfd1d94eb40e7d481785ed47e165dd2a55471a86a4 17240 knot_1.6.2-1.debian.tar.xz 15d42f3e157379bacdd807b044bf5e7bfbfa66fef1dac664d424a2e823593737 448936 knot-doc_1.6.2-1_all.deb Files: 706f3254065e61e12ee0c46fdb800bbf 2451 net optional knot_1.6.2-1.dsc a1859b9e89c1719a764d95bcb8232197 782416 net optional knot_1.6.2.orig.tar.xz ea0638f58b8c3f31e29c39de77b41593 17240 net optional knot_1.6.2-1.debian.tar.xz accce4dac64f93212e65dcd4c001a668 448936 doc optional knot-doc_1.6.2-1_all.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQJ8BAEBCgBmBQJU5wwmXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzMEI5MzNEODBGQ0UzRDk4MUEyRDM4RkIw Qzk5QjcwRUY0RkNCQjA3AAoJEAyZtw70/LsH8boP/0eCj4vVBXn+Q+a6SwkYsRiv /rnuRqW1HXREASdjDcnxTKj/QuEUhXResnG6aeNdH40MvpNlOz33TGJiK5vnTCVu uIVPjx0zS+s4yVkbjbRPWBltGs/WBg2xnOn5R/E+a2vZZsly/8gOi70cTe+p2M45 jERoSMlpEkab9ubdEQxzmeprkT3h83hf9nxKA+J4xsjj1kpuER6jiT5tfeOAIm1d 8Exhkl1BjolyoYoL5ZJ00yIKgCWDkoCmufPOR56GvI4QjcU3kZmHMedynH5/+ie1 HzoNEaveqOFXWFN71sblYSHUES2Wv2SEeTkXFlx2ECycc6hg5SYJfzBNqbLGWuRb pGv/kKq+Kg5U06jpUbLZkkk40dJ9GXQ2m3sNLnynOfOi1wBlhO8VaDjPVZWeUn6X aCTiNscPNH/10IhMSdG0LFNCr9tC4seasVWcgJIOlXRGnCY62cF0pHs/zgKTbeWV PnJkiAxA+Mlf6c+89sXOZrOQMBWFVLo8zTdMWEI0SI9K5h+djo6KqAlXGBbi8Qqg rSFVZtG3IIlWn8Zc4jRyGmC97VMpkCpmqJf4o+lYOr2KrCk0aBbVI8BRdMih/2+u C9JJxDsxUg78l2TyWksY4UhtSE9KvEbYnhlXFwAfaIyccYX1vpN2HeiansaBbSgv PQl2pYl2Pxs78zoAKRn3 =ivci -----END PGP SIGNATURE-----Attachment: knot_1.6.2-1.debian.tar.xz
Description: application/xz
--- End Message ---
--- Begin Message ---
- To: Ondřej Surý <ondrej@debian.org>, 781097-done@bugs.debian.org
- Subject: Re: Bug#781097: unblock: knot/1.6.2-1
- From: Ivo De Decker <ivodd@debian.org>
- Date: Sat, 11 Apr 2015 17:47:01 +0200
- Message-id: <20150411154701.GC5982@ugent.be>
- In-reply-to: <20150324130521.8735.29448.reportbug@lettie.nic.cz>
- References: <20150324130521.8735.29448.reportbug@lettie.nic.cz>
Hi, On Tue, Mar 24, 2015 at 02:05:21PM +0100, Ondřej Surý wrote: > please unblock new upstream Knot DNS 1.6.2, since it contain some > important bugfixes: > > Knot DNS 1.6.1 contains fix for journal files outgrowing the hard > limit that could lead to (unlikely) resource (disk space) depletion on > rare occasions. > > Knot DNS 1.6.2 contains fixes related to TCP connection exhaustion > prevention (new max tcp connection limit and better inactive tcp > client cleanup). It's a new upstream with new features, which is not appropriate at this point of the freeze, sorry. Cheers, Ivo
--- End Message ---