2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-24 02:58:38 +00:00

207 Commits

Author SHA1 Message Date
Evan Hunt
cf072d659e cleanup cfg_parse_buffer* functions
cfg_parse_buffer() now has the same signature as the former
cfg_parse_buffer4(). cfg_parse_buffer{2,3,4}() have been removed.
2019-01-24 12:08:54 -08:00
Tinderbox User
5bd855251c prep 9.13.5 2018-12-07 03:41:19 +00:00
Mark Andrews
b2aca96c27 move geoip to parser.c 2018-12-07 12:50:03 +11:00
Michał Kępień
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
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
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
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ý
b2b43fd235 Turn (int & flag) into (int & flag) != 0 when implicitly typed to bool 2018-11-08 12:21:53 +07:00
Ondřej Surý
0f24c55d38 Refactor *_destroy and *_detach functions to unified order of actions.
This properly orders clearing the freed pointer and calling isc_refcount_destroy
as early as possible to have ability to put proper memory barrier when cleaning
up reference counting.
2018-08-28 13:15:59 +02:00
Ondřej Surý
bef8ac5bae Rewrite isc_refcount API to fetch_and_<op>, instead of former <op>_and_<fetch> 2018-08-28 12:15:39 +02:00
Ondřej Surý
0a7535ac81 isc_refcount_init() now doesn't return isc_result_t and asserts on failed initialization 2018-08-28 12:15:39 +02:00
Ondřej Surý
8c526df306 Remove support for legacy systems without sin6_scope_id 2018-08-28 10:31:48 +02:00
Ondřej Surý
f0f71420c8 Remove legacy support for AIX 2018-08-28 10:31:47 +02:00
Ondřej Surý
994e656977 Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
Ondřej Surý
cb6a185c69 Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
Ondřej Surý
64fe6bbaf2 Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants 2018-08-08 09:36:44 +02:00
Mark Andrews
f1ee5e4a16 cfg_parse_boolean's REQUIRE test for ret was incomplete. 2018-06-27 17:24:39 +10:00
Ondřej Surý
de23b20ccf Update copyrights and whitespace 2018-06-13 14:19:07 +02:00
Mark Andrews
befff9452c Add support for marking a option as deprecated. 2018-06-08 15:45:16 +10:00
Ondřej Surý
20d145efef Replace isc_string_touint64 with strtoull (C99) 2018-04-12 10:37:33 +02:00
Ondřej Surý
843d389661 Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
Tinderbox User
3fda67b596 update copyright notice / whitespace 2018-01-22 23:46:02 +00:00
Evan Hunt
129c4414cb [master] automatically generate named.conf grammars for the ARM
4873.	[doc]		Grammars for named.conf included in the ARM are now
			automatically generated by the configuration parser
			itself.  As a side effect of the work needed to
			separate zone type grammars from each other, this
			also makes checking of zone statements in
			named-checkconf more correct and consistent.
			[RT #36957]
2018-01-22 11:06:32 -08:00
Evan Hunt
16d6fab2e5 [master] make writable directory and managed-keys directory mandatory
4769.   [bug]           The working directory and managed-keys directory has
                        to be writeable (and seekable). [RT #46077]
2017-10-11 08:21:23 +02:00
Mark Andrews
a009d03a1a 4748. [cleanup] Sprintf to snprintf coversions. [RT #46132] 2017-10-03 14:54:19 +11:00
Mark Andrews
f9f3f20d2d 4739. [cleanup] Address clang static analysis warnings. [RT #45952] 2017-09-27 10:27:09 +10:00
Evan Hunt
114f95089c [master] cleanup strcat/strcpy
4722.	[cleanup]	Clean up uses of strcpy() and strcat() in favor of
			strlcpy() and strlcat() for safety. [RT #45981]
2017-09-13 00:14:37 -07:00
Tinderbox User
08e0f8fcfa update copyright notice / whitespace 2017-04-26 23:45:32 +00:00
Mukund Sivaraman
241b49e611 Set a LMDB mapsize and also provide a config option to control it (#44954) 2017-04-26 23:51:26 +05:30
Mark Andrews
762c4fc5a8 4539. [bug] Referencing a nonexistant zone with rpz could lead
to a assertion failure when configuring. [RT #43787]
2016-12-27 08:59:07 +11:00
Mark Andrews
4352551d23 4520. [cleanup] Alphabetise more of the grammar when printing it
out. Fix unbalanced indenting. [RT #43755]
2016-11-29 15:28:28 +11:00
Mark Andrews
89286906dc 4502. [func] Report multiple and experimental options when printing
grammar. [RT #43134]
2016-11-02 10:04:57 +11:00
Mark Andrews
6bb84df34d fix typo 2016-10-11 17:05:36 +11:00
Mark Andrews
170ced60d8 don't require lctx to be non NULL
(cherry picked from commit 3793d848bd636d63050339ce18d8eae1e5eff16a)
2016-10-11 17:03:28 +11:00
Evan Hunt
676ac3cc82 [master] add cfg_parse_buffer3() function with linenum parameter
4482.	[cleanup]	Change #4455 was incomplete. [RT #43252]
2016-10-10 17:11:21 -07:00
Mark Andrews
8eceb0bffe 4461. [bug] win32: not all external data was properly marked
as external data for windows dll. [RT #43161]
2016-09-07 14:12:11 +10:00
Mark Andrews
0c27b3fe77 4401. [misc] Change LICENSE to MPL 2.0. 2016-06-27 14:56:38 +10:00
Tinderbox User
3947e3625a update copyright notice / whitespace 2016-01-31 23:45:23 +00:00
Evan Hunt
3fe17d62e3 [master] remove "none" from log messages when parsing global config
4309.	[cleanup]	Remove the spurious "none" filename from log messages
			when processing built-in configuration. [RT #41594]
2016-01-31 10:17:13 -08:00
Francis Dupont
dd784c18ef Merged VS 2015 64 bit warnings (#40373) 2015-11-16 17:47:10 +01:00
Evan Hunt
a00f9e2f50 [master] merge dyndb
4224.	[func]		Added support for "dyndb", a new interface for loading
			zone data from an external database, developed by
			Red Hat for the FreeIPA project.

			DynDB drivers fully implement the BIND database
			API, and are capable of significantly better
			performance and functionality than DLZ drivers,
			while taking advantage of advanced database
			features not available in BIND such as multi-master
			replication.

			Thanks to Adam Tkac and Petr Spacek of Red Hat.
			[RT #35271]
2015-09-28 23:12:35 -07:00
Witold Krecicki
e6d0a391f5 4223. [func] Add support for setting max-cache-size to percentage
of available physical memory, set default to 90%.
			[RT #38442]
2015-09-28 11:08:50 +02:00
Evan Hunt
226339ed43 [master] spurious spaces in named-checkconf -p
4205.	[bug]		'named-checkconf -p' could include unwanted spaces
			when printing tuples with unset optional fields.
			[RT #40731]
2015-09-14 08:50:17 -07:00
Mark Andrews
7d0dfa63cf 4189. [cleanup] Don't exit on overly long tokens in named.conf.
[RT #40418]
2015-08-22 15:08:22 +10:00
Mukund Sivaraman
991f97366b Fix win32 build (UNUSED is present later)
(cherry picked from commit 63dcc28d3efc7607d6cc42eebc4411ab50e69246)
2015-07-31 15:01:04 +05:30
Evan Hunt
1479200aa0 [master] DDoS mitigation features
3938.	[func]		Added quotas to be used in recursive resolvers
			that are under high query load for names in zones
			whose authoritative servers are nonresponsive or
			are experiencing a denial of service attack.

			- "fetches-per-server" limits the number of
			  simultaneous queries that can be sent to any
			  single authoritative server.  The configured
			  value is a starting point; it is automatically
			  adjusted downward if the server is partially or
			  completely non-responsive. The algorithm used to
			  adjust the quota can be configured via the
			  "fetch-quota-params" option.
			- "fetches-per-zone" limits the number of
			  simultaneous queries that can be sent for names
			  within a single domain.  (Note: Unlike
			  "fetches-per-server", this value is not
			  self-tuning.)
			- New stats counters have been added to count
			  queries spilled due to these quotas.

			See the ARM for details of these options. [RT #37125]
2015-07-08 22:53:39 -07:00
Evan Hunt
c55a1da4fc [master] log parsing errors from default config or addzone/modzone
4124.	[func]		Log errors or warnings encountered when parsing the
			internal default configuration.  Clarify the logging
			of errors and warnings encountered in rndc
			addzone or modzone parameters. [RT #39440]
2015-05-21 23:04:29 -07:00
Mark Andrews
b292230ab8 4110. [bug] Address memory leaks / null pointer dereferences
on out of memory. [RT #39310]
2015-04-29 03:16:50 +10:00
Evan Hunt
11463c0ac2 [master] clean up gcc -Wshadow warnings
4039.	[cleanup]	Cleaned up warnings from gcc -Wshadow. [RT #37381]
2015-01-20 13:29:18 -08:00