2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-26 12:08:05 +00:00

49 Commits

Author SHA1 Message Date
Ondřej Surý
2707d0eeb7 Set hard thread affinity for each zone
After switching to per-thread resources in the zonemgr, the performance
was decreased because the memory context, zonetask and loadtask was
picked from the pool at random.

Pin the zone to single threadid (.tid) and align the memory context,
zonetask and loadtask to be the same, this sets the hard affinity of the
zone to the netmgr thread.
2022-04-01 23:50:34 +02:00
Ondřej Surý
20f0936cf2 Remove use of the inline keyword used as suggestion to compiler
Historically, the inline keyword was a strong suggestion to the compiler
that it should inline the function marked inline.  As compilers became
better at optimising, this functionality has receded, and using inline
as a suggestion to inline a function is obsolete.  The compiler will
happily ignore it and inline something else entirely if it finds that's
a better optimisation.

Therefore, remove all the occurences of the inline keyword with static
functions inside single compilation unit and leave the decision whether
to inline a function or not entirely on the compiler

NOTE: We keep the usage the inline keyword when the purpose is to change
the linkage behaviour.
2022-03-25 08:33:43 +01:00
Aram Sargsyan
4a6c66288f Fix a memory leak in dns_dlzcreate()
dns_dlzcreate() fails to free the memory allocated for dlzname
when an error occurs.

Free dlzname's memory (acquired earlier with isc_mem_strdup())
by calling isc_mem_free() before returning an error code.
2022-01-25 08:21:50 +00:00
Ondřej Surý
58bd26b6cf Update the copyright information in all files in the repository
This commit converts the license handling to adhere to the REUSE
specification.  It specifically:

1. Adds used licnses to LICENSES/ directory

2. Add "isc" template for adding the copyright boilerplate

3. Changes all source files to include copyright and SPDX license
   header, this includes all the C sources, documentation, zone files,
   configuration files.  There are notes in the doc/dev/copyrights file
   on how to add correct headers to the new files.

4. Handle the rest that can't be modified via .reuse/dep5 file.  The
   binary (or otherwise unmodifiable) files could have license places
   next to them in <foo>.license file, but this would lead to cluttered
   repository and most of the files handled in the .reuse/dep5 file are
   system test files.
2022-01-11 09:05:02 +01:00
Ondřej Surý
8fb4c5bb7a dns/ssu.c: Return void when ISC_R_SUCCESS is only returned value
With isc_mem_get() and dns_name_dup() no longer being able to fail, some
functions can now only return ISC_R_SUCCESS.  Change the return type to
void for the following function(s):

 * dns_ssutable_addrule()
 * dns_ssutable_create()
 * dns_ssutable_createdlz()
2021-10-13 05:47:48 +02:00
Matthijs Mekking
71b92d4d19 Replace "master/slave" terms in code comments
Replace those terms with the preferred "primary/secondary" keywords.
2021-10-12 13:09:00 -07:00
Mark Andrews
3b11bacbb7 Cleanup redundant isc_rwlock_init() result checks 2021-02-03 12:22:33 +11:00
Evan Hunt
dcee985b7f update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
Evan Hunt
e851ed0bb5 apply the modified style 2020-02-13 15:05:06 -08:00
Ondřej Surý
056e133c4c Use clang-tidy to add curly braces around one-line statements
The command used to reformat the files in this commit was:

./util/run-clang-tidy \
	-clang-tidy-binary clang-tidy-11
	-clang-apply-replacements-binary clang-apply-replacements-11 \
	-checks=-*,readability-braces-around-statements \
	-j 9 \
	-fix \
	-format \
	-style=file \
	-quiet
clang-format -i --style=format $(git ls-files '*.c' '*.h')
uncrustify -c .uncrustify.cfg --replace --no-backup $(git ls-files '*.c' '*.h')
clang-format -i --style=format $(git ls-files '*.c' '*.h')
2020-02-13 22:07:21 +01:00
Ondřej Surý
36c6105e4f Use coccinelle to add braces to nested single line statement
Both clang-tidy and uncrustify chokes on statement like this:

for (...)
	if (...)
		break;

This commit uses a very simple semantic patch (below) to add braces around such
statements.

Semantic patch used:

@@
statement S;
expression E;
@@

while (...)
- if (E) S
+ { if (E) { S } }

@@
statement S;
expression E;
@@

for (...;...;...)
- if (E) S
+ { if (E) { S } }

@@
statement S;
expression E;
@@

if (...)
- if (E) S
+ { if (E) { S } }
2020-02-13 21:58:55 +01:00
Ondřej Surý
f50b1e0685 Use clang-format to reformat the source files 2020-02-12 15:04:17 +01:00
Ondřej Surý
a6dcdc535c Replace usage of isc_mem_put+isc_mem_detach with isc_mem_putanddetach
Using isc_mem_put(mctx, ...) + isc_mem_detach(mctx) required juggling with the
local variables when mctx was part of the freed object. The isc_mem_putanddetach
function can handle this case internally, but it wasn't used everywhere.  This
commit apply the semantic patching plus bit of manual work to replace all such
occurrences with proper usage of isc_mem_putanddetach().
2019-07-31 10:26:40 +02:00
Ondřej Surý
ae83801e2b Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
Mark Andrews
a520662ed4 allow dlz to signal that the view's transfer acl should be used 2019-03-11 14:27:13 +11:00
Ondřej Surý
78d0cb0a7d Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01: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ý
55a10b7acd Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
Evan Hunt
0fabe0da83 update file headers 2018-03-15 18:33:13 -07: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
Mark Andrews
52e2aab392 4546. [func] Extend the use of const declarations. [RT #43379] 2016-12-30 15:45:08 +11:00
Mark Andrews
0c27b3fe77 4401. [misc] Change LICENSE to MPL 2.0. 2016-06-27 14:56:38 +10: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
Tinderbox User
431e5c81db update copyright notice / whitespace 2015-05-28 23:45:24 +00:00
Mark Andrews
e53e202ef3 4128. [bug] Address issues raised by Coverity 7.6. [RT #39537] 2015-05-28 13:17:07 +10:00
Evan Hunt
b99bfa184b [master] unify internal and export libraries
3550.	[func]		Unified the internal and export versions of the
			BIND libraries, allowing external clients to use
			the same libraries as BIND. [RT #33131]
2013-04-10 13:49:57 -07:00
Tinderbox User
9d8985bea9 update copyright notice 2013-02-18 23:45:58 +00:00
Mark Andrews
740e7340c5 3489. [bug] --enable-developer now turns on ISC_LIST_CHECKINIT.
dns_dlzcreate() failed to properly initialize
                        dlzdb.link.  When cloning a rdataset do not copy
                        the link contents.  [RT #32651]

Squashed commit of the following:

commit c36c49cbdaeec8b2506dffadbffa543283702fa2
Author: Mark Andrews <marka@isc.org>
Date:   Mon Feb 18 23:24:57 2013 +1100

    don't copy the link when cloning a rdataset

commit 9fef5827edcc925075832dcce900eeca9057456d
Author: Mark Andrews <marka@isc.org>
Date:   Mon Feb 18 23:23:25 2013 +1100

    initialise the dlzdb link; don't return a stale pointer on error

commit a13c584732eae2dde48920a73886b54f1fe6b030
Author: Mark Andrews <marka@isc.org>
Date:   Mon Feb 18 23:21:59 2013 +1100

    turn on ISC_LIST_CHECKINIT
2013-02-19 07:28:24 +11:00
Mark Andrews
6f7abb89ec 3437. [bug] isc_buffer_init -> isc_buffer_constinit to initialise
buffers with constant data. [RT #32064]

Squashed commit of the following:

commit 3433b96bf11f8c90ccbe412f01d02a6d8bbc2d33
Author: Mark Andrews <marka@isc.org>
Date:   Sat Dec 8 12:41:16 2012 +1100

    isc_buffer_init -> isc_buffer_constinit

commit c22dbcc1122a0a44f7b46068e0ccbc25353a57d5
Author: Mark Andrews <marka@isc.org>
Date:   Sat Dec 8 12:38:39 2012 +1100

    isc_buffer_init -> isc_buffer_constinit

commit 900820416c45c1887d0d22d7a010df60a903bd56
Author: Mark Andrews <marka@isc.org>
Date:   Sat Dec 8 12:24:19 2012 +1100

    remove isc_buffer_reconstinit

commit f815711c17b05f9961786a90b9bae902d3c01494
Author: Mark Andrews <marka@isc.org>
Date:   Wed Dec 5 15:42:57 2012 +1100

    add isc_buffer_constinit
2012-12-08 12:48:57 +11:00
Evan Hunt
abff0f462a [master] pass client info to DLZ findzone method
3434.   [bug]           Pass client info to the DLZ findzone() entry
                        point in addition to lookup().  This makes it
                        possible for a database to answer differently
                        whether it's authoritative for a name depending
                        on the address of the client.  [RT #31775]
2012-12-06 12:59:36 -08:00
Evan Hunt
177be355d4 [master] handle ISC_R_NOMORE correctly
3433.	[bug]		dlz_findzone() did not correctly handle
			ISC_R_NOMORE. [RT #31172]
2012-12-06 12:41:58 -08:00
Evan Hunt
2b8bed6681 [master] multiple-dlz/dlz-nxdomain
3432.	[func]		Multiple DLZ databases can now be configured.
			DLZ databases are searched in the order configured,
			unless set to "search no", in which case a
			zone can be configured to be retrieved from a
			particular DLZ database by using a "dlz <name>"
			option in the zone statement.  DLZ databases can
			support type "master" and "redirect" zones.
			[RT #27597]
2012-12-06 12:39:52 -08:00
Tinderbox User
5fa46bc916 update copyright notice 2012-03-10 23:45:53 +00:00
Evan Hunt
207845805e set $Id$ 2012-03-07 08:18:20 -08:00
Evan Hunt
2d7f41d66c Revert "Re-created rt27597a for ongoing DLZ work"
This reverts commit d731ee9121c3864839c3bdcd3b7ee603ec3999ff.
2012-03-05 15:42:52 -08:00
Evan Hunt
d731ee9121 Re-created rt27597a for ongoing DLZ work 2012-03-05 14:45:30 -08:00
Evan Hunt
632c0f1e91 Revert accidental merge of unfinished DLZ work 2012-03-05 14:44:21 -08:00
Evan Hunt
954501715d checkpoint: multiple-DLZ functionality
- multiple DLZ's can be specified, including multiple DLZ's using
   the same driver; e.g., two different back-ends both loaded by the
   dlopen driver
 - new "search" option can be specified in a DLZ indicating whether
   this DLZ database should be searched for unknown zones.  The
   default is "yes".  If "no", then the zone can only be found by
   named if it's registered in the zone table, which happens if the
   zone is configured for dynamic updates, or if "dlz <dlzname>" is
   specified in the zone statement. (The latter functionality is
   incomplete in this commit).
2012-03-03 22:43:38 -08:00
Automatic Updater
c1aef54e14 update copyright notice 2011-03-12 04:59:49 +00:00
Mark Andrews
0874abad14 3069. [cleanup] Silence warnings messages from clang static analysis.
[RT #20256]
2011-03-11 06:11:27 +00:00
Automatic Updater
ca103999e6 update copyright notice 2010-12-20 23:47:21 +00:00
Evan Hunt
c445b2f648 Add #ifdef BIND9 to some of the new DLZ code to fix link errors
when building with --enable-exportlibs
2010-12-19 02:51:41 +00:00
Evan Hunt
71bd858d8e 2989. [func] Added support for writable DLZ zones. (Contributed
by Andrew Tridgell of the Samba project.) [RT #22629]

2988.	[experimental]	Added a "dlopen" DLZ driver, allowing the creation
			of external DLZ drivers that can be loaded as
			shared objects at runtime rather than linked with
			named.  Currently this is switched on via a
			compile-time option, "configure --with-dlz-dlopen".
			Note: the syntax for configuring DLZ zones
			is likely to be refined in future releases.
			(Contributed by Andrew Tridgell of the Samba
			project.) [RT #22629]

2987.	[func]		Improve ease of configuring TKEY/GSS updates by
			adding a "tkey-gssapi-keytab" option.  If set,
			updates will be allowed with any key matching
			a principal in the specified keytab file.
			"tkey-gssapi-credential" is no longer required
			and is expected to be deprecated.  (Contributed
			by Andrew Tridgell of the Samba project.)
			[RT #22629]
2010-12-18 01:56:23 +00:00
Automatic Updater
d362465c77 update copyright notice 2009-01-17 23:47:43 +00:00
Francis Dupont
584848087f spelling 2009-01-17 14:18:27 +00:00
Automatic Updater
70e5a7403f update copyright notice 2007-06-19 23:47:24 +00:00
Automatic Updater
ec5347e2c7 update copyright notice 2007-06-18 23:47:57 +00:00
Mark Andrews
675d696977 update copyright notice 2005-09-06 03:51:37 +00:00
Mark Andrews
03e200df5d 1913. [func] Integrate contibuted DLZ code into named. [RT #11382] 2005-09-05 00:12:29 +00:00