Commit Graph

34378 Commits

Author SHA1 Message Date
JINMEI Tatuya
66cfaf0fb0 corrected the opcode param to opcode_totext
(cherry picked from commit 2b81a69659)
2022-06-14 12:07:39 +10:00
Petr Špaček
5c327f209b Merge branch 'pspacek/keyfromlabel-doc-alg-clarif-v9_16' into 'v9_16'
Clarify dnssec-keyfromlabel -a in man page [v9_16]

See merge request isc-projects/bind9!6415
2022-06-10 06:06:28 +00:00
Petr Špaček
f01f316268 Clarify dnssec-keyfromlabel -a in man page
(cherry picked from commit 5f53003dae)
2022-06-10 08:02:33 +02:00
Tom Krizek
27f383182b Merge branch 'tkrizek/python-codestyle-v9_16' into 'v9_16'
Enforce Python codestyle with black [v9_16]

See merge request isc-projects/bind9!6406
2022-06-08 12:03:50 +00:00
Tom Krizek
883b6c8c1e Remove flake8 linter for Python from CI
Python codestyle is now handled by black and other issues are checked by
pylint. Flake8 checking has been made redundant and is thus removed as
obsolete.

(cherry picked from commit dae340a4a5)
2022-06-08 13:44:23 +02:00
Tom Krizek
b3c7bd1c04 Auto-format Python files with black
This patch is strictly the result of:
$ black $(git ls-files '*.py' '*.py.in')

There have been no manual changes.
2022-06-08 13:34:19 +02:00
Tom Krizek
cf92d05908 Enforce Python codestyle with black
Black is an opinionated tool for auto-formatting Python code so we no
longer have to worry about the codestyle.

For the codestyle decisions and discussion, refer to the upstream
documentation [1].

[1] https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html
2022-06-08 13:29:01 +02:00
Tom Krizek
8668c8c061 Remove trailing whitespace
My editor doesn't like that!

(cherry picked from commit 5d64d05be9)
2022-06-08 13:24:30 +02:00
Arаm Sаrgsyаn
983bd242b6 Merge branch '3380-catz-dont-cancel-processing-when-encountering-an-unexpected-rrtype-v9_16' into 'v9_16'
Resolve "member zones are deleted if RRsig appears in the catalog zone"

See merge request isc-projects/bind9!6355
2022-06-07 11:05:42 +00:00
Aram Sargsyan
87b3ced5fe Do not cancel processing record datasets in catalog zone after an error
When there are multiple record datasets in a database node of a catalog
zone, and BIND encounters a soft error during processing of a dataset,
it breaks from the loop and doesn't process the other datasets in the
node.

There are cases when this is not desired. For example, the catalog zones
draft version 5 states that there must be a TXT RRset named
`version.$CATZ` with exactly one RR, but it doesn't set a limitation
on possible non-TXT RRsets named `version.$CATZ` existing alongside
with the TXT one. In case when one exists, we will get a processing
error and will not continue the loop to process the TXT RRset coming
next.

Remove the "break" statement to continue processing all record datasets.

(cherry picked from commit 0b2d5490cd)
2022-06-07 09:59:32 +00:00
Matthijs Mekking
a0e05074fd Merge branch '3362-kasp-system-test-timing-issue-v9_16' into 'v9_16'
[v9_16] Fix another kasp test timing issue

See merge request isc-projects/bind9!6401
2022-06-07 09:11:07 +00:00
Matthijs Mekking
1dc36e2961 Retry quiet to deal with kasp test timing issue
In the cases where we test SOA serial updates and TTL updates, we check
if for "all zones loaded" to ensure the new zone content is loaded. But
this is the unsigned zone, the signed zone still needs to be produced.

There is thus a timing issue where the dig request comes in before
the signing process has finished.

Add a retry quiet to mitigate against it.

(cherry picked from commit 827bba05a0)
2022-06-07 09:38:06 +02:00
Petr Špaček
8f0682ecad Merge branch 'pspacek/danger-log-level-v9_16' into 'v9_16'
Flag new user-visible log messages for manual review [v9_16]

See merge request isc-projects/bind9!6393
2022-06-03 10:13:17 +00:00
Petr Špaček
ef8e3c72c6 Flag new user-visible log messages for review
Messages with log levels INFO or higher are flagged for manual review.
Purpose of this check is to prevent debug logs to being released with
too-high log level.

(cherry picked from commit b0f59cb5cb)
2022-06-03 12:12:37 +02:00
Michał Kępień
5636eca562 Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.16.31' into 'v9_16'
Set up version and release notes for BIND 9.16.31

See merge request isc-projects/bind9!6391
2022-06-03 09:27:05 +00:00
Michał Kępień
913c0b833c Set up release notes for BIND 9.16.31 2022-06-03 11:05:47 +02:00
Michał Kępień
531323877c Update BIND version to 9.16.31-dev 2022-06-03 11:05:47 +02:00
Petr Špaček
6fcc7bfe80 Merge branch 'pspacek/rtd-style-changes-v9_16' into 'v9_16'
ReadTheDocs style changes [v9_16]

See merge request isc-projects/bind9!6387
2022-06-02 15:30:26 +00:00
Petr Špaček
cc1599e454 ARM style change: render literals in black color
After enormous amount of bikesheding about colors we decided to override
ReadTheDocs default style for literals (``literal`` in the RST markup).

Justification:
- The default RTD "light red literal on white background" is hard to
  read.  https://webaim.org/resources/contrastchecker/ reports that text
  colored as rgb(231, 76, 60) on white background has insufficient
  contrast.
- The ARM has enormous amount of literals all over the place and thus
  one sentence can contain several black/red/black color changes. This
  is distracting. As a consequence, the ARM looks like a Geronimo
  Stilton book.

What we experimented with as replacements for red:
- Green - way too distracting
- Blue - too similar to "usual clickable link"
- Violet - too Geronimo Stilton style
- Brown - better but still distracting

After all the bikesheding we settled on black, i.e. the same as all
"normal" text. I.e. the color is now the same and literals are denoted
by monospaced font and a box around the literal. This has best contrast
and is way less distracting than it used to be.

This lead to a new problem: Internal references to "term definitions"
defined using directives like .. option:: were rendered almost the same
as literals:
- References: monospaced + box + bold + clickable
- Literals: monospaced + box To distinguish these two we added black
  dotted underline to clickable references.

I hereby declare the bikeshed painted.

(cherry picked from commit 833af31e7b)
2022-06-02 17:24:41 +02:00
Petr Špaček
dafacea24c Allow wrapping for ARM table content
RTD style default never wraps <th> and <td> elements and that just does
not work for real sentences or any other long lines.

We can reconsider styling some tables separately, but at the moment we
do not have use for tables with long but unwrappable lines so it's
easier to allow wrapping globally.

(cherry picked from commit a5dd98ac1b)
2022-06-02 17:24:39 +02:00
Arаm Sаrgsyаn
9fa26af659 Merge branch 'aram/catz-processing-skip-warnings-for-some-rrset-types-v9_16' into 'v9_16'
[v9_16] Don't process DNSSEC-related and ZONEMD records in catz

See merge request isc-projects/bind9!6384
2022-06-02 11:11:42 +00:00
Aram Sargsyan
a0121f4908 Add CHANGES and release note for [GL #3380]
(cherry picked from commit b8073cbe72)
2022-06-02 10:34:05 +00:00
Aram Sargsyan
1dc7288708 Don't process DNSSEC-related and ZONEMD records in catz
When processing a catalog zone update, skip processing records with
DNSSEC-related and ZONEMD types, because we are not interested in them
in the context of a catalog zone, and processing them will fail and
produce an unnecessary warning message.

(cherry picked from commit 73d6643137)
2022-06-02 10:33:03 +00:00
Mark Andrews
d34cc48045 Merge branch '3388-missing-indent-call-v9_16' into 'v9_16'
Add missing INDENT call for UPDATE messages [v9_16]

See merge request isc-projects/bind9!6381
2022-06-01 22:52:53 +00:00
Mark Andrews
b318db2b7f Add missing INDENT call for UPDATE messages
Reported by Peter <pmc@citylink.dinoex.sub.org> on bind-users.

(cherry picked from commit 03132c93ca)
2022-06-02 08:29:28 +10:00
Arаm Sаrgsyаn
73a3a1ad36 Merge branch 'aram/update-top-level-gitignore-add-ide-files-v9_16' into 'v9_16'
[v9_16] Update top-level .gitignore to ignore files generated by some IDEs

See merge request isc-projects/bind9!6376
2022-06-01 11:26:43 +00:00
Aram Sargsyan
46d6039e58 Update top-level .gitignore to ignore files generated by some IDEs
(cherry picked from commit ec3bc4142b)
2022-06-01 10:45:44 +00:00
Mark Andrews
219efa9d6f Merge branch '3345-fix-keyless-example-generation-v9_16' into 'v9_16'
Make modifications to keyless.example deterministic

See merge request isc-projects/bind9!6371
2022-06-01 01:03:53 +00:00
Mark Andrews
3183de20c3 Make modifications to keyless.example deterministic
The perl modifation code for keyless.example was not deterministic
(/NXT/ matched part of signature) resulting in different error
strings being returned.  Replaced /NXT/ with /A RRSIG NSEC/ and
updated expected error string,

(cherry picked from commit 69d5e22e58)
2022-06-01 10:42:55 +10:00
Mark Andrews
5c629e8a45 Merge branch '3368-trampoline-c-fatal-error-uv-h-file-not-found-on-bsd-when-json-c-is-disabled' into 'v9_16'
Resolve "trampoline.c: fatal error: 'uv.h' file not found on BSD when JSON-C is disabled"

See merge request isc-projects/bind9!6364
2022-05-31 12:42:25 +00:00
Mark Andrews
3292a54fed Add LIBUV_CFLAGS to CLINCLUDE in lib/isc/Makefile.in 2022-05-31 16:43:48 +10:00
Ondřej Surý
b9f035b8eb Merge branch 'ondrej-use-locked-queue-v9_16' into 'v9_16'
Replace netievent lock-free queue with simple locked queue [v9.16]

See merge request isc-projects/bind9!6357
2022-05-25 15:56:35 +00:00
Ondřej Surý
1c94d0ee6c Add CHANGES note for [GL #3180]
(cherry picked from commit d75b953489)
2022-05-25 16:01:58 +02:00
Ondřej Surý
32a3970b13 Replace netievent lock-free queue with simple locked queue
The current implementation of isc_queue uses Michael-Scott lock-free
queue that in turn uses hazard pointers.  It was discovered that the way
we use the isc_queue, such complicated mechanism isn't really needed,
because most of the time, we either execute the work directly when on
nmthread (in case of UDP) or schedule the work from the matching
nmthreads.

Replace the current implementation of the isc_queue with a simple locked
ISC_LIST.  There's a slight improvement - since copying the whole list
is very lightweight - we move the queue into a new list before we start
the processing and locking just for moving the queue and not for every
single item on the list.

NOTE: There's a room for future improvements - since we don't guarantee
the order in which the netievents are processed, we could have two lists
- one unlocked that would be used when scheduling the work from the
matching thread and one locked that would be used from non-matching
thread.

(cherry picked from commit 6bd025942c)
2022-05-25 16:01:58 +02:00
Ondřej Surý
5bed841c1c Merge branch '2801-unittest-isc-netmgr-s390x-v9_16' into 'v9_16'
Fix failures in isc netmgr_test on big endian machines

See merge request isc-projects/bind9!6354
2022-05-24 18:29:07 +00:00
Petr Menšík
1feb389f80 Fix failures in isc netmgr_test on big endian machines
Typing from libuv structure to isc_region_t is not possible, because
their sizes differ on 64 bit architectures. Little endian machines seems
to be lucky and still result in test passed. But big endian machine such
as s390x fails the test reliably.

Fix by directly creating the buffer as isc_region_t and skipping the
type conversion. More readable and still more correct.

(cherry picked from commit 057438cb45)
2022-05-24 20:23:04 +02:00
Matthijs Mekking
66ecde5b27 Merge branch '3354-cid-352776-missing_lock-v9_16' into 'v9_16'
[v9_16] Fix CID 352776: Concurrent data access violations

See merge request isc-projects/bind9!6345
2022-05-23 12:18:49 +00:00
Matthijs Mekking
d3147417c5 Require valid key for dst_key functions
Make sure that the key structure is valid when calling the following
functions:
- dst_key_setexternal
- dst_key_isexternal
- dst_key_setmodified
- dst_key_ismodified

This commit is adapted because 9.16 has a different approach
of deconsting the variable.

(cherry picked from commit 888ec4e0d4)
2022-05-23 12:31:23 +02:00
Matthijs Mekking
7c42c04f3f Fix CID 352776: Concurrent data access violations
*** CID 352776:  Concurrent data access violations  (MISSING_LOCK)
/lib/dns/dst_api.c: 474 in dst_key_setmodified()
468     dst_key_isexternal(dst_key_t *key) {
469		return (key->external);
470     }
471
472     void
473     dst_key_setmodified(dst_key_t *key, bool value) {
>>>     CID 352776:  Concurrent data access violations  (MISSING_LOCK)
>>>     Accessing "key->modified" without holding lock
>>>	"dst_key.mdlock". Elsewhere, "dst_key.modified" is accessed with
>>>	"dst_key.mdlock" held 8 out of 11 times (8 of these accesses
>>>	strongly imply that it is necessary).
474		key->modified = value;
475     }
476
477     bool
478     dst_key_ismodified(dst_key_t *key) {
479		return (key->modified);

(cherry picked from commit 1fa24d0afb)
2022-05-23 12:03:56 +02:00
Ondřej Surý
56adb30e23 Merge branch '3344-threadsanitizer-data-race-in-isc__nm_tcpdns_send-v9_16' into 'v9_16'
Move setting the sock->write_timeout to the async_*send [v9.16]

See merge request isc-projects/bind9!6342
2022-05-19 20:53:01 +00:00
Ondřej Surý
ed4eda5ebc Move setting the sock->write_timeout to the async_*send
Setting the sock->write_timeout from the TCP, TCPDNS, and TLSDNS send
functions could lead to (harmless) data race when setting the value for
the first time when the isc_nm_send() function would be called from
thread not-matching the socket we are sending to.  Move the setting the
sock->write_timeout to the matching async function which is always
called from the matching thread.

(cherry picked from commit 61117840c1)
2022-05-19 22:38:47 +02:00
Ondřej Surý
598c93f2b2 Merge branch '3371-check-for-__attribute__-fallthrough-support-is-sometimes-incorrect-v9_16' into 'v9_16'
Use C2x [[fallthrough]] when supported by LLVM/clang [v9.16]

See merge request isc-projects/bind9!6340
2022-05-19 20:35:26 +00:00
Ondřej Surý
4657b0f0c4 Use C2x [[fallthrough]] when supported by LLVM/clang
Clang added support for the gcc-style fallthrough
attribute (i.e. __attribute__((fallthrough))) in version 10.  However,
__has_attribute(fallthrough) will return 1 in C mode in older versions,
even though they only support the C++11 fallthrough attribute. At best,
the unsupported attribute is simply ignored; at worst, it causes errors.

The C2x fallthrough attribute has the advantages of being supported in
the broadest range of clang versions (added in version 9) and being easy
to check for support. Use C2x [[fallthrough]] attribute if possible, and
fall back to not using an attribute for clang versions that don't have
it.

Courtesy of Joshua Root

(cherry picked from commit 14c8d43863)
2022-05-19 22:02:07 +02:00
Michal Nowak
db5f8ebb6f Merge tag 'v9_16_29' into v9_16
BIND 9.16.29
2022-05-19 13:14:59 +02:00
Evan Hunt
17fd11edaf Merge branch '3350-rndc-dnssec-checkds-doc-v9_16' into 'v9_16'
specify time format in the documentation for 'rdnc dnssec -checkds'

See merge request isc-projects/bind9!6332
2022-05-18 22:49:56 +00:00
Evan Hunt
9aa68d0dd7 specify time format in the documentation for 'rdnc dnssec -checkds'
also clarified the writing in the surrounding paragraph.

(cherry picked from commit 83f9466d61)
2022-05-18 15:37:13 -07:00
Ondřej Surý
38b3d37475 Merge branch '3366-configure-fails-to-find-uv-h-on-bsd-v9_16' into 'v9_16'
Use libuv CFLAGS and LIBS when checking for features [v9.16]

See merge request isc-projects/bind9!6330
2022-05-18 19:55:03 +00:00
Ondřej Surý
b9e5b319db Use libuv CFLAGS and LIBS when checking for features
When autoconf was checking for libuv features, the LIBUV_CFLAGS was not
added to CFLAGS and LIBUV_LIBS to LIBS which resulted in false
negatives.

Use AX_SAVE_FLAGS and AX_RESTORE_FLAGS to temporarily add LIBUV_CFLAGS
and LIBUV_LIBS to their respective variables.

(cherry picked from commit f063ee276e)
2022-05-18 21:18:51 +02:00
Michal Nowak
3b6afee83b Merge branch 'mnowak/fix-typo-in-ednscompliance-test-v9_16' into 'v9_16'
[v9_16] Fix typo in ednscompliance test

See merge request isc-projects/bind9!6328
2022-05-18 17:30:20 +00:00
Michal Nowak
70c41c60b5 Fix typo in ednscompliance test
Caused by ba0313e649, an incomplete fix of
spelling errors.

(cherry picked from commit 9de2c06a21)
2022-05-18 19:19:48 +02:00