Commit Graph

28004 Commits

Author SHA1 Message Date
Witold Kręcicki
7562485282 libns: Rename ns_tcpconn refs member to clients 2019-11-06 21:32:54 +01:00
Witold Kręcicki
7d14ea3795 Limit query pipelining within each TCP connection
Previously, there was no limit to the number of concurrently served
queries over one pipelined TCP connection; an unlimited number of
queries sent over a single TCP connection could have potentially
exhausted the server's resources.
2019-11-06 21:32:54 +01:00
Michał Kępień
3b92b68d22 Merge branch '1298-do-not-use-sys-sysctl.h-on-linux-v9_11' into 'v9_11'
[v9_11] Do not use <sys/sysctl.h> on Linux

See merge request isc-projects/bind9!2546
2019-11-06 20:25:14 +00:00
Michał Kępień
4876a88fc0 Do not use <sys/sysctl.h> on Linux
glibc 2.30 deprecated the <sys/sysctl.h> header [1].  However, that
header is still used on other Unix-like systems, so only prevent it from
being used on Linux, in order to prevent compiler warnings from being
triggered.

[1] https://sourceware.org/ml/libc-alpha/2019-08/msg00029.html

(cherry picked from commit 65a8b53bd0)
2019-11-06 21:11:20 +01:00
Michał Kępień
55786b9755 Merge branch '1206-add-assert_int_equal-shell-function-v9_11' into 'v9_11'
[v9_11] Add assert_int_equal() shell function

See merge request isc-projects/bind9!2545
2019-11-06 20:10:33 +00:00
Michał Kępień
69697ee680 Add assert_int_equal() shell function
Add a shell function which is used in the "tcp" system test, but has
been accidentally omitted from !2425.  Make sure the function does not
change the value of "ret" itself, so that the caller can decide what to
do with the function's return value.

(cherry picked from commit 8bb7f1f2a1)
2019-11-06 21:07:02 +01:00
Michał Kępień
58df62baaf Merge branch '1206-fix-tcp-high-water-release-note-v9_11' into 'v9_11'
[v9_11] Fix TCP high-water release note

See merge request isc-projects/bind9!2544
2019-11-06 20:05:09 +00:00
Michał Kępień
689e648059 Fix TCP high-water release note
Add missing GitLab issue number to the TCP high-water release note.

(cherry picked from commit d0a3273d4d)
2019-11-06 21:00:28 +01:00
Michał Kępień
df8d60a7d5 Merge branch '664-fetches-per-server-quota-docs-v9_11' into 'v9_11'
[v9_11] Describe the polynomial backoff curve used in the quota adjustment

See merge request isc-projects/bind9!2543
2019-11-06 19:52:52 +00:00
Ondřej Surý
b154ef1f86 Describe the polynomial backoff curve used in the quota adjustment
(cherry picked from commit 56ef09c3a1)
2019-11-06 20:50:46 +01:00
Matthijs Mekking
edd73f91b2 Merge branch '1256-jitter-dynamically-updated-signatures-v9_11' into 'v9_11'
Resolve "Signature Expiration Jitter not working for dynamic NSEC3 zones"

See merge request isc-projects/bind9!2536
2019-11-06 15:52:21 +00:00
Matthijs Mekking
26252892b3 Update copyrights 2019-11-06 16:30:50 +01:00
Ondřej Surý
653da9d5e7 Add CHANGES 2019-11-06 16:30:50 +01:00
Matthijs Mekking
32b5cae3ee Test jitter distribution
Test jitter distribution in NSEC3 dynamic zone and for a zone that has old
signatures.  In both cases the generated signatures should be spread nicely.

(cherry picked from commit 540b90fd6c)
2019-11-06 16:30:50 +01:00
Witold Kręcicki
bc96d7b3bb Jitter signatures times when adding dynamic records.
When doing regular signing expiry time is jittered to make sure
that the re-signing times are not clumped together. This expands
this behaviour to expiry times of dynamically added records.

When incrementally re-signing a zone use the full jitter range if
the server appears to have been offline for greater than 5 minutes
otherwise use a small jitter range of 3600 seconds.  This will stop
the signatures becoming more clustered if the server has been off
line for a significant period of time (> 5 minutes).

Manually edits: resolve conflicts, replace isc_random_uniform
with isc_random_jitter.

(cherry picked from commit 6b2fd40269)
2019-11-06 16:30:50 +01:00
Ondřej Surý
0b340031fe Merge branch '1206-tcp-high-water-stats-release-notes-fix-v9_11' into 'v9_11'
Fix the xml:id in the 9.11.13 release notes

See merge request isc-projects/bind9!2538
2019-11-06 14:55:55 +00:00
Ondřej Surý
5713de6182 Fix xml:id for 9.11.13 release notes 2019-11-06 15:51:51 +01:00
Ondřej Surý
361371a2c0 Merge branch '1206-tcp-high-water-stats-v9_11' into 'v9_11'
Resolve "Customer Feature Request:  Add "high-water" measurement for tcp-clients"

See merge request isc-projects/bind9!2506
2019-11-06 12:20:16 +00:00
Diego Fronza
a1f081bb4b Added TCP high-water entry to CHANGES
(cherry picked from commit ba3fe75e65)
2019-11-06 12:54:40 +01:00
Diego Fronza
41f684819c Added TCP high-water entry to release notes
(cherry picked from commit dd492b64d9)
2019-11-06 12:54:40 +01:00
Ondřej Surý
55b0da1381 Backport isc_quota_getused() function 2019-11-06 12:54:40 +01:00
Ondřej Surý
e8bf3c60f2 Avoid an extra atomic_load() call 2019-11-06 12:54:40 +01:00
Diego Fronza
270af739a7 Added TCP high-water system tests
Note: ans6/ans6.py is a helper script that allows tests.sh to open/close
TCP connections to some BIND instance.

(cherry picked from commit 29be224a04)
2019-11-06 12:54:40 +01:00
Diego Fronza
4ad2ab54cd Added TCP high-water statistics variable
This variable will report the maximum number of simultaneous tcp clients
that BIND has served while running.

It can be verified by running rndc status, then inspect "tcp high-water:
count", or by generating statistics file, rndc stats, then inspect the
line with "TCP connection high-water" text.

The tcp-highwater variable is atomically updated based on an existing
tcp-quota system handled in ns/client.c.

(cherry picked from commit 66fe8627de)
2019-11-06 12:54:40 +01:00
Diego Fronza
5a9c5166ce Add functions for collecting high-water counters
Add {isc,ns}_stats_{update_if_greater,get_counter}() functions that
are used to set and collect high-water type of statistics.

(cherry picked from commit a544e2e300)
2019-11-06 12:35:33 +01:00
Diego Fronza
e4ebeff0e4 Change the isc_statscounter_t type from int to C99 int_fast64_t type
For TCP high-water work, we need to keep the used integer types widths
in sync.

Note: int_fast32_t is used on WIN32 platform
(cherry picked from commit 0fc98ef2d5)
2019-11-06 12:35:33 +01:00
Michał Kępień
2468817029 Merge branch 'michal/split-release-notes-into-per-version-sections-v9_11' into 'v9_11'
[v9_11] Split release notes into per-version sections

See merge request isc-projects/bind9!2534
2019-11-06 11:33:52 +00:00
Michał Kępień
169a142cfe Rebuild output files 2019-11-06 11:24:11 +01:00
Michał Kępień
f0f34839a4 Update URLs used in release notes
Some URLs used in release notes became outdated.  Make sure they point
to currently available resources.
2019-11-06 11:23:45 +01:00
Michał Kępień
c9530390dd Split release notes into per-version sections
Intertwining release notes from different BIND releases in a single XML
file has caused confusion in the past due to different (and often
arbitrary) approaches to keeping/removing release notes from older
releases on different BIND branches.  Divide doc/arm/notes.xml into
per-version sections to simplify determining the set of changes
introduced by a given release and to make adding/reviewing release notes
less error-prone.
2019-11-06 11:23:42 +01:00
Ondřej Surý
49547db798 Merge branch '1285-documentation-update-to-sortlist-feature-bugs-42615-v9_11' into 'v9_11'
arm: Add a sentence about overlaping selectors in sortlist statement

See merge request isc-projects/bind9!2533
2019-11-06 10:09:57 +00:00
Ondřej Surý
08249a7f57 arm: Add a sentence about overlaping selectors in sortlist statement
(cherry picked from commit ebc61946b2)
2019-11-06 11:08:59 +01:00
Mark Andrews
41cb1461aa Merge branch '1301-geoip2-default-data-path-v9_11' into 'v9_11'
Resolve "geoip2 default data path"

See merge request isc-projects/bind9!2527
2019-11-06 01:30:42 +00:00
Mark Andrews
517964c7a1 Add CHANGES note
(cherry picked from commit 7b10faf108)
2019-11-06 12:13:55 +11:00
Mark Andrews
0da1eb6bfd Regenerate configure.
(cherry picked from commit 51fb42edcb)
2019-11-06 12:13:36 +11:00
Mark Andrews
0e6259fd7b Have 'named -V' report geoip-directory
(cherry picked from commit 2eaa75c380)
2019-11-06 12:12:43 +11:00
Mark Andrews
7e79ebeeba The default geoip-directory should be <MAXMINDDB_PREFIX>/share/GeoIP
(cherry picked from commit fcd765a59d)
2019-11-06 11:50:09 +11:00
Mark Andrews
ee0a70a67f MAXMINDDB_LIBS should end with '/lib' not '/libs'
(cherry picked from commit e0fe33506c)
2019-11-06 11:50:04 +11:00
Ondřej Surý
d23b8915a7 Merge branch '45-integrate-llvm-scan-build-to-gitlab-ci-workflow-v9_11' into 'v9_11'
Resolve "Integrate LLVM scan-build to GitLab CI workflow"

See merge request isc-projects/bind9!2522
2019-11-05 22:34:38 +00:00
Ondřej Surý
178f2f8426 Initialize the sockaddr_in and sockaddr_in6 structures
This fixes two scan-build false positives:

context.c:441:23: warning: The left operand of '!=' is a garbage value
                    || sin.sin_port != htons(lwres_udp_port))
                       ~~~~~~~~~~~~ ^
context.c:447:25: warning: The left operand of '!=' is a garbage value
                    || sin6.sin6_port != htons(lwres_udp_port))
                       ~~~~~~~~~~~~~~ ^
2 warnings generated.

The sin and sin6 structures are used as argument to recvfrom call and
they are properly filled by the call.
2019-11-05 23:07:07 +01:00
Ondřej Surý
4e3d0cb7ac Remove a dead assignment
This fixes the following scan-build warning:

zt.c:325:12: warning: Value stored to 'zt' during its initialization is never read
        dns_zt_t *zt = params->zt;
                  ^~   ~~~~~~~~~~
1 warning generated.
2019-11-05 23:07:07 +01:00
Ondřej Surý
12f6a44256 Ensure name count stays positive in remove_nodes()
This fixes a scan-build false-positive:

rbt_test.c:914:8: warning: Assigned value is garbage or undefined
                node %= *names_count;
                     ^  ~~~~~~~~~~~~
1 warning generated.

The remove_nodes() function is always called with correct arguments
(num_names is in <1;*names_count> range), so the modulo by zero cannot
happen, but nevertheless scan-build detects this and it's easy to fix.
2019-11-05 23:07:07 +01:00
Mark Andrews
16ad444207 Record when querytsig is valid
(cherry picked from commit 4938f97c97)

This commit was cherry-picked from v9_14 and it fixes the following
scan-build warnings:

tsig.c:1030:20: warning: Assigned value is garbage or undefined
                        tsig.timesigned = querytsig.timesigned;
                                        ^ ~~~~~~~~~~~~~~~~~~~~
tsig.c:1092:26: warning: The right operand of '<' is a garbage value
                        if (response && bytes < querytsig.siglen)
                                              ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
2019-11-05 23:06:29 +01:00
Ondřej Surý
c1587e8587 libdns: add missing checks for return values in dnstap unit test
Related scan-build report:

dnstap_test.c:169:2: warning: Value stored to 'result' is never read
        result = dns_test_makeview("test", &view);
        ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dnstap_test.c:193:2: warning: Value stored to 'result' is never read
        result = dns_compress_init(&cctx, -1, dt_mctx);
        ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

(cherry picked from commit e9acad638e)
2019-11-05 09:53:18 +01:00
Ondřej Surý
d374009464 named: remove named_g_defaultdnstap global variable
The named_g_defaultdnstap was never used as the dnstap requires
explicit configuration of the output file.

Related scan-build report:

./server.c:3476:14: warning: Value stored to 'dpath' during its initialization is never read
        const char *dpath = named_g_defaultdnstap;
                    ^~~~~   ~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

(cherry picked from commit 6decd14592)
2019-11-05 09:52:52 +01:00
Ondřej Surý
9d0882168a tests: Resolve scan-build false positive by adding extra assertion
(cherry picked from commit 309dca417c)
2019-11-05 09:49:59 +01:00
Ondřej Surý
4cdcfc3f25 dnssec: don't qsort() empty hashlist
(cherry picked from commit 6bbb0b8e42)
2019-11-05 09:49:58 +01:00
Ondřej Surý
1968639776 named: Add INSIST() after bindkeysfile configuration load to silence scan-build FP
(cherry picked from commit 6bf364aec8)
2019-11-05 09:49:58 +01:00
Ondřej Surý
f1efd972ae tests: Workaround scan-build false positive with FD_ZERO/FD_SET
(cherry picked from commit 7aa7f8592c)
2019-11-05 09:49:57 +01:00
Ondřej Surý
0c277c7053 libdns: Remove useless checks for ISC_R_MEMORY, which cannot happen now
(cherry picked from commit 80b55d25de)
2019-11-05 09:49:57 +01:00