Compare commits

..
1 Commits
Author SHA1 Message Date
Michael McNally 1896343049 Minor tone edits during review with Vicky 2020-07-09 22:48:16 +00:00
2075 changed files with 8853 additions and 14781 deletions
-2
View File
@@ -1,8 +1,6 @@
*.sln.in eol=crlf *.sln.in eol=crlf
*.vcxproj.* eol=crlf *.vcxproj.* eol=crlf
/fuzz/dns_rdata_fromwire_text.in/input-* -text
.gitignore export-ignore .gitignore export-ignore
/conftools export-ignore /conftools export-ignore
/doc/design export-ignore /doc/design export-ignore
+123 -167
View File
@@ -31,12 +31,6 @@ variables:
AM_COLOR_TESTS: always AM_COLOR_TESTS: always
WITHOUT_READLINE: "--without-readline"
WITH_READLINE: "--with-readline"
WITH_READLINE_EDITLINE: "--with-readline=editline"
WITH_READLINE_LIBEDIT: "--with-readline=libedit"
WITH_READLINE_READLINE: "--with-readline=readline"
stages: stages:
- autoconf - autoconf
- precheck - precheck
@@ -50,7 +44,9 @@ stages:
### Runner Tag Templates ### Runner Tag Templates
.libvirt-amd64: &libvirt_amd64 # Note: BSD runners extract the operating system version to use from job name
.freebsd-amd64: &freebsd_amd64
tags: tags:
- libvirt - libvirt
- amd64 - amd64
@@ -60,11 +56,21 @@ stages:
- linux - linux
- amd64 - amd64
.linux-arm64: &linux_arm64
tags:
- linux
- arm64
.linux-i386: &linux_i386 .linux-i386: &linux_i386
tags: tags:
- linux - linux
- i386 - i386
.openbsd-amd64: &openbsd_amd64
tags:
- libvirt
- amd64
### Docker Image Templates ### Docker Image Templates
# Alpine Linux # Alpine Linux
@@ -75,6 +81,10 @@ stages:
# CentOS # CentOS
.centos-centos6-amd64: &centos_centos6_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
<<: *linux_amd64
.centos-centos7-amd64: &centos_centos7_amd64_image .centos-centos7-amd64: &centos_centos7_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64" image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
<<: *linux_amd64 <<: *linux_amd64
@@ -97,6 +107,10 @@ stages:
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64" image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
<<: *linux_amd64 <<: *linux_amd64
.debian-sid-arm64: &debian_sid_arm64_image
image: "$CI_REGISTRY_IMAGE:debian-sid-arm64"
<<: *linux_arm64
.debian-sid-i386: &debian_sid_i386_image .debian-sid-i386: &debian_sid_i386_image
image: "$CI_REGISTRY_IMAGE:debian-sid-i386" image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
<<: *linux_i386 <<: *linux_i386
@@ -129,20 +143,6 @@ stages:
.base: &base_image .base: &base_image
<<: *debian_buster_amd64_image <<: *debian_buster_amd64_image
### QCOW2 Image Templates
.freebsd-11-amd64: &freebsd_11_amd64_image
image: "freebsd-11.4-x86_64"
<<: *libvirt_amd64
.freebsd-12-amd64: &freebsd_12_amd64_image
image: "freebsd-12.1-x86_64"
<<: *libvirt_amd64
.openbsd-amd64: &openbsd_amd64_image
image: "openbsd-6.7-x86_64"
<<: *libvirt_amd64
### Job Templates ### Job Templates
.default-triggering-rules: &default_triggering_rules .default-triggering-rules: &default_triggering_rules
@@ -180,43 +180,28 @@ stages:
${CONFIGURE} \ ${CONFIGURE} \
--disable-maintainer-mode \ --disable-maintainer-mode \
--enable-developer \ --enable-developer \
--with-libtool \
--with-cmocka \ --with-cmocka \
--with-libxml2 \ --with-libxml2 \
--with-json-c \ --with-json-c \
--prefix=$HOME/.local \ --prefix=$HOME/.local \
--without-make-clean \
--with-python=python3 \
$EXTRA_CONFIGURE \ $EXTRA_CONFIGURE \
|| cat config.log || cat config.log
.check_readline_setup: &check_readline_setup |
if [[ -n "${WITHOUT_READLINE}" ]]; then \
! grep "^#define HAVE_READLINE" config.h; \
elif [[ -n "${WITH_READLINE}" ]]; then \
grep -e "^#define HAVE_READLINE_READLINE" \
-e "^#define HAVE_READLINE_LIBEDIT" \
-e "^#define HAVE_READLINE_EDITLINE" config.h; \
elif [[ -n "${WITH_READLINE_EDITLINE}" ]]; then \
grep "^#define HAVE_READLINE_EDITLINE" config.h; \
elif [[ -n "${WITH_READLINE_LIBEDIT}" ]]; then \
grep "^#define HAVE_READLINE_LIBEDIT" config.h; \
elif [[ -n "${WITH_READLINE_READLINE}" ]]; then \
grep "^#define HAVE_READLINE_READLINE" config.h; \
fi
.build: &build_job .build: &build_job
<<: *default_triggering_rules <<: *default_triggering_rules
stage: build stage: build
before_script: before_script:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}" - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
- test -n "${OUT_OF_TREE_WORKSPACE}" && mkdir "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}" - test -n "${OOT_BUILD_WORKSPACE}" && mkdir "${OOT_BUILD_WORKSPACE}" && cd "${OOT_BUILD_WORKSPACE}"
script: script:
- *configure - *configure
- *check_readline_setup
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1 - make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- test -z "${RUN_MAKE_INSTALL}" || make install - test -z "${RUN_MAKE_INSTALL}" || make install
- test -z "${RUN_MAKE_INSTALL}" || sh util/check-make-install - test -z "${RUN_MAKE_INSTALL}" || sh util/check-make-install
- if test -z "${OUT_OF_TREE_WORKSPACE}" && test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
after_script:
- test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
needs: needs:
- job: autoreconf - job: autoreconf
artifacts: true artifacts: true
@@ -268,20 +253,13 @@ stages:
<<: *default_triggering_rules <<: *default_triggering_rules
stage: system stage: system
before_script: before_script:
- *setup_softhsm
# Move the artifacts from the out-of-tree build job to their original location (the out-of-tree workspace).
- test -n "${OUT_OF_TREE_WORKSPACE}" && mv "$(basename "${OUT_OF_TREE_WORKSPACE}")" "${OUT_OF_TREE_WORKSPACE}"
# Continue work in the out-of-tree workspace.
- test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}"
- *setup_interfaces - *setup_interfaces
- *setup_softhsm
script: script:
- cd bin/tests/system - cd bin/tests/system
- make -j${TEST_PARALLEL_JOBS:-1} -k check V=1 - make -j${TEST_PARALLEL_JOBS:-1} -k check V=1 || make -j${TEST_PARALLEL_JOBS:-1} -k recheck V=1
after_script: after_script:
- test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}"
- test -d bind-* && cd bind-*
- cat bin/tests/system/test-suite.log - cat bin/tests/system/test-suite.log
- test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
.system_test: &system_test_job .system_test: &system_test_job
<<: *system_test_common <<: *system_test_common
@@ -298,7 +276,10 @@ stages:
- find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \; - find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
artifacts: artifacts:
expire_in: "1 day" expire_in: "1 day"
untracked: true paths:
- bin/tests/system/*/tsan.*
- bin/tests/system/*/*/tsan.*
- tsan/
when: on_failure when: on_failure
.kyua_report: &kyua_report_html | .kyua_report: &kyua_report_html |
@@ -349,6 +330,7 @@ stages:
.unit_test_tsan: &unit_test_tsan_job .unit_test_tsan: &unit_test_tsan_job
<<: *unit_test_common <<: *unit_test_common
allow_failure: true
after_script: after_script:
- find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \; - find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
artifacts: artifacts:
@@ -415,7 +397,6 @@ misc:
- xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'` - xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
- sh util/check-win32util-configure - sh util/check-win32util-configure
- sh util/check-categories.sh - sh util/check-categories.sh
- if git grep SYSTEMTESTTOP -- ':!.gitlab-ci.yml'; then echo 'Please use relative paths instead of $SYSTEMTESTTOP.'; exit 1; fi
needs: [] needs: []
artifacts: artifacts:
paths: paths:
@@ -479,14 +460,9 @@ pylint:
tarball-create: tarball-create:
stage: precheck stage: precheck
<<: *base_image <<: *base_image
<<: *default_triggering_rules
script: script:
- ./configure --enable-maintainer-mode - *configure
- make maintainer-clean
- autoreconf -fi
- ./configure --enable-maintainer-mode
- make -j${BUILD_PARALLEL_JOBS:-1} all V=1 - make -j${BUILD_PARALLEL_JOBS:-1} all V=1
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
- make -j${BUILD_PARALLEL_JOBS:-1} dist V=1 - make -j${BUILD_PARALLEL_JOBS:-1} dist V=1
artifacts: artifacts:
paths: paths:
@@ -494,6 +470,8 @@ tarball-create:
needs: needs:
- job: autoreconf - job: autoreconf
artifacts: true artifacts: true
only:
- tags
# Jobs for doc builds on Debian 10 "buster" (amd64) # Jobs for doc builds on Debian 10 "buster" (amd64)
@@ -503,6 +481,7 @@ docs:
stage: docs stage: docs
before_script: before_script:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}" - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
- test -n "${OOT_BUILD_WORKSPACE}" && mkdir "${OOT_BUILD_WORKSPACE}" && cd "${OOT_BUILD_WORKSPACE}"
script: script:
- *configure - *configure
- make -j${BUILD_PARALLEL_JOBS:-1} -k doc V=1 - make -j${BUILD_PARALLEL_JOBS:-1} -k doc V=1
@@ -535,7 +514,7 @@ gcc:alpine3.12:amd64:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "${CFLAGS_COMMON}" CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-dnstap ${WITHOUT_READLINE}" EXTRA_CONFIGURE: "--enable-dnstap"
<<: *alpine_3_12_amd64_image <<: *alpine_3_12_amd64_image
<<: *build_job <<: *build_job
@@ -553,6 +532,30 @@ unit:gcc:alpine3.12:amd64:
- job: gcc:alpine3.12:amd64 - job: gcc:alpine3.12:amd64
artifacts: true artifacts: true
# Jobs for regular GCC builds on CentOS 6 (amd64)
gcc:centos6:amd64:
variables:
CC: gcc
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error --without-python"
<<: *centos_centos6_amd64_image
<<: *build_job
system:gcc:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *system_test_job
needs:
- job: gcc:centos6:amd64
artifacts: true
unit:gcc:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *unit_test_job
needs:
- job: gcc:centos6:amd64
artifacts: true
# Jobs for regular GCC builds on CentOS 7 (amd64) # Jobs for regular GCC builds on CentOS 7 (amd64)
gcc:centos7:amd64: gcc:centos7:amd64:
@@ -583,7 +586,7 @@ gcc:centos8:amd64:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "${CFLAGS_COMMON}" CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-buffer-useinline --with-libidn2" EXTRA_CONFIGURE: "--with-libidn2"
<<: *centos_centos8_amd64_image <<: *centos_centos8_amd64_image
<<: *build_job <<: *build_job
@@ -630,7 +633,6 @@ gcc:buster:amd64:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "${CFLAGS_COMMON}" CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "${WITH_READLINE_LIBEDIT}"
<<: *debian_buster_amd64_image <<: *debian_buster_amd64_image
<<: *build_job <<: *build_job
@@ -716,26 +718,13 @@ gcc:out-of-tree:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "${CFLAGS_COMMON} -Og" CFLAGS: "${CFLAGS_COMMON} -Og"
CONFIGURE: "${CI_PROJECT_DIR}/configure" CONFIGURE: ../configure
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --with-lmdb" EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --with-lmdb"
RUN_MAKE_INSTALL: 1 RUN_MAKE_INSTALL: 1
OUT_OF_TREE_WORKSPACE: /tmp/out_of_tree_workspace OOT_BUILD_WORKSPACE: workspace
<<: *base_image <<: *base_image
<<: *build_job <<: *build_job
system:gcc:out-of-tree:
variables:
OUT_OF_TREE_WORKSPACE: /tmp/out_of_tree_workspace
needs:
- job: gcc:out-of-tree
artifacts: true
<<: *base_image
<<: *system_test_job
only:
- schedules
- tags
- web
# Jobs for tarball GCC builds on Debian 10 "buster" (amd64) # Jobs for tarball GCC builds on Debian 10 "buster" (amd64)
gcc:tarball: gcc:tarball:
@@ -753,7 +742,6 @@ gcc:tarball:
- job: tarball-create - job: tarball-create
artifacts: true artifacts: true
only: only:
- schedules
- tags - tags
system:gcc:tarball: system:gcc:tarball:
@@ -766,7 +754,6 @@ system:gcc:tarball:
- job: gcc:tarball - job: gcc:tarball
artifacts: true artifacts: true
only: only:
- schedules
- tags - tags
unit:gcc:tarball: unit:gcc:tarball:
@@ -778,16 +765,39 @@ unit:gcc:tarball:
- job: gcc:tarball - job: gcc:tarball
artifacts: true artifacts: true
only: only:
- schedules
- tags - tags
# Jobs for regular GCC builds on Debian "sid" (arm64)
gcc:sid:arm64:
variables:
CC: gcc
CFLAGS: "${CFLAGS_COMMON} -Og"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_arm64_image
<<: *build_job
system:gcc:sid:arm64:
<<: *debian_sid_arm64_image
<<: *system_test_job
needs:
- job: gcc:sid:arm64
artifacts: true
unit:gcc:sid:arm64:
<<: *debian_sid_arm64_image
<<: *unit_test_job
needs:
- job: gcc:sid:arm64
artifacts: true
# Jobs for regular GCC builds on Debian "sid" (i386) # Jobs for regular GCC builds on Debian "sid" (i386)
gcc:sid:i386: gcc:sid:i386:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "${CFLAGS_COMMON}" CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--with-libidn2" EXTRA_CONFIGURE: "--with-libidn2 --without-python"
<<: *debian_sid_i386_image <<: *debian_sid_i386_image
<<: *build_job <<: *build_job
@@ -811,7 +821,7 @@ gcc:tumbleweed:amd64:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "${CFLAGS_COMMON}" CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--with-libidn2 ${WITH_READLINE_READLINE}" EXTRA_CONFIGURE: "--with-libidn2 --with-python --with-gssapi=/usr/lib/mit/bin/krb5-config"
<<: *tumbleweed_latest_amd64_image <<: *tumbleweed_latest_amd64_image
<<: *build_job <<: *build_job
@@ -1019,6 +1029,7 @@ clang:buster:amd64:
variables: variables:
CC: ${CLANG} CC: ${CLANG}
CFLAGS: "${CFLAGS_COMMON} -Wenum-conversion" CFLAGS: "${CFLAGS_COMMON} -Wenum-conversion"
EXTRA_CONFIGURE: "--with-python=python3"
<<: *debian_buster_amd64_image <<: *debian_buster_amd64_image
<<: *build_job <<: *build_job
@@ -1084,76 +1095,78 @@ unit:gcc:softhsm2.6:
- job: gcc:softhsm2.6 - job: gcc:softhsm2.6
artifacts: true artifacts: true
# Jobs for Clang builds on FreeBSD 11 (amd64) # Jobs for Clang builds on FreeBSD 11.4 (amd64)
clang:freebsd11:amd64: clang:freebsd11.4:amd64:
variables: variables:
CFLAGS: "${CFLAGS_COMMON}" CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "${WITH_READLINE}"
USER: gitlab-runner USER: gitlab-runner
<<: *freebsd_11_amd64_image # Temporarily disable LMDB support [GL #1976]
EXTRA_CONFIGURE: "--without-lmdb"
<<: *freebsd_amd64
<<: *build_job <<: *build_job
system:clang:freebsd11:amd64: system:clang:freebsd11.4:amd64:
<<: *freebsd_11_amd64_image <<: *freebsd_amd64
<<: *system_test_job <<: *system_test_job
variables: variables:
USER: gitlab-runner USER: gitlab-runner
TEST_PARALLEL_JOBS: 4 TEST_PARALLEL_JOBS: 4
needs: needs:
- job: clang:freebsd11:amd64 - job: clang:freebsd11.4:amd64
artifacts: true artifacts: true
unit:clang:freebsd11:amd64: unit:clang:freebsd11.4:amd64:
<<: *freebsd_11_amd64_image <<: *freebsd_amd64
<<: *unit_test_job <<: *unit_test_job
needs: needs:
- job: clang:freebsd11:amd64 - job: clang:freebsd11.4:amd64
artifacts: true artifacts: true
# Jobs for Clang builds on FreeBSD 12 (amd64) # Jobs for Clang builds on FreeBSD 12.1 (amd64)
clang:freebsd12:amd64: clang:freebsd12.1:amd64:
variables: variables:
CFLAGS: "${CFLAGS_COMMON}" CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-dnstap ${WITH_READLINE_EDITLINE}" # Temporarily disable LMDB support [GL #1976]
EXTRA_CONFIGURE: "--enable-dnstap --without-lmdb"
USER: gitlab-runner USER: gitlab-runner
<<: *freebsd_12_amd64_image <<: *freebsd_amd64
<<: *build_job <<: *build_job
system:clang:freebsd12:amd64: system:clang:freebsd12.1:amd64:
<<: *freebsd_12_amd64_image <<: *freebsd_amd64
<<: *system_test_job <<: *system_test_job
variables: variables:
USER: gitlab-runner USER: gitlab-runner
TEST_PARALLEL_JOBS: 4 TEST_PARALLEL_JOBS: 4
needs: needs:
- job: clang:freebsd12:amd64 - job: clang:freebsd12.1:amd64
artifacts: true artifacts: true
unit:clang:freebsd12:amd64: unit:clang:freebsd12.1:amd64:
<<: *freebsd_12_amd64_image <<: *freebsd_amd64
<<: *unit_test_job <<: *unit_test_job
needs: needs:
- job: clang:freebsd12:amd64 - job: clang:freebsd12.1:amd64
artifacts: true artifacts: true
# Jobs for Clang builds on OpenBSD (amd64) # Jobs for Clang builds on OpenBSD 6.7 (amd64)
clang:openbsd:amd64: clang:openbsd6.7:amd64:
variables: variables:
CC: clang CC: clang
USER: gitlab-runner USER: gitlab-runner
<<: *openbsd_amd64_image <<: *openbsd_amd64
<<: *build_job <<: *build_job
system:clang:openbsd:amd64: system:clang:openbsd6.7:amd64:
<<: *openbsd_amd64_image <<: *openbsd_amd64
<<: *system_test_job <<: *system_test_job
variables: variables:
USER: gitlab-runner USER: gitlab-runner
needs: needs:
- job: clang:openbsd:amd64 - job: clang:openbsd6.7:amd64
artifacts: true artifacts: true
only: only:
- schedules - schedules
@@ -1205,8 +1218,6 @@ release:
- find Build/ -regextype posix-extended -regex "Build/.*/($(find bin/tests/ -type f | sed -nE "s|^bin/tests(/system)?/win32/(.*)\.vcxproj$|\2|p" | paste -d"|" -s))\..*" -print -delete - find Build/ -regextype posix-extended -regex "Build/.*/($(find bin/tests/ -type f | sed -nE "s|^bin/tests(/system)?/win32/(.*)\.vcxproj$|\2|p" | paste -d"|" -s))\..*" -print -delete
# Create Windows zips # Create Windows zips
- openssl dgst -sha256 "${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" | tee Build/Release/SHA256 Build/Debug/SHA256 - openssl dgst -sha256 "${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" | tee Build/Release/SHA256 Build/Debug/SHA256
- cp "doc/arm/_build/latex/Bv9ARM.pdf" Build/Release/
- cp "doc/arm/_build/latex/Bv9ARM.pdf" Build/Debug/
- ( cd Build/Release; zip "../../BIND${BIND_DIRECTORY#bind-}.x64.zip" * ) - ( cd Build/Release; zip "../../BIND${BIND_DIRECTORY#bind-}.x64.zip" * )
- ( cd Build/Debug; zip "../../BIND${BIND_DIRECTORY#bind-}.debug.x64.zip" * ) - ( cd Build/Debug; zip "../../BIND${BIND_DIRECTORY#bind-}.debug.x64.zip" * )
# Prepare release tarball contents (tarballs + zips + documentation) # Prepare release tarball contents (tarballs + zips + documentation)
@@ -1308,13 +1319,13 @@ respdiff:
BIND_BASELINE_VERSION: v9_11_3 BIND_BASELINE_VERSION: v9_11_3
script: script:
- autoreconf -fi - autoreconf -fi
- ./configure - ./configure --without-make-clean
- make -j${BUILD_PARALLEL_JOBS:-1} V=1 - make -j${BUILD_PARALLEL_JOBS:-1} V=1
- *setup_interfaces - *setup_interfaces
- git clone --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.isc.org/isc-private/bind-qa.git - git clone --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.isc.org/isc-private/bind-qa.git
- git clone --branch "${BIND_BASELINE_VERSION}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git refbind - git clone --branch "${BIND_BASELINE_VERSION}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git refbind
- cd refbind/ - cd refbind/
- ./configure - ./configure --without-make-clean
- make -j${BUILD_PARALLEL_JOBS:-1} V=1 - make -j${BUILD_PARALLEL_JOBS:-1} V=1
- cd ../bind-qa/bind9/respdiff - cd ../bind-qa/bind9/respdiff
- bash respdiff.sh -q "${PWD}/100k_mixed.txt" -c 3 -w "${PWD}/rspworkdir" "${CI_PROJECT_DIR}/refbind" "${CI_PROJECT_DIR}" - bash respdiff.sh -q "${PWD}/100k_mixed.txt" -c 3 -w "${PWD}/rspworkdir" "${CI_PROJECT_DIR}/refbind" "${CI_PROJECT_DIR}"
@@ -1341,8 +1352,7 @@ abi-check:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "${CFLAGS_COMMON} -Og" CFLAGS: "${CFLAGS_COMMON} -Og"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2" BIND_BASELINE_VERSION: v9_17_2
BIND_BASELINE_VERSION: v9_17_5
script: script:
- *configure - *configure
- make -j${BUILD_PARALLEL_JOBS:-1} V=1 - make -j${BUILD_PARALLEL_JOBS:-1} V=1
@@ -1362,57 +1372,3 @@ abi-check:
only: only:
- main@isc-projects/bind9 - main@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9 - /^v9_[1-9][0-9]$/@isc-projects/bind9
gcov:
<<: *base_image
stage: build
needs:
- job: autoreconf
artifacts: true
variables:
CC: gcc
CFLAGS: "${CFLAGS_COMMON} --coverage -O0"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
script:
- *configure
- *setup_interfaces
- *setup_softhsm
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- make -j${TEST_PARALLEL_JOBS:-1} -k unit V=1 || true
- make -C bin/tests/system -j${TEST_PARALLEL_JOBS:-1} -k check V=1 || cat bin/tests/system/test-suite.log
# *.gcno and *.gcda files generated for shared library objects are created
# in directories in which gcovr is unable to process them properly
# (.../.libs/...). Move such *.gcno and *.gcda files one level higher.
- find . -regex ".*/\.libs/.*\.\(gcda\|gcno\)" -execdir mv "{}" .. \;
# Help gcovr process the nasty tricks in lib/dns/code.h, where we include C
# source files from lib/dns/rdata/*/, using an even nastier trick.
- find lib/dns/rdata/* -name "*.c" -execdir cp -f "{}" ../../ \;
- gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories libltdl --exclude-directories lib/samples --exclude 'lib/.*/tests/.*' --html-details -o coverage.html
- gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories libltdl --exclude-directories lib/samples --exclude 'lib/.*/tests/.*' -o coverage.txt
- tail -n 3 coverage.txt
artifacts:
paths:
- coverage*.html
only:
- main@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
# Pairwise testing of ./configure options
pairwise:
<<: *base_image
stage: build
needs:
- job: autoreconf
artifacts: true
script:
- util/pairwise-testing.sh
artifacts:
paths:
- pairwise-commands.txt
- pairwise-model.txt
- pairwise-output.*.txt
when: on_failure
only:
variables:
- $PAIRWISE_TESTING
-2
View File
@@ -54,7 +54,6 @@
- [ ] ***(Support)*** Publish links to downloads on ISC website. - [ ] ***(Support)*** Publish links to downloads on ISC website.
- [ ] ***(Support)*** Write release email to *bind-announce*. - [ ] ***(Support)*** Write release email to *bind-announce*.
- [ ] ***(Support)*** Write email to *bind-users* (if a major release). - [ ] ***(Support)*** Write email to *bind-users* (if a major release).
- [ ] ***(Support)*** Send eligible customers updated links to the Subscription Edition.
- [ ] ***(Support)*** Update tickets in case of waiting support customers. - [ ] ***(Support)*** Update tickets in case of waiting support customers.
- [ ] ***(QA)*** Build and test any outstanding private packages. - [ ] ***(QA)*** Build and test any outstanding private packages.
- [ ] ***(QA)*** Build public packages (`*.deb`, RPMs). - [ ] ***(QA)*** Build public packages (`*.deb`, RPMs).
@@ -68,7 +67,6 @@
- [ ] ***(SwEng)*** Push tags for the published releases to the public repository. - [ ] ***(SwEng)*** Push tags for the published releases to the public repository.
- [ ] ***(QA)*** For each maintained branch, update the `BIND_BASELINE_VERSION` variable for the `abi-check` job in `.gitlab-ci.yml` to the latest published BIND version tag for a given branch. - [ ] ***(QA)*** For each maintained branch, update the `BIND_BASELINE_VERSION` variable for the `abi-check` job in `.gitlab-ci.yml` to the latest published BIND version tag for a given branch.
- [ ] ***(QA)*** Prepare empty release notes for the next set of releases. - [ ] ***(QA)*** Prepare empty release notes for the next set of releases.
- [ ] ***(QA)*** Sanitize all confidential issues assigned to the release milestone and make them public.
- [ ] ***(QA)*** Update QA tools used in GitLab CI (e.g. Flake8, PyLint) by modifying the relevant `Dockerfile`. - [ ] ***(QA)*** Update QA tools used in GitLab CI (e.g. Flake8, PyLint) by modifying the relevant `Dockerfile`.
[^1]: If not, use the time remaining until the tagging deadline to ensure all outstanding issues are either resolved or moved to a different milestone. [^1]: If not, use the time remaining until the tagging deadline to ensure all outstanding issues are either resolved or moved to a different milestone.
+24 -242
View File
@@ -1,235 +1,15 @@
--- 9.17.6 released --- 5461. [bug] The header STALE attribute was not being updated with
the write lock being held leading to incorrect
5516. [func] The default EDNS buffer size has been changed from 4096 statistics. Convert the header attributes to use atomic
to 1232 bytes, the EDNS buffer size probing has been operations. [GL #1475]
removed, and named now sets the DF (Don't Fragment) flag
on outgoing UDP packets. [GL #2183]
5515. [func] Add 'rndc dnssec -rollover' command to trigger a manual
rollover for a specific key. [GL #1749]
5514. [bug] Fix KASP expected key size for Ed25519 and Ed448.
[GL #2171]
5513. [doc] The ARM section describing the "rrset-order" statement
was rewritten to make it unambiguous and up-to-date with
the source code. [GL #2139]
5512. [bug] "rrset-order" rules using "order none" were causing
named to crash despite named-checkconf treating them as
valid. [GL #2139]
5511. [bug] 'dig -u +yaml' failed to display timestamps to the
microsecond. [GL #2190]
5510. [bug] Implement the attach/detach semantics for dns_message_t
to fix a data race in accessing an already-destroyed
fctx->rmessage. [GL #2124]
5509. [bug] filter-aaaa: named crashed upon shutdown if it was in
the process of recursing for A RRsets. [GL #1040]
5508. [func] Added new parameter "-expired" for "rndc dumpdb" that
also prints expired RRsets (awaiting cleanup) to the
dump file. [GL #1870]
5507. [bug] Named could compute incorrect SIG(0) responses.
[GL #2109]
5506. [bug] Properly handle failed sysconf() calls, so we don't
report invalid memory size. [GL #2166]
5505. [bug] Updating contents of a mixed-case RPZ could cause some
rules to be ignored. [GL #2169]
5504. [func] The "glue-cache" option has been marked as deprecated.
The glue cache feature will be permanently enabled in a
future release. [GL #2146]
5503. [bug] Cleaned up reference counting of network manager
handles, now using isc_nmhandle_attach() and _detach()
instead of _ref() and _unref(). [GL #2122]
--- 9.17.5 released ---
5502. [func] 'dig +bufsize=0' no longer disables EDNS. [GL #2054]
5501. [func] Log CDS/CDNSKEY publication. [GL #1748]
5500. [bug] Fix (non-)publication of CDS and CDNSKEY records.
[GL #2103]
5499. [func] Add '-P ds' and '-D ds' arguments to dnssec-settime.
[GL #1748]
5498. [test] The --with-gperftools-profiler configure option was
removed. [GL !4045]
5497. [placeholder]
5496. [bug] Address a TSAN report by ensuring each rate limiter
object holds a reference to its task. [GL #2081]
5495. [bug] With query minimization enabled, named failed to
resolve ip6.arpa. names that had extra labels to the
left of the IPv6 part. [GL #1847]
5494. [bug] Silence the EPROTO syslog message on older systems.
[GL #1928]
5493. [bug] Fix off-by-one error when calculating new hash table
size. [GL #2104]
5492. [bug] Tighten LOC parsing to reject a period (".") and/or "m"
as a value. Fix handling of negative altitudes which are
not whole meters. [GL #2074]
5491. [bug] rbtversion->glue_table_size could be read without the
appropriate lock being held. [GL #2080]
5490. [func] Refactor readline support to use pkg-config and add
support for the editline library. [GL !3942]
5489. [bug] Named erroneously accepted certain invalid resource
records that were incorrectly processed after
subsequently being written to disk and loaded back, as
the wire format differed. Such records include: CERT,
IPSECKEY, NSEC3, NSEC3PARAM, NXT, SIG, TLSA, WKS, and
X25. [GL !3953]
5488. [bug] NTA code needed to have a weak reference on its
associated view to prevent the latter from being deleted
while NTA tests were being performed. [GL #2067]
5487. [cleanup] Update managed keys log messages to be less confusing.
[GL #2027]
5486. [func] Add 'rndc dnssec -checkds' command, which signals to
named that the DS record for a given zone or key has
been updated in the parent zone. [GL #1613]
--- 9.17.4 released ---
5485. [placeholder]
5484. [func] Expire zero TTL records quickly rather than using them
for stale answers. [GL #1829]
5483. [func] Keeping "stale" answers in cache has been disabled by
default and can be re-enabled with a new configuration
option "stale-cache-enable". [GL #1712]
5482. [bug] If the Duplicate Address Detection (DAD) mechanism had
not yet finished after adding a new IPv6 address to the
system, BIND 9 would fail to bind to IPv6 addresses in a
tentative state. [GL #2038]
5481. [security] "update-policy" rules of type "subdomain" were
incorrectly treated as "zonesub" rules, which allowed
keys used in "subdomain" rules to update names outside
of the specified subdomains. The problem was fixed by
making sure "subdomain" rules are again processed as
described in the ARM. (CVE-2020-8624) [GL #2055]
5480. [security] When BIND 9 was compiled with native PKCS#11 support, it
was possible to trigger an assertion failure in code
determining the number of bits in the PKCS#11 RSA public
key with a specially crafted packet. (CVE-2020-8623)
[GL #2037]
5479. [security] named could crash in certain query resolution scenarios
where QNAME minimization and forwarding were both
enabled. (CVE-2020-8621) [GL #1997]
5478. [security] It was possible to trigger an assertion failure by
sending a specially crafted large TCP DNS message.
(CVE-2020-8620) [GL #1996]
5477. [bug] The idle timeout for connected TCP sockets, which was
previously set to a high fixed value, is now derived
from the client query processing timeout configured for
a resolver. [GL #2024]
5476. [security] It was possible to trigger an assertion failure when
verifying the response to a TSIG-signed request.
(CVE-2020-8622) [GL #2028]
5475. [bug] Wildcard RPZ passthru rules could incorrectly be
overridden by other rules that were loaded from RPZ
zones which appeared later in the "response-policy"
statement. This has been fixed. [GL #1619]
5474. [bug] dns_rdata_hip_next() failed to return ISC_R_NOMORE
when it should have. [GL !3880]
5473. [func] The RBT hash table implementation has been changed
to use a faster hash function (HalfSipHash2-4) and
Fibonacci hashing for better distribution. Setting
"max-cache-size" now preallocates a fixed-size hash
table so that rehashing does not cause resolution
brownouts while the hash table is grown. [GL #1775]
5472. [func] The statistics channel has been updated to use the
new network manager. [GL #2022]
5471. [bug] The introduction of KASP support inadvertently caused
the second field of "sig-validity-interval" to always be
calculated in hours, even in cases when it should have
been calculated in days. This has been fixed. (Thanks to
Tony Finch.) [GL !3735]
5470. [port] gsskrb5_register_acceptor_identity() is now only called
if gssapi_krb5.h is present. [GL #1995]
5469. [port] On illumos, a constant called SEC is already defined in
<sys/time.h>, which conflicts with an identically named
constant in libbind9. This conflict has been resolved.
[GL #1993]
5468. [bug] Addressed potential double unlock in process_fd().
[GL #2005]
5467. [func] The control channel and the rndc utility have been
updated to use the new network manager. To support
this, the network manager was updated to enable
the initiation of client TCP connections. Its
internal reference counting has been refactored.
Note: As a side effect of this change, rndc cannot
currently be used with UNIX-domain sockets, and its
default timeout has changed from 60 seconds to 30.
These will be addressed in a future release.
[GL #1759]
5466. [bug] Addressed an error in recursive clients stats reporting.
[GL #1719]
5465. [func] Added fallback to built-in trust-anchors, managed-keys,
or trusted-keys if the bindkeys-file (bind.keys) cannot
be parsed. [GL #1235]
5464. [bug] Requesting more than 128 files to be saved when rolling
dnstap log files caused a buffer overflow. This has been
fixed. [GL #1989]
5463. [placeholder]
5462. [bug] Move LMDB locking from LMDB itself to named. [GL #1976]
5461. [bug] The STALE rdataset header attribute was updated while
the write lock was not being held, leading to incorrect
statistics. The header attributes are now converted to
use atomic operations. [GL #1475]
5460. [cleanup] tsig-keygen was previously an alias for 5460. [cleanup] tsig-keygen was previously an alias for
ddns-confgen and was documented in the ddns-confgen ddns-confgen and was documented in the ddns-confgen
man page. This has been reversed; tsig-keygen is man page. This has been reversed; tsig-keygen is
now the primary name. [GL #1998] now the primary name. [GL #1998]
5459. [bug] Fixed bad isc_mem_put() size when an invalid type was 5459. [bug] Bad isc_mem_put() size when an invalid type was
specified in an "update-policy" rule. [GL #1990] specified in a update-policy rule. [GL #1990]
--- 9.17.3 released ---
5458. [bug] Prevent a theoretically possible NULL dereference caused 5458. [bug] Prevent a theoretically possible NULL dereference caused
by a data race between zone_maintenance() and by a data race between zone_maintenance() and
@@ -239,21 +19,23 @@
5456. [func] Added "primaries" as a synonym for "masters" in 5456. [func] Added "primaries" as a synonym for "masters" in
named.conf, and "primary-only" as a synonym for named.conf, and "primary-only" as a synonym for
"master-only" in the parameters to "notify", to bring "master-only" in the parameters to "notify",
terminology up-to-date with RFC 8499. [GL #1948] in order to bring terminology up to date with
RFC 8499. [GL #1948]
5455. [bug] named could crash when cleaning dead nodes in 5455. [bug] `named` could crash when cleaning dead nodes
lib/dns/rbtdb.c that were being reused. [GL #1968] in lib/dns/rbtdb.c that have been reused meanwhile.
[GL #1968]
5454. [bug] Address a startup crash that occurred when the server 5454. [bug] Address a startup crash happening when server is
was under load and the root zone had not yet been under load and root zone is not yet loaded. [GL #1862]
loaded. [GL #1862]
5453. [bug] named crashed on shutdown when a new rndc connection was 5453. [bug] `named` would crash on shutdown when new `rndc`
received during shutdown. [GL #1747] connection is received at the same time as
shutting down. [GL #1747]
5452. [bug] The "blackhole" ACL was accidentally disabled for client 5452. [bug] The "blackhole" ACL was accidentally disabled with
queries. [GL #1936] respect to client queries. [GL #1936]
5451. [func] Add 'rndc dnssec -status' command. [GL #1612] 5451. [func] Add 'rndc dnssec -status' command. [GL #1612]
@@ -271,14 +53,14 @@
5446. [bug] The validator could fail to accept a properly signed 5446. [bug] The validator could fail to accept a properly signed
RRset if an unsupported algorithm appeared earlier in RRset if an unsupported algorithm appeared earlier in
the DNSKEY RRset than a supported algorithm. It could the DNSKEY RRset than a supported algorithm. It could
also stop if it detected a malformed public key. also stop if it detected a malformed public key.
[GL #1689] [GL #1689]
5445. [cleanup] Disable and disallow static linking. [GL #1933] 5445. [cleanup] Disable and disallow static linking. [GL #1933]
5444. [bug] 'rndc dnstap -roll <value>' did not limit the number of 5444. [bug] 'rndc dnstap -roll <value>' was not limiting the
saved files to <value>. [GL !3728] number of saved files to <value>. [GL !3728]
5443. [bug] The "primary" and "secondary" keywords, when used 5443. [bug] The "primary" and "secondary" keywords, when used
as parameters for "check-names", were not as parameters for "check-names", were not
@@ -291,8 +73,8 @@
5440. [placeholder] 5440. [placeholder]
5439. [bug] The DS RRset returned by dns_keynode_dsset() was used in 5439. [bug] The dsset returned by dns_keynode_dsset() was not
a non-thread-safe manner. [GL #1926] thread safe. [GL #1926]
--- 9.17.2 released --- --- 9.17.2 released ---
+3 -3
View File
@@ -6,9 +6,9 @@ on every aspect of the mission - including mentorship, teaching, and connecting
people. people.
Diversity is one of our huge strengths, but it can also lead to communication Diversity is one of our huge strengths, but it can also lead to communication
issues and unhappiness. To that end, we have a few ground rules that we ask issues and unhappiness. To that end, we have a few ground rules to which we expect
people to adhere to. This code applies equally to the core development team, people to adhere. This code applies equally to the core development team, open source contributors and those
open source contributors and those seeking help and guidance. seeking help and guidance.
This isn't an exhaustive list of things that you can't do. Rather, take it in This isn't an exhaustive list of things that you can't do. Rather, take it in
the spirit in which it's intended - a guide to make it easier to enrich all of the spirit in which it's intended - a guide to make it easier to enrich all of
+7 -12
View File
@@ -46,9 +46,8 @@ building communities that are welcoming and inclusive: environments where people
are encouraged to share ideas, treat each other with respect, and collaborate are encouraged to share ideas, treat each other with respect, and collaborate
towards the best solutions. To reinforce our commitment, ISC towards the best solutions. To reinforce our commitment, ISC
has adopted a slightly modified version of the Django has adopted a slightly modified version of the Django
[Code of Conduct](https://gitlab.isc.org/isc-projects/bind9/-/blob/main/CODE_OF_CONDUCT.md) [Code of Conduct](https://gitlab.isc.org/isc-projects/bind9/-/blob/master/CODE_OF_CONDUCT.md) for the BIND 9 project, as well as for the conduct of our
for the BIND 9 project, as well as for the conduct of our developers throughout developers throughout the industry.
the industry.
### <a name="access"></a>Access to source code ### <a name="access"></a>Access to source code
@@ -81,7 +80,7 @@ Whenever a branch is ready for publication, a tag is placed of the
form `v9_X_Y`. The 9.12.0 release, for instance, is tagged as `v9_12_0`. form `v9_X_Y`. The 9.12.0 release, for instance, is tagged as `v9_12_0`.
The branch in which the next major release is being developed is called The branch in which the next major release is being developed is called
`main`. `master`.
### <a name="bugs"></a>Reporting bugs ### <a name="bugs"></a>Reporting bugs
@@ -101,7 +100,6 @@ use credentials from an existing account at GitHub, GitLab, Google,
Twitter, or Facebook. Twitter, or Facebook.
### Reporting possible security issues ### Reporting possible security issues
If you think you may be seeing a potential security vulnerability in BIND If you think you may be seeing a potential security vulnerability in BIND
(for example, a crash with REQUIRE, INSIST, or ASSERT failure), please (for example, a crash with REQUIRE, INSIST, or ASSERT failure), please
report it immediately by emailing to security-officer@isc.org. Plain-text report it immediately by emailing to security-officer@isc.org. Plain-text
@@ -113,8 +111,7 @@ Do not discuss undisclosed security vulnerabilities on any public mailing list.
ISC has a long history of handling reported vulnerabilities promptly and ISC has a long history of handling reported vulnerabilities promptly and
effectively and we respect and acknowledge responsible reporters. effectively and we respect and acknowledge responsible reporters.
ISC's Security Vulnerability Disclosure Policy is documented at ISC's Security Vulnerability Disclosure Policy is documented at [https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
[https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
If you have a crash, you may want to consult If you have a crash, you may want to consult
["What to do if your BIND or DHCP server has crashed."](https://kb.isc.org/docs/aa-00340) ["What to do if your BIND or DHCP server has crashed."](https://kb.isc.org/docs/aa-00340)
@@ -123,8 +120,7 @@ If you have a crash, you may want to consult
BIND is licensed under the BIND is licensed under the
[Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/2.0/). [Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/2.0/).
Earlier versions (BIND 9.10 and earlier) were licensed under the Earlier versions (BIND 9.10 and earlier) were licensed under the [ISC License](https://www.isc.org/licenses/)
[ISC License](https://www.isc.org/licenses/)
ISC does not require an explicit copyright assignment for patch ISC does not require an explicit copyright assignment for patch
contributions. However, by submitting a patch to ISC, you implicitly contributions. However, by submitting a patch to ISC, you implicitly
@@ -140,7 +136,7 @@ Patches for BIND may be submitted directly via merge requests in
repository for BIND. repository for BIND.
Patches can also be submitted as diffs against a specific version of Patches can also be submitted as diffs against a specific version of
BIND -- preferably the current top of the `main` branch. Diffs may BIND -- preferably the current top of the `master` branch. Diffs may
be generated using either `git format-patch` or `git diff`. be generated using either `git format-patch` or `git diff`.
Those wanting to write code for BIND may be interested in the Those wanting to write code for BIND may be interested in the
@@ -188,8 +184,7 @@ of documentation in the BIND source tree:
they document, in files ending in `.rst`: for example, the they document, in files ending in `.rst`: for example, the
`named` man page is `bin/named/named.rst`. `named` man page is `bin/named/named.rst`.
* The *BIND 9 Administrator Reference Manual* is in the .rst files in * The *BIND 9 Administrator Reference Manual* is in the .rst files in
`doc/arm/`; the PDF and HTML versions are automatically generated from `doc/arm/`; the PDF and HTML versions are automatically generated from the `.rst` files.
the `.rst` files.
* API documentation is in the header file describing the API, in * API documentation is in the header file describing the API, in
Doxygen-formatted comments. Doxygen-formatted comments.
+1 -1
View File
@@ -2,7 +2,7 @@ Copyright (C) 1996-2020 Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
+1 -1
View File
@@ -1,6 +1,6 @@
include $(top_srcdir)/Makefile.top include $(top_srcdir)/Makefile.top
SUBDIRS = . libltdl lib doc bin fuzz SUBDIRS = . libltdl lib doc bin
BUILT_SOURCES = bind.keys.h BUILT_SOURCES = bind.keys.h
CLEANFILES = bind.keys.h CLEANFILES = bind.keys.h
-12
View File
@@ -11,13 +11,6 @@ AM_CPPFLAGS = \
-include $(top_builddir)/config.h \ -include $(top_builddir)/config.h \
-I$(srcdir)/include -I$(srcdir)/include
AM_LDFLAGS =
if HOST_MACOS
AM_LDFLAGS += \
-Wl,-flat_namespace
endif HOST_MACOS
if HAVE_GSSAPI if HAVE_GSSAPI
AM_CPPFLAGS += \ AM_CPPFLAGS += \
$(GSSAPI_CFLAGS) $(GSSAPI_CFLAGS)
@@ -40,11 +33,6 @@ LIBISC_CFLAGS += \
$(LIBXML2_CFLAGS) $(LIBXML2_CFLAGS)
endif HAVE_LIBXML2 endif HAVE_LIBXML2
if HAVE_READLINE
LIBISC_CFLAGS += \
$(READLINE_CFLAGS)
endif HAVE_READLINE
LIBISC_LIBS = $(top_builddir)/lib/isc/libisc.la LIBISC_LIBS = $(top_builddir)/lib/isc/libisc.la
LIBDNS_CFLAGS = \ LIBDNS_CFLAGS = \
+7 -3
View File
@@ -185,8 +185,9 @@ command:
Building on macOS assumes that the "Command Tools for Xcode" are installed. Building on macOS assumes that the "Command Tools for Xcode" are installed.
These can be downloaded from These can be downloaded from
[https://developer.apple.com/download/more/](https://developer.apple.com/download/more/) [https://developer.apple.com/download/more/](https://developer.apple.com/download/more/)
or, if you have Xcode already installed, you can run `xcode-select --install`. or, if you have Xcode already installed, you can run
(Note that an Apple ID may be required to access the download page.) `xcode-select--install`. (Note that an Apple ID may be required to access the download
page.)
#### <a name="dependencies"> Dependencies #### <a name="dependencies"> Dependencies
@@ -207,6 +208,9 @@ installed:
To see a full list of configuration options, run `configure --help`. To see a full list of configuration options, run `configure --help`.
To build shared libraries, specify `--with-libtool` on the `configure`
command line.
For the server to support DNSSEC, you need to build it with crypto support. For the server to support DNSSEC, you need to build it with crypto support.
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
OpenSSL library is installed in a nonstandard location, specify the prefix OpenSSL library is installed in a nonstandard location, specify the prefix
@@ -335,7 +339,7 @@ the change that was made; these categories are:
| [cleanup] | Minor corrections and refactoring | | [cleanup] | Minor corrections and refactoring |
| [doc] | Documentation | | [doc] | Documentation |
| [contrib] | Changes to the contributed tools and libraries in the 'contrib' subdirectory | | [contrib] | Changes to the contributed tools and libraries in the 'contrib' subdirectory |
| [placeholder] | Used in the main development branch to reserve change numbers for use in other branches, e.g., when fixing a bug that only exists in older releases | | [placeholder] | Used in the master development branch to reserve change numbers for use in other branches, e.g., when fixing a bug that only exists in older releases |
In general, [func] and [experimental] tags only appear in new-feature In general, [func] and [experimental] tags only appear in new-feature
releases (i.e., those with version numbers ending in zero). Some new releases (i.e., those with version numbers ending in zero). Some new
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+2 -2
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
@@ -28,7 +28,7 @@ tsig-keygen, ddns-confgen - TSIG key generation tool
Synopsis Synopsis
~~~~~~~~ ~~~~~~~~
:program:`tsig-keygen` [**-a** algorithm] [**-h**] [**-r** randomfile] [name] :program:`tsig-keygen` [**-a** algorithm] [**-h**] [**-r** randomfile] [**-s** name]
:program:`ddns-confgen` [**-a** algorithm] [**-h**] [**-k** keyname] [**-q**] [**-r** randomfile] [**-s** name] [**-z** zone] :program:`ddns-confgen` [**-a** algorithm] [**-h**] [**-k** keyname] [**-q**] [**-r** randomfile] [**-s** name] [**-z** zone]
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+3 -7
View File
@@ -25,10 +25,6 @@ libdighost_la_SOURCES = \
bin_PROGRAMS = dig host nslookup bin_PROGRAMS = dig host nslookup
nslookup_LDADD = \ nslookup_LDADD = \
$(LDADD) $(LDADD) \
$(READLINE_LIB)
if HAVE_READLINE
nslookup_LDADD += \
$(READLINE_LIBS)
endif HAVE_READLINE
+16 -28
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
@@ -185,7 +185,7 @@ help(void) {
" +[no]besteffort (Try to parse even " " +[no]besteffort (Try to parse even "
"illegal " "illegal "
"messages)\n" "messages)\n"
" +bufsize[=###] (Set EDNS0 Max UDP packet " " +bufsize=### (Set EDNS0 Max UDP packet "
"size)\n" "size)\n"
" +[no]cdflag (Set checking disabled " " +[no]cdflag (Set checking disabled "
"flag in query)\n" "flag in query)\n"
@@ -675,25 +675,15 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
if (!isc_time_isepoch(&query->time_sent)) { if (!isc_time_isepoch(&query->time_sent)) {
char tbuf[100]; char tbuf[100];
if (query->lookup->use_usec) { isc_time_formatISO8601ms(&query->time_sent, tbuf,
isc_time_formatISO8601us(&query->time_sent, sizeof(tbuf));
tbuf, sizeof(tbuf));
} else {
isc_time_formatISO8601ms(&query->time_sent,
tbuf, sizeof(tbuf));
}
printf(" query_time: !!timestamp %s\n", tbuf); printf(" query_time: !!timestamp %s\n", tbuf);
} }
if (!isquery && !isc_time_isepoch(&query->time_recv)) { if (!isquery && !isc_time_isepoch(&query->time_recv)) {
char tbuf[100]; char tbuf[100];
if (query->lookup->use_usec) { isc_time_formatISO8601ms(&query->time_recv, tbuf,
isc_time_formatISO8601us(&query->time_recv, sizeof(tbuf));
tbuf, sizeof(tbuf));
} else {
isc_time_formatISO8601ms(&query->time_recv,
tbuf, sizeof(tbuf));
}
printf(" response_time: !!timestamp %s\n", tbuf); printf(" response_time: !!timestamp %s\n", tbuf);
} }
@@ -1057,13 +1047,12 @@ plus_option(char *option, bool is_batchfile, dig_lookup_t *lookup) {
break; break;
case 'u': /* bufsize */ case 'u': /* bufsize */
FULLCHECK("bufsize"); FULLCHECK("bufsize");
if (value == NULL) {
goto need_value;
}
if (!state) { if (!state) {
goto invalid_option; goto invalid_option;
} }
if (value == NULL) {
lookup->udpsize = DEFAULT_EDNS_BUFSIZE;
break;
}
result = parse_uint(&num, value, COMMSIZE, result = parse_uint(&num, value, COMMSIZE,
"buffer size"); "buffer size");
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
@@ -1110,7 +1099,7 @@ plus_option(char *option, bool is_batchfile, dig_lookup_t *lookup) {
case 'o': /* cookie */ case 'o': /* cookie */
FULLCHECK("cookie"); FULLCHECK("cookie");
if (state && lookup->edns == -1) { if (state && lookup->edns == -1) {
lookup->edns = DEFAULT_EDNS_VERSION; lookup->edns = 0;
} }
lookup->sendcookie = state; lookup->sendcookie = state;
if (value != NULL) { if (value != NULL) {
@@ -1149,7 +1138,7 @@ plus_option(char *option, bool is_batchfile, dig_lookup_t *lookup) {
FULLCHECK("dnssec"); FULLCHECK("dnssec");
dnssec: dnssec:
if (state && lookup->edns == -1) { if (state && lookup->edns == -1) {
lookup->edns = DEFAULT_EDNS_VERSION; lookup->edns = 0;
} }
lookup->dnssec = state; lookup->dnssec = state;
break; break;
@@ -1201,8 +1190,7 @@ plus_option(char *option, bool is_batchfile, dig_lookup_t *lookup) {
break; break;
} }
if (value == NULL) { if (value == NULL) {
lookup->edns = lookup->edns = 0;
DEFAULT_EDNS_VERSION;
break; break;
} }
result = parse_uint(&num, value, result = parse_uint(&num, value,
@@ -1417,7 +1405,7 @@ plus_option(char *option, bool is_batchfile, dig_lookup_t *lookup) {
case 'i': /* nsid */ case 'i': /* nsid */
FULLCHECK("nsid"); FULLCHECK("nsid");
if (state && lookup->edns == -1) { if (state && lookup->edns == -1) {
lookup->edns = DEFAULT_EDNS_VERSION; lookup->edns = 0;
} }
lookup->nsid = state; lookup->nsid = state;
break; break;
@@ -1487,7 +1475,7 @@ plus_option(char *option, bool is_batchfile, dig_lookup_t *lookup) {
case 'p': case 'p':
FULLCHECK("padding"); FULLCHECK("padding");
if (state && lookup->edns == -1) { if (state && lookup->edns == -1) {
lookup->edns = DEFAULT_EDNS_VERSION; lookup->edns = 0;
} }
if (value == NULL) { if (value == NULL) {
goto need_value; goto need_value;
@@ -1673,7 +1661,7 @@ plus_option(char *option, bool is_batchfile, dig_lookup_t *lookup) {
break; break;
} }
if (lookup->edns == -1) { if (lookup->edns == -1) {
lookup->edns = DEFAULT_EDNS_VERSION; lookup->edns = 0;
} }
if (lookup->ecs_addr != NULL) { if (lookup->ecs_addr != NULL) {
isc_mem_free(mctx, lookup->ecs_addr); isc_mem_free(mctx, lookup->ecs_addr);
@@ -2288,7 +2276,7 @@ parse_args(bool is_batchfile, bool config_only, int argc, char **argv) {
debug("making new lookup"); debug("making new lookup");
default_lookup = make_empty_lookup(); default_lookup = make_empty_lookup();
default_lookup->adflag = true; default_lookup->adflag = true;
default_lookup->edns = DEFAULT_EDNS_VERSION; default_lookup->edns = 0;
default_lookup->sendcookie = true; default_lookup->sendcookie = true;
#ifndef NOPOSIX #ifndef NOPOSIX
+7 -5
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
@@ -251,10 +251,12 @@ abbreviation is unambiguous; for example, ``+cd`` is equivalent to
This option attempts to display the contents of messages which are malformed. The This option attempts to display the contents of messages which are malformed. The
default is to not display malformed answers. default is to not display malformed answers.
``+bufsize[=B]`` ``+bufsize=B``
This option sets the UDP message buffer size advertised using EDNS0 to This option sets the UDP message buffer size advertised using EDNS0 to ``B``
``B`` bytes. The maximum and minimum sizes of this buffer are 65535 and bytes. The maximum and minimum sizes of this buffer are 65535 and 0,
0, respectively. ``+bufsize`` restores the default buffer size. respectively. Values outside this range are rounded up or down
appropriately. Values other than zero cause an EDNS query to be
sent.
``+[no]cdflag`` ``+[no]cdflag``
This option sets [or does not set] the CD (checking disabled) bit in the query. This This option sets [or does not set] the CD (checking disabled) bit in the query. This
+23 -20
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
@@ -667,7 +667,7 @@ make_empty_lookup(void) {
looknew->idnin = false; looknew->idnin = false;
looknew->idnout = false; looknew->idnout = false;
#endif /* HAVE_LIBIDN2 */ #endif /* HAVE_LIBIDN2 */
looknew->udpsize = -1; looknew->udpsize = 0;
looknew->edns = -1; looknew->edns = -1;
looknew->recurse = true; looknew->recurse = true;
looknew->aaonly = false; looknew->aaonly = false;
@@ -1681,7 +1681,7 @@ destroy_lookup(dig_lookup_t *lookup) {
isc_mem_free(mctx, ptr); isc_mem_free(mctx, ptr);
} }
if (lookup->sendmsg != NULL) { if (lookup->sendmsg != NULL) {
dns_message_detach(&lookup->sendmsg); dns_message_destroy(&lookup->sendmsg);
} }
if (lookup->querysig != NULL) { if (lookup->querysig != NULL) {
debug("freeing buffer %p", lookup->querysig); debug("freeing buffer %p", lookup->querysig);
@@ -2106,7 +2106,9 @@ setup_lookup(dig_lookup_t *lookup) {
debug("setup_lookup(%p)", lookup); debug("setup_lookup(%p)", lookup);
dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER, &lookup->sendmsg); result = dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER,
&lookup->sendmsg);
check_result(result, "dns_message_create");
if (lookup->new_search) { if (lookup->new_search) {
debug("resetting lookup counter."); debug("resetting lookup counter.");
@@ -2360,7 +2362,7 @@ setup_lookup(dig_lookup_t *lookup) {
result = dns_message_renderbegin(lookup->sendmsg, &cctx, result = dns_message_renderbegin(lookup->sendmsg, &cctx,
&lookup->renderbuf); &lookup->renderbuf);
check_result(result, "dns_message_renderbegin"); check_result(result, "dns_message_renderbegin");
if (lookup->udpsize > -1 || lookup->dnssec || lookup->edns > -1 || if (lookup->udpsize > 0 || lookup->dnssec || lookup->edns > -1 ||
lookup->ecs_addr != NULL) lookup->ecs_addr != NULL)
{ {
#define MAXOPTS (EDNSOPT_OPTIONS + DNS_EDNSOPTIONS) #define MAXOPTS (EDNSOPT_OPTIONS + DNS_EDNSOPTIONS)
@@ -2374,11 +2376,11 @@ setup_lookup(dig_lookup_t *lookup) {
* and DNS_EDNSOPTIONS set by other arguments * and DNS_EDNSOPTIONS set by other arguments
* (+nsid, +cookie, etc). * (+nsid, +cookie, etc).
*/ */
if (lookup->udpsize < 0) { if (lookup->udpsize == 0) {
lookup->udpsize = DEFAULT_EDNS_BUFSIZE; lookup->udpsize = 4096;
} }
if (lookup->edns < 0) { if (lookup->edns < 0) {
lookup->edns = DEFAULT_EDNS_VERSION; lookup->edns = 0;
} }
if (lookup->nsid) { if (lookup->nsid) {
@@ -3774,7 +3776,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
goto udp_mismatch; goto udp_mismatch;
} }
dns_message_create(mctx, DNS_MESSAGE_INTENTPARSE, &msg); result = dns_message_create(mctx, DNS_MESSAGE_INTENTPARSE, &msg);
check_result(result, "dns_message_create");
if (tsigkey != NULL) { if (tsigkey != NULL) {
if (l->querysig == NULL) { if (l->querysig == NULL) {
@@ -3814,7 +3817,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
hex_dump(&b); hex_dump(&b);
} }
query->waiting_connect = false; query->waiting_connect = false;
dns_message_detach(&msg); dns_message_destroy(&msg);
isc_event_free(&event); isc_event_free(&event);
clear_query(query); clear_query(query);
cancel_lookup(l); cancel_lookup(l);
@@ -3836,7 +3839,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
dighost_warning("Warning: Opcode mismatch: expected %s, got %s", dighost_warning("Warning: Opcode mismatch: expected %s, got %s",
expect, got); expect, got);
dns_message_detach(&msg); dns_message_destroy(&msg);
if (l->tcp_mode) { if (l->tcp_mode) {
isc_event_free(&event); isc_event_free(&event);
clear_query(query); clear_query(query);
@@ -3888,7 +3891,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
} }
} }
if (!match) { if (!match) {
dns_message_detach(&msg); dns_message_destroy(&msg);
if (l->tcp_mode) { if (l->tcp_mode) {
isc_event_free(&event); isc_event_free(&event);
clear_query(query); clear_query(query);
@@ -3914,7 +3917,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
if (l->trace && l->trace_root) { if (l->trace && l->trace_root) {
n->rdtype = l->qrdtype; n->rdtype = l->qrdtype;
} }
dns_message_detach(&msg); dns_message_destroy(&msg);
isc_event_free(&event); isc_event_free(&event);
clear_query(query); clear_query(query);
cancel_lookup(l); cancel_lookup(l);
@@ -3933,7 +3936,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
if (l->trace && l->trace_root) { if (l->trace && l->trace_root) {
n->rdtype = l->qrdtype; n->rdtype = l->qrdtype;
} }
dns_message_detach(&msg); dns_message_destroy(&msg);
isc_event_free(&event); isc_event_free(&event);
clear_query(query); clear_query(query);
cancel_lookup(l); cancel_lookup(l);
@@ -3957,7 +3960,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
if (l->trace && l->trace_root) { if (l->trace && l->trace_root) {
n->rdtype = l->qrdtype; n->rdtype = l->qrdtype;
} }
dns_message_detach(&msg); dns_message_destroy(&msg);
isc_event_free(&event); isc_event_free(&event);
clear_query(query); clear_query(query);
cancel_lookup(l); cancel_lookup(l);
@@ -3998,7 +4001,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
query->servname); query->servname);
clear_query(query); clear_query(query);
check_next_lookup(l); check_next_lookup(l);
dns_message_detach(&msg); dns_message_destroy(&msg);
isc_event_free(&event); isc_event_free(&event);
UNLOCK_LOOKUP; UNLOCK_LOOKUP;
return; return;
@@ -4131,7 +4134,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
} }
if (l->doing_xfr) { if (l->doing_xfr) {
if (query != l->xfr_q) { if (query != l->xfr_q) {
dns_message_detach(&msg); dns_message_destroy(&msg);
isc_event_free(&event); isc_event_free(&event);
query->waiting_connect = false; query->waiting_connect = false;
UNLOCK_LOOKUP; UNLOCK_LOOKUP;
@@ -4141,7 +4144,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
docancel = check_for_more_data(query, msg, sevent); docancel = check_for_more_data(query, msg, sevent);
} }
if (docancel) { if (docancel) {
dns_message_detach(&msg); dns_message_destroy(&msg);
clear_query(query); clear_query(query);
cancel_lookup(l); cancel_lookup(l);
check_next_lookup(l); check_next_lookup(l);
@@ -4157,14 +4160,14 @@ recv_done(isc_task_t *task, isc_event_t *event) {
} }
if (!query->lookup->ns_search_only || if (!query->lookup->ns_search_only ||
query->lookup->trace_root || docancel) { query->lookup->trace_root || docancel) {
dns_message_detach(&msg); dns_message_destroy(&msg);
cancel_lookup(l); cancel_lookup(l);
} }
clear_query(query); clear_query(query);
check_next_lookup(l); check_next_lookup(l);
} }
if (msg != NULL) { if (msg != NULL) {
dns_message_detach(&msg); dns_message_destroy(&msg);
} }
isc_event_free(&event); isc_event_free(&event);
UNLOCK_LOOKUP; UNLOCK_LOOKUP;
+2 -6
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
@@ -71,10 +71,6 @@
#define SERVER_TIMEOUT 1 #define SERVER_TIMEOUT 1
#define LOOKUP_LIMIT 64 #define LOOKUP_LIMIT 64
#define DEFAULT_EDNS_VERSION 0
#define DEFAULT_EDNS_BUFSIZE 1232
/*% /*%
* Lookup_limit is just a limiter, keeping too many lookups from being * Lookup_limit is just a limiter, keeping too many lookups from being
* created. It's job is mainly to prevent the program from running away * created. It's job is mainly to prevent the program from running away
@@ -145,7 +141,7 @@ struct dig_lookup {
dig_query_t *xfr_q; dig_query_t *xfr_q;
uint32_t retries; uint32_t retries;
int nsfound; int nsfound;
int16_t udpsize; uint16_t udpsize;
int16_t edns; int16_t edns;
int16_t padding; int16_t padding;
uint32_t ixfr_serial; uint32_t ixfr_serial;
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+38 -11
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
@@ -22,7 +22,6 @@
#include <isc/netaddr.h> #include <isc/netaddr.h>
#include <isc/parseint.h> #include <isc/parseint.h>
#include <isc/print.h> #include <isc/print.h>
#include <isc/readline.h>
#include <isc/string.h> #include <isc/string.h>
#include <isc/task.h> #include <isc/task.h>
#include <isc/util.h> #include <isc/util.h>
@@ -39,6 +38,22 @@
#include "dighost.h" #include "dighost.h"
#if defined(HAVE_READLINE)
#if defined(HAVE_EDIT_READLINE_READLINE_H)
#include <edit/readline/readline.h>
#if defined(HAVE_EDIT_READLINE_HISTORY_H)
#include <edit/readline/history.h>
#endif /* if defined(HAVE_EDIT_READLINE_HISTORY_H) */
#elif defined(HAVE_EDITLINE_READLINE_H)
#include <editline/readline.h>
#elif defined(HAVE_READLINE_READLINE_H)
#include <readline/readline.h>
#if defined(HAVE_READLINE_HISTORY_H)
#include <readline/history.h>
#endif /* if defined(HAVE_READLINE_HISTORY_H) */
#endif /* if defined(HAVE_EDIT_READLINE_READLINE_H) */
#endif /* if defined(HAVE_READLINE) */
static bool short_form = true, tcpmode = false, tcpmode_set = false, static bool short_form = true, tcpmode = false, tcpmode_set = false,
identify = false, stats = true, comments = true, identify = false, stats = true, comments = true,
section_question = true, section_answer = true, section_question = true, section_answer = true,
@@ -772,6 +787,7 @@ addlookup(char *opt) {
lookup->recurse = recurse; lookup->recurse = recurse;
lookup->aaonly = aaonly; lookup->aaonly = aaonly;
lookup->retries = tries; lookup->retries = tries;
lookup->udpsize = 0;
lookup->setqid = false; lookup->setqid = false;
lookup->qid = 0; lookup->qid = 0;
lookup->comments = comments; lookup->comments = comments;
@@ -832,27 +848,38 @@ do_next_command(char *input) {
static void static void
get_next_command(void) { get_next_command(void) {
char cmdlinebuf[COMMSIZE]; char *buf;
char *cmdline, *ptr = NULL; char *ptr;
fflush(stdout);
buf = isc_mem_allocate(mctx, COMMSIZE);
isc_app_block(); isc_app_block();
if (interactive) { if (interactive) {
cmdline = ptr = readline("> "); #ifdef HAVE_READLINE
if (ptr != NULL && *ptr != 0) { ptr = readline("> ");
if (ptr != NULL) {
add_history(ptr); add_history(ptr);
} }
#else /* ifdef HAVE_READLINE */
fprintf(stderr, "> ");
fflush(stderr);
ptr = fgets(buf, COMMSIZE, stdin);
#endif /* ifdef HAVE_READLINE */
} else { } else {
cmdline = fgets(cmdlinebuf, COMMSIZE, stdin); ptr = fgets(buf, COMMSIZE, stdin);
} }
isc_app_unblock(); isc_app_unblock();
if (cmdline == NULL) { if (ptr == NULL) {
in_use = false; in_use = false;
} else { } else {
do_next_command(cmdline); do_next_command(ptr);
} }
if (ptr != NULL) { #ifdef HAVE_READLINE
if (interactive) {
free(ptr); free(ptr);
} }
#endif /* ifdef HAVE_READLINE */
isc_mem_free(mctx, buf);
} }
ISC_NORETURN static void ISC_NORETURN static void
@@ -935,7 +962,7 @@ flush_lookup_list(void) {
isc_mem_free(mctx, sp); isc_mem_free(mctx, sp);
} }
if (l->sendmsg != NULL) { if (l->sendmsg != NULL) {
dns_message_detach(&l->sendmsg); dns_message_destroy(&l->sendmsg);
} }
lp = l; lp = l;
l = ISC_LIST_NEXT(l, link); l = ISC_LIST_NEXT(l, link);
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+3 -3
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
@@ -37,8 +37,8 @@ Description
~~~~~~~~~~~ ~~~~~~~~~~~
``dnssec-importkey`` reads a public DNSKEY record and generates a pair ``dnssec-importkey`` reads a public DNSKEY record and generates a pair
of .key/.private files. The DNSKEY record may be read from an of .key/.private files. The DNSKEY record may be read from an existing
existing .key file, in which case a corresponding .private file is .key file, in which case a corresponding .private file is
generated, or it may be read from any other file or from the standard generated, or it may be read from any other file or from the standard
input, in which case both .key and .private files are generated. input, in which case both .key and .private files are generated.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+1 -66
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
@@ -75,8 +75,6 @@ usage(void) {
fprintf(stderr, "Timing options:\n"); fprintf(stderr, "Timing options:\n");
fprintf(stderr, " -P date/[+-]offset/none: set/unset key " fprintf(stderr, " -P date/[+-]offset/none: set/unset key "
"publication date\n"); "publication date\n");
fprintf(stderr, " -P ds date/[+-]offset/none: set/unset "
"DS publication date\n");
fprintf(stderr, " -P sync date/[+-]offset/none: set/unset " fprintf(stderr, " -P sync date/[+-]offset/none: set/unset "
"CDS and CDNSKEY publication date\n"); "CDS and CDNSKEY publication date\n");
fprintf(stderr, " -A date/[+-]offset/none: set/unset key " fprintf(stderr, " -A date/[+-]offset/none: set/unset key "
@@ -87,8 +85,6 @@ usage(void) {
"inactivation date\n"); "inactivation date\n");
fprintf(stderr, " -D date/[+-]offset/none: set/unset key " fprintf(stderr, " -D date/[+-]offset/none: set/unset key "
"deletion date\n"); "deletion date\n");
fprintf(stderr, " -D ds date/[+-]offset/none: set/unset "
"DS deletion date\n");
fprintf(stderr, " -D sync date/[+-]offset/none: set/unset " fprintf(stderr, " -D sync date/[+-]offset/none: set/unset "
"CDS and CDNSKEY deletion date\n"); "CDS and CDNSKEY deletion date\n");
fprintf(stderr, " -S <key>: generate a successor to an existing " fprintf(stderr, " -S <key>: generate a successor to an existing "
@@ -247,10 +243,6 @@ main(int argc, char **argv) {
bool unsetsyncadd = false, setsyncadd = false; bool unsetsyncadd = false, setsyncadd = false;
bool unsetsyncdel = false, setsyncdel = false; bool unsetsyncdel = false, setsyncdel = false;
bool printsyncadd = false, printsyncdel = false; bool printsyncadd = false, printsyncdel = false;
isc_stdtime_t dsadd = 0, dsdel = 0;
bool unsetdsadd = false, setdsadd = false;
bool unsetdsdel = false, setdsdel = false;
bool printdsadd = false, printdsdel = false;
options = DST_TYPE_PUBLIC | DST_TYPE_PRIVATE | DST_TYPE_STATE; options = DST_TYPE_PUBLIC | DST_TYPE_PRIVATE | DST_TYPE_STATE;
@@ -298,18 +290,6 @@ main(int argc, char **argv) {
unsetsyncdel = !setsyncdel; unsetsyncdel = !setsyncdel;
break; break;
} }
/* -Dds ? */
if (isoptarg("ds", argv, usage)) {
if (unsetdsdel || setdsdel) {
fatal("-D ds specified more than once");
}
changed = true;
dsdel = strtotime(isc_commandline_argument, now,
now, &setdsdel);
unsetdsdel = !setdsdel;
break;
}
/* -Ddnskey ? */ /* -Ddnskey ? */
(void)isoptarg("dnskey", argv, usage); (void)isoptarg("dnskey", argv, usage);
if (setdel || unsetdel) { if (setdel || unsetdel) {
@@ -414,19 +394,6 @@ main(int argc, char **argv) {
unsetsyncadd = !setsyncadd; unsetsyncadd = !setsyncadd;
break; break;
} }
/* -Pds ? */
if (isoptarg("ds", argv, usage)) {
if (unsetdsadd || setdsadd) {
fatal("-P ds specified more than once");
}
changed = true;
dsadd = strtotime(isc_commandline_argument, now,
now, &setdsadd);
unsetdsadd = !setdsadd;
break;
}
/* -Pdnskey ? */
(void)isoptarg("dnskey", argv, usage); (void)isoptarg("dnskey", argv, usage);
if (setpub || unsetpub) { if (setpub || unsetpub) {
fatal("-P specified more than once"); fatal("-P specified more than once");
@@ -448,8 +415,6 @@ main(int argc, char **argv) {
printdel = true; printdel = true;
printsyncadd = true; printsyncadd = true;
printsyncdel = true; printsyncdel = true;
printdsadd = true;
printdsdel = true;
break; break;
} }
@@ -467,11 +432,6 @@ main(int argc, char **argv) {
printsyncdel = true; printsyncdel = true;
break; break;
} }
if (!strncmp(p, "ds", 2)) {
p += 2;
printdsdel = true;
break;
}
printdel = true; printdel = true;
break; break;
case 'I': case 'I':
@@ -483,11 +443,6 @@ main(int argc, char **argv) {
printsyncadd = true; printsyncadd = true;
break; break;
} }
if (!strncmp(p, "ds", 2)) {
p += 2;
printdsadd = true;
break;
}
printpub = true; printpub = true;
break; break;
case 'R': case 'R':
@@ -822,18 +777,6 @@ main(int argc, char **argv) {
dst_key_unsettime(key, DST_TIME_SYNCDELETE); dst_key_unsettime(key, DST_TIME_SYNCDELETE);
} }
if (setdsadd) {
dst_key_settime(key, DST_TIME_DSPUBLISH, dsadd);
} else if (unsetdsadd) {
dst_key_unsettime(key, DST_TIME_DSPUBLISH);
}
if (setdsdel) {
dst_key_settime(key, DST_TIME_DSDELETE, dsdel);
} else if (unsetdsdel) {
dst_key_unsettime(key, DST_TIME_DSDELETE);
}
if (setttl) { if (setttl) {
dst_key_setttl(key, ttl); dst_key_setttl(key, ttl);
} }
@@ -951,14 +894,6 @@ main(int argc, char **argv) {
stdout); stdout);
} }
if (printdsadd) {
printtime(key, DST_TIME_DSPUBLISH, "DS Publish", epoch, stdout);
}
if (printdsdel) {
printtime(key, DST_TIME_DSDELETE, "DS Delete", epoch, stdout);
}
if (changed) { if (changed) {
writekey(key, directory, write_state); writekey(key, directory, write_state);
if (predecessor != NULL && prevkey != NULL) { if (predecessor != NULL && prevkey != NULL) {
+10 -19
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
@@ -29,7 +29,7 @@ dnssec-settime: set the key timing metadata for a DNSSEC key
Synopsis Synopsis
~~~~~~~~ ~~~~~~~~
:program:`dnssec-settime` [**-f**] [**-K** directory] [**-L** ttl] [**-P** date/offset] [**-P** ds date/offset] [**-P** sync date/offset] [**-A** date/offset] [**-R** date/offset] [**-I** date/offset] [**-D** date/offset] [**-D** ds date/offset] [**-D** sync date/offset] [**-S** key] [**-i** interval] [**-h**] [**-V**] [**-v** level] [**-E** engine] {keyfile} [**-s**] [**-g** state] [**-d** state date/offset] [**-k** state date/offset] [**-r** state date/offset] [**-z** state date/offset] :program:`dnssec-settime` [**-f**] [**-K** directory] [**-L** ttl] [**-P** date/offset] [**-P** sync date/offset] [**-A** date/offset] [**-R** date/offset] [**-I** date/offset] [**-D** date/offset] [**-D** sync date/offset] [**-S** key] [**-i** interval] [**-h**] [**-V**] [**-v** level] [**-E** engine] {keyfile} [**-s**] [**-g** state] [**-d** state date/offset] [**-k** state date/offset] [**-r** state date/offset] [**-z** state date/offset]
Description Description
~~~~~~~~~~~ ~~~~~~~~~~~
@@ -126,10 +126,6 @@ explicitly prevent a date from being set, use ``none`` or ``never``.
that date, the key is included in the zone but is not used that date, the key is included in the zone but is not used
to sign it. to sign it.
``-P ds date/offset``
This option sets the date on which DS records that match this key have been
seen in the parent zone.
``-P sync date/offset`` ``-P sync date/offset``
This option sets the date on which CDS and CDNSKEY records that match this key This option sets the date on which CDS and CDNSKEY records that match this key
are to be published to the zone. are to be published to the zone.
@@ -153,10 +149,6 @@ explicitly prevent a date from being set, use ``none`` or ``never``.
key is no longer included in the zone. (However, it may remain in the key key is no longer included in the zone. (However, it may remain in the key
repository.) repository.)
``-D ds date/offset``
This option sets the date on which the DS records that match this key have
been seen removed from the parent zone.
``-D sync date/offset`` ``-D sync date/offset``
This option sets the date on which the CDS and CDNSKEY records that match this This option sets the date on which the CDS and CDNSKEY records that match this
key are to be deleted. key are to be deleted.
@@ -223,16 +215,15 @@ associated with a key.
``-u`` ``-u``
This option indicates that times should be printed in Unix epoch format. This option indicates that times should be printed in Unix epoch format.
``-p C/P/Pds/Psync/A/R/I/D/Dds/Dsync/all`` ``-p C/P/Psync/A/R/I/D/Dsync/all``
This option prints a specific metadata value or set of metadata values. This option prints a specific metadata value or set of metadata values. The ``-p``
The ``-p`` option may be followed by one or more of the following letters or option may be followed by one or more of the following letters or
strings to indicate which value or values to print: ``C`` for the strings to indicate which value or values to print: ``C`` for the
creation date, ``P`` for the publication date, ``Pds` for the DS publication creation date, ``P`` for the publication date, ``Psync`` for the CDS
date, ``Psync`` for the CDS and CDNSKEY publication date, ``A`` for the and CDNSKEY publication date, ``A`` for the activation date, ``R``
activation date, ``R`` for the revocation date, ``I`` for the inactivation for the revocation date, ``I`` for the inactivation date, ``D`` for
date, ``D`` for the deletion date, ``Dds`` for the DS deletion date, the deletion date, and ``Dsync`` for the CDS and CDNSKEY deletion
and ``Dsync`` for the CDS and CDNSKEY deletion date. To print all of the date. To print all of the metadata, use ``all``.
metadata, use ``all``.
See Also See Also
~~~~~~~~ ~~~~~~~~
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
-2
View File
@@ -15,7 +15,6 @@ AM_CPPFLAGS += \
$(LMDB_CFLAGS) \ $(LMDB_CFLAGS) \
$(MAXMINDDB_CFLAGS) \ $(MAXMINDDB_CFLAGS) \
$(DNSTAP_CFLAGS) \ $(DNSTAP_CFLAGS) \
$(LIBUV_CFLAGS) \
$(ZLIB_CFLAGS) $(ZLIB_CFLAGS)
if HAVE_JSON_C if HAVE_JSON_C
@@ -103,7 +102,6 @@ named_LDADD = \
$(LMDB_LIBS) \ $(LMDB_LIBS) \
$(MAXMINDDB_LIBS) \ $(MAXMINDDB_LIBS) \
$(DNSTAP_LIBS) \ $(DNSTAP_LIBS) \
$(LIBUV_LIBS) \
$(LIBXML2_LIBS) \ $(LIBXML2_LIBS) \
$(ZLIB_LIBS) $(ZLIB_LIBS)
+1 -1
View File
@@ -4,7 +4,7 @@
- -
- This Source Code Form is subject to the terms of the Mozilla Public - This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this - License, v. 2.0. If a copy of the MPL was not distributed with this
- file, you can obtain one at https://mozilla.org/MPL/2.0/. - file, You can obtain one at http://mozilla.org/MPL/2.0/.
- -
- See the COPYRIGHT file distributed with this work for additional - See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership. - information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+4 -5
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
@@ -59,7 +59,7 @@ options {\n\
# directory <none>\n\ # directory <none>\n\
dnssec-policy \"none\";\n\ dnssec-policy \"none\";\n\
dump-file \"named_dump.db\";\n\ dump-file \"named_dump.db\";\n\
edns-udp-size 1232;\n\ edns-udp-size 4096;\n\
# fake-iquery <obsolete>;\n" # fake-iquery <obsolete>;\n"
#ifndef WIN32 #ifndef WIN32
" files unlimited;\n" " files unlimited;\n"
@@ -83,11 +83,11 @@ options {\n\
match-mapped-addresses no;\n\ match-mapped-addresses no;\n\
max-ixfr-ratio 100%;\n\ max-ixfr-ratio 100%;\n\
max-rsa-exponent-size 0; /* no limit */\n\ max-rsa-exponent-size 0; /* no limit */\n\
max-udp-size 1232;\n\ max-udp-size 4096;\n\
memstatistics-file \"named.memstats\";\n\ memstatistics-file \"named.memstats\";\n\
# multiple-cnames <obsolete>;\n\ # multiple-cnames <obsolete>;\n\
# named-xfer <obsolete>;\n\ # named-xfer <obsolete>;\n\
nocookie-udp-size 1232;\n\ nocookie-udp-size 4096;\n\
notify-rate 20;\n\ notify-rate 20;\n\
nta-lifetime 3600;\n\ nta-lifetime 3600;\n\
nta-recheck 300;\n\ nta-recheck 300;\n\
@@ -196,7 +196,6 @@ options {\n\
# sortlist <none>\n\ # sortlist <none>\n\
stale-answer-enable false;\n\ stale-answer-enable false;\n\
stale-answer-ttl 1; /* 1 second */\n\ stale-answer-ttl 1; /* 1 second */\n\
stale-cache-enable false;\n\
synth-from-dnssec no;\n\ synth-from-dnssec no;\n\
# topology <none>\n\ # topology <none>\n\
transfer-format many-answers;\n\ transfer-format many-answers;\n\
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+504 -480
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -2
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
@@ -143,7 +143,6 @@ EXTERN bool named_g_memstatistics INIT(false);
EXTERN bool named_g_keepstderr INIT(false); EXTERN bool named_g_keepstderr INIT(false);
EXTERN unsigned int named_g_tat_interval INIT(24 * 3600); EXTERN unsigned int named_g_tat_interval INIT(24 * 3600);
EXTERN unsigned int named_g_maxcachesize INIT(0);
#if defined(HAVE_GEOIP2) #if defined(HAVE_GEOIP2)
EXTERN dns_geoip_databases_t *named_g_geoip INIT(NULL); EXTERN dns_geoip_databases_t *named_g_geoip INIT(NULL);
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+4 -4
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
@@ -38,8 +38,6 @@
#define NAMED_EVENTCLASS ISC_EVENTCLASS(0x4E43) #define NAMED_EVENTCLASS ISC_EVENTCLASS(0x4E43)
#define NAMED_EVENT_RELOAD (NAMED_EVENTCLASS + 0) #define NAMED_EVENT_RELOAD (NAMED_EVENTCLASS + 0)
#define NAMED_EVENT_DELZONE (NAMED_EVENTCLASS + 1) #define NAMED_EVENT_DELZONE (NAMED_EVENTCLASS + 1)
#define NAMED_EVENT_COMMAND (NAMED_EVENTCLASS + 2)
#define NAMED_EVENT_TATSEND (NAMED_EVENTCLASS + 3)
/*% /*%
* Name server state. Better here than in lots of separate global variables. * Name server state. Better here than in lots of separate global variables.
@@ -82,7 +80,9 @@ struct named_server {
uint32_t interface_interval; uint32_t interface_interval;
uint32_t heartbeat_interval; uint32_t heartbeat_interval;
atomic_int reload_status; isc_mutex_t reload_event_lock;
isc_event_t * reload_event;
named_reload_t reload_status;
bool flushonshutdown; bool flushonshutdown;
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -7
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
@@ -16,7 +16,6 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <uv.h>
#include <isc/app.h> #include <isc/app.h>
#include <isc/attributes.h> #include <isc/attributes.h>
@@ -526,9 +525,6 @@ printversion(bool verbose) {
printf("linked to OpenSSL version: %s\n", printf("linked to OpenSSL version: %s\n",
SSLeay_version(SSLEAY_VERSION)); SSLeay_version(SSLEAY_VERSION));
#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ #endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
printf("compiled with libuv version: %d.%d.%d\n", UV_VERSION_MAJOR,
UV_VERSION_MINOR, UV_VERSION_PATCH);
printf("linked to libuv version: %s\n", uv_version_string());
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
printf("compiled with libxml2 version: %s\n", LIBXML_DOTTED_VERSION); printf("compiled with libxml2 version: %s\n", LIBXML_DOTTED_VERSION);
printf("linked to libxml2 version: %s\n", xmlParserVersion); printf("linked to libxml2 version: %s\n", xmlParserVersion);
@@ -650,8 +646,6 @@ parse_T_opt(char *option) {
named_g_nosyslog = true; named_g_nosyslog = true;
} else if (!strcmp(option, "notcp")) { } else if (!strcmp(option, "notcp")) {
notcp = true; notcp = true;
} else if (!strncmp(option, "maxcachesize=", 13)) {
named_g_maxcachesize = atoi(option + 13);
} else if (!strcmp(option, "maxudp512")) { } else if (!strcmp(option, "maxudp512")) {
maxudp = 512; maxudp = 512;
} else if (!strcmp(option, "maxudp1460")) { } else if (!strcmp(option, "maxudp1460")) {
+3 -4
View File
@@ -68,6 +68,7 @@ DNSSEC-POLICY
max-zone-ttl duration; max-zone-ttl duration;
parent-ds-ttl duration; parent-ds-ttl duration;
parent-propagation-delay duration; parent-propagation-delay duration;
parent-registration-delay duration;
publish-safety duration; publish-safety duration;
retire-safety duration; retire-safety duration;
signatures-refresh duration; signatures-refresh duration;
@@ -257,7 +258,7 @@ OPTIONS
fstrm-set-output-queue-size integer; fstrm-set-output-queue-size integer;
fstrm-set-reopen-interval duration; fstrm-set-reopen-interval duration;
geoip-directory ( quoted_string | none ); geoip-directory ( quoted_string | none );
glue-cache boolean;// deprecated glue-cache boolean;
heartbeat-interval integer; heartbeat-interval integer;
hostname ( quoted_string | none ); hostname ( quoted_string | none );
inline-signing boolean; inline-signing boolean;
@@ -400,7 +401,6 @@ OPTIONS
stacksize ( default | unlimited | sizeval ); stacksize ( default | unlimited | sizeval );
stale-answer-enable boolean; stale-answer-enable boolean;
stale-answer-ttl duration; stale-answer-ttl duration;
stale-cache-enable boolean;
startup-notify-rate integer; startup-notify-rate integer;
statistics-file quoted_string; statistics-file quoted_string;
synth-from-dnssec boolean; synth-from-dnssec boolean;
@@ -624,7 +624,7 @@ VIEW
forward ( first | only ); forward ( first | only );
forwarders [ port integer ] [ dscp integer ] { ( ipv4_address forwarders [ port integer ] [ dscp integer ] { ( ipv4_address
| ipv6_address ) [ port integer ] [ dscp integer ]; ... }; | ipv6_address ) [ port integer ] [ dscp integer ]; ... };
glue-cache boolean;// deprecated glue-cache boolean;
inline-signing boolean; inline-signing boolean;
ixfr-from-differences ( primary | master | secondary | slave | ixfr-from-differences ( primary | master | secondary | slave |
boolean ); boolean );
@@ -785,7 +785,6 @@ VIEW
sortlist { address_match_element; ... }; sortlist { address_match_element; ... };
stale-answer-enable boolean; stale-answer-enable boolean;
stale-answer-ttl duration; stale-answer-ttl duration;
stale-cache-enable boolean;
synth-from-dnssec boolean; synth-from-dnssec boolean;
transfer-format ( many-answers | one-answer ); transfer-format ( many-answers | one-answer );
transfer-source ( ipv4_address | * ) [ port ( integer | * ) ] [ transfer-source ( ipv4_address | * ) [ port ( integer | * ) ] [
+1 -1
View File
@@ -3,7 +3,7 @@
This Source Code Form is subject to the terms of the Mozilla Public This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/. file, You can obtain one at http://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership. information regarding copyright ownership.
+137 -448
View File
File diff suppressed because it is too large Load Diff
+294 -172
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
@@ -22,6 +22,7 @@
#include <isc/socket.h> #include <isc/socket.h>
#include <isc/stats.h> #include <isc/stats.h>
#include <isc/string.h> #include <isc/string.h>
#include <isc/task.h>
#include <isc/util.h> #include <isc/util.h>
#include <dns/cache.h> #include <dns/cache.h>
@@ -53,14 +54,6 @@
#include "xsl_p.h" #include "xsl_p.h"
#define CHECK(m) \
do { \
result = (m); \
if (result != ISC_R_SUCCESS) { \
goto cleanup; \
} \
} while (0)
struct named_statschannel { struct named_statschannel {
/* Unlocked */ /* Unlocked */
isc_httpdmgr_t *httpdmgr; isc_httpdmgr_t *httpdmgr;
@@ -177,11 +170,11 @@ static const char *gluecachestats_xmldesc[dns_gluecachestatscounter_max];
#define gluecachestats_xmldesc NULL #define gluecachestats_xmldesc NULL
#endif /* EXTENDED_STATS */ #endif /* EXTENDED_STATS */
#define TRY0(a) \ #define TRY0(a) \
do { \ do { \
xmlrc = (a); \ xmlrc = (a); \
if (xmlrc < 0) \ if (xmlrc < 0) \
goto cleanup; \ goto error; \
} while (0) } while (0)
/*% /*%
@@ -1431,7 +1424,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
} }
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
cleanup: error:
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"failed at dump_counters()"); "failed at dump_counters()");
@@ -1493,7 +1486,7 @@ rdtypestat_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
} }
return; return;
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
cleanup: error:
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"failed at rdtypestat_dump()"); "failed at rdtypestat_dump()");
@@ -1581,7 +1574,7 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
} }
return; return;
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
cleanup: error:
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"failed at rdatasetstats_dump()"); "failed at rdatasetstats_dump()");
@@ -1636,7 +1629,7 @@ opcodestat_dump(dns_opcode_t code, uint64_t val, void *arg) {
return; return;
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
cleanup: error:
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"failed at opcodestat_dump()"); "failed at opcodestat_dump()");
@@ -1692,7 +1685,7 @@ rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) {
return; return;
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
cleanup: error:
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"failed at rcodestat_dump()"); "failed at rcodestat_dump()");
@@ -1745,7 +1738,7 @@ dnssecsignstat_dump(dns_keytag_t tag, uint64_t val, void *arg) {
} }
return; return;
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
cleanup: error:
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"failed at dnssecsignstat_dump()"); "failed at dnssecsignstat_dump()");
@@ -1779,7 +1772,6 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
int xmlrc; int xmlrc;
stats_dumparg_t dumparg; stats_dumparg_t dumparg;
const char *ztype; const char *ztype;
isc_time_t timestamp;
statlevel = dns_zone_getstatlevel(zone); statlevel = dns_zone_getstatlevel(zone);
if (statlevel == dns_zonestat_none) { if (statlevel == dns_zonestat_none) {
@@ -1822,8 +1814,12 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
* master zones, only include the loaded time. For slave zones, also * master zones, only include the loaded time. For slave zones, also
* include the expires and refresh times. * include the expires and refresh times.
*/ */
isc_time_t timestamp;
CHECK(dns_zone_getloadtime(zone, &timestamp)); result = dns_zone_getloadtime(zone, &timestamp);
if (result != ISC_R_SUCCESS) {
goto error;
}
isc_time_formatISO8601(&timestamp, buf, 64); isc_time_formatISO8601(&timestamp, buf, 64);
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "loaded")); TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "loaded"));
@@ -1831,13 +1827,19 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
TRY0(xmlTextWriterEndElement(writer)); TRY0(xmlTextWriterEndElement(writer));
if (dns_zone_gettype(zone) == dns_zone_slave) { if (dns_zone_gettype(zone) == dns_zone_slave) {
CHECK(dns_zone_getexpiretime(zone, &timestamp)); result = dns_zone_getexpiretime(zone, &timestamp);
if (result != ISC_R_SUCCESS) {
goto error;
}
isc_time_formatISO8601(&timestamp, buf, 64); isc_time_formatISO8601(&timestamp, buf, 64);
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "expires")); TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "expires"));
TRY0(xmlTextWriterWriteString(writer, ISC_XMLCHAR buf)); TRY0(xmlTextWriterWriteString(writer, ISC_XMLCHAR buf));
TRY0(xmlTextWriterEndElement(writer)); TRY0(xmlTextWriterEndElement(writer));
CHECK(dns_zone_getrefreshtime(zone, &timestamp)); result = dns_zone_getrefreshtime(zone, &timestamp);
if (result != ISC_R_SUCCESS) {
goto error;
}
isc_time_formatISO8601(&timestamp, buf, 64); isc_time_formatISO8601(&timestamp, buf, 64);
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "refresh")); TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "refresh"));
TRY0(xmlTextWriterWriteString(writer, ISC_XMLCHAR buf)); TRY0(xmlTextWriterWriteString(writer, ISC_XMLCHAR buf));
@@ -1860,11 +1862,14 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
ISC_XMLCHAR "type", ISC_XMLCHAR "type",
ISC_XMLCHAR "rcode")); ISC_XMLCHAR "rcode"));
CHECK(dump_counters(zonestats, isc_statsformat_xml, result = dump_counters(zonestats, isc_statsformat_xml,
writer, NULL, nsstats_xmldesc, writer, NULL, nsstats_xmldesc,
ns_statscounter_max, nsstats_index, ns_statscounter_max,
nsstat_values, nsstats_index, nsstat_values,
ISC_STATSDUMP_VERBOSE)); ISC_STATSDUMP_VERBOSE);
if (result != ISC_R_SUCCESS) {
goto error;
}
/* counters type="rcode"*/ /* counters type="rcode"*/
TRY0(xmlTextWriterEndElement(writer)); TRY0(xmlTextWriterEndElement(writer));
} }
@@ -1877,12 +1882,15 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
writer, ISC_XMLCHAR "type", writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "gluecache")); ISC_XMLCHAR "gluecache"));
CHECK(dump_counters( result = dump_counters(
gluecachestats, isc_statsformat_xml, writer, gluecachestats, isc_statsformat_xml, writer,
NULL, gluecachestats_xmldesc, NULL, gluecachestats_xmldesc,
dns_gluecachestatscounter_max, dns_gluecachestatscounter_max,
gluecachestats_index, gluecachestats_values, gluecachestats_index, gluecachestats_values,
ISC_STATSDUMP_VERBOSE)); ISC_STATSDUMP_VERBOSE);
if (result != ISC_R_SUCCESS) {
goto error;
}
/* counters type="rcode"*/ /* counters type="rcode"*/
TRY0(xmlTextWriterEndElement(writer)); TRY0(xmlTextWriterEndElement(writer));
} }
@@ -1898,7 +1906,9 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
dumparg.result = ISC_R_SUCCESS; dumparg.result = ISC_R_SUCCESS;
dns_rdatatypestats_dump(rcvquerystats, rdtypestat_dump, dns_rdatatypestats_dump(rcvquerystats, rdtypestat_dump,
&dumparg, 0); &dumparg, 0);
CHECK(dumparg.result); if (dumparg.result != ISC_R_SUCCESS) {
goto error;
}
/* counters type="qtype"*/ /* counters type="qtype"*/
TRY0(xmlTextWriterEndElement(writer)); TRY0(xmlTextWriterEndElement(writer));
@@ -1917,7 +1927,9 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
dns_dnssecsignstats_dump( dns_dnssecsignstats_dump(
dnssecsignstats, dns_dnssecsignstats_sign, dnssecsignstats, dns_dnssecsignstats_sign,
dnssecsignstat_dump, &dumparg, 0); dnssecsignstat_dump, &dumparg, 0);
CHECK(dumparg.result); if (dumparg.result != ISC_R_SUCCESS) {
goto error;
}
/* counters type="dnssec-sign"*/ /* counters type="dnssec-sign"*/
TRY0(xmlTextWriterEndElement(writer)); TRY0(xmlTextWriterEndElement(writer));
@@ -1933,7 +1945,9 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
dns_dnssecsignstats_dump( dns_dnssecsignstats_dump(
dnssecsignstats, dns_dnssecsignstats_refresh, dnssecsignstats, dns_dnssecsignstats_refresh,
dnssecsignstat_dump, &dumparg, 0); dnssecsignstat_dump, &dumparg, 0);
CHECK(dumparg.result); if (dumparg.result != ISC_R_SUCCESS) {
goto error;
}
/* counters type="dnssec-refresh"*/ /* counters type="dnssec-refresh"*/
TRY0(xmlTextWriterEndElement(writer)); TRY0(xmlTextWriterEndElement(writer));
@@ -1943,7 +1957,7 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
TRY0(xmlTextWriterEndElement(writer)); /* zone */ TRY0(xmlTextWriterEndElement(writer)); /* zone */
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
cleanup: error:
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"Failed at zone_xmlrender()"); "Failed at zone_xmlrender()");
@@ -1985,7 +1999,7 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
writer = xmlNewTextWriterDoc(&doc, 0); writer = xmlNewTextWriterDoc(&doc, 0);
if (writer == NULL) { if (writer == NULL) {
goto cleanup; goto error;
} }
TRY0(xmlTextWriterStartDocument(writer, NULL, "UTF-8", NULL)); TRY0(xmlTextWriterStartDocument(writer, NULL, "UTF-8", NULL));
TRY0(xmlTextWriterWritePI(writer, ISC_XMLCHAR "xml-stylesheet", TRY0(xmlTextWriterWritePI(writer, ISC_XMLCHAR "xml-stylesheet",
@@ -2023,7 +2037,9 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
dns_opcodestats_dump(server->sctx->opcodestats, opcodestat_dump, dns_opcodestats_dump(server->sctx->opcodestats, opcodestat_dump,
&dumparg, ISC_STATSDUMP_VERBOSE); &dumparg, ISC_STATSDUMP_VERBOSE);
CHECK(dumparg.result); if (dumparg.result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); TRY0(xmlTextWriterEndElement(writer));
@@ -2033,7 +2049,9 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
dns_rcodestats_dump(server->sctx->rcodestats, rcodestat_dump, dns_rcodestats_dump(server->sctx->rcodestats, rcodestat_dump,
&dumparg, ISC_STATSDUMP_VERBOSE); &dumparg, ISC_STATSDUMP_VERBOSE);
CHECK(dumparg.result); if (dumparg.result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); TRY0(xmlTextWriterEndElement(writer));
@@ -2044,19 +2062,23 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
dumparg.result = ISC_R_SUCCESS; dumparg.result = ISC_R_SUCCESS;
dns_rdatatypestats_dump(server->sctx->rcvquerystats, dns_rdatatypestats_dump(server->sctx->rcvquerystats,
rdtypestat_dump, &dumparg, 0); rdtypestat_dump, &dumparg, 0);
CHECK(dumparg.result); if (dumparg.result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* counters */ TRY0(xmlTextWriterEndElement(writer)); /* counters */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counters")); TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counters"));
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "nsstat")); ISC_XMLCHAR "nsstat"));
CHECK(dump_counters(ns_stats_get(server->sctx->nsstats), result = dump_counters(ns_stats_get(server->sctx->nsstats),
isc_statsformat_xml, writer, NULL, isc_statsformat_xml, writer, NULL,
nsstats_xmldesc, ns_statscounter_max, nsstats_xmldesc, ns_statscounter_max,
nsstats_index, nsstat_values, nsstats_index, nsstat_values,
ISC_STATSDUMP_VERBOSE)); ISC_STATSDUMP_VERBOSE);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* /nsstat */ TRY0(xmlTextWriterEndElement(writer)); /* /nsstat */
@@ -2064,10 +2086,14 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "zonestat")); ISC_XMLCHAR "zonestat"));
CHECK(dump_counters(server->zonestats, isc_statsformat_xml, result = dump_counters(server->zonestats, isc_statsformat_xml,
writer, NULL, zonestats_xmldesc, writer, NULL, zonestats_xmldesc,
dns_zonestatscounter_max, zonestats_index, dns_zonestatscounter_max,
zonestat_values, ISC_STATSDUMP_VERBOSE)); zonestats_index, zonestat_values,
ISC_STATSDUMP_VERBOSE);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* /zonestat */ TRY0(xmlTextWriterEndElement(writer)); /* /zonestat */
@@ -2078,11 +2104,13 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counters")); TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counters"));
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "resstat")); ISC_XMLCHAR "resstat"));
CHECK(dump_counters(server->resolverstats, isc_statsformat_xml, result = dump_counters(
writer, NULL, resstats_xmldesc, server->resolverstats, isc_statsformat_xml, writer,
dns_resstatscounter_max, resstats_index, NULL, resstats_xmldesc, dns_resstatscounter_max,
resstat_values, 0)); resstats_index, resstat_values, 0);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* resstat */ TRY0(xmlTextWriterEndElement(writer)); /* resstat */
#ifdef HAVE_DNSTAP #ifdef HAVE_DNSTAP
@@ -2099,8 +2127,9 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
dnstapstats_xmldesc, dns_dnstapcounter_max, dnstapstats_xmldesc, dns_dnstapcounter_max,
dnstapstats_index, dnstapstat_values, 0); dnstapstats_index, dnstapstat_values, 0);
isc_stats_detach(&dnstapstats); isc_stats_detach(&dnstapstats);
CHECK(result); if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* dnstap */ TRY0(xmlTextWriterEndElement(writer)); /* dnstap */
} }
#endif /* ifdef HAVE_DNSTAP */ #endif /* ifdef HAVE_DNSTAP */
@@ -2111,10 +2140,14 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "sockstat")); ISC_XMLCHAR "sockstat"));
CHECK(dump_counters(server->sockstats, isc_statsformat_xml, result = dump_counters(server->sockstats, isc_statsformat_xml,
writer, NULL, sockstats_xmldesc, writer, NULL, sockstats_xmldesc,
isc_sockstatscounter_max, sockstats_index, isc_sockstatscounter_max,
sockstat_values, ISC_STATSDUMP_VERBOSE)); sockstats_index, sockstat_values,
ISC_STATSDUMP_VERBOSE);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* /sockstat */ TRY0(xmlTextWriterEndElement(writer)); /* /sockstat */
} }
@@ -2128,10 +2161,13 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "request-size")); ISC_XMLCHAR "request-size"));
CHECK(dump_counters( result = dump_counters(
server->sctx->udpinstats4, isc_statsformat_xml, writer, server->sctx->udpinstats4, isc_statsformat_xml, writer,
NULL, udpinsizestats_xmldesc, dns_sizecounter_in_max, NULL, udpinsizestats_xmldesc, dns_sizecounter_in_max,
udpinsizestats_index, udpinsizestat_values, 0)); udpinsizestats_index, udpinsizestat_values, 0);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* </counters> */ TRY0(xmlTextWriterEndElement(writer)); /* </counters> */
@@ -2139,10 +2175,13 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "response-size")); ISC_XMLCHAR "response-size"));
CHECK(dump_counters( result = dump_counters(
server->sctx->udpoutstats4, isc_statsformat_xml, writer, server->sctx->udpoutstats4, isc_statsformat_xml, writer,
NULL, udpoutsizestats_xmldesc, dns_sizecounter_out_max, NULL, udpoutsizestats_xmldesc, dns_sizecounter_out_max,
udpoutsizestats_index, udpoutsizestat_values, 0)); udpoutsizestats_index, udpoutsizestat_values, 0);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* </counters> */ TRY0(xmlTextWriterEndElement(writer)); /* </counters> */
TRY0(xmlTextWriterEndElement(writer)); /* </udp> */ TRY0(xmlTextWriterEndElement(writer)); /* </udp> */
@@ -2152,20 +2191,27 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "request-size")); ISC_XMLCHAR "request-size"));
CHECK(dump_counters( result = dump_counters(
server->sctx->tcpinstats4, isc_statsformat_xml, writer, server->sctx->tcpinstats4, isc_statsformat_xml, writer,
NULL, tcpinsizestats_xmldesc, dns_sizecounter_in_max, NULL, tcpinsizestats_xmldesc, dns_sizecounter_in_max,
tcpinsizestats_index, tcpinsizestat_values, 0)); tcpinsizestats_index, tcpinsizestat_values, 0);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* </counters> */ TRY0(xmlTextWriterEndElement(writer)); /* </counters> */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counters")); TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counters"));
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "response-size")); ISC_XMLCHAR "response-size"));
CHECK(dump_counters( result = dump_counters(
server->sctx->tcpoutstats4, isc_statsformat_xml, writer, server->sctx->tcpoutstats4, isc_statsformat_xml, writer,
NULL, tcpoutsizestats_xmldesc, dns_sizecounter_out_max, NULL, tcpoutsizestats_xmldesc, dns_sizecounter_out_max,
tcpoutsizestats_index, tcpoutsizestat_values, 0)); tcpoutsizestats_index, tcpoutsizestat_values, 0);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* </counters> */ TRY0(xmlTextWriterEndElement(writer)); /* </counters> */
TRY0(xmlTextWriterEndElement(writer)); /* </tcp> */ TRY0(xmlTextWriterEndElement(writer)); /* </tcp> */
@@ -2177,10 +2223,13 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "request-size")); ISC_XMLCHAR "request-size"));
CHECK(dump_counters( result = dump_counters(
server->sctx->udpinstats6, isc_statsformat_xml, writer, server->sctx->udpinstats6, isc_statsformat_xml, writer,
NULL, udpinsizestats_xmldesc, dns_sizecounter_in_max, NULL, udpinsizestats_xmldesc, dns_sizecounter_in_max,
udpinsizestats_index, udpinsizestat_values, 0)); udpinsizestats_index, udpinsizestat_values, 0);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* </counters> */ TRY0(xmlTextWriterEndElement(writer)); /* </counters> */
@@ -2188,10 +2237,13 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "response-size")); ISC_XMLCHAR "response-size"));
CHECK(dump_counters( result = dump_counters(
server->sctx->udpoutstats6, isc_statsformat_xml, writer, server->sctx->udpoutstats6, isc_statsformat_xml, writer,
NULL, udpoutsizestats_xmldesc, dns_sizecounter_out_max, NULL, udpoutsizestats_xmldesc, dns_sizecounter_out_max,
udpoutsizestats_index, udpoutsizestat_values, 0)); udpoutsizestats_index, udpoutsizestat_values, 0);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* </counters> */ TRY0(xmlTextWriterEndElement(writer)); /* </counters> */
TRY0(xmlTextWriterEndElement(writer)); /* </udp> */ TRY0(xmlTextWriterEndElement(writer)); /* </udp> */
@@ -2201,10 +2253,13 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "request-size")); ISC_XMLCHAR "request-size"));
CHECK(dump_counters( result = dump_counters(
server->sctx->tcpinstats6, isc_statsformat_xml, writer, server->sctx->tcpinstats6, isc_statsformat_xml, writer,
NULL, tcpinsizestats_xmldesc, dns_sizecounter_in_max, NULL, tcpinsizestats_xmldesc, dns_sizecounter_in_max,
tcpinsizestats_index, tcpinsizestat_values, 0)); tcpinsizestats_index, tcpinsizestat_values, 0);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* </counters> */ TRY0(xmlTextWriterEndElement(writer)); /* </counters> */
@@ -2212,10 +2267,13 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "response-size")); ISC_XMLCHAR "response-size"));
CHECK(dump_counters( result = dump_counters(
server->sctx->tcpoutstats6, isc_statsformat_xml, writer, server->sctx->tcpoutstats6, isc_statsformat_xml, writer,
NULL, tcpoutsizestats_xmldesc, dns_sizecounter_out_max, NULL, tcpoutsizestats_xmldesc, dns_sizecounter_out_max,
tcpoutsizestats_index, tcpoutsizestat_values, 0)); tcpoutsizestats_index, tcpoutsizestat_values, 0);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* </counters> */ TRY0(xmlTextWriterEndElement(writer)); /* </counters> */
TRY0(xmlTextWriterEndElement(writer)); /* </tcp> */ TRY0(xmlTextWriterEndElement(writer)); /* </tcp> */
@@ -2238,8 +2296,11 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
if ((flags & STATS_XML_ZONES) != 0) { if ((flags & STATS_XML_ZONES) != 0) {
TRY0(xmlTextWriterStartElement(writer, TRY0(xmlTextWriterStartElement(writer,
ISC_XMLCHAR "zones")); ISC_XMLCHAR "zones"));
CHECK(dns_zt_apply(view->zonetable, true, NULL, result = dns_zt_apply(view->zonetable, true, NULL,
zone_xmlrender, writer)); zone_xmlrender, writer);
if (result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* /zones */ TRY0(xmlTextWriterEndElement(writer)); /* /zones */
} }
@@ -2257,7 +2318,9 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
dumparg.result = ISC_R_SUCCESS; dumparg.result = ISC_R_SUCCESS;
dns_rdatatypestats_dump(view->resquerystats, dns_rdatatypestats_dump(view->resquerystats,
rdtypestat_dump, &dumparg, 0); rdtypestat_dump, &dumparg, 0);
CHECK(dumparg.result); if (dumparg.result != ISC_R_SUCCESS) {
goto error;
}
} }
TRY0(xmlTextWriterEndElement(writer)); TRY0(xmlTextWriterEndElement(writer));
@@ -2266,11 +2329,14 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "resstats")); ISC_XMLCHAR "resstats"));
if (view->resstats != NULL) { if (view->resstats != NULL) {
CHECK(dump_counters(view->resstats, isc_statsformat_xml, result = dump_counters(
writer, NULL, resstats_xmldesc, view->resstats, isc_statsformat_xml, writer,
dns_resstatscounter_max, NULL, resstats_xmldesc, dns_resstatscounter_max,
resstats_index, resstat_values, resstats_index, resstat_values,
ISC_STATSDUMP_VERBOSE)); ISC_STATSDUMP_VERBOSE);
if (result != ISC_R_SUCCESS) {
goto error;
}
} }
TRY0(xmlTextWriterEndElement(writer)); /* </resstats> */ TRY0(xmlTextWriterEndElement(writer)); /* </resstats> */
@@ -2284,7 +2350,9 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
dumparg.result = ISC_R_SUCCESS; dumparg.result = ISC_R_SUCCESS;
dns_rdatasetstats_dump(cacherrstats, rdatasetstats_dump, dns_rdatasetstats_dump(cacherrstats, rdatasetstats_dump,
&dumparg, 0); &dumparg, 0);
CHECK(dumparg.result); if (dumparg.result != ISC_R_SUCCESS) {
goto error;
}
TRY0(xmlTextWriterEndElement(writer)); /* cache */ TRY0(xmlTextWriterEndElement(writer)); /* cache */
} }
@@ -2293,11 +2361,14 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR "adbstat")); ISC_XMLCHAR "adbstat"));
if (view->adbstats != NULL) { if (view->adbstats != NULL) {
CHECK(dump_counters(view->adbstats, isc_statsformat_xml, result = dump_counters(
writer, NULL, adbstats_xmldesc, view->adbstats, isc_statsformat_xml, writer,
dns_adbstats_max, adbstats_index, NULL, adbstats_xmldesc, dns_adbstats_max,
adbstat_values, adbstats_index, adbstat_values,
ISC_STATSDUMP_VERBOSE)); ISC_STATSDUMP_VERBOSE);
if (result != ISC_R_SUCCESS) {
goto error;
}
} }
TRY0(xmlTextWriterEndElement(writer)); /* </adbstats> */ TRY0(xmlTextWriterEndElement(writer)); /* </adbstats> */
@@ -2340,12 +2411,12 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
xmlDocDumpFormatMemoryEnc(doc, buf, buflen, "UTF-8", 0); xmlDocDumpFormatMemoryEnc(doc, buf, buflen, "UTF-8", 0);
if (*buf == NULL) { if (*buf == NULL) {
goto cleanup; goto error;
} }
xmlFreeDoc(doc); xmlFreeDoc(doc);
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
cleanup: error:
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"failed generating XML response"); "failed generating XML response");
@@ -2502,11 +2573,18 @@ render_xml_traffic(const char *url, isc_httpdurl_t *urlinfo,
#define STATS_JSON_TRAFFIC 0x20 #define STATS_JSON_TRAFFIC 0x20
#define STATS_JSON_ALL 0xff #define STATS_JSON_ALL 0xff
#define CHECK(m) \
do { \
result = (m); \
if (result != ISC_R_SUCCESS) \
goto error; \
} while (0)
#define CHECKMEM(m) \ #define CHECKMEM(m) \
do { \ do { \
if (m == NULL) { \ if (m == NULL) { \
result = ISC_R_NOMEMORY; \ result = ISC_R_NOMEMORY; \
goto cleanup; \ goto error; \
} \ } \
} while (0) } while (0)
@@ -2586,18 +2664,27 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
isc_time_t timestamp; isc_time_t timestamp;
CHECK(dns_zone_getloadtime(zone, &timestamp)); result = dns_zone_getloadtime(zone, &timestamp);
if (result != ISC_R_SUCCESS) {
goto error;
}
isc_time_formatISO8601(&timestamp, buf, 64); isc_time_formatISO8601(&timestamp, buf, 64);
json_object_object_add(zoneobj, "loaded", json_object_new_string(buf)); json_object_object_add(zoneobj, "loaded", json_object_new_string(buf));
if (dns_zone_gettype(zone) == dns_zone_slave) { if (dns_zone_gettype(zone) == dns_zone_slave) {
CHECK(dns_zone_getexpiretime(zone, &timestamp)); result = dns_zone_getexpiretime(zone, &timestamp);
if (result != ISC_R_SUCCESS) {
goto error;
}
isc_time_formatISO8601(&timestamp, buf, 64); isc_time_formatISO8601(&timestamp, buf, 64);
json_object_object_add(zoneobj, "expires", json_object_object_add(zoneobj, "expires",
json_object_new_string(buf)); json_object_new_string(buf));
CHECK(dns_zone_getrefreshtime(zone, &timestamp)); result = dns_zone_getrefreshtime(zone, &timestamp);
if (result != ISC_R_SUCCESS) {
goto error;
}
isc_time_formatISO8601(&timestamp, buf, 64); isc_time_formatISO8601(&timestamp, buf, 64);
json_object_object_add(zoneobj, "refresh", json_object_object_add(zoneobj, "refresh",
json_object_new_string(buf)); json_object_new_string(buf));
@@ -2616,7 +2703,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
json_object *counters = json_object_new_object(); json_object *counters = json_object_new_object();
if (counters == NULL) { if (counters == NULL) {
result = ISC_R_NOMEMORY; result = ISC_R_NOMEMORY;
goto cleanup; goto error;
} }
result = dump_counters(zonestats, isc_statsformat_json, result = dump_counters(zonestats, isc_statsformat_json,
@@ -2625,7 +2712,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
nsstats_index, nsstat_values, 0); nsstats_index, nsstat_values, 0);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
goto cleanup; goto error;
} }
if (json_object_get_object(counters)->count != 0) { if (json_object_get_object(counters)->count != 0) {
@@ -2641,7 +2728,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
json_object *counters = json_object_new_object(); json_object *counters = json_object_new_object();
if (counters == NULL) { if (counters == NULL) {
result = ISC_R_NOMEMORY; result = ISC_R_NOMEMORY;
goto cleanup; goto error;
} }
result = dump_counters( result = dump_counters(
@@ -2651,7 +2738,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
gluecachestats_index, gluecachestats_values, 0); gluecachestats_index, gluecachestats_values, 0);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
goto cleanup; goto error;
} }
if (json_object_get_object(counters)->count != 0) { if (json_object_get_object(counters)->count != 0) {
@@ -2675,7 +2762,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
&dumparg, 0); &dumparg, 0);
if (dumparg.result != ISC_R_SUCCESS) { if (dumparg.result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
goto cleanup; goto error;
} }
if (json_object_get_object(counters)->count != 0) { if (json_object_get_object(counters)->count != 0) {
@@ -2700,7 +2787,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
dnssecsignstat_dump, &dumparg, 0); dnssecsignstat_dump, &dumparg, 0);
if (dumparg.result != ISC_R_SUCCESS) { if (dumparg.result != ISC_R_SUCCESS) {
json_object_put(sign_counters); json_object_put(sign_counters);
goto cleanup; goto error;
} }
if (json_object_get_object(sign_counters)->count != 0) { if (json_object_get_object(sign_counters)->count != 0) {
@@ -2722,7 +2809,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
dnssecsignstat_dump, &dumparg, 0); dnssecsignstat_dump, &dumparg, 0);
if (dumparg.result != ISC_R_SUCCESS) { if (dumparg.result != ISC_R_SUCCESS) {
json_object_put(refresh_counters); json_object_put(refresh_counters);
goto cleanup; goto error;
} }
if (json_object_get_object(refresh_counters)->count != if (json_object_get_object(refresh_counters)->count !=
@@ -2740,7 +2827,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
zoneobj = NULL; zoneobj = NULL;
result = ISC_R_SUCCESS; result = ISC_R_SUCCESS;
cleanup: error:
if (zoneobj != NULL) { if (zoneobj != NULL) {
json_object_put(zoneobj); json_object_put(zoneobj);
} }
@@ -2825,7 +2912,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
&dumparg, ISC_STATSDUMP_VERBOSE); &dumparg, ISC_STATSDUMP_VERBOSE);
if (dumparg.result != ISC_R_SUCCESS) { if (dumparg.result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
goto cleanup; goto error;
} }
if (json_object_get_object(counters)->count != 0) { if (json_object_get_object(counters)->count != 0) {
@@ -2844,7 +2931,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
&dumparg, ISC_STATSDUMP_VERBOSE); &dumparg, ISC_STATSDUMP_VERBOSE);
if (dumparg.result != ISC_R_SUCCESS) { if (dumparg.result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
goto cleanup; goto error;
} }
if (json_object_get_object(counters)->count != 0) { if (json_object_get_object(counters)->count != 0) {
@@ -2863,7 +2950,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
rdtypestat_dump, &dumparg, 0); rdtypestat_dump, &dumparg, 0);
if (dumparg.result != ISC_R_SUCCESS) { if (dumparg.result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
goto cleanup; goto error;
} }
if (json_object_get_object(counters)->count != 0) { if (json_object_get_object(counters)->count != 0) {
@@ -2884,7 +2971,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
nsstats_index, nsstat_values, 0); nsstats_index, nsstat_values, 0);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
goto cleanup; goto error;
} }
if (json_object_get_object(counters)->count != 0) { if (json_object_get_object(counters)->count != 0) {
@@ -2905,7 +2992,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
zonestats_index, zonestat_values, 0); zonestats_index, zonestat_values, 0);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
goto cleanup; goto error;
} }
if (json_object_get_object(counters)->count != 0) { if (json_object_get_object(counters)->count != 0) {
@@ -2927,7 +3014,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
resstats_index, resstat_values, 0); resstats_index, resstat_values, 0);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
goto cleanup; goto error;
} }
if (json_object_get_object(counters)->count != 0) { if (json_object_get_object(counters)->count != 0) {
@@ -2952,7 +3039,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
isc_stats_detach(&dnstapstats); isc_stats_detach(&dnstapstats);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
goto cleanup; goto error;
} }
if (json_object_get_object(counters)->count != 0) { if (json_object_get_object(counters)->count != 0) {
@@ -2982,8 +3069,12 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
CHECKMEM(za); CHECKMEM(za);
if ((flags & STATS_JSON_ZONES) != 0) { if ((flags & STATS_JSON_ZONES) != 0) {
CHECK(dns_zt_apply(view->zonetable, true, NULL, result = dns_zt_apply(view->zonetable, true,
zone_jsonrender, za)); NULL, zone_jsonrender,
za);
if (result != ISC_R_SUCCESS) {
goto error;
}
} }
if (json_object_array_length(za) != 0) { if (json_object_array_length(za) != 0) {
@@ -3016,7 +3107,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
result = dumparg.result; result = dumparg.result;
goto cleanup; goto error;
} }
json_object_object_add(res, "stats", json_object_object_add(res, "stats",
@@ -3036,7 +3127,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
if (dumparg.result != ISC_R_SUCCESS) { if (dumparg.result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
result = dumparg.result; result = dumparg.result;
goto cleanup; goto error;
} }
json_object_object_add(res, "qtypes", json_object_object_add(res, "qtypes",
@@ -3056,7 +3147,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
if (dumparg.result != ISC_R_SUCCESS) { if (dumparg.result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
result = dumparg.result; result = dumparg.result;
goto cleanup; goto error;
} }
json_object_object_add(res, "cache", json_object_object_add(res, "cache",
@@ -3070,7 +3161,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
counters); counters);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
goto cleanup; goto error;
} }
json_object_object_add(res, "cachestats", json_object_object_add(res, "cachestats",
@@ -3091,7 +3182,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
result = dumparg.result; result = dumparg.result;
goto cleanup; goto error;
} }
json_object_object_add(res, "adb", json_object_object_add(res, "adb",
@@ -3117,7 +3208,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
sockstats_index, sockstat_values, 0); sockstats_index, sockstat_values, 0);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(counters); json_object_put(counters);
goto cleanup; goto error;
} }
if (json_object_get_object(counters)->count != 0) { if (json_object_get_object(counters)->count != 0) {
@@ -3133,7 +3224,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
result = isc_socketmgr_renderjson(named_g_socketmgr, sockets); result = isc_socketmgr_renderjson(named_g_socketmgr, sockets);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(sockets); json_object_put(sockets);
goto cleanup; goto error;
} }
json_object_object_add(bindstats, "socketmgr", sockets); json_object_object_add(bindstats, "socketmgr", sockets);
@@ -3146,7 +3237,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
result = isc_taskmgr_renderjson(named_g_taskmgr, tasks); result = isc_taskmgr_renderjson(named_g_taskmgr, tasks);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(tasks); json_object_put(tasks);
goto cleanup; goto error;
} }
json_object_object_add(bindstats, "taskmgr", tasks); json_object_object_add(bindstats, "taskmgr", tasks);
@@ -3159,7 +3250,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
result = isc_mem_renderjson(memory); result = isc_mem_renderjson(memory);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
json_object_put(memory); json_object_put(memory);
goto cleanup; goto error;
} }
json_object_object_add(bindstats, "memory", memory); json_object_object_add(bindstats, "memory", memory);
@@ -3284,7 +3375,7 @@ generatejson(named_server_t *server, size_t *msglen, const char **msg,
result = ISC_R_SUCCESS; result = ISC_R_SUCCESS;
cleanup: error:
if (udpreq4 != NULL) { if (udpreq4 != NULL) {
json_object_put(udpreq4); json_object_put(udpreq4);
} }
@@ -3563,7 +3654,7 @@ client_ok(const isc_sockaddr_t *fromaddr, void *arg) {
static void static void
destroy_listener(void *arg) { destroy_listener(void *arg) {
named_statschannel_t *listener = (named_statschannel_t *)arg; named_statschannel_t *listener = arg;
REQUIRE(listener != NULL); REQUIRE(listener != NULL);
REQUIRE(!ISC_LINK_LINKED(listener, link)); REQUIRE(!ISC_LINK_LINKED(listener, link));
@@ -3581,15 +3672,22 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx, isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx,
const char *socktext) { const char *socktext) {
isc_result_t result; isc_result_t result;
named_statschannel_t *listener = NULL; named_statschannel_t *listener;
const cfg_obj_t *allow = NULL; isc_task_t *task = NULL;
isc_socket_t *sock = NULL;
const cfg_obj_t *allow;
dns_acl_t *new_acl = NULL; dns_acl_t *new_acl = NULL;
int pf;
listener = isc_mem_get(server->mctx, sizeof(*listener)); listener = isc_mem_get(server->mctx, sizeof(*listener));
*listener = (named_statschannel_t){ .address = *addr };
listener->httpdmgr = NULL;
listener->address = *addr;
listener->acl = NULL;
listener->mctx = NULL;
ISC_LINK_INIT(listener, link); ISC_LINK_INIT(listener, link);
isc_mutex_init(&listener->lock); isc_mutex_init(&listener->lock);
isc_mem_attach(server->mctx, &listener->mctx); isc_mem_attach(server->mctx, &listener->mctx);
allow = cfg_tuple_get(listen_params, "allow"); allow = cfg_tuple_get(listen_params, "allow");
@@ -3600,80 +3698,104 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
} else { } else {
result = dns_acl_any(listener->mctx, &new_acl); result = dns_acl_any(listener->mctx, &new_acl);
} }
CHECK(result); if (result != ISC_R_SUCCESS) {
goto cleanup;
}
dns_acl_attach(new_acl, &listener->acl); dns_acl_attach(new_acl, &listener->acl);
dns_acl_detach(&new_acl); dns_acl_detach(&new_acl);
pf = isc_sockaddr_pf(&listener->address); result = isc_task_create(named_g_taskmgr, 0, &task);
if ((pf == AF_INET && isc_net_probeipv4() != ISC_R_SUCCESS) || if (result != ISC_R_SUCCESS) {
(pf == AF_INET6 && isc_net_probeipv6() != ISC_R_SUCCESS)) goto cleanup;
{ }
CHECK(ISC_R_FAMILYNOSUPPORT); isc_task_setname(task, "statchannel", NULL);
result = isc_socket_create(named_g_socketmgr, isc_sockaddr_pf(addr),
isc_sockettype_tcp, &sock);
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
isc_socket_setname(sock, "statchannel", NULL);
#ifndef ISC_ALLOW_MAPPED
isc_socket_ipv6only(sock, true);
#endif /* ifndef ISC_ALLOW_MAPPED */
result = isc_socket_bind(sock, addr, ISC_SOCKET_REUSEADDRESS);
if (result != ISC_R_SUCCESS) {
goto cleanup;
} }
CHECK(isc_httpdmgr_create(named_g_nm, server->mctx, addr, client_ok, result = isc_httpdmgr_create(server->mctx, sock, task, client_ok,
destroy_listener, listener, destroy_listener, listener,
&listener->httpdmgr)); named_g_timermgr, &listener->httpdmgr);
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
isc_httpdmgr_addurl(listener->httpdmgr, "/", false, render_xml_all, isc_httpdmgr_addurl(listener->httpdmgr, "/", render_xml_all, server);
isc_httpdmgr_addurl(listener->httpdmgr, "/xml", render_xml_all, server);
isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3", render_xml_all,
server); server);
isc_httpdmgr_addurl(listener->httpdmgr, "/xml", false, render_xml_all, isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/status",
server);
isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3", false,
render_xml_all, server);
isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/status", false,
render_xml_status, server); render_xml_status, server);
isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/server", false, isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/server",
render_xml_server, server); render_xml_server, server);
isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/zones", false, isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/zones",
render_xml_zones, server); render_xml_zones, server);
isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/net", false, isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/net", render_xml_net,
render_xml_net, server); server);
isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/tasks", false, isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/tasks",
render_xml_tasks, server); render_xml_tasks, server);
isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/mem", false, isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/mem", render_xml_mem,
render_xml_mem, server); server);
isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/traffic", false, isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/traffic",
render_xml_traffic, server); render_xml_traffic, server);
#endif /* ifdef HAVE_LIBXML2 */ #endif /* ifdef HAVE_LIBXML2 */
#ifdef HAVE_JSON_C #ifdef HAVE_JSON_C
isc_httpdmgr_addurl(listener->httpdmgr, "/json", false, render_json_all, isc_httpdmgr_addurl(listener->httpdmgr, "/json", render_json_all,
server); server);
isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1", false, isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1", render_json_all,
render_json_all, server); server);
isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/status", false, isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/status",
render_json_status, server); render_json_status, server);
isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/server", false, isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/server",
render_json_server, server); render_json_server, server);
isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/zones", false, isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/zones",
render_json_zones, server); render_json_zones, server);
isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/tasks", false, isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/tasks",
render_json_tasks, server); render_json_tasks, server);
isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/net", false, isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/net", render_json_net,
render_json_net, server); server);
isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/mem", false, isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/mem", render_json_mem,
render_json_mem, server); server);
isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/traffic", false, isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/traffic",
render_json_traffic, server); render_json_traffic, server);
#endif /* ifdef HAVE_JSON_C */ #endif /* ifdef HAVE_JSON_C */
isc_httpdmgr_addurl(listener->httpdmgr, "/bind9.xsl", true, render_xsl, isc_httpdmgr_addurl2(listener->httpdmgr, "/bind9.xsl", true, render_xsl,
server); server);
*listenerp = listener; *listenerp = listener;
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_NOTICE, NAMED_LOGMODULE_SERVER, ISC_LOG_NOTICE,
"statistics channel listening on %s", socktext); "statistics channel listening on %s", socktext);
return (ISC_R_SUCCESS);
cleanup: cleanup:
if (listener->acl != NULL) { if (result != ISC_R_SUCCESS) {
dns_acl_detach(&listener->acl); if (listener->acl != NULL) {
dns_acl_detach(&listener->acl);
}
isc_mutex_destroy(&listener->lock);
isc_mem_putanddetach(&listener->mctx, listener,
sizeof(*listener));
}
if (task != NULL) {
isc_task_detach(&task);
}
if (sock != NULL) {
isc_socket_detach(&sock);
} }
isc_mutex_destroy(&listener->lock);
isc_mem_putanddetach(&listener->mctx, listener, sizeof(*listener));
return (result); return (result);
} }
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.
+4 -4
View File
@@ -67,7 +67,7 @@
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles> <ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>@LIBUV_INC@@OPENSSL_INC@@GSSAPI_INC@@GEOIP_INC@.\;..\..\..\;@LIBXML2_INC@..\win32\include;..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;..\..\..\lib\bind9\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>@OPENSSL_INC@@GSSAPI_INC@@GEOIP_INC@.\;..\..\..\;@LIBXML2_INC@..\win32\include;..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;..\..\..\lib\bind9\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -75,7 +75,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@LIBUV_LIB@@OPENSSL_LIB@@LIBXML2_LIB@@GSSAPI_LIB@@GEOIP_LIB@libisc.lib;libdns.lib;libisccc.lib;libisccfg.lib;libbind9.lib;libns.lib;version.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>@OPENSSL_LIB@@LIBXML2_LIB@@GSSAPI_LIB@@GEOIP_LIB@libisc.lib;libdns.lib;libisccc.lib;libisccfg.lib;libbind9.lib;libns.lib;version.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PreBuildEvent> <PreBuildEvent>
<Command>cd .. <Command>cd ..
@@ -103,7 +103,7 @@ perl -e "print \";\";" &gt;&gt; xsl.c
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles> <ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>@LIBUV_INC@@OPENSSL_INC@@GSSAPI_INC@@GEOIP_INC@.\;..\..\..\;@LIBXML2_INC@..\win32\include;..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;..\..\..\lib\bind9\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>@OPENSSL_INC@@GSSAPI_INC@@GEOIP_INC@.\;..\..\..\;@LIBXML2_INC@..\win32\include;..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;..\..\..\lib\bind9\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -114,7 +114,7 @@ perl -e "print \";\";" &gt;&gt; xsl.c
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@LIBUV_LIB@@OPENSSL_LIB@@LIBXML2_LIB@@GSSAPI_LIB@@GEOIP_LIB@libisc.lib;libdns.lib;libisccc.lib;libisccfg.lib;libbind9.lib;libns.lib;version.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>@OPENSSL_LIB@@LIBXML2_LIB@@GSSAPI_LIB@@GEOIP_LIB@libisc.lib;libdns.lib;libisccc.lib;libisccfg.lib;libbind9.lib;libns.lib;version.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PreBuildEvent> <PreBuildEvent>
<Command>cd .. <Command>cd ..
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
* *
* See the COPYRIGHT file distributed with this work for additional * See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership. * information regarding copyright ownership.

Some files were not shown because too many files have changed in this diff Show More