Commit Graph
7171 Commits
Author SHA1 Message Date
Tony FinchandWitold Kręcicki 4bbd2bb511 Fixes for rndc nta user interface
Tell the user explicitly about their mistakes:

* Unknown options, e.g. -list instead of -dump
  or -delete instead of -remove.

* Unknown view names.

* Excess arguments.

Include the view name in `rndc nta -dump` output, for consistency with
the NTA add and remove actions.

When removing an NTA from all views, do not abort with an error if the
NTA was not found in one of the views.
2018-11-13 19:02:04 +00:00
Tony FinchandWitold Kręcicki ebe69ba220 Abolish ip6.int support in dig and mdig 2018-11-13 19:02:04 +00:00
Mark AndrewsandWitold Kręcicki 7b30e010b7 two dns_name_dup calls were not checked 2018-11-13 19:02:04 +00:00
Witold Kręcicki 5b699987eb Cleanup fctx->finds before sending 'final' query after qname minimization.
At the beginning of qname minimization we get fctx->finds filled with what's
in the cache at this point, in worst case root servers. After doing full
run querying for NSes at different levels we need to clean it and refill
it with proper values from cache.
2018-11-13 19:02:04 +00:00
Witold Kręcicki 3d58be4c15 Remove vector socket functions from Unix socket code and library headers
Remove the following functions in order to simplify socket code:

  - isc_socket_recvv()
  - isc_socket_sendtov()
  - isc_socket_sendtov2()
  - isc_socket_sendv()
2018-11-13 19:02:04 +00:00
Ondřej Surý c1d111cd2e Destroy task first when destroying catzs.
When freeing catzs structures we need to kill the updater task first.
    Otherwise we might race with the updater and there might be a crash
    on shutdown.
2018-10-30 14:01:01 +01:00
Witold KręcickiandOndřej Surý 541872bf3b Destroy task first when destroying rpzs.
When freeing rpzs structures we need to kill the updater task first.
Otherwise we might race with the updater and there might be a crash
on shutdown.
2018-10-30 14:01:01 +01:00
Mark Andrews cf83016682 compare_nxt compared records with identical next fields case insensitively 2018-10-30 14:51:39 +11:00
Mark Andrews 2ff57d8a39 Record types which support a empty rdata field were not handling the empty rdata field case. 2018-10-30 11:03:02 +11:00
Witold Kręcicki 8283cbabdc <stdlib.h> include in rpz.c for strtoul 2018-10-29 23:04:01 +01:00
Michał KępieńandWitold Kręcicki 139bc2c6ab Release all resources when shutting down an RPZ zone during an update
If an RPZ zone is to be freed during an update, canceling the
update_quantum() event is not enough because the resources released when
an update completes also need to be accounted for.  Failure to do this
results in a hang upon shutdown.  Fix by copying cleanup code from the
end of update_quantum() to rpz_detach().
2018-10-29 23:04:00 +01:00
Witold Kręcicki faf2c7711a Fix a race in RPZ with min-update-interval set to 0
If another RPZ update is pending when processing the previous one nears
completion and min-update-interval is set to 0, isc_timer_reset() gets
called with 'interval' set to 0, which triggers an assertion failure.
To prevent such a scenario from causing a crash, queue the update event
directly instead of asking the timer thread to do it.
2018-10-29 23:04:00 +01:00
Witold Kręcicki 37df3ca8b6 Style nits 2018-10-29 19:22:10 +00:00
Witold Kręcicki 08460c8cb2 Don't do qname minimization when forwarding; Avoid some intermittent errors in qmin tests caused by timing 2018-10-29 19:22:10 +00:00
Mark Andrews 1cf1254051 Initalize TZ environment variable before calling dns_test_begin in dnstap_test. 2018-10-29 16:15:52 +11:00
Evan Hunt ff747365db avoid makefile conditional 2018-10-26 23:34:34 -07:00
Ondřej Surý d6c50674bb Remove last traces of DSA and NSEC3DSA algorithm, but restore the algnumber -> name mapping 2018-10-26 11:50:11 +02:00
Ondřej Surý 83dbe04bf3 Update dst_test.c to use ECDSA256 and RSASHA256 as test algorithms 2018-10-26 11:50:11 +02:00
Ondřej Surý fbb08b30b8 Remove traces of DST_ALG_ECC which is now just Reserved in IANA registry 2018-10-26 11:50:11 +02:00
Mark Andrews 3219a873a9 free hkey on error 2018-10-26 17:46:15 +11:00
Mark AndrewsandEvan Hunt fbab100426 Add support for EID and NIMLOC 2018-10-25 15:20:33 -07:00
Mark AndrewsandEvan Hunt eb7ca65b78 GID, UID and UINFO could not be loaded using unknown record format. 2018-10-25 13:00:32 -07:00
Ondřej Surý c3846425f3 Don't include inet/arpa.h on Windows 2018-10-25 20:59:48 +02:00
Evan Hunt c852810fbc correctly attach and detach memory context 2018-10-25 11:27:28 -07:00
Ondřej Surý 7fc78e7cad Remove internal dst memory context that was used just for OpenSSL and was passthrough for malloc and free 2018-10-25 08:16:24 +02:00
Ondřej Surý af69bf5491 Add tkey_test.c with mocked isc_mem object 2018-10-25 08:16:24 +02:00
Ondřej Surý b98ac2593c Add generic hashed message authentication code API (isc_hmac) to replace specific HMAC functions hmacmd5/hmacsha1/hmacsha2... 2018-10-25 08:15:42 +02:00
Ondřej Surý 7fd3dc63de Add generic message digest API (isc_md) to replace specific MD functions md5/sha1/sha256 2018-10-25 08:15:42 +02:00
Mark Andrews f9ceddd8ca Add support for ATMA 2018-10-25 13:21:49 +11:00
Michał KępieńandOndřej Surý 2cb9e8a020 Replace the "mirror" zone option with "type mirror;"
Use a zone's 'type' field instead of the value of its DNS_ZONEOPT_MIRROR
option for checking whether it is a mirror zone.  This makes said zone
option and its associated helper function, dns_zone_mirror(), redundant,
so remove them.  Remove a check specific to mirror zones from
named_zone_reusable() since another check in that function ensures that
changing a zone's type prevents it from being reused during
reconfiguration.
2018-10-24 20:32:55 +02:00
Michał KępieńandOndřej Surý e1bb8de6f0 Define a separate dns_zonetype_t for mirror zones
Rather than overloading dns_zone_slave and discerning between a slave
zone and a mirror zone using a zone option, define a separate enum
value, dns_zone_mirror, to be used exclusively by mirror zones.  Update
code handling slave zones to ensure it also handles mirror zones where
applicable.
2018-10-24 20:32:55 +02:00
Mark Andrews 607c2d7441 free key on error 2018-10-23 20:19:07 -04:00
Mark AndrewsandWitold Kręcicki ba85bb1a85 whitespace 2018-10-23 12:15:04 +00:00
Mark AndrewsandWitold Kręcicki 2b3b626cc1 set fctx->client to NULL 2018-10-23 12:15:04 +00:00
Mark AndrewsandWitold Kręcicki 23766ff690 checkpoint 2018-10-23 12:15:04 +00:00
Witold Kręcicki 86246c7431 Initialize adbname->client properly; check for loops 2018-10-23 12:15:04 +00:00
Mark AndrewsandWitold Kręcicki 2f36a62d16 use RUNTIME_CHECK 2018-10-23 12:15:04 +00:00
Mark AndrewsandWitold Kręcicki 1a2a19c693 address fctx reference count leaks; style 2018-10-23 12:15:04 +00:00
Witold Kręcicki f2af336dc4 Fix looping issues 2018-10-23 12:15:04 +00:00
Witold Kręcicki 70a1ba20ec QNAME miminimization should create a separate fetch context for each fetch -
this makes the cache more efficient and eliminates duplicates queries.
2018-10-23 12:15:04 +00:00
Ondřej Surý c4cee27f9b Add support for enabling and enforcing FIPS mode in OpenSSL:
* Add configure option --enable-fips-mode that detects and enables FIPS mode
* Add a function to enable FIPS mode and call it on crypto init
* Log an OpenSSL error when FIPS_mode_set() fails and exit
* Report FIPS mode status in a separate log message from named
2018-10-22 20:55:35 +02:00
Evan HuntandWitold Kręcicki 09f58ab63f retain a minimal "methods" struct in the mctx
- this enables memory to be allocated and freed in dyndb modules
  when named is linked statically. when we standardize on libtool,
  this should become unnecessary.
- also, simplified the isc_mem_create/createx API by removing
  extra compatibility functions
2018-10-18 09:19:12 +00:00
Evan HuntandWitold Kręcicki 6f7c9623c5 remove isc_bind9 usage from view.c 2018-10-18 09:19:12 +00:00
Michał Kępień ba91243542 Do not set qctx->result to DNS_R_SERVFAIL unless necessary
In some cases, setting qctx->result to DNS_R_SERVFAIL causes the value
of a 'result' variable containing a more specific failure reason to be
effectively discarded.  This may cause certain query error log messages
to lack specificity despite a more accurate problem cause being
determined during query processing.

In other cases, qctx->result is set to DNS_R_SERVFAIL even though a more
specific error (e.g. ISC_R_NOMEMORY) could be explicitly indicated.

Since the response message's RCODE is derived from qctx->result using
dns_result_torcode(), which handles a number of possible isc_result_t
values and returns SERVFAIL for anything not explicitly listed, it is
fine to set qctx->result to something more specific than DNS_R_SERVFAIL
(in fact, this is already being done in a few cases).  Modify most
QUERY_ERROR() calls so that qctx->result is set to a more specific error
code when possible.  Adjust query_error() so that statistics are still
calculated properly.  Remove the RECURSE_ERROR() macro which was
introduced exactly because qctx->result could be set to DNS_R_SERVFAIL
instead of DNS_R_DUPLICATE or DNS_R_DROP, which need special handling.
Modify dns_sdlz_putrr() so that it returns DNS_R_SERVFAIL when a DLZ
driver returns invalid RDATA, in order to prevent setting RCODE to
FORMERR (which is what dns_result_torcode() translates e.g. DNS_R_SYNTAX
to) while responding authoritatively.
2018-10-08 12:47:28 +02:00
Evan Hunt c642f9970a move declaration to the top of the block 2018-10-05 11:13:54 -07:00
Tony FinchandEvan Hunt 7a2b0ac92a Fix crash at shutdown during an RPZ reload. [RT #46210] 2018-10-05 13:58:47 -04:00
Evan Hunt f14445f13d remove references to deleted files 2018-10-05 09:10:40 -07:00
Ondřej Surý 3994b1f9c2 Remove support for obsoleted and insecure DSA and DSA-NSEC3-SHA1 algorithms 2018-10-05 09:21:43 +02:00
Witold KręcickiandMichał Kępień 87b07bf08a Fix creating and validating EdDSA signatures
Revert parts of commit c3b8130fe8 which
inadvertently broke creating and validating EdDSA signatures:

 1. EVP_DigestSignInit() returns 1 on success.

 2. EdDSA does not support streaming (EVP_Digest*Update() followed by
    EVP_Digest*Final()), only one shot operations.
2018-10-04 12:38:46 +02:00
Evan Hunt 51c6f4b682 extend DNSTAP to record UPDATE requests and responses as a separate type 2018-10-03 01:03:56 -07:00