Commit Graph

27506 Commits

Author SHA1 Message Date
Tony Finch
bc984ace12 Fix a few cosmetic issues with rndc managed-keys
The handling of class and view arguments was broken, because the code
didn't realise that next_token() would overwrite the class name when
it parsed the view name. The code was trying to implement a syntax
like `refresh [[class] view]`, but it was documented to have a syntax
like `refresh [class [view]]`. The latter is consistent with other rndc
commands, so that is how I have fixed it.

Before:

$ rndc managed-keys refresh in rec
rndc: 'managed-keys' failed: unknown class/type
unknown class 'rec'

After:

$ rndc managed-keys refresh in rec
refreshing managed keys for 'rec'

There were missing newlines in the output from `rndc managed-keys
refresh` and `rndc managed-keys destroy`.

Before:

$ rndc managed-keys refresh
refreshing managed keys for 'rec'refreshing managed keys for 'auth'

After:

$ rndc managed-keys refresh
refreshing managed keys for 'rec'
refreshing managed keys for 'auth'

(cherry picked from commit 6a3b851f72)
2019-01-14 16:16:29 -08:00
Evan Hunt
f21d6327dd Merge branch 'fix-dnssec-test-v9_12' into 'v9_12'
b/t/s/dnssec/tests.sh: Cleanup showprivate() function

See merge request isc-projects/bind9!1336
2019-01-14 16:06:28 -05:00
Evan Hunt
b241dc58ec b/t/s/dnssec/tests.sh: Cleanup showprivate() function 2019-01-14 12:30:49 -08:00
Evan Hunt
cb142d39eb Merge branch 'each-fix-dnssec-test-error-v9_12' into 'v9_12'
DNSSEC test error

See merge request isc-projects/bind9!1333
2019-01-13 21:32:43 -05:00
Evan Hunt
0b4dca553d fix testing errors
- the checkprivate function in the dnssec test set ret=0, erasing
  results from previous tests and making the test appear to have passed
  when it shouldn't have
- checkprivate needed a delay loop to ensure there was time for all
  private signing records to be updated before the test

(cherry picked from commit 82e83d5dc7)
2019-01-13 18:22:44 -08:00
Mark Andrews
24b89bb1dc Merge branch 'u/fanf2/rndc-alphabetize-v9_12' into 'v9_12'
cleanup: alphabetize rndc command dispatch

See merge request isc-projects/bind9!1331
2019-01-13 21:08:45 -05:00
Tony Finch
1ba69a02ff cleanup: alphabetize rndc command dispatch
(cherry picked from commit 66be4108bf)
2019-01-14 12:28:26 +11:00
Mark Andrews
1f06fa067b Merge branch '784-bind-9-12-3-p1-fatal-error-v9_12' into 'v9_12'
Resolve "bind 9.12.3-P1 fatal error"

See merge request isc-projects/bind9!1326
2019-01-09 04:28:25 -05:00
Mark Andrews
df9cdb88c8 add CHANGES
(cherry picked from commit 9dd39d5385)
2019-01-09 19:50:59 +11:00
Mark Andrews
2c3d353d57 update refreshkeytime
(cherry picked from commit ca977e3976)
2019-01-09 19:50:59 +11:00
Mark Andrews
f140588cf7 Merge branch 'marka-maybe_numeric-and-nul-v9_12' into 'v9_12'
maybe_numeric failed to handle NUL in text region.

See merge request isc-projects/bind9!1324
2019-01-09 03:49:23 -05:00
Mark Andrews
e216ee68ef maybe_numeric failed to handle NUL in text region.
(cherry picked from commit ee23780246)
2019-01-09 19:22:38 +11:00
Mark Andrews
cc85e7fbde Merge branch 'marka-fail-when-required-field-is-missing-v9_12' into 'v9_12'
Ensure base64/base32/hex fields in DNS records that should be non-empty are.

See merge request isc-projects/bind9!1320
2019-01-09 03:18:24 -05:00
Mark Andrews
0b8d530c84 Ensure base64/base32/hex fields in DNS records that should be non-empty are.
(cherry picked from commit 5e8b772ad1)
2019-01-09 18:53:29 +11:00
Evan Hunt
83ce05b97b Merge branch '804-large-nsec3-responses-cause-failure-in-adding-records-to-ncache-and-eventually-formerr-instead-of-nxdomain-v9_12' into 'v9_12'
Resolve "Large NSEC3 responses cause failure in adding records to ncache and, eventually, FORMERR (instead of NXDOMAIN)"

See merge request isc-projects/bind9!1317
2019-01-09 00:47:23 -05:00
Mark Andrews
0537fe2a5a add CHANGES entry
(cherry picked from commit 3328116b57)
2019-01-08 21:27:36 -08:00
Mark Andrews
019b12fc09 allow for up 100 records or 64K of data to be in a ncache entry
(cherry picked from commit 604889e627)
2019-01-08 21:27:36 -08:00
Evan Hunt
d1dfccd8e9 Merge branch '804-large-nsec3-responses-cause-failure-in-adding-records-to-ncache-and-eventually-formerr-instead-of-nxdomain-2-v9_12' into 'v9_12'
Resolve "Large NSEC3 responses cause failure in adding records to ncache and, eventually, FORMERR (instead of NXDOMAIN)"

See merge request isc-projects/bind9!1314
2019-01-09 00:26:27 -05:00
Mark Andrews
72f406a50f add CHANGES
(cherry picked from commit 188c184381)
2019-01-08 20:50:36 -08:00
Mark Andrews
3d76dae6d7 explictly convert ISC_R_NOSPACE from dns_message_parse to DNS_R_FORMERR and remove from dns_result_torcode
(cherry picked from commit 0c42a9c0ab)
2019-01-08 20:50:35 -08:00
Evan Hunt
66d2db70c9 Merge branch '812-cookie-test-failed-v9_12' into 'v9_12'
Resolve "cookie test failed."

See merge request isc-projects/bind9!1312
2019-01-08 23:47:18 -05:00
Mark Andrews
675d75e0bc wait longer for dump to complete
(cherry picked from commit 8a8d378def)
2019-01-08 20:17:06 -08:00
Ondřej Surý
e6148f0175 Merge branch 'ondrej/disable-CI-in-release-branches-v9_12' into 'v9_12'
(v9_12) Run the regular pipelines only for merge requests, and run only the Debian sid...

See merge request isc-projects/bind9!1310
2019-01-08 09:13:35 -05:00
Ondřej Surý
66033a716b Run the regular pipelines only for merge requests, and run only the Debian sid build for release branches
(cherry picked from commit 24961f6068)
2019-01-08 14:58:29 +01:00
Michał Kępień
9905d2ef7e Merge branch '692-dig-fix-cleanup-upon-an-error-before-tcp-socket-creation-v9_12' into 'v9_12'
[v9_12] Fix cleanup upon an error before TCP socket creation

See merge request isc-projects/bind9!1307
2019-01-08 05:57:11 -05:00
Michał Kępień
e2653c47ab Add CHANGES entry
5123.	[bug]		dig could hang indefinitely after encountering an error
			before creating a TCP socket. [GL #692]

(cherry picked from commit 3242cb53ec)
2019-01-08 11:22:57 +01:00
Michał Kępień
f63a1fca3e Fix cleanup upon an error before TCP socket creation
When a query times out after a socket is created and associated with a
given dig_query_t structure, calling isc_socket_cancel() causes
connect_done() to be run, which in turn takes care of all necessary
cleanups.  However, certain errors (e.g. get_address() returning
ISC_R_FAMILYNOSUPPORT) may prevent a TCP socket from being created in
the first place.  Since force_timeout() may be used in code handling
such errors, connect_timeout() needs to properly clean up a TCP query
which is not associated with any socket.  Call clear_query() from
connect_timeout() after attempting to send a TCP query to the next
available server if the timed out query does not have a socket
associated with it, in order to prevent dig from hanging indefinitely
due to the dig_query_t structure not being detached from its parent
dig_lookup_t structure.

(cherry picked from commit 13975b32c6)
2019-01-08 11:22:57 +01:00
Michał Kępień
c05c1f1b65 Refactor code sending a query to the next server upon a timeout
When a query times out and another server is available for querying
within the same lookup, the timeout handler - connect_timeout() - is
responsible for sending the query to the next server.  Extract the
relevant part of connect_timeout() to a separate function in order to
improve code readability.

(cherry picked from commit c108fc5c6e)
2019-01-08 11:22:57 +01:00
Michał Kępień
1d0319fd0c Remove dead code handling address family mismatches for TCP sockets
Before commit c2ec022f57, using the "-b"
command line switch for dig did not disable use of the other address
family than the one to which the address supplied to that option
belonged to.  Thus, bind9_getaddresses() could e.g. prepare an
isc_sockaddr_t structure for an IPv6 address when an IPv4 address has
been passed to the "-b" command line option.  To avoid attempting the
impossible (e.g. querying an IPv6 address from a socket bound to an IPv4
address), a certain code block in send_tcp_connect() checked whether the
address family of the server to be queried was the same as the address
family of the socket set up for sending that query; if there was a
mismatch, that particular server address was skipped.

Commit c2ec022f57 made
bind9_getaddresses() fail upon an address family mismatch between the
address the hostname passed to it resolved to and the address supplied
to the "-b" command line option.  Such failures were fatal to dig back
then.

Commit 7f65860391 made
bind9_getaddresses() failures non-fatal, but also ensured that a
get_address() failure in send_tcp_connect() still causes the given query
address to be skipped (and also made such failures trigger an early
return from send_tcp_connect()).

Summing up, the code block handling address family mismatches in
send_tcp_connect() has been redundant since commit
c2ec022f57.  Remove it.

(cherry picked from commit ef1da8731b)
2019-01-08 11:22:57 +01:00
Michał Kępień
6245991460 Merge branch '315-track-forwarder-timeouts-in-fetch-contexts-v9_12' into 'v9_12'
[v9_12] Track forwarder timeouts in fetch contexts

See merge request isc-projects/bind9!1305
2019-01-08 05:00:04 -05:00
Michał Kępień
ee226e589c Add CHANGES entry
5122.	[bug]		In a "forward first;" configuration, a forwarder
			timeout did not prevent that forwarder from being
			queried again after falling back to full recursive
			resolution. [GL #315]

(cherry picked from commit 1df9ca9e6a)
2019-01-08 08:31:17 +01:00
Michał Kępień
82103796af Track forwarder timeouts in fetch contexts
Since following a delegation resets most fetch context state, address
marks (FCTX_ADDRINFO_MARK) set inside lib/dns/resolver.c are not
preserved when a delegation is followed.  This is fine for full
recursive resolution but when named is configured with "forward first;"
and one of the specified forwarders times out, triggering a fallback to
full recursive resolution, that forwarder should no longer be consulted
at each delegation point subsequently reached within a given fetch
context.

Add a new badnstype_t enum value, badns_forwarder, and use it to mark a
forwarder as bad when it times out in a "forward first;" configuration.
Since the bad server list is not cleaned when a fetch context follows a
delegation, this prevents a forwarder from being queried again after
falling back to full recursive resolution.  Yet, as each fetch context
maintains its own list of bad servers, this change does not cause a
forwarder timeout to prevent that forwarder from being used by other
fetch contexts.

(cherry picked from commit 33350626f9)
2019-01-08 08:31:16 +01:00
Mark Andrews
08c8a750c1 Merge branch 'marka-fix-stub_dlz_allowzonexfr-v9_12' into 'v9_12'
return ISC_R_NOTFOUND when name does not match the zone name

See merge request isc-projects/bind9!1301
2019-01-06 23:41:48 -05:00
Mark Andrews
001a0a0077 add CHANGES
(cherry picked from commit bb57c7f775)
2019-01-07 15:22:15 +11:00
Mark Andrews
299761127a return ISC_R_NOTFOUND when name does not match the zone name
(cherry picked from commit 402190df18)
2019-01-07 15:21:31 +11:00
Mark Andrews
cce1d1d5f5 Merge branch 'indenting-v9_12' into 'v9_12'
indenting

See merge request isc-projects/bind9!1290
2019-01-01 20:12:21 -05:00
Mark Andrews
3ea05e59ce indenting
(cherry picked from commit c69ad95238)
2019-01-02 11:51:19 +11:00
Mark Andrews
59281a378e Merge branch 'copyrights-v9_12' into 'v9_12'
Copyrights v9 12

See merge request isc-projects/bind9!1288
2019-01-01 18:28:39 -05:00
Mark Andrews
ee0c468141 update copyrights 2019-01-02 10:25:47 +11:00
Ondřej Surý
804bf9fcf0 Merge branch '674-abort-when-memory-allocation-fails-v9_12' into 'v9_12'
(v9_12) Resolve "abort when memory allocation fails"

See merge request isc-projects/bind9!1273
2018-12-21 03:45:26 -05:00
Ondřej Surý
b09ecda8a2 Add CHANGES entry for GL #674
(cherry picked from commit 37ff7f635b)
2018-12-21 09:22:17 +01:00
Ondřej Surý
179867290f Abort on allocation failure only if the memory functions are used internally in BIND 9 2018-12-21 09:22:17 +01:00
Ondřej Surý
1543df6b4e Abort on memory allocation failure
(cherry picked from commit 8de2451756)
2018-12-21 09:22:17 +01:00
Matthijs Mekking
5ebd68b54b Merge branch '783-dnssec-signzone-unsupported-algorithms-v9_12' into 'v9_12'
(v9_12) Resolve "Allow unsupported algorithms in zone when not used for signing"

See merge request isc-projects/bind9!1270
2018-12-20 10:32:51 -05:00
Matthijs Mekking
8a67d9d64a Remove dig_with_opts 2018-12-20 15:49:06 +01:00
Matthijs Mekking
32c69ed6e4 Update changefile
(cherry picked from commit 6afa8a77d3)
2018-12-20 15:49:06 +01:00
Matthijs Mekking
25c0e3dde9 Replace DSA with Reserved algorithm
(cherry picked from commit 17cdde1e56)
2018-12-20 15:49:06 +01:00
Matthijs Mekking
ed6674c9fd Move REQUIRE outside comment unsupported alg
(cherry picked from commit 5ca649967e)
2018-12-20 15:49:06 +01:00
Matthijs Mekking
c0701e7ff2 Allow unsupported alg in zone /w dnssec-signzone
dnssec-signzone should sign a zonefile that contains a DNSKEY record
with an unsupported algorithm.  Current behavior is that it will
fail, hitting a fatal error.  The fix detects unsupported algorithms
and will not try to add it to the keylist.

Also when determining the maximum iterations for NSEC3, don't take
into account DNSKEY records in the zonefile with an unsupported
algorithm.

(cherry picked from commit 1dd11fc754)
2018-12-20 15:49:06 +01:00
Matthijs Mekking
82806d855c Add dnssec-signzone tests with unsupported alg
dnssec-signzone should sign a zonefile that contains a DNSKEY record
with an unsupported algorithm.

(cherry picked from commit 6d976b37c1)
2018-12-20 15:49:06 +01:00