Commit graph

27176 commits

Author SHA1 Message Date
Ondřej Surý
fcd1569e2b Turn (int & flag) into (int & flag) != 0 when implicitly typed to bool
(cherry picked from commit b2b43fd235)
2018-11-08 14:37:14 +07:00
Ondřej Surý
b222783ae9 Add small tweaks to the code to fix compilation when ISC assertions are disabled
While implementing the new unit testing framework cmocka, it was found that the
BIND 9 code doesn't compile when assertions are disabled or replaced with any
function (such as mock_assert() from cmocka unit testing framework) that's not
directly recognized as assertion by the compiler.

This made the compiler to complain about blocks of code that was recognized as
unreachable before, but now it isn't.

The changes in this commit include:

* assigns default values to couple of local variables,
* moves some return statements around INSIST assertions,
* adds __builtin_unreachable(); annotations after some INSIST assertions,
* fixes one broken assertion (= instead of ==)

(cherry picked from commit fbd2e47f51)
2018-11-08 14:05:23 +07:00
Mark Andrews
f8620738e5 Merge branch 'wpk-get-rid-of-bashism-in-CDS-test-v9_12' into 'v9_12'
Small system tests fixes for Solaris

See merge request isc-projects/bind9!991
2018-11-07 20:32:50 -05:00
Witold Krecicki
070e4135c4 Remove unnecessary sed from autosign test
(cherry picked from commit 82dfb77328)
2018-11-08 12:19:57 +11:00
Witold Krecicki
f49bd1e77f Use 'local' variable in echo functions in tests
(cherry picked from commit 0949b1fe2c)
2018-11-08 12:19:51 +11:00
Witold Kręcicki
5d4074c4e4 Get rid of bashism in CDS test
(cherry picked from commit dbf2e7928e)
2018-11-08 12:14:31 +11:00
Mark Andrews
b7b668b463 Merge branch '653-idnout-only-on-tty-v9_12' into 'v9_12'
Enable idnout output only on tty, disable it when the stdout is not a tty

See merge request isc-projects/bind9!983
2018-11-06 19:40:43 -05:00
Ondřej Surý
71ae7caf56 Add CHANGES entry for GL #653
(cherry picked from commit 9c0c44405c)
2018-11-07 11:32:56 +11:00
Ondřej Surý
e484721209 Add release notes for IDN processing update
(cherry picked from commit 2a11a7dd29)
2018-11-07 11:32:56 +11:00
Ondřej Surý
9fe7963ec3 Update the IDN documentation for nslookup
(cherry picked from commit b659765869)
2018-11-07 11:32:56 +11:00
Ondřej Surý
a148af6728 Change the dig documentation
(cherry picked from commit 7697923eab)
2018-11-07 11:32:56 +11:00
Ondřej Surý
bee5674283 Update the idna tests for the new non-tty defaults
(cherry picked from commit e8c57a78aa)
2018-11-07 11:32:56 +11:00
Ondřej Surý
cd83fb94c6 Enable IDN processing (both idnin and idnout) only on tty, disable it when the stdout is not a tty
(cherry picked from commit 0e1bf7d017)
2018-11-06 17:10:09 +11:00
Mark Andrews
8dcaf90874 Merge branch '601-build-option-with-python-should-default-to-yes-v9_12' into 'v9_12'
Resolve "Build option --with-python should default to yes"

See merge request isc-projects/bind9!981
2018-11-06 00:51:44 -05:00
Mark Andrews
7e32115c12 require python to be explicitly disabled
(cherry picked from commit bf8746126c)
2018-11-06 16:42:45 +11:00
Mark Andrews
5252e38acd Merge branch '617-if-rrl-is-configured-the-require-server-cookie-yes-is-ignored-v9_12' into 'v9_12'
Resolve "If RRL is configured the "require-server-cookie yes;" is ignored."

See merge request isc-projects/bind9!977
2018-11-05 18:35:26 -05:00
Mark Andrews
48c6914639 add CHANGES note
(cherry picked from commit a868f335d2)
2018-11-06 10:22:32 +11:00
Mark Andrews
ce80d59e97 test require-server-cookie with rate-limit
(cherry picked from commit 164370102a)
2018-11-06 10:20:43 +11:00
Mark Andrews
5d1244a831 check requireservercookie even if rrl is configured
(cherry picked from commit d6f6eeda9d)
2018-11-06 10:20:43 +11:00
Michał Kępień
97e58eb233 Merge branch '611-extend-serve-stale-tests-v9_12' into 'v9_12'
[v9_12] Extend serve-stale tests

See merge request isc-projects/bind9!964
2018-10-31 09:26:46 -04:00
Michał Kępień
a0c5c01fe5 Check serve-stale behavior with a cold cache
Ensure that serve-stale works as expected when returning stale answers
is enabled, the authoritative server does not respond, and there is no
cached answer available.

(cherry picked from commit 27cfe83a38)
2018-10-31 14:08:44 +01:00
Michał Kępień
9fe44e48b2 Check TTL of stale answers
Make sure that stale answers returned when the serve-stale feature is
enabled have a TTL matching the value of the stale-answer-ttl setting.

(cherry picked from commit 893ab37ce7)
2018-10-31 14:08:43 +01:00
Mark Andrews
0cd60f604c Merge branch '649-resolver-test-failing-v9_12' into 'v9_12'
Resolve "resolver test failing"

See merge request isc-projects/bind9!960
2018-10-31 01:49:41 -04:00
Mark Andrews
86176a9153 use new packet for response; rename variable to request and response
(cherry picked from commit 280d0ca507)
2018-10-31 16:36:34 +11:00
Evan Hunt
806a781638 Merge branch 'silence-warning-v9_12' into 'v9_12'
silence warning from missing print.h

See merge request isc-projects/bind9!956
2018-10-30 11:09:57 -04:00
Evan Hunt
d99a9db93a silence warning from missing print.h
(cherry picked from commit a0de6707c0)
2018-10-30 08:09:28 -07:00
Michał Kępień
4b26b9fe74 Merge branch '644-fix-isc_buffer_copyregion-for-auto-reallocated-buffers-v9_12' into 'v9_12'
[v9_12] Fix isc_buffer_copyregion() for auto-reallocated buffers

See merge request isc-projects/bind9!950
2018-10-30 08:52:27 -04:00
Michał Kępień
4447d5e317 Add CHANGES entry
5072.	[bug]		Add unit tests for isc_buffer_copyregion() and fix its
			behavior for auto-reallocated buffers. [GL #644]

(cherry picked from commit 07050fb49a)
2018-10-30 13:33:43 +01:00
Michał Kępień
a21c1aacdf Fix isc_buffer_copyregion() for auto-reallocated buffers
While isc_buffer_copyregion() calls isc_buffer_reserve() to ensure the
target buffer will have enough available space to append the contents of
the source region to it, the variables used for subsequently checking
available space are not updated accordingly after that call.  This
prevents isc_buffer_copyregion() from working as expected for
auto-reallocated buffers: ISC_R_NOSPACE will be returned if enough space
is not already available in the target buffer before it is reallocated.
Fix by calling isc_buffer_used() and isc_buffer_availablelength()
directly instead of assigning their return values to local variables.

(cherry picked from commit e1f0aed034)
2018-10-30 13:33:42 +01:00
Michał Kępień
72caf33ffb Add unit tests for isc_buffer_copyregion()
Add some basic checks for isc_buffer_copyregion() to ensure it behaves
as expected for both fixed-size buffers and buffers which can be
automatically reallocated.  Adjust the list of headers included by
lib/isc/tests/buffer_test.c so that it matches what that test program
really uses.

(cherry picked from commit 15440d8027)
2018-10-30 13:33:42 +01:00
Ondřej Surý
bc5d26a8fe Merge branch 'ondrej/cleanup-leftover-fatal-v9_12' into 'v9_12'
(v9_12) Remove double result check leftover

See merge request isc-projects/bind9!947
2018-10-30 08:08:30 -04:00
Ondřej Surý
6062d370b6 Remove double result check leftover
(cherry picked from commit 065ff16e40)
2018-10-30 12:59:21 +01:00
Witold Krecicki
2bbdf344e4 Merge branch 'wpk-fix-race-in-rpz-with-min-update-interval-0-v9_12' into 'v9_12'
Fix race in rpz with min update interval 0 v9 12

See merge request isc-projects/bind9!943
2018-10-30 02:59:45 -04:00
Witold Kręcicki
c209bb1400 <stdlib.h> include in rpz.c for strtoul
(cherry picked from commit 8283cbabdc)
2018-10-30 06:51:47 +00:00
Michał Kępień
7258535655 Release all resources when shutting down an RPZ zone during an update
If an RPZ zone is to be freed during an update, canceling the
update_quantum() event is not enough because the resources released when
an update completes also need to be accounted for.  Failure to do this
results in a hang upon shutdown.  Fix by copying cleanup code from the
end of update_quantum() to rpz_detach().

(cherry picked from commit 139bc2c6ab)
2018-10-30 06:51:47 +00:00
Witold Kręcicki
384b3ef596 Fix a race in RPZ with min-update-interval set to 0
If another RPZ update is pending when processing the previous one nears
completion and min-update-interval is set to 0, isc_timer_reset() gets
called with 'interval' set to 0, which triggers an assertion failure.
To prevent such a scenario from causing a crash, queue the update event
directly instead of asking the timer thread to do it.

(cherry picked from commit faf2c7711a)
2018-10-30 06:51:40 +00:00
Mark Andrews
b79602e923 Merge branch '631-dns_rdata_compare-for-nxt-performs-case-sensitive-name-comparison-v9_12' into 'v9_12'
Resolve "dns_rdata_compare() for NXT performs case sensitive name comparison"

See merge request isc-projects/bind9!941
2018-10-30 00:17:34 -04:00
Mark Andrews
22feff0b62 add CHANGES note
(cherry picked from commit 921bc89f59)
2018-10-30 15:09:48 +11:00
Mark Andrews
7074cbdacd compare_nxt compared records with identical next fields case insensitively
(cherry picked from commit cf83016682)
2018-10-30 15:09:45 +11:00
Mark Andrews
a0ae166058 Merge branch 'move-declaration-of-pending' into 'v9_12'
move declaration of pending

See merge request isc-projects/bind9!939
2018-10-29 20:53:54 -04:00
Mark Andrews
bc53e5e5d4 move declaration of pending 2018-10-30 11:51:38 +11:00
Mark Andrews
6768053022 Merge branch '638-record-types-with-empty-rdata-fields-were-not-being-handled-correctly-v9_12' into 'v9_12'
Resolve "Record types with empty rdata fields were not being handled correctly."

See merge request isc-projects/bind9!937
2018-10-29 20:25:19 -04:00
Mark Andrews
d09955736a document eol
(cherry picked from commit 97a680e5ce)
2018-10-30 11:16:49 +11:00
Mark Andrews
dce7bb3f82 Record types which support a empty rdata field were not handling the empty rdata field case.
(cherry picked from commit 2ff57d8a39)
2018-10-30 11:16:43 +11:00
Evan Hunt
17e574293d Merge branch '641-unquoted-rpz-v9_12' into 'v9_12'
allow unquoted response-policy zone names

See merge request isc-projects/bind9!934
2018-10-29 13:07:23 -04:00
Evan Hunt
aa797579ef allow unquoted response-policy zone names
(cherry picked from commit 507230aa88)
2018-10-29 09:59:44 -07:00
Mark Andrews
8da6a31497 Merge branch '635-unchecked-return-in-query-c-v9_12' into 'v9_12'
Resolve "unchecked return in query.c"

See merge request isc-projects/bind9!930
2018-10-29 03:33:41 -04:00
Mark Andrews
18e7934959 always call RUNTIME_CHECK(result == ISC_R_SUCCESS); for dns_rdata_tostruct
(cherry picked from commit e11cfafff2)
2018-10-29 18:25:57 +11:00
Mark Andrews
d8485aeee3 Merge branch '553-socket-c-2171-unexpected-error-v9_12' into 'v9_12'
Only set IPV6_USE_MIN_MTU on IPv6.

See merge request isc-projects/bind9!928
2018-10-29 02:39:18 -04:00
Mark Andrews
7ccca052c0 Only set IPV6_USE_MIN_MTU on IPv6.
(cherry picked from commit 561b780ba0)
2018-10-29 17:28:57 +11:00