Commit Graph
29043 Commits
Author SHA1 Message Date
Diego Fronza 4fef8acbfa Adjusted additional system test (NS, non-root zone)
After the updates from this branch, BIND now sends glue records for
NS queries even when configured with minimal-responses yes.
2020-10-26 10:45:27 -03:00
Diego Fronza acef95ce44 Added test for the proposed fix
This test is very simple, two nameserver instances are created:
    - ns4: master, with 'minimal-responses yes', authoritative
        for example. zone
    - ns5: slave, stub zone

The first thing verified is the transfer of zone data from master
to slave, which should be saved in ns5/example.db.

After that, a query is issued to ns5 asking for target.example.
TXT, a record present in the master database with the "test" string
as content.

If that query works, it means stub zone successfully request
nameserver addresses from master, ns4.example. A/AAAA

The presence of both A/AAAA records for ns4 is also verified in the
stub zone local file, ns5/example.db.
2020-10-26 10:45:27 -03:00
Diego Fronza 07564aedcf Always return address records in additional section for NS queries 2020-10-26 10:45:27 -03:00
Diego Fronza 6b97de3813 Fix transfer of glue records in stub zones if master has minimal-responses set
Stub zones don't make use of AXFR/IXFR for the transfering of zone
data, instead, a single query is issued to the master asking for
their nameserver records (NS).

That works fine unless master is configured with 'minimal-responses'
set to yes, in which case glue records are not provided by master
in the answer with nameservers authoritative for the zone, leaving
stub zones with incomplete databases.

This commit fix this problem in a simple way, when the answer with
the authoritative nameservers is received from master (stub_callback),
for each nameserver listed (save_nsrrset), a A and AAAA records for
the name is verified in the additional section, and if not present
a query is created to resolve the corresponsing missing glue.

A struct 'stub_cb_args' was added to keep relevant information for
performing a query, like TSIG key, udp size, dscp value, etc, this
information is borrowed from, and created within function 'ns_query',
where the resolving of nameserver from master starts.

A new field was added to the struct 'dns_stub', an atomic integer,
namely pending_requests, which is used to keep how many queries are
created when resolving nameserver addresses that were missing in
the glue.

When the value of pending_requests is zero we know we can release
resources, adjust zone timers, dump to zone file, etc.
2020-10-26 10:45:27 -03:00
Mark Andrews 7995626ae9 Merge branch '2226-tsan-error-in-dispatch-c-v9_11' into 'v9_11'
Hold qid->lock when calling deref_portentry() as

See merge request isc-projects/bind9!4303
2020-10-23 21:39:06 +00:00
Mark Andrews 86d9d04fd8 Hold qid->lock when calling deref_portentry() as
socket_search() need portentry to be unchanging.

    WARNING: ThreadSanitizer: data race
    Write of size 8 at 0x000000000001 by thread T1 (mutexes: write M1):
    #0 deref_portentry lib/dns/dispatch.c:630
    #1 deactivate_dispsocket lib/dns/dispatch.c:861
    #2 udp_recv lib/dns/dispatch.c:1105
    #3 udp_exrecv lib/dns/dispatch.c:1028
    #4 dispatch lib/isc/task.c:1152
    #5 run lib/isc/task.c:1344
    #6 <null> <null>

    Previous read of size 8 at 0x000000000001 by thread T2 (mutexes: write M1, write M2):
    #0 socket_search lib/dns/dispatch.c:661
    #1 get_dispsocket lib/dns/dispatch.c:744
    #2 dns_dispatch_addresponse lib/dns/dispatch.c:3120
    #3 resquery_send lib/dns/resolver.c:2467
    #4 fctx_query lib/dns/resolver.c:2217
    #5 fctx_try lib/dns/resolver.c:4245
    #6 fctx_timeout lib/dns/resolver.c:4570
    #7 dispatch lib/isc/task.c:1152
    #8 run lib/isc/task.c:1344
    #9 <null> <null>

(cherry picked from commit 5c253c416d)
2020-10-24 08:23:31 +11:00
Mark Andrews bc3436c340 Merge branch '2215-dns_zoneflag_noixfr-is-misnamed-v9_11' into 'v9_11'
DNS_ZONEFLAG_NOIXFR should be DNS_ZONEFLG_NOIXFR

See merge request isc-projects/bind9!4301
2020-10-23 13:59:48 +00:00
Mark Andrews a2d2161be4 DNS_ZONEFLAG_NOIXFR should be DNS_ZONEFLG_NOIXFR
(cherry picked from commit 3a044444bd)
2020-10-24 00:29:07 +11:00
Michał Kępień ee3414b60b Merge branch 'michal/test-a-disable-atomic-build-in-gitlab-ci' into 'v9_11'
Test a --disable-atomic build in GitLab CI

See merge request isc-projects/bind9!4280
2020-10-22 13:08:48 +00:00
Michał Kępień 97fbd08f81 Test a --disable-atomic build in GitLab CI
Extend GitLab CI with build and test jobs utilizing the --disable-atomic
configure switch as it is used to work around broken atomics support in
certain build toolchains.
2020-10-22 15:03:31 +02:00
Michal Nowak 6d5a8be495 Merge branch '2218-ensure-use-of-echo_i-where-possible-in-system-tests-v9_11' into 'v9_11'
[v9_11] Ensure use of "echo_i" where possible

See merge request isc-projects/bind9!4291
2020-10-22 10:50:33 +00:00
Michal Nowak e0af53ac0f Ensure use of "echo_i" where possible
In many instances 'echo "I:' construct was used where echo_i function
should have been.
2020-10-22 12:16:24 +02:00
Michał Kępień 9cd810f3aa Merge branch 'v9_11_24-release' into 'v9_11'
Merge 9.11.24 release branch

See merge request isc-projects/bind9!4289
2020-10-22 07:29:52 +00:00
Michał Kępień f8119c27f0 Set up release notes for BIND 9.11.25 2020-10-22 09:27:36 +02:00
Michał Kępień 72786104c1 Bump BIND_BASELINE_VERSION for ABI checks 2020-10-22 09:27:36 +02:00
Michał Kępień b7e02857a6 Bump BIND_BASELINE_VERSION for respdiff tests 2020-10-22 09:27:36 +02:00
Tinderbox UserandMichał Kępień 4fc5607d52 Merge branch 'prep-release' into v9_11_24-release 2020-10-22 09:22:48 +02:00
Michał Kępień 4e9a2a7793 Merge branch 'michal/prepare-release-notes-for-bind-9.11.24' into 'v9_11_24-release'
Prepare release notes for BIND 9.11.24

See merge request isc-private/bind9!218
2020-10-22 09:22:48 +02:00
Tinderbox UserandMichał Kępień 6995173371 prep 9.11.24 2020-10-22 09:22:48 +02:00
Michał Kępień d5524cf332 Prepare release notes for BIND 9.11.24 2020-10-22 09:22:48 +02:00
Michał Kępień eef36e64e8 Tweak and reword release notes 2020-10-22 09:22:48 +02:00
Michał Kępień 8218d23eb0 Tweak and reword recent CHANGES entries 2020-10-22 09:22:48 +02:00
Diego dos Santos Fronza e79c001356 Merge branch '2195-freebsd-dnstap-system-test-failure-v9_11' into 'v9_11'
Fix dnstap system test on FreeBSD

See merge request isc-projects/bind9!4276
2020-10-20 14:32:48 +00:00
Diego Fronza 0cd414a390 Fix dnstap system test on FreeBSD
This commit ensures that dnstap output files captured
by fstrm_capture are properly flushed before any attempt
on reading them with dnstap-read is done.

By reading fstrm-capture source code it was noticed that
signal SIGHUP is used to flush the capture file.
2020-10-20 10:39:48 -03:00
Mark Andrews f7a271d562 Merge branch 'marka-fix-not-enough-categories-v9_11' into 'v9_11'
Drop the expected minimum number of buckets to 4.

See merge request isc-projects/bind9!4266
2020-10-15 01:57:54 +00:00
Mark Andrews 140659c57a Drop the expected minimum number of buckets to 4.
The previous value of 5 produced too many false errors.

(cherry picked from commit 0abb49034e)
2020-10-15 12:32:26 +11:00
Mark Andrews 75ad006928 Merge branch 'marka-rrl-mdig-burst-v9_11' into 'v9_11'
Try to improve rrl timing

See merge request isc-projects/bind9!4264
2020-10-15 01:15:48 +00:00
Mark Andrews 96399960c1 Try to improve rrl timing
Add a +burst option to mdig so that we have a second to setup the
mdig calls then they run at the start of the next second.

RRL uses 'queries in a second' as a approximation to
'queries per second'. Getting the bursts of traffic to all happen in
the same second should prevent false negatives in the system test.

We now have a second to setup the traffic in.  Then the traffic should
be sent at the start of the next second.  If that still fails we
should move to +burst=<now+2> (further extend mdig) instead of the
implicit <now+1> as the trigger second.

(cherry picked from commit 92cdc7b6c7)
2020-10-15 11:47:08 +11:00
Mark Andrews a5ea10c162 Merge branch '2204-investigate-pipeline-system-test-failure-2' into 'v9_11'
Resolve "Investigate pipeline system test failure"

See merge request isc-projects/bind9!4248
2020-10-08 05:21:27 +00:00
Mark Andrews 56e8628e92 Restore the dns_message_reset() call before the dns_dispatch_getnext()
This was accidentally lost in the process of moving rmessage from fctx
to query.  Without this dns_message_setclass() will fail.
2020-10-08 13:10:31 +11:00
Mark Andrews 21bff35408 Merge branch 'mnowak/bring_--rpz-log-qtype-qclass_back' into 'v9_11'
Bring back --rpz-log-qtype-qclass feature-test option

See merge request isc-projects/bind9!4243
2020-10-07 20:10:10 +00:00
Michal Nowak d7ea583ad0 Bring back --rpz-log-qtype-qclass feature-test option
It was unintentionally removed during a backport.
2020-10-07 11:24:16 +02:00
Michal Nowak 8dd41143c6 Merge branch 'wpk/fix-isc-assertions-c-error-v9_11' into 'v9_11'
[v9_11] Fix 'error: ‘%s’ directive argument is null [-Werror=format-overflow=]' in assertions.c

See merge request isc-projects/bind9!4242
2020-10-07 09:12:16 +00:00
Witold KręcickiandMichal Nowak 09a3431069 Fix 'error: ‘%s’ directive argument is null [-Werror=format-overflow=]' in assertions.c
(cherry picked from commit f4260dc0c5)
2020-10-07 10:26:47 +02:00
Ondřej Surý 7886dc0cc1 Merge branch '2183-dns-flag-day-2020-v9_11' into 'v9_11'
Resolve "DNS Flag Day 2020"

See merge request isc-projects/bind9!4230
2020-10-06 12:22:09 +00:00
Ondřej Surý 772cb1696a Add text describing the changes done in the MR in more detail
(cherry picked from commit 096d41b4e2)
(cherry picked from commit 469286e8eb24ebd6227e65b18eb4c30e13a58877)
2020-10-06 09:34:49 +02:00
Ondřej SurýandOndřej Surý d7b16b780f Adjust legacy tests for default 1232 EDNS Buffer Size
* legacy test was just expecting default server EDNS buffer size to be 4096,
  the test needed the adjustment to reset the buffer sizes back to 4096.
2020-10-06 09:34:49 +02:00
Ondřej Surý 3ab08cdaa4 Adjust digdelv tests for default 1232 EDNS Buffer Size
* digdelv test was just expecting default server EDNS buffer size to be
  4096, the test needed only slight adjustment

(cherry picked from commit f1556f8c41)
(cherry picked from commit 6b303721f1ee472dc8ab2d1df03191a98d4e4e5e)
2020-10-05 17:00:24 +02:00
Ondřej Surý c164c9a819 Change the default ENDS buffer size to 1232 for DNS Flag Day 2020
The DNS Flag Day 2020 aims to remove the IP fragmentation problem from
the UDP DNS communication.  In this commit, we implement the minimal
required changes by changing the defaults for `edns-udp-size`,
`max-udp-size` and `nocookie-udp-size` to `1232` (the value picked by
DNS Flag Day 2020).

(cherry picked from commit bb990030d3)
(cherry picked from commit df06773f9a73e4a4bb0b5e7f4bd8e40394e64032)
2020-10-05 16:54:39 +02:00
Michał Kępień cc7efac75a Merge branch '2139-rrset-order-fixes-and-cleanups-v9_11' into 'v9_11'
[v9_11] "rrset-order" fixes and cleanups

See merge request isc-projects/bind9!4221
2020-10-02 08:12:59 +00:00
Michał Kępień d8c0fe0c25 Add CHANGES entry
(cherry picked from commit 27c815a220)
2020-10-02 10:09:25 +02:00
Michał Kępień d34a17e37b Rework "rrset-order" documentation
Certain parts of the existing documentation for the "rrset-order"
statement are incorrect, others are ambiguous.  Rework the relevant
section of the ARM to make it clear and up-to-date with the source code.

(cherry picked from commit 2ac04dc930)
2020-10-02 10:09:15 +02:00
Mark Andrews 792ad817fe Merge branch '2112-allow-task_test-subtests-to-be-selected-at-runtime-v9_11' into 'v9_11'
Resolve "Allow task_test subtests to be selected at runtime."

See merge request isc-projects/bind9!4210
2020-10-01 13:23:56 +00:00
Mark Andrews 24e204d013 Add the ability select individual tests to rdata_test
(cherry picked from commit 6293682020)
2020-10-01 23:05:10 +10:00
Mark Andrews 21662afb3c Add the ability to print out the list of test names (-l)
(cherry picked from commit a9c3374717)
2020-10-01 23:03:05 +10:00
Mark Andrews e310aaf4b7 Add the ability to select tests to run
task_test [-t <test_name>]

(cherry picked from commit 76837484e7)
2020-10-01 23:03:01 +10:00
Ondřej Surý 7dab61a3a7 Merge branch '2124-fix-assertion-failure-in-dns-message-v9_11' into 'v9_11'
Resolve "Bind 9.16.6 Assertion failure message.c:4733: REQUIRE(msg->state == (-1)) failed"

See merge request isc-projects/bind9!4200
2020-09-30 12:40:37 +00:00
Ondřej Surý 3038974cde Add CHANGES and release note for GL #2124 2020-09-30 14:04:04 +02:00
Diego FronzaandOndřej Surý 79c62017eb Properly handling dns_message_t shared references
This commit fix the problems that arose when moving the dns_message_t
object from fetchctx_t to the query structure.

Since the lifetime of query objects are different than that of a
fetchctx and the dns_message_t object held by the query may be being
used by some external module, e.g. validator, even after the query may
have been destroyed, propery handling of the references to the message
were added in this commit to avoid accessing an already destroyed
object.

Specifically, in resquery_response(), a reference to the message is
attached at the beginning of the function and detached at the end, since
a possible call to fctx_cancelquery() would release the dns_message_t
object, and in the next lines of code a call to add_bad() would require
a valid pointer to the same object.

In valcreate() a new reference is attached to the message object, this
ensures that if the corresponding query object is destroyed before the
validator attempts to access it, no invalid pointer access occurs.

In validated() we have to attach a new reference to the message, since
we destroy the validator object at the beginning of the function, and we
need access to the message in the next lines of the same function.
2020-09-30 14:04:04 +02:00
Diego FronzaandOndřej Surý d391a0b4c5 Fix invalid dns message state in resolver's logic
The assertion failure REQUIRE(msg->state == DNS_SECTION_ANY),
caused by calling dns_message_setclass within function resquery_response()
in resolver.c, was happening due to wrong management of dns message_t
objects used to process responses to the queries issued by the resolver.

Before the fix, a resolver's fetch context (fetchctx_t) would hold
a pointer to the message, this same reference would then be used over all
the attempts to resolve the query, trying next server, etc... for this to work
the message object would have it's state reset between each iteration, marking
it as ready for a new processing.

The problem arose in a scenario with many different forwarders configured,
managing the state of the dns_message_t object was lacking better
synchronization, which have led it to a invalid dns_message_t state in
resquery_response().

Instead of adding unnecessarily complex code to synchronize the object,
the dns_message_t object was moved from fetchctx_t structure to the
query structure, where it better belongs to, since each query will produce
a response, this way whenever a new query is created an associated
dns_messate_t is also created.

This commit deals mainly with moving the dns_message_t object from fetchctx_t
to the query structure.
2020-09-30 14:04:04 +02:00