Commit Graph

27964 Commits

Author SHA1 Message Date
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
Ondřej Surý
f508126fc8 ci: Add LLVM/Clang scan-build checks into the GitLab CI
(cherry picked from commit 5f584310bc)
2019-11-05 09:49:56 +01:00
Michal Nowak
add1c6cb47 Merge branch 'mnowak/1244-extra-quotes-around-TESTSOCK6/9_11' into 'v9_11'
[9.11] digdelv: Extra quotes prevent IPv6 runs

See merge request isc-projects/bind9!2516
2019-11-01 10:05:27 +00:00
Michal Nowak
d7ad5d07ab digdelv: Extra quotes prevent IPv6 runs
Portion of the digdelv test are skipped on IPv6 due to extra quotes
around $TESTSOCK6: "I:digdelv:IPv6 unavailable; skipping".

Researched by @michal.

Regressed with 351efd8812.

(cherry picked from commit 1b6419f8a7)
2019-11-01 10:05:27 +00:00
Ondřej Surý
f4fcb9c051 Merge branch '876-documentation-feedback-v9_11' into 'v9_11'
Resolve "Documentation feedback."

See merge request isc-projects/bind9!2514
2019-10-31 10:30:38 -04:00
Ondřej Surý
2e48ce98e0 arm: add more text describing interaction between automatic-interface-scan and interface-interval
(cherry picked from commit e0618174b6)
2019-10-31 09:11:28 -05:00
Ondřej Surý
def91f10b8 arm: Fix the default for the lock-file command, it's 'none'
(cherry picked from commit f7eea400a8)
2019-10-31 09:11:28 -05:00
Brian Conry
af03546ede arm: Add an explanation on the effect of 'require-server-cookie yes;'
(cherry picked from commit c6f91f8bd0)
2019-10-31 09:11:27 -05:00
Mark Andrews
34de1b6e0e arm: add why when to set 'require-server-cookie yes;'
(cherry picked from commit c5453ea328)
2019-10-31 09:11:26 -05:00
Mark Andrews
bedefad22d arm: document resolver-nonbackoff-tries and resolver-retry-interval
(cherry picked from commit 1ea6aadf6f)
2019-10-31 09:11:26 -05:00
Mark Andrews
3e18044457 arm: add default values for require-server-cookie and send-cookie options
(cherry picked from commit d8abf4f5b6)
2019-10-31 09:11:25 -05:00
Michał Kępień
8736b918bf Merge branch '1059-prevent-tcp-failures-from-affecting-edns-stats-v9_11' into 'v9_11'
[v9_11] Prevent TCP failures from affecting EDNS stats

See merge request isc-projects/bind9!2512
2019-10-31 05:36:52 -04:00
Michał Kępień
bfe0fc65fd Add CHANGES entry
5310.	[bug]		TCP failures were affecting EDNS statistics. [GL #1059]

(cherry picked from commit 36d3c66e4e)
2019-10-31 09:55:29 +01:00
Michał Kępień
e6dd9db0e4 Prevent TCP failures from affecting EDNS stats
EDNS mechanisms only apply to DNS over UDP.  Thus, errors encountered
while sending DNS queries over TCP must not influence EDNS timeout
statistics.

(cherry picked from commit fce3c93ea2)
2019-10-31 09:55:06 +01:00
Michał Kępień
188bf16bf9 Merge branch 'michal/fix-copyrights' into 'v9_11'
[v9_11] Fix copyrights

See merge request isc-projects/bind9!2510
2019-10-31 04:49:40 -04:00
Michał Kępień
baee930ba5 Fix copyrights 2019-10-31 09:47:26 +01:00
Michał Kępień
9b269a1f65 Merge branch '1059-prevent-query-loops-for-misbehaving-servers-v9_11' into 'v9_11'
[v9_11] Prevent query loops for misbehaving servers

See merge request isc-projects/bind9!2509
2019-10-31 04:45:55 -04:00
Michał Kępień
a6331686a8 Prevent query loops for misbehaving servers
If a TCP connection fails while attempting to send a query to a server,
the fetch context will be restarted without marking the target server as
a bad one.  If this happens for a server which:

  - was already marked with the DNS_FETCHOPT_EDNS512 flag,
  - responds to EDNS queries with the UDP payload size set to 512 bytes,
  - does not send response packets larger than 512 bytes,

and the response for the query being sent is larger than 512 byes, then
named will pointlessly alternate between sending UDP queries with EDNS
UDP payload size set to 512 bytes (which are responded to with truncated
answers) and TCP connections until the fetch context retry limit is
reached.  Prevent such query loops by marking the server as bad for a
given fetch context if the advertised EDNS UDP payload size for that
server gets reduced to 512 bytes and it is impossible to reach it using
TCP.

(cherry picked from commit 6cd115994e)
2019-10-31 08:50:48 +01:00
Michał Kępień
a4adb63c19 Merge branch '1275-make-geoip-use-ecs-yes-work-for-geoip2' into 'v9_11'
Make "geoip-use-ecs yes;" work for GeoIP2

See merge request isc-projects/bind9!2476
2019-10-30 11:08:36 -04:00
Michał Kępień
17311442f7 Add CHANGES entry
5309.	[bug]		"geoip-use-ecs yes;" was not working for GeoIP2.
			[GL #1275]
2019-10-30 16:05:55 +01:00
Michał Kępień
a5f25f837f Make "geoip-use-ecs yes;" work for GeoIP2
Add a missing preprocessor condition to make "geoip-use-ecs yes;" work
for GeoIP2.
2019-10-30 16:05:28 +01:00
Mark Andrews
177f236437 Merge branch '1288-log-dns_r_unchanged-from-sync_secure_journal-at-info-level-in-receive_secure_serial-v9_11' into 'v9_11'
Resolve "Log DNS_R_UNCHANGED from sync_secure_journal at info level in receive_secure_serial."

See merge request isc-projects/bind9!2499
2019-10-29 21:48:44 -04:00
Mark Andrews
96f437a1bd add CHANGES
(cherry picked from commit e6ef7858c3)
2019-10-30 12:13:39 +11:00
Mark Andrews
5a28b235c8 Log DNS_R_UNCHANGED from sync_secure_journal() at info level in receive_secure_serial()
(cherry picked from commit 8eb09f3232)
2019-10-30 12:13:38 +11:00
Mark Andrews
c812e87294 Merge branch 'u/fanf2/compilezone-hang-v9_11' into 'v9_11'
Fix hang in `named-compilezone | head`

See merge request isc-projects/bind9!2497
2019-10-29 20:15:52 -04:00
Tony Finch
bfa1642cd4 CHANGES
(cherry picked from commit 548f29a4d9)
2019-10-30 10:54:30 +11:00
Tony Finch
5b4d12c407 Fix hang in named-compilezone | head
I was truncating zone files for experimental purposes when I found
that `named-compilezone | head` got stuck. The full command line that
exhibited the problem was:

	dig axfr dotat.at |
	named-compilezone -o /dev/stdout dotat.at /dev/stdin |
	head

This requires a large enough zone to exhibit the problem, more than
about 70000 bytes of plain text output from named-compilezone.
I was running the command on Debian Stretch amd64.

This was puzzling since it looked like something was suppressing the
SIGPIPE. I used `strace` to examine what was happening at the hang.
The program was just calling write() a lot to print the zone file, and
the last write() hanged until I sent it a SIGINT.

During some discussion with friends, Ian Jackson guessed that opening
/dev/stdout O_RDRW might be the problem, and after some tests we found
that this does in fact suppress SIGPIPE.

Since `named-compilezone` only needs to write to its output file, the
fix is to omit the stdio "+" update flag.

(cherry picked from commit a87ccea032)
2019-10-30 10:53:14 +11:00
Michał Kępień
063c600cbb Merge branch 'michal/add-centos-8-to-gitlab-ci-v9_11' into 'v9_11'
[v9_11] Add CentOS 8 to GitLab CI

See merge request isc-projects/bind9!2493
2019-10-29 04:22:35 -04:00
Michał Kępień
1fd47058dc Add CentOS 8 to GitLab CI
Ensure BIND can be tested on CentOS 8 in GitLab CI to more quickly catch
build and test errors on that operating system.

(cherry picked from commit dce1c05042)
2019-10-29 08:54:08 +01:00
Tinderbox User
5dfdc818d2 Merge branch 'v9_11_12' into v9_11 2019-10-24 05:58:38 +00:00
Mark Andrews
abaeba97f2 Merge branch '1281-dnstap-per-view-configuration-v9_11' into 'v9_11'
Resolve "dnstap per view configuration"

See merge request isc-projects/bind9!2480
2019-10-21 19:43:17 -04:00
Mark Andrews
6440183a4d add CHANGES
(cherry picked from commit 6ce1e2e731)
2019-10-22 10:28:16 +11:00
Mark Andrews
5f67de5b7b check for relationship between dnstap and dnstap-output seperately
(cherry picked from commit c2fcc9f16f)
2019-10-22 10:28:16 +11:00
Mark Andrews
e44f917e5e add more dnstap/dnstap-output combinations
(cherry picked from commit f3d53630c3)
2019-10-22 10:28:16 +11:00
Michał Kępień
aa18a87862 Merge branch 'michal/fix-gitlab-ci-for-v9_11' into 'v9_11'
Fix GitLab CI for v9_11

See merge request isc-projects/bind9!2475
2019-10-17 06:21:48 -04:00
Michał Kępień
af4bccd6a8 Revert "fix docs:sid:amd64: needs"
This reverts commit 26e802853e.
2019-10-17 12:07:31 +02:00
Ondřej Surý
6e78ede6cf Fix the triggering rule for autoreconf job (take 2)
(cherry picked from commit 3b339eb43f)
2019-10-17 12:05:55 +02:00
Ondřej Surý
0291dead5d Fix docs -> autoreconf dependencies in the .gitlab-ci.yml
(cherry picked from commit cc4c5482ef)
2019-10-17 12:05:48 +02:00
Michał Kępień
66f15af7e7 Merge branch 'michal/address-cppcheck-1.89-warnings-v9_11' into 'v9_11'
[v9_11] Address cppcheck 1.89 warnings

See merge request isc-projects/bind9!2474
2019-10-17 05:50:10 -04:00
Michał Kępień
cacba609c7 Suppress cppcheck 1.89 false positive
cppcheck 1.89 emits a false positive for lib/isc/sha1.c:

    lib/isc/sha1.c:273:16: error: Uninitialized variable: block [uninitvar]
     (void)memmove(block, buffer, 64);
                   ^
    lib/isc/sha1.c:272:10: note: Assignment 'block=&workspace', assigned value is <Uninit>
     block = &workspace;
             ^
    lib/isc/sha1.c:273:16: note: Uninitialized variable: block
     (void)memmove(block, buffer, 64);
                   ^

This message started appearing with cppcheck 1.89 [1], but it will be
gone in the next release [2], so just suppress it for the time being.

[1] af214e8212

[2] 2595b82634
2019-10-17 11:13:30 +02:00
Michał Kępień
cb982f9225 Merge branch 'michal/cleanup-with-cc-alg-remnants-v9_11' into 'v9_11'
[v9_11] Remove remnants of the --with-cc-alg option

See merge request isc-projects/bind9!2470
2019-10-15 16:35:14 -04:00