Compare commits

..
Author SHA1 Message Date
Witold Kręcicki 2f9da7f225 Make ns_client_requests atomic. 2019-01-22 12:23:54 +01:00
Witold Kręcicki b7a76fad2b Proper lock ordering in dns_view_setviewcommit. Need to make sure it's correct. 2019-01-22 12:22:42 +01:00
Witold Kręcicki 5e5e8da953 TSAN: lock epoll_ctl calls to silence warnings 2019-01-22 11:51:38 +01:00
Witold Kręcicki 7b8757db45 Use atomics in rndc.c to silence TSAN 2019-01-22 10:59:09 +01:00
Witold Kręcicki dc2ca4fa8d lib/dns/adb.c:
- TSAN can't handle more than 64 locks in one thread,
   lock ADB bucket-by-bucket in TSAN mode. This means
   that the dump won't be consistent but it's good enough
   for testing
 - Use proper order when unlocking adb->namelocks
   and adb->entrylocks when dumping ADB.
2019-01-22 10:58:51 +01:00
Witold Kręcicki 6f89098e32 Use proper locking order in lib/dns/resolver.c to avoid deadlock 2019-01-22 10:46:13 +01:00
Witold Kręcicki 2f93fa320f Make booleans in unix/app.c atomic to prevent data races and silence TSAN 2019-01-22 10:45:36 +01:00
Witold Kręcicki 3d11d69ebf Add __SANITIZE_THREAD__ define, similiar to __SANITIZE_ADDRESS__ 2019-01-21 10:38:02 +01:00
Witold Kręcicki cb847810aa Use more atomics in rwlock code 2019-01-21 10:33:59 +01:00
Witold Kręcicki 2680c6d189 lib/dns/adb.c: check erefcnt under lock 2019-01-21 10:03:05 +01:00
Witold Kręcicki 2445c44f21 lib/isc/mem.c : make ctx->is_overmem atomic to avoid data races 2019-01-21 10:02:58 +01:00
Witold Kręcicki a1101c07fc Use isc_refcount for counting in lib/dns/zt.c 2019-01-21 10:00:38 +01:00
Witold Kręcicki ea2720cc00 lib/dns/dispatch.c data access races fixes, found by TSAN 2019-01-21 09:48:01 +01:00
Witold Kręcicki a6c53a015a More locking in socket code to avoid data races. 2019-01-21 09:47:49 +01:00
Witold Kręcicki e2102aabbe Fix a race in access to manager->tasks in taskmgr
Make taskmgr->mode and boolean state flags (exclusive, paused, exiting) atomic.
2019-01-21 09:47:32 +01:00
Witold Kręcicki e4e9930397 Add atomic_store_relaxed and atomic_load_relaxed macros to isc/atomic.h 2019-01-21 09:32:36 +01:00
Witold Kręcicki 58e1baba7a If possible don't use forwarders when priming the resolver.
If we try to fetch a record from cache and need to look into
hints database we assume that the resolver is not primed and
start dns_resolver_prime(). Priming query is supposed to return
NSes for "." in ANSWER section and glue records for them in
ADDITIONAL section, so that we can fill that info in 'regular'
cache and not use hints db anymore.
However, if we're using a forwarder the priming query goes through
it, and if it's configured to return minimal answers we won't get
the addresses of root servers in ADDITIONAL section. Since the
only records for root servers we have are in hints database we'll
try to prime the resolver with every single query.

This patch adds a DNS_FETCHOPT_NOFORWARD flag which avoids using
forwarders if possible (that is if we have forward-first policy).
Using this flag on priming fetch fixes the problem as we get the
proper glue. With forward-only policy the problem is non-existent,
as we'll never ask for root server addresses because we'll never
have a need to query them.

Also added a test to confirm priming queries are not forwarded.
2019-01-18 15:44:34 +01:00
Petr MenšíkandWitold Kręcicki 3ed794bb45 Make sure null atributes are never used
Add INSIST to pubattr fetching where null might occur in therory. Make
sure null is never dereferenced.
2019-01-18 15:44:33 +01:00
Witold Kręcicki 3e8838654d When a forwarder fails and we're not in a forward-only mode we
go back to regular resolution. When this happens the fetch timer is
already running, and we might end up in a situation where we we create
a fetch for qname-minimized query and after that the timer is triggered
and the query is retried (fctx_try) - which causes relaunching of
qname-minimization fetch - and since we already have a qmin fetch
for this fctx - assertion failure.

This fix stops the timer when doing qname minimization - qmin fetch
internal timer should take care of all the possible timeouts.
2019-01-18 15:44:33 +01:00
Michał KępieńandWitold Kręcicki fcb8aec700 Add CHANGES entry
5137.	[func]		named now logs messages whenever a mirror zone becomes
			usable or unusable for resolution purposes. [GL #818]
2019-01-18 15:44:33 +01:00
Michał KępieńandWitold Kręcicki 1565ee6c3d Log a message when a mirror zone becomes unusable
Log a message if a mirror zone becomes unusable for the resolver (most
usually due to the zone's expiration timer firing).  Ensure that
verification failures do not cause a mirror zone to be unloaded
(instead, its last successfully verified version should be served if it
is available).
2019-01-18 15:44:33 +01:00
Michał KępieńandWitold Kręcicki 527e540841 Log a message when a mirror zone loaded from disk comes into effect
Log a message when a mirror zone is successfully loaded from disk and
subsequently verified.

This could have been implemented in a simpler manner, e.g. by modifying
an earlier code branch inside zone_postload() which checks whether the
zone already has a database attached and calls attachdb() if it does
not, but that would cause the resulting logs to indicate that a mirror
zone comes into effect before the "loaded serial ..." message is logged,
which would be confusing.

Tweak some existing sed commands used in the "mirror" system test to
ensure that separate test cases comprising it do not break each other.
2019-01-18 15:44:33 +01:00
Michał KępieńandWitold Kręcicki 43ca8bc50a Log a message when a transferred mirror zone comes into effect
Log a message when a mirror zone is successfully transferred and
verified, but only if no database for that zone was yet loaded at the
time the transfer was initiated.

This could have been implemented in a simpler manner, e.g. by modifying
zone_replacedb(), but (due to the calling order of the functions
involved in finalizing a zone transfer) that would cause the resulting
logs to suggest that a mirror zone comes into effect before its transfer
is finished, which would be confusing given the nature of mirror zones
and the fact that no message is logged upon successful mirror zone
verification.

Once the dns_zone_replacedb() call in axfr_finalize() is made, it
becomes impossible to determine whether the transferred zone had a
database attached before the transfer was started.  Thus, that check is
instead performed when the transfer context is first created and the
result of this check is passed around in a field of the transfer context
structure.  If it turns out to be desired, the relevant log message is
then emitted just before the transfer context is freed.

Taking this approach means that the log message added by this commit is
not timed precisely, i.e. mirror zone data may be used before this
message is logged.  However, that can only be fixed by logging the
message inside zone_replacedb(), which causes arguably more dire issues
discussed above.

dns_zone_isloaded() is not used to double-check that transferred zone
data was correctly loaded since the 'shutdown_result' field of the zone
transfer context will not be set to ISC_R_SUCCESS unless axfr_finalize()
succeeds (and that in turn will not happen unless dns_zone_replacedb()
succeeds).
2019-01-18 15:44:33 +01:00
Evan HuntandWitold Kręcicki 733a3db7a5 CHANGES 2019-01-18 15:44:33 +01:00
Evan HuntandWitold Kręcicki 7b9f4cfc08 improved documentation 2019-01-18 15:44:33 +01:00
Evan HuntandWitold Kręcicki 258f1dc94c fix incorrect comments 2019-01-18 15:44:33 +01:00
Evan HuntandWitold Kręcicki b1c35f812a error on allow-update and allow-update-forwarding at options/view level 2019-01-18 15:44:33 +01:00
Mark AndrewsandWitold Kręcicki f65933d11a use smt_pause instead of pause on sparc 2019-01-18 15:44:33 +01:00
Mark AndrewsandWitold Kręcicki e1f80772b2 adjust timeout to allow for ECN negotiation failures 2019-01-18 15:44:33 +01:00
Mark AndrewsandWitold Kręcicki f880388607 add CHANGES 2019-01-18 15:44:33 +01:00
Mark AndrewsandWitold Kręcicki 3fa5684e19 ensure that WSAStartup is called before getservbyname 2019-01-18 15:44:33 +01:00
Mark AndrewsandWitold Kręcicki 28025720a8 add multi-view server and tests 2019-01-18 15:44:33 +01:00
Mark AndrewsandWitold Kręcicki e83e6be806 add CHANGES note 2019-01-18 15:44:33 +01:00
Tony FinchandWitold Kręcicki 505b88e1a3 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'
2019-01-18 15:44:33 +01:00
Ondřej SurýandWitold Kręcicki b7a199184c b/t/s/dnssec/tests.sh: Cleanup showprivate() function 2019-01-18 15:44:33 +01:00
Witold KręcickiandOndřej Surý 4b5337e06b Add CHANGES entry for GL!1323 2019-01-14 11:28:47 +01:00
Ondřej Surý 482dd7eed3 Fix race condition in cleanup part of dns_dt_create() 2019-01-14 11:28:47 +01:00
Evan Hunt 3b1a914395 Merge branch 'each-fix-dnssec-test-error' into 'master'
DNSSEC test error

See merge request isc-projects/bind9!1330
2019-01-13 21:09:02 -05:00
Evan Hunt 82e83d5dc7 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
2019-01-13 17:50:08 -08:00
Mark Andrews 5da2d171df Merge branch 'u/fanf2/rndc-alphabetize' into 'master'
cleanup: alphabetize rndc command dispatch

See merge request isc-projects/bind9!1328
2019-01-13 20:25:41 -05:00
Tony Finch 66be4108bf cleanup: alphabetize rndc command dispatch 2019-01-11 15:34:02 +00:00
Mark Andrews 61f5306226 Merge branch '801-silence-coverity-issues' into 'master'
Resolve "Silence Coverity Issues"

Closes #801

See merge request isc-projects/bind9!1285
2019-01-09 23:02:16 -05:00
Mark Andrews bd529b1f30 silence coverity issues; move isc_refcount_decrement out of INSIST 2019-01-10 14:42:28 +11:00
Ondřej Surý 67fbbc4e0c Merge branch '709-get-rid-of-message-catalogs' into 'master'
Resolve "Get rid of message catalogs"

Closes #709

See merge request isc-projects/bind9!1131
2019-01-09 18:07:56 -05:00
Ondřej Surý 01b75a9b5b Add CHANGES entry for GL #709 2019-01-09 23:45:14 +01:00
Ondřej Surý 189b8b76d4 Document removal of message catalogs in the release notes 2019-01-09 23:44:26 +01:00
Ondřej Surý e2cdf066ea Remove message catalogs 2019-01-09 23:44:26 +01:00
Mark Andrews f8965a5588 Merge branch '798-dlz-build_querystring-broken' into 'master'
Resolve "DLZ build_querystring broken"

Closes #798

See merge request isc-projects/bind9!1281
2019-01-09 04:21:26 -05:00
Mark Andrews 4c7e6e0799 correctly split query string; cleanups 2019-01-09 19:57:46 +11:00
Mark Andrews f9d9c5686d Merge branch '784-bind-9-12-3-p1-fatal-error' into 'master'
Resolve "bind 9.12.3-P1 fatal error"

Closes #784

See merge request isc-projects/bind9!1283
2019-01-09 03:46:43 -05:00
Mark Andrews 9dd39d5385 add CHANGES 2019-01-09 19:28:16 +11:00
Mark Andrews ca977e3976 update refreshkeytime 2019-01-09 19:27:40 +11:00
Mark Andrews 43bfd4cccc Merge branch 'marka-maybe_numeric-and-nul' into 'master'
maybe_numeric failed to handle NUL in text region.

Closes #807

See merge request isc-projects/bind9!1319
2019-01-09 02:58:23 -05:00
Mark Andrews ee23780246 maybe_numeric failed to handle NUL in text region. 2019-01-09 18:33:42 +11:00
Mark Andrews 287bb7b482 Merge branch 'marka-fail-when-required-field-is-missing' into 'master'
Ensure base64/base32/hex fields in DNS records that should be non-empty are.

See merge request isc-projects/bind9!1318
2019-01-09 02:27:37 -05:00
Mark Andrews 5e8b772ad1 Ensure base64/base32/hex fields in DNS records that should be non-empty are. 2019-01-09 18:04:21 +11:00
Mark Andrews 5114270fa7 Merge branch '804-large-nsec3-responses-cause-failure-in-adding-records-to-ncache-and-eventually-formerr-instead-of-nxdomain' into 'master'
Resolve "Large NSEC3 responses cause failure in adding records to ncache and, eventually, FORMERR (instead of NXDOMAIN)"

Closes #804

See merge request isc-projects/bind9!1295
2019-01-09 00:06:30 -05:00
Mark Andrews 3328116b57 add CHANGES entry 2019-01-09 15:54:04 +11:00
Mark Andrews 604889e627 allow for up 100 records or 64K of data to be in a ncache entry 2019-01-09 15:53:32 +11:00
Mark Andrews 8e6af477dd Merge branch '804-large-nsec3-responses-cause-failure-in-adding-records-to-ncache-and-eventually-formerr-instead-of-nxdomain-2' into 'master'
Resolve "Large NSEC3 responses cause failure in adding records to ncache and, eventually, FORMERR (instead of NXDOMAIN)"

Closes #804

See merge request isc-projects/bind9!1298
2019-01-08 23:39:42 -05:00
Mark Andrews 188c184381 add CHANGES 2019-01-09 15:19:42 +11:00
Mark Andrews 0c42a9c0ab explictly convert ISC_R_NOSPACE from dns_message_parse to DNS_R_FORMERR and remove from dns_result_torcode 2019-01-09 15:19:42 +11:00
Evan Hunt c6ac1b092d Merge branch '812-cookie-test-failed' into 'master'
Resolve "cookie test failed."

Closes #812

See merge request isc-projects/bind9!1300
2019-01-08 23:15:40 -05:00
Mark AndrewsandEvan Hunt 8a8d378def wait longer for dump to complete 2019-01-08 23:04:22 -05:00
Ondřej Surý 10d8f3194f Merge branch 'ondrej/disable-CI-in-release-branches' into 'master'
Run the regular pipelines only for merge requests, and run only the Debian sid...

See merge request isc-projects/bind9!1309
2019-01-08 08:57:13 -05:00
Ondřej Surý 24961f6068 Run the regular pipelines only for merge requests, and run only the Debian sid build for release branches 2019-01-08 14:31:07 +01:00
Michał Kępień 1b409b8cfc Merge branch '692-dig-fix-cleanup-upon-an-error-before-tcp-socket-creation' into 'master'
Fix cleanup upon an error before TCP socket creation

Closes #692

See merge request isc-projects/bind9!1100
2019-01-08 05:57:10 -05:00
Michał Kępień 3242cb53ec Add CHANGES entry
5123.	[bug]		dig could hang indefinitely after encountering an error
			before creating a TCP socket. [GL #692]
2019-01-08 11:17:39 +01:00
Michał Kępień 13975b32c6 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.
2019-01-08 11:17:39 +01:00
Michał Kępień c108fc5c6e 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.
2019-01-08 11:17:39 +01:00
Michał Kępień ef1da8731b 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.
2019-01-08 11:17:39 +01:00
Michał Kępień dca1652458 Merge branch '315-track-forwarder-timeouts-in-fetch-contexts' into 'master'
Track forwarder timeouts in fetch contexts

Closes #315

See merge request isc-projects/bind9!826
2019-01-08 05:00:03 -05:00
Michał Kępień 1df9ca9e6a 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]
2019-01-08 08:29:54 +01:00
Michał Kępień 33350626f9 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.
2019-01-08 08:29:54 +01:00
Mark Andrews a38b31ccf9 Merge branch 'marka-fix-stub_dlz_allowzonexfr' into 'master'
return ISC_R_NOTFOUND when name does not match the zone name

See merge request isc-projects/bind9!1299
2019-01-06 23:06:13 -05:00
Mark Andrews bb57c7f775 add CHANGES 2019-01-07 14:38:48 +11:00
Mark Andrews 402190df18 return ISC_R_NOTFOUND when name does not match the zone name 2019-01-06 22:21:24 -05:00
Evan Hunt 3485fe4b86 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1297
2019-01-03 14:10:30 -05:00
Evan Hunt 5cdc63254b placeholder 2019-01-03 11:10:05 -08:00
Evan Hunt 792692f86d Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1294
2019-01-02 20:30:47 -05:00
Evan Hunt 32edbd7859 placeholder 2019-01-02 17:30:18 -08:00
Mark Andrews 971c01ad19 Merge branch 'indenting' into 'master'
indenting

See merge request isc-projects/bind9!1286
2019-01-01 19:41:35 -05:00
Mark Andrews c69ad95238 indenting 2019-01-02 10:56:59 +11:00
Mark Andrews 18e393bd90 Merge branch 'copyrights' into 'master'
update copyrights

See merge request isc-projects/bind9!1287
2019-01-01 18:53:45 -05:00
Mark Andrews dc64b70616 update copyrights 2019-01-02 10:20:43 +11:00
Mark Andrews 3a754d4bf8 Merge branch 'marka-readme-typo' into 'master'
fix typo in readme

See merge request isc-projects/bind9!1282
2018-12-26 20:38:21 -05:00
Mark Andrews 4af0d9145a s/now/no/ 2018-12-27 12:37:11 +11:00
Evan Hunt 1b95cb79bb Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1277
2018-12-20 18:38:02 -05:00
Evan Hunt 5ea712d964 placeholder 2018-12-20 15:37:18 -08:00
Evan Hunt 8f02762b81 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1276
2018-12-20 16:26:49 -05:00
Evan Hunt 5b63b595fc placeholder 2018-12-20 13:26:14 -08:00
Ondřej Surý 285d5b125b Merge branch 'ondrej/git-replay-merge-script-update' into 'master'
Update git-replay-merge.sh script

See merge request isc-projects/bind9!1275
2018-12-20 05:51:39 -05:00
Ondřej Surý 5b29b6889b Update git-replay-merge.sh script 2018-12-20 11:48:41 +01:00
Ondřej Surý 6d577430ce Merge branch '768-add-description-to-ldap-schema' into 'master'
Add optional description field to LDAP schema

Closes #768

See merge request isc-projects/bind9!1267
2018-12-20 04:14:53 -05:00
Roland GruberandOndřej Surý 83903f6f5e Add optional description field to LDAP schema 2018-12-20 09:47:07 +01:00
Mark Andrews 4075347c47 Merge branch '778-named-checkconf-crashes-in-name-c' into 'master'
Resolve "named-checkconf crashes in name.c"

Closes #778

See merge request isc-projects/bind9!1235
2018-12-20 03:35:29 -05:00
Mark Andrews b75970efa3 named-checkconf triggered a assertion when a mirror zone had a bad name 2018-12-20 13:19:18 +11:00
Ondřej Surý 314a25e4d4 Merge branch 'ondrej/flycheck-fix' into 'master'
Fix the cppcheck include path for flycheck

See merge request isc-projects/bind9!1264
2018-12-19 18:14:29 -05:00
Ondřej SurýandOndřej Surý 1a4559030e Fix the cppcheck include path for flycheck 2018-12-19 18:14:17 -05:00
Ondřej Surý 301f2fbedc Merge branch '787-set-the-clang-define-to-1' into 'master'
__SANITIZE_ADDRESS__ needs to be defined to 1

See merge request isc-projects/bind9!1262
2018-12-19 18:14:00 -05:00
Ondřej Surý ff7c868f25 __SANITIZE_ADDRESS__ needs to be defined to 1 2018-12-19 22:02:37 +01:00
Ondřej Surý 1a93e5bd3e Merge branch 'ondrej/add-emacs-flycheck-mode-configuration' into 'master'
Add emacs flycheck mode configuration

See merge request isc-projects/bind9!1165
2018-12-19 15:50:00 -05:00
Ondřej Surý 272c065268 Add emacs .dir-locals.el settings for flycheck mode 2018-12-19 17:03:37 +01:00
Matthijs Mekking 191b12e304 Merge branch '783-dnssec-signzone-unsupported-algorithms' into 'master'
Resolve "Allow unsupported algorithms in zone when not used for signing"

Closes #783

See merge request isc-projects/bind9!1250
2018-12-19 09:10:09 -05:00
Matthijs Mekking a7de66142c Artificial change to retry pipeline 2018-12-19 14:52:23 +01:00
Matthijs Mekking 17cdde1e56 Replace DSA with Reserved algorithm 2018-12-19 12:54:57 +01:00
Matthijs Mekking cefc3706a0 Update copyrights 2018-12-19 12:54:57 +01:00
Matthijs Mekking 5ca649967e Move REQUIRE outside comment unsupported alg 2018-12-19 12:54:57 +01:00
Matthijs Mekking 34c0948aa7 Add DSA key to copyrights 2018-12-19 12:54:57 +01:00
Matthijs Mekking 6afa8a77d3 Update changefile 2018-12-19 12:54:57 +01:00
Matthijs Mekking 1dd11fc754 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.
2018-12-19 12:54:31 +01:00
Matthijs Mekking 6d976b37c1 Add dnssec-signzone tests with unsupported alg
dnssec-signzone should sign a zonefile that contains a DNSKEY record
with an unsupported algorithm.
2018-12-19 12:54:31 +01:00
Ondřej Surý b04842c057 Merge branch '787-use-correct-define' into 'master'
gcc defines __SANITIZE_ADDRESS__ and not __ADDRESS_SANITIZER__, use the correct #define

Closes #787

See merge request isc-projects/bind9!1255
2018-12-19 06:48:48 -05:00
Ondřej Surý 8903d68d69 gcc defines __SANITIZE_ADDRESS__ and not __ADDRESS_SANITIZER__, use the correct #define 2018-12-19 12:24:59 +01:00
Witold Krecicki 37c2d69547 Merge branch 'wpk-rndc-reload-in-tests' into 'master'
Add a status line to rndc status notifying that server is being reloaded/reconfigured; use it in tests

See merge request isc-projects/bind9!1149
2018-12-19 06:18:46 -05:00
Witold Kręcicki 6e12939d63 CHANGES notes 2018-12-19 11:35:40 +01:00
Witold Kręcicki 6d50138405 Use rndc_reload in tests, make sure that reload is complete before continuing 2018-12-19 11:33:37 +01:00
Witold Kręcicki 517449e0e6 Add a status line to rndc status notifying that server is being reloaded/reconfigured 2018-12-19 11:32:21 +01:00
Ondřej Surý 35d495db68 Merge branch '787-disable-rtld_deepbind-when-compiled-under-asan' into 'master'
Resolve "RTLD_DEEPBIND and AddressSanitizer aren't compatible"

Closes #787

See merge request isc-projects/bind9!1251
2018-12-19 04:46:53 -05:00
Ondřej Surý cad6b39cab Disable RTLD_DEEPBIND when compiled under AddressSanitizer 2018-12-19 09:59:40 +01:00
Ondřej Surý e1ce3a3d42 Define __ADDRESS_SANITIZER__ if compiling under clang's AddressSanitizer 2018-12-19 09:54:37 +01:00
Ondřej Surý 16d486ec59 Merge branch '781-fix-python-check-in-configure-script' into 'master'
Resolve "configure script in BIND 9.13.5 release fails to detect python"

Closes #781

See merge request isc-projects/bind9!1248
2018-12-18 10:56:21 -05:00
Ondřej Surý 99cf0faec0 Add some combinations of --with-python=<path>/--with-python/--without-python to GitLab CI 2018-12-18 16:08:20 +01:00
Ondřej Surý 3951cb053b When --with-python is given to configure, use default search list for python binaries instead of 'yes' 2018-12-18 16:08:20 +01:00
Ondřej Surý 41478d0af6 Merge branch 'ondrej-retry-test-jobs' into 'master'
For system tests, retry twice before failing

See merge request isc-projects/bind9!1249
2018-12-18 10:06:01 -05:00
Ondřej Surý b6538b5488 For system tests, retry twice before failing 2018-12-18 15:33:59 +01:00
Witold Krecicki d77ac39370 Merge branch 'wpk-separate-common-stuff-conf-sh' into 'master'
Get common stuff out of bin/tests/system/conf.sh.{in,win32} into conf.sh.common

See merge request isc-projects/bind9!1241
2018-12-18 08:57:17 -05:00
Witold Kręcicki fee890461b Get common stuff out of bin/tests/system/conf.sh.{in,win32} into conf.sh.common 2018-12-18 08:57:05 -05:00
Ondřej Surý 6ea19e66c3 Merge branch '782-add-support-for-msys2-in-stop.pl-script' into 'master'
Properly detect msys/msys2 environment in the stop.pl script.

See merge request isc-projects/bind9!1247
2018-12-18 08:46:03 -05:00
Ondřej Surý 808dac0760 Properly detect msys/msys2 environment in the stop.pl script. 2018-12-18 14:27:56 +01:00
Ondřej Surý 8b10b07d20 Merge branch '785-fix-posix-shell-autoconf-macro' into 'master'
Break out of loop when first POSIX-compatible shell is found

Closes #785

See merge request isc-projects/bind9!1245
2018-12-18 07:29:12 -05:00
Ondřej Surý cc0a3c5d3c Break out of loop when first POSIX-compatible shell is found 2018-12-18 13:02:00 +01:00
Evan Hunt 39f6d33002 Merge branch 'each-win-fix2' into 'master'
fix windows build error

See merge request isc-projects/bind9!1246
2018-12-17 18:14:27 -05:00
Evan Hunt b269c7e4a0 CHANGES 2018-12-17 17:10:33 -05:00
Evan Hunt de13354caf only the debug build was fixed previously; release needs fixing too 2018-12-17 17:10:33 -05:00
Ondřej Surý 90f1446253 Merge branch '782-revert-cygwin-grep-CRLF-issue' into 'master'
Revert "Merge branch '782-cygwin-grep-CRLF-issue' into 'master'"

See merge request isc-projects/bind9!1242
2018-12-17 06:57:44 -05:00
Ondřej Surý 7a721f983e Revert "Merge branch '782-cygwin-grep-CRLF-issue' into 'master'"
This reverts commit 4af9f97189, reversing
changes made to 0289f3f281.
2018-12-17 12:23:14 +01:00
Evan Hunt 4af9f97189 Merge branch '782-cygwin-grep-CRLF-issue' into 'master'
Resolve "current version of cygwin grep causes tests to fail when grepping for end of line character"

Closes #782

See merge request isc-projects/bind9!1230
2018-12-14 21:47:23 -05:00
Curtis BlackburnandEvan Hunt 2ec746dafe minor fixes to dns64 and rndc CRLF fix. rpzrecurse failure
will be addressed in a separate issue
2018-12-14 18:22:58 -08:00
Curtis BlackburnandEvan Hunt 9fc68285ef more CRLF fixes (dns64, rndc, rpzrecurse) 2018-12-14 18:22:58 -08:00
Curtis BlackburnandEvan Hunt bdbf6ede3a missed one in the digdelv test 2018-12-14 18:22:58 -08:00
Curtis BlackburnandEvan Hunt ba1b9ca4d4 digdelv test fixed for CRLF issue 2018-12-14 18:22:58 -08:00
Curtis BlackburnandEvan Hunt 18e8835044 windows CRLF issues fixed in builtin test 2018-12-14 18:22:58 -08:00
Mark Andrews 0289f3f281 Merge branch '779-named-checkconf-crashes-in-parser-c' into 'master'
Resolve "named-checkconf crashes in parser.c"

Closes #779

See merge request isc-projects/bind9!1234
2018-12-14 14:47:32 -05:00
Mark Andrews 53a33f7365 pass the correct object to cfg_obj_log 2018-12-14 16:29:02 +11:00
Mark Andrews 17ce0b373f Merge branch '742-isc-support-13767-nsec3-typemap-improperly-includes-dnskey-rrset-instead-of-ignoring-it-as-out-of-zone' into 'master'
Resolve "[ISC-support #13767] NSEC3 typemap improperly includes DNSKEY RRset instead of ignoring it as out-of-zone"

Closes #742

See merge request isc-projects/bind9!1231
2018-12-13 21:53:53 -05:00
Mark Andrews 85da986d68 add CHANGES 2018-12-14 13:21:35 +11:00
Mark Andrews f2f7711977 add unit tests for dns_rdatatype_atcname, dns_rdatatype_atparent and iszonecutauth 2018-12-14 13:21:35 +11:00
Mark Andrews 7e4b82103b check that DNSKEY and other occluded data are excluded from the delegating bitmap 2018-12-14 12:48:55 +11:00
Mark Andrews f4ceb12b69 create dns_rdatatype_atcname to split records that can appear along side CNAME from DNSSEC; dns_rdatatype_iszonecutauth allowed too many types 2018-12-14 12:48:55 +11:00
Mark Andrews d78d405d1a Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1228
2018-12-13 01:30:09 -05:00
Mark Andrews fed3e7a815 placeholder 2018-12-13 16:49:12 +11:00
Evan Hunt 2da3caf339 Merge branch 'marka-tabify-changes-precheck' into 'master'
tabify changes precheck

See merge request isc-projects/bind9!1220
2018-12-13 00:22:21 -05:00
Mark AndrewsandEvan Hunt 730015f33e white space 2018-12-12 21:10:22 -08:00
Mark AndrewsandEvan Hunt 87b3b46096 tabify-changes precheck 2018-12-12 21:10:22 -08:00
Ondřej Surý a5678ed78f Merge branch 'ondrej/rename-the-envvar-to-BUILD_PARALLEL_JOBS' into 'master'
Rename the GitLab CI environment variable to BUILD_PARALLEL_JOBS

See merge request isc-projects/bind9!1223
2018-12-12 16:58:35 -05:00
Ondřej SurýandOndřej Surý e20d5e4dd2 Rename the GitLab CI environment variable to BUILD_PARALLEL_JOBS 2018-12-12 15:57:36 -05:00
Ondřej Surý bb60797799 Merge branch 'ondrej/add-ubuntu-to-build-and-test-jobs' into 'master'
Add Ubuntu Xenial and Bionic to build and test jobs in the GitLab CI

See merge request isc-projects/bind9!1221
2018-12-12 09:35:59 -05:00
Ondřej Surý 6e53bb4e09 fixup! Add Ubuntu Xenial and Bionic to GitLab CI jobs 2018-12-12 15:05:12 +01:00
Ondřej Surý a32d2360f7 Add Ubuntu Xenial and Bionic to GitLab CI jobs 2018-12-12 14:52:29 +01:00
Mark Andrews d844959a44 Merge branch '760-the-notify-system-test-incorrectly-detects-startup-notify-rate-error' into 'master'
Resolve "The notify system test incorrectly detects startup notify rate error."

Closes #760

See merge request isc-projects/bind9!1179
2018-12-11 18:19:24 -05:00
Mark Andrews 47a4e0eeaa check that the time between notify messages is not too small 2018-12-12 09:39:00 +11:00
Matthijs Mekking ff20b8040d Merge branch '628-remove-support-for-insecure-rsamd5' into 'master'
Resolve "Remove support for insecure RSAMD5"

Closes #628

See merge request isc-projects/bind9!1106
2018-12-11 09:21:07 -05:00
Ondřej Surý 0ef2853c0d Add CHANGES entry for GL #628 2018-12-11 11:32:24 +01:00
Ondřej Surý abe39991be Add release notes for RSAMD5 removal. 2018-12-11 11:32:24 +01:00
Ondřej Surý 5cc06e475a Documentation update with newer algorithms tham RSAMD5 and RSASHA1 2018-12-11 11:32:24 +01:00
Ondřej Surý 826c335980 Remove outdated bin/tests/optional/dst_test test 2018-12-11 11:32:24 +01:00
Ondřej Surý a2e38f758d Add lib/dns/tests/testdata/dnstap/dnstap.file to .gitignore 2018-12-11 11:32:24 +01:00
Ondřej Surý e69dc0dbc7 Remove RSAMD5 support 2018-12-11 11:32:24 +01:00
Ondřej Surý 74f895740c Merge branch '628-refactor-digdelv-system-test' into 'master'
Refactor digdelv system test

See merge request isc-projects/bind9!1190
2018-12-11 05:16:59 -05:00
Ondřej Surý bc12c52e82 Run the digdelv tests with set -e enabled 2018-12-11 10:21:47 +01:00
Ondřej Surý 351efd8812 Update digdelv system test to not use static RSAMD5 key and make scripts shellcheck clean 2018-12-11 10:21:40 +01:00
Ondřej Surý 7ff7de0609 Merge branch '628-refactor-synthfromdnssec-system-test' into 'master'
Refactor synthfromdnssec system test

See merge request isc-projects/bind9!1193
2018-12-11 04:19:52 -05:00
Ondřej Surý f5785f97fc Refactor synthfromdnssec system test to use $DEFAULT_ALGORITHM, be shellcheck clean and run under set -e 2018-12-11 09:44:08 +01:00
Ondřej Surý e71bbde57d Merge branch '628-refactor-sfcache-test' into 'master'
Refactor sfcache system test

See merge request isc-projects/bind9!1184
2018-12-11 03:43:14 -05:00
Ondřej Surý e1bf5624fb Run the sfcache system tests with set -e enabled 2018-12-11 09:27:16 +01:00
Ondřej Surý f566010717 sfcache system test: Remove RSAMD5 usage and make script shellcheck compliant 2018-12-11 09:27:16 +01:00
Ondřej Surý 7e07d05ae7 Replace RSAMD5 keys with keys using DEFAULT_ALGORITHM variable from conf.sh 2018-12-11 09:27:16 +01:00
Ondřej Surý 211d83b0cd Merge branch '628-refactor-dnssec-system-test' into 'master'
Refactor dnssec system test

See merge request isc-projects/bind9!1191
2018-12-10 14:01:44 -05:00
Ondřej Surý aeebcb4ae8 Run the dnssec system tests with set -e enabled 2018-12-10 19:47:32 +01:00
Ondřej Surý ca7cadfa92 dnssec system test: Remove RSAMD5 usage and make script shellcheck compliant 2018-12-10 19:47:32 +01:00
Ondřej SurýandEvan Hunt a160fecaa1 Replace RSAMD5 keys with keys using DEFAULT_ALGORITHM variable from conf.sh 2018-12-10 09:16:46 -08:00
Evan Hunt c0eb02d435 Merge branch '756-dyndb-system-test-failing-intermittently' into 'master'
Resolve "dyndb system test failing intermittently."

Closes #756

See merge request isc-projects/bind9!1210
2018-12-10 12:05:14 -05:00
Mark Andrews 3bca52ca07 allow a small about of time for the syncptr event to be processed 2018-12-10 16:59:27 +11:00
Mark Andrews e5da71f746 Merge branch 'michal-extend-dname-dnssec-tests' into 'master'
Extend DNAME DNSSEC tests

See merge request isc-projects/bind9!1205
2018-12-10 00:51:06 -05:00
Michał KępieńandMark Andrews adbca54079 Check that DNAME is not treated as a delegation when signing 2018-12-09 23:12:41 -05:00
Mark Andrews 6b470bbf42 verify that auto-dnssec maintain generates and signs NSEC3 records with DNAME at the apex 2018-12-09 23:12:41 -05:00
Mark Andrews 06e218c421 verify that dnssec-signzone generates NSEC3 records with DNAME at the apex 2018-12-09 23:12:41 -05:00
Mark Andrews 4ccff3bbed Merge branch 'michal-zone_sign-error-logging' into 'master'
Log CHECK() errors in zone_sign()

See merge request isc-projects/bind9!1206
2018-12-09 23:11:47 -05:00
Mark Andrews b108376a10 log a error if we don't explicitly know that a error has been logged in zone_sign 2018-12-10 14:57:11 +11:00
Evan Hunt 8b17f364a9 Merge branch 'each-win32-fix' into 'master'
add missing hooks.c and hooks.h to project files, remove missing symbols

See merge request isc-projects/bind9!1207
2018-12-07 13:44:21 -05:00
Evan Hunt c6527aedc7 fix win32 build
- add missing hooks.h and hooks.c to project files
- remove extraneous symbols from libns.def
2018-12-07 10:12:00 -08:00
Tinderbox User 882ad18c5e Merge branch 'prep-release' 2018-12-07 03:41:27 +00:00
Tinderbox User 5bd855251c prep 9.13.5 2018-12-07 03:41:19 +00:00
Evan Hunt cbde34e7a3 Merge branch 'each-check-cfg' into 'master'
checklibs needs to grep for the cfg_* prefix in lib/isccfg

See merge request isc-projects/bind9!1201
2018-12-06 21:07:12 -05:00
Evan Hunt ab7356a7de checklibs needs to grep for the cfg_* prefix in lib/isccfg 2018-12-06 21:05:55 -05:00
Evan Hunt 90b773134c Merge branch '770-building-with-geoip-is-currently-broken-on-master' into 'master'
Resolve "Building with GEOIP is currently broken on master."

See merge request isc-projects/bind9!1202
2018-12-06 21:05:23 -05:00
Mark Andrews b2aca96c27 move geoip to parser.c 2018-12-07 12:50:03 +11:00
Mark Andrews 388bfdb945 Merge branch 'michal-befix-squashed' into 'master'
Fix bottom of zone determination.

Closes #771

See merge request isc-projects/bind9!1198
2018-12-06 19:38:33 -05:00
Mark Andrews c8e92d3e45 add CHANGES and release notes entries. 2018-12-07 11:21:47 +11:00
Mark Andrews 9eec02a81f Properly detect bottom of zone when sign_a_node() is not called 2018-12-07 11:20:16 +11:00
Evan Hunt 0c0536a1e4 Merge branch 'each-fix-macos-build' into 'master'
fix shared library build on darwin

See merge request isc-projects/bind9!1197
2018-12-06 18:58:14 -05:00
Evan Hunt 115736b3f5 fix shared library build on darwin 2018-12-06 18:57:53 -05:00
Mark Andrews 5e2cd91321 Merge branch '769-host-u-documented-in-manpage-but-disabled-in-code' into 'master'
Resolve ""host -U" documented in manpage, but disabled in code"

Closes #769

See merge request isc-projects/bind9!1194
2018-12-06 16:10:45 -05:00
Mark Andrews 9586c3a696 add CHANGES 2018-12-07 07:56:43 +11:00
Andreas HasenackandMark Andrews 665618698e add -U to preparse and usage 2018-12-07 07:43:52 +11:00
Evan Hunt 71e54bfe0f Merge branch '15-filter-aaaa-module' into 'master'
first module: filter-aaaa

See merge request isc-projects/bind9!799
2018-12-06 13:57:49 -05:00
Evan Hunt fa666f5d88 CHANGES, release notes 2018-12-06 10:36:50 -08:00
Michał KępieńandEvan Hunt 0e12988dd6 make hook actions return an enum instead of a bool
Use an enum instead of a bool for the return type of hook actions in
order to facilitate adding further hook processing models in the future.
2018-12-06 10:36:50 -08:00
Evan Hunt f70a84537d revise hooks.h comments 2018-12-06 10:36:50 -08:00
Evan Hunt c63ead9d96 add basic plugins documentation 2018-12-06 10:36:50 -08:00
Michał KępieńandEvan Hunt 4234968798 add a function for processing a list of configured plugins
Add a new libisccfg function, cfg_pluginlist_foreach(), which allows an
arbitrary callback to be invoked for every "plugin" stanza present in a
configuration object.  Use this function for both loading plugins and
checking their configuration in order to reduce duplication of
configuration processing code present in bin/named/server.c and
lib/bind9/check.c.
2018-12-06 10:36:50 -08:00
Evan Hunt fd20f10d52 name change from "hook modules" to "plugins"
- "hook" is now used only for hook points and hook actions
- the "hook" statement in named.conf is now "plugin"
- ns_module and ns_modlist are now ns_plugin and ns_plugins
- ns_module_load is renamed ns_plugin_register
- the mandatory functions in plugin modules (hook_register,
  hook_check, hook_version, hook_destroy) have been renamed
2018-12-06 10:36:50 -08:00
Evan Hunt 8da0c0e7d5 eliminate ns_hookctx structure, pass mctx/lctx/view directly 2018-12-06 10:36:44 -08:00
Evan Hunt 7a47e4d85f restore filter-aaaa syntax checking
- added functionality to check hook parameters in named-checkconf,
  and restored the checkconf tests that were removed from the
  filter-aaaa test.
2018-12-06 10:29:12 -08:00
Evan Hunt b94945e606 refactor to support multiple module instances
- use a per-view module list instead of global hook_modules
- create an 'instance' pointer when registering modules, store it in
  the module structure, and use it as action_data when calling
  hook functions - this enables multiple module instances to be set
  up in parallel
- also some nomenclature changes and cleanup
2018-12-06 10:29:12 -08:00
Evan Hunt 9df0bdc99c add additional hook points, plus some minor refactoring
- added some hook points that will be needed for a dns64 module later
- moved some code from the beginning of query_respond() to
  the end of query_prepresponse(); this has no effect on functionality
  but means we can have a hook point at the top of query_respond(),
  which seems nicer
- compressed duplicated code into query_zerottl_refetch() function
- added a qctx->answered flag so that a module can prevent
  query_addrrset() from being called from query_respond() when
  it's already been called from the module.
2018-12-06 10:29:12 -08:00
Michał KępieńandEvan Hunt baa38d6e94 refactor response filtering code in bin/hooks/filter-aaaa.c 2018-12-06 10:29:12 -08:00
Evan Hunt 0b988256c7 copy ns_hook objects before adding them to a hook table
- this is necessary because adding the same hook to multiple views
  causes the ISC_LIST link value to become inconsistent; it isn't
  noticeable when only one hook action is ever registered at a
  given hook point, but it will break things when there are two.
2018-12-06 10:29:12 -08:00
Evan Hunt 74683fbc3b use entirely local persistent data in modules
- eliminate qctx->hookdata and client->hookflags.
- use a memory pool to allocate data blobs in the filter-aaaa module,
  and associate them with the client address in a hash table
- instead of detaching the client in query_done(), mark it for deletion
  and then call ns_client_detach() from qctx_destroy(); this ensures
  that it will still exist when the QCTX_DESTROYED hook point is
  reached.
2018-12-06 10:29:12 -08:00
Evan Hunt 8725f57371 refactor to remove dead code in query_respond_any() 2018-12-06 10:29:12 -08:00
Evan Hunt 427e9ca357 clear AD flag when altering response messages
- the AD flag was not being cleared correctly when filtering
- enabled dnssec valdiation in the filter-aaaa test to confirm this
  works correctly now
2018-12-06 10:29:11 -08:00
Evan Hunt 055bf2665c improve hook processing macros
- use a get_hooktab() function to determine the hook table.
- PROCESS_HOOK now jumps to a cleanup tag on failure
- add PROCESS_ALL_HOOKS in query.c, to run all hook functions at
  a specified hook point without stopping. this is to be used for
  intiialization and destruction functions that must run in every
  module.
- 'result' is set in PROCESS_HOOK only when a hook function
  interrupts processing.
- revised terminology: a "callback" is now a "hook action"
- remove unused NS_PROCESS_HOOK and NS_PROCESS_HOOK_VOID macros.
2018-12-06 10:29:11 -08:00
Evan Hunt 81f58e2ea2 enable modules to store data in qctx
- added a 'hookdata' array to qctx to store pointers to up to
  16 blobs of data which are allocated by modules as needed.
  each module is assigned an ID number as it's loaded, and this
  is the index into the hook data array. this is to be used for
  holding persistent state between calls to a hook module for a
  specific query.
- instead of using qctx->filter_aaaa, we now use qctx->hookdata.
  (this was the last piece of filter-aaaa specific code outside the
  module.)
- added hook points for qctx initialization and destruction. we get
  a filter-aaaa data pointer from the mempool when initializing and
  store it in the qctx->hookdata table; return to to the mempool
  when destroying the qctx.
- link the view to the qctx so that detaching the client doesn't cause
  hooks to fail
- added a qctx_destroy() function which must be called after qctx_init;
  this calls the QCTX_DESTROY hook and detaches the view
- general cleanup and comments
2018-12-06 10:29:11 -08:00
Evan Hunt 9911c835d3 add a parser to filter-aaaa.so and pass in the parameters
- make some cfg-parsing functions global so they can be run
  from filter-aaaa.so
- add filter-aaaa options to the hook module's parser
- mark filter-aaaa options in named.conf as obsolete, remove
  from named and checkconf, and update the filter-aaaa test not to
  use checkconf anymore
- remove filter-aaaa-related struct members from dns_view
2018-12-06 10:29:11 -08:00
Evan Hunt d2f4644388 add hook statement to configuration parser
- allow multiple "hook" statements at global or view level
- add "optional bracketed text" type for optional parameter list
- load hook module from specified path rather than hardcoded path
- add a hooktable pointer (and a callback for freeing it) to the
  view structure
- change the hooktable functions so they no longer update ns__hook_table
  by default, and modify PROCESS_HOOK so it uses the view hooktable, if
  set, rather than ns__hook_table. (ns__hook_table is retained for
  use by unit tests.)
- update the filter-aaaa system test to load filter-aaaa.so
- add a prereq script to check for dlopen support before running
  the filter-aaaa system test

not yet done:
- configuration parameters are not being passed to the filter-aaaa
  module; the filter-aaaa ACL and filter-aaaa-on-{v4,v6} settings are
  still stored in dns_view
2018-12-06 10:29:11 -08:00
Evan Hunt e2ac439e28 move filter-aaaa.so build from lib/ns to bin/hooks 2018-12-06 10:29:11 -08:00
Evan Hunt d3f0f71b6b initial implementation of filter-aaaa.so as a shared object
- temporary kluge! in this version, for testing purposes,
  named always searches for a filter-aaaa module at /tmp/filter-aaaa.so.
  this enables the filter-aaaa system test to run even though the
  code to configure hooks in named.conf hasn't been written yet.
- filter-aaaa-on-v4, filter-aaaa-on-v6 and the filter-aaaa ACL are
  still configured in the view as they were before, not in the hook.
2018-12-06 10:29:10 -08:00
Evan Hunt e4f0a98b4d move several query.c helper functions to client.c and rename
- these formerly static helper functions have been moved into client.c
  and made external so that they can be used in hook modules as well as
  internally in libns: query_newrdataset, query_putrdataset,
  query_newnamebuf, query_newname, query_getnamebuf, query_keepname,
  query_releasename, query_newdbversion, query_findversion
- made query_recurse() and query_done() into public functions
  ns_query_recurse() and ns_query_done() so they can be called from
  modules.
2018-12-06 10:29:10 -08:00
Evan Hunt 0d7ab9bafc move filter-aaaa implementation into hook functions directly 2018-12-06 10:29:10 -08:00
Evan Hunt d43dcef139 refactor filter-aaaa implementation
- the goal of this change is for AAAA filtering to be fully contained
   in the query logic, and implemented at discrete points that can be
   replaced with hook callouts later on.
 - the new code may be slightly less efficient than the old filter-aaaa
   implementation, but maximum efficiency was never a priority for AAAA
   filtering anyway.
 - we now use the rdataset RENDERED attribute to indicate that an AAAA
   rdataset should not be included when rendering the message. (this
   flag was originally meant to indicate that an rdataset has already
   been rendered and should not be repeated, but it can also be used to
   prevent rendering in the first place.)
 - the DNS_MESSAGERENDER_FILTER_AAAA, NS_CLIENTATTR_FILTER_AAAA,
   and DNS_RDATASETGLUE_FILTERAAAA flags are all now unnecessary and
   have been removed.
2018-12-06 10:29:10 -08:00
Evan Hunt 29897b14dc refactor query.c to make qctx more accessible
- the purpose of this change is allow for more well-defined hook points
  to be available in the query processing logic. some functions that
  formerly didn't have access to 'qctx' do now; this is needed because
  'qctx' is what gets passed when calling a hook function.
- query_addrdataset() has been broken up into three separate functions
  since it used to do three unrelated things, and what was formerly
  query_addadditional() has been renamed query_additional_cb() for
  clarity.
- client->filter_aaaa is now qctx->filter_aaaa. (later, it will be moved
  into opaque storage in the qctx, for use by the filter-aaaa module.)
- cleaned up style and braces
2018-12-06 10:29:10 -08:00
Evan Hunt 70cc3f803e set up hooks.c to enable setting hook points and loading modules
- move hooks.h to public include directory
- ns_hooktable_init() initializes a hook table. if NULL is passed in, it
  initializes the global hook table
- ns_hooktable_save() saves a pointer to the current global hook table.
- ns_hooktable_reset() replaces the global hook table with different
  one
- ns_hook_add() adds hooks at specified hook points in a hook table (or
  the global hook table if the specified table is NULL)
- load and unload functions support dlopen() of hook modules (this is
  adapted from dyndb and not yet functional)
- began adding new hook points to query.c
2018-12-06 10:29:05 -08:00
Ondřej Surý 6f11f90ef4 Merge branch 'mr1106-remove-some-more-algorithm-references-master' into 'master'
(master) Mr1106 remove some more algorithm references

See merge request isc-projects/bind9!1192
2018-12-06 09:39:41 -05:00
Matthijs MekkingandOndřej Surý 0737079824 Replace some more DSA examples with ECDSAP256SHA256
(cherry picked from commit 5f27dc35df7651be8bfd24138c2ccd6fd28806af)
2018-12-06 14:47:05 +01:00
Matthijs MekkingandOndřej Surý 7ef858f503 Remove one more GOST reference
We can remove this, because it is used in `strtodsdigest` but that
already no longer covers the algorithm name "GOST".

There is one more GOST reference in `bin/python/isc/checkds.py.in`
but that is used for presentation format and probably should stay.

(cherry picked from commit 57d44fbc628d3c7dafdd545f6b83dbdcdc39a986)
2018-12-06 14:47:05 +01:00
Mark Andrews 1cf2f7d077 Merge branch '756-dyndb-system-test-failing-intermittently' into 'master'
Add additional logging to driver.

See merge request isc-projects/bind9!1178
2018-12-05 19:04:40 -05:00
Mark Andrews 6a5c8ec2ea add more error logging; add event processing logging 2018-12-05 18:23:30 -05:00
Ondřej Surý d0ba302028 Merge branch '444-isc_refcount_decrement-uses-invalid-memory-ordering' into 'master'
Resolve "isc_refcount_decrement() uses invalid memory ordering"

Closes #444

See merge request isc-projects/bind9!560
2018-12-05 14:35:35 -05:00
Ondřej Surý 953a957dfa Just #define isc_refcount_increment0() to isc_refcount_increment() 2018-12-05 14:16:41 +01:00
Ondřej Surý 8537adef4c The isc_refcount_decrement must use memory_order_release and isc_refcount_destroy must run thread barrier with memory_order_require 2018-12-05 14:11:53 +01:00
Witold Krecicki 43be6ff428 Merge branch '744-race-in-socket' into 'master'
Fix a race between process_fd and socketclose in unix socket code. [GL #744]

Closes #744

See merge request isc-projects/bind9!1145
2018-12-05 07:19:32 -05:00
Witold Kręcicki ddc1d4d6d4 Fix a race between process_fd and socketclose in unix socket code. [GL #744] 2018-12-05 12:03:52 +00:00
Ondřej Surý 258ea3a8f4 Merge branch '628-refactor-masterformat-system-test' into 'master'
Refactor masterformat system test

See merge request isc-projects/bind9!1180
2018-12-05 06:22:51 -05:00
Ondřej Surý 00cc0b236a Add DNSKEY and CDNSKEY with unknown algorithm number (PRIVATEDNS) and \0 as content 2018-12-05 11:29:27 +01:00
Ondřej Surý b13c7ca402 Refactor masterformat to be shellcheck clean and don't use RSAMD5 algorithm in the tests 2018-12-05 11:29:27 +01:00
Ondřej Surý cbcf6dacb6 Merge branch '745-start.pl-and-stop.pl-cygwin-fixes' into 'master'
Make the start.pl and stop.pl more Cygwin friendly

Closes #745

See merge request isc-projects/bind9!1175
2018-12-04 09:17:06 -05:00
Ondřej Surý 835bad2c5c Make the start.pl and stop.pl more Cygwin friendly 2018-12-04 15:02:22 +01:00
Witold Krecicki 8743a853d2 Merge branch '628-dont-check-for-memory-leaks-in-dnstest.c' into 'master'
Don't check the memory leaks in the libdns tests as they hide the cmocka assertion failures

Closes #628

See merge request isc-projects/bind9!1174
2018-12-04 04:57:38 -05:00
Ondřej Surý ef87b1e60b Don't check the memory leaks in the libdns tests as they hide the cmocka assertion failures 2018-12-04 09:00:42 +01:00
Ondřej Surý 69dee61f5a Merge branch '745-fix-missing-realpath-on-centos6' into 'master'
Replace realpath with cd&pwd shell magic

See merge request isc-projects/bind9!1172
2018-12-03 15:16:11 -05:00
Ondřej Surý 88d3338f5f Replace realpath with cd&pwd shell magic 2018-12-03 20:40:59 +01:00
Witold Krecicki c644c0f283 Merge branch 'wpk-test-fixes' into 'master'
Fetchlimit and tcp test fixes

See merge request isc-projects/bind9!1150
2018-12-03 14:03:23 -05:00
Witold Kręcicki 9532e3256e tcp test: sleep for 1 second before gathering stats to make
sure that the stats are there
2018-12-03 18:49:48 +00:00
Witold Kręcicki a48ca15e77 Fetchlimit test: update softquota limit to 380.
In the test the quota is set to 400, and softquota to 90%*400=360.
We first attach to quota, and then if we're above softquota we
drop the oldest client. With new socket code and taskmgr it's
parallel enough to create a race between multiple instances doing
'attach to quota' and then 'drop oldest client' - making number
of clients go over softquota. It's not a problem in real life, as
it's just soft quota.
2018-12-03 18:49:48 +00:00
Ondřej Surý 998e3e2880 Merge branch '745-start.pl-refactoring' into 'master'
start.pl - wait for server to say 'running', refactor

Closes #745

See merge request isc-projects/bind9!1141
2018-12-03 10:58:32 -05:00
Ondřej Surý e227815af5 Make calls to the stop.pl always use the test name instead of '.' 2018-12-03 16:24:09 +01:00
Ondřej Surý 27ee629e6b stop.pl - refactor 2018-12-03 16:24:09 +01:00
Ondřej Surý 16b95157e8 Make calls to the start.pl always use the test name instead of '.' 2018-12-03 15:50:21 +01:00
Brian ConryandOndřej Surý 0fc8bfef13 start.pl - refactor 2018-12-03 15:50:21 +01:00
Brian ConryandOndřej Surý 597049461d start.pl - wait for server to say 'running' 2018-12-03 15:23:36 +01:00
Ondřej Surý 828d7121e0 Merge branch '628-improvements-to-system-tests-windows-fixes' into 'master'
Fix typos and missing ALTERNATIVE_ALGORITHM in conf.sh.win32

See merge request isc-projects/bind9!1169
2018-12-03 08:38:41 -05:00
Ondřej Surý 253c175d7b Fix typos and missing ALTERNATIVE_ALGORITHM in conf.sh.win32 2018-12-03 09:29:33 +01:00
Ondřej Surý f454d9825c Merge branch '628-improvements-to-system-tests' into 'master'
Tiny small improvements to system test scripts.

See merge request isc-projects/bind9!1166
2018-12-03 03:01:27 -05:00
Ondřej Surý b2c4c35493 Add ALTERNATIVE_ALGORITHM to conf.sh 2018-12-03 08:34:49 +01:00
Ondřej Surý 1b2a3a0ea6 Export SYSTEMTESTTOP from run.sh (so, it doesn't have to be defined in each script) and scrub / from the test names 2018-12-03 08:34:45 +01:00
Mark Andrews 7c60b78080 Merge branch '754-silence-warning-about-first-half-of-conditional-always-being-true' into 'master'
Resolve "Silence warning about first half of conditional always being true."

Closes #754

See merge request isc-projects/bind9!1162
2018-12-03 00:49:39 -05:00
Mark Andrews 5744415a75 only test for prefixlen <= 63 2018-12-03 16:26:54 +11:00
Mark Andrews 409ac247f7 Merge branch 'u/fanf2/catz-logging' into 'master'
catz: improved log message when a zone is overridden

See merge request isc-projects/bind9!1157
2018-12-02 23:38:17 -05:00
Mark Andrews e6c5ad37a4 add CHANGES note 2018-12-03 13:45:28 +11:00
Tony FinchandMark Andrews 16eb35187a catz: improved log message when a zone is overridden
If you have a catalog zone containing 10.in-addr.arpa and an
explicitly-configured version which overrides the catz version,
`named` used to log:

catz: error "success" while trying to add zone "10.in-addr.arpa"

After this patch it logs:

catz: zone "10.in-addr.arpa" is overridden by explicitly configured zone
2018-12-02 21:32:56 -05:00
Stephen Morris b78376ffc9 Merge branch '750-fix-fuzzing-jobs' into 'master'
set known non-zero pesudo-random number seed when compiling for fuzzing

Closes #502 and #750

See merge request isc-projects/bind9!1151
2018-11-30 07:27:23 -05:00
Ondřej SurýandStephen Morris d13cabd27e fixup! When compiling for fuzzing, ensure the pseudo random number seed is non-zero. 2018-11-30 11:21:55 +00:00
Stephen Morris 77032a4e29 When compiling for fuzzing, ensure the pseudo random number seed is non-zero. 2018-11-30 11:21:55 +00:00
Evan Hunt 73bc3147d1 Merge branch 'each-export-dynamic' into 'master'
set the export-dynamic linker flag on linux

See merge request isc-projects/bind9!1154
2018-11-29 02:17:32 -05:00
Evan Hunt 66fc2f7fec set the export-dynamic linker flag on linux 2018-11-29 01:50:00 -05:00
Mark Andrews b29f0c1d05 Merge branch '748-dns_catz_-are-missing-lots-of-dbc-checks' into 'master'
Resolve "dns_catz_* are missing lots of DBC checks."

Closes #748

See merge request isc-projects/bind9!1143
2018-11-28 21:15:04 -05:00
Mark Andrews a487473fc5 add missing DBC checks for catz and add isc_magic checks; add DBC checks to ht.c 2018-11-29 12:39:20 +11:00
Mark Andrews b726ca4533 Merge branch '585-dnssec-coverage-fails-with-typeerror-for-ksk-with-a-deletion-date-set' into 'master'
Resolve "dnssec-coverage fails with TypeError for KSK with a Deletion date set"

Closes #585

See merge request isc-projects/bind9!1133
2018-11-28 16:36:08 -05:00
Mark Andrews 02d20a2f53 add CHANGES note 2018-11-29 07:50:02 +11:00
Mark Andrews 6499bdfd8b use documented default key ttl 2018-11-29 07:50:02 +11:00
Mark Andrews 0ac2a868bb add reproducer for [GL #585] 2018-11-29 07:50:02 +11:00
Evan Hunt 6ab40c043d Merge branch '747-build-failure' into 'master'
silence compiler warning

Closes #747

See merge request isc-projects/bind9!1148
2018-11-28 12:14:22 -05:00
Evan Hunt b99af25d0f silence compiler warning 2018-11-28 12:00:16 -05:00
Mark Andrews 53bdf8038c Merge branch '731-catalog-zone-incorrect-logging' into 'master'
Resolve "Catalog zone incorrect logging"

Closes #731

See merge request isc-projects/bind9!1142
2018-11-28 07:31:25 -05:00
Mark Andrews 0708e43d3f update zname with the current zone anme 2018-11-28 15:59:30 +11:00
Michał Kępień e8d7292d5d Merge branch '730-fix-build-time-python-configuration' into 'master'
Fix build-time Python configuration

Closes #730

See merge request isc-projects/bind9!1128
2018-11-27 10:25:21 -05:00
Michał Kępień b94293f591 Add CHANGES entry
5101.	[bug]		Fix default installation path for Python modules and
			remove the dnspython dependency accidentally introduced
			by change 4970. [GL #730]
2018-11-27 14:09:37 +01:00
Ondřej SurýandMichał Kępień d75602406e Fix build-time Python configuration
Apply various fixes and tweaks to Python configuration logic implemented
in the "configure" script:

  - Prevent PYTHON_INSTALL_DIR, which holds the value passed to the
    --with-python-install-dir option, from being set to "unspec" by
    default as this breaks installing Python modules when the
    --with-python-install-dir option is not used.

  - Make the --with-python-install-dir option also work when the Python
    interpreter is specified explicitly (using --with-python=<...>).

  - Remove dnspython dependency which was erroneously introduced in
    commit 31b0dc1f20: no installed Python
    module depends on dnspython, it is only used in system tests, for
    which dedicated scripts exist that check whether dnspython is
    available and act accordingly.

  - Improve contents and placement of error messages.

  - Reduce duplication of code checking Python dependencies.

  - Use Autoconf macros AS_CASE() and AS_IF() instead of plain shell
    code.

  - Update comments.  Capitalize the word "Python" when referring to the
    language itself rather than a specific executable.
2018-11-27 14:09:34 +01:00
Ondřej Surý 2ecd280297 Merge branch 'ondrej-add-python-3.6-and-3.7-to-configure.ac' into 'master'
Add python3.6 and python3.7 to the search list of python versions

See merge request isc-projects/bind9!1136
2018-11-27 04:32:20 -05:00
Ondřej Surý da9038e9a0 Add python3.6 and python3.7 to the search list of python versions 2018-11-27 09:21:12 +01:00
Ondřej Surý c5b8bc0e15 Merge branch '620-fix-cmocka-includes' into 'master'
Move the CMocka include directories from CFLAGS to CINCLUDES where it belongs to…

See merge request isc-projects/bind9!1135
2018-11-26 10:41:02 -05:00
Ondřej Surý a688a43faf Move the CMocka include directories from CFLAGS to CINCLUDES where it belongs to not get overriden later by the default CFLAGS rule 2018-11-26 16:16:34 +01:00
476 changed files with 15055 additions and 12207 deletions
+64
View File
@@ -0,0 +1,64 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((c-mode .
((eval .
(set (make-local-variable 'directory-of-current-dir-locals-file)
(file-name-directory (locate-dominating-file default-directory ".dir-locals.el"))
)
)
(eval .
(set (make-local-variable 'include-directories)
(list
;; top directory
(expand-file-name
(concat directory-of-current-dir-locals-file "./"))
;; current directory
(expand-file-name (concat default-directory "./"))
;; libisc
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/unix/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/pthreads/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/include"))
;; libdns
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/dns/include"))
;; libisccc
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isccc/include"))
;; libisccfg
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isccfg/include"))
;; libns
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/ns/include"))
;; libirs
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/irs/include"))
;; libbind9
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/bind9/include"))
(expand-file-name "/usr/local/opt/openssl@1.1/include")
(expand-file-name "/usr/local/opt/libxml2/include/libxml2")
(expand-file-name "/usr/local/include")
)
)
)
(eval setq flycheck-clang-include-path include-directories)
(eval setq flycheck-cppcheck-include-path include-directories)
)
))
+96 -21
View File
@@ -82,20 +82,6 @@ stages:
- docker
- i386
.ubuntu-trusty-amd64: &ubuntu_trusty_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-amd64"
tags:
- linux
- docker
- amd64
.ubuntu-trusty-i386: &ubuntu_trusty_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-i386"
tags:
- linux
- docker
- i386
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
tags:
@@ -110,6 +96,20 @@ stages:
- docker
- i386
.ubuntu-bionic-amd64: &ubuntu_bionic_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-amd64"
tags:
- linux
- docker
- amd64
.ubuntu-bionic-i386: &ubuntu_bionic_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-i386"
tags:
- linux
- docker
- i386
.build: &build_job
stage: build
before_script:
@@ -117,12 +117,14 @@ stages:
# - ./autogen.sh
script:
- ./configure --enable-developer --with-libtool --disable-static --with-cmocka --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log
- make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
artifacts:
paths:
- doc/
expire_in: '1 hour'
untracked: true
only:
- merge_requests
.install_test: &install_test_job
stage: test
@@ -133,6 +135,7 @@ stages:
.system_test: &system_test_job
stage: test
retry: 2
before_script:
- rm -rf .ccache
- bash -x bin/tests/system/ifconfig.sh up
@@ -144,6 +147,8 @@ stages:
untracked: true
expire_in: '1 week'
when: on_failure
only:
- merge_requests
.unit_test: &unit_test_job
stage: test
@@ -161,12 +166,17 @@ stages:
- kyua_html/
expire_in: '1 week'
when: on_failure
only:
- merge_requests
sid:amd64:precheck:
<<: *debian_sid_amd64_image
stage: precheck
script:
- sh util/checklibs.sh > checklibs.out
- sh util/tabify-changes < CHANGES > CHANGES.tmp
- diff -urNap CHANGES CHANGES.tmp
- rm CHANGES.tmp
- perl util/check-changes CHANGES
- perl -w util/merge_copyrights
- diff -urNap util/copyrights util/newcopyrights
@@ -181,11 +191,15 @@ sid:amd64:precheck:
- checklibs.out
expire_in: '1 week'
when: on_failure
only:
- merge_requests
🐞:sid:amd64:precheck:
<<: *debian_sid_amd64_image
stage: precheck
script: util/check-cocci
only:
- merge_requests
docs:sid:amd64:
<<: *debian_sid_amd64_image
@@ -199,6 +213,10 @@ docs:sid:amd64:
paths:
- doc/arm/
expire_in: '1 month'
only:
- merge_requests
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
docs:push:
<<: *debian_sid_amd64_image
@@ -207,8 +225,8 @@ docs:push:
script:
- curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=master $GITLAB_PAGES_DOCS_TRIGGER_URL
only:
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
#jessie:amd64:build:
# <<: *debian_jessie_amd64_image
@@ -226,8 +244,8 @@ docs:push:
# <<: *debian_buster_i386_image
# <<: *build_job
#
#build:ubuntu:trusty:amd64:
# <<: *ubuntu_trusty_amd64_image
#build:ubuntu:bionic:amd64:
# <<: *ubuntu_bionic_amd64_image
# <<: *build_job
#
#build:ubuntu:xenial:i386:
@@ -254,6 +272,7 @@ clang:stretch:amd64:build:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
EXTRA_CONFIGURE: "--with-python=python3"
<<: *debian_stretch_amd64_image
<<: *build_job
@@ -261,7 +280,7 @@ jessie:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: --without-cmocka
EXTRA_CONFIGURE: "--without-cmocka --with-python"
<<: *debian_jessie_amd64_image
<<: *build_job
@@ -279,6 +298,10 @@ sid:amd64:build:
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_amd64_image
<<: *build_job
only:
- merge_requests
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
asan:sid:amd64:build:
variables:
@@ -293,6 +316,7 @@ clang:stretch:i386:build:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
EXTRA_CONFIGURE: "--with-python=python2"
<<: *debian_stretch_i386_image
<<: *build_job
@@ -300,7 +324,7 @@ sid:i386:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
EXTRA_CONFIGURE: "--with-libidn2 --without-python"
<<: *debian_sid_i386_image
<<: *build_job
@@ -333,6 +357,10 @@ unit:sid:amd64:
<<: *unit_test_job
dependencies:
- sid:amd64:build
only:
- merge_requests
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
unit:asan:sid:amd64:
<<: *debian_sid_amd64_image
@@ -381,6 +409,10 @@ system:sid:amd64:
<<: *system_test_job
dependencies:
- sid:amd64:build
only:
- merge_requests
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
system:asan:sid:amd64:
<<: *debian_sid_amd64_image
@@ -399,6 +431,10 @@ install:sid:amd64:
<<: *install_test_job
dependencies:
- sid:amd64:build
only:
- merge_requests
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
pkcs11:sid:amd64:build:
variables:
@@ -439,3 +475,42 @@ noassert:system:sid:amd64:
<<: *system_test_job
dependencies:
- noassert:sid:amd64:build
xenial:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *ubuntu_xenial_amd64_image
<<: *build_job
unit:xenial:amd64:
<<: *ubuntu_xenial_amd64_image
<<: *unit_test_job
dependencies:
- xenial:amd64:build
system:xenial:amd64:
<<: *ubuntu_xenial_amd64_image
<<: *system_test_job
dependencies:
- xenial:amd64:build
bionic:amd64:build:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *ubuntu_bionic_amd64_image
<<: *build_job
unit:bionic:amd64:
<<: *ubuntu_bionic_amd64_image
<<: *unit_test_job
dependencies:
- bionic:amd64:build
system:bionic:amd64:
<<: *ubuntu_bionic_amd64_image
<<: *system_test_job
dependencies:
- bionic:amd64:build
+135
View File
@@ -1,3 +1,138 @@
5139. [bug] If possible, don't use forwarders when priming.
This ensures we can get root server IP addresses
from priming query response glue, which may not
be present if the forwarding server is returning
minimal responses. [GL #752]
5138. [bug] Under some circumstances named could hit an assertion
failure when doing qname minimization when using
forwarders. [GL #797]
5137. [func] named now logs messages whenever a mirror zone becomes
usable or unusable for resolution purposes. [GL #818]
5136. [cleanup] Check in named-checkconf that allow-update and
allow-update-forwarding are not set at the
view/options level; fix documentation. [GL #512]
5135. [port] sparc: Use smt_pause() instead of pause. [GL #816]
5134. [bug] win32: WSAStartup was not called before getservbyname
was called. [GL #590]
5133. [bug] 'rndc managed-keys' didn't handle class and view
correctly and failed to add new lines between each
view. [GL !1327]
5132. [bug] Fix race condition in cleanup part of dns_dt_create().
[GL !1323]
5131. [cleanup] Address Coverity warnings. [GL #801]
5130. [cleanup] Remove support for l10n message catalogs. [GL #709]
5129. [contrib] sdlz_helper.c:build_querylist was not properly
splitting the query string. [GL #798]
5128. [bug] Refreshkeytime was not being updated for managed
keys zones. [GL #784]
5127. [bug] rcode.c:maybe_numeric failed to handle NUL in text
regions. [GL #807]
5126. [bug] Named incorrectly accepted empty base64 and hex encoded
fields when reading master files. [GL #807]
5125. [bug] Allow for up to 100 records or 64k of data when caching
a negative response. [GL #804]
5124. [bug] Named could incorrectly return FORMERR rather than
SERVFAIL. [GL #804]
5123. [bug] dig could hang indefinitely after encountering an error
before creating a TCP socket. [GL #692]
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]
5121. [contrib] dlz_stub_driver.c fails to return ISC_R_NOTFOUND on none
matching zone names. [GL !1299]
5120. [placeholder]
5119. [placeholder]
5118. [placeholder]
5117. [placeholder]
5116. [bug] Named/named-checkconf triggered a assertion when
a mirror zone's name is bad. [GL #778]
5115. [bug] Allow unsupported algorithms in zone when not used for
signing with dnssec-signzone. [GL #783]
5114. [func] Include a 'reconfig/reload in progress' status line
in rndc status, use it in tests.
5113. [port] Fixed a Windows build error.
5112. [bug] Named/named-checkconf could dump core if there was
a missing masters clause and a bad notify clause.
[GL #779]
5111. [bug] Occluded DNSKEY records could make it into the
delegating NSEC/NSEC3 bitmap. [GL #742]
5110. [placeholder]
5109. [cleanup] Remove support for RSAMD5 algorithm. [GL #628]
--- 9.13.5 released ---
5108. [bug] Named could fail to determine bottom of zone when
removing out of date keys leading to invalid NSEC
and NSEC3 records being added to the zone. [GL #771]
5107. [bug] 'host -U' did not work. [GL #769]
5106. [experimental] A new "plugin" mechanism has been added to allow
extension of query processing functionality through
the use of dynamically loadable libraries. A
"filter-aaaa.so" plugin has been implemented,
replacing the filter-aaaa feature that was formerly
implemented as a native part of BIND.
The "filter-aaaa", "filter-aaaa-on-v4" and
"filter-aaaa-on-v6" options can no longer be
configured using native named.conf syntax. However,
loading the filter-aaaa.so plugin and setting its
parameters provides identical functionality.
Note that the plugin API is a work in progress and
is likely to evolve as further plugins are
implemented. [GL #15]
5105. [bug] Fix a race between process_fd and socketclose in
unix socket code. [GL #744]
5104. [cleanup] Log clearer informational message when a catz zone
is overridden by a zone in named.conf.
Thanks to Tony Finch. [GL !1157]
5103. [bug] Add missing design by contract tests to dns_catz*.
[GL #748]
5102. [bug] dnssec-coverage failed to use the default TTL when
checking KSK deletion times leading to a exception.
[GL #585]
5101. [bug] Fix default installation path for Python modules and
remove the dnspython dependency accidentally introduced
by change 4970. [GL #730]
5100. [func] Pin resolver tasks to specific task queues. [GL !1117]
5099. [func] Failed mutex and conditional creations are always
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (C) 1996-2018 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 1996-2019 Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
+4
View File
@@ -104,6 +104,10 @@ BIND 9.13 features
BIND 9.13 is the newest development branch of BIND 9. It includes a number
of changes from BIND 9.12 and earlier releases. New features include:
* A new "plugin" mechanism has been added to allow query functionality
to be extended using dynamically loadable libraries. The "filter-aaaa"
feature has been removed from named and is now implemented as a
plugin.
* Socket and task code has been refactored to improve performance.
* QNAME minimization, as described in RFC 7816, is now supported.
* "Root key sentinel" support, enabling validating resolvers to indicate
+4 -1
View File
@@ -122,6 +122,9 @@ BIND 9.13 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.12 and earlier releases. New features
include:
* A new "plugin" mechanism has been added to allow query functionality
to be extended using dynamically loadable libraries. The "filter-aaaa"
feature has been removed from named and is now implemented as a plugin.
* Socket and task code has been refactored to improve performance.
* QNAME minimization, as described in RFC 7816, is now supported.
* "Root key sentinel" support, enabling validating resolvers to indicate
@@ -144,7 +147,7 @@ for more details.
Cryptographic support has been modernized. BIND now uses the
best available pseudo-random number generator for the platform on which
it's built. Very old versions of OpenSSL are no longer supported.
Cryptography is now mandatory: building BIND without DNSSEC is now
Cryptography is now mandatory: building BIND without DNSSEC is no
longer supported.
Special code to support certain legacy operating systems has also
+1 -1
View File
@@ -12,7 +12,7 @@ VPATH = @srcdir@
top_srcdir = @top_srcdir@
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests
TARGETS =
@BIND9_MAKE_RULES@
+1 -1
View File
@@ -66,7 +66,7 @@ named-checkzone.@O@: named-checkzone.c
named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
${NSDEPENDLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \
export LIBS0="${NSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
export LIBS0="${BIND9LIBS} ${NSLIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
${FINALBUILDCMD}
named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} \
+8 -1
View File
@@ -39,7 +39,7 @@
named-checkconf \- named configuration file syntax checking tool
.SH "SYNOPSIS"
.HP \w'\fBnamed\-checkconf\fR\ 'u
\fBnamed\-checkconf\fR [\fB\-hjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
\fBnamed\-checkconf\fR [\fB\-chjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
.SH "DESCRIPTION"
.PP
\fBnamed\-checkconf\fR
@@ -79,6 +79,13 @@ When loading a zonefile read the journal if it exists\&.
List all the configured zones\&. Each line of output contains the zone name, class (e\&.g\&. IN), view, and type (e\&.g\&. master or slave)\&.
.RE
.PP
\-c
.RS 4
Check "core" configuration only\&. This suppresses the loading of plugin modules, and causes all parameters to
\fBplugin\fR
statements to be ignored\&.
.RE
.PP
\-p
.RS 4
Print out the
+10 -3
View File
@@ -46,6 +46,8 @@
static const char *program = "named-checkconf";
static bool loadplugins = true;
isc_log_t *logc = NULL;
#define CHECK(r)\
@@ -562,7 +564,7 @@ main(int argc, char **argv) {
/*
* Process memory debugging argument first.
*/
#define CMDLINE_FLAGS "dhjlm:t:pvxz"
#define CMDLINE_FLAGS "cdhjlm:t:pvxz"
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (c) {
case 'm':
@@ -587,6 +589,10 @@ main(int argc, char **argv) {
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
switch (c) {
case 'c':
loadplugins = false;
break;
case 'd':
debug++;
break;
@@ -677,9 +683,10 @@ main(int argc, char **argv) {
ISC_R_SUCCESS)
exit(1);
result = bind9_check_namedconf(config, logc, mctx);
if (result != ISC_R_SUCCESS)
result = bind9_check_namedconf(config, loadplugins, logc, mctx);
if (result != ISC_R_SUCCESS) {
exit_status = 1;
}
if (result == ISC_R_SUCCESS && (load_zones || list_zones)) {
result = load_zones_fromconfig(config, mctx, list_zones);
+13 -1
View File
@@ -40,6 +40,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -52,7 +53,7 @@
<refsynopsisdiv>
<cmdsynopsis sepchar=" ">
<command>named-checkconf</command>
<arg choice="opt" rep="norepeat"><option>-hjlvz</option></arg>
<arg choice="opt" rep="norepeat"><option>-chjlvz</option></arg>
<arg choice="opt" rep="norepeat"><option>-p</option>
<arg choice="opt" rep="norepeat"><option>-x</option>
</arg></arg>
@@ -114,6 +115,17 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-c</term>
<listitem>
<para>
Check "core" configuration only. This suppresses the loading
of plugin modules, and causes all parameters to
<command>plugin</command> statements to be ignored.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-p</term>
<listitem>
+9 -1
View File
@@ -33,7 +33,7 @@
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p>
<code class="command">named-checkconf</code>
[<code class="option">-hjlvz</code>]
[<code class="option">-chjlvz</code>]
[<code class="option">-p</code>
[<code class="option">-x</code>
]]
@@ -88,6 +88,14 @@
(e.g. master or slave).
</p>
</dd>
<dt><span class="term">-c</span></dt>
<dd>
<p>
Check "core" configuration only. This suppresses the loading
of plugin modules, and causes all parameters to
<span class="command"><strong>plugin</strong></span> statements to be ignored.
</p>
</dd>
<dt><span class="term">-p</span></dt>
<dd>
<p>
+1
View File
@@ -43,6 +43,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -37,6 +37,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -44,6 +44,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -39,6 +39,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -52,6 +52,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+37 -32
View File
@@ -2730,27 +2730,6 @@ send_tcp_connect(dig_query_t *query) {
return;
}
if (specified_source &&
(isc_sockaddr_pf(&query->sockaddr) !=
isc_sockaddr_pf(&bind_address))) {
printf(";; Skipping server %s, incompatible "
"address family\n", query->servname);
query->waiting_connect = false;
if (ISC_LINK_LINKED(query, link))
next = ISC_LIST_NEXT(query, link);
else
next = NULL;
l = query->lookup;
clear_query(query);
if (next == NULL) {
printf(";; No acceptable nameservers\n");
check_next_lookup(l);
return;
}
send_tcp_connect(next);
return;
}
INSIST(query->sock == NULL);
if (keep != NULL && isc_sockaddr_equal(&keepaddr, &query->sockaddr)) {
@@ -2901,6 +2880,36 @@ send_udp(dig_query_t *query) {
sendcount++;
}
/*%
* If there are more servers available for querying within 'lookup', initiate a
* TCP or UDP query to the next available server and return true; otherwise,
* return false.
*/
static bool
try_next_server(dig_lookup_t *lookup) {
dig_query_t *current_query, *next_query;
current_query = lookup->current_query;
if (current_query == NULL || !ISC_LINK_LINKED(current_query, link)) {
return (false);
}
next_query = ISC_LIST_NEXT(current_query, link);
if (next_query == NULL) {
return (false);
}
debug("trying next server...");
if (lookup->tcp_mode) {
send_tcp_connect(next_query);
} else {
send_udp(next_query);
}
return (true);
}
/*%
* IO timeout handler, used for both connect and recv timeouts. If
* retries are still allowed, either resend the UDP packet or queue a
@@ -2909,7 +2918,7 @@ send_udp(dig_query_t *query) {
static void
connect_timeout(isc_task_t *task, isc_event_t *event) {
dig_lookup_t *l = NULL;
dig_query_t *query = NULL, *cq;
dig_query_t *query = NULL;
UNUSED(task);
REQUIRE(event->ev_type == ISC_TIMEREVENT_IDLE);
@@ -2929,18 +2938,14 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
return;
}
if ((query != NULL) && (query->lookup->current_query != NULL) &&
ISC_LINK_LINKED(query->lookup->current_query, link) &&
(ISC_LIST_NEXT(query->lookup->current_query, link) != NULL)) {
debug("trying next server...");
cq = query->lookup->current_query;
if (!l->tcp_mode)
send_udp(ISC_LIST_NEXT(cq, link));
else {
if (query->sock != NULL)
if (try_next_server(l)) {
if (l->tcp_mode) {
if (query->sock != NULL) {
isc_socket_cancel(query->sock, NULL,
ISC_SOCKCANCEL_ALL);
send_tcp_connect(ISC_LIST_NEXT(cq, link));
} else {
clear_query(query);
}
}
UNLOCK_LOOKUP;
return;
+11 -9
View File
@@ -151,6 +151,7 @@ show_usage(void) {
" -s a SERVFAIL response should stop query\n"
" -t specifies the query type\n"
" -T enables TCP/IP mode\n"
" -U enables UDP mode\n"
" -v enables verbose output\n"
" -V print version number and exit\n"
" -w specifies to wait forever for a reply\n"
@@ -624,28 +625,29 @@ pre_parse_args(int argc, char **argv) {
case 'a': break;
case 'A': break;
case 'c': break;
case 'C': break;
case 'd': break;
case 'D':
if (debugging)
debugtiming = true;
debugging = true;
break;
case 'i': break;
case 'l': break;
case 'n': break;
case 'N': break;
case 'r': break;
case 'R': break;
case 's': break;
case 't': break;
case 'T': break;
case 'U': break;
case 'v': break;
case 'V':
version();
exit(0);
break;
case 'w': break;
case 'C': break;
case 'D':
if (debugging)
debugtiming = true;
debugging = true;
break;
case 'N': break;
case 'R': break;
case 'T': break;
case 'W': break;
default:
show_usage();
+1
View File
@@ -47,6 +47,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -71,6 +71,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1 -1
View File
@@ -573,7 +573,7 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset,
ki->algo = dnskey.algorithm;
dns_rdata_toregion(keyrdata, &r);
ki->tag = dst_region_computeid(&r, ki->algo);
ki->tag = dst_region_computeid(&r);
ki->dst = NULL;
if (!match_key_dsset(ki, dsset, strictness)) {
+1
View File
@@ -40,6 +40,7 @@
<copyright>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1 -1
View File
@@ -330,7 +330,7 @@ usage(void) {
fprintf(stderr, " -K <directory>: directory in which to find "
"key file or keyset file\n");
fprintf(stderr, " -a algorithm: digest algorithm "
"(SHA-1, SHA-256, GOST or SHA-384)\n");
"(SHA-1, SHA-256 or SHA-384)\n");
fprintf(stderr, " -1: use SHA-1\n");
fprintf(stderr, " -2: use SHA-256\n");
fprintf(stderr, " -C: print CDS record\n");
+1
View File
@@ -41,6 +41,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -38,6 +38,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+13 -21
View File
@@ -64,7 +64,7 @@ usage(void) {
fprintf(stderr, " name: owner of the key\n");
fprintf(stderr, "Other options:\n");
fprintf(stderr, " -a algorithm: \n"
" RSA | RSAMD5 | DH | RSASHA1 |\n"
" DH | RSASHA1 |\n"
" NSEC3RSASHA1 |\n"
" RSASHA256 | RSASHA512 |\n"
" ECDSAP256SHA256 | ECDSAP384SHA384\n");
@@ -382,22 +382,14 @@ main(int argc, char **argv) {
fatal("no algorithm specified");
}
if (strcasecmp(algname, "RSA") == 0) {
fprintf(stderr, "The use of RSA (RSAMD5) is not "
"recommended.\nIf you still wish to "
"use RSA (RSAMD5) please specify "
"\"-a RSAMD5\"\n");
if (freeit != NULL)
free(freeit);
return (1);
} else {
r.base = algname;
r.length = strlen(algname);
ret = dns_secalg_fromtext(&alg, &r);
if (ret != ISC_R_SUCCESS)
fatal("unknown algorithm %s", algname);
if (alg == DST_ALG_DH)
options |= DST_TYPE_KEY;
r.base = algname;
r.length = strlen(algname);
ret = dns_secalg_fromtext(&alg, &r);
if (ret != ISC_R_SUCCESS) {
fatal("unknown algorithm %s", algname);
}
if (alg == DST_ALG_DH) {
options |= DST_TYPE_KEY;
}
if (use_nsec3) {
@@ -639,10 +631,10 @@ main(int argc, char **argv) {
if (setdel)
dst_key_settime(key, DST_TIME_DELETE, deltime);
if (setsyncadd)
dst_key_settime(key, DST_TIME_SYNCPUBLISH, syncadd);
if (setsyncdel)
dst_key_settime(key, DST_TIME_SYNCDELETE, syncdel);
if (setsyncadd)
dst_key_settime(key, DST_TIME_SYNCPUBLISH, syncadd);
if (setsyncdel)
dst_key_settime(key, DST_TIME_SYNCDELETE, syncdel);
} else {
if (setpub || setact || setrev || setinact ||
+2 -1
View File
@@ -43,6 +43,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -105,7 +106,7 @@
<listitem>
<para>
Selects the cryptographic algorithm. The value of
<option>algorithm</option> must be one of RSAMD5, RSASHA1,
<option>algorithm</option> must be one of RSASHA1,
NSEC3RSASHA1, RSASHA256, RSASHA512,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
</para>
+5 -5
View File
@@ -327,21 +327,21 @@ and
files are generated for symmetric cryptography algorithms such as HMAC\-MD5, even though the public and private key are equivalent\&.
.SH "EXAMPLE"
.PP
To generate a 768\-bit DSA key for the domain
To generate an ECDSAP256SHA256 key for the domain
\fBexample\&.com\fR, the following command would be issued:
.PP
\fBdnssec\-keygen \-a DSA \-b 768 \-n ZONE example\&.com\fR
\fBdnssec\-keygen \-a ECDSAP256SHA256 \-n ZONE example\&.com\fR
.PP
The command would print a string of the form:
.PP
\fBKexample\&.com\&.+003+26160\fR
\fBKexample\&.com\&.+013+26160\fR
.PP
In this example,
\fBdnssec\-keygen\fR
creates the files
Kexample\&.com\&.+003+26160\&.key
Kexample\&.com\&.+013+26160\&.key
and
Kexample\&.com\&.+003+26160\&.private\&.
Kexample\&.com\&.+013+26160\&.private\&.
.SH "SEE ALSO"
.PP
\fBdnssec-signzone\fR(8),
+9 -22
View File
@@ -79,14 +79,12 @@ usage(void) {
fprintf(stderr, "Options:\n");
fprintf(stderr, " -K <directory>: write keys into directory\n");
fprintf(stderr, " -a <algorithm>:\n");
fprintf(stderr, " RSA | RSAMD5 | RSASHA1 | NSEC3RSASHA1"
" |\n");
fprintf(stderr, " RSASHA1 | NSEC3RSASHA1 |\n");
fprintf(stderr, " RSASHA256 | RSASHA512 |\n");
fprintf(stderr, " ECDSAP256SHA256 | ECDSAP384SHA384 |\n");
fprintf(stderr, " ED25519 | ED448 | DH\n");
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
fprintf(stderr, " -b <key size in bits>:\n");
fprintf(stderr, " RSAMD5:\t[1024..%d]\n", MAX_RSA);
fprintf(stderr, " RSASHA1:\t[1024..%d]\n", MAX_RSA);
fprintf(stderr, " NSEC3RSASHA1:\t[1024..%d]\n", MAX_RSA);
fprintf(stderr, " RSASHA256:\t[1024..%d]\n", MAX_RSA);
@@ -508,23 +506,14 @@ main(int argc, char **argv) {
fatal("no algorithm specified");
}
if (strcasecmp(algname, "RSA") == 0) {
fprintf(stderr, "The use of RSA (RSAMD5) is not "
"recommended.\nIf you still wish to "
"use RSA (RSAMD5) please specify "
"\"-a RSAMD5\"\n");
INSIST(freeit == NULL);
return (1);
} else {
r.base = algname;
r.length = strlen(algname);
ret = dns_secalg_fromtext(&alg, &r);
if (ret != ISC_R_SUCCESS) {
fatal("unknown algorithm %s", algname);
}
if (alg == DST_ALG_DH) {
options |= DST_TYPE_KEY;
}
r.base = algname;
r.length = strlen(algname);
ret = dns_secalg_fromtext(&alg, &r);
if (ret != ISC_R_SUCCESS) {
fatal("unknown algorithm %s", algname);
}
if (alg == DST_ALG_DH) {
options |= DST_TYPE_KEY;
}
if (!dst_algorithm_supported(alg)) {
@@ -698,7 +687,6 @@ main(int argc, char **argv) {
}
switch (alg) {
case DNS_KEYALG_RSAMD5:
case DNS_KEYALG_RSASHA1:
case DNS_KEYALG_NSEC3RSASHA1:
case DNS_KEYALG_RSASHA256:
@@ -780,7 +768,6 @@ main(int argc, char **argv) {
}
switch(alg) {
case DNS_KEYALG_RSAMD5:
case DNS_KEYALG_RSASHA1:
case DNS_KEYALG_NSEC3RSASHA1:
case DNS_KEYALG_RSASHA256:
+7 -6
View File
@@ -50,6 +50,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -122,7 +123,7 @@
<listitem>
<para>
Selects the cryptographic algorithm. For DNSSEC keys, the value
of <option>algorithm</option> must be one of RSAMD5, RSASHA1,
of <option>algorithm</option> must be one of RSASHA1,
NSEC3RSASHA1, RSASHA256, RSASHA512,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
TKEY, the value must be DH (Diffie Hellman); specifying
@@ -605,22 +606,22 @@
<refsection><info><title>EXAMPLE</title></info>
<para>
To generate a 768-bit DSA key for the domain
To generate an ECDSAP256SHA256 key for the domain
<userinput>example.com</userinput>, the following command would be
issued:
</para>
<para><userinput>dnssec-keygen -a DSA -b 768 -n ZONE example.com</userinput>
<para><userinput>dnssec-keygen -a ECDSAP256SHA256 -n ZONE example.com</userinput>
</para>
<para>
The command would print a string of the form:
</para>
<para><userinput>Kexample.com.+003+26160</userinput>
<para><userinput>Kexample.com.+013+26160</userinput>
</para>
<para>
In this example, <command>dnssec-keygen</command> creates
the files <filename>Kexample.com.+003+26160.key</filename>
the files <filename>Kexample.com.+013+26160.key</filename>
and
<filename>Kexample.com.+003+26160.private</filename>.
<filename>Kexample.com.+013+26160.private</filename>.
</para>
</refsection>
+5 -5
View File
@@ -498,22 +498,22 @@
<a name="id-1.11"></a><h2>EXAMPLE</h2>
<p>
To generate a 768-bit DSA key for the domain
To generate an ECDSAP256SHA256 key for the domain
<strong class="userinput"><code>example.com</code></strong>, the following command would be
issued:
</p>
<p><strong class="userinput"><code>dnssec-keygen -a DSA -b 768 -n ZONE example.com</code></strong>
<p><strong class="userinput"><code>dnssec-keygen -a ECDSAP256SHA256 -n ZONE example.com</code></strong>
</p>
<p>
The command would print a string of the form:
</p>
<p><strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
<p><strong class="userinput"><code>Kexample.com.+013+26160</code></strong>
</p>
<p>
In this example, <span class="command"><strong>dnssec-keygen</strong></span> creates
the files <code class="filename">Kexample.com.+003+26160.key</code>
the files <code class="filename">Kexample.com.+013+26160.key</code>
and
<code class="filename">Kexample.com.+003+26160.private</code>.
<code class="filename">Kexample.com.+013+26160.private</code>.
</p>
</div>
+1 -1
View File
@@ -239,7 +239,7 @@ main(int argc, char **argv) {
* Remove old key file, if told to (and if
* it isn't the same as the new file)
*/
if (removefile && dst_key_alg(key) != DST_ALG_RSAMD5) {
if (removefile) {
isc_buffer_init(&buf, oldname, sizeof(oldname));
dst_key_setflags(key, flags & ~DNS_KEYFLAG_REVOKE);
dst_key_buildfilename(key, DST_TYPE_PRIVATE, dir, &buf);
+1
View File
@@ -38,6 +38,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -40,6 +40,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+3 -3
View File
@@ -415,9 +415,9 @@ Specify which keys should be used to sign the zone\&. If no keys are specified,
.PP
The following command signs the
\fBexample\&.com\fR
zone with the DSA key generated by
zone with the ECDSAP256SHA256 key generated by key generated by
\fBdnssec\-keygen\fR
(Kexample\&.com\&.+003+17247)\&. Because the
(Kexample\&.com\&.+013+17247)\&. Because the
\fB\-S\fR
option is not being used, the zone\*(Aqs keys must be in the master file (db\&.example\&.com)\&. This invocation looks for
dsset
@@ -428,7 +428,7 @@ files, in the current directory, so that DS records can be imported from them (\
.\}
.nf
% dnssec\-signzone \-g \-o example\&.com db\&.example\&.com \e
Kexample\&.com\&.+003+17247
Kexample\&.com\&.+013+17247
db\&.example\&.com\&.signed
%
.fi
+6 -4
View File
@@ -50,6 +50,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -787,15 +788,16 @@
<para>
The following command signs the <userinput>example.com</userinput>
zone with the DSA key generated by <command>dnssec-keygen</command>
(Kexample.com.+003+17247). Because the <command>-S</command> option
is not being used, the zone's keys must be in the master file
zone with the ECDSAP256SHA256 key generated by key generated by
<command>dnssec-keygen</command> (Kexample.com.+013+17247).
Because the <command>-S</command> option is not being used,
the zone's keys must be in the master file
(<filename>db.example.com</filename>). This invocation looks
for <filename>dsset</filename> files, in the current directory,
so that DS records can be imported from them (<command>-g</command>).
</para>
<programlisting>% dnssec-signzone -g -o example.com db.example.com \
Kexample.com.+003+17247
Kexample.com.+013+17247
db.example.com.signed
%</programlisting>
<para>
+5 -4
View File
@@ -624,15 +624,16 @@
<p>
The following command signs the <strong class="userinput"><code>example.com</code></strong>
zone with the DSA key generated by <span class="command"><strong>dnssec-keygen</strong></span>
(Kexample.com.+003+17247). Because the <span class="command"><strong>-S</strong></span> option
is not being used, the zone's keys must be in the master file
zone with the ECDSAP256SHA256 key generated by key generated by
<span class="command"><strong>dnssec-keygen</strong></span> (Kexample.com.+013+17247).
Because the <span class="command"><strong>-S</strong></span> option is not being used,
the zone's keys must be in the master file
(<code class="filename">db.example.com</code>). This invocation looks
for <code class="filename">dsset</code> files, in the current directory,
so that DS records can be imported from them (<span class="command"><strong>-g</strong></span>).
</p>
<pre class="programlisting">% dnssec-signzone -g -o example.com db.example.com \
Kexample.com.+003+17247
Kexample.com.+013+17247
db.example.com.signed
%</pre>
<p>
+1
View File
@@ -37,6 +37,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1 -4
View File
@@ -154,10 +154,7 @@ options {\n\
# fetch-glue <obsolete>;\n\
fetch-quota-params 100 0.1 0.3 0.7;\n\
fetches-per-server 0;\n\
fetches-per-zone 0;\n\
filter-aaaa-on-v4 no;\n\
filter-aaaa-on-v6 no;\n\
filter-aaaa { any; };\n"
fetches-per-zone 0;\n"
#ifdef HAVE_GEOIP
" geoip-use-ecs yes;\n"
#endif
+71 -69
View File
@@ -152,16 +152,11 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
"received control channel command '%s'",
cmdline);
if (command_compare(command, NAMED_COMMAND_RELOAD)) {
result = named_server_reloadcommand(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_RECONFIG)) {
result = named_server_reconfigcommand(named_g_server);
} else if (command_compare(command, NAMED_COMMAND_REFRESH)) {
result = named_server_refreshcommand(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_RETRANSFER)) {
result = named_server_retransfercommand(named_g_server,
lex, text);
} else if (command_compare(command, NAMED_COMMAND_HALT)) {
/*
* After the lengthy "halt" and "stop", the commands are
* handled in alphabetical order of the NAMED_COMMAND_ macros.
*/
if (command_compare(command, NAMED_COMMAND_HALT)) {
#ifdef HAVE_LIBSCF
/*
* If we are managed by smf(5), AND in chroot, then
@@ -206,83 +201,90 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
named_os_shutdownmsg(cmdline, *text);
isc_app_shutdown();
result = ISC_R_SUCCESS;
} else if (command_compare(command, NAMED_COMMAND_DUMPSTATS)) {
result = named_server_dumpstats(named_g_server);
} else if (command_compare(command, NAMED_COMMAND_QUERYLOG)) {
result = named_server_togglequerylog(named_g_server, lex);
} else if (command_compare(command, NAMED_COMMAND_ADDZONE) ||
command_compare(command, NAMED_COMMAND_MODZONE)) {
result = named_server_changezone(named_g_server, cmdline, text);
} else if (command_compare(command, NAMED_COMMAND_DELZONE)) {
result = named_server_delzone(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_DNSTAP) ||
command_compare(command, NAMED_COMMAND_DNSTAPREOPEN)) {
result = named_server_dnstap(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_DUMPDB)) {
named_server_dumpdb(named_g_server, lex, text);
result = ISC_R_SUCCESS;
} else if (command_compare(command, NAMED_COMMAND_SECROOTS)) {
result = named_server_dumpsecroots(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_TRACE)) {
result = named_server_setdebuglevel(named_g_server, lex);
} else if (command_compare(command, NAMED_COMMAND_NOTRACE)) {
named_g_debuglevel = 0;
isc_log_setdebuglevel(named_g_lctx, named_g_debuglevel);
result = ISC_R_SUCCESS;
} else if (command_compare(command, NAMED_COMMAND_DUMPSTATS)) {
result = named_server_dumpstats(named_g_server);
} else if (command_compare(command, NAMED_COMMAND_FLUSH)) {
result = named_server_flushcache(named_g_server, lex);
} else if (command_compare(command, NAMED_COMMAND_FLUSHNAME)) {
result = named_server_flushnode(named_g_server, lex, false);
} else if (command_compare(command, NAMED_COMMAND_FLUSHTREE)) {
result = named_server_flushnode(named_g_server, lex, true);
} else if (command_compare(command, NAMED_COMMAND_STATUS)) {
result = named_server_status(named_g_server, text);
} else if (command_compare(command, NAMED_COMMAND_TSIGLIST)) {
result = named_server_tsiglist(named_g_server, text);
} else if (command_compare(command, NAMED_COMMAND_TSIGDELETE)) {
result = named_server_tsigdelete(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_FREEZE)) {
result = named_server_freeze(named_g_server, true, lex,
text);
} else if (command_compare(command, NAMED_COMMAND_UNFREEZE) ||
command_compare(command, NAMED_COMMAND_THAW)) {
result = named_server_freeze(named_g_server, false, lex,
text);
} else if (command_compare(command, NAMED_COMMAND_SCAN)) {
result = ISC_R_SUCCESS;
named_server_scan_interfaces(named_g_server);
} else if (command_compare(command, NAMED_COMMAND_SYNC)) {
result = named_server_sync(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_RECURSING)) {
result = named_server_dumprecursing(named_g_server);
} else if (command_compare(command, NAMED_COMMAND_TIMERPOKE)) {
result = ISC_R_SUCCESS;
isc_timermgr_poke(named_g_timermgr);
} else if (command_compare(command, NAMED_COMMAND_NULL)) {
result = ISC_R_SUCCESS;
result = named_server_freeze(named_g_server, true, lex, text);
} else if (command_compare(command, NAMED_COMMAND_LOADKEYS) ||
command_compare(command, NAMED_COMMAND_SIGN)) {
result = named_server_rekey(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_MKEYS)) {
result = named_server_mkeys(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_NOTIFY)) {
result = named_server_notifycommand(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_VALIDATION)) {
result = named_server_validation(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_SIGN) ||
command_compare(command, NAMED_COMMAND_LOADKEYS)) {
result = named_server_rekey(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_ADDZONE) ||
command_compare(command, NAMED_COMMAND_MODZONE)) {
result = named_server_changezone(named_g_server, cmdline, text);
} else if (command_compare(command, NAMED_COMMAND_DELZONE)) {
result = named_server_delzone(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_NOTRACE)) {
named_g_debuglevel = 0;
isc_log_setdebuglevel(named_g_lctx, named_g_debuglevel);
result = ISC_R_SUCCESS;
} else if (command_compare(command, NAMED_COMMAND_NTA)) {
result = named_server_nta(named_g_server, lex, readonly, text);
} else if (command_compare(command, NAMED_COMMAND_NULL)) {
result = ISC_R_SUCCESS;
} else if (command_compare(command, NAMED_COMMAND_QUERYLOG)) {
result = named_server_togglequerylog(named_g_server, lex);
} else if (command_compare(command, NAMED_COMMAND_RECONFIG)) {
result = named_server_reconfigcommand(named_g_server);
} else if (command_compare(command, NAMED_COMMAND_RECURSING)) {
result = named_server_dumprecursing(named_g_server);
} else if (command_compare(command, NAMED_COMMAND_REFRESH)) {
result = named_server_refreshcommand(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_RELOAD)) {
result = named_server_reloadcommand(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_RETRANSFER)) {
result = named_server_retransfercommand(named_g_server,
lex, text);
} else if (command_compare(command, NAMED_COMMAND_SCAN)) {
named_server_scan_interfaces(named_g_server);
result = ISC_R_SUCCESS;
} else if (command_compare(command, NAMED_COMMAND_SECROOTS)) {
result = named_server_dumpsecroots(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_SERVESTALE)) {
result = named_server_servestale(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_SHOWZONE)) {
result = named_server_showzone(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_SIGNING)) {
result = named_server_signing(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_ZONESTATUS)) {
result = named_server_zonestatus(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_NTA)) {
result = named_server_nta(named_g_server, lex, readonly, text);
} else if (command_compare(command, NAMED_COMMAND_TESTGEN)) {
result = named_server_testgen(lex, text);
} else if (command_compare(command, NAMED_COMMAND_MKEYS)) {
result = named_server_mkeys(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_DNSTAP) ||
command_compare(command, NAMED_COMMAND_DNSTAPREOPEN)) {
result = named_server_dnstap(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_STATUS)) {
result = named_server_status(named_g_server, text);
} else if (command_compare(command, NAMED_COMMAND_SYNC)) {
result = named_server_sync(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_TCPTIMEOUTS)) {
result = named_server_tcptimeouts(lex, text);
} else if (command_compare(command, NAMED_COMMAND_SERVESTALE)) {
result = named_server_servestale(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_TESTGEN)) {
result = named_server_testgen(lex, text);
} else if (command_compare(command, NAMED_COMMAND_THAW) ||
command_compare(command, NAMED_COMMAND_UNFREEZE)) {
result = named_server_freeze(named_g_server, false, lex, text);
} else if (command_compare(command, NAMED_COMMAND_TIMERPOKE)) {
isc_timermgr_poke(named_g_timermgr);
result = ISC_R_SUCCESS;
} else if (command_compare(command, NAMED_COMMAND_TRACE)) {
result = named_server_setdebuglevel(named_g_server, lex);
} else if (command_compare(command, NAMED_COMMAND_TSIGDELETE)) {
result = named_server_tsigdelete(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_TSIGLIST)) {
result = named_server_tsiglist(named_g_server, text);
} else if (command_compare(command, NAMED_COMMAND_VALIDATION)) {
result = named_server_validation(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_ZONESTATUS)) {
result = named_server_zonestatus(named_g_server, lex, text);
} else {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_CONTROL, ISC_LOG_WARNING,
+1
View File
@@ -78,6 +78,7 @@ struct named_server {
isc_mutex_t reload_event_lock;
isc_event_t * reload_event;
bool reload_in_progress;
bool flushonshutdown;
+1
View File
@@ -48,6 +48,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -48,6 +48,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+109 -78
View File
@@ -102,6 +102,7 @@
#include <dst/result.h>
#include <ns/client.h>
#include <ns/hooks.h>
#include <ns/listenlist.h>
#include <ns/interfacemgr.h>
@@ -776,8 +777,7 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
keystruct.datalen = r.length;
keystruct.data = r.base;
if ((keystruct.algorithm == DST_ALG_RSASHA1 ||
keystruct.algorithm == DST_ALG_RSAMD5) &&
if ((keystruct.algorithm == DST_ALG_RSASHA1) &&
r.length > 1 && r.base[0] == 1 && r.base[1] == 3)
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
"%s key '%s' has a weak exponent",
@@ -2551,7 +2551,15 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) {
}
} else {
if (result != ISC_R_NOTFOUND && result != DNS_R_PARTIALMATCH) {
if (result == ISC_R_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"catz: zone \"%s\" is overridden "
"by explicitly configured zone",
nameb);
goto cleanup;
} else if (result != ISC_R_NOTFOUND &&
result != DNS_R_PARTIALMATCH) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
"catz: error \"%s\" while trying to "
@@ -3638,6 +3646,35 @@ create_mapped_acl(void) {
return (result);
}
#ifdef HAVE_DLOPEN
/*%
* A callback for the cfg_pluginlist_foreach() call in configure_view() below.
* If registering any plugin fails, registering subsequent ones is not
* attempted.
*/
static isc_result_t
register_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
const char *plugin_path, const char *parameters,
void *callback_data)
{
dns_view_t *view = callback_data;
isc_result_t result;
result = ns_plugin_register(plugin_path, parameters, config,
cfg_obj_file(obj), cfg_obj_line(obj),
named_g_mctx, named_g_lctx,
named_g_aclconfctx, view);
if (result != ISC_R_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"%s: plugin configuration failed: %s",
plugin_path, isc_result_totext(result));
}
return (result);
}
#endif
/*
* Configure 'view' according to 'vconfig', taking defaults from 'config'
* where values are missing in 'vconfig'.
@@ -3666,7 +3703,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
const cfg_obj_t *dlvobj = NULL;
unsigned int dlzargc;
char **dlzargv;
const cfg_obj_t *dyndb_list;
const cfg_obj_t *dyndb_list, *plugin_list;
const cfg_obj_t *disabled;
const cfg_obj_t *obj, *obj2;
const cfg_listelt_t *element;
@@ -4958,16 +4995,10 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
&view->sortlist));
/*
* Configure default allow-notify, allow-update
* and allow-update-forwarding ACLs, so they can be
* inherited by zones. (Note these cannot be set at
* Configure default allow-update and allow-update-forwarding ACLs,
* so they can be inherited by zones. (Note these cannot be set at
* options/view level.)
*/
if (view->notifyacl == NULL) {
CHECK(configure_view_acl(vconfig, config, named_g_config,
"allow-notify", NULL, actx,
named_g_mctx, &view->notifyacl));
}
if (view->updateacl == NULL) {
CHECK(configure_view_acl(NULL, NULL, named_g_config,
"allow-update", NULL, actx,
@@ -4980,14 +5011,19 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
}
/*
* Configure default allow-transer ACL so it can be inherited
* by zones. (Note this *can* be set at options or view level.)
* Configure default allow-transfer and allow-notify ACLs so they
* can be inherited by zones.
*/
if (view->transferacl == NULL) {
CHECK(configure_view_acl(vconfig, config, named_g_config,
"allow-transfer", NULL, actx,
named_g_mctx, &view->transferacl));
}
if (view->notifyacl == NULL) {
CHECK(configure_view_acl(vconfig, config, named_g_config,
"allow-notify", NULL, actx,
named_g_mctx, &view->notifyacl));
}
obj = NULL;
result = named_config_get(maps, "provide-ixfr", &obj);
@@ -5080,46 +5116,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
dns_quotatype_zone, r);
}
obj = NULL;
result = named_config_get(maps, "filter-aaaa-on-v4", &obj);
INSIST(result == ISC_R_SUCCESS);
if (cfg_obj_isboolean(obj)) {
if (cfg_obj_asboolean(obj))
view->v4_aaaa = dns_aaaa_filter;
else
view->v4_aaaa = dns_aaaa_ok;
} else {
const char *v4_aaaastr = cfg_obj_asstring(obj);
if (strcasecmp(v4_aaaastr, "break-dnssec") == 0) {
view->v4_aaaa = dns_aaaa_break_dnssec;
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
result = named_config_get(maps, "filter-aaaa-on-v6", &obj);
INSIST(result == ISC_R_SUCCESS);
if (cfg_obj_isboolean(obj)) {
if (cfg_obj_asboolean(obj))
view->v6_aaaa = dns_aaaa_filter;
else
view->v6_aaaa = dns_aaaa_ok;
} else {
const char *v6_aaaastr = cfg_obj_asstring(obj);
if (strcasecmp(v6_aaaastr, "break-dnssec") == 0) {
view->v6_aaaa = dns_aaaa_break_dnssec;
} else {
INSIST(0);
ISC_UNREACHABLE();
}
}
CHECK(configure_view_acl(vconfig, config, named_g_config,
"filter-aaaa", NULL, actx,
named_g_mctx, &view->aaaa_acl));
obj = NULL;
result = named_config_get(maps, "prefetch", &obj);
if (result == ISC_R_SUCCESS) {
@@ -5261,10 +5257,11 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
* Load DynDB modules.
*/
dyndb_list = NULL;
if (voptions != NULL)
if (voptions != NULL) {
(void)cfg_map_get(voptions, "dyndb", &dyndb_list);
else
} else {
(void)cfg_map_get(config, "dyndb", &dyndb_list);
}
#ifdef HAVE_DLOPEN
for (element = cfg_list_first(dyndb_list);
@@ -5286,6 +5283,31 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
}
#endif
/*
* Load plugins.
*/
plugin_list = NULL;
if (voptions != NULL) {
(void)cfg_map_get(voptions, "plugin", &plugin_list);
} else {
(void)cfg_map_get(config, "plugin", &plugin_list);
}
#ifdef HAVE_DLOPEN
if (plugin_list != NULL) {
INSIST(view->hooktable == NULL);
CHECK(ns_hooktable_create(view->mctx,
(ns_hooktable_t **) &view->hooktable));
view->hooktable_free = ns_hooktable_free;
ns_plugins_create(view->mctx, (ns_plugins_t **)&view->plugins);
view->plugins_free = ns_plugins_free;
CHECK(cfg_pluginlist_foreach(config, plugin_list, named_g_lctx,
register_one_plugin, view));
}
#endif
/*
* Setup automatic empty zones. If recursion is off then
* they are disabled by default.
@@ -6871,7 +6893,7 @@ tat_timer_tick(isc_task_t *task, isc_event_t *event) {
static void
pps_timer_tick(isc_task_t *task, isc_event_t *event) {
static unsigned int oldrequests = 0;
unsigned int requests = ns_client_requests;
unsigned int requests = atomic_load(&ns_client_requests);
UNUSED(task);
isc_event_free(&event);
@@ -8056,8 +8078,12 @@ load_configuration(const char *filename, named_server_t *server,
/*
* Check the validity of the configuration.
*
* (Ignore plugin parameters for now; they will be
* checked later when the modules are actually loaded and
* registered.)
*/
CHECK(bind9_check_namedconf(config, named_g_lctx, named_g_mctx));
CHECK(bind9_check_namedconf(config, false, named_g_lctx, named_g_mctx));
/*
* Fill in the maps array, used for resolving defaults.
@@ -9298,6 +9324,7 @@ view_loaded(void *arg) {
"FIPS mode is %s",
FIPS_mode() ? "enabled" : "disabled");
#endif
server->reload_in_progress = false;
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_NOTICE,
@@ -9353,7 +9380,7 @@ load_zones(named_server_t *server, bool init, bool reconfig) {
isc_refcount_increment(&zl->refs);
result = dns_view_asyncload(view, reconfig, view_loaded, zl);
if (result != ISC_R_SUCCESS) {
isc_refcount_decrement(&zl->refs);
(void)isc_refcount_decrement(&zl->refs);
goto cleanup;
}
}
@@ -9502,6 +9529,9 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
dns_view_detach(&view);
}
/*
* Shut down all dyndb instances.
*/
dns_dyndb_cleanup(true);
while ((nsc = ISC_LIST_HEAD(server->cachelist)) != NULL) {
@@ -9630,6 +9660,7 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
CHECKFATAL(server->reload_event == NULL ?
ISC_R_NOMEMORY : ISC_R_SUCCESS,
"allocating reload event");
server->reload_in_progress = true;
/*
* Setup the server task, which is responsible for coordinating
@@ -9940,6 +9971,7 @@ loadconfig(named_server_t *server) {
static isc_result_t
reload(named_server_t *server) {
isc_result_t result;
server->reload_in_progress = true;
CHECK(loadconfig(server));
result = load_zones(server, false, false);
@@ -10286,6 +10318,7 @@ named_server_reloadcommand(named_server_t *server, isc_lex_t *lex,
isc_result_t
named_server_reconfigcommand(named_server_t *server) {
isc_result_t result;
server->reload_in_progress = true;
CHECK(loadconfig(server));
@@ -11431,6 +11464,10 @@ named_server_status(named_server_t *server, isc_buffer_t **text) {
server->sctx->tcpquota.used, server->sctx->tcpquota.max);
CHECK(putstr(text, line));
if (server->reload_in_progress) {
CHECK(putstr(text, "reload/reconfig in progress"));
}
CHECK(putstr(text, "server is up and running"));
CHECK(putnull(text));
@@ -14880,7 +14917,7 @@ mkey_dumpzone(dns_view_t *view, isc_buffer_t **text) {
dns_rdata_toregion(&rdata, &r);
isc_region_consume(&r, 12);
keyid = dst_region_computeid(&r, kd.algorithm);
keyid = dst_region_computeid(&r);
snprintf(buf, sizeof(buf), "\n keyid: %u", keyid);
CHECK(putstr(text, buf));
@@ -15011,29 +15048,17 @@ named_server_mkeys(named_server_t *server, isc_lex_t *lex,
/* Look for the optional class name. */
classtxt = next_token(lex, text);
if (classtxt != NULL) {
/* Look for the optional view name. */
viewtxt = next_token(lex, text);
}
if (classtxt == NULL) {
rdclass = dns_rdataclass_in;
} else {
isc_textregion_t r;
r.base = classtxt;
r.length = strlen(classtxt);
result = dns_rdataclass_fromtext(&rdclass, &r);
if (result != ISC_R_SUCCESS) {
if (viewtxt == NULL) {
rdclass = dns_rdataclass_in;
viewtxt = classtxt;
result = ISC_R_SUCCESS;
} else {
snprintf(msg, sizeof(msg),
"unknown class '%s'", classtxt);
(void) putstr(text, msg);
goto cleanup;
}
snprintf(msg, sizeof(msg),
"unknown class '%s'", classtxt);
(void) putstr(text, msg);
goto cleanup;
}
viewtxt = next_token(lex, text);
}
for (view = ISC_LIST_HEAD(server->viewlist);
@@ -15062,6 +15087,9 @@ named_server_mkeys(named_server_t *server, isc_lex_t *lex,
switch (opt) {
case REFRESH:
if (!first) {
CHECK(putstr(text, "\n"));
}
CHECK(mkey_refresh(view, text));
break;
case STATUS:
@@ -15069,12 +15097,14 @@ named_server_mkeys(named_server_t *server, isc_lex_t *lex,
CHECK(putstr(text, "\n\n"));
}
CHECK(mkey_status(view, text));
first = false;
break;
case SYNC:
CHECK(dns_zone_flush(view->managed_keys));
break;
case DESTROY:
if (!first) {
CHECK(putstr(text, "\n"));
}
CHECK(mkey_destroy(server, view, text));
break;
default:
@@ -15085,6 +15115,7 @@ named_server_mkeys(named_server_t *server, isc_lex_t *lex,
if (viewtxt != NULL) {
break;
}
first = false;
}
if (!found) {
+1 -1
View File
@@ -257,7 +257,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
/* Open the library */
dlopen_flags = RTLD_NOW|RTLD_GLOBAL;
#ifdef RTLD_DEEPBIND
#if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__
/*
* If RTLD_DEEPBIND is available then use it. This can avoid
* issues with a module using a different version of a system
+1
View File
@@ -49,6 +49,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -37,6 +37,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -38,6 +38,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -37,6 +37,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -36,6 +36,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+72
View File
@@ -0,0 +1,72 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
${NS_INCLUDES} ${DNS_INCLUDES} \
${ISCCFG_INCLUDES} ${ISC_INCLUDES}
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
NSLIBS = ../../lib/ns/libns.@A@
LIBS =
SO_TARGETS = lib/filter-aaaa.@SO@
TARGETS = @SO_TARGETS@
SO_OBJS = filter-aaaa.@O@
SO_SRCS = filter-aaaa.c
CFLAGS = @CFLAGS@ @SO_CFLAGS@
SO_LDFLAGS = @LDFLAGS@ @SO_LDFLAGS@
MANPAGES = filter-aaaa.8
HTMLPAGES = filter-aaaa.html
MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
lib/filter-aaaa.@SO@: filter-aaaa.@SO@
$(SHELL) ${top_srcdir}/mkinstalldirs `pwd`/lib
${LIBTOOL_MODE_INSTALL} ${INSTALL} filter-aaaa.@SO@ `pwd`/lib
filter-aaaa.@SO@: filter-aaaa.@O@
${LIBTOOL_MODE_LINK} @SO_LD@ ${SO_LDFLAGS} -o $@ \
filter-aaaa.@O@ ${LIBS}
doc man:: ${MANOBJS}
docclean manclean maintainer-clean::
rm -f ${MANOBJS}
clean distclean::
rm -f filter-aaaa.so
rm -f ${TARGETS} ${OBJS}
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
install:: filter-aaaa.@SO@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} filter-aaaa.@SO@ \
${DESTDIR}${libdir}
${INSTALL_DATA} ${srcdir}/filter-aaaa.8 ${DESTDIR}${mandir}/man8
uninstall::
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/filter-aaaa.@SO@
rm -f ${DESTDIR}${mandir}/man8/filter-aaaa.8
+116
View File
@@ -0,0 +1,116 @@
.\" Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
.\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
.\"
.hy 0
.ad l
'\" t
.\" Title: filter-aaaa.so
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2018-08-13
.\" Manual: BIND9
.\" Source: ISC
.\" Language: English
.\"
.TH "FILTER\-AAAA\&.SO" "8" "2018\-08\-13" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
filter-aaaa.so \- filter AAAA in DNS responses when A is present
.SH "SYNOPSIS"
.HP \w'\fBplugin\ query\ "filter\-aaaa\&.so"\fR\ 'u
\fBplugin query "filter\-aaaa\&.so"\fR [\fI{\ parameters\ }\fR];
.SH "DESCRIPTION"
.PP
\fBfilter\-aaaa\&.so\fR
is a query plugin module for
\fBnamed\fR, enabling
\fBnamed\fR
to omit some IPv6 addresses when responding to clients\&.
.PP
Until BIND 9\&.12, this feature was implemented natively in
\fBnamed\fR
and enabled with the
\fBfilter\-aaaa\fR
ACL and the
\fBfilter\-aaaa\-on\-v4\fR
and
\fBfilter\-aaaa\-on\-v6\fR
options\&. These options are now deprecated in
named\&.conf, but can be passed as parameters to the
\fBfilter\-aaaa\&.so\fR
plugin, for example:
.sp
.if n \{\
.RS 4
.\}
.nf
plugin query "/usr/local/lib/filter\-aaaa\&.so" {
filter\-aaaa\-on\-v4 yes;
filter\-aaaa\-on\-v6 yes;
filter\-aaaa { 192\&.0\&.2\&.1; 2001:db8:2::1; };
};
.fi
.if n \{\
.RE
.\}
.PP
This module is intended to aid transition from IPv4 to IPv6 by withholding IPv6 addresses from DNS clients which are not connected to the IPv6 Internet, when the name being looked up has an IPv4 address available\&. Use of this module is not recommended unless absolutely necessary\&.
.PP
Note: This mechanism can erroneously cause other servers not to give AAAA records to their clients\&. If a recursing server with both IPv6 and IPv4 network connections queries an authoritative server using this mechanism via IPv4, it will be denied AAAA records even if its client is using IPv6\&.
.SH "OPTIONS"
.PP
\fBfilter\-aaaa\fR
.RS 4
Specifies a list of client addresses for which AAAA filtering is to be applied\&. The default is
\fBany\fR\&.
.RE
.PP
\fBfilter\-aaaa\-on\-v4\fR
.RS 4
If set to
\fByes\fR, the DNS client is at an IPv4 address, in
\fBfilter\-aaaa\fR, and if the response does not include DNSSEC signatures, then all AAAA records are deleted from the response\&. This filtering applies to all responses and not only authoritative responses\&.
.sp
If set to
\fBbreak\-dnssec\fR, then AAAA records are deleted even when DNSSEC is enabled\&. As suggested by the name, this causes the response to fail to verify, because the DNSSEC protocol is designed to detect deletions\&.
.sp
This mechanism can erroneously cause other servers not to give AAAA records to their clients\&. A recursing server with both IPv6 and IPv4 network connections that queries an authoritative server using this mechanism via IPv4 will be denied AAAA records even if its client is using IPv6\&.
.RE
.PP
\fBfilter\-aaaa\-on\-v6\fR
.RS 4
Identical to
\fBfilter\-aaaa\-on\-v4\fR, except it filters AAAA responses to queries from IPv6 clients instead of IPv4 clients\&. To filter all responses, set both options to
\fByes\fR\&.
.RE
.SH "SEE ALSO"
.PP
BIND 9 Administrator Reference Manual\&.
.SH "AUTHOR"
.PP
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2018 Internet Systems Consortium, Inc. ("ISC")
.br
+926
View File
@@ -0,0 +1,926 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <string.h>
#include <isc/buffer.h>
#include <isc/hash.h>
#include <isc/ht.h>
#include <isc/lib.h>
#include <isc/log.h>
#include <isc/mem.h>
#include <isc/netaddr.h>
#include <isc/result.h>
#include <isc/types.h>
#include <isc/util.h>
#include <isccfg/aclconf.h>
#include <isccfg/cfg.h>
#include <isccfg/grammar.h>
#include <ns/client.h>
#include <ns/hooks.h>
#include <ns/log.h>
#include <ns/query.h>
#include <ns/types.h>
#include <dns/acl.h>
#include <dns/db.h>
#include <dns/enumtype.h>
#include <dns/log.h>
#include <dns/message.h>
#include <dns/rdataset.h>
#include <dns/result.h>
#include <dns/types.h>
#include <dns/view.h>
#define CHECK(op) \
do { \
result = (op); \
if (result != ISC_R_SUCCESS) { \
goto cleanup; \
} \
} while (0)
/*
* Possible values for the settings of filter-aaaa-on-v4 and
* filter-aaaa-on-v6: "no" is NONE, "yes" is FILTER, "break-dnssec"
* is BREAK_DNSSEC.
*/
typedef enum {
NONE = 0,
FILTER = 1,
BREAK_DNSSEC = 2
} filter_aaaa_t;
/*
* Persistent data for use by this module. This will be associated
* with client object address in the hash table, and will remain
* accessible until the client object is detached.
*/
typedef struct filter_data {
filter_aaaa_t mode;
uint32_t flags;
} filter_data_t;
typedef struct filter_instance {
ns_plugin_t *module;
isc_mem_t *mctx;
/*
* Memory pool for use with persistent data.
*/
isc_mempool_t *datapool;
/*
* Hash table associating a client object with its persistent data.
*/
isc_ht_t *ht;
/*
* Values configured when the module is loaded.
*/
filter_aaaa_t v4_aaaa;
filter_aaaa_t v6_aaaa;
dns_acl_t *aaaa_acl;
} filter_instance_t;
/*
* Per-client flags set by this module
*/
#define FILTER_AAAA_RECURSING 0x0001 /* Recursing for A */
#define FILTER_AAAA_FILTERED 0x0002 /* AAAA was removed from answer */
/*
* Client attribute tests.
*/
#define WANTDNSSEC(c) (((c)->attributes & NS_CLIENTATTR_WANTDNSSEC) != 0)
#define RECURSIONOK(c) (((c)->query.attributes & \
NS_QUERYATTR_RECURSIONOK) != 0)
/*
* Forward declarations of functions referenced in install_hooks().
*/
static ns_hookresult_t
filter_qctx_initialize(void *arg, void *cbdata, isc_result_t *resp);
static ns_hookresult_t
filter_respond_begin(void *arg, void *cbdata, isc_result_t *resp);
static ns_hookresult_t
filter_respond_any_found(void *arg, void *cbdata, isc_result_t *resp);
static ns_hookresult_t
filter_prep_response_begin(void *arg, void *cbdata, isc_result_t *resp);
static ns_hookresult_t
filter_query_done_send(void *arg, void *cbdata, isc_result_t *resp);
static ns_hookresult_t
filter_qctx_destroy(void *arg, void *cbdata, isc_result_t *resp);
/*%
* Register the functions to be called at each hook point in 'hooktable', using
* memory context 'mctx' for allocating copies of stack-allocated structures
* passed to ns_hook_add(). Make sure 'inst' will be passed as the 'cbdata'
* argument to every callback.
*/
static void
install_hooks(ns_hooktable_t *hooktable, isc_mem_t *mctx,
filter_instance_t *inst)
{
const ns_hook_t filter_init = {
.action = filter_qctx_initialize,
.action_data = inst,
};
const ns_hook_t filter_respbegin = {
.action = filter_respond_begin,
.action_data = inst,
};
const ns_hook_t filter_respanyfound = {
.action = filter_respond_any_found,
.action_data = inst,
};
const ns_hook_t filter_prepresp = {
.action = filter_prep_response_begin,
.action_data = inst,
};
const ns_hook_t filter_donesend = {
.action = filter_query_done_send,
.action_data = inst,
};
const ns_hook_t filter_destroy = {
.action = filter_qctx_destroy,
.action_data = inst,
};
ns_hook_add(hooktable, mctx, -
NS_QUERY_QCTX_INITIALIZED, &filter_init);
ns_hook_add(hooktable, mctx,
NS_QUERY_RESPOND_BEGIN, &filter_respbegin);
ns_hook_add(hooktable, mctx,
NS_QUERY_RESPOND_ANY_FOUND, &filter_respanyfound);
ns_hook_add(hooktable, mctx,
NS_QUERY_PREP_RESPONSE_BEGIN, &filter_prepresp);
ns_hook_add(hooktable, mctx,
NS_QUERY_DONE_SEND, &filter_donesend);
ns_hook_add(hooktable, mctx,
NS_QUERY_QCTX_DESTROYED, &filter_destroy);
}
/**
** Support for parsing of parameters and configuration of the module.
**/
/*
* Support for parsing of parameters.
*/
static const char *filter_aaaa_enums[] = { "break-dnssec", NULL };
static isc_result_t
parse_filter_aaaa(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
return (cfg_parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));
}
static void
doc_filter_aaaa(cfg_printer_t *pctx, const cfg_type_t *type) {
cfg_doc_enum_or_other(pctx, type, &cfg_type_boolean);
}
static cfg_type_t cfg_type_filter_aaaa = {
"filter_aaaa", parse_filter_aaaa, cfg_print_ustring,
doc_filter_aaaa, &cfg_rep_string, filter_aaaa_enums,
};
static cfg_clausedef_t param_clauses[] = {
{ "filter-aaaa", &cfg_type_bracketed_aml, 0 },
{ "filter-aaaa-on-v4", &cfg_type_filter_aaaa, 0 },
{ "filter-aaaa-on-v6", &cfg_type_filter_aaaa, 0 },
};
static cfg_clausedef_t *param_clausesets[] = {
param_clauses,
NULL
};
static cfg_type_t cfg_type_parameters = {
"filter-aaaa-params", cfg_parse_mapbody, cfg_print_mapbody,
cfg_doc_mapbody, &cfg_rep_map, param_clausesets
};
static isc_result_t
parse_filter_aaaa_on(const cfg_obj_t *param_obj, const char *param_name,
filter_aaaa_t *dstp)
{
const cfg_obj_t *obj = NULL;
isc_result_t result;
result = cfg_map_get(param_obj, param_name, &obj);
if (result != ISC_R_SUCCESS) {
return (ISC_R_SUCCESS);
}
if (cfg_obj_isboolean(obj)) {
if (cfg_obj_asboolean(obj)) {
*dstp = FILTER;
} else {
*dstp = NONE;
}
} else if (strcasecmp(cfg_obj_asstring(obj), "break-dnssec") == 0) {
*dstp = BREAK_DNSSEC;
} else {
result = ISC_R_UNEXPECTED;
}
return (result);
}
static isc_result_t
check_syntax(cfg_obj_t *fmap, const void *cfg,
isc_mem_t *mctx, isc_log_t *lctx, void *actx)
{
isc_result_t result = ISC_R_SUCCESS;
const cfg_obj_t *aclobj = NULL;
dns_acl_t *acl = NULL;
filter_aaaa_t f4 = NONE, f6 = NONE;
cfg_map_get(fmap, "filter-aaaa", &aclobj);
if (aclobj == NULL) {
return (result);
}
CHECK(cfg_acl_fromconfig(aclobj, (const cfg_obj_t *) cfg,
lctx, (cfg_aclconfctx_t *) actx,
mctx, 0, &acl));
CHECK(parse_filter_aaaa_on(fmap, "filter-aaaa-on-v4", &f4));
CHECK(parse_filter_aaaa_on(fmap, "filter-aaaa-on-v6", &f6));
if ((f4 != NONE || f6 != NONE) && dns_acl_isnone(acl)) {
cfg_obj_log(aclobj, lctx, ISC_LOG_WARNING,
"\"filter-aaaa\" is 'none;' but "
"either filter-aaaa-on-v4 or filter-aaaa-on-v6 "
"is enabled");
result = ISC_R_FAILURE;
} else if (f4 == NONE && f6 == NONE && !dns_acl_isnone(acl)) {
cfg_obj_log(aclobj, lctx, ISC_LOG_WARNING,
"\"filter-aaaa\" is set but "
"neither filter-aaaa-on-v4 or filter-aaaa-on-v6 "
"is enabled");
result = ISC_R_FAILURE;
}
cleanup:
if (acl != NULL) {
dns_acl_detach(&acl);
}
return (result);
}
static isc_result_t
parse_parameters(filter_instance_t *inst, const char *parameters,
const void *cfg, const char *cfg_file, unsigned long cfg_line,
isc_mem_t *mctx, isc_log_t *lctx, void *actx)
{
isc_result_t result = ISC_R_SUCCESS;
cfg_parser_t *parser = NULL;
cfg_obj_t *param_obj = NULL;
const cfg_obj_t *obj = NULL;
isc_buffer_t b;
CHECK(cfg_parser_create(mctx, lctx, &parser));
isc_buffer_constinit(&b, parameters, strlen(parameters));
isc_buffer_add(&b, strlen(parameters));
CHECK(cfg_parse_buffer4(parser, &b, cfg_file, cfg_line,
&cfg_type_parameters, 0, &param_obj));
CHECK(check_syntax(param_obj, cfg, mctx, lctx, actx));
CHECK(parse_filter_aaaa_on(param_obj, "filter-aaaa-on-v4",
&inst->v4_aaaa));
CHECK(parse_filter_aaaa_on(param_obj, "filter-aaaa-on-v6",
&inst->v6_aaaa));
result = cfg_map_get(param_obj, "filter-aaaa", &obj);
if (result == ISC_R_SUCCESS) {
CHECK(cfg_acl_fromconfig(obj, (const cfg_obj_t *) cfg,
lctx, (cfg_aclconfctx_t *) actx,
mctx, 0, &inst->aaaa_acl));
} else {
CHECK(dns_acl_any(mctx, &inst->aaaa_acl));
}
cleanup:
if (param_obj != NULL) {
cfg_obj_destroy(parser, &param_obj);
}
if (parser != NULL) {
cfg_parser_destroy(&parser);
}
return (result);
}
/**
** Mandatory plugin API functions:
**
** - plugin_destroy
** - plugin_register
** - plugin_version
** - plugin_check
**/
/*
* Called by ns_plugin_register() to initialize the plugin and
* register hook functions into the view hook table.
*/
isc_result_t
plugin_register(const char *parameters,
const void *cfg, const char *cfg_file, unsigned long cfg_line,
isc_mem_t *mctx, isc_log_t *lctx, void *actx,
ns_hooktable_t *hooktable, void **instp)
{
filter_instance_t *inst = NULL;
isc_result_t result;
isc_log_write(lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_HOOKS, ISC_LOG_INFO,
"registering 'filter-aaaa' "
"module from %s:%lu, %s parameters",
cfg_file, cfg_line, parameters != NULL ? "with" : "no");
inst = isc_mem_get(mctx, sizeof(*inst));
memset(inst, 0, sizeof(*inst));
isc_mem_attach(mctx, &inst->mctx);
if (parameters != NULL) {
CHECK(parse_parameters(inst, parameters, cfg, cfg_file,
cfg_line, mctx, lctx, actx));
}
CHECK(isc_mempool_create(mctx, sizeof(filter_data_t),
&inst->datapool));
CHECK(isc_ht_init(&inst->ht, mctx, 16));
/*
* Fill the mempool with 1K filter_aaaa state objects at
* a time; ideally after a single allocation, the mempool will
* have enough to handle all the simultaneous queries the system
* requires and it won't be necessary to allocate more.
*
* We don't set any limit on the number of free state objects
* so that they'll always be returned to the pool and not
* freed until the pool is destroyed on shutdown.
*/
isc_mempool_setfillcount(inst->datapool, 1024);
isc_mempool_setfreemax(inst->datapool, UINT_MAX);
/*
* Set hook points in the view's hooktable.
*/
install_hooks(hooktable, mctx, inst);
*instp = inst;
cleanup:
if (result != ISC_R_SUCCESS && inst != NULL) {
plugin_destroy((void **) &inst);
}
return (result);
}
isc_result_t
plugin_check(const char *parameters,
const void *cfg, const char *cfg_file, unsigned long cfg_line,
isc_mem_t *mctx, isc_log_t *lctx, void *actx)
{
isc_result_t result = ISC_R_SUCCESS;
cfg_parser_t *parser = NULL;
cfg_obj_t *param_obj = NULL;
isc_buffer_t b;
CHECK(cfg_parser_create(mctx, lctx, &parser));
isc_buffer_constinit(&b, parameters, strlen(parameters));
isc_buffer_add(&b, strlen(parameters));
CHECK(cfg_parse_buffer4(parser, &b, cfg_file, cfg_line,
&cfg_type_parameters, 0, &param_obj));
CHECK(check_syntax(param_obj, cfg, mctx, lctx, actx));
cleanup:
if (param_obj != NULL) {
cfg_obj_destroy(parser, &param_obj);
}
if (parser != NULL) {
cfg_parser_destroy(&parser);
}
return (result);
}
/*
* Called by ns_plugins_free(); frees memory allocated by
* the module when it was registered.
*/
void
plugin_destroy(void **instp) {
filter_instance_t *inst = (filter_instance_t *) *instp;
if (inst->ht != NULL) {
isc_ht_destroy(&inst->ht);
}
if (inst->datapool != NULL) {
isc_mempool_destroy(&inst->datapool);
}
if (inst->aaaa_acl != NULL) {
dns_acl_detach(&inst->aaaa_acl);
}
isc_mem_putanddetach(&inst->mctx, inst, sizeof(*inst));
*instp = NULL;
return;
}
/*
* Returns plugin API version for compatibility checks.
*/
int
plugin_version(void) {
return (NS_PLUGIN_VERSION);
}
/**
** "filter-aaaa" feature implementation begins here.
**/
/*%
* Structure describing the filtering to be applied by process_section().
*/
typedef struct section_filter {
query_ctx_t * qctx;
filter_aaaa_t mode;
dns_section_t section;
const dns_name_t * name;
dns_rdatatype_t type;
bool only_if_a_exists;
} section_filter_t;
/*
* Check whether this is an IPv4 client.
*/
static bool
is_v4_client(ns_client_t *client) {
if (isc_sockaddr_pf(&client->peeraddr) == AF_INET) {
return (true);
}
if (isc_sockaddr_pf(&client->peeraddr) == AF_INET6 &&
IN6_IS_ADDR_V4MAPPED(&client->peeraddr.type.sin6.sin6_addr))
{
return (true);
}
return (false);
}
/*
* Check whether this is an IPv6 client.
*/
static bool
is_v6_client(ns_client_t *client) {
if (isc_sockaddr_pf(&client->peeraddr) == AF_INET6 &&
!IN6_IS_ADDR_V4MAPPED(&client->peeraddr.type.sin6.sin6_addr))
{
return (true);
}
return (false);
}
static filter_data_t *
client_state_get(const query_ctx_t *qctx, filter_instance_t *inst) {
filter_data_t *client_state = NULL;
isc_result_t result;
result = isc_ht_find(inst->ht, (const unsigned char *)&qctx->client,
sizeof(qctx->client), (void **)&client_state);
return (result == ISC_R_SUCCESS ? client_state : NULL);
}
static void
client_state_create(const query_ctx_t *qctx, filter_instance_t *inst) {
filter_data_t *client_state;
isc_result_t result;
client_state = isc_mempool_get(inst->datapool);
if (client_state == NULL) {
return;
}
client_state->mode = NONE;
client_state->flags = 0;
result = isc_ht_add(inst->ht, (const unsigned char *)&qctx->client,
sizeof(qctx->client), client_state);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
}
static void
client_state_destroy(const query_ctx_t *qctx, filter_instance_t *inst) {
filter_data_t *client_state = client_state_get(qctx, inst);
isc_result_t result;
if (client_state == NULL) {
return;
}
result = isc_ht_delete(inst->ht, (const unsigned char *)&qctx->client,
sizeof(qctx->client));
RUNTIME_CHECK(result == ISC_R_SUCCESS);
isc_mempool_put(inst->datapool, client_state);
}
/*%
* Mark 'rdataset' and 'sigrdataset' as rendered, gracefully handling NULL
* pointers and non-associated rdatasets.
*/
static void
mark_as_rendered(dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) {
if (rdataset != NULL && dns_rdataset_isassociated(rdataset)) {
rdataset->attributes |= DNS_RDATASETATTR_RENDERED;
}
if (sigrdataset != NULL && dns_rdataset_isassociated(sigrdataset)) {
sigrdataset->attributes |= DNS_RDATASETATTR_RENDERED;
}
}
/*%
* Check whether an RRset of given 'type' is present at given 'name'. If
* it is found and either it is not signed or the combination of query
* flags and configured processing 'mode' allows it, mark the RRset and its
* associated signatures as already rendered to prevent them from appearing
* in the response message stored in 'qctx'. If 'only_if_a_exists' is
* true, an RRset of type A must also exist at 'name' in order for the
* above processing to happen.
*/
static bool
process_name(query_ctx_t *qctx, filter_aaaa_t mode, const dns_name_t *name,
dns_rdatatype_t type, bool only_if_a_exists)
{
dns_rdataset_t *rdataset = NULL, *sigrdataset = NULL;
isc_result_t result;
bool modified = false;
if (only_if_a_exists) {
CHECK(dns_message_findtype(name, dns_rdatatype_a, 0, NULL));
}
(void)dns_message_findtype(name, type, 0, &rdataset);
(void)dns_message_findtype(name, dns_rdatatype_rrsig, type,
&sigrdataset);
if (rdataset != NULL &&
(sigrdataset == NULL || !WANTDNSSEC(qctx->client) ||
mode == BREAK_DNSSEC))
{
/*
* An RRset of given 'type' was found at 'name' and at least
* one of the following is true:
*
* - the RRset is not signed,
* - the client did not set the DO bit in its request,
* - configuration allows us to tamper with signed responses.
*
* This means it is okay to filter out this RRset and its
* signatures, if any, from the response.
*/
mark_as_rendered(rdataset, sigrdataset);
modified = true;
}
cleanup:
return (modified);
}
/*%
* Apply the requested section filter, i.e. prevent (when possible, as
* determined by process_name()) RRsets of given 'type' from being rendered
* in the given 'section' of the response message stored in 'qctx'. Clear
* the AD bit if the answer and/or authority section was modified. If
* 'name' is NULL, all names in the given 'section' are processed;
* otherwise, only 'name' is. 'only_if_a_exists' is passed through to
* process_name().
*/
static void
process_section(const section_filter_t *filter) {
query_ctx_t *qctx = filter->qctx;
filter_aaaa_t mode = filter->mode;
dns_section_t section = filter->section;
const dns_name_t *name = filter->name;
dns_rdatatype_t type = filter->type;
bool only_if_a_exists = filter->only_if_a_exists;
dns_message_t *message = qctx->client->message;
isc_result_t result;
for (result = dns_message_firstname(message, section);
result == ISC_R_SUCCESS;
result = dns_message_nextname(message, section))
{
dns_name_t *cur = NULL;
dns_message_currentname(message, section, &cur);
if (name != NULL && !dns_name_equal(name, cur)) {
/*
* We only want to process 'name' and this is not it.
*/
continue;
}
if (!process_name(qctx, mode, cur, type, only_if_a_exists)) {
/*
* Response was not modified, do not touch the AD bit.
*/
continue;
}
if (section == DNS_SECTION_ANSWER ||
section == DNS_SECTION_AUTHORITY)
{
message->flags &= ~DNS_MESSAGEFLAG_AD;
}
}
}
/*
* Initialize filter state, fetching it from a memory pool and storing it
* in a hash table keyed according to the client object; this enables us to
* retrieve persistent data related to a client query for as long as the
* object persists.
*/
static ns_hookresult_t
filter_qctx_initialize(void *arg, void *cbdata, isc_result_t *resp) {
query_ctx_t *qctx = (query_ctx_t *) arg;
filter_instance_t *inst = (filter_instance_t *) cbdata;
filter_data_t *client_state;
*resp = ISC_R_UNSET;
client_state = client_state_get(qctx, inst);
if (client_state == NULL) {
client_state_create(qctx, inst);
}
return (NS_HOOK_CONTINUE);
}
/*
* Determine whether this client should have AAAA filtered or not, based on
* the client address family and the settings of filter-aaaa-on-v4 and
* filter-aaaa-on-v6.
*/
static ns_hookresult_t
filter_prep_response_begin(void *arg, void *cbdata, isc_result_t *resp) {
query_ctx_t *qctx = (query_ctx_t *) arg;
filter_instance_t *inst = (filter_instance_t *) cbdata;
filter_data_t *client_state = client_state_get(qctx, inst);
isc_result_t result;
*resp = ISC_R_UNSET;
if (client_state == NULL) {
return (NS_HOOK_CONTINUE);
}
if (inst->v4_aaaa != NONE || inst->v6_aaaa != NONE) {
result = ns_client_checkaclsilent(qctx->client, NULL,
inst->aaaa_acl, true);
if (result == ISC_R_SUCCESS &&
inst->v4_aaaa != NONE &&
is_v4_client(qctx->client))
{
client_state->mode = inst->v4_aaaa;
} else if (result == ISC_R_SUCCESS &&
inst->v6_aaaa != NONE &&
is_v6_client(qctx->client))
{
client_state->mode = inst->v6_aaaa;
}
}
return (NS_HOOK_CONTINUE);
}
/*
* Hide AAAA rrsets if there is a matching A. Trigger recursion if
* necessary to find out whether an A exists.
*
* (This version is for processing answers to explicit AAAA queries; ANY
* queries are handled in filter_respond_any_found().)
*/
static ns_hookresult_t
filter_respond_begin(void *arg, void *cbdata, isc_result_t *resp) {
query_ctx_t *qctx = (query_ctx_t *) arg;
filter_instance_t *inst = (filter_instance_t *) cbdata;
filter_data_t *client_state = client_state_get(qctx, inst);
isc_result_t result = ISC_R_UNSET;
*resp = ISC_R_UNSET;
if (client_state == NULL) {
return (NS_HOOK_CONTINUE);
}
if (client_state->mode != BREAK_DNSSEC &&
(client_state->mode != FILTER ||
(WANTDNSSEC(qctx->client) && qctx->sigrdataset != NULL &&
dns_rdataset_isassociated(qctx->sigrdataset))))
{
return (NS_HOOK_CONTINUE);
}
if (qctx->qtype == dns_rdatatype_aaaa) {
dns_rdataset_t *trdataset;
trdataset = ns_client_newrdataset(qctx->client);
result = dns_db_findrdataset(qctx->db, qctx->node,
qctx->version,
dns_rdatatype_a, 0,
qctx->client->now,
trdataset, NULL);
if (dns_rdataset_isassociated(trdataset)) {
dns_rdataset_disassociate(trdataset);
}
ns_client_putrdataset(qctx->client, &trdataset);
/*
* We found an AAAA. If we also found an A, then the AAAA
* must not be rendered.
*
* If the A is not in our cache, then any result other than
* DNS_R_DELEGATION or ISC_R_NOTFOUND means there is no A,
* and so AAAAs are okay.
*
* We assume there is no A if we can't recurse for this
* client. That might be the wrong answer, but what else
* can we do? Besides, the fact that we have the AAAA and
* are using this mechanism in the first place suggests
* that we care more about As than AAAAs, and would have
* cached an A if it existed.
*/
if (result == ISC_R_SUCCESS) {
mark_as_rendered(qctx->rdataset, qctx->sigrdataset);
qctx->client->message->flags &= ~DNS_MESSAGEFLAG_AD;
client_state->flags |= FILTER_AAAA_FILTERED;
} else if (!qctx->authoritative &&
RECURSIONOK(qctx->client) &&
(result == DNS_R_DELEGATION ||
result == ISC_R_NOTFOUND))
{
/*
* This is an ugly kludge to recurse
* for the A and discard the result.
*
* Continue to add the AAAA now.
* We'll make a note to not render it
* if the recursion for the A succeeds.
*/
result = ns_query_recurse(qctx->client,
dns_rdatatype_a,
qctx->client->query.qname,
NULL, NULL, qctx->resuming);
if (result == ISC_R_SUCCESS) {
client_state->flags |= FILTER_AAAA_RECURSING;
qctx->client->query.attributes |=
NS_QUERYATTR_RECURSING;
}
}
} else if (qctx->qtype == dns_rdatatype_a &&
(client_state->flags & FILTER_AAAA_RECURSING) != 0)
{
const section_filter_t filter_answer = {
.qctx = qctx,
.mode = client_state->mode,
.section = DNS_SECTION_ANSWER,
.name = qctx->fname,
.type = dns_rdatatype_aaaa,
};
process_section(&filter_answer);
client_state->flags &= ~FILTER_AAAA_RECURSING;
result = ns_query_done(qctx);
*resp = result;
return (NS_HOOK_RETURN);
}
*resp = result;
return (NS_HOOK_CONTINUE);
}
/*
* When answering an ANY query, remove AAAA if A is present.
*/
static ns_hookresult_t
filter_respond_any_found(void *arg, void *cbdata, isc_result_t *resp) {
query_ctx_t *qctx = (query_ctx_t *) arg;
filter_instance_t *inst = (filter_instance_t *) cbdata;
filter_data_t *client_state = client_state_get(qctx, inst);
*resp = ISC_R_UNSET;
if (client_state != NULL && client_state->mode != NONE) {
/*
* If we are authoritative, require an A record to be
* present before filtering out AAAA records; otherwise,
* just assume an A record exists even if it was not in the
* cache (and therefore is not in the response message),
* thus proceeding with filtering out AAAA records.
*/
const section_filter_t filter_answer = {
.qctx = qctx,
.mode = client_state->mode,
.section = DNS_SECTION_ANSWER,
.name = qctx->tname,
.type = dns_rdatatype_aaaa,
.only_if_a_exists = qctx->authoritative,
};
process_section(&filter_answer);
}
return (NS_HOOK_CONTINUE);
}
/*
* Hide AAAA rrsets in the additional section if there is a matching A, and
* hide NS in the authority section if AAAA was filtered in the answer
* section.
*/
static ns_hookresult_t
filter_query_done_send(void *arg, void *cbdata, isc_result_t *resp) {
query_ctx_t *qctx = (query_ctx_t *) arg;
filter_instance_t *inst = (filter_instance_t *) cbdata;
filter_data_t *client_state = client_state_get(qctx, inst);
*resp = ISC_R_UNSET;
if (client_state != NULL && client_state->mode != NONE) {
const section_filter_t filter_additional = {
.qctx = qctx,
.mode = client_state->mode,
.section = DNS_SECTION_ADDITIONAL,
.type = dns_rdatatype_aaaa,
.only_if_a_exists = true,
};
process_section(&filter_additional);
if ((client_state->flags & FILTER_AAAA_FILTERED) != 0) {
const section_filter_t filter_authority = {
.qctx = qctx,
.mode = client_state->mode,
.section = DNS_SECTION_AUTHORITY,
.type = dns_rdatatype_ns,
};
process_section(&filter_authority);
}
}
return (NS_HOOK_CONTINUE);
}
/*
* If the client is being detached, then we can delete our persistent data
* from hash table and return it to the memory pool.
*/
static ns_hookresult_t
filter_qctx_destroy(void *arg, void *cbdata, isc_result_t *resp) {
query_ctx_t *qctx = (query_ctx_t *) arg;
filter_instance_t *inst = (filter_instance_t *) cbdata;
*resp = ISC_R_UNSET;
if (!qctx->detach_client) {
return (NS_HOOK_CONTINUE);
}
client_state_destroy(qctx, inst);
return (NS_HOOK_CONTINUE);
}
+147
View File
@@ -0,0 +1,147 @@
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.filter-aaaa">
<info>
<date>2018-08-13</date>
</info>
<refentryinfo>
<corpname>ISC</corpname>
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
</refentryinfo>
<refmeta>
<refentrytitle><application>filter-aaaa.so</application></refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<refnamediv>
<refname><application>filter-aaaa.so</application></refname>
<refpurpose>filter AAAA in DNS responses when A is present</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis sepchar=" ">
<command>plugin query "filter-aaaa.so"</command>
<arg choice="opt" rep="norepeat"><replaceable class="parameter">{ parameters }</replaceable></arg>;
</cmdsynopsis>
</refsynopsisdiv>
<refsection><info><title>DESCRIPTION</title></info>
<para>
<command>filter-aaaa.so</command> is a query plugin module for
<command>named</command>, enabling <command>named</command>
to omit some IPv6 addresses when responding to clients.
</para>
<para>
Until BIND 9.12, this feature was implemented natively in
<command>named</command> and enabled with the
<command>filter-aaaa</command> ACL and the
<command>filter-aaaa-on-v4</command> and
<command>filter-aaaa-on-v6</command> options. These options are
now deprecated in <filename>named.conf</filename>, but can be
passed as parameters to the <command>filter-aaaa.so</command>
plugin, for example:
</para>
<programlisting>
plugin query "/usr/local/lib/filter-aaaa.so" {
filter-aaaa-on-v4 yes;
filter-aaaa-on-v6 yes;
filter-aaaa { 192.0.2.1; 2001:db8:2::1; };
};
</programlisting>
<para>
This module is intended to aid transition from IPv4 to IPv6 by
withholding IPv6 addresses from DNS clients which are not connected
to the IPv6 Internet, when the name being looked up has an IPv4
address available. Use of this module is not recommended unless
absolutely necessary.
</para>
<para>
Note: This mechanism can erroneously cause other servers not to
give AAAA records to their clients. If a recursing server with
both IPv6 and IPv4 network connections queries an authoritative
server using this mechanism via IPv4, it will be denied AAAA
records even if its client is using IPv6.
</para>
</refsection>
<refsection><info><title>OPTIONS</title></info>
<variablelist>
<varlistentry>
<term><command>filter-aaaa</command></term>
<listitem>
<para>
Specifies a list of client addresses for which AAAA
filtering is to be applied. The default is
<userinput>any</userinput>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>filter-aaaa-on-v4</command></term>
<listitem>
<para>
If set to <userinput>yes</userinput>, the DNS client is
at an IPv4 address, in <command>filter-aaaa</command>,
and if the response does not include DNSSEC signatures,
then all AAAA records are deleted from the response.
This filtering applies to all responses and not only
authoritative responses.
</para>
<para>
If set to <userinput>break-dnssec</userinput>,
then AAAA records are deleted even when DNSSEC is
enabled. As suggested by the name, this causes the
response to fail to verify, because the DNSSEC protocol is
designed to detect deletions.
</para>
<para>
This mechanism can erroneously cause other servers not to
give AAAA records to their clients. A recursing server with
both IPv6 and IPv4 network connections that queries an
authoritative server using this mechanism via IPv4 will be
denied AAAA records even if its client is using IPv6.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>filter-aaaa-on-v6</command></term>
<listitem>
<para>
Identical to <command>filter-aaaa-on-v4</command>,
except it filters AAAA responses to queries from IPv6
clients instead of IPv4 clients. To filter all
responses, set both options to <userinput>yes</userinput>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><info><title>SEE ALSO</title></info>
<para>
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
</para>
</refsection>
</refentry>
+135
View File
@@ -0,0 +1,135 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>filter-aaaa.so</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
<a name="man.filter-aaaa"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p>
<span class="application">filter-aaaa.so</span>
&#8212; filter AAAA in DNS responses when A is present
</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p>
<code class="command">plugin query "filter-aaaa.so"</code>
[<em class="replaceable"><code>{ parameters }</code></em>];
</p></div>
</div>
<div class="refsection">
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
<p>
<span class="command"><strong>filter-aaaa.so</strong></span> is a query plugin module for
<span class="command"><strong>named</strong></span>, enabling <span class="command"><strong>named</strong></span>
to omit some IPv6 addresses when responding to clients.
</p>
<p>
Until BIND 9.12, this feature was implemented natively in
<span class="command"><strong>named</strong></span> and enabled with the
<span class="command"><strong>filter-aaaa</strong></span> ACL and the
<span class="command"><strong>filter-aaaa-on-v4</strong></span> and
<span class="command"><strong>filter-aaaa-on-v6</strong></span> options. These options are
now deprecated in <code class="filename">named.conf</code>, but can be
passed as parameters to the <span class="command"><strong>filter-aaaa.so</strong></span>
plugin, for example:
</p>
<pre class="programlisting">
plugin query "/usr/local/lib/filter-aaaa.so" {
filter-aaaa-on-v4 yes;
filter-aaaa-on-v6 yes;
filter-aaaa { 192.0.2.1; 2001:db8:2::1; };
};
</pre>
<p>
This module is intended to aid transition from IPv4 to IPv6 by
withholding IPv6 addresses from DNS clients which are not connected
to the IPv6 Internet, when the name being looked up has an IPv4
address available. Use of this module is not recommended unless
absolutely necessary.
</p>
<p>
Note: This mechanism can erroneously cause other servers not to
give AAAA records to their clients. If a recursing server with
both IPv6 and IPv4 network connections queries an authoritative
server using this mechanism via IPv4, it will be denied AAAA
records even if its client is using IPv6.
</p>
</div>
<div class="refsection">
<a name="id-1.8"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><span class="command"><strong>filter-aaaa</strong></span></span></dt>
<dd>
<p>
Specifies a list of client addresses for which AAAA
filtering is to be applied. The default is
<strong class="userinput"><code>any</code></strong>.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>filter-aaaa-on-v4</strong></span></span></dt>
<dd>
<p>
If set to <strong class="userinput"><code>yes</code></strong>, the DNS client is
at an IPv4 address, in <span class="command"><strong>filter-aaaa</strong></span>,
and if the response does not include DNSSEC signatures,
then all AAAA records are deleted from the response.
This filtering applies to all responses and not only
authoritative responses.
</p>
<p>
If set to <strong class="userinput"><code>break-dnssec</code></strong>,
then AAAA records are deleted even when DNSSEC is
enabled. As suggested by the name, this causes the
response to fail to verify, because the DNSSEC protocol is
designed to detect deletions.
</p>
<p>
This mechanism can erroneously cause other servers not to
give AAAA records to their clients. A recursing server with
both IPv6 and IPv4 network connections that queries an
authoritative server using this mechanism via IPv4 will be
denied AAAA records even if its client is using IPv6.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>filter-aaaa-on-v6</strong></span></span></dt>
<dd>
<p>
Identical to <span class="command"><strong>filter-aaaa-on-v4</strong></span>,
except it filters AAAA responses to queries from IPv6
clients instead of IPv4 clients. To filter all
responses, set both options to <strong class="userinput"><code>yes</code></strong>.
</p>
</dd>
</dl></div>
</div>
<div class="refsection">
<a name="id-1.9"></a><h2>SEE ALSO</h2>
<p>
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
</p>
</div>
</div></body>
</html>
+1
View File
@@ -39,6 +39,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -37,6 +37,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -34,6 +34,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+4
View File
@@ -452,6 +452,10 @@ class dnskey:
if timespan is None:
timespan = self.ttl
if timespan is None:
output("WARNING: Key %s using default TTL." % repr(self))
timespan = (60*60*24)
now = time.time()
d = self.delete()
i = self.inactive()
+2 -7
View File
@@ -71,7 +71,7 @@ class PolicyLex:
return t
def t_ALGNAME(self, t):
r'(?i)\b(RSAMD5|DH|ECC|RSASHA1|NSEC3RSASHA1|RSASHA256|RSASHA512|ECDSAP256SHA256|ECDSAP384SHA384|ED25519|ED448)\b'
r'(?i)\b(DH|ECC|RSASHA1|NSEC3RSASHA1|RSASHA256|RSASHA512|ECDSAP256SHA256|ECDSAP384SHA384|ED25519|ED448)\b'
t.value = t.value.upper()
return t
@@ -132,8 +132,7 @@ class Policy:
keyttl = None
coverage = None
directory = None
valid_key_sz_per_algo = {'RSAMD5': [1024, 4096],
'RSASHA1': [1024, 4096],
valid_key_sz_per_algo = {'RSASHA1': [1024, 4096],
'NSEC3RSASHA1': [512, 4096],
'RSASHA256': [1024, 4096],
'RSASHA512': [1024, 4096],
@@ -322,10 +321,6 @@ class dnssec_policy:
# set default algorithm policies
# these can use default settings
self.alg_policy['RSAMD5'] = copy(p)
self.alg_policy['RSAMD5'].algorithm = "RSAMD5"
self.alg_policy['RSAMD5'].name = "RSAMD5"
self.alg_policy['RSASHA1'] = copy(p)
self.alg_policy['RSASHA1'].algorithm = "RSASHA1"
self.alg_policy['RSASHA1'].name = "RSASHA1"
+9 -7
View File
@@ -75,7 +75,7 @@ static isccc_region_t secret;
static bool failed = false;
static bool c_flag = false;
static isc_mem_t *rndc_mctx;
static int sends, recvs, connects;
static atomic_uint_fast32_t sends, recvs, connects;
static char *command;
static char *args;
static char program[256];
@@ -273,11 +273,11 @@ rndc_senddone(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
sends--;
atomic_fetch_sub(&sends, 1);
if (sevent->result != ISC_R_SUCCESS)
fatal("send failed: %s", isc_result_totext(sevent->result));
isc_event_free(&event);
if (sends == 0 && recvs == 0) {
if (atomic_load(&sends) == 0 && atomic_load(&recvs) == 0) {
isc_socket_detach(&sock);
isc_task_shutdown(task);
RUNTIME_CHECK(isc_app_shutdown() == ISC_R_SUCCESS);
@@ -346,7 +346,7 @@ rndc_recvdone(isc_task_t *task, isc_event_t *event) {
isc_event_free(&event);
isccc_sexpr_free(&response);
if (sends == 0 && recvs == 0) {
if (atomic_load(&sends) == 0 && atomic_load(&recvs) == 0) {
isc_socket_detach(&sock);
isc_task_shutdown(task);
RUNTIME_CHECK(isc_app_shutdown() == ISC_R_SUCCESS);
@@ -430,7 +430,7 @@ rndc_recvnonce(isc_task_t *task, isc_event_t *event) {
recvs++;
DO("send message", isc_socket_send(sock, &r, task, rndc_senddone,
NULL));
sends++;
atomic_fetch_add(&sends, 1);
isc_event_free(&event);
isccc_sexpr_free(&response);
@@ -498,7 +498,7 @@ rndc_connected(isc_task_t *task, isc_event_t *event) {
recvs++;
DO("send message", isc_socket_send(sock, &r, task, rndc_senddone,
NULL));
sends++;
atomic_fetch_add(&sends, 1);
isc_event_free(&event);
isccc_sexpr_free(&request);
}
@@ -999,8 +999,10 @@ main(int argc, char **argv) {
if (result != ISC_R_SUCCESS)
fatal("isc_app_run() failed: %s", isc_result_totext(result));
if (connects > 0 || sends > 0 || recvs > 0)
if (atomic_load(&connects) > 0 || atomic_load(&sends) > 0 ||
atomic_load(&recvs) > 0) {
isc_socket_cancel(sock, task, ISC_SOCKCANCEL_ALL);
}
isc_task_detach(&task);
isc_taskmgr_destroy(&taskmgr);
+1
View File
@@ -42,6 +42,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1
View File
@@ -43,6 +43,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
-6
View File
@@ -47,7 +47,6 @@ XTARGETS = adb_test@EXEEXT@ \
backtrace_test_nosymtbl@EXEEXT@ \
byname_test@EXEEXT@ \
db_test@EXEEXT@ \
dst_test@EXEEXT@ \
gsstest@EXEEXT@ \
fsaccess_test@EXEEXT@ \
inter_test@EXEEXT@ \
@@ -76,7 +75,6 @@ XSRCS = adb_test.c \
backtrace_test.c \
byname_test.c \
db_test.c \
dst_test.c \
fsaccess_test.c \
gsstest.c \
inter_test.c \
@@ -237,10 +235,6 @@ sig0_test@EXEEXT@: sig0_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ sig0_test.@O@ \
${DNSLIBS} ${ISCLIBS} ${LIBS}
dst_test@EXEEXT@: dst_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \
-o $@ dst_test.@O@ ${DNSLIBS} ${ISCLIBS} ${LIBS}
gsstest@EXEEXT@: gsstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \
-o $@ gsstest.@O@ ${DNSLIBS} ${ISCLIBS} ${LIBS}
-280
View File
@@ -1,280 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#include <config.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
#include <isc/buffer.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/region.h>
#include <isc/string.h> /* Required for HP/UX (and others?) */
#include <dns/fixedname.h>
#include <dns/log.h>
#include <dns/name.h>
#include <dns/result.h>
#include <dst/dst.h>
#include <dst/result.h>
char *current;
const char *tmp = "/tmp";
static void
use(dst_key_t *key, isc_mem_t *mctx) {
isc_result_t ret;
const char *data = "This is some data";
unsigned char sig[512];
isc_buffer_t databuf, sigbuf;
isc_region_t datareg, sigreg;
dst_context_t *ctx = NULL;
isc_buffer_init(&sigbuf, sig, sizeof(sig));
/*
* Advance 1 byte for fun.
*/
isc_buffer_add(&sigbuf, 1);
isc_buffer_constinit(&databuf, data, strlen(data));
isc_buffer_add(&databuf, strlen(data));
isc_buffer_usedregion(&databuf, &datareg);
ret = dst_context_create(key, mctx,
DNS_LOGCATEGORY_GENERAL, true, 0, &ctx);
if (ret != ISC_R_SUCCESS) {
printf("contextcreate(%u) returned: %s\n", dst_key_alg(key),
isc_result_totext(ret));
return;
}
ret = dst_context_adddata(ctx, &datareg);
if (ret != ISC_R_SUCCESS) {
printf("adddata(%u) returned: %s\n", dst_key_alg(key),
isc_result_totext(ret));
dst_context_destroy(&ctx);
return;
}
ret = dst_context_sign(ctx, &sigbuf);
printf("sign(%u) returned: %s\n", dst_key_alg(key),
isc_result_totext(ret));
dst_context_destroy(&ctx);
isc_buffer_forward(&sigbuf, 1);
isc_buffer_remainingregion(&sigbuf, &sigreg);
ret = dst_context_create(key, mctx,
DNS_LOGCATEGORY_GENERAL, false, 0, &ctx);
if (ret != ISC_R_SUCCESS) {
printf("contextcreate(%u) returned: %s\n", dst_key_alg(key),
isc_result_totext(ret));
return;
}
ret = dst_context_adddata(ctx, &datareg);
if (ret != ISC_R_SUCCESS) {
printf("adddata(%u) returned: %s\n", dst_key_alg(key),
isc_result_totext(ret));
dst_context_destroy(&ctx);
return;
}
ret = dst_context_verify(ctx, &sigreg);
printf("verify(%u) returned: %s\n", dst_key_alg(key),
isc_result_totext(ret));
dst_context_destroy(&ctx);
}
static void
dns(dst_key_t *key, isc_mem_t *mctx) {
unsigned char buffer1[2048];
unsigned char buffer2[2048];
isc_buffer_t buf1, buf2;
isc_region_t r1, r2;
dst_key_t *newkey = NULL;
isc_result_t ret;
bool match;
isc_buffer_init(&buf1, buffer1, sizeof(buffer1));
ret = dst_key_todns(key, &buf1);
printf("todns(%u) returned: %s\n", dst_key_alg(key),
isc_result_totext(ret));
if (ret != ISC_R_SUCCESS)
return;
ret = dst_key_fromdns(dst_key_name(key), dns_rdataclass_in,
&buf1, mctx, &newkey);
printf("fromdns(%u) returned: %s\n", dst_key_alg(key),
isc_result_totext(ret));
if (ret != ISC_R_SUCCESS)
return;
isc_buffer_init(&buf2, buffer2, sizeof(buffer2));
ret = dst_key_todns(newkey, &buf2);
printf("todns2(%u) returned: %s\n", dst_key_alg(key),
isc_result_totext(ret));
if (ret != ISC_R_SUCCESS)
return;
isc_buffer_usedregion(&buf1, &r1);
isc_buffer_usedregion(&buf2, &r2);
match = (r1.length == r2.length &&
memcmp(r1.base, r2.base, r1.length) == 0);
printf("compare(%u): %s\n", dst_key_alg(key),
match ? "true" : "false");
dst_key_free(&newkey);
}
static void
io(dns_name_t *name, int id, int alg, int type, isc_mem_t *mctx) {
dst_key_t *key = NULL;
isc_result_t ret;
ret = dst_key_fromfile(name, id, alg, type, current, mctx, &key);
printf("read(%d) returned: %s\n", alg, isc_result_totext(ret));
if (ret != 0)
return;
ret = dst_key_tofile(key, type, tmp);
printf("write(%d) returned: %s\n", alg, isc_result_totext(ret));
if (ret != 0)
return;
use(key, mctx);
dns(key, mctx);
dst_key_free(&key);
}
static void
dh(dns_name_t *name1, int id1, dns_name_t *name2, int id2, isc_mem_t *mctx) {
dst_key_t *key1 = NULL, *key2 = NULL;
isc_result_t ret;
isc_buffer_t b1, b2;
isc_region_t r1, r2;
unsigned char array1[1024], array2[1024];
int alg = DST_ALG_DH;
int type = DST_TYPE_PUBLIC|DST_TYPE_PRIVATE|DST_TYPE_KEY;
ret = dst_key_fromfile(name1, id1, alg, type, current, mctx, &key1);
printf("read(%d) returned: %s\n", alg, isc_result_totext(ret));
if (ret != 0)
return;
ret = dst_key_fromfile(name2, id2, alg, type, current, mctx, &key2);
printf("read(%d) returned: %s\n", alg, isc_result_totext(ret));
if (ret != 0)
return;
ret = dst_key_tofile(key1, type, tmp);
printf("write(%d) returned: %s\n", alg, isc_result_totext(ret));
if (ret != 0)
return;
ret = dst_key_tofile(key2, type, tmp);
printf("write(%d) returned: %s\n", alg, isc_result_totext(ret));
if (ret != 0)
return;
isc_buffer_init(&b1, array1, sizeof(array1));
ret = dst_key_computesecret(key1, key2, &b1);
printf("computesecret() returned: %s\n", isc_result_totext(ret));
if (ret != 0)
return;
isc_buffer_init(&b2, array2, sizeof(array2));
ret = dst_key_computesecret(key2, key1, &b2);
printf("computesecret() returned: %s\n", isc_result_totext(ret));
if (ret != 0)
return;
isc_buffer_usedregion(&b1, &r1);
isc_buffer_usedregion(&b2, &r2);
if (r1.length != r2.length || memcmp(r1.base, r2.base, r1.length) != 0)
{
int i;
printf("secrets don't match\n");
printf("secret 1: %u bytes\n", r1.length);
for (i = 0; i < (int) r1.length; i++)
printf("%02x ", r1.base[i]);
printf("\n");
printf("secret 2: %u bytes\n", r2.length);
for (i = 0; i < (int) r2.length; i++)
printf("%02x ", r2.base[i]);
printf("\n");
}
dst_key_free(&key1);
dst_key_free(&key2);
}
static void
generate(int alg, isc_mem_t *mctx) {
isc_result_t ret;
dst_key_t *key = NULL;
ret = dst_key_generate(dns_rootname, alg, 512, 0, 0, 0,
dns_rdataclass_in, mctx, &key, NULL);
printf("generate(%d) returned: %s\n", alg, isc_result_totext(ret));
if (ret != ISC_R_SUCCESS)
return;
if (alg != DST_ALG_DH)
use(key, mctx);
dst_key_free(&key);
}
int
main(void) {
isc_mem_t *mctx = NULL;
isc_buffer_t b;
dns_fixedname_t fname;
dns_name_t *name;
isc_result_t result;
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
return (1);
current = isc_mem_get(mctx, 256);
if (current == NULL)
return (1);
if (getcwd(current, 256) == NULL) {
perror("getcwd");
return (1);
}
dns_result_register();
dst_lib_init(mctx, NULL);
name = dns_fixedname_initname(&fname);
isc_buffer_constinit(&b, "test.", 5);
isc_buffer_add(&b, 5);
result = dns_name_fromtext(name, &b, NULL, 0, NULL);
if (result != ISC_R_SUCCESS)
return (1);
io(name, 54622, DST_ALG_RSAMD5, DST_TYPE_PRIVATE|DST_TYPE_PUBLIC,
mctx);
io(name, 2, DST_ALG_RSAMD5, DST_TYPE_PRIVATE|DST_TYPE_PUBLIC, mctx);
isc_buffer_constinit(&b, "dh.", 3);
isc_buffer_add(&b, 3);
result = dns_name_fromtext(name, &b, NULL, 0, NULL);
if (result != ISC_R_SUCCESS)
return (1);
dh(name, 18602, name, 48957, mctx);
generate(DST_ALG_RSAMD5, mctx);
generate(DST_ALG_DH, mctx);
generate(DST_ALG_HMACMD5, mctx);
dst_lib_destroy();
isc_mem_put(mctx, current, 256);
/* isc_mem_stats(mctx, stdout);*/
isc_mem_destroy(&mctx);
return (0);
}
+6 -6
View File
@@ -33,7 +33,7 @@ $DIG $DIGOPTS tsigzone. \
grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
copy_setports ns2/named2.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
rndc_reload ns2 10.53.0.2
sleep 5
# prefix 10/8 should fail
@@ -56,7 +56,7 @@ grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1;
echo_i "testing nested ACL processing"
# all combinations of 10.53.0.{1|2} with key {one|two}, should succeed
copy_setports ns2/named3.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
rndc_reload ns2 10.53.0.2
sleep 5
# should succeed
@@ -102,7 +102,7 @@ grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1;
# now we only allow 10.53.0.1 *and* key one, or 10.53.0.2 *and* key two
copy_setports ns2/named4.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
rndc_reload ns2 10.53.0.2
sleep 5
# should succeed
@@ -137,7 +137,7 @@ grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1;
echo_i "testing allow-query-on ACL processing"
copy_setports ns2/named5.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
rndc_reload ns2 10.53.0.2
sleep 5
t=`expr $t + 1`
$DIG -p ${PORT} +tcp soa example. \
@@ -161,7 +161,7 @@ grep "Transfer failed." dig.out.${t} >/dev/null 2>&1 || ret=1
status=`expr $status + $ret`
echo_i "calling rndc reconfig"
$RNDCCMD 10.53.0.3 reconfig 2>&1 | sed 's/^/ns3 /' | cat_i
rndc_reconfig ns3 10.53.0.3
sleep 1
@@ -190,7 +190,7 @@ grep "Transfer failed." dig.out.${t} >/dev/null 2>&1 || ret=1
status=`expr $status + $ret`
echo_i "calling rndc reconfig"
$RNDCCMD 10.53.0.4 reconfig 2>&1 | sed 's/^/ns4 /' | cat_i
rndc_reconfig ns4 10.53.0.4
sleep 1
+4 -8
View File
@@ -218,8 +218,7 @@ dotests
echo_i "reconfiguring server: minimal-responses no"
copy_setports ns1/named2.conf.in ns1/named.conf
$RNDCCMD 10.53.0.1 reconfig 2>&1 | sed 's/^/ns1 /' | cat_i
sleep 2
rndc_reconfig ns1 10.53.0.1
echo_i "testing with 'minimal-responses no;'"
minimal=no
@@ -236,8 +235,7 @@ fi
echo_i "reconfiguring server: minimal-any yes"
copy_setports ns1/named3.conf.in ns1/named.conf
$RNDCCMD 10.53.0.1 reconfig 2>&1 | sed 's/^/ns1 /' | cat_i
sleep 2
rndc_reconfig ns1 10.53.0.1
n=`expr $n + 1`
echo_i "testing with 'minimal-any yes;' over UDP ($n)"
@@ -272,8 +270,7 @@ dotests
echo_i "reconfiguring server: minimal-responses no-auth-recursive"
copy_setports ns1/named4.conf.in ns1/named.conf
$RNDCCMD 10.53.0.1 reconfig 2>&1 | sed 's/^/ns1 /' | cat_i
sleep 2
rndc_reconfig ns1 10.53.0.1
echo_i "testing with 'minimal-responses no-auth-recursive;'"
minimal=no-auth-recursive
@@ -303,8 +300,7 @@ fi
echo_i "reconfiguring server: minimal-responses no"
copy_setports ns1/named2.conf.in ns1/named.conf
$RNDCCMD 10.53.0.1 reconfig 2>&1 | sed 's/^/ns1 /' | cat_i
sleep 2
rndc_reconfig ns1 10.53.0.1
n=`expr $n + 1`
echo_i "testing NS handling in ANY responses (authoritative) ($n)"
+7 -11
View File
@@ -467,10 +467,9 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "reconfiguring server with multiple views"
rm -f ns2/named.conf
rm -f ns2/named.conf
copy_setports ns2/named2.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reconfig 2>&1 | sed 's/^/I:ns2 /'
sleep 5
rndc_reconfig ns2 10.53.0.2
echo_i "adding new zone to external view ($n)"
# NOTE: The internal view has "recursion yes" set, and so queries for
@@ -591,8 +590,7 @@ status=`expr $status + $ret`
echo_i "reconfiguring server with multiple views and new-zones-directory"
rm -f ns2/named.conf
copy_setports ns2/named3.conf.in ns2/named.conf
$RNDCCMD 10.53.0.2 reconfig 2>&1 | sed 's/^/I:ns2 /'
sleep 5
rndc_reconfig ns2 10.53.0.2
echo_i "checking new zone is still loaded after dir change ($n)"
ret=0
@@ -659,8 +657,7 @@ status=`expr $status + $ret`
echo_i "ensure the configuration context is cleaned up correctly ($n)"
ret=0
$RNDCCMD 10.53.0.2 reconfig > /dev/null 2>&1 || ret=1
sleep 5
rndc_reconfig ns2 10.53.0.2
$RNDCCMD 10.53.0.2 status > /dev/null 2>&1 || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
@@ -670,8 +667,7 @@ echo_i "check delzone after reconfig failure ($n)"
ret=0
$RNDCCMD 10.53.0.3 addzone 'inlineslave.example. IN { type slave; file "inlineslave.db"; masterfile-format text; masters { testmaster; }; };' > /dev/null 2>&1 || ret=1
copy_setports ns3/named2.conf.in ns3/named.conf
$RNDCCMD 10.53.0.3 reconfig > /dev/null 2>&1 && ret=1
sleep 5
rndc_reconfgi ns3 10.53.0.3
$RNDCCMD 10.53.0.3 delzone inlineslave.example > /dev/null 2>&1 || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
@@ -695,8 +691,8 @@ echo_i "check that named restarts with multiple added zones ($n)"
ret=0
$RNDCCMD 10.53.0.3 addzone "test4.baz" '{ type master; file "e.db"; };' > /dev/null 2>&1 || ret=1
$RNDCCMD 10.53.0.3 addzone "test5.baz" '{ type master; file "e.db"; };' > /dev/null 2>&1 || ret=1
$PERL $SYSTEMTESTTOP/stop.pl . ns3
$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 || ret=1
$PERL $SYSTEMTESTTOP/stop.pl addzone ns3
$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} addzone ns3 || ret=1
$DIG $DIGOPTS @10.53.0.3 version.bind txt ch > dig.out.test$n || ret=1
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
n=`expr $n + 1`
-8
View File
@@ -55,14 +55,6 @@ SYSTEMTESTTOP=..
DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}"
rndc_reload() {
echo_i "`$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} reload 2>&1 | sed 's/^/'$1' /'`"
for try in 0 1 2 3 4 5 6 7 8 9; do
nextpart $1/named.run | grep "reloading configuration succeeded" > /dev/null && break
sleep 1
done
}
status=0
n=0
+5 -3
View File
@@ -12,18 +12,19 @@
rm -f */K* */dsset-* */*.signed */tmp* */*.jnl */*.bk
rm -f */core
rm -f */example.bk
rm -f */named.conf
rm -f */named.memstats
rm -f */named.run
rm -f */named.conf
rm -f */trusted.conf */private.conf
rm -f activate-now-publish-1day.key
rm -f active.key inact.key del.key unpub.key standby.key rev.key
rm -f active.key inact.key del.key delzsk.key unpub.key standby.key rev.key
rm -f delayksk.key delayzsk.key autoksk.key autozsk.key
rm -f dig.out.*
rm -f digcomp.out.test*
rm -f digcomp.out.test*
rm -f missingzsk.key inactivezsk.key
rm -f nopriv.key vanishing.key del1.key del2.key
rm -f ns*/managed-keys.bind*
rm -f ns*/named.lock
rm -f ns*/named.lock
rm -f ns1/root.db
@@ -32,6 +33,8 @@ rm -f ns2/private.secure.example.db ns2/bar.db
rm -f ns3/*.nzd ns3/*.nzd-lock ns3/*.nzf
rm -f ns3/*.nzf
rm -f ns3/autonsec3.example.db
rm -f ns3/delzsk.example.db
rm -f ns3/dname-at-apex-nsec3.example.db
rm -f ns3/inacksk2.example.db
rm -f ns3/inacksk3.example.db
rm -f ns3/inaczsk2.example.db
@@ -63,4 +66,3 @@ rm -f nsupdate.out
rm -f settime.out.*
rm -f signing.out.*
rm -f sync.key
rm -f ns*/managed-keys.bind*
@@ -82,3 +82,5 @@ ns.nsec3-to-nsec A 10.53.0.3
oldsigs NS ns.oldsigs
ns.oldsigs A 10.53.0.3
dname-at-apex-nsec3 NS ns3
+2 -1
View File
@@ -15,7 +15,8 @@ SYSTEMTESTTOP=../..
# Have the child generate subdomain keys and pass DS sets to us.
( cd ../ns3 && $SHELL keygen.sh )
for subdomain in secure nsec3 autonsec3 optout rsasha256 rsasha512 nsec3-to-nsec oldsigs sync
for subdomain in secure nsec3 autonsec3 optout rsasha256 rsasha512 nsec3-to-nsec oldsigs sync \
dname-at-apex-nsec3
do
cp ../ns3/dsset-$subdomain.example$TP .
done
@@ -0,0 +1,23 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
$TTL 300 ; 5 minutes
@ IN SOA mname1. . (
2000010101 ; serial
20 ; refresh (20 seconds)
20 ; retry (20 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
NS ns
ns A 10.53.0.3
sub NS ns.sub
DS 12345 8 1 0000000000000000000000000000000000000000
ns.sub A 10.53.0.3
@@ -0,0 +1,5 @@
$TTL 600
@ SOA ns3.example. . 1 1200 1200 1814400 3600
@ NS ns3.example.
@ DNAME example.
@ NSEC3PARAM 1 0 0 -
+20
View File
@@ -314,3 +314,23 @@ ksk=`$KEYGEN -a NSEC3RSASHA1 -3 -q -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -a NSEC3RSASHA1 -3 -q $zone > kg.out 2>&1 || dumpit kg.out
$KEYGEN -a NSEC3RSASHA1 -3 -q -P now -A now+3600 $zone > kg.out 2>&1 || dumpit kg.out
$DSFROMKEY $ksk.key > dsset-${zone}$TP
#
# A zone that starts with an active KSK + ZSK and an inactive ZSK, with the
# latter getting deleted during the test.
#
setup delzsk.example
cp $infile $zonefile
ksk=`$KEYGEN -a NSEC3RSASHA1 -3 -q -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -a NSEC3RSASHA1 -3 -q $zone > kg.out 2>&1 || dumpit kg.out
zsk=`$KEYGEN -a NSEC3RSASHA1 -3 -q -I now-1w $zone 2>kg.out` || dumpit kg.out
echo $zsk > ../delzsk.key
#
# Check that NSEC3 are correctly signed and returned from below a DNAME
#
setup dname-at-apex-nsec3.example
cp $infile $zonefile
ksk=`$KEYGEN -q -a RSASHA1 -3 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a RSASHA1 -3 $zone > kg.out 2>&1 || dumpit kg.out
$DSFROMKEY $ksk.key > dsset-${zone}$TP
@@ -282,4 +282,18 @@ zone "inaczsk3.example" {
auto-dnssec maintain;
};
zone "delzsk.example." {
type master;
file "delzsk.example.db";
allow-update { any; };
auto-dnssec maintain;
};
zone "dname-at-apex-nsec3.example" {
type master;
file "dname-at-apex-nsec3.example.db";
allow-update { any; };
auto-dnssec maintain;
};
include "trusted.conf";
@@ -31,3 +31,5 @@ ns.private A 10.53.0.2
insecure NS ns.insecure
ns.insecure A 10.53.0.2
dname-and-txt DNAME @
TXT "DNAME and TXT"
+73 -1
View File
@@ -1227,7 +1227,7 @@ rekey_calls=`grep "zone reconf.example.*next key event" ns3/named.run | wc -l`
[ "$rekey_calls" -eq 0 ] || ret=1
# ...then we add auto-dnssec and reconfigure
$RNDCCMD 10.53.0.3 modzone reconf.example '{ type master; file "reconf.example.db"; allow-update { any; }; auto-dnssec maintain; };' 2>&1 | sed 's/^/ns3 /' | cat_i
$RNDCCMD 10.53.0.3 reconfig 2>&1 | sed 's/^/ns3 /' | cat_i
rndc_reconfig ns3 10.53.0.3
for i in 0 1 2 3 4 5 6 7 8 9; do
lret=0
rekey_calls=`grep "zone reconf.example.*next key event" ns3/named.run | wc -l`
@@ -1395,5 +1395,77 @@ n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "checking for out-of-zone NSEC3 records after ZSK removal ($n)"
ret=0
# Switch the zone over to NSEC3 and wait until the transition is complete.
$RNDCCMD 10.53.0.3 signing -nsec3param 1 1 10 12345678 delzsk.example. > signing.out.1.test$n 2>&1 || ret=1
for i in 0 1 2 3 4 5 6 7 8 9; do
_ret=1
$DIG $DIGOPTS delzsk.example NSEC3PARAM @10.53.0.3 > dig.out.ns3.1.test$n 2>&1 || ret=1
grep "NSEC3PARAM.*12345678" dig.out.ns3.1.test$n > /dev/null 2>&1
if [ $? -eq 0 ]; then
_ret=0
break
fi
sleep 1
done
if [ $_ret -ne 0 ]; then
echo_i "timed out waiting for NSEC3 chain creation"
ret=1
fi
# Mark the inactive ZSK as pending removal.
file="ns3/`cat delzsk.key`.key"
$SETTIME -D now-1h $file > settime.out.test$n 2>&1 || ret=1
# Trigger removal of the inactive ZSK and wait until its completion.
$RNDCCMD 10.53.0.3 loadkeys delzsk.example 2>&1 | sed 's/^/ns3 /' | cat_i
for i in 0 1 2 3 4 5 6 7 8 9; do
_ret=1
$RNDCCMD 10.53.0.3 signing -list delzsk.example > signing.out.2.test$n 2>&1
grep "Signing " signing.out.2.test$n > /dev/null 2>&1
if [ $? -ne 0 ]; then
if [ `cat signing.out.2.test$n | wc -l` -eq 2 ]; then
_ret=0
break
fi
fi
sleep 1
done
if [ $_ret -ne 0 ]; then
echo_i "timed out waiting for key removal"
ret=1
fi
# Check whether key removal caused NSEC3 records to be erroneously created for
# glue records due to a secure delegation already being signed by the active key
# (i.e. a key other than the one being removed but using the same algorithm).
#
# For reference:
#
# $ nsec3hash 12345678 1 10 ns.sub.delzsk.example.
# 589R358VSPJUFVAJU949JPVF74D9PTGH (salt=12345678, hash=1, iterations=10)
#
$DIG $DIGOPTS delzsk.example AXFR @10.53.0.3 > dig.out.ns3.3.test$n || ret=1
grep "589R358VSPJUFVAJU949JPVF74D9PTGH" dig.out.ns3.3.test$n > /dev/null 2>&1 && ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "check that DNAME at apex with NSEC3 is correctly signed (auto-dnssec maintain) ($n)"
ret=0
$DIG $DIGOPTS txt dname-at-apex-nsec3.example @10.53.0.3 > dig.out.ns3.test$n || ret=1
grep "RRSIG NSEC3 7 3 3600" dig.out.ns3.test$n > /dev/null || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "checking that DNAME is not treated as a delegation when signing ($n)"
ret=0
$DIG $DIGOPTS dname-and-txt.secure.example. DNAME @10.53.0.3 > dig.out.ns3.1.test$n || ret=1
grep "dname-and-txt.secure.example.*RRSIG.*DNAME" dig.out.ns3.1.test$n > /dev/null 2>&1 || ret=1
$DIG $DIGOPTS dname-and-txt.secure.example. TXT @10.53.0.3 > dig.out.ns3.2.test$n || ret=1
grep "dname-and-txt.secure.example.*RRSIG.*TXT" dig.out.ns3.2.test$n > /dev/null 2>&1 || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1
+1 -1
View File
@@ -148,7 +148,7 @@ if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
n=`expr $n + 1`
echo_i "Checking that reloading empty zones is silent ($n)"
$RNDCCMD 10.53.0.1 reload > /dev/null
rndc_reload ns1 10.53.0.1
ret=0
grep "automatic empty zone" ns1/named.run > /dev/null || ret=1
grep "received control channel command 'reload'" ns1/named.run > /dev/null || ret=1
@@ -9,10 +9,6 @@
* information regarding copyright ownership.
*/
options {
};
view myview {
filter-aaaa { 1.0.0.0/8; };
filter-aaaa-on-v4 yes;
view {
allow-update-forwarding { any; };
};
@@ -10,9 +10,5 @@
*/
options {
filter-aaaa-on-v4 yes;
};
view myview {
filter-aaaa { none; };
allow-update-forwarding { any; };
};
@@ -9,11 +9,6 @@
* information regarding copyright ownership.
*/
options {
filter-aaaa-on-v4 no;
};
view myview {
filter-aaaa { 1.0.0.0/8; };
filter-aaaa-on-v4 yes;
view {
allow-update { any; };
};
@@ -10,9 +10,5 @@
*/
options {
filter-aaaa { 1.0.0.0/8; };
};
view myview {
filter-aaaa-on-v4 yes;
allow-update { any; };
};
@@ -0,0 +1,4 @@
zone "\0example" {
type mirror;
file "example.db";
};
@@ -0,0 +1,23 @@
controls { /* empty */ };
options {
query-source address 10.53.0.2;
notify-source 10.53.0.2;
transfer-source 10.53.0.2;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.2; };
listen-on-v6 { none; };
heartbeat-interval 2;
recursion no;
};
zone "." {
type hint;
file "hint";
};
zone "example." {
type stub;
dialup notify;
notify no;
file "example.bk";
// masters { 10.53.0.1; };
};
+3 -3
View File
@@ -133,6 +133,9 @@ view "third" {
zone "dnssec" {
type master;
file "file";
allow-update {
"any";
};
auto-dnssec maintain;
};
zone "p" {
@@ -145,9 +148,6 @@ view "third" {
1.2.3.4;
};
};
allow-update {
"any";
};
};
view "chaos" chaos {
zone "hostname.bind" chaos {
+4 -3
View File
@@ -36,15 +36,16 @@ done
for db in zones/bad*.db
do
echo_i "checking $db ($n)"
ret=0
ret=0 v=0
case $db in
zones/bad-dns-sd-reverse.db)
$CHECKZONE -k fail -i local 0.0.0.0.in-addr.arpa $db > test.out.$n 2>&1 && ret=1
$CHECKZONE -k fail -i local 0.0.0.0.in-addr.arpa $db > test.out.$n 2>&1 || v=$?
;;
*)
$CHECKZONE -i local example $db > test.out.$n 2>&1 && ret=1
$CHECKZONE -i local example $db > test.out.$n 2>&1 || v=$?
;;
esac
test $v = 1 || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
@@ -0,0 +1,2 @@
@ 3600 DHCID
@ 3600 DHCID
@@ -0,0 +1,2 @@
@ EID
@ EID
@@ -0,0 +1,2 @@
@ 3600 NIMLOC
@ 3600 NIMLOC
@@ -14,7 +14,7 @@ dyn.example.net. 7200 IN SOA ns1.example.net. hostmaster.example.net. (
1209600 ; expire (2 weeks)
7200 ; minimum (2 hours)
)
7200 RRSIG SOA 7 3 7200 2010 20100225214229 30323 dyn.example.net.
7200 RRSIG SOA 7 3 7200 2010 20100225214229 30323 dyn.example.net. MuyI
7200 NS ns1.example.net.
7200 NS ns2.example.net.
3600 RRSIG DNSKEY 7 3 3600 20100227180048 (
+305
View File
@@ -0,0 +1,305 @@
#!/bin/sh
#
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
if test -n "$PERL"
then
if $PERL -e "use IO::Socket::INET6;" 2> /dev/null
then
TESTSOCK6="$PERL $TOP/bin/tests/system/testsock6.pl"
else
TESTSOCK6=false
fi
else
TESTSOCK6=false
fi
TESTSOCK6="$TESTSOCK6"
. ${TOP}/version
#
# Set up color-coded test output
#
if [ ${SYSTEMTEST_FORCE_COLOR:-0} -eq 1 ] || test -t 1 && type tput > /dev/null 2>&1 && tput setaf 7 > /dev/null 2>&1 ; then
COLOR_END=`tput setaf 4` # blue
COLOR_FAIL=`tput setaf 1` # red
COLOR_INFO=`tput bold` # bold
COLOR_NONE=`tput sgr0`
COLOR_PASS=`tput setaf 2` # green
COLOR_START=`tput setaf 4` # blue
COLOR_WARN=`tput setaf 3` # yellow
else
# set to empty strings so printf succeeds
COLOR_END=''
COLOR_FAIL=''
COLOR_INFO=''
COLOR_NONE=''
COLOR_PASS=''
COLOR_START=''
COLOR_WARN=''
fi
if type printf > /dev/null 2>&1
then
echofail () {
printf "${COLOR_FAIL}%s${COLOR_NONE}\n" "$*"
}
echowarn () {
printf "${COLOR_WARN}%s${COLOR_NONE}\n" "$*"
}
echopass () {
printf "${COLOR_PASS}%s${COLOR_NONE}\n" "$*"
}
echoinfo () {
printf "${COLOR_INFO}%s${COLOR_NONE}\n" "$*"
}
echostart () {
printf "${COLOR_START}%s${COLOR_NONE}\n" "$*"
}
echoend () {
printf "${COLOR_END}%s${COLOR_NONE}\n" "$*"
}
else
echofail () {
echo "$*"
}
echowarn () {
echo "$*"
}
echopass () {
echo "$*"
}
echoinfo () {
echo "$*"
}
echostart () {
echo "$*"
}
echoend () {
echo "$*"
}
fi
SYSTESTDIR="`basename $PWD`"
echo_i() {
echo "$@" | while read __LINE ; do
echoinfo "I:$SYSTESTDIR:$__LINE"
done
}
echo_ic() {
echo "$@" | while read __LINE ; do
echoinfo "I:$SYSTESTDIR: $__LINE"
done
}
cat_i() {
while read __LINE ; do
echoinfo "I:$SYSTESTDIR:$__LINE"
done
}
echo_d() {
echo "$@" | while read __LINE ; do
echoinfo "D:$SYSTESTDIR:$__LINE"
done
}
cat_d() {
while read __LINE ; do
echoinfo "D:$SYSTESTDIR:$__LINE"
done
}
digcomp() {
output=`$PERL $SYSTEMTESTTOP/digcomp.pl "$@"`
result=$?
[ -n "$output" ] && { echo "digcomp failed:"; echo "$output"; } | cat_i
return $result
}
#
# Useful functions in test scripts
#
# keyfile_to_keys_section: helper function for keyfile_to_*_keys() which
# converts keyfile data into a configuration section using the supplied
# parameters
keyfile_to_keys_section() {
section_name=$1
key_prefix=$2
shift
shift
echo "$section_name {"
for keyname in $*; do
awk '!/^; /{
printf "\t\""$1"\" "
printf "'"$key_prefix"'"
printf $4 " " $5 " " $6 " \""
for (i=7; i<=NF; i++) printf $i
printf "\";\n"
}' $keyname.key
done
echo "};"
}
# keyfile_to_trusted_keys: convert key data contained in the keyfile(s)
# provided to a "trusted-keys" section suitable for including in a
# resolver's configuration file
keyfile_to_trusted_keys() {
keyfile_to_keys_section "trusted-keys" "" $*
}
# keyfile_to_managed_keys: convert key data contained in the keyfile(s)
# provided to a "managed-keys" section suitable for including in a
# resolver's configuration file
keyfile_to_managed_keys() {
keyfile_to_keys_section "managed-keys" "initial-key " $*
}
# nextpart*() - functions for reading files incrementally
#
# These functions aim to facilitate looking for (or waiting for)
# messages which may be logged more than once throughout the lifetime of
# a given named instance by outputting just the part of the file which
# has been appended since the last time we read it.
#
# Calling some of these functions causes temporary *.prev files to be
# created that need to be cleaned up manually (usually by a given system
# test's clean.sh script).
#
# Note that unlike other nextpart*() functions, nextpartread() is not
# meant to be directly used in system tests; its sole purpose is to
# reduce code duplication below.
#
# A quick usage example:
#
# $ echo line1 > named.log
# $ echo line2 >> named.log
# $ nextpart named.log
# line1
# line2
# $ echo line3 >> named.log
# $ nextpart named.log
# line3
# $ nextpart named.log
# $ echo line4 >> named.log
# $ nextpartpeek named.log
# line4
# $ nextpartpeek named.log
# line4
# $ nextpartreset named.log
# $ nextpartpeek named.log
# line1
# line2
# line3
# line4
# $ nextpart named.log
# line1
# line2
# line3
# line4
# $ nextpart named.log
# $
# nextpartreset: reset the marker used by nextpart() and nextpartpeek()
# so that it points to the start of the given file
nextpartreset() {
echo "0" > $1.prev
}
# nextpartread: read everything that's been appended to a file since the
# last time nextpart() was called and print it to stdout, print the
# total number of lines read from that file so far to stderr
nextpartread() {
[ -f $1.prev ] || nextpartreset $1
prev=`cat $1.prev`
awk "NR > $prev "'{ print }
END { print NR > "/dev/stderr" }' $1
}
# nextpart: read everything that's been appended to a file since the
# last time nextpart() was called
nextpart() {
nextpartread $1 2> $1.prev.tmp
mv $1.prev.tmp $1.prev
}
# nextpartpeek: read everything that's been appended to a file since the
# last time nextpart() was called
nextpartpeek() {
nextpartread $1 2> /dev/null
}
rndc_reload() {
echo_i "`$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} reload $3 2>&1 | sed 's/^/'$1' /'`"
# reloading single zone is synchronous, if we're reloading whole server
# we need to wait for reload to finish
if [ -z "$3" ]; then
for __try in 0 1 2 3 4 5 6 7 8 9; do
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break;
sleep 1
done
fi
}
rndc_reconfig() {
echo_i "`$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} reconfig 2>&1 | sed 's/^/'$1' /'`"
for __try in 0 1 2 3 4 5 6 7 8 9; do
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break;
sleep 1
done
}
#
# Export command paths
#
export ARPANAME
export BIGKEY
export CDS
export CHECKZONE
export DESCRIPTION
export DIG
export FEATURETEST
export FSTRM_CAPTURE
export GENCHECK
export JOURNALPRINT
export KEYCREATE
export KEYDELETE
export KEYFRLAB
export KEYGEN
export KEYSETTOOL
export KEYSIGNER
export KRB5_CONFIG
export MAKEJOURNAL
export MDIG
export NAMED
export NSEC3HASH
export NSLOOKUP
export NSUPDATE
export NZD2NZF
export PERL
export PIPEQUERIES
export PK11DEL
export PK11GEN
export PK11LIST
export PSSUSPEND
export PYTHON
export RESOLVE
export RNDC
export RRCHECKER
export SAMPLEUPDATE
export SIGNER
export SUBDIRS
export TESTSOCK6
export TSIGKEYGEN
export WIRETEST
+11 -275
View File
@@ -22,6 +22,11 @@ DEFAULT_ALGORITHM=ECDSAP256SHA256
DEFAULT_ALGORITHM_NUMBER=13
DEFAULT_BITS=256
# must be different from DEFAULT_ALGORITHM
ALTERNATIVE_ALGORITHM=RSASHA256
ALTERNATIVE_ALGORITHM_NUMBER=8
ALTERNATIVE_BITS=1280
ARPANAME=$TOP/bin/tools/arpaname
CDS=$TOP/bin/dnssec/dnssec-cds
CHECKCONF=$TOP/bin/check/named-checkconf
@@ -128,20 +133,6 @@ XMLLINT=@XMLLINT@
# PERL will be an empty string if no perl interpreter was found.
PERL=@PERL@
if test -n "$PERL"
then
if $PERL -e "use IO::Socket::INET6;" 2> /dev/null
then
TESTSOCK6="$PERL $TOP/bin/tests/system/testsock6.pl"
else
TESTSOCK6=false
fi
else
TESTSOCK6=false
fi
TESTSOCK6="$TESTSOCK6"
# Windows process management leave empty
PSSUSPEND=
@@ -155,225 +146,8 @@ HAVEJSONSTATS=@JSONSTATS@
ZLIB=@ZLIB@
NZD=@NZD_TOOLS@
. ${TOP}/version
#
# Set up color-coded test output
#
if [ ${SYSTEMTEST_FORCE_COLOR:-0} -eq 1 ] || test -t 1 && type tput > /dev/null 2>&1 && tput setaf 7 > /dev/null 2>&1 ; then
COLOR_END=`tput setaf 4` # blue
COLOR_FAIL=`tput setaf 1` # red
COLOR_INFO=`tput bold` # bold
COLOR_NONE=`tput sgr0`
COLOR_PASS=`tput setaf 2` # green
COLOR_START=`tput setaf 4` # blue
COLOR_WARN=`tput setaf 3` # yellow
else
# set to empty strings so printf succeeds
COLOR_END=''
COLOR_FAIL=''
COLOR_INFO=''
COLOR_NONE=''
COLOR_PASS=''
COLOR_START=''
COLOR_WARN=''
fi
if type printf > /dev/null 2>&1
then
echofail () {
printf "${COLOR_FAIL}%s${COLOR_NONE}\n" "$*"
}
echowarn () {
printf "${COLOR_WARN}%s${COLOR_NONE}\n" "$*"
}
echopass () {
printf "${COLOR_PASS}%s${COLOR_NONE}\n" "$*"
}
echoinfo () {
printf "${COLOR_INFO}%s${COLOR_NONE}\n" "$*"
}
echostart () {
printf "${COLOR_START}%s${COLOR_NONE}\n" "$*"
}
echoend () {
printf "${COLOR_END}%s${COLOR_NONE}\n" "$*"
}
else
echofail () {
echo "$*"
}
echowarn () {
echo "$*"
}
echopass () {
echo "$*"
}
echoinfo () {
echo "$*"
}
echostart () {
echo "$*"
}
echoend () {
echo "$*"
}
fi
SYSTESTDIR="`basename $PWD`"
echo_i() {
echo "$@" | while read __LINE ; do
echoinfo "I:$SYSTESTDIR:$__LINE"
done
}
echo_ic() {
echo "$@" | while read __LINE ; do
echoinfo "I:$SYSTESTDIR: $__LINE"
done
}
cat_i() {
while read __LINE ; do
echoinfo "I:$SYSTESTDIR:$__LINE"
done
}
echo_d() {
echo "$@" | while read __LINE ; do
echoinfo "D:$SYSTESTDIR:$__LINE"
done
}
cat_d() {
while read __LINE ; do
echoinfo "D:$SYSTESTDIR:$__LINE"
done
}
digcomp() {
output=`$PERL $SYSTEMTESTTOP/digcomp.pl "$@"`
result=$?
[ -n "$output" ] && { echo "digcomp failed:"; echo "$output"; } | cat_i
return $result
}
#
# Useful functions in test scripts
#
# keyfile_to_keys_section: helper function for keyfile_to_*_keys() which
# converts keyfile data into a configuration section using the supplied
# parameters
keyfile_to_keys_section() {
section_name=$1
key_prefix=$2
shift
shift
echo "$section_name {"
for keyname in $*; do
awk '!/^; /{
printf "\t\""$1"\" "
printf "'"$key_prefix"'"
printf $4 " " $5 " " $6 " \""
for (i=7; i<=NF; i++) printf $i
printf "\";\n"
}' $keyname.key
done
echo "};"
}
# keyfile_to_trusted_keys: convert key data contained in the keyfile(s)
# provided to a "trusted-keys" section suitable for including in a
# resolver's configuration file
keyfile_to_trusted_keys() {
keyfile_to_keys_section "trusted-keys" "" $*
}
# keyfile_to_managed_keys: convert key data contained in the keyfile(s)
# provided to a "managed-keys" section suitable for including in a
# resolver's configuration file
keyfile_to_managed_keys() {
keyfile_to_keys_section "managed-keys" "initial-key " $*
}
# nextpart*() - functions for reading files incrementally
#
# These functions aim to facilitate looking for (or waiting for)
# messages which may be logged more than once throughout the lifetime of
# a given named instance by outputting just the part of the file which
# has been appended since the last time we read it.
#
# Calling some of these functions causes temporary *.prev files to be
# created that need to be cleaned up manually (usually by a given system
# test's clean.sh script).
#
# Note that unlike other nextpart*() functions, nextpartread() is not
# meant to be directly used in system tests; its sole purpose is to
# reduce code duplication below.
#
# A quick usage example:
#
# $ echo line1 > named.log
# $ echo line2 >> named.log
# $ nextpart named.log
# line1
# line2
# $ echo line3 >> named.log
# $ nextpart named.log
# line3
# $ nextpart named.log
# $ echo line4 >> named.log
# $ nextpartpeek named.log
# line4
# $ nextpartpeek named.log
# line4
# $ nextpartreset named.log
# $ nextpartpeek named.log
# line1
# line2
# line3
# line4
# $ nextpart named.log
# line1
# line2
# line3
# line4
# $ nextpart named.log
# $
# nextpartreset: reset the marker used by nextpart() and nextpartpeek()
# so that it points to the start of the given file
nextpartreset() {
echo "0" > $1.prev
}
# nextpartread: read everything that's been appended to a file since the
# last time nextpart() was called and print it to stdout, print the
# total number of lines read from that file so far to stderr
nextpartread() {
[ -f $1.prev ] || nextpartreset $1
prev=`cat $1.prev`
awk "NR > $prev "'{ print }
END { print NR > "/dev/stderr" }' $1
}
# nextpart: read everything that's been appended to a file since the
# last time nextpart() was called
nextpart() {
nextpartread $1 2> $1.prev.tmp
mv $1.prev.tmp $1.prev
}
# nextpartpeek: read everything that's been appended to a file since the
# last time nextpart() was called
nextpartpeek() {
nextpartread $1 2> /dev/null
}
# copy_setports - Copy Configuration File and Replace Ports
# Unfortunately it has to be different on Windows.
#
# Convenience function to copy a configuration file, replacing the tokens
# QUERYPORT, CONTROLPORT and EXTRAPORT[1-8] with the values of the equivalent
@@ -397,49 +171,11 @@ copy_setports() {
-e "s/@DEFAULT_ALGORITHM@/${DEFAULT_ALGORITHM}/g" \
-e "s/@DEFAULT_ALGORITHM_NUMBER@/${DEFAULT_ALGORITHM_NUMBER}/g" \
-e "s/@DEFAULT_BITS@/${DEFAULT_BITS}/g" \
-e "s/@ALTERNATIVE_ALGORITHM@/${ALTERNATIVE_ALGORITHM}/g" \
-e "s/@ALTERNATIVE_ALGORITHM_NUMBER@/${ALTERNATIVE_ALGORITHM_NUMBER}/g" \
-e "s/@ALTERNATIVE_BITS@/${ALTERNATIVE_BITS}/g" \
$1 > $2
}
#
# Export command paths
#
export ARPANAME
export BIGKEY
export CDS
export CHECKZONE
export DESCRIPTION
export DIG
export FEATURETEST
export FSTRM_CAPTURE
export GENCHECK
export JOURNALPRINT
export KEYCREATE
export KEYDELETE
export KEYFRLAB
export KEYGEN
export KEYSETTOOL
export KEYSIGNER
export KRB5_CONFIG
export MAKEJOURNAL
export MDIG
export NAMED
export NSEC3HASH
export NSLOOKUP
export NSUPDATE
export NZD2NZF
export PERL
export PIPEQUERIES
export PK11DEL
export PK11GEN
export PK11LIST
export PSSUSPEND
export PYTHON
export RESOLVE
export RNDC
export RRCHECKER
export SAMPLEUPDATE
export SIGNER
export SUBDIRS
export TESTSOCK6
export TSIGKEYGEN
export WIRETEST
# The rest is shared between Windows and Unices
. $TOP/bin/tests/system/conf.sh.common
+16 -237
View File
@@ -31,7 +31,13 @@ DEFAULT_ALGORITHM=ECDSAP256SHA256
DEFAULT_ALGORITHM_NUMBER=13
DEFAULT_BITS=256
# must be different from DEFAULT_ALGORITHM
ALTERNATIVE_ALGORITHM=RSASHA256
ALTERNATIVE_ALGORITHM_NUMBER=8
ALTERNATIVE_BITS=1280
ARPANAME=$TOP/Build/$VSCONF/arpaname@EXEEXT@
CDS=
CHECKCONF=$TOP/Build/$VSCONF/named-checkconf@EXEEXT@
CHECKDS="$PYTHON `cygpath -w $TOP/bin/python/dnssec-checkds.py`"
CHECKZONE=$TOP/Build/$VSCONF/named-checkzone@EXEEXT@
@@ -50,6 +56,7 @@ KEYGEN=$TOP/Build/$VSCONF/dnssec-keygen@EXEEXT@
KEYMGR="$PYTHON `cygpath -w $TOP/bin/python/dnssec-keymgr.py`"
MDIG=$TOP/Build/$VSCONF/mdig@EXEEXT@
NAMED=$TOP/Build/$VSCONF/named@EXEEXT@
NSEC3HASH=
NSLOOKUP=$TOP/Build/$VSCONF/nslookup@EXEEXT@
NSUPDATE=$TOP/Build/$VSCONF/nsupdate@EXEEXT@
NZD2NZF=$TOP/Build/$VSCONF/named-nzd2nzf@EXEEXT@
@@ -68,6 +75,7 @@ TSIGKEYGEN=$TOP/Build/$VSCONF/tsig-keygen@EXEEXT@
VERIFY=$TOP/Build/$VSCONF/dnssec-verify@EXEEXT@
# to port WIRETEST=$TOP/Build/$VSCONF/wire_test@EXEEXT@
WIRETEST=
BIGKEY=$TOP/Build/$VSCONF/bigkey@EXEEXT@
GENCHECK=$TOP/Build/$VSCONF/gencheck@EXEEXT@
@@ -128,25 +136,12 @@ CURL=/usr/bin/curl
XMLLINT=/usr/bin/xmllint
PERL=/usr/bin/perl
if test -n "$PERL"
then
if $PERL -e "use IO::Socket::INET6;" 2> /dev/null
then
TESTSOCK6="$PERL $TOP/bin/tests/system/testsock6.pl"
else
TESTSOCK6=false
fi
else
TESTSOCK6=false
fi
TESTSOCK6="$TESTSOCK6"
#
# PsSuspend is part of PSTools and can be downloaded from
# https://download.sysinternals.com/files/PSTools.zip
#
PSSUSPEND=@PSSUSPEND@
PYTHON=@PYTHON@
#
@@ -157,190 +152,8 @@ HAVEJSONSTATS=@JSONSTATS@
ZLIB=@ZLIB@
NZD=@NZD_TOOLS@
. ${TOP}/version
#
# Set up color-coded test output
#
if test -t 1 && type tput > /dev/null; then
COLOR_END=`tput setaf 4` # blue
COLOR_FAIL=`tput setaf 1` # red
COLOR_INFO=`tput bold` # bold
COLOR_NONE=`tput sgr0`
COLOR_PASS=`tput setaf 2` # green
COLOR_START=`tput setaf 4` # blue
COLOR_WARN=`tput setaf 3` # yellow
else
# set to empty strings so printf succeeds
COLOR_END=''
COLOR_FAIL=''
COLOR_INFO=''
COLOR_NONE=''
COLOR_PASS=''
COLOR_START=''
COLOR_WARN=''
fi
echofail () {
printf "${COLOR_FAIL}%s${COLOR_NONE}\n" "$*"
}
echowarn () {
printf "${COLOR_WARN}%s${COLOR_NONE}\n" "$*"
}
echopass () {
printf "${COLOR_PASS}%s${COLOR_NONE}\n" "$*"
}
echoinfo () {
printf "${COLOR_INFO}%s${COLOR_NONE}\n" "$*"
}
echostart () {
printf "${COLOR_START}%s${COLOR_NONE}\n" "$*"
}
echoend () {
printf "${COLOR_END}%s${COLOR_NONE}\n" "$*"
}
SYSTESTDIR="`basename $PWD`"
echo_i() {
echo "$@" | while read __LINE ; do
echoinfo "I:$SYSTESTDIR:$__LINE"
done
}
echo_ic() {
echo "$@" | while read __LINE ; do
echoinfo "I:$SYSTESTDIR: $__LINE"
done
}
cat_i() {
while read __LINE ; do
echoinfo "I:$SYSTESTDIR:$__LINE"
done
}
digcomp() {
output=`$PERL $SYSTEMTESTTOP/digcomp.pl "$@"`
result=$?
[ -n "$output" ] && { echo "digcomp failed:"; echo "$output"; } | cat_i
return $result
}
#
# Useful functions in test scripts
#
# keyfile_to_keys_section: helper function for keyfile_to_*_keys() which
# converts keyfile data into a configuration section using the supplied
# parameters
keyfile_to_keys_section() {
section_name=$1
key_prefix=$2
shift
shift
echo "$section_name {"
for keyname in $*; do
awk '!/^; /{
printf "\t\""$1"\" "
printf "'"$key_prefix"'"
printf $4 " " $5 " " $6 " \""
for (i=7; i<=NF; i++) printf $i
printf "\";\n"
}' $keyname.key
done
echo "};"
}
# keyfile_to_trusted_keys: convert key data contained in the keyfile(s)
# provided to a "trusted-keys" section suitable for including in a
# resolver's configuration file
keyfile_to_trusted_keys() {
keyfile_to_keys_section "trusted-keys" "" $*
}
# keyfile_to_managed_keys: convert key data contained in the keyfile(s)
# provided to a "managed-keys" section suitable for including in a
# resolver's configuration file
keyfile_to_managed_keys() {
keyfile_to_keys_section "managed-keys" "initial-key " $*
}
# nextpart*() - functions for reading files incrementally
#
# These functions aim to facilitate looking for (or waiting for)
# messages which may be logged more than once throughout the lifetime of
# a given named instance by outputting just the part of the file which
# has been appended since the last time we read it.
#
# Calling some of these functions causes temporary *.prev files to be
# created that need to be cleaned up manually (usually by a given system
# test's clean.sh script).
#
# Note that unlike other nextpart*() functions, nextpartread() is not
# meant to be directly used in system tests; its sole purpose is to
# reduce code duplication below.
#
# A quick usage example:
#
# $ echo line1 > named.log
# $ echo line2 >> named.log
# $ nextpart named.log
# line1
# line2
# $ echo line3 >> named.log
# $ nextpart named.log
# line3
# $ nextpart named.log
# $ echo line4 >> named.log
# $ nextpartpeek named.log
# line4
# $ nextpartpeek named.log
# line4
# $ nextpartreset named.log
# $ nextpartpeek named.log
# line1
# line2
# line3
# line4
# $ nextpart named.log
# line1
# line2
# line3
# line4
# $ nextpart named.log
# $
# nextpartreset: reset the marker used by nextpart() and nextpartpeek()
# so that it points to the start of the given file
nextpartreset() {
echo "0" > $1.prev
}
# nextpartread: read everything that's been appended to a file since the
# last time 'nextpart' was called and print it to stdout, print the
# total number of lines read from that file so far to stderr
nextpartread() {
[ -f $1.prev ] || nextpartreset $1
prev=`cat $1.prev`
awk "NR > $prev "'{ print }
END { print NR > "/dev/stderr" }' $1
}
# nextpart: read everything that's been appended to a file since the
# last time 'nextpart' was called
nextpart() {
nextpartread $1 2> $1.prev.tmp
mv $1.prev.tmp $1.prev
}
# nextpartpeek: read everything that's been appended to a file since the
# last time 'nextpart' was called
nextpartpeek() {
nextpartread $1 2> /dev/null
}
# copy_setports - Copy Configuration File and Replace Ports
# Unfortunately it has to be different on Windows.
#
# Convenience function to copy a configuration file, replacing the tokens
# QUERYPORT, CONTROLPORT and EXTRAPORT[1-8] with the values of the equivalent
@@ -367,48 +180,14 @@ copy_setports() {
-e "s/${atsign}EXTRAPORT7${atsign}/${EXTRAPORT7}/g" \
-e "s/${atsign}EXTRAPORT8${atsign}/${EXTRAPORT8}/g" \
-e "s/${atsign}CONTROLPORT${atsign}/${CONTROLPORT}/g" \
-e "s/${atsign}DEFAULT_ALGORITM${atsign}/${DEFAULT_ALGORITHM}/g" \
-e "s/${atsign}DEFAULT_ALGORITHM${atsign}/${DEFAULT_ALGORITHM}/g" \
-e "s/${atsign}DEFAULT_ALGORITHM_NUMBER${atsign}/${DEFAULT_ALGORITHM_NUMBER}/g" \
-e "s/${atsign}DEFAULT_BITS${atsign}/${DEFAULT_BITS}/g" \
-e "s/${atsign}ALTERNATIVE_ALGORITHM${atsign}/${ALTERNATIVE_ALGORITHM}/g" \
-e "s/${atsign}ALTERNATIVE_ALGORITHM_NUMBER${atsign}/${ALTERNATIVE_ALGORITHM_NUMBER}/g" \
-e "s/${atsign}ALTERNATIVE_BITS${atsign}/${ALTERNATIVE_BITS}/g" \
$1 > $2
}
#
# Export command paths
#
export ARPANAME
export BIGKEY
export CHECKZONE
export DESCRIPTION
export DIG
export FEATURETEST
export FSTRM_CAPTURE
export GENCHECK
export JOURNALPRINT
export KEYCREATE
export KEYDELETE
export KEYFRLAB
export KEYGEN
export KEYSETTOOL
export KEYSIGNER
export KRB5_CONFIG
export MAKEJOURNAL
export MDIG
export NAMED
export NSLOOKUP
export NSUPDATE
export NZD2NZF
export PERL
export PIPEQUERIES
export PK11DEL
export PK11GEN
export PK11LIST
export PSSUSPEND
export PYTHON
export RESOLVE
export RNDC
export RRCHECKER
export SAMPLEUPDATE
export SIGNER
export SUBDIRS
export TESTSOCK6
# The rest is shared between Windows and Unices
. $TOP/bin/tests/system/conf.sh.common
+6 -2
View File
@@ -142,8 +142,12 @@ n=`expr $n + 1`
echo_i "checking for COOKIE value in adb ($n)"
ret=0
$RNDCCMD 10.53.0.1 dumpdb
sleep 1
grep "10.53.0.2.*\[cookie=" ns1/named_dump.db > /dev/null|| ret=1
for i in 1 2 3 4 5 6 7 8 9 10
do
sleep 1
grep "10.53.0.2.*\[cookie=" ns1/named_dump.db > /dev/null && break
done
grep "10.53.0.2.*\[cookie=" ns1/named_dump.db > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
@@ -0,0 +1,6 @@
args=
warn=4
error=1
ok=1
retcode=1
match=0
+5
View File
@@ -127,3 +127,8 @@ $SETTIME -K $dir -I +18mo -D +2y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -K $dir -S $zsk1`
$SETTIME -K $dir -I +16mo $zsk1 > /dev/null 2>&1
ksk1=`$KEYGEN -K $dir -a rsasha1 -3fk example.com`
# Test 12: Too early KSK deletion
dir=12-ksk-deletion
ksk1=`$KEYGEN -K $dir -f KSK -a 8 -b 2048 -I +40d -D +40d example.com`
ksk2=`$KEYGEN -K $dir -S $ksk1.key example.com`
+6
View File
@@ -70,6 +70,12 @@ for dir in [0-9][0-9]-*; do
ret=1
fi
found=`grep Traceback coverage.$n | wc -l`
if [ $found -ne 0 ]; then
echo "python exception detected"
ret=1
fi
n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
+14 -11
View File
@@ -9,14 +9,17 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
rm -f */named.memstats
rm -f */named.run
rm -f */named.conf
rm -f delv.out.test*
rm -f dig.out.*test*
rm -f dig.out.mm.*
rm -f dig.out.mn.*
rm -f dig.out.nm.*
rm -f dig.out.nn.*
rm -f ns*/named.lock
rm -f ns*/managed-keys.bind*
set -e
rm -f ./*/named.memstats
rm -f ./*/named.run
rm -f ./*/named.conf
rm -f ./delv.out.test*
rm -f ./dig.out.*test*
rm -f ./dig.out.mm.*
rm -f ./dig.out.mn.*
rm -f ./dig.out.nm.*
rm -f ./dig.out.nn.*
rm -f ./ns*/named.lock
rm -f ./ns*/managed-keys.bind*
rm -f ./ns2/example.db ./ns2/K* ./ns2/keyid ./ns2/keydata

Some files were not shown because too many files have changed in this diff Show More