Commit Graph
11993 Commits
Author SHA1 Message Date
Witold KręcickiandOndřej Surý 8461e06eb4 Don't reference sockets in unused handles, causing ref loop 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 7524f29d50 Cleanups 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý e6e02d534a Style fixes 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý be287351f6 Missing file 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 85262728f1 Split netmgr into functional pieces properly 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý aff025723e Dirty and ugly split of netmgr into functional parts 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 7432f07bc1 Move netmgr to a separate diretory 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý a83be985b4 netmgr: a big WiP on TCP/DNS 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý def6642dd0 TCP WiP 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 016a3690f4 netmgr: Some parts of tcp; reuse nm_uvreqs 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 67d9c23d2b Minor cleanups 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý dac01af74f clientmgr has a taskpool, clients attach to it 2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý a5392d83c6 Netmgr - work in progress (squashed)
Make a copy of ns__client_request as ns__client_request_old

The 'old' one will be used by not-yet-reworked parts, while we
keep history of ns__client_request.

Start netmgr with named, shutdown at the end

- udplistener in interfacemgr uses netmgr
- use per-client buffer for udp send
- first steps at making ns_client_request use netmgr for UDP
- uncrustify

Make interfacemgr and interface references isc_refcount_t instead of locked ints

Use clock_gettime instead of gettimeofday

Cleanup get_client, use one interface for clientmgr instead of attaching it to each client

'extra' field at the end of handle - for client data

WiP: no TCP, UDP works, no resolver
2019-09-10 17:06:46 +02:00
Witold KręcickiandOndřej Surý 2b3f2bad31 Add isc_sockaddr_fromsockaddr function to convert from struct sockaddr to isc_sockaddr 2019-09-10 17:06:46 +02:00
Tinderbox User 3a1dbc13c9 prep for 9.15.4 2019-09-09 12:34:47 +00:00
Mark Andrews 3e82a2ea9a use rpzs->updater as rpz->rpzs is NULL 2019-09-05 06:47:26 +10:00
Mark Andrews 06d9e93a57 address DNS_R_MUSTBESECURE failures 2019-09-04 21:28:34 +10:00
Mark Andrews 2f558854b7 implement maxudp under windows 2019-09-04 10:04:14 +10:00
Ondřej Surý 32eee57875 lib/isc/siphash.c: Get rid of duplicate block caused by bad rebase 2019-09-03 14:20:53 +02:00
Ondřej Surý 30b716d220 Add OpenSSL based isc_siphash24() implementation
This commits adds an OpenSSL based isc_siphash24() implementation, which is
preferred when available.

The siphash_test has been modified to test both implementation with a trick that
renames the isc_siphash24() to openssl_ or native_ prefixed name and includes
the ../siphash.c two times (when the OpenSSL implementation is available).
2019-09-03 09:19:55 +02:00
Ondřej Surý 6fd3259560 Fix alignment issues in the native implementation of isc_siphash24()
The native implementation's conversion from the uint8_t buffers to uint64_t now
follows the reference implementation that doesn't require aligned buffers.
2019-09-02 13:21:07 +02:00
Evan Hunt 7ba6d592ec when a response-policy zone expires, unload its polices from RPZ summary 2019-08-30 11:47:38 -07:00
Ondřej Surý 50e109d659 isc_event_allocate() cannot fail, remove the fail handling blocks
isc_event_allocate() calls isc_mem_get() to allocate the event structure.  As
isc_mem_get() cannot fail softly (e.g. it never returns NULL), the
isc_event_allocate() cannot return NULL, hence we remove the (ret == NULL)
handling blocks using the semantic patch from the previous commit.
2019-08-30 08:55:34 +02:00
Evan Hunt 6e9be9a952 use an rbtnodechain to walk up labels
when looking for a possible wildcard match in the RPZ summary database,
use an rbtnodechain to walk up label by label, rather than using the
node's parent pointer.
2019-08-29 19:37:21 -07:00
Evan Hunt c48979e6c5 simplify dns_rbtnodechain_init() by removing unnecessary 'mctx' parameter 2019-08-29 10:03:36 -07:00
Mark Andrews 510306c654 check that open() succeeded 2019-08-28 19:50:44 -04:00
Mark Andrews d98f446d3f Add support for displaying EDNS option LLQ. 2019-08-28 16:13:43 +10:00
Mark Andrews cd40c9fe61 add dns_zone_cdscheck to integrity checks 2019-08-28 15:46:41 +10:00
Mark Andrews 2ebc4776ca implement getoriginnode for sdb 2019-08-28 15:46:41 +10:00
Evan Hunt 241cf78fee add "delv +yaml" output format 2019-08-25 16:41:34 -07:00
Evan Hunt 5aa375f0d8 add "mdig +yaml" output format 2019-08-25 16:41:29 -07:00
Evan Hunt 71325852f1 add "dig +yaml" output format 2019-08-25 16:41:14 -07:00
Tinderbox User d6a9407908 prep 9.15.3 2019-08-12 13:59:41 +00:00
Matthijs Mekking 4c0b0fa6a5 Simplify do_stats logic in rbtdb.c 2019-08-12 10:16:08 +02:00
Matthijs Mekking 1cd3516d54 Move dnssec_keyid_max out rrsettype counters enum 2019-08-12 10:16:08 +02:00
Matthijs Mekking a3af2c57e7 Make rbtdb maintain stale counters
When updating the statistics for RRset types, if a header is marked
stale or ancient, the appropriate statistic counters are decremented,
then incremented.

Also fix some out of date comments.
2019-08-12 10:16:08 +02:00
Matthijs Mekking 48332d4478 No longer have stale tracking in stats module
Having the decrement/increment logic in stats makes the code hard
to follow. Remove it here and adjust the unit test. The caller
will be responsible for maintaining the correct increments and
decrements for statistics counters (in the following commit).
2019-08-12 10:16:08 +02:00
Matthijs Mekking c9d56a8185 Print out ancient type stats with '~' prefix.
The stale RR types are now printed with '#'.  This used to be the
prefix for RR types that were marked ancient, but commit
df50751585 changed the meaning.  It is
probably better to keep '#' for stale RR types and introduce a new
prefix for reintroducing ancient type stat counters.
2019-08-12 10:16:08 +02:00
Evan Hunt efa5f7ed54 remove remaining DLV-related configuration checks 2019-08-09 09:22:05 -07:00
Evan Hunt 02d95d0b62 update docbook grammar, removing dnssec-looksaide
- this required modification to the code that generates grammar text for
  the documentation, because the "dnssec-lookaside" option spanned more
  than one line in doc/misc/options, so grepping out only the lines
  marked "// obsolete" didn't remove the whole option.  this commit adds
  an option to cfg_test to print named.conf clauses only if they don't
  have the obsolete, ancient, test-only, or not-yet-implemented flags
  set.
2019-08-09 09:18:46 -07:00
Evan Hunt 54de054dd5 mark 'dnssec-lookaside' obsolete in parser 2019-08-09 09:18:02 -07:00
Evan Hunt a73350a210 remove DLV from dns_client API and lib/samples 2019-08-09 09:18:02 -07:00
Evan Hunt 1d86b202ad remove DLV-related library code 2019-08-09 09:15:10 -07:00
Evan Hunt 6a51b66197 remove DLV from validator 2019-08-08 08:46:13 -07:00
Sergei TrofimovichandOndřej Surý a5ad6b16c5 configure.ac: autodetect 'pause' instruction presence on sparc
The change fixes the following build failure on sparc T3 and older CPUs:

```
sparc-unknown-linux-gnu-gcc ... -O2 -mcpu=niagara2 ... -c rwlock.c
{standard input}: Assembler messages:
{standard input}:398: Error: Architecture mismatch on "pause ".
{standard input}:398: (Requires v9e|v9v|v9m|m8; requested architecture is v9b.)
make[1]: *** [Makefile:280: rwlock.o] Error 1
```

`pause` insutruction exists only on `-mcpu=niagara4` (`T4`) and upper.

The change adds `pause` configure-time autodetection and uses it if available.
config.h.in got new `HAVE_SPARC_PAUSE` knob. Fallback is a fall-through no-op.

Build-tested on:

- sparc-unknown-linux-gnu-gcc (no `pause`, build succeeds)
- sparc-unknown-linux-gnu-gcc -mcpu=niagara4 (`pause`, build succeeds)

Reported-by: Rolf Eike Beer
Bug: https://bugs.gentoo.org/691708
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2019-08-08 07:15:04 -04:00
Ondřej Surý 4db3189de2 Have the dns_client hold a .references until all external references are removed
so that cleanup can all be done in dns_client_destroy().

(cherry picked from commit e80c4c3431)
(cherry picked from commit ebc48cda26)
2019-08-07 12:43:13 +02:00
Mark AndrewsandOndřej Surý b3cd04b95a Have the view hold a weakref until all external references are removed
so that cleanup can all be done in dns_view_weakattach().

(cherry picked from commit be8af3afb7)
(cherry picked from commit e394632703)
2019-08-07 12:43:12 +02:00
Ondřej Surý cd9bbe6dea lib/dns/resolver.c: Convert (dns_view_t *)->weakrefs to isc_refcount_t
There's a deadlock in BIND 9 code where (dns_view_t){ .lock } and
(dns_resolver_t){ .buckets[i].lock } gets locked in different order.  When
view->weakrefs gets converted to a reference counting we can reduce the locking
in dns_view_weakdetach only to cases where it's the last instance of the
dns_view_t object.

(cherry picked from commit a7c9a52c89)
(cherry picked from commit 232140edae)
2019-08-07 12:43:12 +02:00
Mark Andrews 57a328d67e Store the DS and RRSIG(DS) with trust dns_trust_pending_answer
so that the validator can validate the records as part of validating
the current request.
2019-08-02 15:09:42 +10:00
Mark Andrews 9cfd0ecccf remove invalid comment 2019-08-01 11:32:28 +10:00