Commit Graph

8803 Commits

Author SHA1 Message Date
Witold Kręcicki
6be7b631ab Create named_g_cpus network threads 2018-11-15 08:21:40 +00:00
Witold Kręcicki
d960210114 Fix fetchlimit test to allow softquota to be overruled; Remove 'verifying that named checks for conflicting listeners' test from runtime 2018-11-15 08:21:17 +00:00
Witold Kręcicki
89b1817211 Use the same number of UDP dispatchers as CPUs. 2018-11-15 08:21:17 +00:00
Witold Krecicki
6feb688f69 Use multiple network event loop threads with separate data structures. 2018-11-15 08:21:17 +00:00
Tony Finch
fdb74fed9e dig: a -r option to disable .digrc 2018-11-15 11:09:04 +11:00
Witold Kręcicki
9c8fead6d8 qname minimization: issue a warning only if the server is really broken 2018-11-14 19:55:10 +00:00
Mark Andrews
50714a9b35 free tmpzonename and restart_master 2018-11-14 11:23:21 -08:00
Ondřej Surý
3f95f4ffbb Add documentation for min-{ncache,cache}-ttl 2018-11-14 18:24:53 +01:00
Ondřej Surý
cf9c2ef305 Fix the max-ncache-ttl tests 2018-11-14 18:24:53 +01:00
Ondřej Surý
f6ca532df4 Add system tests for {min,max}-{cache,ncache}-ttl 2018-11-14 18:24:53 +01:00
Ondřej Surý
02b828e63f Use @abs_top_builddir@ to define BIND 9 top build directory in conf.sh 2018-11-14 18:24:53 +01:00
Ondřej Surý
54fdd6e834 Add min-{n,}cache-ttl tests for checkconf 2018-11-14 18:24:53 +01:00
Ondřej Surý
e9a939841d Add min-cache-ttl and min-ncache-ttl keywords
Sometimes it is useful to set a 'floor' on the TTL for records
to be cached.  Some sites like to use ridiculously low TTLs for
some reason, and that often is not compatible with slow links.

Signed-off-by: Michael Milligan <milli@acmeps.com>
Signed-off-by: LaMont Jones <lamont@debian.org>
2018-11-14 18:24:53 +01:00
Evan Hunt
e356d93175 style 2018-11-13 16:41:54 -08:00
Mark Andrews
77128c867c check that delv -q -m works 2018-11-14 11:38:08 +11:00
Mark Andrews
f6f07fb41e check that dig -q -m works 2018-11-14 11:14:49 +11:00
Mark Andrews
ba5d28dcfe add -q to dash_opts 2018-11-14 10:50:34 +11:00
Mark Andrews
75fa84b67b dig and mdig failed to properly preparse dash value pairs when value was a seperate argument and started with a dash. 2018-11-14 08:39:05 +11:00
Michał Kępień
18758392da Restore localhost fallback in bin/dig/dighost.c
In BIND 9.11 and earlier, dig and similar tools used liblwres for
parsing /etc/resolv.conf.  After getting a list of servers from
liblwres, a tool would check the address family of each server found and
reject those unusable.  When the resulting list of usable servers was
empty, localhost addresses were queried as a fallback.

When liblwres was removed in BIND 9.12, dig and similar tools were
updated to parse /etc/resolv.conf using libirs instead.  As part of that
process, the localhost fallback was removed from bin/dig/dighost.c since
the localhost fallback built into libirs was deemed to be sufficient.
However, libirs only falls back to localhost if it does not find any
name servers at all; if it does find any valid nameserver entry in
/etc/resolv.conf, it just returns it to the caller because it is
oblivious to whether the caller supports IPv4 and/or IPv6 or not.  The
code in bin/dig/dighost.c subsequently filters the returned list of
servers in get_server_list() according to the requested address family
restrictions.  This may result in none of the addresses returned by
libirs being usable, in which case a tool will attempt to work with an
empty server list, causing a hang and subsequently a crash upon user
interruption.

Restore the localhost fallback in bin/dig/dighost.c to prevent the
aforementioned hangs and crashes and ensure recent BIND versions behave
identically to the older ones in the circumstances described above.
2018-11-13 14:31:18 +01:00
Michał Kępień
4621756596 Fix a shutdown race in bin/dig/dighost.c
If a tool using the routines defined in bin/dig/dighost.c is sent an
interruption signal around the time a connection timeout is scheduled to
fire, connect_timeout() may be executed after destroy_libs() detaches
from the global task (setting 'global_task' to NULL), which results in a
crash upon a UDP retry due to bringup_timer() attempting to create a
timer with 'task' set to NULL.  Fix by preventing connect_timeout() from
attempting a retry when shutdown is in progress.
2018-11-13 13:50:47 +01:00
Mark Andrews
28442f11f0 log RPZ type and class 2018-11-08 22:48:28 -05:00
Mark Andrews
896fb585b3 isc_resource_getlimit under windows only supports isc_resource_openfiles 2018-11-09 12:29:36 +11:00
Ondřej Surý
c355e1f38f Print isc_stdtime_t with PRIu32 2018-11-09 02:27:06 +07:00
Ondřej Surý
23fff6c569 Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached 2018-11-08 12:22:17 +07:00
Ondřej Surý
e2e138a801 Don't assert on failed getrlimit call to allow called to handle this gracefully as it already does, just abort where we need to know the numbers 2018-11-08 12:21:53 +07:00
Ondřej Surý
b2b43fd235 Turn (int & flag) into (int & flag) != 0 when implicitly typed to bool 2018-11-08 12:21:53 +07:00
Ondřej Surý
fbd2e47f51 Add small tweaks to the code to fix compilation when ISC assertions are disabled
While implementing the new unit testing framework cmocka, it was found that the
BIND 9 code doesn't compile when assertions are disabled or replaced with any
function (such as mock_assert() from cmocka unit testing framework) that's not
directly recognized as assertion by the compiler.

This made the compiler to complain about blocks of code that was recognized as
unreachable before, but now it isn't.

The changes in this commit include:

* assigns default values to couple of local variables,
* moves some return statements around INSIST assertions,
* adds __builtin_unreachable(); annotations after some INSIST assertions,
* fixes one broken assertion (= instead of ==)
2018-11-08 12:21:53 +07:00
Witold Krecicki
82dfb77328 Remove unnecessary sed from autosign test 2018-11-08 00:07:00 +01:00
Witold Krecicki
0949b1fe2c Use 'local' variable in echo functions in tests 2018-11-07 23:15:06 +01:00
Witold Kręcicki
dbf2e7928e Get rid of bashism in CDS test 2018-11-07 23:13:47 +01:00
Witold Krecicki
e9bf8e4798 Add some DBC checks in dighost; fix race between clear_query and send_done in dighost 2018-11-07 13:04:13 -05:00
Witold Kręcicki
152c437bb8 Allow slight over-quota in'checking lame server clients are dropped at the soft limit' test 2018-11-06 08:19:50 +00:00
Witold Kręcicki
c80e25e482 Get rid of isc_taskmgr_setmode, we only use it to set privileged mode 2018-11-06 08:19:50 +00:00
Tony Finch
1b1d63acd8 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-05 22:01:28 -08:00
Ondřej Surý
b659765869 Update the IDN documentation for nslookup 2018-11-06 12:48:08 +07:00
Ondřej Surý
7697923eab Change the dig documentation 2018-11-06 12:48:08 +07:00
Ondřej Surý
e8c57a78aa Update the idna tests for the new non-tty defaults 2018-11-06 12:48:08 +07:00
Ondřej Surý
0e1bf7d017 Enable IDN processing (both idnin and idnout) only on tty, disable it when the stdout is not a tty 2018-11-06 12:48:08 +07:00
Tony Finch
3064d3d0ef Abolish ip6.int support in dig and mdig 2018-11-05 19:07:31 -05:00
Mark Andrews
164370102a test require-server-cookie with rate-limit 2018-11-06 10:10:04 +11:00
Witold Kręcicki
b2f8f37b80 dighost.c: after invalidating buffer we need to reinit it 2018-11-05 18:59:44 +00:00
Evan Hunt
fc99651d7d disable QNAME minimization in the dnstap test so packet counts will be correct 2018-11-02 11:34:27 -07:00
Witold Kręcicki
9163e93b9e Avoid a race in qmin test 2018-11-02 13:51:31 -04:00
Michał Kępień
27cfe83a38 Check serve-stale behavior with a cold cache
Ensure that serve-stale works as expected when returning stale answers
is enabled, the authoritative server does not respond, and there is no
cached answer available.
2018-10-31 14:08:09 +01:00
Michał Kępień
893ab37ce7 Check TTL of stale answers
Make sure that stale answers returned when the serve-stale feature is
enabled have a TTL matching the value of the stale-answer-ttl setting.
2018-10-31 14:08:09 +01:00
Witold Kręcicki
428daba5ce Do not use vector socket functions in diagnostic tools
Refactor diagnostic tools code to no longer use:

  - isc_socket_recvv()
  - isc_socket_sendtov2()
  - isc_socket_sendv()

as these functions will be removed shortly.
2018-10-31 12:12:53 +01:00
Mark Andrews
280d0ca507 use new packet for response; rename variable to request and response 2018-10-31 16:14:43 +11:00
Witold Kręcicki
67f824434f Fix style in catz test 2018-10-30 19:08:11 +00:00
Witold Kręcicki
ce47ca8c6b catz test: wait for dom8.example to be transferred before checking its availability 2018-10-30 19:08:11 +00:00
Ondřej Surý
065ff16e40 Remove double result check leftover 2018-10-30 10:30:40 +00:00