Compare commits

..
603 Commits
Author SHA1 Message Date
Tinderbox User 3b6c6c88b0 Merge branch 'prep-release' into v9_11 2019-10-02 06:55:45 +00:00
Tinderbox User e21d12ee89 prep 9.11.12 2019-10-02 06:55:33 +00:00
Mark Andrews 2a4a5480f9 Merge branch 'marka-cppcheck-v9_11' into 'v9_11'
Address cppcheck warnings and errors in v9_11

See merge request isc-projects/bind9!2421
2019-10-01 19:54:14 -04:00
Mark Andrews 34a3f41e9e add CHANGES 2019-10-02 09:25:00 +10:00
Ondřej SurýandMark Andrews 66452fa91a Add Cppcheck job to the CI
This MR changes the default Debian sid build to wrap make with bear
that creates compilation database and use the compilation database
to run Cppcheck on the source files systematically.

The job is currently set to be allowed to fail as it will take some
time to fix all the Cppcheck detected issues.
2019-10-02 09:25:00 +10:00
Mark Andrews 9f144a5281 suppress cppcheck warning: literalWithCharPtrCompare 2019-10-02 09:25:00 +10:00
Mark Andrews bef21ed45d suppress cppcheck warning: constArgument 2019-10-02 09:25:00 +10:00
Mark Andrews 5dc016f67e suppress cppcheck warning: unreadVariable on union 2019-10-02 09:25:00 +10:00
Mark Andrews 07e5969fe0 suppress cppcheck warning: leakNoVarFunctionCall 2019-10-02 09:25:00 +10:00
Mark Andrews 983099fe61 suppress cppcheck warning: duplicateCondition 2019-10-02 09:25:00 +10:00
Mark Andrews 8020fc9c1c suppress cppcheck error: memleak he.h_name 2019-10-02 09:25:00 +10:00
Mark Andrews 0936009af6 fix cppcheck warning: unusedVariable by reducing the scope of 'result' 2019-10-02 09:25:00 +10:00
Mark Andrews 1f3f8263a8 fix cppcheck warning: shadowedVariable by reducing scope of 'p' 2019-10-02 09:25:00 +10:00
Mark Andrews c46caa92e8 fix cppcheck warning: unassignedVariable 2019-10-02 09:25:00 +10:00
Mark Andrews 73c1a7e03b fix cppcheck warnings: unreadVariable 2019-10-02 09:25:00 +10:00
Mark Andrews 875776e5a6 fix cppcheck warnings: adjust format strings to match arguments. 2019-10-02 09:25:00 +10:00
Mark Andrews d6a14935b7 fix cppcheck warnings: duplicateCondition 2019-10-01 21:28:30 +10:00
Mark Andrews 92a73fd1de fix cppcheck warning: identicalConditionAfterEarlyExit 2019-10-01 21:28:23 +10:00
Mark Andrews b318d4e151 fix cppcheck error: set *listenerp to NULL. 2019-10-01 21:28:19 +10:00
Ondřej Surý 43696e0c03 Merge branch '846-dig-idn-alabel-fallback-v9_11' into 'v9_11'
Resolve "dig cannot display ACE query if locale is not unicode"

See merge request isc-projects/bind9!2414
2019-09-30 06:45:06 -04:00
Ondřej Surý f7d5a51a5f Add CHANGES for GL #846
(cherry picked from commit dccec984c0)
2019-09-30 12:19:56 +02:00
Ondřej Surý 15cf43bb88 Test of valid A-label in locale that cannot display it only with non-broken idn2
The libidn2 library on Ubuntu Bionic is broken and idn2_to_unicode_8zlz() does't
fail when it should.  This commit ensures that we don't run the system test for
valid A-label in locale that cannot display with the buggy libidn2 as it would
break the tests.

(cherry picked from commit c42e3583f9)
2019-09-30 12:19:56 +02:00
Petr MenšíkandOndřej Surý bde93c8472 Emit warning on IDN output failure
Warning is emitted before any dig headers.

(cherry picked from commit 21371abd72)
2019-09-30 12:19:56 +02:00
Petr MenšíkandOndřej Surý 2e77d98c63 Modify idna test to fallback to ACE
Test valid A-label on input would be displayed as A-label on output if
locale does not allow U-label.

(cherry picked from commit ac0cf85f09)
2019-09-30 12:19:56 +02:00
Petr MenšíkandOndřej Surý 8e497b131c Fallback to ASCII on output IDN conversion error
It is possible dig used ACE encoded name in locale, which does not
support converting it to unicode. Instead of fatal error, fallback to
ACE name on output.

(cherry picked from commit c8a871e908)
2019-09-30 12:19:56 +02:00
Mark Andrews 2e4044fc9a Merge branch 'marka-correct-list-v9_11' into 'v9_11'
use correct list

See merge request isc-projects/bind9!2412
2019-09-28 21:17:35 -04:00
Mark Andrews 76745b8cb5 Address cut-and-paste error where list name was not changed in one instance for change 5292.
(cherry picked from commit 9cd308ac5e)
2019-09-29 10:52:47 +10:00
Michał Kępień fc1acd581a Merge branch '147-add-windows-to-gitlab-ci-v9_11' into 'v9_11'
[v9_11] Add Windows to GitLab CI

See merge request isc-projects/bind9!2409
2019-09-27 07:00:20 -04:00
Michał Kępień 6b8d591aa1 Update Windows-specific documentation
Bring the files describing Windows-specific aspects of building and
installing BIND up to date.  Remove the parts which are either outdated
(e.g. information about libxml2 bugs) or inconvenient to keep up to date
in the long run (e.g. ARM chapter numbers).

(cherry picked from commit 646fcb733e)
2019-09-27 12:13:39 +02:00
Michał Kępień facc6a051f Add Windows to GitLab CI
Ensure BIND can be tested on Windows in GitLab to more quickly catch
build and test errors on that operating system.

Some notes:

  - While build jobs are triggered for all pipelines, system test jobs
    are not - due to the time it takes to run the complete system test
    suite on Windows (about 20 minutes), the latter are only run for
    pipelines created through GitLab's web interface and for pipelines
    created for Git tags.

  - Only the "Release" build configuration is currently used.  Adding
    "Debug" builds is a matter of extending .gitlab-ci.yml, but it was
    not done for the time being due to questionable usefulness of
    performing such builds in GitLab CI.

  - Only a 64-bit build is performed.  Adding support for 32-bit builds
    is not planned to be implemented.

  - Unit tests are still not run on Windows, but adding support for that
    is on the roadmap.

  - All Windows GitLab CI jobs are run inside Windows Server containers,
    using the Custom executor feature of GitLab Runner as Windows Server
    2016 is not supported by GitLab Runner's native Docker on Windows
    executor and Windows Server 2019 is not yet widely available from
    hosting providers.

  - The Windows Docker image used by GitLab CI is not stored in the
    GitLab Container Registry as it is over 27 GB in size and thus
    passing it between GitLab and its runners is impractical.

  - There is no vcvarsall.bat variant written in PowerShell and batch
    scripts are no longer supported by GitLab Runner Custom executor, so
    the environment variables set by vcvarsall.bat are injected back
    into the PowerShell environment by processing the output of "set".

  - Visual Studio parallel builds are a bit different than "make -jX"
    builds as parallelization happens in two tiers: project parallelism
    (controlled by the "/maxCpuCount" msbuild.exe switch) and compiler
    parallelism (controlled by the "/MP" cl.exe switch).  To limit the
    total number of compiler processes spawned concurrently to a value
    similar to the one used for Unix builds, msbuild.exe is allowed to
    build at most 2 projects at once, each of which can spawn up to half
    of BUILD_PARALLEL_JOBS worth of compiler processes.  Using such
    parameters is a fairly arbitrary decision taken to solve the
    trade-off between compilation speed and runner load.

  - Configuring network addresses in Windows Server containers is
    tricky.  Adding 10.53.0.1/24 and similar addresses to the vEthernet
    interface created by Docker never causes ifconfig.bat to fail, but
    in fact only one container can have any given IP address configured
    at any given time (the request to add the same address in another
    container is silently ignored).  Thus, in order to allow multiple
    system test jobs to be run in parallel, the addresses used in system
    tests are configured on the loopback interfaces.  Interestingly
    enough, the addresses set on the loopback interfaces... persist
    between containers.  Fortunately, this is acceptable for the time
    being and only requires ifconfig.bat failures to be ignored (as
    ifconfig.bat will fail if it attempts to configure an already
    existing address on an interface).  We also need to wait for a brief
    moment after calling ifconfig.bat as the addresses the latter
    attempts to configure may not be immediately available after it
    returns (and that causes runall.sh to error out).  Finally, for some
    reason we also need to signal that the DNS servers on each loopback
    interface are to be configured using DHCP or else ifconfig.bat will
    fail to add the requested addresses.

  - Since named.pid files created by named instances used in system
    tests contain Windows PIDs instead of Cygwin PIDs and various
    versions of Cygwin "kill" react differently when passed Windows PIDs
    without the -W switch, all "kill" invocations in GitLab CI need to
    use that switch (otherwise they would print error messages which
    would cause stop.pl to assume the process being killed died
    prematurely).  However, to preserve compatibility with older Cygwin
    versions used in our other Windows test environments, we alter the
    relevant scripts "on the fly" rather than in the Git repository.

  - In the containers used for running system tests, Windows Error
    Reporting is configured to automatically create crash dumps in
    C:\CrashDumps.  This directory is examined after the test suite is
    run to ensure no crashes went under stop.pl's radar.

(cherry picked from commit ca36405a3d)
2019-09-27 12:13:39 +02:00
Michał Kępień 86c904769b Fix system test error reporting on Windows
Make sure the CYGWIN environment variable is set whenever system tests
are run on Windows to prevent stop.pl from making incorrect assumptions
about the environment it is running in, which triggers e.g. false
reports about named instances crashing on shutdown when system tests are
run on Windows.  This issue has not been caught earlier because the
CYGWIN environment variable was incidentally being set on a higher level
in our Windows test environments.

Error reporting for parallel system tests on Windows has been broken all
along: since all parallel.mk targets generated by parallel.sh pipe their
output through "tee", the return code from run.sh is lost and thus
running "make -f parallel.mk check" will not yield a non-zero return
code if some system tests fail.  The same applies to runsequential.sh.
Yet, runall.sh on Windows only sets its return code to a non-zero value
if either "make -f parallel.mk check" or runsequential.sh returns a
non-zero return code.  Fix by making runall.sh yield a non-zero return
code when testsummary.sh fails, which is the same approach as the one
used in the "test" target in bin/tests/system/Makefile.

(cherry picked from commit fed397c04b)
2019-09-27 12:13:39 +02:00
Michał Kępień 61e4c9198a Make VS solution upgrading unnecessary
Until now, the build process for BIND on Windows involved upgrading the
solution file to the version of Visual Studio used on the build host.
Unfortunately, the executable used for that (devenv.exe) is not part of
Visual Studio Build Tools and thus there is no clean way to make that
executable part of a Windows Server container.

Luckily, the solution upgrade process boils down to just adding XML tags
to Visual Studio project files and modifying certain XML attributes - in
files which we pregenerate anyway using win32utils/Configure.  Thus,
extend win32utils/Configure with three new command line parameters that
enable it to mimic what "devenv.exe bind9.sln /upgrade" does.  This
makes the devenv.exe build step redundant and thus facilitates building
BIND in Windows Server containers.

(cherry picked from commit 0476e8f1ac)
2019-09-27 12:13:39 +02:00
Michał Kępień 5cf3a982fb Enable building dnssec-cds.exe
Build configuration for the dnssec-cds Visual Studio project is absent
from the solution file template, which means the solution needs to be
upgraded using "devenv bind9.sln /upgrade" in order for the dnssec-cds
project to be built.  Add the build configuration for dnssec-cds to the
solution file template so that upgrading the solution is not necessary
for building that project.

(cherry picked from commit 1d5259b0a0)
2019-09-27 12:13:39 +02:00
Michał Kępień c2e452a931 Drop named-checkzone dependency on libbind9
named-checkzone does not use libbind9.  Update the Visual Studio project
file template for named-checkzone to reflect that, thus preventing
compilation issues during parallel builds.

(cherry picked from commit 918ebd9830)
2019-09-27 12:13:39 +02:00
Michał Kępień 7f87fce925 Fix building against OpenSSL 1.1.x on Windows
Backport portions of 05d7aa5734 required
to support compilation against OpenSSL 1.1.x on Windows.
2019-09-27 12:13:34 +02:00
Michał Kępień d7801d5c8e Merge branch 'marka-win32-vsconf-v9_11' into 'v9_11'
[v9_11] allow VSCONF to be overridden at runtime

See merge request isc-projects/bind9!2407
2019-09-27 03:15:22 -04:00
Mark AndrewsandMichał Kępień a3df8dca3e allow VSCONF to be overridden at runtime
(cherry picked from commit 2433e3e808)
2019-09-27 09:13:57 +02:00
Mark Andrews 723e1e358d Merge branch 'marka-resolver-fix-v9_11' into 'v9_11'
use test specific shell variables

See merge request isc-projects/bind9!2389
2019-09-27 02:39:16 -04:00
Mark Andrews e838d56624 use test specific shell variables
(cherry picked from commit 4a5400c1b7)
2019-09-27 16:22:26 +10:00
Michał Kępień 55be095bae Merge branch 'michal/prevent-unbuffered-stderr-io-on-windows-v9_11' into 'v9_11'
[v9_11] Prevent unbuffered stderr I/O on Windows

See merge request isc-projects/bind9!2402
2019-09-26 08:00:55 -04:00
Michał Kępień f1b89d0d9f Prevent unbuffered stderr I/O on Windows
Make stderr fully buffered on Windows to improve named performance when
it is logging to stderr, which happens e.g. in system tests.  Note that:

  - line buffering (_IOLBF) is unavailable on Windows,

  - fflush() is called anyway after each log message gets written to the
    default stderr logging channels created by libisc.

(cherry picked from commit c72da3497d)
2019-09-26 13:56:49 +02:00
Michał Kępień 4e94797a2d Merge branch 'michal/prevent-cygwin-from-concealing-non-abort-crashes-v9_11' into 'v9_11'
Prevent Cygwin from concealing non-abort() crashes

See merge request isc-projects/bind9!2395
2019-09-26 04:38:10 -04:00
Michał Kępień 4a2700064a Prevent Cygwin from concealing non-abort() crashes
BIND system tests are run in a Cygwin environment.  Apparently Cygwin
shell sets the SEM_NOGPFAULTERRORBOX bit in its process error mode which
is then inherited by all spawned child processes.  This bit prevents the
Windows Error Reporting dialog from being displayed, which I assume is
part of an effort to contain memory handling errors triggered by Cygwin
binaries in the Cygwin environment.  Unfortunately, this also prevents
automatic crash dump creation by Windows Error Reporting and Cygwin
itself does not handle memory errors in native Windows processes spawned
from a Cygwin shell.

Fix by clearing the SEM_NOGPFAULTERRORBOX bit inside named if it is
started in a Cygwin environment, thus overriding the Cygwin-set process
error mode in order to enable Windows Error Reporting to handle all
named crashes.

(cherry picked from commit 3d4b17806f)
2019-09-26 10:35:27 +02:00
Michał Kępień 3b0f8e04be Merge branch '1245-properly-initialize-libxml2-v9_11' into 'v9_11'
[v9_11] Properly initialize libxml2

See merge request isc-projects/bind9!2393
2019-09-26 04:31:58 -04:00
Michał Kępień 57fbc90c19 Add CHANGES entry
5293.	[bug]		On Windows, named crashed upon any attempt to fetch XML
			statistics from it. [GL #1245]

(cherry picked from commit b5bcd4b8d6)
2019-09-26 10:29:16 +02:00
Michał Kępień 8263496434 Properly initialize libxml2
When libxml2 is to be used in a multi-threaded application, the
xmlInitThreads() function must be called before any other libxml2
function.  This function does different things on various platforms and
thus one can get away without calling it on Unix systems, but not on
Windows, where it initializes critical section objects used for
synchronizing access to data structures shared between threads.  Add the
missing xmlInitThreads() call to prevent crashes on affected systems.

Also add a matching xmlCleanupThreads() call to properly release the
resources set up by xmlInitThreads().

(cherry picked from commit a3c0b00ef6)
2019-09-26 10:29:15 +02:00
Ondřej Surý 5f40fbe5ad Merge branch '1119-tsan-lib/dns/rbtdb.c-v9_11' into 'v9_11'
Fix unprotected access to rbtnode in lib/dns/rbtdb.c:add32()

See merge request isc-projects/bind9!2385
2019-09-25 07:54:25 -04:00
Ondřej Surý 8b86335504 Fix unprotected access to rbtnode in lib/dns/rbtdb.c:add32()
(cherry picked from commit e307273307)
2019-09-25 13:36:56 +02:00
Mark Andrews 77f9c25316 Merge branch '1205-named-crashes-when-setting-nsec3param-v9_11' into 'v9_11'
Resolve "named crashes when setting nsec3param"

See merge request isc-projects/bind9!2380
2019-09-23 21:58:18 -04:00
Mark Andrews 5ab7020114 add CHANGES
(cherry picked from commit 31c8f66f25)
2019-09-24 11:38:48 +10:00
Mark Andrews 7d89e40ea0 Queue nsec3param setting until receive_secure_serial has completed.
(cherry picked from commit 456888c00f)
2019-09-24 11:38:26 +10:00
Mark Andrews 1f6a15f6ff Move dns_zone_setdb() to after the db is created.
Addresses the database changing w/o the changes being done under task lock.
Fix: build the database before assigning it to the zone.

(cherry picked from commit 4e686f40e0)
2019-09-24 11:38:26 +10:00
Michał Kępień fdf438aa79 Merge branch '1239-fix-dnssec-dsfromkey-docs' into 'v9_11'
Fix information about default DS algorithm(s) used

See merge request isc-projects/bind9!2378
2019-09-23 10:29:14 -04:00
Michał Kępień 11f504681b Fix information about default DS algorithm(s) used
Commit 0a20176ca6 is an overly broad
backport: in BIND 9.11, dnssec-dsfromkey still defaults to outputting
both SHA-1 and SHA-256 digests.  Ensure the documentation matches the
code by correcting the former.
2019-09-23 16:25:21 +02:00
Michał Kępień cd3431ecb4 Merge branch 'michal/run-freebsd-jobs-automatically-for-all-pipelines-v9_11' into 'v9_11'
[v9_11] Run FreeBSD jobs automatically for all pipelines

See merge request isc-projects/bind9!2354
2019-09-17 14:26:18 -04:00
Michał Kępień 81f2d352b5 Run FreeBSD jobs automatically for all pipelines
No problems have been observed on the FreeBSD GitLab CI runner during
the burn-in period, when FreeBSD jobs needed to be triggered manually.
Thus, make the FreeBSD jobs run automatically along other GitLab CI
jobs.

(cherry picked from commit f7bc95409d)
2019-09-17 20:24:47 +02:00
Michal Nowak e28b488af2 Merge branch 'mnowak_README_fixes-v9_11' into 'v9_11'
Various README.md and README fixes

See merge request isc-projects/bind9!2336
2019-09-17 12:36:09 -04:00
Michal Nowak a675da5688 Various README.md and README fixes
Fixing typos, typographical glitches. Added backticks around binaries,
modules, and libraries so it's more consistent. Added a paragraph with
ISC Security Policy.

(cherry picked from commit 4e2fdd7ee9)
2019-09-17 18:35:14 +02:00
Michal Nowak 3b7e92cb42 Merge branch 'mnowak/Red_Hat_find_docbook-xsl-v9_11' into 'v9_11'
Find docbook-xsl and dblatex templates on Red Hat/Fedora

See merge request isc-projects/bind9!2352
2019-09-17 12:15:07 -04:00
Michal Nowak 1d9e114736 Remove unused configure checks for dblatex 2019-09-17 17:43:35 +02:00
Michal Nowak 0a0700bd4a Find docbook-xsl and dblatex templates on Red Hat/Fedora
`/usr/share/sgml/docbook/xsl-stylesheets` and `/usr/share/dblatex` are
places where docbook-style-xsl and, respectively, dblatex packages on
Red Hat systems put their XSL templates. Unless we hint this place it
has to be added to `./configure` manually (`--with-docbook-xsl=...`):
https://src.fedoraproject.org/rpms/bind/blob/master/f/bind.spec#_691.

On Fedora 30:

Before
```
./configure
...
checking for Docbook-XSL path... auto
checking for html/docbook.xsl... "not found"
checking for xhtml/docbook.xsl... "not found"
checking for manpages/docbook.xsl... "not found"
checking for html/chunk.xsl... "not found"
checking for xhtml/chunk.xsl... "not found"
checking for html/chunktoc.xsl... "not found"
checking for xhtml/chunktoc.xsl... "not found"
checking for html/maketoc.xsl... "not found"
checking for xhtml/maketoc.xsl... "not found"
checking for xsl/docbook.xsl... "not found"
checking for xsl/latex_book_fast.xsl... "not found"
```

After:
```
./configure
...
checking for Docbook-XSL path... auto
checking for html/docbook.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl
checking for xhtml/docbook.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl
checking for manpages/docbook.xsl... /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl
checking for html/chunk.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl
checking for xhtml/chunk.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/chunk.xsl
checking for html/chunktoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/chunktoc.xsl
checking for xhtml/chunktoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/chunktoc.xsl
checking for html/maketoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/maketoc.xsl
checking for xhtml/maketoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/maketoc.xsl
checking for xsl/docbook.xsl... /usr/share/dblatex/xsl/docbook.xsl
checking for xsl/latex_book_fast.xsl... /usr/share/dblatex/xsl/latex_book_fast.xsl
```

(cherry picked from commit 0055b9616e)
2019-09-17 17:40:25 +02:00
Ondřej Surý bb5c3c1ed2 Merge branch 'ondrej/improve-flycheck-configuration-v9_11' into 'v9_11'
Remove the current directory from the flycheck configuration

See merge request isc-projects/bind9!2348
2019-09-17 07:32:52 -04:00
Ondřej Surý a529c53eb1 Add the flycheck configuration from master branch 2019-09-17 13:29:52 +02:00
Mark Andrews c02dc3550d Merge branch 'marka-win32-fixup-v9_11' into 'v9_11'
reinstate error handler

See merge request isc-projects/bind9!2339
2019-09-13 00:20:57 -04:00
Mark Andrews 7fb0a0db53 reinstate error handler 2019-09-13 14:17:32 +10:00
Mark Andrews df6ff70a20 Merge branch 'marka-win32-fixup-v9_11' into 'v9_11'
win32 fixup v9_11

See merge request isc-projects/bind9!2338
2019-09-13 00:00:09 -04:00
Mark Andrews 0d23bc5b55 declare alloc_failure 2019-09-13 13:57:41 +10:00
Mark Andrews 9ee27573af declare result 2019-09-13 13:48:20 +10:00
Michał Kępień 217adaadb7 Merge branch 'michal/add-freebsd-to-ci-v9_11' into 'v9_11'
[v9_11] Add FreeBSD to CI

See merge request isc-projects/bind9!2335
2019-09-12 09:26:19 -04:00
Michał Kępień 498e102790 Add FreeBSD to GitLab CI
Ensure BIND can be tested on FreeBSD in GitLab to more quickly catch
build and test errors on that operating system.  Make the relevant jobs
optional until the CI environment supporting them is deemed stable
enough for continuous use.

FreeBSD jobs are run using the Custom executor feature of GitLab Runner.
Unlike the Docker executor, the Custom executor does not support the
"image" option and thus some way of informing the runner about the OS
version to use for a given job is necessary.  Arguably the simplest way
of doing that without a lot of code duplication in .gitlab-ci.yml would
be to use a YAML template with a "variables" block specifying the
desired FreeBSD release to use, but including such a template in a job
definition would cause issues in case other variables also needed to be
set for that job (e.g. CFLAGS or EXTRA_CONFIGURE for build jobs).  Thus,
only one FreeBSD YAML template is defined instead and the Custom
executor scripts on FreeBSD runners extract the OS version to use from
the CI job name.  This allows .gitlab-ci.yml variables to be defined for
FreeBSD jobs in the same way as for Docker-based jobs.

(cherry picked from commit 51af91d007)
2019-09-12 15:01:08 +02:00
Michał Kępień 4979ee9311 Set --logfile for all kyua invocations
When kyua is called without the --logfile command line option, the log
file is created at a default location which is derived from the HOME
environment variable.  On FreeBSD GitLab CI runners, /home is a
read-only directory and thus kyua invocations not using the --logfile
option fail when HOME is set to something beneath /home.  Set --logfile
to /dev/null for all kyua invocations whose logs are irrelevant in order
to prevent kyua failures caused by HOME being non-writable.

(cherry picked from commit 1bffa602ba)
2019-09-12 15:01:06 +02:00
Michał Kępień 3c933f7e3b Merge branch 'michal/misc-doc-fixes-v9_11' into 'v9_11'
[v9_11] Miscellaneous documentation fixes

See merge request isc-projects/bind9!2331
2019-09-12 08:01:35 -04:00
Michał Kępień be759d235b Put SW support policy URL in a separate paragraph
Ensure the URL for ISC's software support policy does not go off the
edge of the page in the PDF version of the release notes.
2019-09-12 13:59:08 +02:00
Michał Kępień 49a9cc3425 README: do not list outdated Microsoft systems
BIND is no longer being built for Windows XP or Windows Server 2003 as
these systems reached end of life, so do not mention them in README.
2019-09-12 13:59:01 +02:00
Michał Kępień 85016d7bee README: do not mention /usr/include on macOS
For newer versions of Xcode, "xcode-select --install" no longer installs
system headers into /usr/include (instead, they are installed in the
Xcode directory tree), so do not mention that path in the macOS section
of README to prevent confusion.

(cherry picked from commit 5af0b1d1d3)
2019-09-12 13:58:45 +02:00
Mark Andrews a6a532a09e Merge branch 'marka-split-notes-v9_11' into 'v9_11'
split notes.xml into sections v9_11

See merge request isc-projects/bind9!2328
2019-09-12 06:47:47 -04:00
Mark Andrews c7209b6cb0 split notes.xml into sections 2019-09-12 20:18:32 +10:00
Mark Andrews 4db052712b Merge branch '1043-cppcheck-detected-code-issues-v9_11' into 'v9_11'
Resolve "cppcheck-detected code issues"

See merge request isc-projects/bind9!2333
2019-09-12 06:07:37 -04:00
Mark Andrews ff700b2259 address or suppress cppcheck warnings
(cherry picked from commit b59fe46e76)
2019-09-12 19:31:56 +10:00
Tinderbox User 414bcc7f64 Merge branch 'prep-release' into v9_11 2019-09-09 14:48:35 +00:00
Tinderbox User 11f1c44264 prep for 9.11.11 2019-09-09 14:29:59 +00:00
Tinderbox User 1860bab56b prep for 9.11.11 2019-09-09 14:22:44 +00:00
Mark Andrews 530a8f262a Merge branch '1213-deadcode-missing-log-message' into 'v9_11'
Resolve "deadcode / missing log message"

See merge request isc-projects/bind9!2321
2019-09-09 02:59:38 -04:00
Mark Andrews 37245e7350 add CHANGES 2019-09-09 16:39:43 +10:00
Mark Andrews 47722eacbf remove accidentally back ported code 2019-09-09 16:27:22 +10:00
Mark Andrews 5cde0e14e5 Merge branch 'marka-fix-insist-v9_11' into 'v9_11'
Address "Value stored to 'dscpcount' is never read"

See merge request isc-projects/bind9!2320
2019-09-06 03:03:23 -04:00
Mark Andrews f125c32591 also insist that keycount == dscpcount
(cherry picked from commit dbdd19853e)
2019-09-06 16:44:31 +10:00
Mark Andrews f5cda8b307 Merge branch '1211-potential-null-pointer-dereference-in-isc_ht_find-in-9-11' into 'v9_11'
Resolve "Potential NULL pointer dereference in isc_ht_find in 9.11"

See merge request isc-projects/bind9!2310
2019-09-06 02:05:44 -04:00
Mark Andrews e54b97822d add CHANGES 2019-09-06 11:51:19 +10:00
Mark Andrews 5c23d41ba3 check that 'valuep' is not NULL befor assigning to '*valuep' 2019-09-06 11:50:30 +10:00
Mark Andrews 55a844b91b Merge branch 'marka-pipequeries' into 'v9_11'
silence clang warning in 9.11's pipequeries.c

See merge request isc-projects/bind9!2313
2019-09-05 00:09:38 -04:00
Mark Andrews 1225cd3f8b remove incorrect UNUSED(argc); add POST(argv); 2019-09-05 11:15:52 +10:00
Mark Andrews 494184f8b9 Merge branch 'marka-fix-rndc-reload-v9_11' into 'v9_11'
use v9_11 style rndc reload

See merge request isc-projects/bind9!2306
2019-09-04 04:42:47 -04:00
Mark Andrews 12b2727382 use v9_11 style rndc reload 2019-09-04 18:23:41 +10:00
Mark Andrews 892c8b9e7a Merge branch 'marka-fix-maxudp-v9_11' into 'v9_11'
fix backport of maxudp for windows

See merge request isc-projects/bind9!2305
2019-09-04 02:27:27 -04:00
Mark Andrews 34eba51728 fix backport of maxudp for windows 2019-09-04 16:09:07 +10:00
Mark Andrews fc84433dc5 Merge branch '1208-potential-for-null-pointer-de-reference-cwe-476-in-file-client-c' into 'v9_11'
Resolve "Potential for NULL pointer de-reference (CWE-476) in file 'client.c'"

See merge request isc-projects/bind9!2303
2019-09-04 02:00:20 -04:00
Mark Andrews eb83741a62 add CHANGES 2019-09-04 15:16:13 +10:00
Mark Andrews 721939680d address potential NULL pointer dereference 2019-09-04 15:08:06 +10:00
Mark Andrews 237a6c56aa Merge branch '1207-bind-potential-for-null-pointer-de-references-plus-memory-leaks-cwe-476-in-file-dlz_mysqldyn_mod-c-v9_11' into 'v9_11'
Resolve "BIND | Potential for NULL pointer de-references plus memory leaks (CWE-476) in file 'dlz_mysqldyn_mod.c'"

See merge request isc-projects/bind9!2302
2019-09-04 00:59:12 -04:00
Mark Andrews 8ccfd14a52 add CHANGES
(cherry picked from commit 8b65ac9128)
2019-09-04 14:38:17 +10:00
Mark Andrews a0784e7a39 address NULL pointer dereferences
(cherry picked from commit 2de94dd4c4)
2019-09-04 14:38:17 +10:00
Mark Andrews b92c8c146a Merge branch '837-win32-legacy-system-test-failure-v9_11' into 'v9_11'
Resolve "win32 legacy system test failure"

See merge request isc-projects/bind9!2298
2019-09-03 21:24:31 -04:00
Mark Andrews 25361548a5 add CHANGES
(cherry picked from commit f0fd713f17)
2019-09-04 11:09:31 +10:00
Mark Andrews da08c99d5b silence dos2unix messages
(cherry picked from commit 2390d16955)
2019-09-04 11:09:31 +10:00
Mark Andrews b44ad05d20 implement maxudp under windows
(cherry picked from commit 2f558854b7)
2019-09-04 11:09:31 +10:00
Ondřej Surý 96ab258bd9 Merge branch '1196-misaligned-address-in-siphash-c-v9_11' into 'v9_11'
Resolve "Misaligned address in siphash.c"

See merge request isc-projects/bind9!2292
2019-09-03 05:00:45 -04:00
Ondřej Surý 3c85a1f104 Fix alignment issues in the native implementation of isc_siphash24()
The native implementation's conversion from the uint8_t buffers to uint64_t now
follows the reference implementation that doesn't require aligned buffers.
2019-09-02 13:22:40 +02:00
Evan Hunt 1d74e507c0 Merge branch '1146-rpz-search-v9_11' into 'v9_11'
use an rbtnodechain for wildcard matching in RPZ summary db

See merge request isc-projects/bind9!2287
2019-08-29 23:24:10 -04:00
Evan Hunt 0dae760192 CHANGES
(cherry picked from commit 22349d919c)
2019-08-29 20:05:25 -07:00
Evan Hunt 564a62bc2f use an rbtnodechain to walk up labels
when looking for a possible wildcard match in the RPZ summary database,
use an rbtnodechain to walk up label by label, rather than using the
node's parent pointer.

(cherry picked from commit 6e9be9a952)
2019-08-29 20:05:22 -07:00
Mark Andrews f416dfaea0 Merge branch '1189-don-t-escape-commas-when-reporting-named-s-command-line-v9_11' into 'v9_11'
Resolve "Don't escape commas when reporting named's command line."

See merge request isc-projects/bind9!2284
2019-08-29 21:03:58 -04:00
Mark Andrews 747197dd21 add CHANGES
(cherry picked from commit ecba23bc24)
2019-08-30 10:44:54 +10:00
Mark Andrews 79dd970a73 don't escape commas when saving named's command line
(cherry picked from commit 70dd93bf8a)
2019-08-30 10:44:51 +10:00
Ondřej Surý 5ea8a0c758 Merge branch 'ondrej/use-needs-kw-in-gitlab-ci-v9_14-v9_11' into 'v9_11'
Ondrej/use needs kw in gitlab ci v9 14 v9 11

See merge request isc-projects/bind9!2282
2019-08-29 10:19:56 -04:00
Ondřej Surý 397249f0b3 Fix uninitialized variable warning in restore_nsec3param()
(cherry picked from commit 1c084c35f0)
2019-08-29 16:04:05 +02:00
Ondřej Surý 2e35a769b7 Synchronize the .gitlab-ci.yml with master
(cherry picked from commit 53058ce4b3)
2019-08-29 16:04:03 +02:00
Ondřej Surý 4b707744fb Swap unit and system stages
(cherry picked from commit 3f2de6d39c)
(cherry picked from commit 173ecd41a2)
2019-08-29 16:03:25 +02:00
Ondřej Surý 82d41bd33d Further improve the CI by starting the build and docs right after autoreconf
(cherry picked from commit fc834aa4bc)
(cherry picked from commit 6464b2e962)
2019-08-29 16:03:25 +02:00
Ondřej Surý 10fcfe65fe Split the system and unit tests into separate stages
(cherry picked from commit 008b73fb41)
(cherry picked from commit 76e8f7783d)
2019-08-29 16:03:24 +02:00
Ondřej Surý fe8579592f Make use of DAG for GitLab Pipelines
GitLab 12.2 has introduced Directed Acyclic Graphs in the GitLab CI[1] that
allow jobs to run out-of-order and not wait for the whole previous stage to
complete.

1. https://docs.gitlab.com/ee/ci/directed_acyclic_graph/

(cherry picked from commit 04ce124279)
(cherry picked from commit 1d04597702)
2019-08-29 16:03:22 +02:00
Mark Andrews e96f1e1c84 Merge branch '1199-return-value-from-open-not-checked-v9_11' into 'v9_11'
Resolve "Return value from open() not checked."

See merge request isc-projects/bind9!2275
2019-08-28 20:42:01 -04:00
Mark Andrews b94f0db15b check that open() succeeded
(cherry picked from commit 510306c654)
2019-08-29 10:26:22 +10:00
Mark Andrews bfb7081ada Merge branch '1201-add-llq-option-v9_11' into 'v9_11'
Resolve "Add LLQ option"

See merge request isc-projects/bind9!2272
2019-08-28 04:03:01 -04:00
Mark Andrews b67c6fe8bd Add support for displaying EDNS option LLQ.
(cherry picked from commit d98f446d3f)
2019-08-28 17:48:24 +10:00
Mark Andrews 1d38b56da9 Merge branch '1187-ddns-rejected-if-zone-contains-cds-cdnskey-v9_11' into 'v9_11'
Resolve "DDNS rejected if zone contains CDS/CDNSKEY"

See merge request isc-projects/bind9!2270
2019-08-28 03:43:18 -04:00
Mark Andrews 36b367a472 add CHANGES
(cherry picked from commit ba26c6eb48)
2019-08-28 17:29:20 +10:00
Mark Andrews 27daac1e4b add good and bad CDS / CDNSKEY test zones
(cherry picked from commit 30610eb9a5)
2019-08-28 17:29:20 +10:00
Mark Andrews ad1950439c fix dnssec system tests that fail now that we call dns_zone_cdscheck
(cherry picked from commit 3705605e0b)
2019-08-28 17:18:51 +10:00
Mark Andrews 6aee585e94 add dns_zone_cdscheck to integrity checks
(cherry picked from commit cd40c9fe61)
2019-08-28 16:27:09 +10:00
Mark Andrews 70a85ab614 implement getoriginnode for sdb
(cherry picked from commit 2ebc4776ca)
2019-08-28 16:26:24 +10:00
Tinderbox User 815084f7c7 Merge branch 'prep-release' into v9_11 2019-08-13 09:49:39 +00:00
Tinderbox User 65e5b68ed6 prep 9.11.10 2019-08-13 09:47:16 +00:00
Tinderbox User eb55184bda prep 9.11.10 2019-08-13 09:34:56 +00:00
Michał Kępień 65fde68c62 Merge branch '1110-clarify-relationship-between-acls-and-rpz-v9_11' into 'v9_11'
[v9_11] Clarify relationship between ACLs and RPZ

See merge request isc-projects/bind9!2258
2019-08-12 03:50:23 -04:00
Michał Kępień ddb2651106 Clarify relationship between ACLs and RPZ
In the ARM section about RPZ, add text explicitly stating that ACLs take
precedence over RPZ to prevent users from expecting RPZ actions to be
applied to queries coming from clients which are not permitted access to
the resolver by ACLs.

(cherry picked from commit 33bddbb5d1)
2019-08-12 09:48:16 +02:00
Michał Kępień a7baef2250 Merge branch 'michal/fix-faulty-backport-which-broke-the-windows-build' into 'v9_11'
Fix faulty backport which broke the Windows build

See merge request isc-projects/bind9!2244
2019-08-08 15:00:16 -04:00
Michał Kępień 3806811c04 Fix faulty backport which broke the Windows build
Commit 91307842b8 inadvertently mangled
the XML structure inside lib/isc/win32/libisc.vcxproj.filters.in, thus
breaking the Windows build.  Add the missing XML tags to make Windows
builds work again.
2019-08-08 20:45:30 +02:00
Michał Kępień 68c95f0b85 Merge branch 'michal/implement-a-convenience-function-for-rndc-dumpdb-v9_11' into 'v9_11'
[v9_11] Implement a convenience function for "rndc dumpdb"

See merge request isc-projects/bind9!2250
2019-08-08 09:32:46 -04:00
Michał Kępień 323c309724 Use rndc_dumpdb() in the "sfcache" system test
(cherry picked from commit 4a8b3a8ac0)
2019-08-08 15:12:12 +02:00
Michał Kępień 999e04854b Use rndc_dumpdb() in the "rndc" system test
(cherry picked from commit 443449863b)
2019-08-08 15:12:12 +02:00
Michał Kępień e641d74a8a Use rndc_dumpdb() in the "dnssec" system test
(cherry picked from commit 44c0cc881f)
2019-08-08 15:12:12 +02:00
Michał Kępień fb55b7dabd Use rndc_dumpdb() in the "cookie" system test
(cherry picked from commit cbf32b901b)
2019-08-08 15:12:12 +02:00
Michał Kępień 7276b6756e Use rndc_dumpdb() in the "cacheclean" system test
(cherry picked from commit 22d5355782)
2019-08-08 15:12:12 +02:00
Michał Kępień 678a631f54 Implement a convenience function for "rndc dumpdb"
Add a helper shell function, rndc_dumpdb(), which provides a convenient
way to call "rndc dumpdb" for a given server with optional additional
arguments.  Since database dumping is an asynchronous process, the
function waits until the dump is complete before returning, which
prevents false positives in system tests caused by inspecting the dump
before its preparation is finished.  The function also renames the dump
file before returning so that it does not get overwritten by subsequent
calls; this retains forensic data in case of an unexpected test failure.

(cherry picked from commit ab78e350dd)
2019-08-08 15:12:12 +02:00
Ondřej Surý 32232caaa4 Merge branch '1182-add-older-autoconf-pkg-config-compat-macros-v9_11' into 'v9_11'
Add PKG_CHECK_VAR and AS_VAR_COPY compat macros (Courtesy of ycflash)

See merge request isc-projects/bind9!2248
2019-08-08 09:09:42 -04:00
Ondřej Surý 8cdc9c28b9 Add PKG_CHECK_VAR and AS_VAR_COPY compat macros (Courtesy of ycflash)
(cherry picked from commit d80b6ec879)
2019-08-08 14:58:03 +02:00
Evan Hunt ee5f5b186d Merge branch 'each-mdig-multi-norrcomments-v9_11' into 'v9_11'
minor bugfix in mdig: when using +multi, +norrcomments was ignored

See merge request isc-projects/bind9!2241
2019-08-08 00:19:05 -04:00
Evan Hunt 529a81217b added "mdig +multi +norrcomment" test; also fixed the flawed dig test
(cherry picked from commit 93ad3eea90)
2019-08-07 21:05:53 -07:00
Evan Hunt 3562b0003f minor bugfix in mdig: when using +multi, +norrcomments was ignored
(cherry picked from commit edab51b420)
2019-08-07 20:55:14 -07:00
Ondřej Surý e3903e8396 Merge branch '1148-deadlock-hangs-named-v9_11' into 'v9_11'
Convert (dns_view_t){ .weakrefs } to isc_refcount_t

See merge request isc-projects/bind9!2227
2019-08-07 05:46:45 -04:00
Ondřej Surý e80c4c3431 Have the dns_client hold a .references until all external references are removed
so that cleanup can all be done in dns_client_destroy().
2019-08-07 11:35:06 +02:00
Mark AndrewsandOndřej Surý be8af3afb7 Have the view hold a weakref until all external references are removed
so that cleanup can all be done in dns_view_weakattach().
2019-08-06 17:18:48 +02:00
Ondřej Surý 6353032a8a lib/isc/app_api.c: Protect the global is_running bool variable with a mutex 2019-08-06 15:03:35 +02:00
Ondřej Surý a7c9a52c89 lib/dns/resolver.c: Convert (dns_view_t *)->weakrefs to isc_refcount_t
There's a deadlock in BIND 9 code where (dns_view_t){ .lock } and
(dns_resolver_t){ .buckets[i].lock } gets locked in different order.  When
view->weakrefs gets converted to a reference counting we can reduce the locking
in dns_view_weakdetach only to cases where it's the last instance of the
dns_view_t object.
2019-08-06 15:03:35 +02:00
Evan Hunt 18f56f1e3d Merge branch '1170-dig-comments-v9_11' into 'v9_11'
Resolve "dig +nocomment still comments"

See merge request isc-projects/bind9!2232
2019-08-06 01:11:52 -04:00
Evan Hunt c6694fa017 clarify descriptions of comment-related options in dig usage and man page
(cherry picked from commit 9679c8c20a)
2019-08-05 21:58:40 -07:00
Evan Hunt 67b153ac8a always check 'printcmd' before printing cmdline message
(cherry picked from commit 6d50f7d924)
2019-08-05 21:57:40 -07:00
Mark Andrews 1955a63216 Merge branch '964-use-referral-ds-record-when-validating-v9_11' into 'v9_11'
Resolve "Use referral DS record when validating"

See merge request isc-projects/bind9!2229
2019-08-02 03:04:43 -04:00
Mark Andrews d83241a3b3 add CHANGES
(cherry picked from commit ac28cc14e1)
2019-08-02 16:52:57 +10:00
Mark Andrews 153512960b check that example/DS is not fetched when validating a.example
(cherry picked from commit 4293a2f4bf)
2019-08-02 16:52:57 +10:00
Mark Andrews cfbefb57d6 Store the DS and RRSIG(DS) with trust dns_trust_pending_answer
so that the validator can validate the records as part of validating
the current request.

(cherry picked from commit 57a328d67e)
2019-08-02 16:52:57 +10:00
Mark Andrews 74c39de667 Merge branch '1159-bits-65-72-of-the-dns64-prefix-are-supposed-to-be-zero-v9_11' into 'v9_11'
Resolve "Bits 64..71 of the dns64 prefix are supposed to be zero"

See merge request isc-projects/bind9!2221
2019-07-31 08:59:59 -04:00
Mark Andrews 2fc1234b4c add CHANGES
(cherry picked from commit d95ae93dd3)
2019-07-31 22:45:02 +10:00
Mark Andrews 30f5a99364 check that bits 64..71 in a dns64 prefix are zero
(cherry picked from commit a7ec7eb6ed)
2019-07-31 22:45:02 +10:00
Michał Kępień e74ec0627f Merge branch 'michal/wildcard-system-test-make-root-hints-consistent-with-authoritative-data-v9_11' into 'v9_11'
[v9_11] "wildcard" system test: make root hints consistent with authoritative data

See merge request isc-projects/bind9!2218
2019-07-31 05:43:19 -04:00
Michał Kępień 6987363936 Make root hints consistent with authoritative data
Multiple resolvers in the "wildcard" system test are configured with a
single root hint: "ns.root-servers.nil", pointing to 10.53.0.1, which is
inconsistent with authoritative data served by ns1.  This may cause
intermittent resolution failures, triggering false positives for the
"wildcard" system test.  Prevent this from happening by making ns2, ns3,
and ns5 use root hints corresponding to the contents of ns1/root.db.in.

(cherry picked from commit dd430c3093)
2019-07-31 11:07:47 +02:00
Michał Kępień 1d9ec9e386 Merge branch 'michal/staticstub-system-test-make-root-hints-consistent-with-authoritative-data-v9_11' into 'v9_11'
[v9_11] "staticstub" system test: make root hints consistent with authoritative data

See merge request isc-projects/bind9!2216
2019-07-31 03:42:42 -04:00
Michał Kępień 9829962c81 Make root hints consistent with authoritative data
The ns2 named instance in the "staticstub" system test is configured
with a single root hint commonly used in BIND system tests
(a.root-servers.nil with an address of 10.53.0.1), which is inconsistent
with authoritative data served by ns1.  This may cause intermittent
resolution failures, triggering false positives for the "staticstub"
system test.  Prevent this from happening by making ns1 serve data
corresponding to the contents of bin/tests/system/common/root.hint.

(cherry picked from commit 4b5e1da0e3)
2019-07-31 09:18:24 +02:00
Michał Kępień ca21075c45 Merge branch 'michal/update-gitlab-ci-to-fedora-30-v9_11' into 'v9_11'
[v9_11] Update GitLab CI to Fedora 30

See merge request isc-projects/bind9!2214
2019-07-31 03:14:29 -04:00
Michał Kępień b61899f031 Update GitLab CI to Fedora 30
Since Fedora 30 is the current Fedora release, replace Fedora 29 GitLab
CI jobs with their up-to-date counterparts.

(cherry picked from commit fac23cf939)
2019-07-31 08:48:04 +02:00
Mark Andrews 3798c6451c Merge branch '1133-your-problem-or-cygwin-s-v9_11' into 'v9_11'
Resolve "Your problem or Cygwin's ?????"

See merge request isc-projects/bind9!2212
2019-07-30 21:18:07 -04:00
Mark Andrews 0ef5b2852b add CHANGES
(cherry picked from commit 12d9681442)
2019-07-31 11:04:22 +10:00
Mark Andrews 75d89f023a handle connect() returning ETIMEDOUT on a non-blocking socket
(cherry picked from commit 91a0cb5da3)
2019-07-31 11:03:56 +10:00
Michał Kępień 70ae7129e9 Merge branch '1171-alpine-linux-tweaks-v9_11' into 'v9_11'
[v9_11] Alpine Linux tweaks

See merge request isc-projects/bind9!2210
2019-07-30 16:49:17 -04:00
Michał Kępień 2efc475a2f Add Alpine Linux to GitLab CI
Ensure BIND is continuously tested on Alpine Linux as it is commonly
used as a base for Docker containers and employs a less popular libc
implementation, musl libc.

(cherry picked from commit 326a334b49)
2019-07-30 22:22:28 +02:00
Michał Kępień 28c89c37b0 Do not use legacy time zone names
"PST8PDT" is a legacy time zone name whose use in modern code is
discouraged.  It so happens that using this time zone with musl libc
time functions results in different output than for other libc
implementations, which breaks the lib/isc/tests/time_test unit test.
Use the "America/Los_Angeles" time zone instead in order to get
consistent output across all tested libc implementations.

(cherry picked from commit f4daf6e0e7)
2019-07-30 22:22:28 +02:00
Michał Kępień 1546298005 Fix awk invocation in the "verify" system test
Appending output of a command to the same file as the one that command
is reading from is a dangerous practice.  It seems to have accidentally
worked with all the awk implementations we have tested against so far,
but for BusyBox awk, doing this may result in the input/output file
being written to in an infinite loop.  Prevent this from happening by
redirect awk output to a temporary file and appending its contents to
the original file in a separate shell pipeline.

(cherry picked from commit bb9c1654e2)
2019-07-30 22:22:28 +02:00
Michał Kępień 2ce4f23bc0 Extend prerequisites for the "xfer" system test
The Net::DNS Perl module needs the Digest::HMAC module to support TSIG.
However, since the latter is not a hard requirement for the former, some
packagers do not make Net::DNS depend on Digest::HMAC.  If Net::DNS is
installed on a host but Digest::HMAC is not, the "xfer" system test
breaks in a very hard-to-debug way (ans5 returns TSIG RRs with empty
RDATA, which prevents TSIG-signed SOA queries and transfers from
working).  Prevent this from happening by making the "xfer" system test
explicitly require Digest::HMAC apart from Net::DNS.

(cherry picked from commit b10d28d1e0)
2019-07-30 22:22:28 +02:00
Michał Kępień 566f76b1fe Make "autosign" system test work with BusyBox awk
The BusyBox version of awk treats some variables which other awk
implementations consider to be decimal values as octal values.  This
intermittently breaks key event interval calculations in the "autosign"
system test, trigger false positives for it.  Prevent the problem from
happening by stripping leading zeros from the affected awk variables.

(cherry picked from commit ad008f7dbf)
2019-07-30 22:22:28 +02:00
Michał Kępień 4e266a810e Tweak buffer sizes to prevent compilation warnings
For some libc implementations, BUFSIZ is small enough (e.g. 1024 for
musl libc) to trigger compilation warnings about insufficient size of
certain buffers.  Since the relevant buffers are used for printing DNS
names, increase their size to '(n + 1) * DNS_NAME_FORMATSIZE', where 'n'
is the number of DNS names which are printed to a given buffer.  This
results in somewhat arbitrary, albeit nicely-aligned and large enough
buffer sizes.

(cherry picked from commit 3384455659)
2019-07-30 22:22:28 +02:00
Michał Kępień 3098c79270 Always include <errno.h> instead of <sys/errno.h>
Including <sys/errno.h> instead of <errno.h> raises a compiler warning
when building against musl libc.  Always include <errno.h> instead of
<sys/errno.h> to prevent that compilation warning from being triggered
and to achieve consistency in this regard across the entire source tree.

(cherry picked from commit b5cd146033)
2019-07-30 22:22:28 +02:00
Michał Kępień eb13d4b279 Unify header ordering in unit tests
Make sure all unit tests include headers in a similar order:

 1. Three headers which must be included before <cmocka.h>.
 2. System headers.
 3. UNIT_TESTING definition, followed by the <cmocka.h> header.
 4. libisc headers.
 5. Headers from other BIND libraries.
 6. Local headers.

Also make sure header file names are sorted alphabetically within each
block of #include directives.

(cherry picked from commit 5381ac0fcc)
2019-07-30 22:22:28 +02:00
Michał Kępień 5e9ac86c2b Include <sched.h> where necessary for musl libc
All unit tests define the UNIT_TESTING macro, which causes <cmocka.h> to
replace malloc(), calloc(), realloc(), and free() with its own functions
tracking memory allocations.  In order for this not to break
compilation, the system header declaring the prototypes for these
standard functions must be included before <cmocka.h>.

Normally, these prototypes are only present in <stdlib.h>, so we make
sure it is included before <cmocka.h>.  However, musl libc also defines
the prototypes for calloc() and free() in <sched.h>, which is included
by <pthread.h>, which is included e.g. by <isc/mutex.h>.  Thus, unit
tests including "dnstest.h" (which includes <isc/mem.h>, which includes
<isc/mutex.h>) after <cmocka.h> will not compile with musl libc as for
these programs, <sched.h> will be included after <cmocka.h>.

Always including <cmocka.h> after all other header files is not a
feasible solution as that causes the mock assertion macros defined in
<isc/util.h> to mangle the contents of <cmocka.h>, thus breaking
compilation.  We cannot really use the __noreturn__ or analyzer_noreturn
attributes with cmocka assertion functions because they do return if the
tested condition is true.  The problem is that what BIND unit tests do
is incompatible with Clang Static Analyzer's assumptions: since we use
cmocka, our custom assertion handlers are present in a shared library
(i.e. it is the cmocka library that checks the assertion condition, not
a macro in unit test code).  Redefining cmocka's assertion macros in
<isc/util.h> is an ugly hack to overcome that problem - unfortunately,
this is the only way we can think of to make Clang Static Analyzer
properly process unit test code.  Giving up on Clang Static Analyzer
being able to properly process unit test code is not a satisfactory
solution.

Undefining _GNU_SOURCE for unit test code could work around the problem
(musl libc's <sched.h> only defines the prototypes for calloc() and
free() when _GNU_SOURCE is defined), but doing that could introduce
discrepancies for unit tests including entire *.c files, so it is also
not a good solution.

All in all, including <sched.h> before <cmocka.h> for all affected unit
tests seems to be the most benign way of working around this musl libc
quirk.  While quite an ugly solution, it achieves our goals here, which
are to keep the benefit of proper static analysis of unit test code and
to fix compilation against musl libc.

(cherry picked from commit 59528d0e9d)
2019-07-30 22:22:27 +02:00
Michał Kępień b911bfaaf2 Merge branch 'michal/filter-aaaa-system-test-make-root-hints-consistent-with-authoritative-data-v9_11' into 'v9_11'
[v9_11] "filter-aaaa" system test: make root hints consistent with authoritative data

See merge request isc-projects/bind9!2206
2019-07-29 16:10:47 -04:00
Michał Kępień 6563ee9c7d Make root hints consistent with authoritative data
Resolvers in the "filter-aaaa" system test are configured with a single
root hint: "ns.rootservers.net", pointing to 10.53.0.1.  However,
querying ns1 for "ns.rootservers.net" results in NXDOMAIN answers.
Since the TTL for the root hint is set to 0, it may happen that a
resolver's ADB will be asked to return any known addresses for
"ns.rootservers.net", but it will only have access to a cached NXDOMAIN
answer for that name and an expired root hint, which will result in a
resolution failure, triggering a false positive for the "filter-aaaa"
system test.  Prevent this from happening by making all the root hints
consistent with authoritative data served by ns1.

(cherry picked from commit c19ebde14b)
2019-07-29 21:45:06 +02:00
Evan Hunt b96796bbf1 Merge branch '1163-geoip-subtype-fix-v9_11' into 'v9_11'
fix a bug that could cause an assert when configuring "geoip continent"

See merge request isc-projects/bind9!2203
2019-07-28 16:30:03 -04:00
Evan Hunt 48447be09a CHANGES
(cherry picked from commit c3a996d547)
2019-07-28 13:16:35 -07:00
Evan Hunt 661ea29ecb add a system test, confirming that named fails to reload without crashing
(cherry picked from commit 8f1cdaeed9)
2019-07-28 13:16:29 -07:00
Evan Hunt 2a80d4e277 fix a bug that could cause an assert when configuring "geoip continent"
- incidentally fixed some typos in log messages

(cherry picked from commit 326349228a)
2019-07-25 22:52:18 -04:00
Mark Andrews 6637b947e0 Merge branch '1106-interaction-between-dns64-and-rpz-can-cause-unexpected-results-v9_11' into 'v9_11'
Resolve "Interaction between dns64 and RPZ can cause unexpected results"

See merge request isc-projects/bind9!2197
2019-07-24 17:41:45 -04:00
Mark Andrews d1f69ba757 add CHANGES
(cherry picked from commit b9a1c31df1)
2019-07-25 07:26:35 +10:00
Mark Andrews de153f1a43 Do not attempt to perform a DNS64 rewrite if RPZ returns NODATA.
(cherry picked from commit 1eb640049c)
2019-07-25 07:26:35 +10:00
Mark Andrews 00920b3a9b Check that RPZ 'CNAME *.' (NODATA) works with DNS64.
(cherry picked from commit b9dc9b68cd)
2019-07-25 07:26:35 +10:00
Mark Andrews 0ec8a6c963 Merge branch '1136-named-checkconf-should-report-missing-dnstap-output-option-when-dnstap-option-is-set-v9_11' into 'v9_11'
Resolve "named-checkconf should report missing dnstap-output option when dnstap option is set"

See merge request isc-projects/bind9!2186
2019-07-23 09:48:50 -04:00
Mark Andrews 8f2d5e6a86 named-checkconf failed to report dnstap-output missing
from named.conf when dnstap was specified

(cherry picked from commit a4f38bec6a)
2019-07-23 23:36:40 +10:00
Ondřej Surý 0206dd7102 Merge branch '195-add-dnstap-builds-to-ci-v9_11' into 'v9_11'
Add dnstap builds to CI

See merge request isc-projects/bind9!2182
2019-07-22 18:10:49 -04:00
Michał KępieńandOndřej Surý b68c7fc135 Add dnstap builds to CI
Ensure BIND with dnstap support enabled is being continuously tested by
adding --enable-dnstap to the ./configure invocation used for CentOS 7
and Debian sid builds in GitLab CI.

(cherry picked from commit 2bf44c6cd4)
2019-07-22 17:54:04 -04:00
Ondřej Surý b0f17ca99b Merge branch 'michal/add-debian-buster-to-ci-v9_11' into 'v9_11'
Add Debian buster to CI

See merge request isc-projects/bind9!2177
2019-07-22 11:41:30 -04:00
Michał KępieńandOndřej Surý f736877e99 Add Debian buster to CI
Ensure BIND is continuously tested on Debian 10 (buster) as it is the
current stable Debian release.

(cherry picked from commit 5f71d9c6ac)
2019-07-22 11:26:55 -04:00
Ondřej Surý adcafee712 Merge branch '605-add-siphash24-v9_14-v9_11' into 'v9_11'
Resolve "Add SipHash24 and synchronize the Cookie algorithm with other vendors"

See merge request isc-projects/bind9!2171
2019-07-22 10:55:16 -04:00
Ondřej Surý cff198682f Add CHANGES note
(cherry picked from commit be0cd728c5)
2019-07-22 09:06:03 -04:00
Ondřej Surý 40751f8f94 Add release notes
(cherry picked from commit 7d8e7b0194)
2019-07-22 09:06:03 -04:00
Ondřej Surý 9feaf319b4 Test the AES DNS Cookie algorithm only if available 2019-07-22 09:06:03 -04:00
Ondřej Surý a0f4e6d27e Add new siphash24 DNS Cookie algorithm
This commit changes the BIND cookie algorithms to match
draft-sury-toorop-dnsop-server-cookies-00.  Namely, it changes the Client Cookie
algorithm to use SipHash 2-4, adds the new Server Cookie algorithm using SipHash
2-4.  The change doesn't make the SipHash 2-4 to be the default algorithm, this
is up to the operator.

(cherry picked from commit 196b342bc9)
2019-07-22 09:06:03 -04:00
Michał KępieńandOndřej Surý 825497f508 Make ifconfig.sh work on DragonFly BSD
On DragonFly BSD, use the same commands for configuring network
interfaces used during system tests as on NetBSD and OpenBSD.

(cherry picked from commit 496397eb3f)
2019-07-22 08:09:49 -04:00
Ondřej Surý 63666fc926 Revise the Windows section of <isc/endian.h>
Add a comment and remove redundant definitions.

(cherry picked from commit 84ff6a6963)
2019-07-22 08:09:48 -04:00
Ondřej Surý 1fd8b2d9f4 Revise the macOS section of <isc/endian.h>
Move the macOS section of <isc/endian.h> to a lower spot as it is
believed not to be the most popular platform for running BIND.  Add a
comment and remove redundant definitions.

(cherry picked from commit c727a31eab)
2019-07-22 08:09:48 -04:00
Ondřej Surý 55a95f7cd7 Make <isc/endian.h> detect GNU rather than Linux
Instead of only supporting Linux, try making <isc/endian.h> support
other GNU platforms as well.  Since some compilers define __GNUC__ on
BSDs (e.g. Clang on FreeBSD), move the relevant section to the bottom of
the platform-specific part of <isc/endian.h>, so that it only gets
evaluated when more specific platform determination criteria are not
met.  Also include <byteswap.h> so that any byte-swapping macros which
may be defined in that file on older platforms are used in the fallback
definitions of the nonstandard hto[bl]e{16,32,64}() and
[bl]e{16,32,64}toh() conversion functions.

(cherry picked from commit a98c7408fc)
2019-07-22 08:09:48 -04:00
Ondřej Surý 7b74cd6231 Add Solaris support for <isc/endian.h>
While Solaris does not support the nonstandard hto[bl]e{16,32,64}() and
[bl]e{16,32,64}toh() conversion functions, it does have some
byte-swapping macros available in <sys/byteorder.h>.  Ensure these
macros are used in the fallback definitions of the aforementioned
nonstandard functions.

(cherry picked from commit 5b0f81e549)
2019-07-22 08:09:48 -04:00
Ondřej Surý d3a8c162d8 Add fallback definitions to <isc/endian.h>
Since the hto[bl]e{16,32,64}() and [bl]e{16,32,64}toh() conversion
functions are nonstandard, add fallback definitions of these functions
to <isc/endian.h>, so that their unavailability does not prevent
compilation from succeeding.

(cherry picked from commit 973d2991a0)
2019-07-22 08:09:48 -04:00
Michał KępieńandOndřej Surý 3c7cab3f22 Fix <isc/endian.h> on BSD systems
Current versions of DragonFly BSD, FreeBSD, NetBSD, and OpenBSD all
support the modern variants of functions converting values between host
and big-endian/little-endian byte order while older ones might not.
Ensure <isc/endian.h> works properly in both cases.

(cherry picked from commit 588c14d5c9)
2019-07-22 08:09:48 -04:00
Ondřej Surý 07502731e0 Add tests for the isc_siphash24 function
(cherry picked from commit 2cbf633192)
(cherry picked from commit 2188a58171)
2019-07-22 08:09:48 -04:00
Ondřej Surý 91307842b8 Add reference SipHash 2-4 implementation
(cherry picked from commit a197df137a)
(cherry picked from commit 8d87ad53eb)
2019-07-22 08:09:48 -04:00
Ondřej Surý 92a86ac211 Add portable <isc/endian.h> header
(cherry picked from commit 0efc36c19a)
(cherry picked from commit 0b050ad4fd)
2019-07-22 08:09:48 -04:00
Ondřej Surý 3389e05d74 Merge branch 'ondrej-disable-freebsd-again-v9_11' into 'v9_11'
Disable FreeBSD Runner in the CI; it's broken again.

See merge request isc-projects/bind9!2175
2019-07-22 08:08:30 -04:00
Ondřej Surý 40cd655dda Disable FreeBSD Runner in the CI; it's broken again.
(cherry picked from commit 747736d361)
2019-07-22 08:07:29 -04:00
Evan Hunt e3cc68bf35 Merge branch 'ondrej/fix-leaked-memory-in-geoip_test.c-v9_14-v9_11' into 'v9_11'
Fix leaked memory in geoip_test.c

See merge request isc-projects/bind9!2158
2019-07-16 19:55:36 -04:00
Ondřej SurýandEvan Hunt 9f431ce20c Fix the memory leaks in GeoIP unit test
Each individual test opened GeoIP databases but the database handles were never
closed.  This commit moves the open/close from the individual unit tests into
the _setup and _teardown methods where they really belong.

(cherry picked from commit d1c7b79183)
(cherry picked from commit aad88d2c00)
2019-07-16 16:27:05 -07:00
Ondřej Surý c148ba880e Merge branch 'ondrej/move-ax-save_restore-flags-to-libtool.m4-v9_11' into 'v9_11'
Move ax save restore flags to libtool.m4 [v9_11]

See merge request isc-projects/bind9!2139
2019-07-09 08:22:41 -04:00
Ondřej Surý a848ef76f1 Add missing AX_RESTORE_FLAGS([geoip2]) to configure.ac 2019-07-09 13:54:31 +02:00
Ondřej Surý c989144d30 Move the ax_{save,restore}_flags.m4 to libtool.m4 folder 2019-07-09 13:54:31 +02:00
Tinderbox User 2f9dae5ce9 Merge branch 'prep-release' into v9_11 2019-07-09 10:07:17 +00:00
Tinderbox User 466dd24411 prep 9.11.9 2019-07-09 10:06:34 +00:00
Mark Andrews b152cd3436 Merge branch 'marka-nocrypto-v9_11' into 'v9_11'
add nocrypto builds

See merge request isc-projects/bind9!2136
2019-07-07 21:25:40 -04:00
Mark Andrews e070fdab1d use printf instead of print_message for '1..0 # Skipped: sigs test requires crypto' 2019-07-08 10:57:22 +10:00
Mark Andrews 39add843ea add nocrypto builds 2019-07-08 10:21:43 +10:00
Evan Hunt 49cd121906 Merge branch '1131-geoip2-windows-911' into 'v9_11'
add support for building GeoIP2 on windows

See merge request isc-projects/bind9!2133
2019-07-04 17:42:44 -04:00
Evan Hunt cf9c7959a0 add support for building GeoIP2 on windows 2019-07-04 12:06:01 -07:00
Evan Hunt 7af1323425 Merge branch '1114-windows-build-broken-v9_11' into 'v9_11'
fix broken windows build

See merge request isc-projects/bind9!2131
2019-07-03 14:17:06 -04:00
Evan Hunt f81020a748 fix broken windows build
The MSVS C compiler requires every struct to have at least one member.
The dns_geoip_databases_t structure had one set of members for
HAVE_GEOIP and a different set for HAVE_GEOIP2, and none when neither
API is in use.

This commit silences the compiler error by moving the declaration of
dns_geoip_databases_t to types.h as an opaque reference, and commenting
out the contents of geoip.h when neither version of GeoIP is enabled.

(cherry picked from commit 81fcde5953)
2019-07-03 10:52:51 -07:00
Ondřej Surý 7355529a98 Merge branch 'ondrej/kyua.result-location-v9_11' into 'v9_11'
Ondrej/kyua.result location v9 11

See merge request isc-projects/bind9!2130
2019-07-03 13:46:03 -04:00
Ondřej Surý fc7ea9cc4d Set number of parallel jobs in .gitlab-ci.yml
(cherry picked from commit f56b88f72e)
2019-07-03 19:19:01 +02:00
Ondřej Surý d9a3bf572f Use $KYUA_RESULT in kyua report-html invocation for unified file location
(cherry picked from commit a2a69725ef)
2019-07-03 19:19:00 +02:00
Ondřej Surý 855f7642ad Merge branch 'ondrej/restore-freebsd-runner-v9_11' into 'v9_11'
[v9_11] Restore the FreeBSD Runner

See merge request isc-projects/bind9!2123
2019-07-02 17:51:03 -04:00
Ondřej Surý 6b8de5ed8f Use $(pwd) instead of $CI_PROJECT_DIR to always get absolute path
(cherry picked from commit e957825eee)
2019-07-02 22:44:30 +02:00
Ondřej Surý ab8de89e6d Use sudo to setup the interfaces when CI job is not running as root
(cherry picked from commit 4d3e7d0b7d)
2019-07-02 22:44:29 +02:00
Evan HuntandOndřej Surý d1d7acaecb Add FreeBSD 11 GitLab CI Runner
(cherry picked from commit 646bb64246)
2019-07-02 22:44:29 +02:00
Evan Hunt c65d4f9d56 Merge branch '182-geoip2-api-v9_14-v9_11' into 'v9_11'
Resolve "Update GeoIP support to new API (GeoLite2 from Maxmind)"

See merge request isc-projects/bind9!2101
2019-07-02 15:45:49 -04:00
Evan Hunt cc92ebf6f7 CHANGES, release note, README
(cherry picked from commit 8854e284fd)
(cherry picked from commit 24103171ca)
2019-07-02 12:29:44 -07:00
Evan Hunt babc839b31 update ARM documentation
(cherry picked from commit c9945d6148)
(cherry picked from commit d6bd7bb9af)
2019-07-02 12:29:44 -07:00
Evan Hunt bb4b3e7f14 add geoip2 system test
(cherry picked from commit 9a1caf99ef)
(cherry picked from commit 049d8a311b)
2019-07-02 12:29:44 -07:00
Evan Hunt 8ec293e51e add GeoIP2 lookups to unit test
(cherry picked from commit 6399a70cb4)
(cherry picked from commit 7468036226)
2019-07-02 12:29:44 -07:00
Evan Hunt 0d50d9988c implement searching of geoip2 database
- revise mapping of search terms to database types to match the
  GeoIP2 schemas.
- open GeoIP2 databases when starting up; close when shutting down.
- clarify the logged error message when an unknown database type
  is configured.
- add new geoip ACL subtypes to support searching for continent in
  country databases.
- map geoip ACL subtypes to specific MMDB database queries.
- perform MMDB lookups based on subtype, saving state between
  queries so repeated lookups for the same address aren't necessary.

(cherry picked from commit 6e0b93e5a0)
(cherry picked from commit 0283ab7512)
2019-07-02 12:29:39 -07:00
Evan Hunt a553ac45ed add HAVE_GEOIP2 #ifdef branches, without implementing yet
(cherry picked from commit fe46d5bc34)
(cherry picked from commit 7fc92bee0c)
2019-07-02 12:28:14 -07:00
Evan Hunt 7de12aaa34 add a search for GeoIP2 libraries in configure
- "--with-geoip" is used to enable the legacy GeoIP library.
- "--with-geoip2" is used to enable the new GeoIP2 library
  (libmaxminddb), and is on by default if the library is found.
- using both "--with-geoip" and "--with-geoip2" at the same time
  is an error.
- an attempt is made to determine the default GeoIP2 database path at
  compile time if pkg-config is able to report the module prefix. if
  this fails, it will be necessary to set the path in named.conf with
  geoip-directory
- Makefiles have been updated, and a stub lib/dns/geoip2.c has been
  added for the eventual GeoIP2 search implementation.

(cherry picked from commit fea6b5bf10)
(cherry picked from commit 6a7e805796)
2019-07-02 12:28:14 -07:00
Ondřej Surý d10137736d Merge branch 'ondrej/fix-freebsd-make-v9_11' into 'v9_11'
Add rules to make sure subdirs are always built before testdirs

See merge request isc-projects/bind9!2119
2019-07-02 13:53:17 -04:00
Ondřej Surý 3e24143012 Add rules to make sure subdirs are always built before testdirs
(cherry picked from commit 723433cbc6)
2019-07-02 19:41:14 +02:00
Michał Kępień 15c2e82cca Merge branch 'michal/add-and-use-keyfile_to_key_id-helper-function-v9_11' into 'v9_11'
[v9_11] Add and use keyfile_to_key_id() helper function

See merge request isc-projects/bind9!2109
2019-06-28 08:33:32 -04:00
Michał Kępień 621f8aa90a Add and use keyfile_to_key_id() helper function
When trying to extract the key ID from a key file name, some test code
incorrectly attempts to strip all leading zeros.  This breaks tests when
keys with ID 0 are generated.  Add a new helper shell function,
keyfile_to_key_id(), which properly handles keys with ID 0 and use it in
test code whenever a key ID needs to be extracted from a key file name.

(cherry picked from commit 7d6eaad1bd)
2019-06-28 14:09:36 +02:00
Michał Kępień ef125c0d73 Merge branch '1093-dnstap-read-clear-buffer-before-expanding-it-v9_11' into 'v9_11'
[v9_11] dnstap-read: clear buffer before expanding it

See merge request isc-projects/bind9!2107
2019-06-28 07:08:36 -04:00
Michał Kępień 207a009424 Add CHANGES entry
5260.	[bug]		dnstap-read was producing malformed output for large
			packets. [GL #1093]

(cherry picked from commit 7354207e1b)
2019-06-28 12:45:47 +02:00
Michał Kępień 511f3c3601 dnstap-read: clear buffer before expanding it
When printing a packet, dnstap-read checks whether its text form takes
up more than the 2048 bytes allocated for the output buffer by default.
If that is the case, the output buffer is automatically expanded, but
the truncated output is left in the buffer, resulting in malformed data
being printed.  Clear the output buffer before expanding it to prevent
this issue from occurring.

(cherry picked from commit 3549abe81d)
2019-06-28 12:45:44 +02:00
Mark Andrews c71f23eb8b Merge branch '1030-statistics-channel-fixes-v9_11' into 'v9_11'
Statistics Channel Fixes

See merge request isc-projects/bind9!2097
2019-06-26 23:59:20 -04:00
Mark Andrews 62d47e569a add CHANGES
(cherry picked from commit f8b3aa97df)
2019-06-27 13:40:55 +10:00
Mark Andrews 53543c1ecc check xsl vs xml
(cherry picked from commit d5c795942f)
2019-06-27 13:40:52 +10:00
Evan HuntandMark Andrews f2d67af545 add odd/even shading to the remaining tables
(cherry picked from commit ce3907e9fe)
2019-06-27 13:25:01 +10:00
Mark Andrews 02672e6aaf remove 'Configured Zones'; add even/odd to zone list
(cherry picked from commit eaba8dd799)
2019-06-27 13:25:01 +10:00
Timothe LittandMark Andrews af4bffd747 Fix ISC-Bugs 45340: Statschannel XSL for zones, Traffic
In ISC-Bugs 45340, I wrote:

The Statistics channel offers links to Zones and Traffic.
Both produce valid data, but display as blank pages with
a web browser.

Zones never had XSL (I provided the original
implementation, but punted on the XSL).

Traffic has XSL, but it wasn't updated to reflect the
split between IPv4 and IPv6 data.

I've picked up enough XSL to fix my original omission,
and as penance for my sloth, fixed the Traffic bug as well.

(cherry picked from commit 96f0bbd4d5)
2019-06-27 13:25:01 +10:00
Evan Hunt 77bc37b616 Merge branch '1092-allow-priming-glue-v9_11' into 'v9_11'
allow glue in authoritative responses to root priming queries

See merge request isc-projects/bind9!2095
2019-06-26 13:12:38 -04:00
Evan Hunt 7cbb589795 CHANGES, release note
(cherry picked from commit 03a6a78b55)
2019-06-26 09:39:00 -07:00
Evan Hunt f608f9335d x 2019-06-26 09:38:59 -07:00
Evan Hunt 2fd9e88405 add system test to confirm glue is returned in priming queries
(cherry picked from commit 9a1f0ea873)
2019-06-26 09:27:26 -07:00
Evan Hunt ff4855d358 allow glue in authoritative responses to root priming queries
- when processing authoritative queries for ./NS, set 'gluedb' so
  that glue will be included in the response, regardless of how
  'minimal-responses' has been configured.

(cherry picked from commit e7684c7b64)
2019-06-26 09:27:22 -07:00
Evan Hunt d944201cf7 Merge branch '1109-inline-reload-error-v9_11' into 'v9_11'
don't overwrite the dns_master_loadfile() result before calling zone_postload()

See merge request isc-projects/bind9!2093
2019-06-26 12:14:20 -04:00
Evan Hunt 80985b2bde CHANGES
(cherry picked from commit c29e344f07)
2019-06-26 08:56:14 -07:00
Evan Hunt 59dc713fc3 add a test that reloading errors are not ignored
(cherry picked from commit e48b3f1a00)
2019-06-26 08:56:14 -07:00
Evan Hunt 4dd46ba0f7 don't overwrite the dns_master_loadfile() result before calling zone_postload()
if "rndc reload" fails, the result code is supposed to be passed to
zone_postload, but for inline-signing zones, the result can be
overwritten first by a call to the ZONE_TRYLOCK macro. this can lead
to the partially-loaded unsigned zone being synced over to the signed
zone instead of being rejected.

(cherry picked from commit 0b792bd37b)
2019-06-26 08:51:24 -07:00
Michał Kępień 92a72a53db Merge branch 'michal/prevent-idna-test-failures-with-libidn2-2.2.0-v9_11' into 'v9_11'
[v9_11] Prevent "idna" test failures with libidn2 2.2.0+

See merge request isc-projects/bind9!2091
2019-06-26 09:00:55 -04:00
Michał Kępień d48ba3ce12 Prevent "idna" test failures with libidn2 2.2.0+
libidn2 2.2.0+ parses Punycode more strictly than older versions and
thus "dig +idnin +noidnout xn--19g" fails with libidn2 2.2.0+ but
succeeds with older versions.

We could preserve the old behavior by using the IDN2_NO_ALABEL_ROUNDTRIP
flag available in libidn2 2.2.0+, but:

  - this change in behavior is considered a libidn2 bug fix [1],
  - we want to make sure dig behaves as expected, not libidn2,
  - implementing that would require additional configure.ac cruft.

Removing the problematic check appears to be the simplest solution as it
does not prevent the relevant block of checks in the "idna" system test
from achieving its purpose, i.e. ensuring dig properly handles invalid
U-labels.

[1] see upstream commit 241e8f486134793cb0f4a5b0e5817a97883401f5

(cherry picked from commit 60ce0ed411)
2019-06-26 14:41:10 +02:00
Ondřej Surý d9164ab61c Merge branch '1067-underflow-recursing-clients-stats-v9_11' into 'v9_11'
Resolve "Underflow in Stats Channel RecursClients value?"

See merge request isc-projects/bind9!2037
2019-06-26 05:25:39 -04:00
Witold KręcickiandOndřej Surý e52a96bb0a CHANGES note 2019-06-26 11:11:06 +02:00
Witold KręcickiandOndřej Surý 4b246002be Make sure that recursclient gauge is calculated correctly.
We increase recursclients when we attach to recursion quota,
decrease when we detach. In some cases, when we hit soft
quota, we might attach to quota without increasing recursclients
gauge. We then decrease the gauge when we detach from quota,
and it causes the statistics to underflow.
Fix makes sure that we increase recursclients always when we
succesfully attach to recursion quota.
2019-06-26 11:10:42 +02:00
Mark Andrews cf1d4e614b Merge branch '1098-compile-failure-on-9-11-8' into 'v9_11'
Resolve "Compile failure on 9.11.8"

See merge request isc-projects/bind9!2065
2019-06-24 19:44:49 -04:00
Mark Andrews 5c23623094 add CHANGES 2019-06-25 09:44:07 +10:00
Mark Andrews 4110b9184d define ULLONG_MAX if not already defined 2019-06-25 09:42:49 +10:00
Mark Andrews f3e23289e0 Merge branch 'marka-wait-for-zones-to-load-v9_11' into 'v9_11'
wait for zones to load

See merge request isc-projects/bind9!2071
2019-06-24 00:35:28 -04:00
Mark Andrews 8802a3a901 wait for zones to load
(cherry picked from commit b62e6418b5)
2019-06-24 14:19:05 +10:00
Ondřej Surý 774d0d37f4 Merge branch '1094-bump-clientinfomethods-version-v9_11' into 'v9_11'
[v9_11] Bump DNS_CLIENTINFOMETHODS VERSION and AGE

See merge request isc-projects/bind9!2059
2019-06-20 11:45:53 -04:00
Brian ConryandOndřej Surý 1ff50a2f70 Bump DNS_CLIENTINFOMETHODS_VERSION/_AGE to 2/1 in clientinfo.h
BIND 9.11.0 has bumped DNS_CLIENTINFOMETHODS_VERSION and _AGE to
version 2 and 1 in the dlz_minimal.h because a member was addet to the
dnsclientinfo struct.  It was found out that the new member is not
used anywhere and there are no accessor functions therefore the change
was reverted.

Later on, it was found out that the revert caused some problems to the
users of BIND 9, and thus this changes takes a different approach by
syncing the values other way around.

(cherry picked from commit 39344dfb3e)
2019-06-20 14:24:29 +02:00
Ondřej Surý 5924804dda Revert "Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c"
This reverts commit a6f09b2255.

(cherry picked from commit 04961a7e6b)
2019-06-20 14:24:29 +02:00
Evan Hunt 96362d67ed Merge branch 'security-v9_11' into 'v9_11'
merge security-v9_11

See merge request isc-projects/bind9!2062
2019-06-19 19:15:29 -04:00
Tinderbox UserandEvan Hunt 3d3c290f51 Merge branch 'prep-release' into security-v9_11 2019-06-19 15:55:05 -07:00
Evan Hunt 5c287fb224 Merge branch '942-security-move-test-inside-lock-security-v9_11' into 'security-v9_11' 2019-06-19 15:55:05 -07:00
Tinderbox UserandEvan Hunt 81c904f697 prep 9.11.8 2019-06-19 15:55:05 -07:00
Evan Hunt 424d7bfd62 CHANGES, release note
(cherry picked from commit 332af50eed96cbcb20173f297e543adaded0ed92)
2019-06-19 15:55:04 -07:00
Mark AndrewsandEvan Hunt 3a9c7bb80d move item_out test inside lock in dns_dispatch_getnext()
(cherry picked from commit 60c42f849d520564ed42e5ed0ba46b4b69c07712)
2019-06-19 15:55:04 -07:00
Michał Kępień b381efcfaf Merge branch '1088-always-fail-a-system-test-if-crashes-are-detected-v9_11' into 'v9_11'
[v9_11] Always fail a system test if crashes are detected

See merge request isc-projects/bind9!2048
2019-06-18 03:55:23 -04:00
Michał Kępień 29e31a6858 Always fail a system test if crashes are detected
In certain situations (e.g. a named instance crashing upon shutdown in a
system test which involves shutting down a server and restarting it
afterwards), a system test may succeed despite a named crash being
triggered.  This must never be the case.  Extend run.sh to mark a test
as failed if core dumps or log lines indicating assertion failures are
detected (the latter is only an extra measure aimed at test environments
in which core dumps are not generated; note that some types of crashes,
e.g. segmentation faults, will not be detected using this method alone).

(cherry picked from commit 7706f22924)
2019-06-18 09:26:40 +02:00
Michał Kępień 48ca641b42 Merge branch 'michal/tkey-system-test-fix-key-id-processing-v9_11' into 'v9_11'
[v9_11] "tkey" system test: fix key ID processing

See merge request isc-projects/bind9!2043
2019-06-17 08:43:21 -04:00
Michał Kępień 6c8546edc6 Fix key ID processing
If ns1/setup.sh generates a key with ID 0, the "KEYID" token in
ns1/named.conf.in will be replaced with an empty string, causing the
following broken statement to appear in ns1/named.conf:

    tkey-dhkey "server" ;

Such a statement triggers false positives for the "tkey" system test due
to ns1 being unable to start with a broken configuration file.  Fix by
tweaking the regular expression used for removing leading zeros from the
key ID, so that it removes at most 4 leading zeros.

(cherry picked from commit 0b7b1161c2)
2019-06-17 14:16:20 +02:00
Michał Kępień 08eb417bed Merge branch 'michal/address-compilation-warnings-for-O3-builds-v9_11' into 'v9_11'
[v9_11] Address compilation warnings for -O3 builds

See merge request isc-projects/bind9!2029
2019-06-11 04:49:03 -04:00
Michał Kępień eeec8e8d83 Address GCC 9.1 -O3 compilation warnings
Compiling with -O3 triggers the following warnings with GCC 9.1:

    task.c: In function ‘isc__taskmgr_create’:
    task.c:1456:44: warning: ‘%04u’ directive output may be truncated writing between 4 and 10 bytes into a region of size 6 [-Wformat-truncation=]
     1456 |    snprintf(name, sizeof(name), "isc-worker%04u", i);
          |                                            ^~~~
    task.c:1456:33: note: directive argument in the range [0, 4294967294]
     1456 |    snprintf(name, sizeof(name), "isc-worker%04u", i);
          |                                 ^~~~~~~~~~~~~~~~
    task.c:1456:4: note: ‘snprintf’ output between 15 and 21 bytes into a destination of size 16
     1456 |    snprintf(name, sizeof(name), "isc-worker%04u", i);
          |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    rrl.c: In function ‘debit_rrl_entry’:
    rrl.c:602:35: error: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 9 [-Werror=format-truncation=]
      602 |   snprintf(buf, sizeof(buf), "age=%d", age);
          |                                   ^~
    rrl.c:602:30: note: directive argument in the range [0, 2147483647]
      602 |   snprintf(buf, sizeof(buf), "age=%d", age);
          |                              ^~~~~~~~
    rrl.c:602:3: note: ‘snprintf’ output between 6 and 15 bytes into a destination of size 13
      602 |   snprintf(buf, sizeof(buf), "age=%d", age);
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    rrl.c:602:35: error: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 9 [-Werror=format-truncation=]
      602 |   snprintf(buf, sizeof(buf), "age=%d", age);
          |                                   ^~
    rrl.c:602:30: note: directive argument in the range [0, 2147483647]
      602 |   snprintf(buf, sizeof(buf), "age=%d", age);
          |                              ^~~~~~~~
    rrl.c:602:3: note: ‘snprintf’ output between 6 and 15 bytes into a destination of size 13
      602 |   snprintf(buf, sizeof(buf), "age=%d", age);
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    rrl.c:602:35: error: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 9 [-Werror=format-truncation=]
      602 |   snprintf(buf, sizeof(buf), "age=%d", age);
          |                                   ^~
    rrl.c:602:30: note: directive argument in the range [0, 2147483647]
      602 |   snprintf(buf, sizeof(buf), "age=%d", age);
          |                              ^~~~~~~~
    rrl.c:602:3: note: ‘snprintf’ output between 6 and 15 bytes into a destination of size 13
      602 |   snprintf(buf, sizeof(buf), "age=%d", age);
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    private_test.c: In function ‘private_nsec3_totext_test’:
    private_test.c:114:9: warning: array subscript 4 is outside array bounds of ‘uint32_t[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds]
      114 |  while (*sp == '\0' && slen > 0) {
          |         ^~~
    private_test.c:107:11: note: while referencing ‘salt’
      107 |  uint32_t salt;
          |           ^~~~

Prevent these warnings from being triggered by increasing the size of
the relevant arrays (task.c, rrl.c) and reordering conditions
(private_test.c).

(cherry picked from commit ce796ac1f4)
2019-06-11 10:19:26 +02:00
Witold KręcickiandMichał Kępień 171db1a22d Address GCC 8.3 -O3 compilation warning
Compiling with -O3 triggers the following warning with GCC 8.3:

    driver.c: In function ‘dlz_findzonedb’:
    driver.c:198:29: warning: ‘%u’ directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 99 [-Wformat-truncation=]
      snprintf(buffer, size, "%s#%u", addr_buf, port);
                                 ^~
    driver.c:198:25: note: directive argument in the range [0, 65535]
      snprintf(buffer, size, "%s#%u", addr_buf, port);
                             ^~~~~~~
    driver.c:198:2: note: ‘snprintf’ output between 3 and 106 bytes into a destination of size 100
      snprintf(buffer, size, "%s#%u", addr_buf, port);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Increase the size of the relevant array to prevent this warning from
being triggered.

(cherry picked from commit 44e6bb8b93)
2019-06-11 10:19:22 +02:00
Michał Kępień eb358d639f Make some build jobs use -O3 optimizations
Change the compiler optimization level for Debian sid build jobs from
-O2 to -O3 in order to enable triggering compilation warnings which are
not raised when -O2 is used.

(cherry picked from commit 3569487875)
2019-06-11 10:19:17 +02:00
Evan Hunt caf4f62769 Merge branch 'each-pandoc-args-v9_11' into 'v9_11'
specify title metadata and markdown format when calling pandoc

See merge request isc-projects/bind9!2024
2019-06-10 00:32:05 -04:00
Evan Hunt 9aeb4d1565 specify title metadata and markdown format when calling pandoc
this change silences a warning message and prevents the unwanted
use of smart quotes when using pandoc 2.7.1 to generate human-readable
versions of README and other markdown files.

(cherry picked from commit 3663f61e0e)
2019-06-09 21:31:08 -07:00
Evan Hunt d683a07054 Merge branch 'michal/minor-doc-fixes-v9_11' into 'v9_11'
[v9_11] Minor doc fixes

See merge request isc-projects/bind9!2020
2019-06-10 00:24:10 -04:00
Stephen MorrisandMichał Kępień 154aaf3fc0 Tweak paragraph style in release notes PDF 2019-06-07 08:37:39 +02:00
Stephen MorrisandMichał Kępień 500fed3714 Fix typos in README 2019-06-07 08:37:39 +02:00
Stephen MorrisandMichał Kępień 3432947681 Add missing information to README 2019-06-07 08:37:39 +02:00
Mark Andrews 787f92b3e4 Merge branch 'marka-capture-checkconf-output-v9_11' into 'v9_11'
capture named-checkconf output

See merge request isc-projects/bind9!2016
2019-06-06 04:59:42 -04:00
Mark Andrews 174b6be987 capture named-checkconf output
(cherry picked from commit 36dd373ab4)
2019-06-06 18:48:57 +10:00
Mark Andrews c295617cce Merge branch 'marka-rndc-manpage-fix-v9_11' into 'v9_11'
add missing word 'includes'

See merge request isc-projects/bind9!2013
2019-06-05 19:49:41 -04:00
Mark Andrews ad5fecbf88 add missing word 'includes'
(cherry picked from commit c6553eb3fc)
2019-06-06 09:33:37 +10:00
Mark Andrews 14d4f82dbd Merge branch '1017-remove-dead-stores-v9_11' into 'v9_11'
Resolve "remove dead stores"

See merge request isc-projects/bind9!2007
2019-06-04 02:03:03 -04:00
Mark Andrews f684368053 POST(optlen)
(cherry picked from commit 4e97f7dccc)
2019-06-04 15:49:16 +10:00
Mark Andrews 72e3f91a0e Merge branch 'cppcheck-and-cmocka-false-positive-v9_11' into 'v9_11'
teach clang analyser that _assert_int_equal and _assert_int_not_equal don't return on failure

See merge request isc-projects/bind9!2004
2019-06-04 01:43:26 -04:00
Mark Andrews 0c0ddaf3d1 teach cppcheck that _assert_int_equal and _assert_int_not_equal don't return on failure
(cherry picked from commit 5d5d751c7f)
2019-06-04 15:24:18 +10:00
Evan Hunt 183159b03a Merge branch '1061-update-supported-rfc-list-v9_14-v9_11' into 'v9_11'
Resolve "update supported RFC list"

See merge request isc-projects/bind9!1998
2019-05-31 19:51:10 -04:00
Mark AndrewsandEvan Hunt 44785aaebe add RFC6944 2019-05-31 16:50:35 -07:00
Mark AndrewsandEvan Hunt e986b4fdc6 update RFC compliance document 2019-05-31 16:49:23 -07:00
Michał Kępień f3d17f3953 Merge branch 'michal/backport-missing-legacy-system-test-checks' into 'v9_11'
Backport missing "legacy" system test checks

See merge request isc-projects/bind9!1986
2019-05-31 06:56:12 -04:00
Michał Kępień ed45b53cb7 Backport missing "legacy" system test checks
Backport "legacy" system test checks which are present in master and
v9_14 branches, but missing in the v9_11 branch, in order to improve the
consistency of this test across all maintained branches.  Note that the
"ednsnotimp" check is expected to succeed with 9.11 whereas it is
expected to fail with 9.14 and later versions.
2019-05-31 12:43:31 +02:00
Michał Kępień 72da3b3a71 Backport "-T {ednsformerr,ednsnotimp,ednsrefused}"
Backport named command line switches implemented in commit
c81c9660f5 as they are needed by the
"legacy" system checks which are currently present in master and v9_14
branches, but missing in the v9_11 branch.
2019-05-31 12:43:31 +02:00
Mark Andrews 0cade8d970 Merge branch '225-ed448-broken-with-openssl-1-1-1-pre6-v9_11' into 'v9_11'
Fix ASN.1 length values in Ed448 public and private key prefix blobs.

See merge request isc-projects/bind9!1989
2019-05-30 09:19:57 -04:00
Mark Andrews 1c5d91cd51 add CHANGES note
(cherry picked from commit 6c499a0c08)
2019-05-30 23:06:35 +10:00
Mark Andrews ac4d3e8496 test Ed448 against test vectors
(cherry picked from commit 20f2d9b41b)
2019-05-30 23:06:09 +10:00
Mark Andrews 9618d822ab fix Ed448 length values for precomputed ASN.1 prefix blobs
(cherry picked from commit 5da97eeea6)
2019-05-30 22:51:04 +10:00
Mark Andrews 9ed43f8b47 Merge branch '1011-use-proper-linker-config-on-hp-ux-v9_11' into 'v9_11'
Resolve "Use proper linker (config) on HP-UX"

See merge request isc-projects/bind9!1984
2019-05-29 21:45:37 -04:00
Mark Andrews aeee401237 ia64-hp-hpux uses .so files 2019-05-30 11:33:11 +10:00
Mark Andrews 8c386e636a regen
(cherry picked from commit 92325d3150)
2019-05-30 11:29:51 +10:00
Mark Andrews 3fbbaeb478 add link flags for ia64-hp-hpux
(cherry picked from commit 61752bf8ac)
2019-05-30 11:29:51 +10:00
Ondřej Surý 9d61217f31 Merge branch '1044-fix-LFS-flags-on-BSDs-v9_11' into 'v9_11'
Pull the values for LFS_{CFLAGS,LDFLAGS,LIBS} from autoconf instead using them directly in make

See merge request isc-projects/bind9!1980
2019-05-29 08:43:19 -04:00
Ondřej Surý f9880fcf6d Pull the values for LFS_{CFLAGS,LDFLAGS,LIBS} from autoconf instead using them directly in make
(cherry picked from commit d4596baed4)
2019-05-29 13:34:22 +02:00
Michał Kępień ccc4426ca0 Merge branch 'michal/legacy-system-test-fixes-v9_11' into 'v9_11'
[v9_11] "legacy" system test fixes

See merge request isc-projects/bind9!1975
2019-05-29 05:33:53 -04:00
Michał Kępień 9016f78a0f Optimize dig parameters to decrease test run time
Performing server setup checks using "+tries=3 +time=5" is redundant as
a single query is arguably good enough for determining whether a given
named instance was set up properly.  Only use multiple queries with a
long timeout for resolution checks in the "legacy" system test, in order
to significantly reduce its run time (on a contemporary machine, from
about 1m45s to 0m40s).

(cherry picked from commit 47b850348c)
2019-05-29 11:11:49 +02:00
Michał Kępień 2cd5954745 Make "plain" server setup checks more similar
Send a test TCP query to the "plain" server during its setup check to
improve its consistency with the setup check for the "plain + no TCP"
server.

(cherry picked from commit bb939a03ff)
2019-05-29 11:11:46 +02:00
Michał Kępień 45d2833684 Add more EDNS checks for dig output files
In the "legacy" system test, in order to make server setup checks more
consistent with each other, add further checks for either presence or
absence of the EDNS OPT pseudo-RR in the responses returned by the
tested named instances.

(cherry picked from commit 56ed1275c6)
2019-05-29 11:11:43 +02:00
Michał Kępień c7f5ba42f8 Do not ignore dig exit codes
Make sure the "legacy" system test fails if any exit code returned by
dig does not match the expected one.

(cherry picked from commit 4dea5cb799)
2019-05-29 11:11:40 +02:00
Michał Kępień abbe8c9649 Use helper functions for checking resolution
Extract repeated dig and grep calls into two helper shell functions,
resolution_succeeds() and resolution_fails(), in order to reduce code
duplication in the "legacy" system test, emphasize the similarity
between all the resolution checks in that test, and make the conditions
for success and failure uniform for all resolution checks in that test.

(cherry picked from commit effd16ab25)
2019-05-29 11:11:37 +02:00
Michał Kępień 35cccf0729 Use +dnssec instead of separate TXT records
When testing named instances which are configured to drop outgoing UDP
responses larger than 512 bytes, querying with DO=1 may be used instead
of querying for large TXT records as the effect achieved will be
identical: an unsigned response for a SOA query will be below 512 bytes
in size while a signed response for the same query will be over 512
bytes in size.  Doing this makes all resolution checks in the "legacy"
system test more similar.  Add checks for the TC flag being set in UDP
responses which are expected to be truncated to further make sure that
tested named instances behave as expected.

(cherry picked from commit aaf81ca6ef)
2019-05-29 11:11:31 +02:00
Michał Kępień 551f796313 Fix the name of the file to inspect
One of the checks in the "legacy" system test inspects dig.out.1.test$n
instead of dig.out.2.test$n.  Fix the file name used in that check.

(cherry picked from commit 3e7fa15ca3)
2019-05-29 11:11:25 +02:00
Michał Kępień fdc84ea63e Ensure queries expected to time out really do
Make sure that the "legacy" system test fails if queries which are
expected to time out do not really time out.

(cherry picked from commit 6283c1cc7e)
2019-05-29 11:11:21 +02:00
Michał Kępień 5094902487 Properly test servers with TCP support disabled
Sending TCP queries to test named instances with TCP support disabled
should cause dig output to contain the phrase "connection refused", not
"connection timed out", as such instances never open the relevant
sockets.  Make sure that the "legacy" system test fails if the expected
phrase is not found in any of the relevant files containing dig output.

(cherry picked from commit 9491616e5c)
2019-05-29 11:11:03 +02:00
Ondřej Surý b728d58c4e Merge branch '1044-include-config.h-in-gen.c-v9_11' into 'v9_11'
Resolve "gen fails to generate headers on Debian buster"

See merge request isc-projects/bind9!1977
2019-05-29 04:48:15 -04:00
Ondřej Surý 4203bdef8d Use getconf LFS_{CFLAGS,LDFLAGS,LIBS} to get flags to compile lib/dns/gen
On some systems (namely Debian buster armhf) the readdir() call fails
with `Value too large for defined data type` unless the
_FILE_OFFSET_BITS=64 is defined.  The correct way to fix this is to
get the appropriate compilation parameters from getconf system
interface.

(cherry picked from commit 4c7345bcb6)
2019-05-29 10:31:03 +02:00
Ondřej Surý bcf4391ec6 Exit the ./gen program on failed readdir() call
(cherry picked from commit 05b7c08a16)
2019-05-29 10:31:03 +02:00
Mark Andrews 885b276fb9 Merge branch '1056-misleading-error-message-when-trying-to-build-without-python-support-v9_11' into 'v9_11'
Resolve "Misleading error message when trying to build without Python support"

See merge request isc-projects/bind9!1966
2019-05-27 00:19:52 -04:00
Mark Andrews 8d0b0a106e fix configire error message to say --without-python
(cherry picked from commit d70bf76d80)
2019-05-27 14:03:46 +10:00
Mark Andrews 9ec933ae02 Merge branch '1028-dig-trace-should-not-set-rd-0-norecurse-for-the-initial-root-hints-query-v9_11' into 'v9_11'
Resolve "dig +trace should not set RD=0 (+norecurse) for the initial root hints query"

See merge request isc-projects/bind9!1956
2019-05-22 02:32:25 -04:00
Mark Andrews 7575b663ad Recurse to find the root server list with 'dig +trace'.
(cherry picked from commit e65d4989a1)
2019-05-22 16:06:46 +10:00
Evan Hunt 61ffd9b71d Merge branch '1031-multiple-rate-limit-clauses-are-unsupported' into 'v9_11'
Resolve "Multiple rate-limit clauses are unsupported"

See merge request isc-projects/bind9!1943
2019-05-20 12:34:51 -04:00
Mark AndrewsandEvan Hunt 2275630bc9 remove reference to rate-limit { domain ...; } 2019-05-20 09:34:08 -07:00
Evan Hunt 1bebdea211 Merge branch 'each-fix-counter' into 'v9_11'
fix missing test counter

See merge request isc-projects/bind9!1951
2019-05-19 00:28:22 -04:00
Evan Hunt 3b122f8d33 fix missing test counter 2019-05-18 21:14:33 -07:00
Evan Hunt 769f621358 Merge branch 'each-document-bug-ids-v9_11' into 'v9_11'
update README to explain gitlab numbers

See merge request isc-projects/bind9!1949
2019-05-17 02:45:29 -04:00
Evan Hunt 1140f825ec update README to explain gitlab numbers
(cherry picked from commit 45d76498d9)
2019-05-16 23:44:53 -07:00
Ondřej Surý edfde35f40 Merge branch '899-remove-unspec-v9_11' into 'v9_11'
Remove UNSPEC rrtype

See merge request isc-projects/bind9!1934
2019-05-13 00:18:50 -04:00
Witold KręcickiandOndřej Surý 71d3823dab Remove UNSPEC rrtype
(cherry picked from commit a8e2ca6f7d)
2019-05-13 10:54:10 +07:00
Tinderbox User b8170affae Merge branch 'prep-release' into v9_11 2019-05-10 05:03:58 +00:00
Tinderbox User d58e36b410 prep 9.11.7 2019-05-10 05:03:46 +00:00
Evan Hunt afc0f7f344 Merge branch '997-make-ntas-work-with-validating-forwarders-v9_11' into 'v9_11'
Make NTAs work with validating forwarders

See merge request isc-projects/bind9!1925
2019-05-10 00:18:30 -04:00
Michał KępieńandEvan Hunt 07c698469e Add CHANGES entry
5219.	[bug]		Negative trust anchors did not work with "forward only;"
			to validating resolvers. [GL #997]
2019-05-09 21:05:50 -07:00
Michał KępieńandEvan Hunt f04f107b7e Make NTAs work with validating forwarders
If named is configured to perform DNSSEC validation and also forwards
all queries ("forward only;") to validating resolvers, negative trust
anchors do not work properly because the CD bit is not set in queries
sent to the forwarders.  As a result, instead of retrieving bogus DNSSEC
material and making validation decisions based on its configuration,
named is only receiving SERVFAIL responses to queries for bogus data.
Fix by ensuring the CD bit is always set in queries sent to forwarders
if the query name is covered by an NTA.

(cherry picked from commit 5e80488270)
2019-05-09 21:05:50 -07:00
Evan Hunt 651aaf5542 Merge branch '958-improve-message-about-python-ply-v9_11' into 'v9_11'
Improve the error message about missing PLY Python package

See merge request isc-projects/bind9!1920
2019-05-09 23:25:05 -04:00
Ondřej SurýandEvan Hunt ab706cc6f2 Improve the error message about missing PLY Python package
Previously, only a message about missing Python was printed, which was
misleading to many users.  The new message clearly states that Python
AND PLY is required and prints basic instructions how to install PLY
package.

(cherry picked from commit 55b48700da)
2019-05-09 19:57:02 -07:00
Evan Hunt 45227c0a2e Merge branch 'each-sync-v9_11' into 'v9_11'
sync CHANGES from 9.11.6-P1

See merge request isc-projects/bind9!1917
2019-05-09 21:55:35 -04:00
Evan Hunt b4c8599961 sync CHANGES from 9.11.6-P1 2019-05-09 18:53:51 -07:00
Witold Krecicki ab1e4b5784 Merge branch '834-fix-races-in-socket-code-v2' into 'v9_11'
Fix race in unix socket code when closing a socket that has already sent a recv/send event.

See merge request isc-projects/bind9!1915
2019-05-09 13:57:11 -04:00
Witold KręcickiandWitold Kręcicki 1286d74c7d Fix race in unix socket code when closing a socket that has
already sent a recv/send event.

When doing isc_socket_cancel we need to purge the event that might
already be in flight. If it has been launched already we need
to inform it that it has to bail.
2019-05-09 18:48:06 +02:00
Ondřej Surý 5f26556546 Merge branch 'ondrej/reproducible-build-v9_11' into 'v9_11'
Make lib/dns/gen.c compatible with reproducible builds.

See merge request isc-projects/bind9!1913
2019-05-09 05:24:35 -04:00
Ondřej Surý 0dced2fa6a Make lib/dns/gen.c compatible with reproducible builds.
The gen.c will now use SOURCE_DATE_EPOCH[1] if found in environment
to make the build more reproducible build friendly.

1. https://reproducible-builds.org/specs/source-date-epoch/

(cherry picked from commit c8cb612d39)
2019-05-09 16:05:38 +07:00
Mark Andrews aca6ebadc4 Merge branch '960-add-edns-client-tag-and-edns-server-tag-v9_11' into 'v9_11'
Resolve "Add EDNS Client Tag and EDNS Server Tag"

See merge request isc-projects/bind9!1911
2019-05-09 04:39:06 -04:00
Mark Andrews 10c53d2873 Recognise EDNS Client Tag and EDNS Server Tag
(cherry picked from commit ee7cf180b3)
2019-05-09 18:24:57 +10:00
Evan Hunt ac9286b732 Merge branch '868-fix-trusted-keys-handling-with-dnssec-validation-auto-v9_14-v9_11' into 'v9_11'
fix incorrect behavior mixing trusted-keys with validation auto

See merge request isc-projects/bind9!1909
2019-05-09 02:13:16 -04:00
Evan Hunt febbd90850 CHANGES, release notes 2019-05-08 23:02:42 -07:00
Evan Hunt 722d0f57ed warn about the use of trusted-keys and managed-keys for the same name 2019-05-08 23:02:42 -07:00
Mark Andrews 3c45f0dd0b Merge branch '852-bind-returning-malformed-packet-error-when-sshfp-record-has-fingerprint-value-less-than-4-characters-v9_11' into 'v9_11'
Resolve "Bind returning malformed packet error when sshfp record has fingerprint value less than 4 characters"

See merge request isc-projects/bind9!1906
2019-05-08 19:18:22 -04:00
Mark Andrews 702cc2dde3 enforce known SSHFP finger print lengths
(cherry picked from commit 1722728c80)
2019-05-09 08:49:19 +10:00
Mark Andrews 8cb78ee508 Merge branch '991-provide-ixfr-should-only-be-tests-on-tcp-clients-v9_11' into 'v9_11'
Resolve "provide-ixfr should only be tested on TCP clients."

See merge request isc-projects/bind9!1901
2019-05-07 00:46:17 -04:00
Mark Andrews 1cc0bf2cee add CHANGES
(cherry picked from commit ba1d7f3a07)
2019-05-07 14:34:00 +10:00
Mark Andrews d72f659a35 add test for 'provide-ixfr no;' ; add forensics support
(cherry picked from commit d547465af5)
2019-05-07 14:34:00 +10:00
Mark Andrews 8b8f0dc160 only test provideixfr if the transport is TCP
(cherry picked from commit 18c49853e3)
2019-05-07 14:06:25 +10:00
Evan Hunt 510f8d9ff7 Merge branch 'each-win32-parallel-tests-v9_11' into 'v9_11'
enable parallel system tests on windows

See merge request isc-projects/bind9!1895
2019-05-06 22:04:51 -04:00
Evan Hunt 52347fa883 CHANGES
(cherry picked from commit d3cd0729c9)
2019-05-06 18:38:34 -07:00
Evan Hunt 50dfe1aa2b enable parallel system tests on windows
this moves the creation of "parallel.mk" into a separate shell script
instead of bin/tests/system/Makefile. that shell script can now be
executed by runall.sh, allowing us to make use of the cygwin "make"
command, which supports parallel execution.

(cherry picked from commit bbae24c140)
2019-05-06 18:38:34 -07:00
Evan Hunt 274da3c24b Merge branch 'each-fix-rpz-test-v9_11' into 'v9_11'
RPZ test had spurious references to DNSRPS, which isn't in 9.11

See merge request isc-projects/bind9!1898
2019-05-06 21:17:38 -04:00
Evan Hunt 111c692efd RPZ test had spurious references to DNSRPS, which isn't in 9.11 2019-05-06 18:05:49 -07:00
Mark Andrews 90a6482985 Merge branch '983-delv-www-isc-org-any-rtrace-multiline-leaks-memory-v9_11' into 'v9_11'
Resolve "'delv www.isc.org ANY +rtrace +multiline' leaks memory"

See merge request isc-projects/bind9!1897
2019-05-06 20:52:47 -04:00
Mark Andrews eef0430b75 add CHANGES note
(cherry picked from commit ce5520b695)
2019-05-07 10:35:03 +10:00
Mark Andrews c26a421aab check that delv -t any works
(cherry picked from commit 6999bee7ef)
2019-05-07 10:34:30 +10:00
Mark Andrews 595544329a fix whitespace
(cherry picked from commit 32ba5a0494)
2019-05-07 10:28:48 +10:00
Mark Andrews 333116ac5c return rdatasets when processing ANY queries in client_resfind
(cherry picked from commit 127333c71f)
2019-05-07 10:28:47 +10:00
Mark Andrews 405738b62f Merge branch '1000-arm-doc-rpz-nodata-policy-says-ancount-1-v9_11' into 'v9_11'
Resolve "ARM doc RPZ NODATA policy says ANCOUNT=1"

See merge request isc-projects/bind9!1891
2019-05-06 04:06:56 -04:00
Mark Andrews 401f9c4a3d A NODATA response has ANCOUNT of 0 assuming no CNAME/DNAMES
(cherry picked from commit 4889e06c3a)
2019-05-06 17:54:18 +10:00
Michał Kępień 16bb74b1bc Merge branch 'michal/simplify-trailing-period-handling-in-system-tests-v9_11' into 'v9_11'
[v9_11] Simplify trailing period handling in system tests

See merge request isc-projects/bind9!1878
2019-04-26 15:12:12 -04:00
Michał Kępień 72c7bc03c9 Simplify trailing period handling in system tests
Windows systems do not allow a trailing period in file names while Unix
systems do.  When BIND system tests are run, the $TP environment
variable is set to an empty string on Windows systems and to "." on Unix
systems.  This environment variable is then used by system test scripts
for handling this discrepancy properly.

In multiple system test scripts, a variable holding a zone name is set
to a string with a trailing period while the names of the zone's
corresponding dlvset-* and/or dsset-* files are determined using
numerous sed invocations like the following one:

    dlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"

In order to improve code readability, use zone names without trailing
periods and replace sed invocations with variable substitutions.

To retain local consistency, also remove the trailing period from
certain other zone names used in system tests that are not subsequently
processed using sed.

(cherry picked from commit da2c1b74ad)
2019-04-26 20:50:55 +02:00
Ondřej Surý 343fa39055 Merge branch 'prep-release-v9_11' into 'v9_11'
Prep release v9 11

See merge request isc-projects/bind9!1865
2019-04-25 10:09:51 -04:00
Tinderbox UserandOndřej Surý a648e07bed doc rebuild
(cherry picked from commit 40b034f5b8)
2019-04-25 15:56:01 +02:00
Tinderbox UserandOndřej Surý 7c6b5f2eaa prep 9.11.6-P1
(cherry picked from commit 6195f229b6)
2019-04-25 15:55:59 +02:00
Ondřej Surý aaee75288a Merge branch '999-tcp-client-crash-v9_11-locks' into 'v9_11'
Replace atomic operations in bin/named/client.c with isc_refcount reference counting

See merge request isc-projects/bind9!1864
2019-04-25 09:54:09 -04:00
Ondřej Surý ef49780d30 Replace atomic operations in bin/named/client.c with isc_refcount reference counting 2019-04-25 15:40:06 +02:00
Ondřej Surý 581ae79528 Merge branch '615-tcp-client-crash-v9_11-v9_11_6_patch-v9_11' into 'v9_11'
Resolve "tcp-clients mostly ineffective"

See merge request isc-projects/bind9!1863
2019-04-25 09:38:41 -04:00
Evan HuntandOndřej Surý b96a3a0c79 CHANGES, release note
(cherry picked from commit 5e18ad05f4)
2019-04-25 15:05:12 +02:00
Evan HuntandOndřej Surý 59434b987e restore allowance for tcp-clients < interfaces
in the "refactor tcpquota and pipeline refs" commit, the counting
of active interfaces was tightened in such a way that named could
fail to listen on an interface if there were more interfaces than
tcp-clients. when checking the quota to start accepting on an
interface, if the number of active clients was above zero, then
it was presumed that some other client was able to handle accepting
new connections. this, however, ignored the fact that the current client
could be included in that count, so if the quota was already exceeded
before all the interfaces were listening, some interfaces would never
listen.

we now check whether the current client has been marked active; if so,
then the number of active clients on the interface must be greater
than 1, not 0.

(cherry picked from commit 0b4e2cd4c3192ba88569dd344f542a8cc43742b5)
(cherry picked from commit d01023aaac)
2019-04-25 15:04:26 +02:00
Evan HuntandOndřej Surý c47ccf630f refactor tcpquota and pipeline refs; allow special-case overrun in isc_quota
- if the TCP quota has been exceeded but there are no clients listening
  for new connections on the interface, we can now force attachment to the
  quota using isc_quota_force(), instead of carrying on with the quota not
  attached.
- the TCP client quota is now referenced via a reference-counted
  'ns_tcpconn' object, one of which is created whenever a client begins
  listening for new connections, and attached to by members of that
  client's pipeline group. when the last reference to the tcpconn
  object is detached, it is freed and the TCP quota slot is released.
- reduce code duplication by adding mark_tcp_active() function.
- convert counters to atomic.

(cherry picked from commit 7e8222378ca24f1302a0c1c638565050ab04681b)
(cherry picked from commit 4939451275722bfda490ea86ca13e84f6bc71e46)
(cherry picked from commit 13f7c918b8)
2019-04-25 15:04:26 +02:00
Evan HuntandOndřej Surý 2ab8a085b3 better tcpquota accounting and client mortality checks
- ensure that tcpactive is cleaned up correctly when accept() fails.
- set 'client->tcpattached' when the client is attached to the tcpquota.
  carry this value on to new clients sharing the same pipeline group.
  don't call isc_quota_detach() on the tcpquota unless tcpattached is
  set.  this way clients that were allowed to accept TCP connections
  despite being over quota (and therefore, were never attached to the
  quota) will not inadvertently detach from it and mess up the
  accounting.
- simplify the code for tcpquota disconnection by using a new function
  tcpquota_disconnect().
- before deciding whether to reject a new connection due to quota
  exhaustion, check to see whether there are at least two active
  clients. previously, this was "at least one", but that could be
  insufficient if there was one other client in READING state (waiting
  for messages on an open connection) but none in READY (listening
  for new connections).
- before deciding whether a TCP client object can to go inactive, we
  must ensure there are enough other clients to maintain service
  afterward -- both accepting new connections and reading/processing new
  queries.  A TCP client can't shut down unless at least one
  client is accepting new connections and (in the case of pipelined
  clients) at least one additional client is waiting to read.

(cherry picked from commit c7394738b2445c16f728a88394864dd61baad900)
(cherry picked from commit e965d5f11d3d0f6d59704e614fceca2093cb1856)
(cherry picked from commit 87d4311614)
2019-04-25 15:04:26 +02:00
Michał KępieńandOndřej Surý 366b4e1ede use reference counter for pipeline groups (v3)
Track pipeline groups using a shared reference counter
instead of a linked list.

(cherry picked from commit 513afd33eb17d5dc41a3f0d2d38204ef8c5f6f91)
(cherry picked from commit 9446629b73)
2019-04-25 15:04:25 +02:00
Witold KręcickiandOndřej Surý 719f604e3f tcp-clients could still be exceeded (v2)
the TCP client quota could still be ineffective under some
circumstances.  this change:

- improves quota accounting to ensure that TCP clients are
  properly limited, while still guaranteeing that at least one client
  is always available to serve TCP connections on each interface.
- uses more descriptive names and removes one (ntcptarget) that
  was no longer needed
- adds comments

(cherry picked from commit 924651f1d5e605cd186d03f4f7340bcc54d77cc2)
(cherry picked from commit 55a7a458e3)
2019-04-25 15:04:25 +02:00
Witold KręcickiandOndřej Surý ec2d50da8d fix enforcement of tcp-clients (v1)
tcp-clients settings could be exceeded in some cases by
creating more and more active TCP clients that are over
the set quota limit, which in the end could lead to a
DoS attack by e.g. exhaustion of file descriptors.

If TCP client we're closing went over the quota (so it's
not attached to a quota) mark it as mortal - so that it
will be destroyed and not set up to listen for new
connections - unless it's the last client for a specific
interface.

(cherry picked from commit f97131d21b97381cef72b971b157345c1f9b4115)
(cherry picked from commit 9689ffc485)
2019-04-25 15:04:25 +02:00
Matthijs Mekking f7f3b0cd8c Merge branch 'matthijs-fix-dnssec-test-intermittent-failure-kskonly-v9_11' into 'v9_11'
Fix dnssec test intermittent failure related to kskonly bugfix

See merge request isc-projects/bind9!1858
2019-04-24 03:54:42 -04:00
Matthijs Mekking 3c9a7ffac8 Wait for correct log message in dnssec/tests.sh
In 9.11 there are some log messages not existing, but the tests
rely on.  Adjust the grep call that gives confidence the rollover
step has occurred.
2019-04-24 09:41:22 +02:00
Matthijs Mekking 9c77cd8306 Harden grep key ID calls
Key IDs may accidentally match dig output that is not the key ID (for
example the RRSIG inception or expiration time, the query ID, ...).
Search for key ID + signer name should prevent that, as that is what
only should occur in the RRSIG record, and signer name always follows
the key ID.

(cherry picked from commit 83473b9758)
2019-04-24 09:41:22 +02:00
Matthijs Mekking d8de28610d Remove sleeps
Remove sleep calls from test, rely on wait_for_log().  Make
wait_for_log() and dnssec_loadkeys_on() fail the test if the
appropriate log line is not found.

Slightly adjust the echo_i() lines to print only the key ID (not the
key name).

(cherry picked from commit 67f0635f3c)
2019-04-24 09:41:22 +02:00
Mark Andrews 216752e3b2 Merge branch '995-dlz_open_driver-fix-build-failure-without-dlfcn-h-v9_11' into 'v9_11'
Resolve "dlz_open_driver: fix build failure without dlfcn.h"

See merge request isc-projects/bind9!1855
2019-04-23 21:02:25 -04:00
Mark Andrews 29525f639f add CHANGES
(cherry picked from commit 19e4098139)
2019-04-24 09:31:51 +10:00
Mark Andrews 4ab8411c4c conditionally include <dlfcn.h>
(cherry picked from commit eee8084734)
2019-04-24 09:31:20 +10:00
Michał Kępień 22e81bdc82 Merge branch 'michal/minor-nsupdate-system-test-tweaks-v9_11' into 'v9_11'
[v9_11] Minor "nsupdate" system test tweaks

See merge request isc-projects/bind9!1849
2019-04-23 09:20:07 -04:00
Michał Kępień 4e2cc911d2 Wait more than 1 second for NSEC3 chain changes
One second may not be enough for an NSEC3 chain change triggered by an
UPDATE message to complete.  Wait up to 10 seconds when checking whether
a given NSEC3 chain change is complete in the "nsupdate" system test.

(cherry picked from commit f8746cddbc)
2019-04-23 14:59:30 +02:00
Michał Kępień 5d8147fa70 Remove redundant sleeps
In the "nsupdate" system test, do not sleep before checking results of
changes which are expected to be processed synchronously, i.e. before
nsupdate returns.

(cherry picked from commit 1c8e5ea333)
2019-04-23 14:59:29 +02:00
Mark Andrews fc9b7cea99 Merge branch '962-bind-just-disables-gssapi-support-if-no-gssapi-krb5-headers-found-v9_11' into 'v9_11'
Resolve "Bind just disables GSSAPI support if no GSSAPI/KRB5 headers found"

See merge request isc-projects/bind9!1843
2019-04-22 23:15:15 -04:00
Mark Andrews e55a19c8f0 make 'configure --with-gssapi=yes' fatal if support is not found
(cherry picked from commit e420078c63)
2019-04-23 13:01:17 +10:00
Mark Andrews 6d39087183 Merge branch 'incorrect-use-of-bool-v9_11' into 'v9_11'
using 0 instead of false

See merge request isc-projects/bind9!1840
2019-04-22 21:58:46 -04:00
Mark Andrews ac77f8df02 using 0 instead of false
(cherry picked from commit da7f683abf)
2019-04-23 11:46:12 +10:00
Michał Kępień 2dee058987 Merge branch 'michal/win32-system-test-fixes-v9_11' into 'v9_11'
[v9_11] Miscellaneous Windows system test fixes

See merge request isc-projects/bind9!1835
2019-04-19 05:52:17 -04:00
Michał Kępień f78f6439b7 Update interface lists in ifconfig scripts
Make bin/tests/system/ifconfig.bat also configure addresses ending with
9 and 10, so that the script is in sync with its Unix counterpart.

Update comments listing the interfaces created by ifconfig.{bat,sh} so
that they do not include addresses whose last octet is zero (since an
address like 10.53.1.0/24 is not a valid host address and thus the
aforementioned scripts do not even attempt configuring them).

(cherry picked from commit b6c1cdfffe)
2019-04-19 11:30:32 +02:00
Michał Kępień 4f992ab35f Fix the "dnssec" system test on Windows
On Windows, the bin/tests/system/dnssec/signer/example.db.signed file
contains carriage return characters at the end of each line.  Remove
them before passing the aforementioned file to the awk script extracting
key IDs so that the latter can work properly.

(cherry picked from commit e4280ed9f5)
2019-04-19 11:30:27 +02:00
Michał Kępień d9688b58c8 Do not wait for lock file cleanup on Windows
As signals are currently not handled by named on Windows, instances
terminated using signals are not able to perform a clean shutdown, which
involves e.g. removing the lock file.  Thus, waiting for a given
instance's lock file to be removed beforing assuming it is shut down
is pointless on Windows, so do not even attempt it.

(cherry picked from commit 761ba4514f)
2019-04-19 11:29:44 +02:00
Michał Kępień 0aec955235 Merge branch '979-win32-remove-lock-file-upon-shutdown-v9_11' into 'v9_11'
[v9_11] win32: remove lock file upon shutdown

See merge request isc-projects/bind9!1833
2019-04-19 05:20:32 -04:00
Michał Kępień 48ddc78fb2 Add CHANGES entry
5214.	[bug]		win32: named now removes its lock file upon shutdown.
			[GL #979]

(cherry picked from commit e048436805)
2019-04-19 11:00:47 +02:00
Michał Kępień 8e18f02626 win32: remove lock file upon shutdown
Upon named shutdown, the lock file should not just be unlocked but also
removed.

(cherry picked from commit c506077da5)
2019-04-19 11:00:46 +02:00
Michał Kępień 2adc28712d Merge branch '978-win32-fix-service-state-reported-during-shutdown-v9_11' into 'v9_11'
[v9_11] win32: fix service state reported during shutdown

See merge request isc-projects/bind9!1831
2019-04-19 04:19:36 -04:00
Michał Kępień 89c8fed449 Add CHANGES entry
5213.	[bug]		win32: Eliminated a race which allowed named.exe running
			as a service to be killed prematurely during shutdown.
			[GL #978]

(cherry picked from commit e7332343ed)
2019-04-19 09:54:20 +02:00
Michał Kępień d6b8c7da4b win32: fix service state reported during shutdown
When a Windows service receives a request to stop, it should not set its
state to SERVICE_STOPPED until it is completely shut down as doing that
allows the operating system to kill that service prematurely, which in
the case of named may e.g. prevent the PID file and/or the lock file
from being cleaned up.

Set service state to SERVICE_STOP_PENDING when named begins its shutdown
and only report the SERVICE_STOPPED state immediately before exiting.

(cherry picked from commit 964749dfdb)
2019-04-19 09:54:06 +02:00
Matthijs Mekking 00e59acab4 Merge branch '757-unsupported-algorithms-v9_11' into 'v9_11'
Resolve "Investigate and fix what happens when managed-key algorithm is not supported"

See merge request isc-projects/bind9!1825
2019-04-19 03:14:15 -04:00
Matthijs Mekking b053cd4acc Update copyrights 2019-04-19 08:45:12 +02:00
Matthijs Mekking 93f33cdd0f Add documentation
(cherry picked from commit a67dac5d21)
2019-04-19 08:45:12 +02:00
Matthijs Mekking d07f643557 DLV tests unsupported/disabled algorithms
This tests both the cases when the DLV trust anchor is of an
unsupported or disabled algorithm, as well as if the DLV zone
contains a key with an unsupported or disabled algorithm.

(cherry picked from commit 3b7c849a3f)
2019-04-19 08:45:12 +02:00
Matthijs Mekking a97061c939 Ignore unsupported trust anchors
(cherry picked from commit 1d45ad8f39)

Some adaptations were made to make the code compile and tests pass.
2019-04-19 08:45:12 +02:00
Matthijs Mekking 469ef284b3 Add inline test related to unsupported algorithms
(cherry picked from commit 924fdad0e5)
2019-04-18 15:12:04 +02:00
Matthijs Mekking 8cef3952b6 System tests for tools and unsupported algorithms
(cherry picked from commit dfcf9bb0ed)
2019-04-18 15:12:04 +02:00
Ondřej Surý 48fccbf23b Merge branch '989-check-for-typeof-extension-v9_11' into 'v9_11'
(v9_11) Use uintmax_t instead of typeof(x) in the ISC_ALIGN macro on non-GNUC systems

See merge request isc-projects/bind9!1828
2019-04-18 07:34:19 -04:00
Ondřej Surý de4fe3ed32 On non-GNUC systems, use uintmax_t in the ISC_ALIGN macro
(cherry picked from commit 2e40cc94dc)
2019-04-18 13:18:10 +02:00
Ondřej Surý 7123a4703b Merge branch 'ondrej/text-files-dont-need-copyright-v9_11' into 'v9_11'
(v9_11) Simple text files don't need copyright header

See merge request isc-projects/bind9!1823
2019-04-18 03:26:23 -04:00
Ondřej Surý c76c0f4489 Simple text files with docs on build or design don't really need copyright on their own
(cherry picked from commit 1877139a32)
2019-04-18 08:59:43 +02:00
Ondřej Surý c266d181b9 Merge branch 'ondrej/refactor-DNS_RDATASET_FIXED-code-flow-v9_11' into 'v9_11'
(v9_11) Refactor the DNS_RDATASET_FIXED code to use macros instead of ifdefs

See merge request isc-projects/bind9!1818
2019-04-17 05:50:25 -04:00
Ondřej Surý 376800b2ad Refactor the DNS_RDATASET_FIXED code to use constants instead of ifdefs
(cherry picked from commit 4edbb773a1)
2019-04-17 11:34:49 +02:00
Matthijs Mekking f5b60bb8d7 Merge branch '763-matthijs-active-zsk-but-ksk-only-v9_11' into 'v9_11'
Don't sign DNSKEY RRset with ZSK if KSK is offline

See merge request isc-projects/bind9!1797
2019-04-12 10:21:15 -04:00
Matthijs Mekking ce3d35d950 Fix dnssec test
The following changes were needed:

* Remove dnskey-sig-validity option (added in 9.12)
* Replace rndccmd, dig_with_opts with export variables
* Remove tests for CDNSKEY and CDS (in 9.11 always signed with ZSK)
2019-04-12 15:57:31 +02:00
Matthijs Mekking c5e1bfc6f9 Fix copyrights 2019-04-12 15:57:31 +02:00
Matthijs Mekking 4af2d5b6d6 With update-check-ksk also consider offline keys
The option `update-check-ksk` will look if both KSK and ZSK are
available before signing records.  It will make sure the keys are
active and available.  However, for operational practices keys may
be offline.  This commit relaxes the update-check-ksk check and will
mark a key that is offline to be available when adding signature
tasks.

(cherry picked from commit 3cb8c49c73)
(cherry picked from commit b508cffeee3bfb8bc7dcf39db59ec3782a5d9e4c)
2019-04-12 15:57:31 +02:00
Matthijs Mekking 9079ae03c7 Style: some curly brackets
(cherry picked from commit 2e83e3255a)
(cherry picked from commit 42b0bf4d3bab180876d4803fe2ec1f6e93064b28)
2019-04-12 15:57:15 +02:00
Matthijs Mekking 944c2b5a74 Add detail on echo message in autosign test
(cherry picked from commit d330986374)
(cherry picked from commit d281d9ae99985772db13fb3dce0c0e7e2fb5f5b8)
2019-04-12 15:57:15 +02:00
Matthijs Mekking 537a88e403 Add test for ZSK rollover while KSK offline
This commit adds a lengthy test where the ZSK is rolled but the
KSK is offline (except for when the DNSKEY RRset is changed).  The
specific scenario has the `dnskey-kskonly` configuration option set
meaning the DNSKEY RRset should only be signed with the KSK.

A new zone `updatecheck-kskonly.secure` is added to test against,
that can be dynamically updated, and that can be controlled with rndc
to load the DNSSEC keys.

There are some pre-checks for this test to make sure everything is
fine before the ZSK roll, after the new ZSK is published, and after
the old ZSK is deleted.  Note there are actually two ZSK rolls in
quick succession.

When the latest added ZSK becomes active and its predecessor becomes
inactive, the KSK is offline.  However, the DNSKEY RRset did not
change and it has a good signature that is valid for long enough.
The expected behavior is that the DNSKEY RRset stays signed with
the KSK only (signature does not need to change).  However, the
test will fail because after reconfiguring the keys for the zone,
it wants to add re-sign tasks for the new active keys (in sign_apex).
Because the KSK is offline, named determines that the only other
active key, the latest ZSK, will be used to resign the DNSKEY RRset,
in addition to keeping the RRSIG of the KSK.

The question is: Why do we need to resign the DNSKEY RRset
immediately when a new key becomes active?  This is not required,
only once the next resign task is triggered the new active key
should replace signatures that are in need of refreshing.

(cherry-picked from commit c48b85d0a3c34480179d44e736e3e535dbae1001)
2019-04-12 15:57:15 +02:00
Mark Andrews 13dcf61a98 Merge branch '980-util-update_copyrights-now-needs-to-handle-files-with-cr-lf-endings-v9_11' into 'v9_11'
Resolve "util/update_copyrights now needs to handle files with CR LF endings."

See merge request isc-projects/bind9!1802
2019-04-12 00:45:20 -04:00
Mark Andrews 66b82fabaa support files which have CR LF ending like those in win32utils
(cherry picked from commit e76936fd85)
2019-04-12 14:32:08 +10:00
Evan Hunt c39fc19d75 Merge branch '963-dnstap-check-ra-v9_14-v9_11' into 'v9_11'
dnstap: if recursion is not available, log queries as AQ instead of CQ

See merge request isc-projects/bind9!1800
2019-04-11 22:26:22 -04:00
Evan Hunt 9c9ee35936 CHANGES
(cherry picked from commit ded4650794)
2019-04-11 19:12:47 -07:00
Evan Hunt fbcaadb22e dnstap: if recursion is not available, log queries as AQ instead of CQ
(cherry picked from commit 1f578cdb12)
(cherry picked from commit f6c3b13522)
2019-04-11 19:12:47 -07:00
Mark Andrews c8370c486a Merge branch '899-add-totext-fromtext-to-wirechecks-v9_11' into 'v9_11'
Run wire check through "totext" and "fromtext" methods including multi-line.

See merge request isc-projects/bind9!1790
2019-04-11 06:04:57 -04:00
Mark Andrews d37c85a302 Add CHANGES
(cherry picked from commit 307a1b563b)
2019-04-11 19:52:41 +10:00
Mark Andrews cba5989651 Add debug printfs
(cherry picked from commit b78e128a2f)
2019-04-11 19:52:38 +10:00
Mark Andrews f3922dd9c1 Prevent WIRE_INVALID() being called without a argument
(cherry picked from commit e73a5b0ce3)
2019-04-11 19:51:06 +10:00
Mark Andrews 478de1f761 Check multi-line output from dns_rdata_tofmttext()
Check that multi-line output from dns_rdata_tofmttext() can be read
back in by dns_rdata_fromtext().

(cherry picked from commit b089f43b7a)
2019-04-11 19:51:06 +10:00
Mark Andrews c6ca84a0c8 Process master file comments and make input invalid again
(cherry picked from commit 1a75a5cee6)
2019-04-11 19:51:05 +10:00
Mark Andrews 1a036f324f Set 'specials' to match 'specials' in 'lib/dns/master.c'
(cherry picked from commit 7941a9554f)
2019-04-11 19:51:05 +10:00
Mark Andrews 2c5652067f Fix whitespace so that the names align
(cherry picked from commit cc5e16e4d3)
2019-04-11 19:50:41 +10:00
Mark Andrews 8a7255c9fc Add dns_rdata_totext() and dns_rdata_fromtext() to fromwire
Add dns_rdata_totext() and dns_rdata_fromtext() to fromwire for
valid inputs to ensure that what we accept in dns_rdata_fromwire()
can be written out and read back in.

(cherry picked from commit 36f30f5731)
2019-04-11 19:48:02 +10:00
Mark Andrews 377669da45 Merge branch '965-delv-prints-weird-ttl-values-2-v9_11' into 'v9_11'
Test that dig and delve print correct TTL values.

See merge request isc-projects/bind9!1787
2019-04-10 02:32:04 -04:00
Mark Andrews d5da331093 add CHANGES
(cherry picked from commit dfc485b02e)
2019-04-10 16:20:12 +10:00
Matthijs MekkingandMark Andrews c272e6799f Check dig TTLs.
(cherry picked from commit 195277ca6d)
2019-04-10 16:19:32 +10:00
Mark Andrews 8015e95b77 Check delv TTLs.
(cherry picked from commit 146202d6a8)
2019-04-10 16:10:39 +10:00
Mark Andrews 0348c1ca6b Merge branch '899-enforce-hash-in-ds-v9_11' into 'v9_11'
enforce DS hash exists

See merge request isc-projects/bind9!1784
2019-04-10 02:00:50 -04:00
Mark Andrews 4bb239abbe add CHANGES
(cherry picked from commit 97b7360ce1)
2019-04-10 15:44:00 +10:00
Mark Andrews 4e4d7d5b8b add ds unit test
(cherry picked from commit 6eb28eda1e)
2019-04-10 15:44:00 +10:00
Mark Andrews 8df14d2f89 enforce DS hash exists
(cherry picked from commit b274f3fad7)
2019-04-10 14:44:23 +10:00
Mark Andrews 13c87fdf99 Merge branch '852-run-fromtext-through-fromwire-v9_11' into 'v9_11'
check that from fromtext produces valid towire input

See merge request isc-projects/bind9!1781
2019-04-09 23:37:59 -04:00
Mark Andrews a8ead01989 add CHANGES
(cherry picked from commit d712b88048)
2019-04-10 13:24:42 +10:00
Mark Andrews 94e852bdcf check that from fromtext produces valid towire input
(cherry picked from commit 7b0a653858)
2019-04-10 13:24:42 +10:00
Ondřej Surý 17e6388db2 Merge branch '971-downgrade-DLZ_DBCLIENTINFO_VERSION-in-dlz_minimal.h-v9_11' into 'v9_11'
(v9_11) Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c

See merge request isc-projects/bind9!1779
2019-04-09 15:45:11 -04:00
Ondřej Surý 7b537d1f05 Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c
(cherry picked from commit a6f09b2255)
2019-04-09 20:28:09 +01:00
Mark Andrews 853caac188 Merge branch '899-fromwire-check-flags-for-nokey-v9_11' into 'v9_11'
Check KEY flags for empty key in fromwire method

See merge request isc-projects/bind9!1777
2019-04-09 00:39:59 -04:00
Mark Andrews 449129b8c9 add CHANGES
(cherry picked from commit f78c688c4f)
2019-04-09 14:27:40 +10:00
Mark Andrews b35eacbad2 for rkey flags MUST be zero
(cherry picked from commit 82d4931440)
2019-04-09 14:27:11 +10:00
Mark Andrews bbd7a496be check flags for no key in fromwire for *KEY
(cherry picked from commit 2592e91516)
2019-04-09 14:27:03 +10:00
Michał Kępień 0efc1c80ac Merge branch '893-do-not-rely-on-default-dig-options-in-system-tests-v9_11' into 'v9_11'
[v9_11] Do not rely on default dig options in system tests

See merge request isc-projects/bind9!1765
2019-04-03 07:21:58 -04:00
Michał Kępień 68601bd70f Do not rely on default dig options in system tests
Some system tests assume dig's default setings are in effect.  While
these defaults may only be silently overridden (because of specific
options set in /etc/resolv.conf) for BIND releases using liblwres for
parsing /etc/resolv.conf (i.e. BIND 9.11 and older), it is arguably
prudent to make sure that tests relying on specific +timeout and +tries
settings specify these explicitly in their dig invocations, in order to
prevent test failures from being triggered by any potential changes to
current defaults.

(cherry picked from commit b6cce0fb8b)
2019-04-03 13:00:23 +02:00
Michał Kępień eb4f80693e Merge branch 'michal/add-r-randfile-where-it-is-missing' into 'v9_11'
Add "-r $RANDFILE" where it is missing

See merge request isc-projects/bind9!1763
2019-04-02 07:29:02 -04:00
Michał Kępień 59e1329e9b Add "-r $RANDFILE" where it is missing
If the path to the source of random data is not passed explicitly to
dnssec-keygen or dnssec-signzone and the --with-randomdev compile-time
switch is not used, the aforementioned utilities will hang if the
default source of random data (/dev/random) runs out of entropy.  Use
"-r $RANDFILE" to prevent that from happening in affected system tests.
2019-04-02 13:09:08 +02:00
Mark Andrews 9117b34444 Merge branch '920-see-problem-when-multiple-sigs-with-besteffort-parsing-v9_11' into 'v9_11'
Address problems with best effort parsing.

See merge request isc-projects/bind9!1753
2019-03-26 06:48:30 -04:00
Mark Andrews dbd53847a3 add CHANGES
(cherry picked from commit b779342017)
2019-03-26 21:33:18 +11:00
Witold KręcickiandMark Andrews 736d8c5b80 Fix assertion failure in nslookup/dig/mdig when message has multiple SIG(0) options.
When parsing message with DNS_MESSAGE_BESTEFFORT (used exclusively in
tools, never in named itself) if we hit an invalid SIG(0) in wrong
place we continue parsing the message, and put the sig0 in msg->sig0.
If we then hit another sig0 in a proper place we see that msg->sig0
is already 'taken' and we don't free name and rdataset, and we don't
set seen_problem. This causes an assertion failure.
This fixes that issue by setting seen_problem if we hit second sig0,
tsig or opt, which causes name and rdataset to be always freed.

(cherry picked from commit 51a55ddbb7)
2019-03-26 21:32:41 +11:00
Mark Andrews e3409b6c00 Merge branch '948-dlzexternal-driver-so-failing-to-build-macos-v9_11' into 'v9_11'
Resolve "dlzexternal/driver.so failing to build MacOS v9_11"

See merge request isc-projects/bind9!1723
2019-03-26 06:08:44 -04:00
Mark Andrews 18e1c33206 back port complete SO_* block preserving SunOS disable 2019-03-26 05:51:00 -04:00
Mark Andrews f65b2c434d add CHANGES 2019-03-26 05:51:00 -04:00
Mark Andrews 2d4d4c223d backport MacOS link flags 2019-03-26 05:51:00 -04:00
Ondřej Surý d0f3b0f4d5 Merge branch '4-make-dnstap.pb-c.h-private-v9_11' into 'v9_11'
(v9_11) Make lib/dns/dnstap.pb-c.h header a private to lib/dns

See merge request isc-projects/bind9!1746
2019-03-22 07:22:25 -04:00
Ondřej Surý c927beea2d Make lib/dns/dnstap.pb-c.h private header
This changes dns_dtdata struct to not expose data types from dnstap.pb-c.h to
prevent the need for including this header where not really needed.

(cherry picked from commit 8ccce7e24b)
2019-03-22 12:08:16 +01:00
Mark Andrews 83317ae403 Merge branch '899-zonemd-check-for-hash-existence-v9_11' into 'v9_11'
zonemd require non empty hash

See merge request isc-projects/bind9!1741
2019-03-21 16:05:45 -04:00
Mark Andrews 24b66c00f9 add CHANGES
(cherry picked from commit e1db1b8dcb)
2019-03-22 06:52:32 +11:00
Mark Andrews 96b9f0340a Disallow empty ZONEMD hashes
This change is the result of discussions with the authors of
draft-wessels-dns-zone-digest.

(cherry picked from commit 473987d8d9)
2019-03-22 06:52:32 +11:00
Mark Andrews 2029ec9aa3 Merge branch '899-eid-totext-is-broken-v9_11' into 'v9_11'
EID and NIMLOC totext is broken.

See merge request isc-projects/bind9!1737
2019-03-21 05:43:09 -04:00
Mark Andrews b6952a6202 add CHANGES
(cherry picked from commit c20b89fcf8)
2019-03-21 20:27:18 +11:00
Mark Andrews 30f10bf79e add brackets for multi-line output
(cherry picked from commit 40a770b932)
2019-03-21 20:26:52 +11:00
Michał Kępień 9e58264b5a Merge branch 'michal/fix-key-id-extraction-in-the-dnssec-system-test-v9_11' into 'v9_11'
[v9_11] Fix key ID extraction in the "dnssec" system test

See merge request isc-projects/bind9!1735
2019-03-21 03:35:55 -04:00
Michał Kępień de1eba6a0f Fix key ID extraction in the "dnssec" system test
Simply looking for the key ID surrounded by spaces in the tested
dnssec-signzone output file is not a precise enough method of checking
for signatures prepared using a given key ID: it can be tripped up by
cross-algorithm key ID collisions and certain low key IDs (e.g. 60, the
TTL specified in bin/tests/system/dnssec/signer/example.db.in), which
triggers false positives for the "dnssec" system test.  Make key ID
extraction precise by using an awk script which operates on specific
fields.

(cherry picked from commit a40c60e4c1)
2019-03-21 08:12:52 +01:00
Ondřej Surý 49ed0473d9 Merge branch '4-update-gitignore-for-future-automake-v9_11' into 'v9_11'
(v9_11) Update and sort the top level .gitignore to ignore automake files

See merge request isc-projects/bind9!1730
2019-03-20 05:54:02 -04:00
Ondřej Surý ef2f3e38e4 Sort the top level .gitignore file
(cherry picked from commit b9d524ed7e)
2019-03-20 10:41:29 +01:00
Ondřej Surý af5c2186c3 Update top level .gitignore to ignore automake files
(cherry picked from commit 5c67d1d120)
2019-03-20 10:41:29 +01:00
Ondřej Surý 8e5e854858 Merge branch '946-enable-fips-mode-option-breaks-build-of-hmacmd5-c-and-md5-c' into 'v9_11'
Resolve "--enable-fips-mode option breaks build of  hmacmd5.c and md5.c"

See merge request isc-projects/bind9!1722
2019-03-20 04:33:51 -04:00
Mark Andrews d3976fe4cc add CHANGES 2019-03-20 12:52:07 +11:00
Mark Andrews 98a37c9aba add #include <isc/util.h> 2019-03-20 11:41:51 +11:00
Michał Kępień 20483dc12b Merge branch '944-make-stop.pl-wait-for-lock-file-cleanup-v9_11' into 'v9_11'
[v9_11] Make stop.pl wait for lock file cleanup

See merge request isc-projects/bind9!1711
2019-03-19 06:18:38 -04:00
Michał Kępień 537765df80 Make stop.pl wait for lock file cleanup
bin/tests/system/stop.pl only waits for the PID file to be cleaned up
while named cleans up the lock file after the PID file.  Thus, the
aforementioned script may consider a named instance to be fully shut
down when in fact it is not.

Fix by also checking whether the lock file exists when determining a
given instance's shutdown status.  This change assumes that if a named
instance uses a lock file, it is called "named.lock", and that if an
lwresd instance uses a lock file, it is called "lwresd.lock".

Also rename clean_pid_file() to pid_file_exists(), so that it is called
more appropriately (it does not clean up the PID file itself, it only
returns the server's identifier if its PID file is not yet cleaned up).

(cherry picked from commit c787a539d2)
2019-03-19 11:03:46 +01:00
Michał Kępień ebedeffa25 Correctly invoke stop.pl when start.pl fails
MR !1141 broke the way stop.pl is invoked when start.pl fails:

  - start.pl changes the working directory to $testdir/$server before
    attempting to start $server,

  - commit 27ee629e6b causes the $testdir
    variable in stop.pl to be determined using the $SYSTEMTESTTOP
    environment variable, which is set to ".." by all tests.sh scripts,

  - commit e227815af5 makes start.pl pass
    $test (the test's name) rather than $testdir (the path to the test's
    directory) to stop.pl when a given server fails to start.

Thus, when a server is restarted from within a tests.sh script and such
a restart fails, stop.pl attempts to look for the server directory in a
nonexistent location ($testdir/$server/../$test, i.e. $testdir/$test,
instead of $testdir/../$test).  Fix the issue by changing the working
directory before stop.pl is invoked in the scenario described above.

(cherry picked from commit 4afad2a047)
2019-03-19 10:28:59 +01:00
Evan Hunt 707b2349b8 Merge branch '945-remove-revoked-root-key-from-bind-keys-v9_14-v9_11' into 'v9_11'
Resolve "Remove revoked root key from bind.keys."

See merge request isc-projects/bind9!1709
2019-03-19 00:30:51 -04:00
Mark AndrewsandEvan Hunt d5c57db1ae Remove revoked root DNSKEY from bind.keys.
(cherry picked from commit 0e805b58e8)
(cherry picked from commit 3954d4ec30)
2019-03-18 21:30:22 -07:00
Matthijs Mekking a7b8090ca6 Merge branch '813-matthijs-failure-loading-rpz-v9_11' into 'v9_11'
Resolve "Problems after failure of loading rpz [ISC-support #14002]"

See merge request isc-projects/bind9!1566
2019-03-15 04:58:03 -04:00
Matthijs Mekking 1461accf9c Add test for rpz zone load fail 2019-03-15 09:16:49 +01:00
Matthijs Mekking 97118d59ba Make RPZ tests more readable 2019-03-15 08:32:03 +01:00
Matthijs Mekking a8f20871c4 Add README to RPZ tests 2019-03-15 08:32:03 +01:00
Mark Andrews fc17d57d0d Merge branch '940-unit-dnstap-pkcs11-tz-v9_11' into 'v9_11'
Fix regression in dnstap_test with native pkcs11

See merge request isc-projects/bind9!1701
2019-03-15 01:35:57 -04:00
Mark Andrews b4963500df add CHANGES
(cherry picked from commit 788f784191)
2019-03-15 16:20:14 +11:00
Petr MenšíkandMark Andrews 6992c50240 Fix regression in dnstap_test with native pkcs11
Change to cmocka broken initialization of TZ environment. This time,
commit 1cf1254051 is not soon enough. Has
to be moved more forward, before any other tests. It library is not full
reinitialized on each test.

(cherry picked from commit 71c4fad592)
2019-03-15 16:19:44 +11:00
Evan Hunt 49358c7652 Merge branch 'pmensik-skip-timer-test' into 'v9_11'
Workaround to kyua bug

See merge request isc-projects/bind9!1697
2019-03-14 17:31:08 -04:00
Petr MensikandEvan Hunt 5480d26da4 Workaround to kyua bug
Kyua 0.13 is not able to correctly handle whole test skipping.
Make workaround to it, include skipping message.
2019-03-14 14:19:45 -07:00
Evan Hunt dacfa09725 Merge branch '938-cppcheck-format-issues-v9_11' into 'v9_11'
Resolve "Cppcheck format issues."

See merge request isc-projects/bind9!1696
2019-03-14 17:03:35 -04:00
Mark AndrewsandEvan Hunt 8a85e3d924 force promotion to unsigned int
(cherry picked from commit 1eba2c5b06)
2019-03-14 13:53:04 -07:00
Evan Hunt 09f9f10ead Merge branch '890-assert-the-hevent-rdataset-is-non-null-v9_11' into 'v9_11'
Resolve "Assert the hevent->rdataset is non-NULL."

See merge request isc-projects/bind9!1694
2019-03-14 16:28:43 -04:00
Mark AndrewsandEvan Hunt 25268aaf8c assert hevent->rdataset is non NULL
(cherry picked from commit d8d04edfba)
2019-03-14 13:17:10 -07:00
Evan Hunt be1dc0d82c Merge branch '937-potential-null-pointer-dereference-in-bin-tests-system-dlzexternal-driver-c-v9_11' into 'v9_11'
Resolve "potential null pointer dereference in bin/tests/system/dlzexternal/driver.c"

See merge request isc-projects/bind9!1691
2019-03-14 16:09:07 -04:00
Mark AndrewsandEvan Hunt 3756a08d30 check that state and state->log are non NULL before calling state->log
(cherry picked from commit 7bf6750330)
2019-03-14 12:57:21 -07:00
Mark Andrews 7d70b31542 Merge branch '935-fix-ecc-algorithms-unused-constants-in-pkcs-11-build-c116fb96-falls-short' into 'v9_11'
Resolve "Fix ECC algorithms unused constants in PKCS#11 build (c116fb96) falls short"

See merge request isc-projects/bind9!1682
2019-03-13 22:29:46 -04:00
Mark Andrews 9c2f4af5a1 pkcs11-kegen build failed if ECDSA was not supported 2019-03-14 13:15:21 +11:00
Mark Andrews eb5696f04e Merge branch '936-missing-unlocks-in-sdlz-c-v9_11' into 'v9_11'
Resolve "Missing unlocks in sdlz.c"

See merge request isc-projects/bind9!1680
2019-03-13 20:08:19 -04:00
Mark Andrews 0a1e079e79 add CHANGES
(cherry picked from commit 32f2ae3791)
2019-03-14 09:02:12 +11:00
Mark Andrews e6ab8fc7d0 add missing MAYBE_UNLOCK
(cherry picked from commit ff8bf617e7)
2019-03-14 09:01:31 +11:00
Evan Hunt d87f19323c Merge branch '834-fix-race-in-fctx-cancel-v9_11' into 'v9_11'
fix race in socket code

See merge request isc-projects/bind9!1674
2019-03-12 16:18:45 -04:00
Witold KręcickiandEvan Hunt 3993503de4 CHANGES
(cherry picked from commit 50f6054294)
2019-03-12 13:00:44 -07:00
Witold KręcickiandEvan Hunt ff401e670f Fix a race in fctx_cancelquery.
When sending an udp query (resquery_send) we first issue an asynchronous
isc_socket_connect and increment query->connects, then isc_socket_sendto2
and increment query->sends.
If we happen to cancel this query (fctx_cancelquery) we need to cancel
all operations we might have issued on this socket. If we are under very high
load the callback from isc_socket_connect (resquery_udpconnected) might have
not yet been fired. In this case we only cancel the CONNECT event on socket,
and ignore the SEND that's waiting there (as there is an `else if`).
Then we call dns_dispatch_removeresponse which kills the dispatcher socket
and calls isc_socket_close - but if system is under very high load, the send
we issued earlier might still not be complete - which triggers an assertion
because we're trying to close a socket that's still in use.

The fix is to always check if we have incomplete sends on the socket and cancel
them if we do.

(cherry picked from commit 56183a3917)
2019-03-12 13:00:05 -07:00
Michał Kępień 369f3c392b Merge branch 'michal/silence-a-perl-warning-output-by-stop.pl-v9_11' into 'v9_11'
[v9_11] Silence a Perl warning output by stop.pl

See merge request isc-projects/bind9!1670
2019-03-12 04:04:15 -04:00
Michał Kępień 42a210b7cf Silence a Perl warning output by stop.pl
On Unix systems, the CYGWIN environment variable is not set at all when
BIND system tests are run.  If a named instance crashes on shutdown or
otherwise fails to clean up its pidfile and the CYGWIN environment
variable is not set, stop.pl will print an uninitialized value warning
on standard error.  Prevent this by using defined().

(cherry picked from commit 91e5a99b9b)
2019-03-12 08:43:13 +01:00
Mark Andrews e57796dd15 Merge branch 'ifconfig.sh-anywhere-v9_11' into 'v9_11'
Allow ifconfig to be called from any directory

See merge request isc-projects/bind9!1668
2019-03-11 23:24:54 -04:00
Petr MenšíkandMark Andrews 1f32ad6064 Allow ifconfig to be called from any directory
ifconfig.sh depends on config.guess for platform guessing. It uses it to
choose between ifconfig or ip tools to configure interfaces. If
system-wide automake script is installed and local was not found, use
platform guess. It should work well on mostly any sane platform. Still
prefers local guess, but passes when if cannot find it.

(cherry picked from commit 38301052e1)
2019-03-12 14:11:03 +11:00
Evan Hunt a4fef634f5 Merge branch '892-fix-redirect-name-v9_11' into 'v9_11'
use qname in redirect2

See merge request isc-projects/bind9!1664
2019-03-11 14:39:15 -04:00
Mark AndrewsandEvan Hunt 6115670bd4 add CHANGES
(cherry picked from commit ad785e4f93)
2019-03-11 11:28:29 -07:00
Mark AndrewsandEvan Hunt 93ee793d97 use client->query.qname
(cherry picked from commit 8758d36a5e)
2019-03-11 11:27:45 -07:00
Michał Kępień 64d16586f2 Merge branch 'michal/stabilize-the-gost-system-test' into 'v9_11'
Stabilize the "gost" system test

See merge request isc-projects/bind9!1642
2019-03-11 08:48:05 -04:00
Michał Kępień 170cb442a9 Stabilize the "gost" system test
In the "gost" system test, the ./NS RRset returned in the response to
ns2's priming query might not yet be validated when ns2 assembles the
response to the ./SOA query.  If that happens, the ./NS RRset will not
be placed in the AUTHORITY section of the response to the ./SOA query,
triggering a false positive for the "gost" system test as the ./NS RRset
is always present in the response sent by ns1 (since it is authoritative
for the root zone).  As the purpose of the "gost" system test is to
check whether a zone signed using GOST is properly validated and only
positive responses are inspected, use the +noauth dig option for all
queries in that test, so that the contents of the AUTHORITY section do
not influence its outcome.
2019-03-11 13:32:02 +01:00
Michał Kępień 23435c423c Merge branch '928-stabilize-delzsk.example-zone-checks-v9_11' into 'v9_11'
[v9_11] Stabilize "delzsk.example" zone checks

See merge request isc-projects/bind9!1659
2019-03-11 08:28:15 -04:00
Michał Kępień 780e1134e7 Stabilize "delzsk.example" zone checks
When a zone is converted from NSEC to NSEC3, the private record at zone
apex indicating that NSEC3 chain creation is in progress may be removed
during a different (later) zone_nsec3chain() call than the one which
adds the NSEC3PARAM record.  The "delzsk.example" zone check only waits
for the NSEC3PARAM record to start appearing in dig output while private
records at zone apex directly affect "rndc signing -list" output.  This
may trigger false positives for the "autosign" system test as the output
of the "rndc signing -list" command used for checking ZSK deletion
progress may contain extra lines which are not accounted for.  Ensure
the private record is removed from zone apex before triggering ZSK
deletion in the aforementioned check.

Also future-proof the ZSK deletion progress check by making it only look
at lines it should care about.

(cherry picked from commit e02de04e97)
2019-03-11 13:03:23 +01:00
Michał Kępień 08713b334b Merge branch '129-dnssec-system-test-tweaks-v9_11' into 'v9_11'
[v9_11] "dnssec" system test tweaks

See merge request isc-projects/bind9!1657
2019-03-11 08:02:08 -04:00
Mark AndrewsandMichał Kępień e6718cf4c4 ${ttl} must exist and be non null
(cherry picked from commit dee1f1a498)
2019-03-11 12:25:19 +01:00
Michał Kępień 7656e7431b Make ANSWER TTL capping checks stricter
For checks querying a named instance with "dnssec-accept-expired yes;"
set, authoritative responses have a TTL of 300 seconds.  Assuming empty
resolver cache, TTLs of RRsets in the ANSWER section of the first
response to a given query will always match their authoritative
counterparts.  Also note that for a DNSSEC-validating named resolver,
validated RRsets replace any existing non-validated RRsets with the same
owner name and type, e.g. cached from responses received while resolving
CD=1 queries.  Since TTL capping happens before a validated RRset is
inserted into the cache and RRSIG expiry time does not impose an upper
TTL bound when "dnssec-accept-expired yes;" is set and, as pointed out
above, the original TTLs of the relevant RRsets equal 300 seconds, the
RRsets in the ANSWER section of the responses to expiring.example/SOA
and expired.example/SOA queries sent with CD=0 should always be exactly
120 seconds, never a lower value.  Make the relevant TTL checks stricter
to reflect that.

(cherry picked from commit a85cc41486)
2019-03-11 12:23:27 +01:00
Michał Kępień bacbe3a5aa Relax ADDITIONAL TTL capping checks
Always expecting a TTL of exactly 300 seconds for RRsets found in the
ADDITIONAL section of responses received for CD=1 queries sent during
TTL capping checks is too strict since these responses will contain
records cached from multiple DNS messages received during the resolution
process.

In responses to queries sent with CD=1, ns.expiring.example/A in the
ADDITIONAL section will come from a delegation returned by ns2 while the
ANSWER section will come from an authoritative answer returned by ns3.
If the queries to ns2 and ns3 happen at different Unix timestamps,
RRsets cached from the older response will have a different TTL by the
time they are returned to dig, triggering a false positive.

Allow a safety margin of 60 seconds for checks inspecting the ADDITIONAL
section of responses to queries sent with CD=1 to fix the issue.  A
safety margin this large is likely overkill, but it is used nevertheless
for consistency with similar safety margins used in other TTL capping
checks.

(cherry picked from commit 8baf859063)
2019-03-11 12:22:23 +01:00
Michał Kępień 38da4bdf5e Fix NTA-related races
Changes introduced by commit 6b8e4d6e69
were incomplete as not all time-sensitive checks were updated to match
revised "nta-lifetime" and "nta-recheck" values.  Prevent rare false
positives by updating all NTA-related checks so that they work reliably
with "nta-lifetime 12s;" and "nta-recheck 9s;".  Update comments as well
to prevent confusion.

(cherry picked from commit 9a36a1bba3)
2019-03-11 12:17:36 +01:00
Michał Kępień d9354d32c4 Merge branch 'michal/fix-regex-used-for-mangling-druz-dnskey-v9_11' into 'v9_11'
[v9_11] Fix regex used for mangling druz/DNSKEY (in the "dlv" system test)

See merge request isc-projects/bind9!1648
2019-03-08 08:08:58 -05:00
Michał Kępień e82ef27449 Fix regex used for mangling druz/DNSKEY
During "dlv" system test setup, the "sed" regex used for mangling the
DNSKEY RRset for the "druz" zone does not include the plus sign ("+"),
which may:

  - cause the replacement to happen near the end of DNSKEY RDATA, which
    can cause the latter to become an invalid Base64 string,

  - prevent the replacement from being performed altogether.

Both cases prevent the "dlv" system test from behaving as intended and
may trigger false positives.  Add the missing character to the
aforementioned regex to ensure the replacement is always performed on
bytes 10-25 of DNSKEY RDATA.

(cherry picked from commit fd13fef299)
2019-03-08 13:49:02 +01:00
Michał Kępień 92465f23f7 Merge branch '925-make-delv-use-os-supplied-ephemeral-port-range-v9_11' into 'v9_11'
[v9_11] Make delv use OS-supplied ephemeral port range

See merge request isc-projects/bind9!1646
2019-03-08 07:46:10 -05:00
Michał Kępień addb1f3f7a Add CHANGES entry
5180.	[bug]		delv now honors the operating system's preferred
			ephemeral port range. [GL #925]

(cherry picked from commit bf98324956)
2019-03-08 13:14:11 +01:00
Michał Kępień 78ecd57872 Make delv use OS-supplied ephemeral port range
Make delv honor the operating system's preferred ephemeral port range
instead of always using the default 1024-65535 range for outgoing
messages.

(cherry picked from commit ada6846a10)
2019-03-08 13:14:10 +01:00
Mark Andrews 8d6be33c9c Merge branch 'u/fanf2/sectypes-v9_11' into 'v9_11'
cleanup: use dns_secalg_t and dns_dsdigest_t where appropriate

See merge request isc-projects/bind9!1644
2019-03-08 06:40:45 -05:00
Tony FinchandMark Andrews 660c9af77b cleanup: use dns_secalg_t and dns_dsdigest_t where appropriate
Use them in structs for various rdata types where they are missing.
This doesn't change the structs since we are replacing explicit
uint8_t field types with aliases for uint8_t.

Use dns_dsdigest_t in library function arguments.

(cherry picked from commit 0f219714e1)
2019-03-08 22:25:27 +11:00
Mark Andrews 8e10f568f8 Merge branch 'marka-define-path-max-v9_11' into 'v9_11'
#include <limits.h> for PATH_MAX, define if not found

See merge request isc-projects/bind9!1638
2019-03-08 02:44:01 -05:00
Mark Andrews b3479ae5b0 #include <limits.h> for PATH_MAX, define if not found
(cherry picked from commit 1fc7be36eb)
2019-03-08 18:24:13 +11:00
Evan Hunt 15995270d1 Merge branch 'each-silence-warning-v9_11' into 'v9_11'
silence a warning about potential snprintf overrun

See merge request isc-projects/bind9!1634
2019-03-08 01:10:11 -05:00
Evan Hunt 148aa70127 silence a warning about potential snprintf overrun
(cherry picked from commit 7f26cad247)
2019-03-07 21:49:15 -08:00
Evan Hunt ee42bdb825 Merge branch '902-hang-when-unexpected-errno-encountered-during-log-rename-v9_11' into 'v9_11'
Resolve "Hang when unexpected errno encountered during log rename"

See merge request isc-projects/bind9!1632
2019-03-08 00:44:27 -05:00
Mark AndrewsandEvan Hunt 28ea43ab35 Handle EDQUOT and ENOSPC errors
(cherry picked from commit 435ae2f29a)
2019-03-07 21:29:59 -08:00
Evan Hunt bd7dc54875 Merge branch '884-patches-to-review-3-v9_11' into 'v9_11'
fix the use of dns_wildcardname as an optimisation in DLZ

See merge request isc-projects/bind9!1630
2019-03-07 23:49:24 -05:00
Mark AndrewsandEvan Hunt 09ce08a85f fix the use of dns_wildcardname as an optimisation in DLZ
(cherry picked from commit cb32cd98bd)
2019-03-07 20:34:59 -08:00
Evan Hunt ad39501b0c Merge branch '884-patches-to-review-2' into 'v9_11'
Handle errors from ctime().

See merge request isc-projects/bind9!1531
2019-03-07 22:31:38 -05:00
Mark AndrewsandEvan Hunt dde207c0b9 fail if ctime() output is truncted 2019-03-07 19:30:28 -08:00
Evan Hunt 5debc374ce Merge branch '884-patches-to-review-5' into 'v9_11'
Use %u in format to print TTL

See merge request isc-projects/bind9!1534
2019-03-07 22:11:11 -05:00
Mark AndrewsandEvan Hunt b9732a6787 use %u for TTL 2019-03-07 19:09:40 -08:00
Evan Hunt a7fba9313a Merge branch 'ckb-statistics-test-nit-v9_11' into 'v9_11'
the wrong variable was used to count the test cases in one place.

See merge request isc-projects/bind9!1628
2019-03-07 21:55:34 -05:00
Curtis BlackburnandEvan Hunt 4aa9ecf914 the wrong variable was used to count the test cases in one place.
(cherry picked from commit 4f60a84e34)
2019-03-07 18:42:54 -08:00
Evan Hunt 8e93a5f159 Merge branch 'each-notes-911' into 'v9_11'
clear out  9.11.6 release notes

See merge request isc-projects/bind9!1624
2019-03-07 17:00:56 -05:00
Evan Hunt f68040799f clear out release notes from 9.11.6 to prepare ground for 9.11.7 2019-03-07 13:44:24 -08:00
Evan Hunt e960d24fa6 Merge branch '882-zone-data-cannot-be-loaded-with-dnssec-coverage-v9_11' into 'v9_11'
Resolve "Zone data cannot be loaded with dnssec-coverage"

See merge request isc-projects/bind9!1620
2019-03-07 00:26:28 -05:00
Evan Hunt 63c95f8a6d add CHANGES
(cherry picked from commit 57e44efc73)
2019-03-06 21:15:10 -08:00
Mark AndrewsandEvan Hunt 6f48cea0a6 explicitly convert byte to string
(cherry picked from commit ec3d830bc5)
2019-03-06 21:15:10 -08:00
Evan Hunt 45dec7d781 Merge branch 'u/fanf2/man-dnssec-keygen-v9_11' into 'v9_11'
cleanup dnssec-keygen manual page

See merge request isc-projects/bind9!1618
2019-03-06 20:47:21 -05:00
Tony FinchandEvan Hunt 0f8351b282 cleanup dnssec-keygen manual page
Alphabetize options and synopsis; remove spurious -z from synopsis;
refer to -T KEY in options that are only relevant to pre-RFC3755
DNSSEC, and add a -f KSK example.

(cherry picked from commit 1954f8d2bf)
2019-03-06 17:34:26 -08:00
Mark Andrews 8e7d87a2a6 Merge branch '926-statschannel-system-tests-fails-json-only-no-libxml-v9_11' into 'v9_11'
Resolve "statschannel system tests fails json only (no libxml)"

See merge request isc-projects/bind9!1617
2019-03-06 19:11:40 -05:00
Mark Andrews c2495053f2 add CHANGES
(cherry picked from commit 5bc06a0a11)
2019-03-07 10:59:11 +11:00
Mark Andrews 6f331e068e remove dependancy on libxml
(cherry picked from commit a9c47414b3)
2019-03-07 10:57:42 +11:00
Michał Kępień 19ad85f0c6 Merge branch '905-make-nsupdate-use-os-supplied-ephemeral-port-range-v9_11' into 'v9_11'
[v9_11] Make nsupdate use OS-supplied ephemeral port range

See merge request isc-projects/bind9!1610
2019-03-06 08:27:41 -05:00
Michał Kępień dbcabd87b6 Add CHANGES entry
5172.	[bug]		nsupdate now honors the operating system's preferred
			ephemeral port range. [GL #905]

(cherry picked from commit 0e64948274)
2019-03-06 14:03:21 +01:00
Michał Kępień ca24253980 Make nsupdate use OS-supplied ephemeral port range
Make nsupdate honor the operating system's preferred ephemeral port
range instead of always using the default 1024-65535 range for outgoing
messages.

(cherry picked from commit 06f582f23e)
2019-03-06 14:03:09 +01:00
Mark Andrews 1b72728002 Merge branch '919-add-win32util-configure-file-list-check-to-ci-v9_11' into 'v9_11'
Resolve "Add win32util/Configure file list check to CI"

See merge request isc-projects/bind9!1603
2019-03-05 17:42:24 -05:00
Mark Andrews fbae44c09d remove '..\\bin\\tests\\system\\dlz\\prereq.sh' from win32util/Configure
(cherry picked from commit 442421906b)
2019-03-05 17:42:05 -05:00
Mark Andrews d8b9ca2f5a add util/check-win32util-configure to precheck
(cherry picked from commit c3dd8bb9f0)
2019-03-05 17:42:05 -05:00
Evan Hunt 0444c7082d Merge branch '884-patches-to-review-4-v9_11' into 'v9_11'
dlz filesystem driver failed to properly detect period at end of filename.

See merge request isc-projects/bind9!1601
2019-03-05 17:38:05 -05:00
Mark AndrewsandEvan Hunt 21d6e9a91e properly detect period as last character in filename
(cherry picked from commit c9dc59eb90)
2019-03-05 14:22:46 -08:00
Evan Hunt ab44b9a3ab Merge branch 'michal/disable-servfail-cache-for-ns5-in-the-mkeys-system-test-v9_11' into 'v9_11'
Disable SERVFAIL cache for ns5 in the "mkeys" system test

See merge request isc-projects/bind9!1599
2019-03-05 16:40:43 -05:00
Michał KępieńandEvan Hunt 44e1e371e3 Disable SERVFAIL cache for ns5 in the "mkeys" system test
The "check key refreshes are resumed after root servers become
available" check may trigger a false positive for the "mkeys" system
test if the second example/TXT query sent by dig is received by ns5 less
than a second after it receives a REFUSED response to the upstream query
it sends to ns1 in order to resolve the first example/TXT query sent by
dig.  Since that REFUSED response from ns1 causes ns5 to return a
SERVFAIL answer to dig, example/TXT is added to the SERVFAIL cache,
which is enabled by default with a TTL of 1 second.  This in turn may
cause ns5 to return a cached SERVFAIL response to the second example/TXT
query sent by dig, i.e. make ns5 not perform full query processing as
expected by the check.

Since the primary purpose of the check in question is to ensure that key
refreshes are resumed once initially unavailable root servers become
available, the optimal solution appears to be disabling SERVFAIL cache
for ns5 as doing that still allows the check to fulfill its purpose and
it is arguably more prudent than always sleeping for 1 second.

(cherry picked from commit 7c6bff3c4e)
2019-03-05 13:25:40 -08:00
Evan Hunt d1221d6885 Merge branch '889-improve-clang-cmocka-interaction-v9_11' into 'v9_11'
Resolve "Improve clang/cmocka interaction."

See merge request isc-projects/bind9!1597
2019-03-05 14:17:53 -05:00
Mark AndrewsandEvan Hunt 2671666ef8 improve clang / cmocka integration
(cherry picked from commit cb913177ae)
2019-03-05 11:04:46 -08:00
Matthijs Mekking ae383b7b52 Merge branch 'matthijs-more-clean.sh-related-cleanups-v9_11' into 'v9_11'
More clean.sh related cleanups

See merge request isc-projects/bind9!1595
2019-03-05 06:11:48 -05:00
Matthijs Mekking 9227ed8665 Ensure all system tests run clean.sh from setup.sh
For consistency between all system tests, add missing setup.sh scripts
for tests which do not have one yet and ensure every setup.sh script
calls its respective clean.sh script.

(cherry picked from commit e410803919)
2019-03-05 11:44:35 +01:00
Matthijs Mekking 321e87fbb7 Only perform test cleanups in clean.sh scripts
Temporary files created by a given system test should be removed by its
clean.sh script, not its setup.sh script.  Remove redundant "rm"
invocations from setup.sh scripts.  Move required "rm" invocations from
setup.sh scripts to their corresponding clean.sh scripts.

(cherry picked from commit c64ed484c8)
2019-03-05 11:38:54 +01:00
Mark Andrews b42a68e8ad Merge branch 'feature/featuretest-dlz-v9_11' into 'v9_11'
Test dlz support in feature-test

See merge request isc-projects/bind9!1589
2019-03-03 22:23:38 -05:00
Mark Andrews f85f6b21a9 add CHANGES
(cherry picked from commit 5f125df462)
2019-03-04 14:11:30 +11:00
Mark Andrews 172dd2fd5b run autoheader and autoconf
(cherry picked from commit 4988367b53)
2019-03-04 14:10:59 +11:00
Petr MenšíkandMark Andrews 1e5c61d5cc Support DLZ filesystem detection in feature-test
Do not use variable from configure to detect the feature.

(cherry picked from commit 759a7b4ce3)
2019-03-04 14:10:16 +11:00
Michał Kępień ba3d1140ec Merge branch 'michal/fix-ip-regex-used-in-the-resolver-system-test-v9_11' into 'v9_11'
[v9_11] Fix IP regex used in the "resolver" system test

See merge request isc-projects/bind9!1584
2019-03-01 01:55:48 -05:00
Michał Kępień 17a82643fe Fix IP regex used in the "resolver" system test
If dots are not escaped in the "1.2.3.4" regular expressions used for
checking whether IP address 1.2.3.4 is present in the tested resolver's
answers, a COOKIE that matches such a regular expression will trigger a
false positive for the "resolver" system test.  Properly escape dots in
the aforementioned regular expressions to prevent that from happening.

(cherry picked from commit 70ae48e5cb)
2019-03-01 07:54:10 +01:00
Michał Kępień 11761a693e Merge branch 'michal/call-clean.sh-from-all-relevant-setup.sh-scripts-v9_11' into 'v9_11'
[v9_11] Call clean.sh from all relevant setup.sh scripts

See merge request isc-projects/bind9!1577
2019-02-28 07:11:03 -05:00
Michał Kępień beeaefb401 Call clean.sh from all relevant setup.sh scripts
For all system tests utilizing named instances, call clean.sh from each
test's setup.sh script in a consistent way to make sure running the same
system test multiple times using run.sh does not trigger false positives
caused by stale files created by previous runs.

Ideally we would just call clean.sh from run.sh, but that would break
some quirky system tests like "rpz" or "rpzrecurse" and being consistent
for the time being does not hurt.

(cherry picked from commit a077a3ae8a)
2019-02-28 12:51:36 +01:00
Tinderbox User 4c50a8f8fb Merge branch 'prep-release' into v9_11 2019-02-27 23:28:15 +00:00
Tinderbox User 639695b37d prep 9.11.6 2019-02-27 23:27:22 +00:00
687 changed files with 17229 additions and 5921 deletions
+112
View File
@@ -0,0 +1,112 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((c-mode .
((eval .
(set (make-local-variable 'directory-of-current-dir-locals-file)
(file-name-directory (locate-dominating-file default-directory ".dir-locals.el"))
)
)
(eval .
(set (make-local-variable 'include-directories)
(list
;; top directory
(expand-file-name
(concat directory-of-current-dir-locals-file "./"))
;; libisc
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/unix/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/pthreads/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/netmgr"))
;; libdns
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/dns/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/dns"))
;; libisccc
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isccc/include"))
;; libisccfg
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isccfg/include"))
;; libns
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/ns/include"))
;; libirs
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/irs/include"))
;; libbind9
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/bind9/include"))
;; bin
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/check"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/confgen/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/confgen"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/confgen/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/dig/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/named/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/rndc/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/dnssec/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/named/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/rndc/include"))
(expand-file-name "/usr/local/opt/openssl@1.1/include")
(expand-file-name "/usr/local/opt/libxml2/include/libxml2")
(expand-file-name "/usr/local/opt/json-c/include/json-c/")
(expand-file-name "/usr/local/include")
)
)
)
(eval setq flycheck-clang-include-path include-directories)
(eval setq flycheck-cppcheck-include-path include-directories)
(eval setq flycheck-gcc-include-path include-directories)
(eval setq flycheck-clang-args
(list
"-include"
(expand-file-name
(concat directory-of-current-dir-locals-file "config.h"))
)
)
(eval setq flycheck-gcc-args
(list
"-include"
(expand-file-name
(concat directory-of-current-dir-locals-file "config.h"))
)
)
(eval setq flycheck-cppcheck-args
(list
"--enable=all"
"--suppress=missingIncludeSystem"
(concat "-include=" (expand-file-name
(concat directory-of-current-dir-locals-file "config.h")))
)
)
)
))
+55 -27
View File
@@ -1,33 +1,61 @@
Makefile
config.log
config.h
config.cache
config.status
libtool
/isc-config.sh
/configure.lineno
autom4te.cache/
*.o
*.lo
*.so
*.a
*.la
*.gcno
*.gcda
*_test
*-symtbl.c
timestamp
ans.run
lwresd.run
named.run
named.memstats
gen.dSYM/
*.a
*.gcda
*.gcno
*.la
*.lo
*.o
*.orig
*.plist/ # ccc-analyzer store its results in .plist directories
*.rej
*.so
*_test
*~
.ccache/
.cproject
.deps/
.dirstamp
.libs/
# ccc-analyzer store its results in .plist directories
*.plist/
*~
.project
.cproject
.settings
/aclocal.m4
/ar-lib
/autom4te.cache/
/bind.keys.h
/compile
/config.cache
/config.guess
/config.h
/config.h.in
/config.log
/config.status
/config.sub
/configure
/configure.lineno
/depcomp
/install-sh
/isc-config.sh
/libltdl/*
/libtool
/ltmain.sh
/m4/libtool.m4
/m4/ltargz.m4
/m4/ltdl.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/missing
/py-compile
/stamp-h1
/test-driver
Makefile
ans.run
gen.dSYM/
kyua.log
named.memstats
named.run
timestamp
/compile_commands.json
/cppcheck_html/
/cppcheck.results
+363 -41
View File
@@ -8,14 +8,33 @@ variables:
CCACHE_DIR: "/ccache"
SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf"
# VirtualBox driver needs to set build_dir to "/builds" in gitlab-runner.toml
KYUA_RESULT: "$CI_PROJECT_DIR/kyua.results"
GIT_DEPTH: 1
BUILD_PARALLEL_JOBS: 6
TEST_PARALLEL_JOBS: 6
MAKE: make
stages:
- precheck
- build
- test
- unit
- system
- docs
- push
- postcheck
### Runner Tag Templates
# Note: FreeBSD runners extract the FreeBSD version to use from job name
.freebsd-amd64: &freebsd_amd64
tags:
- freebsd
- amd64
.linux-amd64: &linux_amd64
tags:
- linux
@@ -28,6 +47,12 @@ stages:
### Docker Image Templates
# Alpine Linux
.alpine-3.10-amd64: &alpine_3_10_amd64_image
image: "$CI_REGISTRY_IMAGE:alpine-3.10-amd64"
<<: *linux_amd64
# CentOS
.centos-centos6-amd64: &centos_centos6_amd64_image
@@ -44,10 +69,6 @@ stages:
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
<<: *linux_amd64
.debian-jessie-i386: &debian_jessie_i386_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
<<: *linux_i386
.debian-stretch-amd64: &debian_stretch_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
<<: *linux_amd64
@@ -56,6 +77,10 @@ stages:
image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
<<: *linux_i386
.debian-buster-amd64: &debian_buster_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
<<: *linux_i386
.debian-sid-amd64: &debian_sid_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
<<: *linux_amd64
@@ -66,8 +91,8 @@ stages:
# Fedora
.fedora-29-amd64: &fedora_29_amd64_image
image: "$CI_REGISTRY_IMAGE:fedora-29-amd64"
.fedora-30-amd64: &fedora_30_amd64_image
image: "$CI_REGISTRY_IMAGE:fedora-30-amd64"
<<: *linux_amd64
# Ubuntu
@@ -101,26 +126,66 @@ stages:
<<: *debian_sid_amd64_image
stage: precheck
.autoconf: &autoconf_job
<<: *default_triggering_rules
<<: *debian_sid_amd64_image
stage: precheck
script:
- autoreconf -fi
artifacts:
untracked: true
expire_in: "1 hour"
.configure: &configure |
./configure \
--disable-maintainer-mode \
--enable-developer \
--with-randomdev=/dev/urandom \
--with-libtool \
--with-geoip2=auto \
--disable-static \
--with-cmocka \
--with-libxml2 \
--with-json \
--prefix=$HOME/.local \
--without-make-clean \
$EXTRA_CONFIGURE \
|| cat config.log
.build: &build_job
<<: *default_triggering_rules
stage: build
before_script:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
script:
- ./configure --enable-developer --with-randomdev=/dev/urandom --with-libtool --disable-static --with-cmocka --prefix=$HOME/.local --without-make-clean ${EXTRA_CONFIGURE} || cat config.log
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- *configure
- ${MAKE} -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- test -z "${RUN_MAKE_INSTALL}" || make install
dependencies:
- autoreconf:sid:amd64
needs:
- autoreconf:sid:amd64
artifacts:
untracked: true
expire_in: "1 hour"
.setup_interfaces: &setup_interfaces |
if [ "$(id -u)" -eq "0" ]; then
sh -x bin/tests/system/ifconfig.sh up;
else
sudo sh -x bin/tests/system/ifconfig.sh up;
fi
.setup_softhsm: &setup_softhsm |
sh -x util/prepare-softhsm2.sh
.system_test: &system_test_job
<<: *default_triggering_rules
stage: test
stage: system
retry: 2
before_script:
- bash -x bin/tests/system/ifconfig.sh up
- bash -x util/prepare-softhsm2.sh
- *setup_interfaces
- *setup_softhsm
script:
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
- test -s bin/tests/system/systests.output
@@ -129,16 +194,22 @@ stages:
expire_in: "1 week"
when: on_failure
.kyua_report: &kyua_report_html |
kyua --logfile /dev/null report-html \
--force \
--results-file "$KYUA_RESULT" \
--results-filter "" \
--output kyua_html
.unit_test: &unit_test_job
<<: *default_triggering_rules
stage: test
stage: unit
before_script:
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
- bash -x util/prepare-softhsm2.sh
- *setup_softhsm
script:
- make unit
after_script:
- kyua report-html --force --results-file kyua.results --results-filter "" --output kyua_html
- *kyua_report_html
artifacts:
paths:
- kyua.log
@@ -147,10 +218,47 @@ stages:
expire_in: "1 week"
when: on_failure
.cppcheck_args: &run_cppcheck |
cppcheck --enable=warning,performance,portability,information,missingInclude \
--include=config.h \
--quiet \
--std=c11 \
--language=c \
--project=compile_commands.json \
--error-exitcode=2 \
-j ${TEST_PARALLEL_JOBS:-1} \
--xml \
--output-file=cppcheck.results \
--inline-suppr
.cppcheck_report: &cppcheck_report_html |
cppcheck-htmlreport --title="BIND 9 ($CI_COMMIT_SHORT_SHA) Cppcheck Report" \
--file=cppcheck.results \
--report-dir=cppcheck_html/
.cppcheck: &cppcheck_job
<<: *default_triggering_rules
stage: postcheck
script:
- *run_cppcheck
after_script:
- *cppcheck_report_html
artifacts:
paths:
- compile_commands.json
- cppcheck.results
- cppcheck_html/
expire_in: "1 week"
when: on_failure
allow_failure: true
### Job Definitions
# Jobs in the precheck stage
autoreconf:sid:amd64:
<<: *autoconf_job
misc:sid:amd64:
<<: *precheck_job
script:
@@ -167,6 +275,7 @@ misc:sid:amd64:
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
- xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
- xmllint --noout --nonet --html `git ls-files '*.html'`
- sh util/check-win32util-configure
artifacts:
paths:
- util/newcopyrights
@@ -176,17 +285,23 @@ misc:sid:amd64:
🐞:sid:amd64:
<<: *precheck_job
script: util/check-cocci
script:
- util/check-cocci
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
# Jobs for doc builds on Debian Sid (amd64)
docs:sid:amd64:
<<: *debian_sid_amd64_image
stage: build
stage: docs
script:
- ./configure || cat config.log
- make -C doc/misc docbook
- make -C doc/arm Bv9ARM.html
dependencies:
- autoreconf:sid:amd64
needs:
- autoreconf:sid:amd64
artifacts:
paths:
- doc/arm/
@@ -208,6 +323,30 @@ push:docs:sid:amd64:
- master@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
# Jobs for regular GCC builds on Alpine Linux 3.10 (amd64)
gcc:alpine3.10:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--enable-dnstap"
<<: *alpine_3_10_amd64_image
<<: *build_job
system:gcc:alpine3.10:amd64:
<<: *alpine_3_10_amd64_image
<<: *system_test_job
dependencies:
- gcc:alpine3.10:amd64
needs: ["gcc:alpine3.10:amd64"]
unit:gcc:alpine3.10:amd64:
<<: *alpine_3_10_amd64_image
<<: *unit_test_job
dependencies:
- gcc:alpine3.10:amd64
needs: ["gcc:alpine3.10:amd64"]
# Jobs for regular GCC builds on CentOS 6 (amd64)
gcc:centos6:amd64:
@@ -223,12 +362,14 @@ system:gcc:centos6:amd64:
<<: *system_test_job
dependencies:
- gcc:centos6:amd64
needs: ["gcc:centos6:amd64"]
unit:gcc:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *unit_test_job
dependencies:
- gcc:centos6:amd64
needs: ["gcc:centos6:amd64"]
# Jobs for regular GCC builds on CentOS 7 (amd64)
@@ -236,7 +377,7 @@ gcc:centos7:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
<<: *centos_centos7_amd64_image
<<: *build_job
@@ -245,12 +386,14 @@ system:gcc:centos7:amd64:
<<: *system_test_job
dependencies:
- gcc:centos7:amd64
needs: ["gcc:centos7:amd64"]
unit:gcc:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *unit_test_job
dependencies:
- gcc:centos7:amd64
needs: ["gcc:centos7:amd64"]
# Jobs for regular GCC builds on Debian 8 Jessie (amd64)
@@ -258,7 +401,7 @@ gcc:jessie:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--without-cmocka --with-python"
EXTRA_CONFIGURE: "--without-cmocka --with-python --disable-geoip"
<<: *debian_jessie_amd64_image
<<: *build_job
@@ -267,12 +410,14 @@ system:gcc:jessie:amd64:
<<: *system_test_job
dependencies:
- gcc:jessie:amd64
needs: ["gcc:jessie:amd64"]
unit:gcc:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *unit_test_job
dependencies:
- gcc:jessie:amd64
needs: ["gcc:jessie:amd64"]
# Jobs for regular GCC builds on Debian 9 Stretch (amd64)
@@ -288,21 +433,47 @@ system:gcc:stretch:amd64:
<<: *system_test_job
dependencies:
- gcc:stretch:amd64
needs: ["gcc:stretch:amd64"]
unit:gcc:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- gcc:stretch:amd64
needs: ["gcc:stretch:amd64"]
# Jobs for regular GCC builds on Debian 10 Buster (amd64)
gcc:buster:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *debian_buster_amd64_image
<<: *build_job
system:gcc:buster:amd64:
<<: *debian_buster_amd64_image
<<: *system_test_job
dependencies:
- gcc:buster:amd64
needs: ["gcc:buster:amd64"]
unit:gcc:buster:amd64:
<<: *debian_buster_amd64_image
<<: *unit_test_job
dependencies:
- gcc:buster:amd64
needs: ["gcc:buster:amd64"]
# Jobs for regular GCC builds on Debian Sid (amd64)
gcc:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
CFLAGS: "-Wall -Wextra -O3 -g"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
RUN_MAKE_INSTALL: 1
MAKE: bear make
<<: *debian_sid_amd64_image
<<: *build_job
@@ -311,20 +482,29 @@ system:gcc:sid:amd64:
<<: *system_test_job
dependencies:
- gcc:sid:amd64
needs: ["gcc:sid:amd64"]
unit:gcc:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- gcc:sid:amd64
needs: ["gcc:sid:amd64"]
cppcheck:gcc:sid:amd64:
<<: *debian_sid_amd64_image
<<: *cppcheck_job
dependencies:
- gcc:sid:amd64
needs: ["gcc:sid:amd64"]
# Jobs for regular GCC builds on Debian Sid (i386)
gcc:sid:i386:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2 --without-python"
CFLAGS: "-Wall -Wextra -O3 -g"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --without-python"
<<: *debian_sid_i386_image
<<: *build_job
@@ -333,34 +513,38 @@ system:gcc:sid:i386:
<<: *system_test_job
dependencies:
- gcc:sid:i386
needs: ["gcc:sid:i386"]
unit:gcc:sid:i386:
<<: *debian_sid_i386_image
<<: *unit_test_job
dependencies:
- gcc:sid:i386
needs: ["gcc:sid:i386"]
# Jobs for regular GCC builds on Fedora 29 (amd64)
# Jobs for regular GCC builds on Fedora 30 (amd64)
gcc:fedora29:amd64:
gcc:fedora30:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *fedora_29_amd64_image
<<: *fedora_30_amd64_image
<<: *build_job
system:gcc:fedora29:amd64:
<<: *fedora_29_amd64_image
system:gcc:fedora30:amd64:
<<: *fedora_30_amd64_image
<<: *system_test_job
dependencies:
- gcc:fedora29:amd64
- gcc:fedora30:amd64
needs: ["gcc:fedora30:amd64"]
unit:gcc:fedora29:amd64:
<<: *fedora_29_amd64_image
unit:gcc:fedora30:amd64:
<<: *fedora_30_amd64_image
<<: *unit_test_job
dependencies:
- gcc:fedora29:amd64
- gcc:fedora30:amd64
needs: ["gcc:fedora30:amd64"]
# Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64)
@@ -368,6 +552,7 @@ gcc:xenial:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--disable-geoip"
<<: *ubuntu_xenial_amd64_image
<<: *build_job
@@ -376,12 +561,14 @@ system:gcc:xenial:amd64:
<<: *system_test_job
dependencies:
- gcc:xenial:amd64
needs: ["gcc:xenial:amd64"]
unit:gcc:xenial:amd64:
<<: *ubuntu_xenial_amd64_image
<<: *unit_test_job
dependencies:
- gcc:xenial:amd64
needs: ["gcc:xenial:amd64"]
# Jobs for regular GCC builds on Ubuntu 18.04 Bionic Beaver (amd64)
@@ -398,12 +585,14 @@ system:gcc:bionic:amd64:
<<: *system_test_job
dependencies:
- gcc:bionic:amd64
needs: ["gcc:bionic:amd64"]
unit:gcc:bionic:amd64:
<<: *ubuntu_bionic_amd64_image
<<: *unit_test_job
dependencies:
- gcc:bionic:amd64
needs: ["gcc:bionic:amd64"]
# Jobs for GCC builds with ASAN enabled on Debian Sid (amd64)
@@ -421,12 +610,14 @@ system:asan:sid:amd64:
<<: *system_test_job
dependencies:
- asan:sid:amd64
needs: ["asan:sid:amd64"]
unit:asan:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- asan:sid:amd64
needs: ["asan:sid:amd64"]
# Jobs for Clang builds on Debian Stretch (amd64)
@@ -443,6 +634,7 @@ unit:clang:stretch:amd64:
<<: *unit_test_job
dependencies:
- clang:stretch:amd64
needs: ["clang:stretch:amd64"]
# Jobs for Clang builds on Debian Stretch (i386)
@@ -454,6 +646,28 @@ clang:stretch:i386:
<<: *debian_stretch_i386_image
<<: *build_job
# Jobs for nocrypt builds on Debian Sid (amd64)
nocrypto:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-openssl=no"
<<: *debian_sid_amd64_image
<<: *build_job
system:nocrypto:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- nocrypto:sid:amd64
unit:nocrypto:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- nocrypto:sid:amd64
# Jobs for PKCS#11-enabled GCC builds on Debian Sid (amd64)
pkcs11:sid:amd64:
@@ -469,31 +683,139 @@ system:pkcs11:sid:amd64:
<<: *system_test_job
dependencies:
- pkcs11:sid:amd64
needs: ["pkcs11:sid:amd64"]
unit:pkcs11:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- pkcs11:sid:amd64
needs: ["pkcs11:sid:amd64"]
# Jobs for GCC builds with assertions compiled away on Debian Sid (amd64)
# Jobs for Clang builds on FreeBSD 11.3 (amd64)
noassert:sid:amd64:
clang:freebsd11.3:amd64:
variables:
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *freebsd_amd64
<<: *build_job
system:clang:freebsd11.3:amd64:
<<: *freebsd_amd64
<<: *system_test_job
dependencies:
- clang:freebsd11.3:amd64
needs: ["clang:freebsd11.3:amd64"]
unit:clang:freebsd11.3:amd64:
<<: *freebsd_amd64
<<: *unit_test_job
dependencies:
- clang:freebsd11.3:amd64
needs: ["clang:freebsd11.3:amd64"]
# Jobs for Clang builds on FreeBSD 12.0 (amd64)
clang:freebsd12.0:amd64:
variables:
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--enable-dnstap"
<<: *freebsd_amd64
<<: *build_job
system:clang:freebsd12.0:amd64:
<<: *freebsd_amd64
<<: *system_test_job
dependencies:
- clang:freebsd12.0:amd64
needs: ["clang:freebsd12.0:amd64"]
unit:clang:freebsd12.0:amd64:
<<: *freebsd_amd64
<<: *unit_test_job
dependencies:
- clang:freebsd12.0:amd64
needs: ["clang:freebsd12.0:amd64"]
# Jobs with libtool disabled
nolibtool:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -DISC_CHECK_NONE=1"
EXTRA_CONFIGURE: "--with-libidn2"
CFLAGS: "-Wall -Wextra -Og -g"
EXTRA_CONFIGURE: "--with-libidn2 --without-libtool --with-dlopen"
<<: *debian_sid_amd64_image
<<: *build_job
system:noassert:sid:amd64:
system:nolibtool:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- noassert:sid:amd64
- nolibtool:sid:amd64
needs: ["nolibtool:sid:amd64"]
unit:noassert:sid:amd64:
unit:nolibtool:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- noassert:sid:amd64
- nolibtool:sid:amd64
needs: ["nolibtool:sid:amd64"]
# Jobs for Visual Studio 2017 builds on Windows (amd64)
msvc:windows:amd64:
<<: *default_triggering_rules
stage: build
tags:
- windows
- amd64
variables:
VSCONF: Release
script:
- 'Push-Location "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"'
- '& cmd.exe /C "vcvarsall.bat x64 & set" | Foreach-Object { if ($_ -match "(.*?)=(.*)") { Set-Item -force -path "Env:\$($matches[1])" -value "$($matches[2])" } }'
- 'Pop-Location'
- 'Set-Location win32utils'
- '& "C:/Strawberry/perl/bin/perl.exe" Configure
"with-tools-version=15.0"
"with-platform-toolset=v141"
"with-platform-version=10.0.17763.0"
"with-vcredist=C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Redist/MSVC/14.16.27012/vcredist_x64.exe"
"with-openssl=C:/OpenSSL"
"with-libxml2=C:/libxml2"
"without-python"
"with-system-tests"
x64'
- 'Set-Item -path "Env:CL" -value "/MP$([Math]::Truncate($BUILD_PARALLEL_JOBS/2))"'
- '& msbuild.exe /maxCpuCount:2 /t:Build /p:Configuration=$VSCONF bind9.sln'
artifacts:
untracked: true
expire_in: "1 hour"
system:msvc:windows:amd64:
stage: system
tags:
- windows
- amd64
variables:
VSCONF: Release
script:
- 'Push-Location bin/tests/system'
- '$ifIndex = Get-NetIPInterface -AddressFamily IPv4 -InterfaceMetric 75 | Select-Object -ExpandProperty ifIndex'
- '& C:/tools/cygwin/bin/sed.exe -i "s/^exit.*/netsh interface ipv4 set dnsservers $ifIndex dhcp/; s/\(name\|interface\)=Loopback/$ifIndex/;" ifconfig.bat'
- '& C:/tools/cygwin/bin/sed.exe -i "s/kill -f/kill -W/;" conf.sh stop.pl'
- '& cmd.exe /C ifconfig.bat up; ""'
- 'Start-Sleep 2'
- '$Env:Path = "C:/tools/cygwin/bin;$Env:Path"'
- '& sh.exe runall.sh $TEST_PARALLEL_JOBS'
- 'If (Test-Path C:/CrashDumps/*) { dir C:/CrashDumps; Throw }'
dependencies:
- msvc:windows:amd64
needs: ["msvc:windows:amd64"]
artifacts:
untracked: true
expire_in: "1 week"
when: on_failure
only:
- tags
- web
+243 -4
View File
@@ -1,3 +1,242 @@
--- 9.11.12 released ---
5296. [bug] Address various issues reported by cppcheck. [GL !2421]
5294. [func] Fallback to ACE name on output in locale, which does not
support converting it to unicode. [GL #846]
5293. [bug] On Windows, named crashed upon any attempt to fetch XML
statistics from it. [GL #1245]
5292. [bug] Queue 'rndc nsec3param' requests while signing inline
zone changes. [GL #1205]
--- 9.11.11 released ---
5291. [cleanup] Revert change #4825 as it was not appropriate for 9.11.
[GL #1213]
5290. [bug] Address potential NULL pointer dereference in
isc_ht_find. [GL #1211]
5287. [bug] Address potential NULL pointer dereference. [GL #1208]
5286. [contrib] Address potential NULL pointer dereferences in
dlz_mysqldyn_mod.c. [GL #1207]
5285. [port] win32: implement "-T maxudpXXX". [GL #837]
5282. [bug] Fixed a bug in searching for possible wildcard matches
for query names in the RPZ summary database. [GL #1146]
5281. [cleanup] Don't escape commas when reporting named's command
line. [GL #1189]
5280. [protocol] Add support for displaying EDNS option LLQ. [GL #1201]
5279. [bug] When loading, reject zones containing CDS or CDNSKEY
RRsets at the zone apex if they would cause DNSSEC
validation failures if published in the parent zone
as the DS RRset. [GL #1187]
--- 9.11.10 released ---
5275. [bug] Mark DS records included in referral messages
with trust level "pending" so that they can be
validated and cached immediately, with no need to
re-query. [GL #964]
5273. [bug] Check that bits [64..71] of a dns64 prefix are zero.
[GL #1159]
5269. [port] cygwin: can return ETIMEDOUT on connect() with a
non-blocking socket. [GL #1133]
5268. [bug] named could crash during configuration if
configured to use "geoip continent" ACLs with
legacy GeoIP. [GL #1163]
5266. [bug] named-checkconf failed to report dnstap-output
missing from named.conf when dnstap was specified.
[GL #1136]
5265. [bug] DNS64 and RPZ nodata (CNAME *.) rules interacted badly
[GL #1106]
5264. [func] New DNS Cookie algorithm - siphash24 - has been added to
BIND 9. [GL #605]
--- 9.11.9 released ---
5260. [bug] dnstap-read was producing malformed output for large
packets. [GL #1093]
5258. [func] Added support for the GeoIP2 API from MaxMind,
when BIND is compiled using "configure --with-geoip2".
The legacy GeoIP API can be enabled by using
"configure --with-geoip" instead. These options
cannot be used together.
Certain geoip ACL settings that were available with
legacy GeoIP are not available when using GeoIP2.
See the ARM for details. [GL #182]
5257. [bug] Some statistics data was not being displayed.
Add shading to the zone tables. [GL #1030]
5256. [bug] Ensure that glue records are included in root
priming responses if "minimal-responses" is not
set to "yes". [GL #1092]
5255. [bug] Errors encountered while reloading inline-signing
zones could be ignored, causing the zone content to
be left in an incompletely updated state rather than
reverted. [GL #1109]
5253. [port] Support platforms that don't define ULLONG_MAX.
[GL #1098]
5249. [bug] Fix a possible underflow in recursion clients
statistics when hitting recursive clients
soft quota. [GL #1067]
--- 9.11.8 released ---
5244. [security] Fixed a race condition in dns_dispatch_getnext()
that could cause an assertion failure if a
significant number of incoming packets were
rejected. (CVE-2019-6471) [GL #942]
5241. [bug] Fix Ed448 private and public key ASN.1 prefix blobs.
[GL #225]
5237. [bug] Recurse to find the root server list with 'dig +trace'.
[GL #1028]
--- 9.11.7 released ---
5233. [bug] Negative trust anchors did not work with "forward only;"
to validating resolvers. [GL #997]
5232. [bug] Fix a high-load race/crash in isc_socket_cancel().
[GL #834]
5231. [protocol] Add support for displaying CLIENT-TAG and SERVER-TAG.
[GL #960]
5229. [protocol] Enforce known SSHFP fingerprint lengths. [GL #852]
5228. [cleanup] If trusted-keys and managed-keys are configured
simultaneously for the same name, the key cannot
be rolled automatically. This configuration now
logs a warning. [GL #868]
5224. [bug] Only test provide-ixfr on TCP streams. [GL #991]
5222. [bug] 'delv -t ANY' could leak memory. [GL #983]
5221. [test] Enable parallel execution of system tests on
Windows. [GL !4101]
5218. [bug] Conditionally include <dlfcn.h>. [GL #995]
5214. [bug] win32: named now removes its lock file upon shutdown.
[GL #979]
5213. [bug] win32: Eliminated a race which allowed named.exe running
as a service to be killed prematurely during shutdown.
[GL #978]
5210. [bug] When dnstap is enabled and recursion is not
available, incoming queries are now logged
as "auth". Previously, this depended on whether
recursion was requested by the client, not on
whether recursion was available. [GL #963]
5209. [bug] When update-check-ksk is true, add_sigs was not
considering offline keys, leaving record sets signed
with the incorrect type key. [GL #763]
5208. [test] Run valid rdata wire encodings through totext+fromtext
and tofmttext+fromtext methods to check these methods.
[GL #899]
5207. [test] Check delv and dig TTL values. [GL #965]
5205. [bug] Enforce that a DS hash exists. [GL #899]
5204. [test] Check that dns_rdata_fromtext() produces a record that
will be accepted by dns_rdata_fromwire(). [GL #852]
5203. [bug] Enforce whether key rdata exists or not in KEY,
DNSKEY, CDNSKEY and RKEY. [GL #899]
5197. [bug] dig could die in best effort mode on multiple SIG(0)
records. Similarly on multiple OPT and multiple TSIG
records. [GL #920]
5194. [bug] Enforce non empty ZOMEMD hash. [GL #899]
5193. [bug] EID and NIMLOC failed to do multi-line output
correctly. [GL #899]
5192. [bug] configure --fips-mode failed. [GL #946]
5191. [port] Darwin: dlzexternal/driver.so was not building.
[GL #948]
5189. [cleanup] Remove revoked root DNSKEY from bind.keys. [GL #945]
5187. [test] Set time zone before running any tests in dnstap_test.
[GL #940]
5185. [bug] PKCS11 build could fail if ECDSA is not supported.
[GL #935]
5184. [bug] Missing unlocks in sdlz.c. [GL #936]
5182. [bug] Fix a high-load race/crash in handling of
isc_socket_close() in resolver. [GL #834]
5180. [bug] delv now honors the operating system's preferred
ephemeral port range. [GL #925]
5179. [cleanup] Replace some vague type declarations with the more
specific dns_secalg_t and dns_dsdigest_t.
Thanks to Tony Finch. [GL !1498]
5178. [bug] Handle EDQUOT (disk quota) and ENOSPC (disk full)
errors when writing files. [GL #902]
5176. [tests] Remove a dependency on libxml in statschannel system
test. [GL #926]
5175. [bug] Fixed a problem with file input in dnssec-keymgr,
dnssec-coverage and dnssec-checkds when using
python3. [GL #882]
5174. [doc] Tidy dnssec-keygen manual. [GL !1557]
5172. [bug] nsupdate now honors the operating system's preferred
ephemeral port range. [GL #905]
5170. [test] Added --with-dlz-filesystem to feature-test. [GL !1587]
5168. [test] Do not crash on shutdown when RPZ fails to load. Also,
keep previous version of the database if RPZ fails to
load. [GL #813]
5167. [bug] nxdomain-redirect could sometimes lookup the wrong
redirect name. [GL #892]
--- 9.11.6-P1 released ---
5200. [security] tcp-clients settings could be exceeded in some cases,
which could lead to exhaustion of file descriptors.
(CVE-2018-5743) [GL #615]
--- 9.11.6 released ---
--- 9.11.6rc1 released ---
5166. [port] openbsd: Threads are now enabled by default. [GL !1548]
@@ -135,8 +374,8 @@
5092. [bug] Address memory leak on SIGTERM in nsupdate when using
GSS-TSIG. [GL #558]
5090. [bug] dig and mdig failed to properly preparse dash value
pairs when value was a seperate argument and started
5090. [bug] dig and mdig failed to properly pre-parse dash value
pairs when value was a separate argument and started
with a dash. [GL #584]
5088. [bug] dig/host/nslookup could crash when interrupted close to
@@ -162,7 +401,7 @@
5072. [bug] Add unit tests for isc_buffer_copyregion() and fix its
behavior for auto-reallocated buffers. [GL #644]
5071. [bug] Comparision of NXT records was broken. [GL #631]
5071. [bug] Comparison of NXT records was broken. [GL #631]
5070. [bug] Record types which support a empty rdata field were
not handling the empty rdata field case. [GL #638]
@@ -172,7 +411,7 @@
5065. [bug] Only set IPV6_USE_MIN_MTU on IPv6. [GL #553]
5064. [test] Initalize TZ environment variable before calling
5064. [test] Initialize TZ environment variable before calling
dns_test_begin in dnstap_test. [GL #624]
5061. [protocol] Add support for EID and NIMLOC. [GL #626]
+2
View File
@@ -1,3 +1,5 @@
CONTRIBUTING
BIND Source Access and Contributor Guidelines
Feb 22, 2018
+6 -4
View File
@@ -1,3 +1,5 @@
HISTORY
Functional enhancements from prior major releases of BIND 9
BIND 9.10.0
@@ -303,11 +305,11 @@ BIND 9.4.0
* Detect duplicates of UDP queries we are recursing on and drop them.
New stats category "duplicates".
* "USE INTERNAL MALLOC" is now runtime selectable.
* The lame cache is now done on a basis as some servers only appear to
be lame for certain query types.
* The lame cache is now done on a <qname,qclass,qtype> basis as some
servers only appear to be lame for certain query types.
* Limit the number of recursive clients that can be waiting for a single
query () to resolve. New options clients-per-query and
max-clients-per-query.
query (<qname,qtype,qclass>) to resolve. New options clients-per-query
and max-clients-per-query.
* dig: report the number of extra bytes still left in the packet after
processing all the records.
* Support for IPSECKEY rdata type.
+4 -4
View File
@@ -95,22 +95,22 @@ test-force:
exit $$status
README: README.md
${PANDOC} --email-obfuscation=none -s -t html README.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="README" -f markdown-smart -t html README.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
HISTORY: HISTORY.md
${PANDOC} --email-obfuscation=none -s -t html HISTORY.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="HISTORY" -f markdown-smart -t html HISTORY.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
OPTIONS: OPTIONS.md
${PANDOC} --email-obfuscation=none -s -t html OPTIONS.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="OPTIONS" -f markdown-smart -t html OPTIONS.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
CONTRIBUTING: CONTRIBUTING.md
${PANDOC} --email-obfuscation=none -s -t html CONTRIBUTING.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="CONTRIBUTING" -f markdown-smart -t html CONTRIBUTING.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
+3 -1
View File
@@ -1,10 +1,12 @@
OPTIONS
Setting the STD_CDEFINES environment variable before running configure can
be used to enable certain compile-time options that are not explicitly
defined in configure.
Some of these settings are:
Setting Description
Setting Description
Don't ovewrite memory when allocating or freeing
-DISC_MEM_FILL=0 it; this improves performance but makes
debugging more difficult.
+101 -45
View File
@@ -1,3 +1,5 @@
README
BIND 9
Contents
@@ -37,9 +39,9 @@ versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a 501
(c)(3) public benefit corporation dedicated to providing software and
services in support of the Internet infrastructure, developed BIND 9 and
is responsible for its ongoing maintenance and improvement. BIND is open
source software licenced under the terms of ISC License for all versions
source software licensed under the terms of ISC License for all versions
up to and including BIND 9.10, and the Mozilla Public License version 2.0
for all subsequent verisons.
for all subsequent versions.
For a summary of features introduced in past major releases of BIND, see
the file HISTORY.
@@ -68,6 +70,9 @@ If the bug you are reporting is a potential security issue, such as an
assertion failure or other crash in named, please do NOT use GitLab to
report it. Instead, please send mail to security-officer@isc.org.
For a general overview of ISC security policies, read the Knowledge Base
article at https://kb.isc.org/docs/aa-00861.
Professional support and training for BIND are available from ISC at
https://www.isc.org/support.
@@ -87,7 +92,7 @@ Information for BIND contributors can be found in the following files: -
General information: doc/dev/contrib.md - BIND 9 code style: doc/dev/
style.md - BIND architecture and developer guide: doc/dev/dev.md
Patches for BIND may be submitted as Merge Requests in the ISC GitLab
Patches for BIND may be submitted as merge requests in the ISC GitLab
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests.
By default, external contributors don't have ability to fork BIND in the
@@ -128,7 +133,7 @@ releases. New features include:
fetches-per-server, this value is not self-tuning.)
+ New stats counters have been added to count queries spilled due to
these quotas.
* Added a new dnssec-keymgr key mainenance utility, which can generate
* Added a new dnssec-keymgr key maintenance utility, which can generate
or update keys as needed to ensure that a zone's keys match a defined
DNSSEC policy.
* The experimental "SIT" feature in BIND 9.10 has been renamed "COOKIE"
@@ -249,7 +254,9 @@ disclosed in CVE-2017-3145.
BIND 9.11.4
BIND 9.11.4 is a maintenance release, and addresses the security flaw
disclosed in CVE-2018-5738.
disclosed in CVE-2018-5738. It also introduces "root key sentinel"
support, enabling validating resolvers to indicate via a special query
which trust anchors are configured for the root zone.
BIND 9.11.5
@@ -263,18 +270,47 @@ correcting faulty documentation and introducing the following new feature:
BIND 9.11.6
BIND 9.11.6 is a maintenance release, and also addresses the security
flaws disclosed in CVE-2018-5744, CVE-2018-5745, and CVE-2019-6465.
flaws disclosed in CVE-2018-5743, CVE-2018-5745, CVE-2018-5744, and
CVE-2019-6465.
BIND 9.11.7
BIND 9.11.7 is a maintenance release, and also addresses the security flaw
disclosed in CVE-2018-5743.
BIND 9.11.8
BIND 9.11.8 is a maintenance release, and also addresses the security flaw
disclosed in CVE-2019-6471.
BIND 9.11.9
BIND 9.11.9 is a maintenance release, and also adds support for the new
MaxMind GeoIP2 geolocation API when built with configure --with-geoip2.
BIND 9.11.10
BIND 9.11.10 is a maintenance release.
BIND 9.11.11
BIND 9.11.11 is a maintenance release.
BIND 9.11.12
BIND 9.11.12 is a maintenance release.
Building BIND
BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
support, and a 64-bit integer type. Successful builds have been observed
on many versions of Linux and UNIX, including RedHat, Fedora, Debian,
Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris,
HP-UX, AIX, SCO OpenServer, and OpenWRT.
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
basic POSIX support, and a 64-bit integer type. Successful builds have
been observed on many versions of Linux and UNIX, including RHEL/CentOS,
Fedora, Debian, Ubuntu, SLES, openSUSE, Slackware, Alpine, FreeBSD,
NetBSD, OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE, HP-UX, and
OpenWRT.
BIND is also available for Windows XP, 2003, 2008, and higher. See
win32utils/readme1st.txt for details on building for Windows systems.
BIND is also available for Windows Server 2008 and higher. See win32utils/
build.txt for details on building for Windows systems.
To build on a UNIX or Linux system, use:
@@ -287,7 +323,7 @@ make depend. If you're using Emacs, you might find make tags helpful.
Several environment variables that can be set before running configure
will affect compilation:
Variable Description
Variable Description
CC The C compiler to use. configure tries to figure out the
right one for supported systems.
C compiler flags. Defaults to include -g and/or -O2 as
@@ -302,25 +338,23 @@ STD_CDEFINES Defaults to empty string. For a list of possible settings,
LDFLAGS Linker flags. Defaults to empty string.
BUILD_CC Needed when cross-compiling: the native C compiler to use
when building for the target system.
BUILD_CFLAGS Optional, used for cross-compiling
BUILD_CPPFLAGS
BUILD_LDFLAGS
BUILD_LIBS
BUILD_CFLAGS CFLAGS for the target system during cross-compiling.
BUILD_CPPFLAGS CPPFLAGS for the target system during cross-compiling.
BUILD_LDFLAGS LDFLAGS for the target system during cross-compiling.
BUILD_LIBS LIBS for the target system during cross-compiling.
macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed.
This can be downloaded from https://developer.apple.com/download/more/ or
if you have Xcode already installed you can run "xcode-select --install".
This will add /usr/include to the system and install the compiler and
other tools so that they can be easily found.
if you have Xcode already installed you can run xcode-select --install.
Dependencies
Portions of BIND that are written in Python, including dnssec-keymgr,
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
'argparse' and 'ply' modules to be available. 'argparse' is a standard
module as of Python 2.7 and Python 3.2. 'ply' is available from https://
argparse and ply modules to be available. argparse is a standard module as
of Python 2.7 and Python 3.2. ply is available from https://
pypi.python.org/pypi/ply.
Compile-time options
@@ -343,16 +377,18 @@ line.
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 OpenSSL library is installed in a nonstandard location,
specify the prefix using "--with-openssl=<PREFIX>" on the configure
command line. To use a PKCS#11 hardware service module for cryptographic
specify the prefix using --with-openssl=<PREFIX> on the configure command
line. To use a PKCS#11 hardware service module for cryptographic
operations, specify the path to the PKCS#11 provider library using
"--with-pkcs11=<PREFIX>", and configure BIND with
"--enable-native-pkcs11".
--with-pkcs11=<PREFIX>, and configure BIND with "--enable-native-pkcs11".
To support the HTTP statistics channel, the server must be linked with at
least one of the following: libxml2 http://xmlsoft.org or json-c https://
github.com/json-c. If these are installed at a nonstandard location,
specify the prefix using --with-libxml2=/prefix or --with-libjson=/prefix.
least one of the following libraries: libxml2 http://xmlsoft.org or json-c
https://github.com/json-c/json-c. If these are installed at a nonstandard
location, then:
* for libxml2, specify the prefix using --with-libxml2=/prefix,
* for json-c, adjust PKG_CONFIG_PATH.
To support compression on the HTTP statistics channel, the server must be
linked against libzlib. If this is installed in a nonstandard location,
@@ -360,7 +396,7 @@ specify the prefix using --with-zlib=/prefix.
To support storing configuration data for runtime-added zones in an LMDB
database, the server must be linked with liblmdb. If this is installed in
a nonstandard location, specify the prefix using "with-lmdb=/prefix".
a nonstandard location, specify the prefix using with-lmdb=/prefix.
To support GeoIP location-based ACLs, the server must be linked with
libGeoIP. This is not turned on by default; BIND must be configured with
@@ -418,7 +454,7 @@ ifconfig.sh up as root.
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules,
and will be skipped if these are not available. Some tests require Python
and the 'dnspython' module and will be skipped if these are not available.
and the dnspython module and will be skipped if these are not available.
See bin/tests/system/README for further details.
Unit tests are implemented using the CMocka unit testing framework. To
@@ -429,7 +465,7 @@ tests can be run via make test or make unit.
Documentation
The BIND 9 Administrator Reference Manual is included with the source
distribution, in DocBook XML, HTML and PDF format, in the doc/arm
distribution, in DocBook XML, HTML, and PDF format, in the doc/arm
directory.
Some of the programs in the BIND 9 distribution have man pages in their
@@ -449,7 +485,7 @@ development BIND 9 is included in the file CHANGES, with the most recent
changes listed first. Change notes include tags indicating the category of
the change that was made; these categories are:
Category Description
Category Description
[func] New feature
[bug] General bug fix
[security] Fix for a significant security flaw
@@ -477,26 +513,46 @@ releases (i.e., those with version numbers ending in zero). Some new
functionality may be backported to older releases on a case-by-case basis.
All other change types may be applied to all currently-supported releases.
Bug report identifiers
Most notes in the CHANGES file include a reference to a bug report or
issue number. Prior to 2018, these were usually of the form [RT #NNN] and
referred to entries in the "bind9-bugs" RT database, which was not open to
the public. More recent entries use the form [GL #NNN] or, less often, [GL
!NNN], which, respectively, refer to issues or merge requests in the
GitLab database. Most of these are publicly readable, unless they include
information which is confidential or security sensitive.
To look up a GitLab issue by its number, use the URL https://
gitlab.isc.org/isc-projects/bind9/issues/NNN. To look up a merge request,
use https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN.
In rare cases, an issue or merge request number may be followed with the
letter "P". This indicates that the information is in the private ISC
GitLab instance, which is not visible to the public.
Acknowledgments
* The original development of BIND 9 was underwritten by the following
organizations:
Sun Microsystems, Inc.
Hewlett Packard
Compaq Computer Corporation
IBM
Process Software Corporation
Silicon Graphics, Inc.
Network Associates, Inc.
U.S. Defense Information Systems Agency
USENIX Association
Stichting NLnet - NLnet Foundation
Nominum, Inc.
Sun Microsystems, Inc.
Hewlett Packard
Compaq Computer Corporation
IBM
Process Software Corporation
Silicon Graphics, Inc.
Network Associates, Inc.
U.S. Defense Information Systems Agency
USENIX Association
Stichting NLnet - NLnet Foundation
Nominum, Inc.
* This product includes software developed by the OpenSSL Project for
use in the OpenSSL Toolkit. http://www.OpenSSL.org/
* This product includes cryptographic software written by Eric Young
(eay@cryptsoft.com)
* This product includes software written by Tim Hudson
(tjh@cryptsoft.com)
+96 -41
View File
@@ -48,9 +48,9 @@ versions 4 and 8. Internet Systems Consortium
corporation dedicated to providing software and services in support of the
Internet infrastructure, developed BIND 9 and is responsible for its
ongoing maintenance and improvement. BIND is open source software
licenced under the terms of ISC License for all versions up to and
licensed under the terms of ISC License for all versions up to and
including BIND 9.10, and the Mozilla Public License version 2.0 for all
subsequent verisons.
subsequent versions.
For a summary of features introduced in past major releases of BIND,
see the file [HISTORY](HISTORY.md).
@@ -82,6 +82,9 @@ assertion failure or other crash in `named`, please do *NOT* use GitLab to
report it. Instead, please send mail to
[security-officer@isc.org](mailto:security-officer@isc.org).
For a general overview of ISC security policies, read the Knowledge Base
article at [https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
Professional support and training for BIND are available from
ISC at [https://www.isc.org/support](https://www.isc.org/support).
@@ -103,7 +106,7 @@ Information for BIND contributors can be found in the following files:
- BIND architecture and developer guide: [doc/dev/dev.md](doc/dev/dev.md)
Patches for BIND may be submitted as
[Merge Requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
[merge requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
in the [ISC GitLab server](https://gitlab.isc.org) at
at [https://gitlab.isc.org/isc-projects/bind9/merge_requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
@@ -146,7 +149,7 @@ releases. New features include:
`fetches-per-server`, this value is not self-tuning.)
* New stats counters have been added to count queries spilled due to
these quotas.
* Added a new `dnssec-keymgr` key mainenance utility, which can generate or
* Added a new `dnssec-keymgr` key maintenance utility, which can generate or
update keys as needed to ensure that a zone's keys match a defined DNSSEC
policy.
* The experimental "SIT" feature in BIND 9.10 has been renamed "COOKIE" and
@@ -265,7 +268,9 @@ disclosed in CVE-2017-3145.
#### BIND 9.11.4
BIND 9.11.4 is a maintenance release, and addresses the security flaw
disclosed in CVE-2018-5738.
disclosed in CVE-2018-5738. It also introduces "root key sentinel" support,
enabling validating resolvers to indicate via a special query which trust
anchors are configured for the root zone.
#### BIND 9.11.5
@@ -280,18 +285,48 @@ feature:
#### BIND 9.11.6
BIND 9.11.6 is a maintenance release, and also addresses the security
flaws disclosed in CVE-2018-5744, CVE-2018-5745, and CVE-2019-6465.
flaws disclosed in CVE-2018-5743, CVE-2018-5745, CVE-2018-5744,
and CVE-2019-6465.
#### BIND 9.11.7
BIND 9.11.7 is a maintenance release, and also addresses the security
flaw disclosed in CVE-2018-5743.
#### BIND 9.11.8
BIND 9.11.8 is a maintenance release, and also addresses the security
flaw disclosed in CVE-2019-6471.
#### BIND 9.11.9
BIND 9.11.9 is a maintenance release, and also adds support for
the new MaxMind GeoIP2 geolocation API when built with
`configure --with-geoip2`.
#### BIND 9.11.10
BIND 9.11.10 is a maintenance release.
#### BIND 9.11.11
BIND 9.11.11 is a maintenance release.
#### BIND 9.11.12
BIND 9.11.12 is a maintenance release.
### <a name="build"/> Building BIND
BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
support, and a 64-bit integer type. Successful builds have been observed on
many versions of Linux and UNIX, including RedHat, Fedora, Debian, Ubuntu,
SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris, HP-UX, AIX,
SCO OpenServer, and OpenWRT.
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
basic POSIX support, and a 64-bit integer type. Successful builds have been
observed on many versions of Linux and UNIX, including RHEL/CentOS, Fedora,
Debian, Ubuntu, SLES, openSUSE, Slackware, Alpine, FreeBSD, NetBSD,
OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE, HP-UX, and OpenWRT.
BIND is also available for Windows XP, 2003, 2008, and higher. See
`win32utils/readme1st.txt` for details on building for Windows systems.
BIND is also available for Windows Server 2008 and higher. See
`win32utils/build.txt` for details on building for Windows
systems.
To build on a UNIX or Linux system, use:
@@ -312,26 +347,24 @@ affect compilation:
|`STD_CDEFINES`|Any additional preprocessor symbols you want defined. Defaults to empty string. For a list of possible settings, see the file [OPTIONS](OPTIONS.md).|
|`LDFLAGS`|Linker flags. Defaults to empty string.|
|`BUILD_CC`|Needed when cross-compiling: the native C compiler to use when building for the target system.|
|`BUILD_CFLAGS`|Optional, used for cross-compiling|
|`BUILD_CPPFLAGS`||
|`BUILD_LDFLAGS`||
|`BUILD_LIBS`||
|`BUILD_CFLAGS`|`CFLAGS` for the target system during cross-compiling.|
|`BUILD_CPPFLAGS`|`CPPFLAGS` for the target system during cross-compiling.|
|`BUILD_LDFLAGS`|`LDFLAGS` for the target system during cross-compiling.|
|`BUILD_LIBS`|`LIBS` for the target system during cross-compiling.|
#### <a name="macos"> macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed.
This can be downloaded from https://developer.apple.com/download/more/
or if you have Xcode already installed you can run "xcode-select --install".
This will add /usr/include to the system and install the compiler and other
tools so that they can be easily found.
This can be downloaded from [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`.
### <a name="dependencies"/> Dependencies
Portions of BIND that are written in Python, including
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
system tests, require the 'argparse' and 'ply' modules to be available.
'argparse' is a standard module as of Python 2.7 and Python 3.2.
'ply' is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
system tests, require the `argparse` and `ply` modules to be available.
`argparse` is a standard module as of Python 2.7 and Python 3.2.
`ply` is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
#### <a name="opts"/> Compile-time options
@@ -353,34 +386,36 @@ command line.
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
OpenSSL library is installed in a nonstandard location, specify the prefix
using "--with-openssl=&lt;PREFIX&gt;" on the configure command line. To use a
using `--with-openssl=<PREFIX>` on the configure command line. To use a
PKCS#11 hardware service module for cryptographic operations, specify the
path to the PKCS#11 provider library using "--with-pkcs11=&lt;PREFIX&gt;", and
path to the PKCS#11 provider library using `--with-pkcs11=<PREFIX>`, and
configure BIND with "--enable-native-pkcs11".
To support the HTTP statistics channel, the server must be linked with at
least one of the following: libxml2
[http://xmlsoft.org](http://xmlsoft.org) or json-c
[https://github.com/json-c](https://github.com/json-c). If these are
installed at a nonstandard location, specify the prefix using
`--with-libxml2=/prefix` or `--with-libjson=/prefix`.
least one of the following libraries: `libxml2`
[http://xmlsoft.org](http://xmlsoft.org) or `json-c`
[https://github.com/json-c/json-c](https://github.com/json-c/json-c).
If these are installed at a nonstandard location, then:
* for `libxml2`, specify the prefix using `--with-libxml2=/prefix`,
* for `json-c`, adjust `PKG_CONFIG_PATH`.
To support compression on the HTTP statistics channel, the server must be
linked against libzlib. If this is installed in a nonstandard location,
linked against `libzlib`. If this is installed in a nonstandard location,
specify the prefix using `--with-zlib=/prefix`.
To support storing configuration data for runtime-added zones in an LMDB
database, the server must be linked with liblmdb. If this is installed in a
nonstandard location, specify the prefix using "with-lmdb=/prefix".
nonstandard location, specify the prefix using `with-lmdb=/prefix`.
To support GeoIP location-based ACLs, the server must be linked with
libGeoIP. This is not turned on by default; BIND must be configured with
"--with-geoip". If the library is installed in a nonstandard location, use
specify the prefix using "--with-geoip=/prefix".
For DNSTAP packet logging, you must have installed libfstrm
For DNSTAP packet logging, you must have installed `libfstrm`
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
and libprotobuf-c
and `libprotobuf-c`
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
and BIND must be configured with `--enable-dnstap`.
@@ -428,20 +463,21 @@ multiple servers to run locally and communicate with one another). These
IP addresses can be configured by running the command
`bin/tests/system/ifconfig.sh up` as root.
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules,
Some tests require Perl and the `Net::DNS` and/or `IO::Socket::INET6` modules,
and will be skipped if these are not available. Some tests require Python
and the 'dnspython' module and will be skipped if these are not available.
and the `dnspython` module and will be skipped if these are not available.
See bin/tests/system/README for further details.
Unit tests are implemented using the CMocka unit testing framework.
Unit tests are implemented using the [CMocka unit testing framework](https://cmocka.org/).
To build them, use `configure --with-cmocka`. Execution of tests is done
by the Kyua test execution engine; if the `kyua` command is available,
then unit tests can be run via `make test` or `make unit`.
by the [Kyua test execution engine](https://github.com/jmmv/kyua); if the
`kyua` command is available, then unit tests can be run via `make test`
or `make unit`.
### <a name="doc"/> Documentation
The *BIND 9 Administrator Reference Manual* is included with the source
distribution, in DocBook XML, HTML and PDF format, in the `doc/arm`
distribution, in DocBook XML, HTML, and PDF format, in the `doc/arm`
directory.
Some of the programs in the BIND 9 distribution have man pages in their
@@ -484,6 +520,25 @@ releases (i.e., those with version numbers ending in zero). Some new
functionality may be backported to older releases on a case-by-case basis.
All other change types may be applied to all currently-supported releases.
#### Bug report identifiers
Most notes in the CHANGES file include a reference to a bug report or
issue number. Prior to 2018, these were usually of the form `[RT #NNN]`
and referred to entries in the "bind9-bugs" RT database, which was not open
to the public. More recent entries use the form `[GL #NNN]` or, less often,
`[GL !NNN]`, which, respectively, refer to issues or merge requests in the
GitLab database. Most of these are publicly readable, unless they include
information which is confidential or security sensitive.
To look up a GitLab issue by its number, use the URL
[https://gitlab.isc.org/isc-projects/bind9/issues/NNN](https://gitlab.isc.org/isc-projects/bind9/issues).
To look up a merge request, use
[https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
In rare cases, an issue or merge request number may be followed with the
letter "P". This indicates that the information is in the private ISC
GitLab instance, which is not visible to the public.
### <a name="ack"/> Acknowledgments
* The original development of BIND 9 was underwritten by the
Vendored
+2
View File
@@ -288,6 +288,8 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
m4_include([libtool.m4/ax_restore_flags.m4])
m4_include([libtool.m4/ax_save_flags.m4])
m4_include([libtool.m4/libtool.m4])
m4_include([libtool.m4/ltoptions.m4])
m4_include([libtool.m4/ltsugar.m4])
+1 -3
View File
@@ -7,8 +7,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: Makefile.in,v 1.36 2009/12/05 23:31:40 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
@@ -23,7 +21,7 @@ CINCLUDES = ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
CDEFINES = @CRYPTO@ -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{03A96113-CB14-43AA-AEB2-48950E3915C5}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>checkconf</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -17,18 +17,21 @@
<ProjectGuid>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>checktool</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+10 -7
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{66028555-7DD5-4016-B601-9EF9A1EE8BFA}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>checkzone</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -62,15 +65,15 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration)
@@ -95,7 +98,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
@@ -104,8 +107,8 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
<PostBuildEvent>
+1 -3
View File
@@ -7,8 +7,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: Makefile.in,v 1.8 2009/12/05 23:31:40 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
@@ -31,7 +29,7 @@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{64964B03-4815-41F0-9057-E766A94AF197}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>confgentool</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>ddnsconfgen</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{1E2C1635-3093-4D59-80E7-4743AC10F22F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>rndcconfgen</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+1 -1
View File
@@ -23,7 +23,7 @@ CDEFINES = @CRYPTO@ -DVERSION=\"${VERSION}\" \
CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@
ISCLIBS = ../../lib/isc/libisc.@A@
IRSLIBS = ../../lib/irs/libirs.@A@
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>delv</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+1 -1
View File
@@ -25,7 +25,7 @@ CDEFINES = -DVERSION=\"${VERSION}\" @CRYPTO@
CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCLIBS = ../../lib/isc/libisc.@A@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@
+16 -10
View File
@@ -368,14 +368,20 @@ Display [do not display] the CLASS when printing the record\&.
.PP
\fB+[no]cmd\fR
.RS 4
Toggles the printing of the initial comment in the output identifying the version of
Toggles the printing of the initial comment in the output, identifying the version of
\fBdig\fR
and the query options that have been applied\&. This comment is printed by default\&.
and the query options that have been applied\&. This option always has global effect; it cannot be set globally and then overridden on a per\-lookup basis\&. The default is to print this comment\&.
.RE
.PP
\fB+[no]comments\fR
.RS 4
Toggle the display of comment lines in the output\&. The default is to print comments\&.
Toggles the display of some comment lines in the output, containing information about the packet header and OPT pseudosection, and the names of the response section\&. The default is to print these comments\&.
.sp
Other types of comments in the output are not affected by this option, but can be controlled using other command line switches\&. These include
\fB+[no]cmd\fR,
\fB+[no]question\fR,
\fB+[no]stats\fR, and
\fB+[no]rrcomments\fR\&.
.RE
.PP
\fB+[no]cookie\fR\fB[=####]\fR
@@ -554,12 +560,12 @@ Set [restore] the DNS message opcode to the specified value\&. The default value
.PP
\fB+[no]qr\fR
.RS 4
Print [do not print] the query as it is sent\&. By default, the query is not printed\&.
Toggles the display of the query message as it is sent\&. By default, the query is not printed\&.
.RE
.PP
\fB+[no]question\fR
.RS 4
Print [do not print] the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
Toggles the display of the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
.RE
.PP
\fB+[no]rdflag\fR
@@ -572,11 +578,11 @@ A synonym for
.RS 4
Toggle the setting of the RD (recursion desired) bit in the query\&. This bit is set by default, which means
\fBdig\fR
normally sends recursive queries\&. Recursion is automatically disabled when the
normally sends recursive queries\&. Recursion is automatically disabled when using the
\fI+nssearch\fR
or
option, and when using
\fI+trace\fR
query options are used\&.
except for an initial recursive query to get the list of root servers\&.
.RE
.PP
\fB+retry=T\fR
@@ -607,7 +613,7 @@ determines if the name will be treated as relative or not and hence whether a se
.PP
\fB+[no]short\fR
.RS 4
Provide a terse answer\&. The default is to print the answer in a verbose form\&.
Provide a terse answer\&. The default is to print the answer in a verbose form\&. This option always has global effect; it cannot be set globally and then overridden on a per\-lookup basis\&.
.RE
.PP
\fB+[no]showsearch\fR
@@ -637,7 +643,7 @@ causes fields not to be split at all\&. The default is 56 characters, or 44 char
.PP
\fB+[no]stats\fR
.RS 4
This query option toggles the printing of statistics: when the query was made, the size of the reply and so on\&. The default behavior is to print the query statistics\&.
Toggles the printing of statistics: when the query was made, the size of the reply and so on\&. The default behavior is to print the query statistics as a comment after each lookup\&.
.RE
.PP
\fB+[no]subnet=addr[/prefix\-length]\fR
+19 -12
View File
@@ -176,11 +176,13 @@ help(void) {
" +bufsize=### (Set EDNS0 Max UDP packet size)\n"
" +[no]cdflag (Set checking disabled flag in query)\n"
" +[no]class (Control display of class in records)\n"
" +[no]cmd (Control display of command line)\n"
" +[no]comments (Control display of comment lines)\n"
" +[no]cmd (Control display of command line -\n"
" global option)\n"
" +[no]comments (Control display of packet header\n"
" and section name comments)\n"
" +[no]cookie (Add a COOKIE option to the request)\n"
" +[no]crypto (Control display of cryptographic "
"fields in records)\n"
" +[no]crypto (Control display of cryptographic\n"
" fields in records)\n"
" +[no]defname (Use search list (+[no]search))\n"
" +[no]dnssec (Request DNSSEC records)\n"
" +domain=### (Set default domainname)\n"
@@ -196,10 +198,12 @@ help(void) {
" +[no]identify (ID responders in short answers)\n"
#ifdef HAVE_LIBIDN2
" +[no]idnin (Parse IDN names [default=on on tty])\n"
" +[no]idnout (Convert IDN response [default=on on tty])\n"
" +[no]idnout (Convert IDN response "
"[default=on on tty])\n"
#endif
" +[no]ignore (Don't revert to TCP for TC responses.)\n"
" +[no]keepopen (Keep the TCP socket open between queries)\n"
" +[no]keepopen (Keep the TCP socket open between "
"queries)\n"
" +[no]mapped (Allow mapped IPv4 over IPv6)\n"
" +[no]multiline (Print records in an expanded format)\n"
" +ndots=### (Set search NDOTS value)\n"
@@ -216,7 +220,7 @@ help(void) {
"comments)\n"
" +[no]search (Set whether to use searchlist)\n"
" +[no]short (Display nothing except short\n"
" form of answer)\n"
" form of answers - global option)\n"
" +[no]showsearch (Search with intermediate results)\n"
#ifdef DIG_SIGCHASE
" +[no]sigchase (Chase DNSSEC signatures)\n"
@@ -229,14 +233,16 @@ help(void) {
#if defined(DIG_SIGCHASE) && DIG_SIGCHASE_TD
" +[no]topdown (Do +sigchase in top-down mode)\n"
#endif
" +[no]trace (Trace delegation down from root [+dnssec])\n"
" +[no]trace (Trace delegation down from root "
"[+dnssec])\n"
#ifdef DIG_SIGCHASE
" +trusted-key=#### (Trusted Key to use with +sigchase)\n"
#endif
" +tries=### (Set number of UDP attempts) [3]\n"
" +[no]ttlid (Control display of ttls in records)\n"
" +[no]ttlunits (Display TTLs in human-readable units)\n"
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" format)\n"
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" "
"format)\n"
" +[no]vc (TCP mode (+[no]tcp))\n"
" +[no]zflag (Set Z flag in query)\n"
" global d-opts and servers (before host name) affect all queries.\n"
@@ -565,8 +571,9 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
check_result(result, "dns_master_stylecreate");
if (query->lookup->cmdline[0] != 0) {
if (!short_form)
if (!short_form && printcmd) {
fputs(query->lookup->cmdline, stdout);
}
query->lookup->cmdline[0]=0;
}
debug("printmessage(%s %s %s)", headers ? "headers" : "noheaders",
@@ -588,7 +595,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
check_result(result, "isc_buffer_allocate");
if (query->lookup->comments && !short_form) {
if (query->lookup->cmdline[0] != 0)
if (query->lookup->cmdline[0] != 0 && printcmd)
printf("; %s\n", query->lookup->cmdline);
if (msg == query->lookup->sendmsg)
printf(";; Sending:\n");
@@ -1431,7 +1438,7 @@ plus_option(const char *option, bool is_batchfile,
lookup->trace = state;
lookup->trace_root = state;
if (state) {
lookup->recurse = false;
lookup->recurse = true;
lookup->identify = true;
lookup->comments = false;
rrcomments = 0;
+30 -15
View File
@@ -605,9 +605,11 @@
<listitem>
<para>
Toggles the printing of the initial comment in the
output identifying the version of <command>dig</command>
and the query options that have been applied. This
comment is printed by default.
output, identifying the version of <command>dig</command>
and the query options that have been applied. This option
always has global effect; it cannot be set globally
and then overridden on a per-lookup basis. The default
is to print this comment.
</para>
</listitem>
</varlistentry>
@@ -616,8 +618,18 @@
<term><option>+[no]comments</option></term>
<listitem>
<para>
Toggle the display of comment lines in the output.
The default is to print comments.
Toggles the display of some comment lines in the output,
containing information about the packet header and
OPT pseudosection, and the names of the response
section. The default is to print these comments.
</para>
<para>
Other types of comments in the output are not affected by
this option, but can be controlled using other command
line switches. These include <command>+[no]cmd</command>,
<command>+[no]question</command>,
<command>+[no]stats</command>, and
<command>+[no]rrcomments</command>.
</para>
</listitem>
</varlistentry>
@@ -940,8 +952,8 @@
<term><option>+[no]qr</option></term>
<listitem>
<para>
Print [do not print] the query as it is sent. By
default, the query is not printed.
Toggles the display of the query message as it is sent.
By default, the query is not printed.
</para>
</listitem>
</varlistentry>
@@ -950,7 +962,7 @@
<term><option>+[no]question</option></term>
<listitem>
<para>
Print [do not print] the question section of a query
Toggles the display of the question section of a query
when an answer is returned. The default is to print
the question section as a comment.
</para>
@@ -974,8 +986,10 @@
in the query. This bit is set by default, which means
<command>dig</command> normally sends recursive
queries. Recursion is automatically disabled when
the <parameter>+nssearch</parameter> or
<parameter>+trace</parameter> query options are used.
using the <parameter>+nssearch</parameter> option, and
when using <parameter>+trace</parameter> except for
an initial recursive query to get the list of root
servers.
</para>
</listitem>
</varlistentry>
@@ -1028,7 +1042,9 @@
<listitem>
<para>
Provide a terse answer. The default is to print the
answer in a verbose form.
answer in a verbose form. This option always has global
effect; it cannot be set globally and then overridden on
a per-lookup basis.
</para>
</listitem>
</varlistentry>
@@ -1074,10 +1090,9 @@
<term><option>+[no]stats</option></term>
<listitem>
<para>
This query option toggles the printing of statistics:
when the query was made, the size of the reply and
so on. The default behavior is to print the query
statistics.
Toggles the printing of statistics: when the query was made,
the size of the reply and so on. The default behavior is to
print the query statistics as a comment after each lookup.
</para>
</listitem>
</varlistentry>
+30 -15
View File
@@ -490,16 +490,28 @@
<dd>
<p>
Toggles the printing of the initial comment in the
output identifying the version of <span class="command"><strong>dig</strong></span>
and the query options that have been applied. This
comment is printed by default.
output, identifying the version of <span class="command"><strong>dig</strong></span>
and the query options that have been applied. This option
always has global effect; it cannot be set globally
and then overridden on a per-lookup basis. The default
is to print this comment.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
<dd>
<p>
Toggle the display of comment lines in the output.
The default is to print comments.
Toggles the display of some comment lines in the output,
containing information about the packet header and
OPT pseudosection, and the names of the response
section. The default is to print these comments.
</p>
<p>
Other types of comments in the output are not affected by
this option, but can be controlled using other command
line switches. These include <span class="command"><strong>+[no]cmd</strong></span>,
<span class="command"><strong>+[no]question</strong></span>,
<span class="command"><strong>+[no]stats</strong></span>, and
<span class="command"><strong>+[no]rrcomments</strong></span>.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]cookie[<span class="optional">=####</span>]</code></span></dt>
@@ -745,14 +757,14 @@
<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
<dd>
<p>
Print [do not print] the query as it is sent. By
default, the query is not printed.
Toggles the display of the query message as it is sent.
By default, the query is not printed.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]question</code></span></dt>
<dd>
<p>
Print [do not print] the question section of a query
Toggles the display of the question section of a query
when an answer is returned. The default is to print
the question section as a comment.
</p>
@@ -770,8 +782,10 @@
in the query. This bit is set by default, which means
<span class="command"><strong>dig</strong></span> normally sends recursive
queries. Recursion is automatically disabled when
the <em class="parameter"><code>+nssearch</code></em> or
<em class="parameter"><code>+trace</code></em> query options are used.
using the <em class="parameter"><code>+nssearch</code></em> option, and
when using <em class="parameter"><code>+trace</code></em> except for
an initial recursive query to get the list of root
servers.
</p>
</dd>
<dt><span class="term"><code class="option">+retry=T</code></span></dt>
@@ -812,7 +826,9 @@
<dd>
<p>
Provide a terse answer. The default is to print the
answer in a verbose form.
answer in a verbose form. This option always has global
effect; it cannot be set globally and then overridden on
a per-lookup basis.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
@@ -846,10 +862,9 @@
<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
<dd>
<p>
This query option toggles the printing of statistics:
when the query was made, the size of the reply and
so on. The default behavior is to print the query
statistics.
Toggles the printing of statistics: when the query was made,
the size of the reply and so on. The default behavior is to
print the query statistics as a comment after each lookup.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]subnet=addr[/prefix-length]</code></span></dt>
+22 -6
View File
@@ -1670,6 +1670,7 @@ typedef struct dig_ednsoptname {
} dig_ednsoptname_t;
dig_ednsoptname_t optnames[] = {
{ 1, "LLQ" }, /* draft-sekar-dns-llq */
{ 3, "NSID" }, /* RFC 5001 */
{ 5, "DAU" }, /* RFC 6975 */
{ 6, "DHU" }, /* RFC 6975 */
@@ -1682,6 +1683,8 @@ dig_ednsoptname_t optnames[] = {
{ 12, "PAD" }, /* shorthand */
{ 13, "CHAIN" }, /* RFC 7901 */
{ 14, "KEY-TAG" }, /* RFC 8145 */
{ 16, "CLIENT-TAG" }, /* draft-bellis-dnsop-edns-tags */
{ 17, "SERVER-TAG" }, /* draft-bellis-dnsop-edns-tags */
{ 26946, "DEVICEID" }, /* Brian Hartvigsen */
};
@@ -2540,12 +2543,14 @@ setup_lookup(dig_lookup_t *lookup) {
lookup->sendmsg->id = (unsigned short)id & 0xFFFF;
lookup->sendmsg->opcode = lookup->opcode;
lookup->msgcounter = 0;
/*
* If this is a trace request, completely disallow recursion, since
* it's meaningless for traces.
* If this is a trace request, completely disallow recursion after
* looking up the root name servers, since it's meaningless for traces.
*/
if (lookup->trace || (lookup->ns_search_only && !lookup->trace_root))
if ((lookup->trace || lookup->ns_search_only) && !lookup->trace_root) {
lookup->recurse = false;
}
if (lookup->recurse &&
lookup->rdtype != dns_rdatatype_axfr &&
@@ -4860,9 +4865,20 @@ idn_ace_to_locale(const char *from, char *to, size_t tolen) {
*/
res = idn2_to_unicode_8zlz(utf8_src, &tmp_str, 0);
if (res != IDN2_OK) {
fatal("Cannot represent '%s' in the current locale (%s), "
"use +noidnout or a different locale",
from, idn2_strerror(res));
static bool warned = false;
res = idn2_to_ascii_8z(utf8_src, &tmp_str, 0);
if (res != IDN2_OK) {
fatal("Cannot represent '%s' "
"in the current locale nor ascii (%s), "
"use +noidnout or a different locale",
from, idn2_strerror(res));
} else if (!warned) {
fprintf(stderr, ";; Warning: cannot represent '%s' "
"in the current locale",
tmp_str);
warned = true;
}
}
/*
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{F938F9B8-D395-4A40-BEC7-0122D289C692}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>dig</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{140DE800-E552-43CC-B0C7-A33A92E368CA}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>dighost</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{BA1048A8-6961-4A20-BE12-08BE20611C9D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>host</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{C15A6E1A-94CE-4686-99F9-6BC5FD623EB5}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>nslookup</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+1 -3
View File
@@ -7,8 +7,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: Makefile.in,v 1.42.332.1 2011/03/16 06:37:51 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
@@ -23,7 +21,7 @@ CDEFINES = -DVERSION=\"${VERSION}\" @USE_PKCS11@ @PKCS11_ENGINE@ \
@CRYPTO@ -DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@
+1 -1
View File
@@ -98,7 +98,7 @@ Specify a digest algorithm to use when converting DNSKEY records to DS records\&
.sp
The
\fIalgorithm\fR
must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&.
must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is to use both SHA\-1 and SHA\-256\&.
.RE
.PP
\-A
+19 -11
View File
@@ -236,7 +236,7 @@ logkey(dns_rdata_t *rdata)
}
static void
emit(unsigned int dtype, bool showall, char *lookaside,
emit(dns_dsdigest_t dtype, bool showall, char *lookaside,
bool cds, dns_rdata_t *rdata)
{
isc_result_t result;
@@ -351,7 +351,7 @@ main(int argc, char **argv) {
char *lookaside = NULL;
char *endp;
int ch;
unsigned int dtype = DNS_DSDIGEST_SHA1;
dns_dsdigest_t dtype = DNS_DSDIGEST_SHA1;
bool cds = false;
bool both = true;
bool usekeyset = false;
@@ -509,24 +509,29 @@ main(int argc, char **argv) {
dns_rdataset_init(&rdataset);
if (usekeyset || filename != NULL) {
if (argc < isc_commandline_index + 1 && filename != NULL) {
if (argc < isc_commandline_index + 1) {
/* using zone name as the zone file name */
namestr = filename;
} else
} else {
namestr = argv[isc_commandline_index];
}
result = initname(namestr);
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
fatal("could not initialize name %s", namestr);
}
if (usekeyset)
if (usekeyset) {
result = loadkeyset(dir, &rdataset);
else
} else {
INSIST(filename != NULL);
result = loadset(filename, &rdataset);
}
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
fatal("could not load DNSKEY set: %s\n",
isc_result_totext(result));
}
for (result = dns_rdataset_first(&rdataset);
result == ISC_R_SUCCESS;
@@ -534,16 +539,18 @@ main(int argc, char **argv) {
dns_rdata_init(&rdata);
dns_rdataset_current(&rdataset, &rdata);
if (verbose > 2)
if (verbose > 2) {
logkey(&rdata);
}
if (both) {
emit(DNS_DSDIGEST_SHA1, showall, lookaside,
cds, &rdata);
emit(DNS_DSDIGEST_SHA256, showall, lookaside,
cds, &rdata);
} else
} else {
emit(dtype, showall, lookaside, cds, &rdata);
}
}
} else {
unsigned char key_buf[DST_KEY_MAXSIZE];
@@ -556,8 +563,9 @@ main(int argc, char **argv) {
&rdata);
emit(DNS_DSDIGEST_SHA256, showall, lookaside, cds,
&rdata);
} else
} else {
emit(dtype, showall, lookaside, cds, &rdata);
}
}
if (dns_rdataset_isassociated(&rdataset))
+1 -1
View File
@@ -177,7 +177,7 @@
The <replaceable>algorithm</replaceable> must be one of
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
and the hyphen may be omitted. If no algorithm is specified,
the default is SHA-256.
the default is to use both SHA-1 and SHA-256.
</para>
</listitem>
</varlistentry>
+1 -1
View File
@@ -156,7 +156,7 @@
The <em class="replaceable"><code>algorithm</code></em> must be one of
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
and the hyphen may be omitted. If no algorithm is specified,
the default is SHA-256.
the default is to use both SHA-1 and SHA-256.
</p>
</dd>
<dt><span class="term">-A</span></dt>
+29 -21
View File
@@ -39,7 +39,7 @@
dnssec-keygen \- DNSSEC key generation tool
.SH "SYNOPSIS"
.HP \w'\fBdnssec\-keygen\fR\ 'u
\fBdnssec\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] {name}
\fBdnssec\-keygen\fR [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {name}
.SH "DESCRIPTION"
.PP
\fBdnssec\-keygen\fR
@@ -50,6 +50,13 @@ The
of the key is specified on the command line\&. For DNSSEC keys, this must match the name of the zone for which the key is being generated\&.
.SH "OPTIONS"
.PP
\-3
.RS 4
Use an NSEC3\-capable algorithm to generate a DNSSEC key\&. If this option is used with an algorithm that has both NSEC and NSEC3 versions, then the NSEC3 version will be used; for example,
\fBdnssec\-keygen \-3a RSASHA1\fR
specifies the NSEC3RSASHA1 algorithm\&.
.RE
.PP
\-a \fIalgorithm\fR
.RS 4
Selects the cryptographic algorithm\&. For DNSSEC keys, the value of
@@ -78,21 +85,9 @@ The key size does not need to be specified if using a default algorithm\&. The d
must be used\&.
.RE
.PP
\-n \fInametype\fR
.RS 4
Specifies the owner type of the key\&. The value of
\fBnametype\fR
must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY)\&. These values are case insensitive\&. Defaults to ZONE for DNSKEY generation\&.
.RE
.PP
\-3
.RS 4
Use an NSEC3\-capable algorithm to generate a DNSSEC key\&. If this option is used and no algorithm is explicitly set on the command line, NSEC3RSASHA1 will be used by default\&. Note that RSASHA256, RSASHA512, ECCGOST, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 and ED448 algorithms are NSEC3\-capable\&.
.RE
.PP
\-C
.RS 4
Compatibility mode: generates an old\-style key, without any metadata\&. By default,
Compatibility mode: generates an old\-style key, without any timing metadata\&. By default,
\fBdnssec\-keygen\fR
will include the key\*(Aqs creation date in the metadata stored with the private key, and other dates may be set there as well (publication date, activation date, etc)\&. Keys that include this data may be incompatible with older versions of BIND; the
\fB\-C\fR
@@ -151,9 +146,17 @@ none
is the same as leaving it unset\&.
.RE
.PP
\-n \fInametype\fR
.RS 4
Specifies the owner type of the key\&. The value of
\fBnametype\fR
must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY)\&. These values are case insensitive\&. Defaults to ZONE for DNSKEY generation\&.
.RE
.PP
\-p \fIprotocol\fR
.RS 4
Sets the protocol value for the generated key\&. The protocol is a number between 0 and 255\&. The default is 3 (DNSSEC)\&. Other possible values for this argument are listed in RFC 2535 and its successors\&.
Sets the protocol value for the generated key, for use with
\fB\-T KEY\fR\&. The protocol is a number between 0 and 255\&. The default is 3 (DNSSEC)\&. Other possible values for this argument are listed in RFC 2535 and its successors\&.
.RE
.PP
\-q
@@ -196,20 +199,21 @@ Using any TSIG algorithm (HMAC\-* or DH) forces this option to KEY\&.
.PP
\-t \fItype\fR
.RS 4
Indicates the use of the key\&.
Indicates the use of the key, for use with
\fB\-T KEY\fR\&.
\fBtype\fR
must be one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF\&. The default is AUTHCONF\&. AUTH refers to the ability to authenticate data, and CONF the ability to encrypt data\&.
.RE
.PP
\-v \fIlevel\fR
.RS 4
Sets the debugging level\&.
.RE
.PP
\-V
.RS 4
Prints version information\&.
.RE
.PP
\-v \fIlevel\fR
.RS 4
Sets the debugging level\&.
.RE
.SH "TIMING OPTIONS"
.PP
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS\&. If the argument begins with a \*(Aq+\*(Aq or \*(Aq\-\*(Aq, it is interpreted as an offset from the present time\&. For convenience, if such an offset is followed by one of the suffixes \*(Aqy\*(Aq, \*(Aqmo\*(Aq, \*(Aqw\*(Aq, \*(Aqd\*(Aq, \*(Aqh\*(Aq, or \*(Aqmi\*(Aq, then the offset is computed in years (defined as 365 24\-hour days, ignoring leap years), months (defined as 30 24\-hour days), weeks, days, hours, or minutes, respectively\&. Without a suffix, the offset is computed in seconds\&. To explicitly prevent a date from being set, use \*(Aqnone\*(Aq or \*(Aqnever\*(Aq\&.
@@ -338,6 +342,10 @@ creates the files
Kexample\&.com\&.+003+26160\&.key
and
Kexample\&.com\&.+003+26160\&.private\&.
.PP
To generate a matching key\-signing key, issue the command:
.PP
\fBdnssec\-keygen \-a DSA \-b 768 \-n ZONE \-f KSK example\&.com\fR
.SH "SEE ALSO"
.PP
\fBdnssec-signzone\fR(8),
+61 -56
View File
@@ -58,11 +58,10 @@
<refsynopsisdiv>
<cmdsynopsis sepchar=" ">
<command>dnssec-keygen</command>
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">keysize</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-3</option></arg>
<arg choice="opt" rep="norepeat"><option>-A <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">keysize</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-C</option></arg>
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-D <replaceable class="parameter">date/offset</replaceable></option></arg>
@@ -77,6 +76,7 @@
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-k</option></arg>
<arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">ttl</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-P <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-P sync <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
@@ -88,7 +88,6 @@
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-z</option></arg>
<arg choice="req" rep="norepeat">name</arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -112,6 +111,20 @@
<variablelist>
<varlistentry>
<term>-3</term>
<listitem>
<para>
Use an NSEC3-capable algorithm to generate a DNSSEC key.
If this option is used with an algorithm that has both
NSEC and NSEC3 versions, then the NSEC3 version will be
used; for example, <command>dnssec-keygen -3a RSASHA1</command>
specifies the NSEC3RSASHA1 algorithm.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
<listitem>
@@ -168,45 +181,16 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-n <replaceable class="parameter">nametype</replaceable></term>
<listitem>
<para>
Specifies the owner type of the key. The value of
<option>nametype</option> must either be ZONE (for a DNSSEC
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
a host (KEY)),
USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
These values are case insensitive. Defaults to ZONE for DNSKEY
generation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-3</term>
<listitem>
<para>
Use an NSEC3-capable algorithm to generate a DNSSEC key.
If this option is used and no algorithm is explicitly
set on the command line, NSEC3RSASHA1 will be used by
default. Note that RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 and ED448
algorithms are NSEC3-capable.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-C</term>
<listitem>
<para>
Compatibility mode: generates an old-style key, without
any metadata. By default, <command>dnssec-keygen</command>
will include the key's creation date in the metadata stored
with the private key, and other dates may be set there as well
(publication date, activation date, etc). Keys that include
this data may be incompatible with older versions of BIND; the
Compatibility mode: generates an old-style key, without any
timing metadata. By default, <command>dnssec-keygen</command>
will include the key's creation date in the metadata stored with
the private key, and other dates may be set there as well
(publication date, activation date, etc). Keys that include this
data may be incompatible with older versions of BIND; the
<option>-C</option> option suppresses them.
</para>
</listitem>
@@ -315,14 +299,28 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-n <replaceable class="parameter">nametype</replaceable></term>
<listitem>
<para>
Specifies the owner type of the key. The value of
<option>nametype</option> must either be ZONE (for a DNSSEC
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
with a host (KEY)), USER (for a key associated with a
user(KEY)) or OTHER (DNSKEY). These values are case
insensitive. Defaults to ZONE for DNSKEY generation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-p <replaceable class="parameter">protocol</replaceable></term>
<listitem>
<para>
Sets the protocol value for the generated key. The protocol
is a number between 0 and 255. The default is 3 (DNSSEC).
Other possible values for this argument are listed in
RFC 2535 and its successors.
Sets the protocol value for the generated key, for use
with <option>-T KEY</option>. The protocol is a number between 0
and 255. The default is 3 (DNSSEC). Other possible values for
this argument are listed in RFC 2535 and its successors.
</para>
</listitem>
</varlistentry>
@@ -409,19 +407,11 @@
<term>-t <replaceable class="parameter">type</replaceable></term>
<listitem>
<para>
Indicates the use of the key. <option>type</option> must be
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
is AUTHCONF. AUTH refers to the ability to authenticate
data, and CONF the ability to encrypt data.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-v <replaceable class="parameter">level</replaceable></term>
<listitem>
<para>
Sets the debugging level.
Indicates the use of the key, for use with <option>-T
KEY</option>. <option>type</option> must be one of AUTHCONF,
NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH
refers to the ability to authenticate data, and CONF the ability
to encrypt data.
</para>
</listitem>
</varlistentry>
@@ -435,6 +425,15 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-v <replaceable class="parameter">level</replaceable></term>
<listitem>
<para>
Sets the debugging level.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
@@ -637,6 +636,12 @@
and
<filename>Kexample.com.+003+26160.private</filename>.
</para>
<para>
To generate a matching key-signing key, issue the command:
</para>
<para>
<userinput>dnssec-keygen -a DSA -b 768 -n ZONE -f KSK example.com</userinput>
</para>
</refsection>
<refsection><info><title>SEE ALSO</title></info>
+51 -47
View File
@@ -33,11 +33,10 @@
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p>
<code class="command">dnssec-keygen</code>
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
[<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>]
[<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>]
[<code class="option">-3</code>]
[<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
[<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>]
[<code class="option">-C</code>]
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
[<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>]
@@ -52,6 +51,7 @@
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
[<code class="option">-k</code>]
[<code class="option">-L <em class="replaceable"><code>ttl</code></em></code>]
[<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>]
[<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-P sync <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>]
@@ -63,7 +63,6 @@
[<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
[<code class="option">-V</code>]
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
[<code class="option">-z</code>]
{name}
</p></div>
</div>
@@ -89,6 +88,16 @@
<div class="variablelist"><dl class="variablelist">
<dt><span class="term">-3</span></dt>
<dd>
<p>
Use an NSEC3-capable algorithm to generate a DNSSEC key.
If this option is used with an algorithm that has both
NSEC and NSEC3 versions, then the NSEC3 version will be
used; for example, <span class="command"><strong>dnssec-keygen -3a RSASHA1</strong></span>
specifies the NSEC3RSASHA1 algorithm.
</p>
</dd>
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd>
<p>
@@ -139,38 +148,15 @@
must be used.
</p>
</dd>
<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
<dd>
<p>
Specifies the owner type of the key. The value of
<code class="option">nametype</code> must either be ZONE (for a DNSSEC
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
a host (KEY)),
USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
These values are case insensitive. Defaults to ZONE for DNSKEY
generation.
</p>
</dd>
<dt><span class="term">-3</span></dt>
<dd>
<p>
Use an NSEC3-capable algorithm to generate a DNSSEC key.
If this option is used and no algorithm is explicitly
set on the command line, NSEC3RSASHA1 will be used by
default. Note that RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 and ED448
algorithms are NSEC3-capable.
</p>
</dd>
<dt><span class="term">-C</span></dt>
<dd>
<p>
Compatibility mode: generates an old-style key, without
any metadata. By default, <span class="command"><strong>dnssec-keygen</strong></span>
will include the key's creation date in the metadata stored
with the private key, and other dates may be set there as well
(publication date, activation date, etc). Keys that include
this data may be incompatible with older versions of BIND; the
Compatibility mode: generates an old-style key, without any
timing metadata. By default, <span class="command"><strong>dnssec-keygen</strong></span>
will include the key's creation date in the metadata stored with
the private key, and other dates may be set there as well
(publication date, activation date, etc). Keys that include this
data may be incompatible with older versions of BIND; the
<code class="option">-C</code> option suppresses them.
</p>
</dd>
@@ -250,13 +236,24 @@
or <code class="literal">none</code> is the same as leaving it unset.
</p>
</dd>
<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
<dd>
<p>
Specifies the owner type of the key. The value of
<code class="option">nametype</code> must either be ZONE (for a DNSSEC
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
with a host (KEY)), USER (for a key associated with a
user(KEY)) or OTHER (DNSKEY). These values are case
insensitive. Defaults to ZONE for DNSKEY generation.
</p>
</dd>
<dt><span class="term">-p <em class="replaceable"><code>protocol</code></em></span></dt>
<dd>
<p>
Sets the protocol value for the generated key. The protocol
is a number between 0 and 255. The default is 3 (DNSSEC).
Other possible values for this argument are listed in
RFC 2535 and its successors.
Sets the protocol value for the generated key, for use
with <code class="option">-T KEY</code>. The protocol is a number between 0
and 255. The default is 3 (DNSSEC). Other possible values for
this argument are listed in RFC 2535 and its successors.
</p>
</dd>
<dt><span class="term">-q</span></dt>
@@ -327,16 +324,11 @@
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
<dd>
<p>
Indicates the use of the key. <code class="option">type</code> must be
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
is AUTHCONF. AUTH refers to the ability to authenticate
data, and CONF the ability to encrypt data.
</p>
</dd>
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
<dd>
<p>
Sets the debugging level.
Indicates the use of the key, for use with <code class="option">-T
KEY</code>. <code class="option">type</code> must be one of AUTHCONF,
NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH
refers to the ability to authenticate data, and CONF the ability
to encrypt data.
</p>
</dd>
<dt><span class="term">-V</span></dt>
@@ -345,6 +337,12 @@
Prints version information.
</p>
</dd>
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
<dd>
<p>
Sets the debugging level.
</p>
</dd>
</dl></div>
</div>
@@ -526,6 +524,12 @@
and
<code class="filename">Kexample.com.+003+26160.private</code>.
</p>
<p>
To generate a matching key-signing key, issue the command:
</p>
<p>
<strong class="userinput"><code>dnssec-keygen -a DSA -b 768 -n ZONE -f KSK example.com</code></strong>
</p>
</div>
<div class="refsection">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -20,18 +20,21 @@
<ProjectGuid>{2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>dnssectool</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{6E6297F4-69D7-4533-85E1-BD17C30017C8}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>dsfromkey</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{AB6690A0-055E-458f-BAC5-BF38BCC5834F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>importkey</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{17455DC6-5FBB-47C3-8F44-7DB574A188D3}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>keyfromlabel</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{0BF11E21-168C-4CAA-B784-429D126BBAE5}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>keygen</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{D171F185-D3C2-4463-9CF3-ED1D0B1D6832}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>revoke</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{03FB7588-C5A7-4572-968F-14F1206BC69C}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>settime</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{205ED8A9-2E4C-41CC-9385-F3613402AA90}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>signzone</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{FD653434-F1A8-44A9-85B2-A7468491DA6D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>verify</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+14 -6
View File
@@ -45,13 +45,14 @@ DLZDRIVER_LIBS = @DLZ_DRIVER_LIBS@
CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
${LWRES_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} \
${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \
${DLZDRIVER_INCLUDES} ${DBDRIVER_INCLUDES} @DST_OPENSSL_INC@
${DLZDRIVER_INCLUDES} ${DBDRIVER_INCLUDES} ${MAXMINDDB_CFLAGS} \
@DST_OPENSSL_INC@
CDEFINES = @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@ @CRYPTO@
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@
@@ -82,10 +83,13 @@ SUBDIRS = unix
TARGETS = named@EXEEXT@ lwresd@EXEEXT@
GEOIPLINKOBJS = geoip.@O@
GEOIP2LINKOBJS = geoip.@O@
OBJS = builtin.@O@ client.@O@ config.@O@ control.@O@ \
controlconf.@O@ fuzz.@O@ @GEOIPLINKOBJS@ interfacemgr.@O@ \
listenlist.@O@ log.@O@ logconf.@O@ main.@O@ notify.@O@ \
controlconf.@O@ fuzz.@O@ \
@GEOIPLINKOBJS@ @GEOIP2LINKOBJS@ \
interfacemgr.@O@ listenlist.@O@ log.@O@ logconf.@O@ \
main.@O@ notify.@O@ \
query.@O@ server.@O@ sortlist.@O@ statschannel.@O@ \
tkeyconf.@O@ tsigconf.@O@ update.@O@ xfrout.@O@ \
zoneconf.@O@ \
@@ -98,10 +102,13 @@ UOBJS = unix/os.@O@ unix/dlz_dlopen_driver.@O@
SYMOBJS = symtbl.@O@
GEOIPLINKSRCS = geoip.c
GEOIP2LINKSRCS = geoip.c
SRCS = builtin.c client.c config.c control.c \
controlconf.c fuzz.c @GEOIPLINKSRCS@ interfacemgr.c \
listenlist.c log.c logconf.c main.c notify.c \
controlconf.c fuzz.c \
@GEOIPLINKSRCS@ @GEOIP2LINKSRCS@ \
interfacemgr.c \ listenlist.c log.c logconf.c \
main.c notify.c \
query.c server.c sortlist.c statschannel.c \
tkeyconf.c tsigconf.c update.c xfrout.c \
zoneconf.c \
@@ -135,6 +142,7 @@ config.@O@: config.c
-DDYNDB_LIBDIR=\"@libdir@/bind\" \
-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
-DNS_SYSCONFDIR=\"${sysconfdir}\" \
-DMAXMINDDB_PREFIX=\"@MAXMINDDB_PREFIX@\" \
-c ${srcdir}/config.c
server.@O@: server.c
+69 -40
View File
@@ -15,6 +15,15 @@
<xsl:template match="statistics[@version=&quot;3.8&quot;]">
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript">
$(function($) {
var wid=0;
$('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; });
$('table.zones').css('min-width', wid );
});
</script>
<xsl:if test="system-property('xsl:vendor')!='Transformiix'">
<!-- Non Mozilla specific markup -->
<script type="text/javascript" src="https://www.google.com/jsapi"/>
@@ -221,6 +230,22 @@
background-color: rgb(1,169,206);
color: #ffffff;
}
table.zones {
border: 1px solid grey;
}
table.zones td {
text-align: right;
font-family: monospace;
}
table.zones td:nth-child(2) {
text-align: center;
}
table.zones td:nth-child(3) {
text-align: left;
}
table.zones tr:hover{
background-color: #99ddff;
}
td, th {
padding-right: 5px;
@@ -293,25 +318,25 @@
<hr/>
<h2>Server Status</h2>
<table class="info">
<tr>
<tr class="odd">
<th>Boot time:</th>
<td>
<xsl:value-of select="server/boot-time"/>
</td>
</tr>
<tr>
<tr class="even">
<th>Last reconfigured:</th>
<td>
<xsl:value-of select="server/config-time"/>
</td>
</tr>
<tr>
<tr class="odd">
<th>Current time:</th>
<td>
<xsl:value-of select="server/current-time"/>
</td>
</tr>
<tr>
<tr class="even">
<th>Server version:</th>
<td>
<xsl:value-of select="server/version"/>
@@ -330,7 +355,13 @@
<table class="counters">
<xsl:for-each select="server/counters[@type=&quot;opcode&quot;]/counter[. &gt; 0 or substring(@name,1,3) != 'RES']">
<xsl:sort select="." data-type="number" order="descending"/>
<tr>
<xsl:variable name="css-class0">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
<xsl:otherwise>odd</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$css-class0}">
<th>
<xsl:value-of select="@name"/>
</th>
@@ -611,13 +642,13 @@
<br/>
</xsl:if>
</xsl:for-each>
<xsl:if test="traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0] or traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0] or traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<h2>Traffic Size Statistics</h2>
</xsl:if>
<xsl:if test="traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<h4>UDP Requests Received</h4>
<table class="counters">
<xsl:for-each select="traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:for-each select="traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:variable name="css-class7">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
@@ -625,6 +656,7 @@
</xsl:choose>
</xsl:variable>
<tr class="{$css-class7}">
<th><xsl:value-of select="local-name(../../..)"/></th>
<th>
<xsl:value-of select="@name"/>
</th>
@@ -636,10 +668,10 @@
</table>
<br/>
</xsl:if>
<xsl:if test="traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<h4>UDP Responses Sent</h4>
<table class="counters">
<xsl:for-each select="traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:for-each select="traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:variable name="css-class7">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
@@ -647,6 +679,7 @@
</xsl:choose>
</xsl:variable>
<tr class="{$css-class7}">
<th><xsl:value-of select="local-name(../../..)"/></th>
<th>
<xsl:value-of select="@name"/>
</th>
@@ -658,10 +691,10 @@
</table>
<br/>
</xsl:if>
<xsl:if test="traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<h4>TCP Requests Received</h4>
<table class="counters">
<xsl:for-each select="traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:for-each select="traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:variable name="css-class7">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
@@ -669,6 +702,7 @@
</xsl:choose>
</xsl:variable>
<tr class="{$css-class7}">
<th><xsl:value-of select="local-name(../../..)"/></th>
<th>
<xsl:value-of select="@name"/>
</th>
@@ -680,10 +714,10 @@
</table>
<br/>
</xsl:if>
<xsl:if test="traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<h4>TCP Responses Sent</h4>
<table class="counters">
<xsl:for-each select="traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:for-each select="traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:variable name="css-class7">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
@@ -691,6 +725,7 @@
</xsl:choose>
</xsl:variable>
<tr class="{$css-class7}">
<th><xsl:value-of select="local-name(../../..)"/></th>
<th>
<xsl:value-of select="@name"/>
</th>
@@ -724,35 +759,29 @@
</table>
<br/>
</xsl:if>
<xsl:for-each select="views/view">
<xsl:if test="zones/zone">
<xsl:if test="views/view/zones/zone">
<xsl:for-each select="views/view">
<h3>Zones for View <xsl:value-of select="@name"/></h3>
<table class="zones">
<tr>
<th>Name</th>
<th>Class</th>
<th>Type</th>
<th>Serial</th>
</tr>
<xsl:for-each select="zones/zone">
<tr>
<td>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:value-of select="@rdataclass"/>
</td>
<td>
<xsl:value-of select="type"/>
</td>
<td>
<xsl:value-of select="serial"/>
</td>
</tr>
</xsl:for-each>
<thead><tr><th>Name</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead>
<tbody>
<xsl:for-each select="zones/zone">
<xsl:variable name="css-class15">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
<xsl:otherwise>odd</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$css-class15}">
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@rdataclass"/></td>
<td><xsl:value-of select="type"/></td>
<td><xsl:value-of select="serial"/></td></tr>
</xsl:for-each>
</tbody>
</table>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</xsl:if>
<xsl:if test="views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]">
<h2>Received QTYPES per view/zone</h2>
<xsl:for-each select="views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]">
+65 -36
View File
@@ -20,6 +20,15 @@ static char xslmsg[] =
" <xsl:template match=\"statistics[@version=&quot;3.8&quot;]\">\n"
" <html>\n"
" <head>\n"
" <script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js\"></script>\n"
" <script type=\"text/javascript\">\n"
" $(function($) {\n"
" var wid=0;\n"
" $('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; });\n"
" $('table.zones').css('min-width', wid );\n"
" });\n"
" </script>\n"
"\n"
" <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
" <!-- Non Mozilla specific markup -->\n"
" <script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"/>\n"
@@ -226,6 +235,22 @@ static char xslmsg[] =
" background-color: rgb(1,169,206);\n"
" color: #ffffff;\n"
" }\n"
" table.zones {\n"
" border: 1px solid grey;\n"
" }\n"
" table.zones td {\n"
" text-align: right;\n"
" font-family: monospace;\n"
" }\n"
" table.zones td:nth-child(2) {\n"
" text-align: center;\n"
" }\n"
" table.zones td:nth-child(3) {\n"
" text-align: left;\n"
" }\n"
" table.zones tr:hover{\n"
" background-color: #99ddff;\n"
" }\n"
"\n"
" td, th {\n"
" padding-right: 5px;\n"
@@ -298,25 +323,25 @@ static char xslmsg[] =
" <hr/>\n"
" <h2>Server Status</h2>\n"
" <table class=\"info\">\n"
" <tr>\n"
" <tr class=\"odd\">\n"
" <th>Boot time:</th>\n"
" <td>\n"
" <xsl:value-of select=\"server/boot-time\"/>\n"
" </td>\n"
" </tr>\n"
" <tr>\n"
" <tr class=\"even\">\n"
" <th>Last reconfigured:</th>\n"
" <td>\n"
" <xsl:value-of select=\"server/config-time\"/>\n"
" </td>\n"
" </tr>\n"
" <tr>\n"
" <tr class=\"odd\">\n"
" <th>Current time:</th>\n"
" <td>\n"
" <xsl:value-of select=\"server/current-time\"/>\n"
" </td>\n"
" </tr>\n"
" <tr>\n"
" <tr class=\"even\">\n"
" <th>Server version:</th>\n"
" <td>\n"
" <xsl:value-of select=\"server/version\"/>\n"
@@ -335,7 +360,13 @@ static char xslmsg[] =
" <table class=\"counters\">\n"
" <xsl:for-each select=\"server/counters[@type=&quot;opcode&quot;]/counter[. &gt; 0 or substring(@name,1,3) != 'RES']\">\n"
" <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
" <tr>\n"
" <xsl:variable name=\"css-class0\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
" <xsl:otherwise>odd</xsl:otherwise>\n"
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class0}\">\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -616,13 +647,13 @@ static char xslmsg[] =
" <br/>\n"
" </xsl:if>\n"
" </xsl:for-each>\n"
" <xsl:if test=\"traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0] or traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0] or traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <h2>Traffic Size Statistics</h2>\n"
" </xsl:if>\n"
" <xsl:if test=\"traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <h4>UDP Requests Received</h4>\n"
" <table class=\"counters\">\n"
" <xsl:for-each select=\"traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:for-each select=\"traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
@@ -630,6 +661,7 @@ static char xslmsg[] =
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -641,10 +673,10 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:if test=\"traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <h4>UDP Responses Sent</h4>\n"
" <table class=\"counters\">\n"
" <xsl:for-each select=\"traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:for-each select=\"traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
@@ -652,6 +684,7 @@ static char xslmsg[] =
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -663,10 +696,10 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:if test=\"traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <h4>TCP Requests Received</h4>\n"
" <table class=\"counters\">\n"
" <xsl:for-each select=\"traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:for-each select=\"traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
@@ -674,6 +707,7 @@ static char xslmsg[] =
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -685,10 +719,10 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:if test=\"traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <h4>TCP Responses Sent</h4>\n"
" <table class=\"counters\">\n"
" <xsl:for-each select=\"traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:for-each select=\"traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
@@ -696,6 +730,7 @@ static char xslmsg[] =
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -729,35 +764,29 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:if test=\"views/view/zones/zone\">\n"
" <xsl:for-each select=\"views/view\">\n"
" <xsl:if test=\"zones/zone\">\n"
" <h3>Zones for View <xsl:value-of select=\"@name\"/></h3>\n"
" <table class=\"zones\">\n"
" <tr>\n"
" <th>Name</th>\n"
" <th>Class</th>\n"
" <th>Type</th>\n"
" <th>Serial</th>\n"
" </tr>\n"
" <thead><tr><th>Name</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead>\n"
" <tbody>\n"
" <xsl:for-each select=\"zones/zone\">\n"
" <tr>\n"
" <td>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </td>\n"
" <td>\n"
" <xsl:value-of select=\"@rdataclass\"/>\n"
" </td>\n"
" <td>\n"
" <xsl:value-of select=\"type\"/>\n"
" </td>\n"
" <td>\n"
" <xsl:value-of select=\"serial\"/>\n"
" </td>\n"
" </tr>\n"
" <xsl:variable name=\"css-class15\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
" <xsl:otherwise>odd</xsl:otherwise>\n"
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class15}\">\n"
" <td><xsl:value-of select=\"@name\"/></td>\n"
" <td><xsl:value-of select=\"@rdataclass\"/></td>\n"
" <td><xsl:value-of select=\"type\"/></td>\n"
" <td><xsl:value-of select=\"serial\"/></td></tr>\n"
" </xsl:for-each>\n"
" </tbody>\n"
" </table>\n"
" </xsl:if>\n"
" </xsl:for-each>\n"
" </xsl:if>\n"
" <xsl:if test=\"views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]\">\n"
" <h2>Received QTYPES per view/zone</h2>\n"
" <xsl:for-each select=\"views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]\">\n"
+423 -113
View File
@@ -25,6 +25,7 @@
#include <isc/random.h>
#include <isc/safe.h>
#include <isc/serial.h>
#include <isc/siphash.h>
#include <isc/stats.h>
#include <isc/stdio.h>
#include <isc/string.h>
@@ -246,10 +247,11 @@ static void ns_client_dumpmessage(ns_client_t *client, const char *reason);
static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
dns_dispatch_t *disp, bool tcp);
static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp,
isc_socket_t *sock);
isc_socket_t *sock, ns_client_t *oldclient);
static inline bool
allowed(isc_netaddr_t *addr, dns_name_t *signer, isc_netaddr_t *ecs_addr,
uint8_t ecs_addrlen, uint8_t *ecs_scope, dns_acl_t *acl);
allowed(isc_netaddr_t *addr, dns_name_t *signer,
isc_netaddr_t *ecs_addr, uint8_t ecs_addrlen,
uint8_t *ecs_scope, dns_acl_t *acl);
static void compute_cookie(ns_client_t *client, uint32_t when,
uint32_t nonce, const unsigned char *secret,
isc_buffer_t *buf);
@@ -298,6 +300,121 @@ ns_client_settimeout(ns_client_t *client, unsigned int seconds) {
}
}
/*%
* Allocate a reference-counted object that will maintain a single pointer to
* the (also reference-counted) TCP client quota, shared between all the
* clients processing queries on a single TCP connection, so that all
* clients sharing the one socket will together consume only one slot in
* the 'tcp-clients' quota.
*/
static isc_result_t
tcpconn_init(ns_client_t *client, bool force) {
isc_result_t result;
isc_quota_t *quota = NULL;
ns_tcpconn_t *tconn = NULL;
REQUIRE(client->tcpconn == NULL);
/*
* Try to attach to the quota first, so we won't pointlessly
* allocate memory for a tcpconn object if we can't get one.
*/
if (force) {
result = isc_quota_force(&ns_g_server->tcpquota, &quota);
} else {
result = isc_quota_attach(&ns_g_server->tcpquota, &quota);
}
if (result != ISC_R_SUCCESS) {
return (result);
}
/*
* A global memory context is used for the allocation as different
* client structures may have different memory contexts assigned and a
* reference counter allocated here might need to be freed by a
* different client. The performance impact caused by memory context
* contention here is expected to be negligible, given that this code
* is only executed for TCP connections.
*/
tconn = isc_mem_allocate(ns_g_mctx, sizeof(*tconn));
if (tconn == NULL) {
isc_quota_detach(&quota);
return (ISC_R_NOMEMORY);
}
isc_refcount_init(&tconn->refs, 1);
tconn->tcpquota = quota;
quota = NULL;
tconn->pipelined = false;
client->tcpconn = tconn;
return (ISC_R_SUCCESS);
}
/*%
* Increase the count of client structures sharing the TCP connection
* that 'source' is associated with; add a pointer to the same tcpconn
* to 'target', thus associating it with the same TCP connection.
*/
static void
tcpconn_attach(ns_client_t *source, ns_client_t *target) {
int refs;
REQUIRE(source->tcpconn != NULL);
REQUIRE(target->tcpconn == NULL);
REQUIRE(source->tcpconn->pipelined);
isc_refcount_increment(&source->tcpconn->refs, &refs);
INSIST(refs > 1);
target->tcpconn = source->tcpconn;
}
/*%
* Decrease the count of client structures sharing the TCP connection that
* 'client' is associated with. If this is the last client using this TCP
* connection, we detach from the TCP quota and free the tcpconn
* object. Either way, client->tcpconn is set to NULL.
*/
static void
tcpconn_detach(ns_client_t *client) {
ns_tcpconn_t *tconn = NULL;
int refs;
REQUIRE(client->tcpconn != NULL);
tconn = client->tcpconn;
client->tcpconn = NULL;
isc_refcount_decrement(&tconn->refs, &refs);
if (refs == 0) {
isc_quota_detach(&tconn->tcpquota);
isc_mem_free(ns_g_mctx, tconn);
}
}
/*%
* Mark a client as active and increment the interface's 'ntcpactive'
* counter, as a signal that there is at least one client servicing
* TCP queries for the interface. If we reach the TCP client quota at
* some point, this will be used to determine whether a quota overrun
* should be permitted.
*
* Marking the client active with the 'tcpactive' flag ensures proper
* accounting, by preventing us from incrementing or decrementing
* 'ntcpactive' more than once per client.
*/
static void
mark_tcp_active(ns_client_t *client, bool active) {
if (active && !client->tcpactive) {
isc_refcount_increment0(&client->interface->ntcpactive, NULL);
client->tcpactive = active;
} else if (!active && client->tcpactive) {
isc_refcount_decrement(&client->interface->ntcpactive, NULL);
client->tcpactive = active;
}
}
/*%
* Check for a deactivation or shutdown request and take appropriate
* action. Returns true if either is in progress; in this case
@@ -387,7 +504,8 @@ exit_check(ns_client_t *client) {
INSIST(client->recursionquota == NULL);
if (NS_CLIENTSTATE_READING == client->newstate) {
if (!client->pipelined) {
INSIST(client->tcpconn != NULL);
if (!client->tcpconn->pipelined) {
client_read(client);
client->newstate = NS_CLIENTSTATE_MAX;
return (true); /* We're done. */
@@ -405,25 +523,62 @@ exit_check(ns_client_t *client) {
*/
INSIST(client->recursionquota == NULL);
INSIST(client->newstate <= NS_CLIENTSTATE_READY);
if (client->nreads > 0)
if (client->nreads > 0) {
dns_tcpmsg_cancelread(&client->tcpmsg);
if (client->nreads != 0) {
/* Still waiting for read cancel completion. */
return (true);
/* Still waiting for read cancel completion? */
if (client->nreads > 0) {
return (true);
}
}
if (client->tcpmsg_valid) {
dns_tcpmsg_invalidate(&client->tcpmsg);
client->tcpmsg_valid = false;
}
/*
* Soon the client will be ready to accept a new TCP
* connection or UDP request, but we may have enough
* clients doing that already. Check whether this client
* needs to remain active and allow it go inactive if
* not.
*
* UDP clients always go inactive at this point, but a TCP
* client may need to stay active and return to READY
* state if no other clients are available to listen
* for TCP requests on this interface.
*
* Regardless, if we're going to FREED state, that means
* the system is shutting down and we don't need to
* retain clients.
*/
if (client->mortal && TCP_CLIENT(client) &&
client->newstate != NS_CLIENTSTATE_FREED &&
!ns_g_clienttest &&
isc_refcount_current(&client->interface->ntcpaccepting) == 0)
{
/* Nobody else is accepting */
client->mortal = false;
client->newstate = NS_CLIENTSTATE_READY;
}
/*
* Detach from TCP connection and TCP client quota,
* if appropriate. If this is the last reference to
* the TCP connection in our pipeline group, the
* TCP quota slot will be released.
*/
if (client->tcpconn) {
tcpconn_detach(client);
}
if (client->tcpsocket != NULL) {
CTRACE("closetcp");
isc_socket_detach(&client->tcpsocket);
mark_tcp_active(client, false);
}
if (client->tcpquota != NULL)
isc_quota_detach(&client->tcpquota);
if (client->timerset) {
(void)isc_timer_reset(client->timer,
isc_timertype_inactive,
@@ -431,45 +586,26 @@ exit_check(ns_client_t *client) {
client->timerset = false;
}
client->pipelined = false;
client->peeraddr_valid = false;
client->state = NS_CLIENTSTATE_READY;
INSIST(client->recursionquota == NULL);
/*
* Now the client is ready to accept a new TCP connection
* or UDP request, but we may have enough clients doing
* that already. Check whether this client needs to remain
* active and force it to go inactive if not.
*
* UDP clients go inactive at this point, but TCP clients
* may remain active if we have fewer active TCP client
* objects than desired due to an earlier quota exhaustion.
*/
if (client->mortal && TCP_CLIENT(client) && !ns_g_clienttest) {
LOCK(&client->interface->lock);
if (client->interface->ntcpcurrent <
client->interface->ntcptarget)
client->mortal = false;
UNLOCK(&client->interface->lock);
}
/*
* We don't need the client; send it to the inactive
* queue for recycling.
*/
if (client->mortal) {
if (client->newstate > NS_CLIENTSTATE_INACTIVE)
if (client->newstate > NS_CLIENTSTATE_INACTIVE) {
client->newstate = NS_CLIENTSTATE_INACTIVE;
}
}
if (NS_CLIENTSTATE_READY == client->newstate) {
if (TCP_CLIENT(client)) {
client_accept(client);
} else
} else {
client_udprecv(client);
}
client->newstate = NS_CLIENTSTATE_MAX;
return (true);
}
@@ -481,41 +617,48 @@ exit_check(ns_client_t *client) {
/*
* We are trying to enter the inactive state.
*/
if (client->naccepts > 0)
if (client->naccepts > 0) {
isc_socket_cancel(client->tcplistener, client->task,
ISC_SOCKCANCEL_ACCEPT);
/* Still waiting for accept cancel completion. */
if (! (client->naccepts == 0))
return (true);
/* Still waiting for accept cancel completion? */
if (client->naccepts > 0) {
return (true);
}
}
/* Accept cancel is complete. */
if (client->nrecvs > 0)
if (client->nrecvs > 0) {
isc_socket_cancel(client->udpsocket, client->task,
ISC_SOCKCANCEL_RECV);
/* Still waiting for recv cancel completion. */
if (! (client->nrecvs == 0))
return (true);
/* Still waiting for recv cancel completion? */
if (client->nrecvs > 0) {
return (true);
}
}
/* Still waiting for control event to be delivered */
if (client->nctls > 0)
if (client->nctls > 0) {
return (true);
/* Deactivate the client. */
if (client->interface)
ns_interface_detach(&client->interface);
}
INSIST(client->naccepts == 0);
INSIST(client->recursionquota == NULL);
if (client->tcplistener != NULL)
if (client->tcplistener != NULL) {
isc_socket_detach(&client->tcplistener);
if (client->udpsocket != NULL)
mark_tcp_active(client, false);
}
if (client->udpsocket != NULL) {
isc_socket_detach(&client->udpsocket);
}
if (client->dispatch != NULL)
/* Deactivate the client. */
if (client->interface != NULL) {
ns_interface_detach(&client->interface);
}
if (client->dispatch != NULL) {
dns_dispatch_detach(&client->dispatch);
}
client->attributes = 0;
client->mortal = false;
@@ -540,10 +683,13 @@ exit_check(ns_client_t *client) {
client->newstate = NS_CLIENTSTATE_MAX;
if (!ns_g_clienttest && manager != NULL &&
!manager->exiting)
{
ISC_QUEUE_PUSH(manager->inactive, client,
ilink);
if (client->needshutdown)
}
if (client->needshutdown) {
isc_task_shutdown(client->task);
}
return (true);
}
}
@@ -654,7 +800,7 @@ client_start(isc_task_t *task, isc_event_t *event) {
return;
if (TCP_CLIENT(client)) {
if (client->pipelined) {
if (client->tcpconn != NULL) {
client_read(client);
} else {
client_accept(client);
@@ -664,7 +810,6 @@ client_start(isc_task_t *task, isc_event_t *event) {
}
}
/*%
* The client's task has received a shutdown event.
*/
@@ -900,7 +1045,6 @@ client_sendpkg(ns_client_t *client, isc_buffer_t *buffer) {
isc_netaddr_t netaddr;
int match;
unsigned int sockflags = ISC_SOCKFLAG_IMMEDIATE;
isc_dscp_t dispdscp = -1;
if (TCP_CLIENT(client)) {
sock = client->tcpsocket;
@@ -927,9 +1071,10 @@ client_sendpkg(ns_client_t *client, isc_buffer_t *buffer) {
pktinfo = NULL;
if (client->dispatch != NULL) {
dispdscp = dns_dispatch_getdscp(client->dispatch);
if (dispdscp != -1)
client->dscp = dispdscp;
isc_dscp_t dscp = dns_dispatch_getdscp(client->dispatch);
if (dscp != -1) {
client->dscp = dscp;
}
}
if (client->dscp == -1) {
@@ -1785,6 +1930,42 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce,
const unsigned char *secret, isc_buffer_t *buf)
{
switch (ns_g_server->cookiealg) {
case ns_cookiealg_siphash24: {
unsigned char digest[ISC_SIPHASH24_TAG_LENGTH] = { 0 };
unsigned char input[16 + 16] = { 0 };
size_t inputlen = 0;
isc_netaddr_t netaddr;
unsigned char *cp;
cp = isc_buffer_used(buf);
isc_buffer_putmem(buf, client->cookie, 8);
isc_buffer_putuint8(buf, NS_COOKIE_VERSION_1);
isc_buffer_putuint24(buf, 0); /* Reserved */
isc_buffer_putuint32(buf, when);
memmove(input, cp, 16);
isc_netaddr_fromsockaddr(&netaddr, &client->peeraddr);
switch (netaddr.family) {
case AF_INET:
cp = (unsigned char *)&netaddr.type.in;
memmove(input + 16, cp, 4);
inputlen = 20;
break;
case AF_INET6:
cp = (unsigned char *)&netaddr.type.in6;
memmove(input + 16, cp, 16);
inputlen = 32;
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
isc_siphash24(secret, input, inputlen, digest);
isc_buffer_putmem(buf, digest, 8);
break;
}
#if defined(HAVE_OPENSSL_AES) || defined(HAVE_OPENSSL_EVP_AES)
case ns_cookiealg_aes: {
unsigned char digest[ISC_AES_BLOCK_LENGTH];
@@ -1793,15 +1974,15 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce,
unsigned char *cp;
unsigned int i;
memset(input, 0, sizeof(input));
cp = isc_buffer_used(buf);
isc_buffer_putmem(buf, client->cookie, 8);
isc_buffer_putuint32(buf, nonce);
isc_buffer_putuint32(buf, when);
memmove(input, cp, 16);
isc_aes128_crypt(secret, input, digest);
for (i = 0; i < 8; i++)
for (i = 0; i < 8; i++) {
input[i] = digest[i] ^ digest[i + 8];
}
isc_netaddr_fromsockaddr(&netaddr, &client->peeraddr);
switch (netaddr.family) {
case AF_INET:
@@ -1814,14 +1995,19 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce,
cp = (unsigned char *)&netaddr.type.in6;
memmove(input + 8, cp, 16);
isc_aes128_crypt(secret, input, digest);
for (i = 0; i < 8; i++)
for (i = 0; i < 8; i++) {
input[i + 8] = digest[i] ^ digest[i + 8];
}
isc_aes128_crypt(ns_g_server->secret, input + 8,
digest);
break;
default:
INSIST(0);
ISC_UNREACHABLE();
}
for (i = 0; i < 8; i++)
for (i = 0; i < 8; i++) {
digest[i] ^= digest[i + 8];
}
isc_buffer_putmem(buf, digest, 8);
break;
}
@@ -2309,6 +2495,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
client->nrecvs--;
} else {
INSIST(TCP_CLIENT(client));
INSIST(client->tcpconn != NULL);
REQUIRE(event->ev_type == DNS_EVENT_TCPMSG);
REQUIRE(event->ev_sender == &client->tcpmsg);
buffer = &client->tcpmsg.buffer;
@@ -2496,18 +2683,27 @@ client_request(isc_task_t *task, isc_event_t *event) {
/*
* Pipeline TCP query processing.
*/
if (client->message->opcode != dns_opcode_query)
client->pipelined = false;
if (TCP_CLIENT(client) && client->pipelined) {
result = isc_quota_reserve(&ns_g_server->tcpquota);
if (result == ISC_R_SUCCESS)
result = ns_client_replace(client);
if (TCP_CLIENT(client) &&
client->message->opcode != dns_opcode_query)
{
client->tcpconn->pipelined = false;
}
if (TCP_CLIENT(client) && client->tcpconn->pipelined) {
/*
* We're pipelining. Replace the client; the
* replacement can read the TCP socket looking
* for new messages and this one can process the
* current message asynchronously.
*
* There will now be at least three clients using this
* TCP socket - one accepting new connections,
* one reading an existing connection to get new
* messages, and one answering the message already
* received.
*/
result = ns_client_replace(client);
if (result != ISC_R_SUCCESS) {
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_CLIENT, ISC_LOG_WARNING,
"no more TCP clients(read): %s",
isc_result_totext(result));
client->pipelined = false;
client->tcpconn->pipelined = false;
}
}
@@ -2543,6 +2739,31 @@ client_request(isc_task_t *task, isc_event_t *event) {
client->ecs_scope = 0;
if (opt != NULL) {
/*
* Are returning FORMERR to all EDNS queries?
* Simulate a STD13 compliant server.
*/
if (ns_g_ednsformerr) {
ns_client_error(client, DNS_R_FORMERR);
return;
}
/*
* Are returning NOTIMP to all EDNS queries?
*/
if (ns_g_ednsnotimp) {
ns_client_error(client, DNS_R_NOTIMP);
return;
}
/*
* Are returning REFUSED to all EDNS queries?
*/
if (ns_g_ednsrefused) {
ns_client_error(client, DNS_R_REFUSED);
return;
}
/*
* Are we dropping all EDNS queries?
*/
@@ -2550,6 +2771,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
ns_client_next(client, ISC_R_SUCCESS);
goto cleanup;
}
result = process_opt(client, opt);
if (result != ISC_R_SUCCESS)
goto cleanup;
@@ -2825,8 +3047,9 @@ client_request(isc_task_t *task, isc_event_t *event) {
true) == ISC_R_SUCCESS)
ra = true;
if (ra == true)
if (ra == true) {
client->attributes |= NS_CLIENTATTR_RA;
}
ns_client_log(client, DNS_LOGCATEGORY_SECURITY, NS_LOGMODULE_CLIENT,
ISC_LOG_DEBUG(3), ra ? "recursion available" :
@@ -2852,10 +3075,11 @@ client_request(isc_task_t *task, isc_event_t *event) {
case dns_opcode_query:
CTRACE("query");
#ifdef HAVE_DNSTAP
if ((client->message->flags & DNS_MESSAGEFLAG_RD) != 0)
if (ra && (client->message->flags & DNS_MESSAGEFLAG_RD) != 0) {
dtmsgtype = DNS_DTTYPE_CQ;
else
} else {
dtmsgtype = DNS_DTTYPE_AQ;
}
dns_dt_send(view, dtmsgtype, &client->peeraddr,
&client->destsockaddr, TCP_CLIENT(client), NULL,
@@ -3063,8 +3287,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
client->signer = NULL;
dns_name_init(&client->signername, NULL);
client->mortal = false;
client->pipelined = false;
client->tcpquota = NULL;
client->tcpconn = NULL;
client->recursionquota = NULL;
client->interface = NULL;
client->peeraddr_valid = false;
@@ -3074,6 +3297,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
client->filter_aaaa = dns_aaaa_ok;
#endif
client->needshutdown = ns_g_clienttest;
client->tcpactive = false;
ISC_EVENT_INIT(&client->ctlevent, sizeof(client->ctlevent), 0, NULL,
NS_EVENT_CLIENTCONTROL, client_start, client, client,
@@ -3168,9 +3392,9 @@ client_read(ns_client_t *client) {
static void
client_newconn(isc_task_t *task, isc_event_t *event) {
isc_result_t result;
ns_client_t *client = event->ev_arg;
isc_socket_newconnev_t *nevent = (isc_socket_newconnev_t *)event;
isc_result_t result;
REQUIRE(event->ev_type == ISC_SOCKEVENT_NEWCONN);
REQUIRE(NS_CLIENT_VALID(client));
@@ -3180,13 +3404,17 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
INSIST(client->state == NS_CLIENTSTATE_READY);
/*
* The accept() was successful and we're now establishing a new
* connection. We need to make note of it in the client and
* interface objects so client objects can do the right thing
* when going inactive in exit_check() (see comments in
* client_accept() for details).
*/
INSIST(client->naccepts == 1);
client->naccepts--;
LOCK(&client->interface->lock);
INSIST(client->interface->ntcpcurrent > 0);
client->interface->ntcpcurrent--;
UNLOCK(&client->interface->lock);
isc_refcount_decrement(&client->interface->ntcpaccepting, NULL);
/*
* We must take ownership of the new socket before the exit
@@ -3219,6 +3447,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
"accept failed: %s",
isc_result_totext(nevent->result));
tcpconn_detach(client);
}
if (exit_check(client))
@@ -3256,20 +3485,13 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
* telnetting to port 53 (once per CPU) will
* deny service to legitimate TCP clients.
*/
client->pipelined = false;
result = isc_quota_attach(&ns_g_server->tcpquota,
&client->tcpquota);
if (result == ISC_R_SUCCESS)
result = ns_client_replace(client);
if (result != ISC_R_SUCCESS) {
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_CLIENT, ISC_LOG_WARNING,
"no more TCP clients(accept): %s",
isc_result_totext(result));
} else if (ns_g_server->keepresporder == NULL ||
!allowed(&netaddr, NULL, NULL, 0, NULL,
ns_g_server->keepresporder)) {
client->pipelined = true;
result = ns_client_replace(client);
if (result == ISC_R_SUCCESS &&
(ns_g_server->keepresporder == NULL ||
!allowed(&netaddr, NULL, NULL, 0, NULL,
ns_g_server->keepresporder)))
{
client->tcpconn->pipelined = true;
}
client_read(client);
@@ -3285,12 +3507,66 @@ client_accept(ns_client_t *client) {
CTRACE("accept");
/*
* Set up a new TCP connection. This means try to attach to the
* TCP client quota (tcp-clients), but fail if we're over quota.
*/
result = tcpconn_init(client, false);
if (result != ISC_R_SUCCESS) {
bool exit;
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_CLIENT, ISC_LOG_WARNING,
"TCP client quota reached: %s",
isc_result_totext(result));
/*
* We have exceeded the system-wide TCP client quota. But,
* we can't just block this accept in all cases, because if
* we did, a heavy TCP load on other interfaces might cause
* this interface to be starved, with no clients able to
* accept new connections.
*
* So, we check here to see if any other clients are
* already servicing TCP queries on this interface (whether
* accepting, reading, or processing). If we find that at
* least one client other than this one is active, then
* it's okay *not* to call accept - we can let this
* client go inactive and another will take over when it's
* done.
*
* If there aren't enough active clients on the interface,
* then we can be a little bit flexible about the quota.
* We'll allow *one* extra client through to ensure we're
* listening on every interface; we do this by setting the
* 'force' option to tcpconn_init().
*
* (Note: In practice this means that the real TCP client
* quota is tcp-clients plus the number of listening
* interfaces plus 1.)
*/
exit = (isc_refcount_current(&client->interface->ntcpactive) >
(client->tcpactive ? 1U : 0U));
if (exit) {
client->newstate = NS_CLIENTSTATE_INACTIVE;
(void)exit_check(client);
return;
}
result = tcpconn_init(client, true);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
}
/*
* If this client was set up using get_client() or get_worker(),
* then TCP is already marked active. However, if it was restarted
* from exit_check(), it might not be, so we take care of it now.
*/
mark_tcp_active(client, true);
result = isc_socket_accept(client->tcplistener, client->task,
client_newconn, client);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_socket_accept() failed: %s",
isc_result_totext(result));
/*
* XXXRTH What should we do? We're trying to accept but
* it didn't work. If we just give up, then TCP
@@ -3298,13 +3574,37 @@ client_accept(ns_client_t *client) {
*
* For now, we just go idle.
*/
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_socket_accept() failed: %s",
isc_result_totext(result));
tcpconn_detach(client);
mark_tcp_active(client, false);
return;
}
/*
* The client's 'naccepts' counter indicates that this client has
* called accept() and is waiting for a new connection. It should
* never exceed 1.
*/
INSIST(client->naccepts == 0);
client->naccepts++;
LOCK(&client->interface->lock);
client->interface->ntcpcurrent++;
UNLOCK(&client->interface->lock);
/*
* The interface's 'ntcpaccepting' counter is incremented when
* any client calls accept(), and decremented in client_newconn()
* once the connection is established.
*
* When the client object is shutting down after handling a TCP
* request (see exit_check()), if this value is at least one, that
* means another client has called accept() and is waiting to
* establish the next connection. That means the client may be
* be free to become inactive; otherwise it may need to start
* listening for connections itself to prevent the interface
* going dead.
*/
isc_refcount_increment0(&client->interface->ntcpaccepting, NULL);
}
static void
@@ -3375,15 +3675,17 @@ ns_client_replace(ns_client_t *client) {
REQUIRE(client->manager != NULL);
tcp = TCP_CLIENT(client);
if (tcp && client->pipelined) {
if (tcp && client->tcpconn != NULL && client->tcpconn->pipelined) {
result = get_worker(client->manager, client->interface,
client->tcpsocket);
client->tcpsocket, client);
} else {
result = get_client(client->manager, client->interface,
client->dispatch, tcp);
}
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
return (result);
}
/*
* The responsibility for listening for new requests is hereby
@@ -3569,9 +3871,12 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
client->dscp = ifp->dscp;
if (tcp) {
mark_tcp_active(client, true);
client->attributes |= NS_CLIENTATTR_TCP;
isc_socket_attach(ifp->tcpsocket,
&client->tcplistener);
} else {
isc_socket_t *sock;
@@ -3585,11 +3890,12 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
ev = &client->ctlevent;
isc_task_send(client->task, &ev);
return (ISC_R_SUCCESS);
return (result);
}
static isc_result_t
get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock,
ns_client_t *oldclient)
{
isc_result_t result = ISC_R_SUCCESS;
isc_event_t *ev;
@@ -3597,6 +3903,7 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
MTRACE("get worker");
REQUIRE(manager != NULL);
REQUIRE(oldclient != NULL);
if (manager->exiting)
return (ISC_R_SHUTTINGDOWN);
@@ -3629,14 +3936,15 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
ns_interface_attach(ifp, &client->interface);
client->newstate = client->state = NS_CLIENTSTATE_WORKING;
INSIST(client->recursionquota == NULL);
client->tcpquota = &ns_g_server->tcpquota;
client->dscp = ifp->dscp;
client->attributes |= NS_CLIENTATTR_TCP;
client->pipelined = true;
client->mortal = true;
tcpconn_attach(oldclient, client);
mark_tcp_active(client, true);
isc_socket_attach(ifp->tcpsocket, &client->tcplistener);
isc_socket_attach(sock, &client->tcpsocket);
isc_socket_setname(client->tcpsocket, "worker-tcp", NULL);
@@ -3652,7 +3960,7 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
ev = &client->ctlevent;
isc_task_send(client->task, &ev);
return (ISC_R_SUCCESS);
return (result);
}
isc_result_t
@@ -3777,6 +4085,8 @@ ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
const char *signer = "", *qname = "";
dns_name_t *q = NULL;
REQUIRE(client != NULL);
vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
if (client->signer != NULL) {
+8 -1
View File
@@ -70,6 +70,11 @@ options {\n\
#ifndef WIN32
" files unlimited;\n"
#endif
#if defined(HAVE_GEOIP2) && !defined(WIN32)
" geoip-directory \"" MAXMINDDB_PREFIX "/share/GeoIP2\";\n"
#elif defined(HAVE_GEOIP2)
" geoip-directory \".\";\n"
#endif
"\
# has-old-clients <obsolete>;\n\
heartbeat-interval 60;\n\
@@ -167,7 +172,7 @@ options {\n\
filter-aaaa-on-v6 no;\n\
filter-aaaa { any; };\n"
#endif
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
" geoip-use-ecs yes;\n"
#endif
" lame-ttl 600;\n"
@@ -858,7 +863,9 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
if (stack != NULL)
isc_mem_put(mctx, stack, stackcount * sizeof(*stack));
INSIST(dscpcount == addrcount);
INSIST(keycount == addrcount);
INSIST(keycount == dscpcount);
ipkl->addrs = addrs;
ipkl->dscps = dscps;
+1 -1
View File
@@ -19,7 +19,7 @@
#ifdef ENABLE_AFL
#include <named/globals.h>
#include <named/server.h>
#include <sys/errno.h>
#include <errno.h>
#include <isc/app.h>
#include <isc/condition.h>
+123 -20
View File
@@ -13,20 +13,27 @@
#include <config.h>
#if defined(HAVE_GEOIP2)
#include <maxminddb.h>
#elif defined(HAVE_GEOIP)
#include <GeoIP.h>
#include <GeoIPCity.h>
#endif
#include <isc/print.h>
#include <isc/string.h>
#include <isc/util.h>
#include <dns/geoip.h>
#include <named/log.h>
#include <named/geoip.h>
#include <dns/geoip.h>
#ifdef HAVE_GEOIP
static dns_geoip_databases_t geoip_table = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
static dns_geoip_databases_t geoip_table;
#if defined(HAVE_GEOIP)
static void
init_geoip_db(GeoIP **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
init_geoip_db(void **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
GeoIPOptions method, const char *name)
{
char *info;
@@ -34,7 +41,7 @@ init_geoip_db(GeoIP **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
REQUIRE(dbp != NULL);
db = *dbp;
db = (GeoIP *)*dbp;
if (db != NULL) {
GeoIP_delete(db);
@@ -72,32 +79,96 @@ init_geoip_db(GeoIP **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
*dbp = db;
return;
fail:
if (fallback != 0)
if (fallback != 0) {
init_geoip_db(dbp, fallback, 0, method, name);
}
}
#endif /* HAVE_GEOIP */
#elif defined(HAVE_GEOIP2)
static MMDB_s geoip_country, geoip_city, geoip_as, geoip_isp, geoip_domain;
static MMDB_s *
open_geoip2(const char *dir, const char *dbfile, MMDB_s *mmdb) {
char pathbuf[PATH_MAX];
unsigned int n;
int ret;
n = snprintf(pathbuf, sizeof(pathbuf), "%s/%s", dir, dbfile);
if (n >= sizeof(pathbuf)) {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
"GeoIP2 database '%s/%s': path too long",
dir, dbfile);
return (NULL);
}
ret = MMDB_open(pathbuf, MMDB_MODE_MMAP, mmdb);
if (ret == MMDB_SUCCESS) {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_INFO,
"opened GeoIP2 database '%s'", pathbuf);
return (mmdb);
}
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_DEBUG(1),
"unable to open GeoIP2 database '%s' (status %d)",
pathbuf, ret);
return (NULL);
}
#endif /* HAVE_GEOIP2 */
void
ns_geoip_init(void) {
#ifndef HAVE_GEOIP
return;
#else
GeoIP_cleanup();
if (ns_g_geoip == NULL)
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
if (ns_g_geoip == NULL) {
ns_g_geoip = &geoip_table;
}
#if defined(HAVE_GEOIP)
GeoIP_cleanup();
#endif
#else
return;
#endif
}
void
ns_geoip_load(char *dir) {
#ifndef HAVE_GEOIP
#if defined(HAVE_GEOIP2)
REQUIRE(dir != NULL);
UNUSED(dir);
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_INFO,
"looking for GeoIP2 databases in '%s'", dir);
return;
#else
ns_g_geoip->country = open_geoip2(dir, "GeoIP2-Country.mmdb",
&geoip_country);
if (ns_g_geoip->country == NULL) {
ns_g_geoip->country = open_geoip2(dir,
"GeoLite2-Country.mmdb",
&geoip_country);
}
ns_g_geoip->city = open_geoip2(dir, "GeoIP2-City.mmdb", &geoip_city);
if (ns_g_geoip->city == NULL) {
ns_g_geoip->city = open_geoip2(dir, "GeoLite2-City.mmdb",
&geoip_city);
}
ns_g_geoip->as = open_geoip2(dir, "GeoIP2-ASN.mmdb", &geoip_as);
if (ns_g_geoip->as == NULL) {
ns_g_geoip->as = open_geoip2(dir, "GeoLite2-ASN.mmdb",
&geoip_as);
}
ns_g_geoip->isp = open_geoip2(dir, "GeoIP2-ISP.mmdb", &geoip_isp);
ns_g_geoip->domain = open_geoip2(dir, "GeoIP2-Domain.mmdb",
&geoip_domain);
#elif defined(HAVE_GEOIP)
GeoIPOptions method;
#ifdef _WIN32
@@ -141,5 +212,37 @@ ns_geoip_load(char *dir) {
method, "Domain");
init_geoip_db(&ns_g_geoip->netspeed, GEOIP_NETSPEED_EDITION, 0,
method, "NetSpeed");
#endif /* HAVE_GEOIP */
#else
UNUSED(dir);
return;
#endif
}
void
ns_geoip_shutdown(void) {
#ifdef HAVE_GEOIP2
if (ns_g_geoip->country != NULL) {
MMDB_close(ns_g_geoip->country);
ns_g_geoip->country = NULL;
}
if (ns_g_geoip->city != NULL) {
MMDB_close(ns_g_geoip->city);
ns_g_geoip->city = NULL;
}
if (ns_g_geoip->as != NULL) {
MMDB_close(ns_g_geoip->as);
ns_g_geoip->as = NULL;
}
if (ns_g_geoip->isp != NULL) {
MMDB_close(ns_g_geoip->isp);
ns_g_geoip->isp = NULL;
}
if (ns_g_geoip->domain != NULL) {
MMDB_close(ns_g_geoip->domain);
ns_g_geoip->domain = NULL;
}
#endif /* HAVE_GEOIP2 */
dns_geoip_shutdown();
}
+14 -9
View File
@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: client.h,v 1.96 2012/01/31 23:47:31 tbox Exp $ */
#ifndef NAMED_CLIENT_H
#define NAMED_CLIENT_H 1
@@ -80,6 +78,13 @@
*** Types
***/
/*% reference-counted TCP connection object */
typedef struct ns_tcpconn {
isc_refcount_t refs;
isc_quota_t *tcpquota;
bool pipelined;
} ns_tcpconn_t;
/*% nameserver client structure */
struct ns_client {
unsigned int magic;
@@ -94,7 +99,8 @@ struct ns_client {
int nupdates;
int nctls;
int references;
bool needshutdown; /*
bool tcpactive;
bool needshutdown; /*
* Used by clienttest to get
* the client to go from
* inactive to free state
@@ -130,10 +136,9 @@ struct ns_client {
isc_stdtime_t now;
isc_time_t tnow;
dns_name_t signername; /*%< [T]SIG key name */
dns_name_t * signer; /*%< NULL if not valid sig */
bool mortal; /*%< Die after handling request */
bool pipelined; /*%< TCP queries not in sequence */
isc_quota_t *tcpquota;
dns_name_t *signer; /*%< NULL if not valid sig */
bool mortal; /*%< Die after handling request */
ns_tcpconn_t *tcpconn;
isc_quota_t *recursionquota;
ns_interface_t *interface;
@@ -143,8 +148,8 @@ struct ns_client {
isc_sockaddr_t destsockaddr;
isc_netaddr_t ecs_addr; /*%< EDNS client subnet */
uint8_t ecs_addrlen;
uint8_t ecs_scope;
uint8_t ecs_addrlen;
uint8_t ecs_scope;
struct in6_pktinfo pktinfo;
isc_dscp_t dscp;
+9 -10
View File
@@ -12,15 +12,14 @@
#ifndef _GEOIP_H
#define _GEOIP_H
#ifdef HAVE_GEOIP
#include <GeoIP.h>
#include <GeoIPCity.h>
#endif /* HAVE_GEOIP */
void ns_geoip_init(void);
void ns_geoip_load(char *dir);
#ifdef HAVE_GEOIP
extern dns_geoip_databases_t *ns_g_geoip;
#endif /* HAVE_GEOIP */
void
ns_geoip_init(void);
void
ns_geoip_load(char *dir);
void
ns_geoip_shutdown(void);
#endif
+26 -23
View File
@@ -77,7 +77,7 @@ EXTERN in_port_t lwresd_g_listenport INIT(0);
EXTERN ns_server_t * ns_g_server INIT(NULL);
EXTERN bool ns_g_lwresdonly INIT(false);
EXTERN bool ns_g_lwresdonly INIT(false);
/*
* Logging.
@@ -105,9 +105,9 @@ EXTERN const char * lwresd_g_conffile INIT(NS_SYSCONFDIR
"/lwresd.conf");
EXTERN const char * lwresd_g_resolvconffile INIT("/etc"
"/resolv.conf");
EXTERN bool ns_g_conffileset INIT(false);
EXTERN bool lwresd_g_useresolvconf INIT(false);
EXTERN uint16_t ns_g_udpsize INIT(4096);
EXTERN bool ns_g_conffileset INIT(false);
EXTERN bool lwresd_g_useresolvconf INIT(false);
EXTERN uint16_t ns_g_udpsize INIT(4096);
EXTERN cfg_aclconfctx_t * ns_g_aclconfctx INIT(NULL);
/*
@@ -121,11 +121,11 @@ EXTERN isc_resourcevalue_t ns_g_initopenfiles INIT(0);
/*
* Misc.
*/
EXTERN bool ns_g_coreok INIT(true);
EXTERN bool ns_g_coreok INIT(true);
EXTERN const char * ns_g_chrootdir INIT(NULL);
EXTERN bool ns_g_foreground INIT(false);
EXTERN bool ns_g_logstderr INIT(false);
EXTERN bool ns_g_nosyslog INIT(false);
EXTERN bool ns_g_foreground INIT(false);
EXTERN bool ns_g_logstderr INIT(false);
EXTERN bool ns_g_nosyslog INIT(false);
EXTERN const char * ns_g_logfile INIT(NULL);
EXTERN const char * ns_g_defaultsessionkeyfile
@@ -134,7 +134,7 @@ EXTERN const char * ns_g_defaultsessionkeyfile
EXTERN const char * ns_g_defaultlockfile INIT(NS_LOCALSTATEDIR
"/run/named/"
"named.lock");
EXTERN bool ns_g_forcelock INIT(false);
EXTERN bool ns_g_forcelock INIT(false);
#if NS_RUN_PID_DIR
EXTERN const char * ns_g_defaultpidfile INIT(NS_LOCALSTATEDIR
@@ -169,23 +169,26 @@ EXTERN const char * ns_g_engine INIT(NULL);
EXTERN int ns_g_listen INIT(3);
EXTERN isc_time_t ns_g_boottime;
EXTERN isc_time_t ns_g_configtime;
EXTERN bool ns_g_memstatistics INIT(false);
EXTERN bool ns_g_clienttest INIT(false);
EXTERN bool ns_g_dropedns INIT(false);
EXTERN bool ns_g_noedns INIT(false);
EXTERN bool ns_g_nosoa INIT(false);
EXTERN bool ns_g_noaa INIT(false);
EXTERN bool ns_g_keepstderr INIT(false);
EXTERN bool ns_g_memstatistics INIT(false);
EXTERN bool ns_g_clienttest INIT(false);
EXTERN bool ns_g_dropedns INIT(false);
EXTERN bool ns_g_ednsformerr INIT(false);
EXTERN bool ns_g_ednsnotimp INIT(false);
EXTERN bool ns_g_ednsrefused INIT(false);
EXTERN bool ns_g_noedns INIT(false);
EXTERN bool ns_g_nosoa INIT(false);
EXTERN bool ns_g_noaa INIT(false);
EXTERN bool ns_g_keepstderr INIT(false);
EXTERN unsigned int ns_g_delay INIT(0);
EXTERN bool ns_g_nonearest INIT(false);
EXTERN bool ns_g_notcp INIT(false);
EXTERN bool ns_g_disable6 INIT(false);
EXTERN bool ns_g_disable4 INIT(false);
EXTERN bool ns_g_nonearest INIT(false);
EXTERN bool ns_g_notcp INIT(false);
EXTERN bool ns_g_disable6 INIT(false);
EXTERN bool ns_g_disable4 INIT(false);
EXTERN unsigned int ns_g_tat_interval INIT(24*3600);
EXTERN bool ns_g_fixedlocal INIT(false);
EXTERN bool ns_g_sigvalinsecs INIT(false);
EXTERN bool ns_g_fixedlocal INIT(false);
EXTERN bool ns_g_sigvalinsecs INIT(false);
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
EXTERN dns_geoip_databases_t *ns_g_geoip INIT(NULL);
#endif
+9 -5
View File
@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: interfacemgr.h,v 1.35 2011/07/28 23:47:58 tbox Exp $ */
#ifndef NAMED_INTERFACEMGR_H
#define NAMED_INTERFACEMGR_H 1
@@ -47,6 +45,7 @@
#include <isc/magic.h>
#include <isc/mem.h>
#include <isc/socket.h>
#include <isc/refcount.h>
#include <dns/result.h>
@@ -77,9 +76,14 @@ struct ns_interface {
/*%< UDP dispatchers. */
isc_socket_t * tcpsocket; /*%< TCP socket. */
isc_dscp_t dscp; /*%< "listen-on" DSCP value */
int ntcptarget; /*%< Desired number of concurrent
TCP accepts */
int ntcpcurrent; /*%< Current ditto, locked */
isc_refcount_t ntcpaccepting; /*%< Number of clients
ready to accept new
TCP connections on this
interface */
isc_refcount_t ntcpactive; /*%< Number of clients
servicing TCP queries
(whether accepting or
connected) */
int nudpdispatch; /*%< Number of UDP dispatches */
ns_clientmgr_t * clientmgr; /*%< Client manager. */
ISC_LINK(ns_interface_t) link;
+4 -1
View File
@@ -43,7 +43,10 @@ typedef ISC_LIST(ns_altsecret_t) ns_altsecretlist_t;
typedef enum {
ns_cookiealg_aes,
ns_cookiealg_sha1,
ns_cookiealg_sha256
ns_cookiealg_sha256,
ns_cookiealg_siphash24
} ns_cookiealg_t;
#define NS_COOKIE_VERSION_1 1
#endif /* NAMED_TYPES_H */
+8 -6
View File
@@ -211,7 +211,7 @@ ns_interfacemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
result = dns_aclenv_init(mctx, &mgr->aclenv);
if (result != ISC_R_SUCCESS)
goto cleanup_listenon;
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
mgr->aclenv.geoip = ns_g_geoip;
#endif
@@ -386,8 +386,9 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
* connections will be handled in parallel even though there is
* only one client initially.
*/
ifp->ntcptarget = 1;
ifp->ntcpcurrent = 0;
isc_refcount_init(&ifp->ntcpaccepting, 0);
isc_refcount_init(&ifp->ntcpactive, 0);
ifp->nudpdispatch = 0;
ifp->dscp = -1;
@@ -522,9 +523,7 @@ ns_interface_accepttcp(ns_interface_t *ifp) {
*/
(void)isc_socket_filter(ifp->tcpsocket, "dataready");
result = ns_clientmgr_createclients(ifp->clientmgr,
ifp->ntcptarget, ifp,
true);
result = ns_clientmgr_createclients(ifp->clientmgr, 1, ifp, true);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"TCP ns_clientmgr_createclients(): %s",
@@ -619,6 +618,9 @@ ns_interface_destroy(ns_interface_t *ifp) {
ns_interfacemgr_detach(&ifp->mgr);
isc_refcount_destroy(&ifp->ntcpactive);
isc_refcount_destroy(&ifp->ntcpaccepting);
ifp->magic = 0;
isc_mem_put(mctx, ifp, sizeof(*ifp));
}
+7 -11
View File
@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: lwresd.c,v 1.60 2009/09/02 23:48:01 tbox Exp $ */
/*! \file
* \brief
* Main program for the Lightweight Resolver Daemon.
@@ -209,15 +207,13 @@ ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
* Build the search path
*/
if (lwc->searchnxt > 0) {
if (lwc->searchnxt > 0) {
CHECK(buffer_putstr(&b, "\tsearch {\n"));
for (i = 0; i < lwc->searchnxt; i++) {
CHECK(buffer_putstr(&b, "\t\t\""));
CHECK(buffer_putstr(&b, lwc->search[i]));
CHECK(buffer_putstr(&b, "\";\n"));
}
CHECK(buffer_putstr(&b, "\t};\n"));
CHECK(buffer_putstr(&b, "\tsearch {\n"));
for (i = 0; i < lwc->searchnxt; i++) {
CHECK(buffer_putstr(&b, "\t\t\""));
CHECK(buffer_putstr(&b, lwc->search[i]));
CHECK(buffer_putstr(&b, "\";\n"));
}
CHECK(buffer_putstr(&b, "\t};\n"));
}
/*
@@ -493,6 +489,7 @@ ns_lwreslistener_detach(ns_lwreslistener_t **listenerp) {
INSIST(VALID_LWRESLISTENER(*listenerp));
listener = *listenerp;
*listenerp = NULL;
LOCK(&listener->lock);
INSIST(listener->refs > 0);
@@ -514,7 +511,6 @@ ns_lwreslistener_detach(ns_lwreslistener_t **listenerp) {
mctx = listener->mctx;
isc_mem_put(mctx, listener, sizeof(*listener));
isc_mem_detach(&mctx);
listenerp = NULL;
}
static isc_result_t
+22 -2
View File
@@ -356,7 +356,7 @@ save_command_line(int argc, char *argv[]) {
* nearly always be fine.
*/
if (quoted || isalnum(*src & 0xff) ||
*src == '-' || *src == '_' ||
*src == ',' || *src == '-' || *src == '_' ||
*src == '.' || *src == '/') {
*dst++ = *src++;
quoted = false;
@@ -479,6 +479,12 @@ parse_T_opt(char *option) {
ns_g_dropedns = true;
} else if (!strncmp(option, "dscp=", 5)) {
isc_dscp_check_value = atoi(option + 5);
} else if (!strcmp(option, "ednsformerr")) {
ns_g_ednsformerr = true;
} else if (!strcmp(option, "ednsnotimp")) {
ns_g_ednsnotimp = true;
} else if (!strcmp(option, "ednsrefused")) {
ns_g_ednsrefused = true;
} else if (!strcmp(option, "fixedlocal")) {
ns_g_fixedlocal = true;
} else if (!strcmp(option, "keepstderr")) {
@@ -501,6 +507,9 @@ parse_T_opt(char *option) {
maxudp = 1460;
} else if (!strncmp(option, "maxudp=", 7)) {
maxudp = atoi(option + 7);
if (maxudp <= 0) {
ns_main_earlyfatal("bad maxudp");
}
} else if (!strncmp(option, "mkeytimers=", 11)) {
p = strtok(option + 11, "/");
if (p == NULL) {
@@ -538,7 +547,7 @@ parse_T_opt(char *option) {
} else if (!strncmp(option, "tat=", 4)) {
ns_g_tat_interval = atoi(option + 4);
} else {
fprintf(stderr, "unknown -T flag '%s\n", option);
fprintf(stderr, "unknown -T flag '%s'\n", option);
}
}
@@ -1405,6 +1414,17 @@ main(int argc, char *argv[]) {
(void) ProfilerStart(NULL);
#endif
#ifdef WIN32
/*
* Prevent unbuffered I/O from crippling named performance on Windows
* when it is logging to stderr (e.g. in system tests). Use full
* buffering (_IOFBF) as line buffering (_IOLBF) is unavailable on
* Windows and fflush() is called anyway after each log message gets
* written to the default stderr logging channels created by libisc.
*/
setvbuf(stderr, NULL, _IOFBF, BUFSIZ);
#endif
/*
* Record version in core image.
* strings named.core | grep "named version:"
+23 -23
View File
@@ -10,12 +10,12 @@
.\" Title: named.conf
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2018-06-21
.\" Date: 2019-07-22
.\" Manual: BIND9
.\" Source: ISC
.\" Language: English
.\"
.TH "NAMED\&.CONF" "5" "2018\-06\-21" "ISC" "BIND9"
.TH "NAMED\&.CONF" "5" "2019\-07\-22" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -232,9 +232,9 @@ options {
bindkeys\-file \fIquoted_string\fR;
blackhole { \fIaddress_match_element\fR; \&.\&.\&. };
cache\-file \fIquoted_string\fR;
catalog\-zones { zone \fIquoted_string\fR [ default\-masters [ port
\fIinteger\fR ] [ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [
port \fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key
catalog\-zones { zone \fIstring\fR [ default\-masters [ port \fIinteger\fR ]
[ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [ port
\fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key
\fIstring\fR ]; \&.\&.\&. } ] [ zone\-directory \fIquoted_string\fR ] [
in\-memory \fIboolean\fR ] [ min\-update\-interval \fIinteger\fR ]; \&.\&.\&. };
check\-dup\-records ( fail | warn | ignore );
@@ -249,7 +249,7 @@ options {
check\-wildcard \fIboolean\fR;
cleaning\-interval \fIinteger\fR;
clients\-per\-query \fIinteger\fR;
cookie\-algorithm ( aes | sha1 | sha256 );
cookie\-algorithm ( aes | sha1 | sha256 | siphash24 );
cookie\-secret \fIstring\fR;
coresize ( default | unlimited | \fIsizeval\fR );
datasize ( default | unlimited | \fIsizeval\fR );
@@ -418,13 +418,13 @@ options {
require\-server\-cookie \fIboolean\fR;
reserved\-sockets \fIinteger\fR;
resolver\-query\-timeout \fIinteger\fR;
response\-policy { zone \fIquoted_string\fR [ log \fIboolean\fR ] [
max\-policy\-ttl \fIinteger\fR ] [ policy ( cname | disabled | drop |
given | no\-op | nodata | nxdomain | passthru | tcp\-only
\fIquoted_string\fR ) ] [ recursive\-only \fIboolean\fR ]; \&.\&.\&. } [
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIinteger\fR ] [
min\-ns\-dots \fIinteger\fR ] [ nsip\-wait\-recurse \fIboolean\fR ] [
qname\-wait\-recurse \fIboolean\fR ] [ recursive\-only \fIboolean\fR ];
response\-policy { zone \fIstring\fR [ log \fIboolean\fR ] [ max\-policy\-ttl
\fIinteger\fR ] [ policy ( cname | disabled | drop | given | no\-op
| nodata | nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
recursive\-only \fIboolean\fR ]; \&.\&.\&. } [ break\-dnssec \fIboolean\fR ] [
max\-policy\-ttl \fIinteger\fR ] [ min\-ns\-dots \fIinteger\fR ] [
nsip\-wait\-recurse \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ]
[ recursive\-only \fIboolean\fR ];
root\-delegation\-only [ exclude { \fIquoted_string\fR; \&.\&.\&. } ];
root\-key\-sentinel \fIboolean\fR;
rrset\-order { [ class \fIstring\fR ] [ type \fIstring\fR ] [ name
@@ -578,9 +578,9 @@ view \fIstring\fR [ \fIclass\fR ] {
auth\-nxdomain \fIboolean\fR; // default changed
auto\-dnssec ( allow | maintain | off );
cache\-file \fIquoted_string\fR;
catalog\-zones { zone \fIquoted_string\fR [ default\-masters [ port
\fIinteger\fR ] [ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [
port \fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key
catalog\-zones { zone \fIstring\fR [ default\-masters [ port \fIinteger\fR ]
[ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [ port
\fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key
\fIstring\fR ]; \&.\&.\&. } ] [ zone\-directory \fIquoted_string\fR ] [
in\-memory \fIboolean\fR ] [ min\-update\-interval \fIinteger\fR ]; \&.\&.\&. };
check\-dup\-records ( fail | warn | ignore );
@@ -734,13 +734,13 @@ view \fIstring\fR [ \fIclass\fR ] {
request\-nsid \fIboolean\fR;
require\-server\-cookie \fIboolean\fR;
resolver\-query\-timeout \fIinteger\fR;
response\-policy { zone \fIquoted_string\fR [ log \fIboolean\fR ] [
max\-policy\-ttl \fIinteger\fR ] [ policy ( cname | disabled | drop |
given | no\-op | nodata | nxdomain | passthru | tcp\-only
\fIquoted_string\fR ) ] [ recursive\-only \fIboolean\fR ]; \&.\&.\&. } [
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIinteger\fR ] [
min\-ns\-dots \fIinteger\fR ] [ nsip\-wait\-recurse \fIboolean\fR ] [
qname\-wait\-recurse \fIboolean\fR ] [ recursive\-only \fIboolean\fR ];
response\-policy { zone \fIstring\fR [ log \fIboolean\fR ] [ max\-policy\-ttl
\fIinteger\fR ] [ policy ( cname | disabled | drop | given | no\-op
| nodata | nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
recursive\-only \fIboolean\fR ]; \&.\&.\&. } [ break\-dnssec \fIboolean\fR ] [
max\-policy\-ttl \fIinteger\fR ] [ min\-ns\-dots \fIinteger\fR ] [
nsip\-wait\-recurse \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ]
[ recursive\-only \fIboolean\fR ];
root\-delegation\-only [ exclude { \fIquoted_string\fR; \&.\&.\&. } ];
root\-key\-sentinel \fIboolean\fR;
rrset\-order { [ class \fIstring\fR ] [ type \fIstring\fR ] [ name
+22 -22
View File
@@ -13,7 +13,7 @@
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named.conf">
<info>
<date>2018-06-21</date>
<date>2019-07-22</date>
</info>
<refentryinfo>
<corpname>ISC</corpname>
@@ -221,9 +221,9 @@ options {
bindkeys-file <replaceable>quoted_string</replaceable>;
blackhole { <replaceable>address_match_element</replaceable>; ... };
cache-file <replaceable>quoted_string</replaceable>;
catalog-zones { zone <replaceable>quoted_string</replaceable> [ default-masters [ port
<replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [
port <replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
catalog-zones { zone <replaceable>string</replaceable> [ default-masters [ port <replaceable>integer</replaceable> ]
[ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [ port
<replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
<replaceable>string</replaceable> ]; ... } ] [ zone-directory <replaceable>quoted_string</replaceable> ] [
in-memory <replaceable>boolean</replaceable> ] [ min-update-interval <replaceable>integer</replaceable> ]; ... };
check-dup-records ( fail | warn | ignore );
@@ -238,7 +238,7 @@ options {
check-wildcard <replaceable>boolean</replaceable>;
cleaning-interval <replaceable>integer</replaceable>;
clients-per-query <replaceable>integer</replaceable>;
cookie-algorithm ( aes | sha1 | sha256 );
cookie-algorithm ( aes | sha1 | sha256 | siphash24 );
cookie-secret <replaceable>string</replaceable>;
coresize ( default | unlimited | <replaceable>sizeval</replaceable> );
datasize ( default | unlimited | <replaceable>sizeval</replaceable> );
@@ -407,13 +407,13 @@ options {
require-server-cookie <replaceable>boolean</replaceable>;
reserved-sockets <replaceable>integer</replaceable>;
resolver-query-timeout <replaceable>integer</replaceable>;
response-policy { zone <replaceable>quoted_string</replaceable> [ log <replaceable>boolean</replaceable> ] [
max-policy-ttl <replaceable>integer</replaceable> ] [ policy ( cname | disabled | drop |
given | no-op | nodata | nxdomain | passthru | tcp-only
<replaceable>quoted_string</replaceable> ) ] [ recursive-only <replaceable>boolean</replaceable> ]; ... } [
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>integer</replaceable> ] [
min-ns-dots <replaceable>integer</replaceable> ] [ nsip-wait-recurse <replaceable>boolean</replaceable> ] [
qname-wait-recurse <replaceable>boolean</replaceable> ] [ recursive-only <replaceable>boolean</replaceable> ];
response-policy { zone <replaceable>string</replaceable> [ log <replaceable>boolean</replaceable> ] [ max-policy-ttl
<replaceable>integer</replaceable> ] [ policy ( cname | disabled | drop | given | no-op
| nodata | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
recursive-only <replaceable>boolean</replaceable> ]; ... } [ break-dnssec <replaceable>boolean</replaceable> ] [
max-policy-ttl <replaceable>integer</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
nsip-wait-recurse <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
[ recursive-only <replaceable>boolean</replaceable> ];
root-delegation-only [ exclude { <replaceable>quoted_string</replaceable>; ... } ];
root-key-sentinel <replaceable>boolean</replaceable>;
rrset-order { [ class <replaceable>string</replaceable> ] [ type <replaceable>string</replaceable> ] [ name
@@ -551,9 +551,9 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
auth-nxdomain <replaceable>boolean</replaceable>; // default changed
auto-dnssec ( allow | maintain | off );
cache-file <replaceable>quoted_string</replaceable>;
catalog-zones { zone <replaceable>quoted_string</replaceable> [ default-masters [ port
<replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [
port <replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
catalog-zones { zone <replaceable>string</replaceable> [ default-masters [ port <replaceable>integer</replaceable> ]
[ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [ port
<replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
<replaceable>string</replaceable> ]; ... } ] [ zone-directory <replaceable>quoted_string</replaceable> ] [
in-memory <replaceable>boolean</replaceable> ] [ min-update-interval <replaceable>integer</replaceable> ]; ... };
check-dup-records ( fail | warn | ignore );
@@ -707,13 +707,13 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
request-nsid <replaceable>boolean</replaceable>;
require-server-cookie <replaceable>boolean</replaceable>;
resolver-query-timeout <replaceable>integer</replaceable>;
response-policy { zone <replaceable>quoted_string</replaceable> [ log <replaceable>boolean</replaceable> ] [
max-policy-ttl <replaceable>integer</replaceable> ] [ policy ( cname | disabled | drop |
given | no-op | nodata | nxdomain | passthru | tcp-only
<replaceable>quoted_string</replaceable> ) ] [ recursive-only <replaceable>boolean</replaceable> ]; ... } [
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>integer</replaceable> ] [
min-ns-dots <replaceable>integer</replaceable> ] [ nsip-wait-recurse <replaceable>boolean</replaceable> ] [
qname-wait-recurse <replaceable>boolean</replaceable> ] [ recursive-only <replaceable>boolean</replaceable> ];
response-policy { zone <replaceable>string</replaceable> [ log <replaceable>boolean</replaceable> ] [ max-policy-ttl
<replaceable>integer</replaceable> ] [ policy ( cname | disabled | drop | given | no-op
| nodata | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
recursive-only <replaceable>boolean</replaceable> ]; ... } [ break-dnssec <replaceable>boolean</replaceable> ] [
max-policy-ttl <replaceable>integer</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
nsip-wait-recurse <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
[ recursive-only <replaceable>boolean</replaceable> ];
root-delegation-only [ exclude { <replaceable>quoted_string</replaceable>; ... } ];
root-key-sentinel <replaceable>boolean</replaceable>;
rrset-order { [ class <replaceable>string</replaceable> ] [ type <replaceable>string</replaceable> ] [ name
+21 -21
View File
@@ -209,9 +209,9 @@ options
bindkeys-file <em class="replaceable"><code>quoted_string</code></em>;<br>
blackhole { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
cache-file <em class="replaceable"><code>quoted_string</code></em>;<br>
catalog-zones { zone <em class="replaceable"><code>quoted_string</code></em> [ default-masters [ port<br>
    <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<br>
    port <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port <em class="replaceable"><code>integer</code></em> ] ) [ key<br>
catalog-zones { zone <em class="replaceable"><code>string</code></em> [ default-masters [ port <em class="replaceable"><code>integer</code></em> ]<br>
    [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [ port<br>
    <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port <em class="replaceable"><code>integer</code></em> ] ) [ key<br>
    <em class="replaceable"><code>string</code></em> ]; ... } ] [ zone-directory <em class="replaceable"><code>quoted_string</code></em> ] [<br>
    in-memory <em class="replaceable"><code>boolean</code></em> ] [ min-update-interval <em class="replaceable"><code>integer</code></em> ]; ... };<br>
check-dup-records ( fail | warn | ignore );<br>
@@ -226,7 +226,7 @@ options
check-wildcard <em class="replaceable"><code>boolean</code></em>;<br>
cleaning-interval <em class="replaceable"><code>integer</code></em>;<br>
clients-per-query <em class="replaceable"><code>integer</code></em>;<br>
cookie-algorithm ( aes | sha1 | sha256 );<br>
cookie-algorithm ( aes | sha1 | sha256 | siphash24 );<br>
cookie-secret <em class="replaceable"><code>string</code></em>;<br>
coresize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
datasize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
@@ -395,13 +395,13 @@ options
require-server-cookie <em class="replaceable"><code>boolean</code></em>;<br>
reserved-sockets <em class="replaceable"><code>integer</code></em>;<br>
resolver-query-timeout <em class="replaceable"><code>integer</code></em>;<br>
response-policy { zone <em class="replaceable"><code>quoted_string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [<br>
    max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [ policy ( cname | disabled | drop |<br>
    given | no-op | nodata | nxdomain | passthru | tcp-only<br>
    <em class="replaceable"><code>quoted_string</code></em> ) ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ]; ... } [<br>
    break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [<br>
    min-ns-dots <em class="replaceable"><code>integer</code></em> ] [ nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [<br>
    qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ];<br>
response-policy { zone <em class="replaceable"><code>string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl<br>
    <em class="replaceable"><code>integer</code></em> ] [ policy ( cname | disabled | drop | given | no-op<br>
    | nodata | nxdomain | passthru | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [<br>
    recursive-only <em class="replaceable"><code>boolean</code></em> ]; ... } [ break-dnssec <em class="replaceable"><code>boolean</code></em> ] [<br>
    max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [ min-ns-dots <em class="replaceable"><code>integer</code></em> ] [<br>
    nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ]<br>
    [ recursive-only <em class="replaceable"><code>boolean</code></em> ];<br>
root-delegation-only [ exclude { <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
root-key-sentinel <em class="replaceable"><code>boolean</code></em>;<br>
rrset-order { [ class <em class="replaceable"><code>string</code></em> ] [ type <em class="replaceable"><code>string</code></em> ] [ name<br>
@@ -543,9 +543,9 @@ view
auth-nxdomain <em class="replaceable"><code>boolean</code></em>; // default changed<br>
auto-dnssec ( allow | maintain | off );<br>
cache-file <em class="replaceable"><code>quoted_string</code></em>;<br>
catalog-zones { zone <em class="replaceable"><code>quoted_string</code></em> [ default-masters [ port<br>
    <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<br>
    port <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port <em class="replaceable"><code>integer</code></em> ] ) [ key<br>
catalog-zones { zone <em class="replaceable"><code>string</code></em> [ default-masters [ port <em class="replaceable"><code>integer</code></em> ]<br>
    [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [ port<br>
    <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port <em class="replaceable"><code>integer</code></em> ] ) [ key<br>
    <em class="replaceable"><code>string</code></em> ]; ... } ] [ zone-directory <em class="replaceable"><code>quoted_string</code></em> ] [<br>
    in-memory <em class="replaceable"><code>boolean</code></em> ] [ min-update-interval <em class="replaceable"><code>integer</code></em> ]; ... };<br>
check-dup-records ( fail | warn | ignore );<br>
@@ -699,13 +699,13 @@ view
request-nsid <em class="replaceable"><code>boolean</code></em>;<br>
require-server-cookie <em class="replaceable"><code>boolean</code></em>;<br>
resolver-query-timeout <em class="replaceable"><code>integer</code></em>;<br>
response-policy { zone <em class="replaceable"><code>quoted_string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [<br>
    max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [ policy ( cname | disabled | drop |<br>
    given | no-op | nodata | nxdomain | passthru | tcp-only<br>
    <em class="replaceable"><code>quoted_string</code></em> ) ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ]; ... } [<br>
    break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [<br>
    min-ns-dots <em class="replaceable"><code>integer</code></em> ] [ nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [<br>
    qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ];<br>
response-policy { zone <em class="replaceable"><code>string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl<br>
    <em class="replaceable"><code>integer</code></em> ] [ policy ( cname | disabled | drop | given | no-op<br>
    | nodata | nxdomain | passthru | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [<br>
    recursive-only <em class="replaceable"><code>boolean</code></em> ]; ... } [ break-dnssec <em class="replaceable"><code>boolean</code></em> ] [<br>
    max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [ min-ns-dots <em class="replaceable"><code>integer</code></em> ] [<br>
    nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ]<br>
    [ recursive-only <em class="replaceable"><code>boolean</code></em> ];<br>
root-delegation-only [ exclude { <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
root-key-sentinel <em class="replaceable"><code>boolean</code></em>;<br>
rrset-order { [ class <em class="replaceable"><code>string</code></em> ] [ type <em class="replaceable"><code>string</code></em> ] [ name<br>
+47 -13
View File
@@ -4220,12 +4220,14 @@ query_prefetch(ns_client_t *client, dns_name_t *qname,
if (client->recursionquota == NULL) {
result = isc_quota_attach(&ns_g_server->recursionquota,
&client->recursionquota);
if (result == ISC_R_SUCCESS || result == ISC_R_SOFTQUOTA) {
isc_stats_increment(ns_g_server->nsstats,
dns_nsstatscounter_recursclients);
}
if (result == ISC_R_SUCCESS && !client->mortal && !TCP(client))
result = ns_client_replace(client);
if (result != ISC_R_SUCCESS)
return;
isc_stats_increment(ns_g_server->nsstats,
dns_nsstatscounter_recursclients);
}
tmprdataset = query_newrdataset(client);
@@ -4277,8 +4279,10 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qname,
result = isc_quota_attach(&ns_g_server->recursionquota,
&client->recursionquota);
isc_stats_increment(ns_g_server->nsstats,
dns_nsstatscounter_recursclients);
if (result == ISC_R_SUCCESS || result == ISC_R_SOFTQUOTA) {
isc_stats_increment(ns_g_server->nsstats,
dns_nsstatscounter_recursclients);
}
if (result == ISC_R_SOFTQUOTA) {
static isc_stdtime_t last = 0;
@@ -4535,12 +4539,14 @@ query_rpzfetch(ns_client_t *client, dns_name_t *qname, dns_rdatatype_t type) {
if (client->recursionquota == NULL) {
result = isc_quota_attach(&ns_g_server->recursionquota,
&client->recursionquota);
if (result == ISC_R_SUCCESS || result == ISC_R_SOFTQUOTA) {
isc_stats_increment(ns_g_server->nsstats,
dns_nsstatscounter_recursclients);
}
if (result == ISC_R_SUCCESS && !client->mortal && !TCP(client))
result = ns_client_replace(client);
if (result != ISC_R_SUCCESS)
return;
isc_stats_increment(ns_g_server->nsstats,
dns_nsstatscounter_recursclients);
}
tmprdataset = query_newrdataset(client);
@@ -4777,6 +4783,7 @@ rpz_find_p(ns_client_t *client, dns_name_t *self_name, dns_rdatatype_t qtype,
isc_result_t result;
dns_clientinfomethods_t cm;
dns_clientinfo_t ci;
bool found_a = false;
REQUIRE(nodep != NULL);
@@ -4820,6 +4827,18 @@ rpz_find_p(ns_client_t *client, dns_name_t *self_name, dns_rdatatype_t qtype,
"rpz_find_p: allrdatasets failed");
return (DNS_R_SERVFAIL);
}
if (qtype == dns_rdatatype_aaaa &&
!ISC_LIST_EMPTY(client->view->dns64)) {
for (result = dns_rdatasetiter_first(rdsiter);
result == ISC_R_SUCCESS;
result = dns_rdatasetiter_next(rdsiter)) {
dns_rdatasetiter_current(rdsiter, *rdatasetp);
if ((*rdatasetp)->type == dns_rdatatype_a) {
found_a = true;
}
dns_rdataset_disassociate(*rdatasetp);
}
}
for (result = dns_rdatasetiter_first(rdsiter);
result == ISC_R_SUCCESS;
result = dns_rdatasetiter_next(rdsiter)) {
@@ -4872,7 +4891,11 @@ rpz_find_p(ns_client_t *client, dns_name_t *self_name, dns_rdatatype_t qtype,
}
return (ISC_R_SUCCESS);
case DNS_R_NXRRSET:
*policyp = DNS_RPZ_POLICY_NODATA;
if (found_a) {
*policyp = DNS_RPZ_POLICY_DNS64;
} else {
*policyp = DNS_RPZ_POLICY_NODATA;
}
return (result);
case DNS_R_DNAME:
/*
@@ -6568,6 +6591,7 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
dns_dbversion_t *version = NULL;
dns_zone_t *zone = NULL;
bool is_zone;
unsigned int labels;
unsigned int options;
CTRACE(ISC_LOG_DEBUG(3), "redirect2");
@@ -6610,12 +6634,13 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
}
redirectname = dns_fixedname_initname(&fixedredirect);
if (dns_name_countlabels(name) > 1U) {
labels = dns_name_countlabels(client->query.qname);
if (labels > 1U) {
dns_name_t prefix;
unsigned int labels = dns_name_countlabels(name) - 1;
dns_name_init(&prefix, NULL);
dns_name_getlabelsequence(name, 0, labels, &prefix);
dns_name_getlabelsequence(client->query.qname, 0, labels - 1,
&prefix);
result = dns_name_concatenate(&prefix,
client->view->redirectzone,
redirectname, NULL);
@@ -6764,7 +6789,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
bool failcache;
uint32_t flags;
#ifdef WANT_QUERYTRACE
char mbuf[BUFSIZ];
char mbuf[4 * DNS_NAME_FORMATSIZE];
char qbuf[DNS_NAME_FORMATSIZE];
char tbuf[DNS_RDATATYPE_FORMATSIZE];
#endif
@@ -7500,8 +7525,10 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
rpz = true;
break;
case DNS_RPZ_POLICY_NODATA:
result = DNS_R_NXRRSET;
nxrewrite = true;
/* FALLTHROUGH */
case DNS_RPZ_POLICY_DNS64:
result = DNS_R_NXRRSET;
rpz = true;
break;
case DNS_RPZ_POLICY_RECORD:
@@ -7962,6 +7989,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
#endif
} else if (result == DNS_R_NXRRSET &&
!ISC_LIST_EMPTY(client->view->dns64) &&
!nxrewrite &&
client->message->rdclass == dns_rdataclass_in &&
qtype == dns_rdatatype_aaaa)
{
@@ -9020,11 +9048,13 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
}
/*
* BIND 8 priming queries need the additional section.
* Always add glue for root priming queries, regardless
* of "minimal-responses" setting.
*/
if (dns_name_equal(client->query.qname, dns_rootname)) {
client->query.attributes &=
~NS_QUERYATTR_NOADDITIONAL;
dns_db_attach(db, &client->query.gluedb);
}
}
@@ -9176,6 +9206,10 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
free_devent(client, ISC_EVENT_PTR(&event), &event);
}
if (client->query.gluedb != NULL) {
dns_db_detach(&client->query.gluedb);
}
/*
* AA bit.
*/
+76 -52
View File
@@ -42,6 +42,7 @@
#include <isc/refcount.h>
#include <isc/resource.h>
#include <isc/sha2.h>
#include <isc/siphash.h>
#include <isc/socket.h>
#include <isc/stat.h>
#include <isc/stats.h>
@@ -105,9 +106,9 @@
#include <named/client.h>
#include <named/config.h>
#include <named/control.h>
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
#include <named/geoip.h>
#endif /* HAVE_GEOIP */
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
#include <named/interfacemgr.h>
#include <named/log.h>
#include <named/logconf.h>
@@ -844,7 +845,7 @@ load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
key = cfg_listelt_value(elt2);
result = dstkey_fromconfig(vconfig, key, managed,
&dstkey, mctx);
if (result == DST_R_UNSUPPORTEDALG) {
if (result == DST_R_UNSUPPORTEDALG) {
result = ISC_R_SUCCESS;
continue;
}
@@ -4384,6 +4385,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
* "allow-recursion-on" and "allow-query-cache" ACLs from
* the global config.
*/
/* cppcheck-suppress duplicateCondition */
if (view->recursionacl == NULL) {
/* global default only */
CHECK(configure_view_acl(NULL, NULL, ns_g_config,
@@ -4391,6 +4393,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
actx, ns_g_mctx,
&view->recursionacl));
}
/* cppcheck-suppress duplicateCondition */
if (view->recursiononacl == NULL) {
/* global default only */
CHECK(configure_view_acl(NULL, NULL, ns_g_config,
@@ -7631,7 +7634,7 @@ load_configuration(const char *filename, ns_server_t *server,
}
isc__socketmgr_setreserved(ns_g_socketmgr, reserved);
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
/*
* Initialize GeoIP databases from the configured location.
* This should happen before configuring any ACLs, so that we
@@ -7644,8 +7647,6 @@ load_configuration(const char *filename, ns_server_t *server,
char *dir;
DE_CONST(cfg_obj_asstring(obj), dir);
ns_geoip_load(dir);
} else {
ns_geoip_load(NULL);
}
ns_g_aclconfctx->geoip = ns_g_geoip;
@@ -7653,7 +7654,7 @@ load_configuration(const char *filename, ns_server_t *server,
result = ns_config_get(maps, "geoip-use-ecs", &obj);
INSIST(result == ISC_R_SUCCESS);
ns_g_server->aclenv.geoip_use_ecs = cfg_obj_asboolean(obj);
#endif /* HAVE_GEOIP */
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
/*
* Configure various server options.
@@ -8246,29 +8247,25 @@ load_configuration(const char *filename, ns_server_t *server,
}
#endif
}
}
#ifdef HAVE_LMDB
/*
* If we're using LMDB, we may have created newzones databases
* as root, making it impossible to reopen them later after
* switching to a new userid. We close them now, and reopen
* after relinquishing privileges them.
*/
if (first_time) {
/*
* If we're using LMDB, we may have created newzones
* databases as root, making it impossible to reopen
* them later after switching to a new userid. We
* close them now, and reopen after relinquishing
* privileges them.
*/
for (view = ISC_LIST_HEAD(server->viewlist);
view != NULL;
view = ISC_LIST_NEXT(view, link))
view != NULL; view = ISC_LIST_NEXT(view, link))
{
nzd_env_close(view);
}
}
#endif /* HAVE_LMDB */
/*
* Relinquish root privileges.
*/
if (first_time) {
/*
* Relinquish root privileges.
*/
ns_os_changeuser();
}
@@ -8484,7 +8481,9 @@ load_configuration(const char *filename, ns_server_t *server,
obj = NULL;
result = ns_config_get(maps, "cookie-algorithm", &obj);
INSIST(result == ISC_R_SUCCESS);
if (strcasecmp(cfg_obj_asstring(obj), "aes") == 0) {
if (strcasecmp(cfg_obj_asstring(obj), "siphash24") == 0) {
server->cookiealg = ns_cookiealg_siphash24;
} else if (strcasecmp(cfg_obj_asstring(obj), "aes") == 0) {
#if defined(HAVE_OPENSSL_AES) || defined(HAVE_OPENSSL_EVP_AES)
server->cookiealg = ns_cookiealg_aes;
#else
@@ -8547,11 +8546,16 @@ load_configuration(const char *filename, ns_server_t *server,
usedlength = isc_buffer_usedlength(&b);
switch (server->cookiealg) {
case ns_cookiealg_siphash24:
if (usedlength != ISC_SIPHASH24_KEY_LENGTH) {
CHECKM(ISC_R_RANGE,
"SipHash-2-4 cookie-secret must be 128 bits");
}
break;
case ns_cookiealg_aes:
if (usedlength != ISC_AES128_KEYLENGTH) {
CHECKM(ISC_R_RANGE,
"AES cookie-secret must be "
"128 bits");
"AES cookie-secret must be 128 bits");
}
break;
case ns_cookiealg_sha1:
@@ -8960,9 +8964,9 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
#ifdef HAVE_DNSTAP
dns_dt_shutdown();
#endif
#ifdef HAVE_GEOIP
dns_geoip_shutdown();
#endif
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
ns_geoip_shutdown();
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
dns_db_detach(&server->in_roothints);
@@ -8995,7 +8999,7 @@ ns_server_create(isc_mem_t *mctx, ns_server_t **serverp) {
result = dns_aclenv_init(mctx, &server->aclenv);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
/* Initialize GeoIP before using ACL environment */
ns_geoip_init();
server->aclenv.geoip = ns_g_geoip;
@@ -10039,17 +10043,21 @@ dumpdone(void *arg, isc_result_t result) {
char buf[1024+32];
const dns_master_style_t *style;
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
goto cleanup;
if (dctx->mdctx != NULL)
}
if (dctx->mdctx != NULL) {
dns_dumpctx_detach(&dctx->mdctx);
}
if (dctx->view == NULL) {
dctx->view = ISC_LIST_HEAD(dctx->viewlist);
if (dctx->view == NULL)
if (dctx->view == NULL) {
goto done;
}
INSIST(dctx->zone == NULL);
} else
} else {
goto resume;
}
nextview:
fprintf(dctx->fp, ";\n; Start view %s\n;\n", dctx->view->view->name);
resume:
@@ -10063,8 +10071,9 @@ dumpdone(void *arg, isc_result_t result) {
{
style = &dns_master_style_cache;
/* start cache dump */
if (dctx->view->view->cachedb != NULL)
if (dctx->view->view->cachedb != NULL) {
dns_db_attach(dctx->view->view->cachedb, &dctx->cache);
}
if (dctx->cache != NULL) {
fprintf(dctx->fp,
";\n; Cache dump of view '%s' (cache %s)\n;\n",
@@ -10076,43 +10085,52 @@ dumpdone(void *arg, isc_result_t result) {
dctx->task,
dumpdone, dctx,
&dctx->mdctx);
if (result == DNS_R_CONTINUE)
if (result == DNS_R_CONTINUE) {
return;
if (result == ISC_R_NOTIMPLEMENTED)
}
if (result == ISC_R_NOTIMPLEMENTED) {
fprintf(dctx->fp, "; %s\n",
dns_result_totext(result));
else if (result != ISC_R_SUCCESS)
} else if (result != ISC_R_SUCCESS) {
goto cleanup;
}
}
}
if ((dctx->dumpadb || dctx->dumpbad || dctx->dumpfail) &&
dctx->cache == NULL && dctx->view->view->cachedb != NULL)
dctx->cache == NULL && dctx->view->view->cachedb != NULL) {
dns_db_attach(dctx->view->view->cachedb, &dctx->cache);
}
if (dctx->cache != NULL) {
if (dctx->dumpadb)
if (dctx->dumpadb) {
dns_adb_dump(dctx->view->view->adb, dctx->fp);
if (dctx->dumpbad)
}
if (dctx->dumpbad) {
dns_resolver_printbadcache(dctx->view->view->resolver,
dctx->fp);
if (dctx->dumpfail)
}
if (dctx->dumpfail) {
dns_badcache_print(dctx->view->view->failcache,
"SERVFAIL cache", dctx->fp);
}
dns_db_detach(&dctx->cache);
}
if (dctx->dumpzones) {
style = &dns_master_style_full;
nextzone:
if (dctx->version != NULL)
if (dctx->version != NULL) {
dns_db_closeversion(dctx->db, &dctx->version,
false);
if (dctx->db != NULL)
}
if (dctx->db != NULL) {
dns_db_detach(&dctx->db);
if (dctx->zone == NULL)
}
if (dctx->zone == NULL) {
dctx->zone = ISC_LIST_HEAD(dctx->view->zonelist);
else
} else {
dctx->zone = ISC_LIST_NEXT(dctx->zone, link);
}
if (dctx->zone != NULL) {
/* start zone dump */
dns_zone_name(dctx->zone->zone, buf, sizeof(buf));
@@ -10131,8 +10149,9 @@ dumpdone(void *arg, isc_result_t result) {
dctx->task,
dumpdone, dctx,
&dctx->mdctx);
if (result == DNS_R_CONTINUE)
if (result == DNS_R_CONTINUE) {
return;
}
if (result == ISC_R_NOTIMPLEMENTED) {
fprintf(dctx->fp, "; %s\n",
dns_result_totext(result));
@@ -10140,26 +10159,31 @@ dumpdone(void *arg, isc_result_t result) {
POST(result);
goto nextzone;
}
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
}
}
if (dctx->view != NULL)
if (dctx->view != NULL) {
dctx->view = ISC_LIST_NEXT(dctx->view, link);
if (dctx->view != NULL)
goto nextview;
if (dctx->view != NULL) {
goto nextview;
}
}
done:
fprintf(dctx->fp, "; Dump complete\n");
result = isc_stdio_flush(dctx->fp);
if (result == ISC_R_SUCCESS)
if (result == ISC_R_SUCCESS) {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_INFO,
"dumpdb complete");
}
cleanup:
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
"dumpdb failed: %s", dns_result_totext(result));
}
dumpcontext_destroy(dctx);
}
+8
View File
@@ -3277,6 +3277,10 @@ ns_statschannels_configure(ns_server_t *server, const cfg_obj_t *config,
ISC_LIST_INIT(new_listeners);
#ifdef HAVE_LIBXML2
xmlInitThreads();
#endif /* HAVE_LIBXML2 */
/*
* Get the list of named.conf 'statistics-channels' statements.
*/
@@ -3409,6 +3413,10 @@ ns_statschannels_shutdown(ns_server_t *server) {
ISC_LIST_UNLINK(server->statschannels, listener, link);
shutdown_listener(listener);
}
#ifdef HAVE_LIBXML2
xmlCleanupThreads();
#endif /* HAVE_LIBXML2 */
}
isc_result_t
+2
View File
@@ -17,7 +17,9 @@
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#if HAVE_DLFCN_H
#include <dlfcn.h>
#endif
#include <dns/log.h>
#include <dns/result.h>
+10
View File
@@ -44,6 +44,11 @@
<Filter>Source Files</Filter>
</ClCompile>
@END GEOIP
@IF GEOIPLEGACY
<ClCompile Include="..\geoip.c">
<Filter>Source Files</Filter>
</ClCompile>
@END GEOIPLEGACY
<ClCompile Include="..\interfacemgr.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -141,6 +146,11 @@
<Filter>Header Files</Filter>
</ClInclude>
@END GEOIP
@IF GEOIPLEGACY
<ClInclude Include="..\include\named\geoip.h">
<Filter>Header Files</Filter>
</ClInclude>
@END GEOIPLEGACY
<ClInclude Include="..\include\named\globals.h">
<Filter>Header Files</Filter>
</ClInclude>
+10 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{723C65DA-A96C-4BA3-A34E-44F11CA346F9}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>named</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -110,6 +113,9 @@
@IF GEOIP
<ClCompile Include="..\geoip.c" />
@END GEOIP
@IF GEOIPLEGACY
<ClCompile Include="..\geoip.c" />
@END GEOIPLEGACY
<ClCompile Include="..\interfacemgr.c" />
<ClCompile Include="..\listenlist.c" />
<ClCompile Include="..\log.c" />
@@ -146,6 +152,9 @@
@IF GEOIP
<ClInclude Include="..\include\named\geoip.h" />
@END GEOIP
@IF GEOIPLEGACY
<ClInclude Include="..\include\named\geoip.h" />
@END GEOIPLEGACY
<ClInclude Include="..\include\named\globals.h" />
<ClInclude Include="..\include\named\interfacemgr.h" />
<ClInclude Include="..\include\named\listenlist.h" />
+1 -1
View File
@@ -82,7 +82,7 @@ ServiceControl(DWORD dwCtrlCode) {
case SERVICE_CONTROL_STOP:
ns_server_flushonshutdown(ns_g_server, true);
isc_app_shutdown();
UpdateSCM(SERVICE_STOPPED);
UpdateSCM(SERVICE_STOP_PENDING);
break;
default:
break;
+12 -2
View File
@@ -113,6 +113,16 @@ ns_os_init(const char *progname) {
* ntservice_init();
*/
version_check(progname);
/*
* If running in a Cygwin environment, clear the SEM_NOGPFAULTERRORBOX
* bit in the process error mode to prevent Cygwin from concealing
* non-abort() crashes, giving Windows Error Reporting a chance to
* handle such crashes. This is done to ensure all crashes triggered
* by system tests can be detected.
*/
if (getenv("CYGWIN") != NULL) {
SetErrorMode(SetErrorMode(0) & ~SEM_NOGPFAULTERRORBOX);
}
}
void
@@ -350,9 +360,9 @@ ns_os_shutdown(void) {
if (lockfilefd != -1) {
(void) UnlockFile((HANDLE) _get_osfhandle(lockfilefd),
0, 0, 0, 1);
close(lockfilefd);
lockfilefd = -1;
}
cleanup_lockfile();
ntservice_shutdown(); /* This MUST be the last thing done */
}
+66 -40
View File
@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id$ */
#include <config.h>
#include <inttypes.h>
@@ -797,11 +795,13 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
question_rdataset = ISC_LIST_HEAD(question_name->list);
question_class = question_rdataset->rdclass;
INSIST(question_rdataset->type == reqtype);
if (ISC_LIST_NEXT(question_rdataset, link) != NULL)
if (ISC_LIST_NEXT(question_rdataset, link) != NULL) {
FAILC(DNS_R_FORMERR, "multiple questions");
}
result = dns_message_nextname(request, DNS_SECTION_QUESTION);
if (result != ISC_R_NOMORE)
if (result != ISC_R_NOMORE) {
FAILC(DNS_R_FORMERR, "multiple questions");
}
result = dns_zt_find(client->view->zonetable, question_name, 0, NULL,
&zone);
@@ -880,8 +880,9 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
/*
* Ignore data whose owner name is not the zone apex.
*/
if (! dns_name_equal(soa_name, question_name))
if (! dns_name_equal(soa_name, question_name)) {
continue;
}
for (soa_rdataset = ISC_LIST_HEAD(soa_name->list);
soa_rdataset != NULL;
@@ -890,25 +891,29 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
/*
* Ignore non-SOA data.
*/
if (soa_rdataset->type != dns_rdatatype_soa)
if (soa_rdataset->type != dns_rdatatype_soa) {
continue;
if (soa_rdataset->rdclass != question_class)
}
if (soa_rdataset->rdclass != question_class) {
continue;
}
CHECK(dns_rdataset_first(soa_rdataset));
dns_rdataset_current(soa_rdataset, &soa_rdata);
result = dns_rdataset_next(soa_rdataset);
if (result == ISC_R_SUCCESS)
if (result == ISC_R_SUCCESS) {
FAILC(DNS_R_FORMERR,
"IXFR authority section "
"has multiple SOAs");
}
have_soa = true;
goto got_soa;
}
}
got_soa:
if (result != ISC_R_NOMORE)
if (result != ISC_R_NOMORE) {
CHECK(result);
}
xfrout_log1(client, question_name, question_class, ISC_LOG_DEBUG(6),
"%s authority section OK", mnemonic);
@@ -928,8 +933,9 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
* AXFR over UDP is not possible.
*/
if (reqtype == dns_rdatatype_axfr &&
(client->attributes & NS_CLIENTATTR_TCP) == 0)
(client->attributes & NS_CLIENTATTR_TCP) == 0) {
FAILC(DNS_R_FORMERR, "attempted AXFR over UDP");
}
/*
* Look up the requesting server in the peer table.
@@ -940,8 +946,9 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
/*
* Decide on the transfer format (one-answer or many-answers).
*/
if (peer != NULL)
if (peer != NULL) {
(void)dns_peer_gettransferformat(peer, &format);
}
/*
* Get a dynamically allocated copy of the current SOA.
@@ -954,21 +961,27 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
current_serial = dns_soa_getserial(&current_soa_tuple->rdata);
if (reqtype == dns_rdatatype_ixfr) {
bool provide_ixfr;
/*
* Outgoing IXFR may have been disabled for this peer
* or globally.
*/
provide_ixfr = client->view->provideixfr;
if (peer != NULL)
(void) dns_peer_getprovideixfr(peer, &provide_ixfr);
if (provide_ixfr == false)
goto axfr_fallback;
if ((client->attributes & NS_CLIENTATTR_TCP) != 0) {
bool provide_ixfr;
if (! have_soa)
provide_ixfr = client->view->provideixfr;
if (peer != NULL) {
(void) dns_peer_getprovideixfr(peer,
&provide_ixfr);
}
if (provide_ixfr == false) {
goto axfr_fallback;
}
}
if (! have_soa) {
FAILC(DNS_R_FORMERR,
"IXFR request missing SOA");
}
begin_serial = dns_soa_getserial(&soa_rdata);
@@ -991,16 +1004,16 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
goto have_stream;
}
journalfile = is_dlz ? NULL : dns_zone_getjournal(zone);
if (journalfile != NULL)
if (journalfile != NULL) {
result = ixfr_rrstream_create(mctx,
journalfile,
begin_serial,
current_serial,
&data_stream);
else
} else {
result = ISC_R_NOTFOUND;
if (result == ISC_R_NOTFOUND ||
result == ISC_R_RANGE) {
}
if (result == ISC_R_NOTFOUND || result == ISC_R_RANGE) {
xfrout_log1(client, question_name, question_class,
ISC_LOG_DEBUG(4),
"IXFR version not in journal, "
@@ -1033,7 +1046,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
if (is_dlz)
if (is_dlz) {
CHECK(xfrout_ctx_create(mctx, client, request->id,
question_name, reqtype, question_class,
zone, db, ver, quota, stream,
@@ -1045,7 +1058,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
(format == dns_many_answers) ?
true : false,
&xfr));
else
} else {
CHECK(xfrout_ctx_create(mctx, client, request->id,
question_name, reqtype, question_class,
zone, db, ver, quota, stream,
@@ -1057,6 +1070,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
(format == dns_many_answers) ?
true : false,
&xfr));
}
xfr->mnemonic = mnemonic;
stream = NULL;
@@ -1064,24 +1078,26 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
CHECK(xfr->stream->methods->first(xfr->stream));
if (xfr->tsigkey != NULL)
if (xfr->tsigkey != NULL) {
dns_name_format(&xfr->tsigkey->name, keyname, sizeof(keyname));
else
} else {
keyname[0] = '\0';
if (is_poll)
}
if (is_poll) {
xfrout_log1(client, question_name, question_class,
ISC_LOG_DEBUG(1), "IXFR poll up to date%s%s",
(xfr->tsigkey != NULL) ? ": TSIG " : "", keyname);
else if (is_ixfr)
} else if (is_ixfr) {
xfrout_log1(client, question_name, question_class,
ISC_LOG_INFO, "%s started%s%s (serial %u -> %u)",
mnemonic, (xfr->tsigkey != NULL) ? ": TSIG " : "",
keyname, begin_serial, current_serial);
else
} else {
xfrout_log1(client, question_name, question_class,
ISC_LOG_INFO, "%s started%s%s (serial %u)",
mnemonic, (xfr->tsigkey != NULL) ? ": TSIG " : "",
keyname, current_serial);
}
if (zone != NULL) {
@@ -1098,8 +1114,9 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
client->expire = secs - client->now;
}
}
if (raw != NULL)
if (raw != NULL) {
dns_zone_detach(&raw);
}
}
/*
@@ -1113,24 +1130,33 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
result = ISC_R_SUCCESS;
failure:
if (result == DNS_R_REFUSED)
if (result == DNS_R_REFUSED) {
inc_stats(zone, dns_nsstatscounter_xfrrej);
if (quota != NULL)
}
if (quota != NULL) {
isc_quota_detach(&quota);
if (current_soa_tuple != NULL)
}
if (current_soa_tuple != NULL) {
dns_difftuple_free(&current_soa_tuple);
if (stream != NULL)
}
if (stream != NULL) {
stream->methods->destroy(&stream);
if (soa_stream != NULL)
}
if (soa_stream != NULL) {
soa_stream->methods->destroy(&soa_stream);
if (data_stream != NULL)
}
if (data_stream != NULL) {
data_stream->methods->destroy(&data_stream);
if (ver != NULL)
}
if (ver != NULL) {
dns_db_closeversion(db, &ver, false);
if (db != NULL)
}
if (db != NULL) {
dns_db_detach(&db);
if (zone != NULL)
}
if (zone != NULL) {
dns_zone_detach(&zone);
}
/* XXX kludge */
if (xfr != NULL) {
xfrout_fail(xfr, result, "setting up zone transfer");
+31 -35
View File
@@ -560,7 +560,8 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
RETERR(dns_db_create(mctx, dbtype, dns_zone_getorigin(zone),
dns_dbtype_stub, dns_zone_getclass(zone),
0, NULL, &db));
dns_zone_setdb(zone, db);
dns_rdataset_init(&rdataset);
dns_rdatalist_init(&rdatalist_ns);
rdatalist_ns.rdclass = dns_zone_getclass(zone);
@@ -582,23 +583,19 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
result = cfg_map_get(zconfig, "server-addresses", &obj);
if (result == ISC_R_SUCCESS) {
INSIST(obj != NULL);
result = configure_staticstub_serveraddrs(obj, zone,
&rdatalist_ns,
&rdatalist_a,
&rdatalist_aaaa);
if (result != ISC_R_SUCCESS)
goto cleanup;
CHECK(configure_staticstub_serveraddrs(obj, zone,
&rdatalist_ns,
&rdatalist_a,
&rdatalist_aaaa));
}
obj = NULL;
result = cfg_map_get(zconfig, "server-names", &obj);
if (result == ISC_R_SUCCESS) {
INSIST(obj != NULL);
result = configure_staticstub_servernames(obj, zone,
&rdatalist_ns,
zname);
if (result != ISC_R_SUCCESS)
goto cleanup;
CHECK(configure_staticstub_servernames(obj, zone,
&rdatalist_ns,
zname));
}
/*
@@ -619,34 +616,26 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
* First open a new version for the add operation and get a pointer
* to the apex node (all RRs are of the apex name).
*/
result = dns_db_newversion(db, &dbversion);
if (result != ISC_R_SUCCESS)
goto cleanup;
CHECK(dns_db_newversion(db, &dbversion));
dns_name_init(&apexname, NULL);
dns_name_clone(dns_zone_getorigin(zone), &apexname);
result = dns_db_findnode(db, &apexname, false, &apexnode);
if (result != ISC_R_SUCCESS)
goto cleanup;
CHECK(dns_db_findnode(db, &apexname, false, &apexnode));
/* Add NS RRset */
dns_rdataset_init(&rdataset);
RUNTIME_CHECK(dns_rdatalist_tordataset(&rdatalist_ns, &rdataset)
== ISC_R_SUCCESS);
result = dns_db_addrdataset(db, apexnode, dbversion, 0, &rdataset,
0, NULL);
CHECK(dns_db_addrdataset(db, apexnode, dbversion, 0, &rdataset,
0, NULL));
dns_rdataset_disassociate(&rdataset);
if (result != ISC_R_SUCCESS)
goto cleanup;
/* Add glue A RRset, if any */
if (!ISC_LIST_EMPTY(rdatalist_a.rdata)) {
RUNTIME_CHECK(dns_rdatalist_tordataset(&rdatalist_a, &rdataset)
== ISC_R_SUCCESS);
result = dns_db_addrdataset(db, apexnode, dbversion, 0,
&rdataset, 0, NULL);
CHECK(dns_db_addrdataset(db, apexnode, dbversion, 0,
&rdataset, 0, NULL));
dns_rdataset_disassociate(&rdataset);
if (result != ISC_R_SUCCESS)
goto cleanup;
}
/* Add glue AAAA RRset, if any */
@@ -654,22 +643,29 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
RUNTIME_CHECK(dns_rdatalist_tordataset(&rdatalist_aaaa,
&rdataset)
== ISC_R_SUCCESS);
result = dns_db_addrdataset(db, apexnode, dbversion, 0,
&rdataset, 0, NULL);
CHECK(dns_db_addrdataset(db, apexnode, dbversion, 0,
&rdataset, 0, NULL));
dns_rdataset_disassociate(&rdataset);
if (result != ISC_R_SUCCESS)
goto cleanup;
}
dns_db_closeversion(db, &dbversion, true);
dns_zone_setdb(zone, db);
result = ISC_R_SUCCESS;
cleanup:
if (apexnode != NULL)
if (dns_rdataset_isassociated(&rdataset)) {
dns_rdataset_disassociate(&rdataset);
}
if (apexnode != NULL) {
dns_db_detachnode(db, &apexnode);
if (dbversion != NULL)
dns_db_closeversion(db, &dbversion, true);
if (db != NULL)
}
if (dbversion != NULL) {
dns_db_closeversion(db, &dbversion, false);
}
if (db != NULL) {
dns_db_detach(&db);
}
for (i = 0; rdatalists[i] != NULL; i++) {
while ((rdata = ISC_LIST_HEAD(rdatalists[i]->rdata)) != NULL) {
ISC_LIST_UNLINK(rdatalists[i]->rdata, rdata, link);
+1 -3
View File
@@ -7,8 +7,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: Makefile.in,v 1.36 2009/12/05 23:31:40 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
@@ -29,7 +27,7 @@ CDEFINES = -DVERSION=\"${VERSION}\" @CRYPTO@ @USE_GSSAPI@
CWARNINGS =
LWRESLIBS = ../../lib/lwres/liblwres.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCLIBS = ../../lib/isc/libisc.@A@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@
+31
View File
@@ -33,6 +33,7 @@
#include <isc/log.h>
#include <isc/mem.h>
#include <isc/parseint.h>
#include <isc/portset.h>
#include <isc/print.h>
#include <isc/random.h>
#include <isc/region.h>
@@ -850,6 +851,34 @@ shutdown_program(isc_task_t *task, isc_event_t *event) {
maybeshutdown();
}
/*
* Try honoring the operating system's preferred ephemeral port range.
*/
static void
set_source_ports(dns_dispatchmgr_t *manager) {
isc_portset_t *v4portset = NULL, *v6portset = NULL;
in_port_t udpport_low, udpport_high;
isc_result_t result;
result = isc_portset_create(gmctx, &v4portset);
check_result(result, "isc_portset_create (v4)");
result = isc_net_getudpportrange(AF_INET, &udpport_low, &udpport_high);
check_result(result, "isc_net_getudpportrange (v4)");
isc_portset_addrange(v4portset, udpport_low, udpport_high);
result = isc_portset_create(gmctx, &v6portset);
check_result(result, "isc_portset_create (v6)");
result = isc_net_getudpportrange(AF_INET6, &udpport_low, &udpport_high);
check_result(result, "isc_net_getudpportrange (v6)");
isc_portset_addrange(v6portset, udpport_low, udpport_high);
result = dns_dispatchmgr_setavailports(manager, v4portset, v6portset);
check_result(result, "dns_dispatchmgr_setavailports");
isc_portset_destroy(gmctx, &v4portset);
isc_portset_destroy(gmctx, &v6portset);
}
static void
setup_system(void) {
isc_result_t result;
@@ -975,6 +1004,8 @@ setup_system(void) {
check_result(result, "dst_lib_init");
is_dst_up = true;
set_source_ports(dispatchmgr);
attrmask = DNS_DISPATCHATTR_UDP | DNS_DISPATCHATTR_TCP;
attrmask |= DNS_DISPATCHATTR_IPV4 | DNS_DISPATCHATTR_IPV6;
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{C41266C7-E27E-4D60-9815-82D3B32BF82F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>nsupdate</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+20 -11
View File
@@ -373,10 +373,12 @@ main(int argc, char *argv[]) {
switch (keyclass) {
case key_rsa:
op_type = OP_RSA;
if (expsize == 0)
if (expsize == 0) {
expsize = 3;
if (bits == 0)
}
if (bits == 0) {
usage();
}
mech.mechanism = CKM_RSA_PKCS_KEY_PAIR_GEN;
mech.pParameter = NULL;
@@ -389,9 +391,9 @@ main(int argc, char *argv[]) {
/* Set public exponent to F4 or F5 */
exponent[0] = 0x01;
exponent[1] = 0x00;
if (expsize == 3)
if (expsize == 3) {
exponent[2] = 0x01;
else {
} else {
exponent[2] = 0x00;
exponent[3] = 0x00;
exponent[4] = 0x01;
@@ -403,10 +405,15 @@ main(int argc, char *argv[]) {
public_template[RSA_PUBLIC_EXPONENT].ulValueLen = expsize;
break;
case key_ecc:
#if !defined(HAVE_PKCS11_ECDSA)
fprintf(stderr,
"prime256v1 and secp3841r1 are not supported\n");
usage();
#else
op_type = OP_EC;
if (bits == 0)
if (bits == 0) {
bits = 256;
else if (bits != 256 && bits != 384) {
} else if (bits != 256 && bits != 384) {
fprintf(stderr, "ECC keys only support bit sizes of "
"256 and 384\n");
exit(2);
@@ -429,7 +436,7 @@ main(int argc, char *argv[]) {
public_template[4].ulValueLen =
sizeof(pk11_ecc_secp384r1);
}
#endif
break;
case key_ecx:
#if !defined(CKM_EDDSA_KEY_PAIR_GEN)
@@ -437,9 +444,9 @@ main(int argc, char *argv[]) {
usage();
#else
op_type = OP_EC;
if (bits == 0)
if (bits == 0) {
bits = 256;
else if (bits != 256 && bits != 456) {
} else if (bits != 256 && bits != 456) {
fprintf(stderr, "ECX keys only support bit sizes of "
"256 and 456\n");
exit(2);
@@ -570,8 +577,9 @@ main(int argc, char *argv[]) {
pk11_result_register();
/* Initialize the CRYPTOKI library */
if (lib_name != NULL)
if (lib_name != NULL) {
pk11_set_lib_name(lib_name);
}
if (pin == NULL)
pin = getpassphrase("Enter Pin: ");
@@ -729,8 +737,9 @@ main(int argc, char *argv[]) {
if (rv != CKR_OK) {
fprintf(stderr, "C_GenerateKeyPair: Error = 0x%.8lX\n", rv);
error = 1;
} else if (!quiet)
} else if (!quiet) {
printf("Key pair generation complete.\n");
}
exit_params:
/* Free parameter attributes */
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{5B3137E5-7E1F-49AA-8810-A09AA417D326}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>pk11destroy</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{5042D371-0402-4FA3-A52A-769708694422}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>pk11keygen</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{C663B088-F7BC-4C8C-8D06-A76636EED651}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>pk11list</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{403FD4B1-A4F9-4159-9013-5860E3A4417D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>pk11tokens</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+9 -1
View File
@@ -37,7 +37,11 @@ class SECRR:
if not rrtext:
raise Exception
fields = rrtext.decode('ascii').split()
# 'str' does not have decode method in python3
if type(rrtext) is not str:
fields = rrtext.decode('ascii').split()
else:
fields = rrtext.split()
if len(fields) < 7:
raise Exception
@@ -99,6 +103,8 @@ def check(zone, args, masterfile=None, lookaside=None):
fp, _ = Popen(cmd, stdout=PIPE).communicate()
for line in fp.splitlines():
if type(line) is not str:
line = line.decode('ascii')
rrlist.append(SECRR(line, lookaside))
rrlist = sorted(rrlist, key=lambda rr: (rr.keyid, rr.keyalg, rr.hashalg))
@@ -120,6 +126,8 @@ def check(zone, args, masterfile=None, lookaside=None):
fp, _ = Popen(cmd, stdin=PIPE, stdout=PIPE).communicate(intods)
for line in fp.splitlines():
if type(line) is not str:
line = line.decode('ascii')
klist.append(SECRR(line, lookaside))
if len(klist) < 1:
+2
View File
@@ -43,6 +43,8 @@ class keyzone:
fp, _ = Popen([czpath, "-o", "-", name, filename],
stdout=PIPE, stderr=PIPE).communicate()
for line in fp.splitlines():
if type(line) is not str:
line = line.decode('ascii')
if re.search('^[:space:]*;', line):
continue
fields = line.split()
+1 -3
View File
@@ -7,8 +7,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: Makefile.in,v 1.49 2009/12/05 23:31:40 each Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
@@ -27,7 +25,7 @@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
+1 -1
View File
@@ -584,7 +584,7 @@ Delete a given TKEY\-negotiated key from the server\&. (This does not apply to s
.RS 4
List the names of all TSIG keys currently configured for use by
\fBnamed\fR
in each view\&. The list both statically configured keys and dynamic TKEY\-negotiated keys\&.
in each view\&. The list includes both statically configured keys and dynamic TKEY\-negotiated keys\&.
.RE
.PP
\fBvalidation ( on | off | status ) \fR\fB[\fIview \&.\&.\&.\fR]\fR\fB \fR
+1 -1
View File
@@ -936,7 +936,7 @@
<para>
List the names of all TSIG keys currently configured
for use by <command>named</command> in each view. The
list both statically configured keys and dynamic
list includes both statically configured keys and dynamic
TKEY-negotiated keys.
</para>
</listitem>
+1 -1
View File
@@ -787,7 +787,7 @@
<p>
List the names of all TSIG keys currently configured
for use by <span class="command"><strong>named</strong></span> in each view. The
list both statically configured keys and dynamic
list includes both statically configured keys and dynamic
TKEY-negotiated keys.
</p>
</dd>
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{39721F26-8B80-4AA9-9826-2AEF7322C3D5}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>rndc</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{7C8681A1-E3A8-470E-9EEF-16054D111A19}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>rndcutil</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+1 -1
View File
@@ -20,7 +20,7 @@ CDEFINES = @CRYPTO@
CWARNINGS =
BACKTRACECFLAGS = @BACKTRACECFLAGS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
+1 -1
View File
@@ -21,7 +21,7 @@ CDEFINES = @CRYPTO@ @USE_GSSAPI@
CWARNINGS =
BACKTRACECFLAGS = @BACKTRACECFLAGS@
DNSLIBS = ../../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCLIBS = ../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
ISCCFGLIBS = ../../../lib/isccfg/libisccfg.@A@
+3
View File
@@ -28,6 +28,9 @@
static isc_mem_t *mctx = NULL;
ISC_PLATFORM_NORETURN_PRE static inline void
fatal(const char *message) ISC_PLATFORM_NORETURN_POST;
static inline void
fatal(const char *message) {
fprintf(stderr, "%s\n", message);
+4 -4
View File
@@ -78,10 +78,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif
+4 -4
View File
@@ -78,10 +78,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif
+4 -4
View File
@@ -78,10 +78,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif
+4 -4
View File
@@ -78,10 +78,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif
+4 -4
View File
@@ -78,10 +78,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif

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