Commit Graph

25996 Commits

Author SHA1 Message Date
Michał Kępień
6954eceb80 [rt46718] Use va_list instead of a structure pointer in for_all_newzone_cfgs() callback prototype 2017-11-29 18:49:50 +01:00
Michał Kępień
378774821a [rt46718] Replace the loop invoking configure_zone_setviewcommit() with a for_all_newzone_cfgs() call 2017-11-29 15:38:49 +01:00
Michał Kępień
40562e37ee [rt46718] Replace the loop invoking configure_zone() with a for_all_newzone_cfgs() call 2017-11-29 15:38:48 +01:00
Michał Kępień
e7256edf67 [rt46718] Add a function invoking a callback for all zones in a NZD
Extract duplicate code found in two conditional branches into a separate
function to improve code readability.
2017-11-29 15:38:47 +01:00
Michał Kępień
7edff5d2bb [rt46718] Coding style trivia
Surround single-line conditional branches with curly braces.
2017-11-28 14:51:11 +01:00
Michał Kępień
5fd05a6d88 [rt46718] Assign NULL to view->new_zone_dbenv after calling mdb_env_close()
This change has no practical impact for now, but it does not hurt to be
consistent.
2017-11-28 14:51:09 +01:00
Michał Kępień
3009554a0b [rt46718] Only assign view->new_zone_mapsize when mdb_env_set_mapsize() returns MDB_SUCCESS
If mdb_env_set_mapsize() fails, dns_view_setnewzones() will return an
error, but view->new_zone_mapsize will still be set.  This is
essentially harmless as the NZD will not be subsequently used, but we
should nevertheless refrain from setting variables related to failed
function calls.
2017-11-28 14:51:06 +01:00
Michał Kępień
7545b00842 [rt46718] Use both MDB_FIRST and MDB_NEXT when iterating over an LMDB database
"while(mdb_cursor_get(..., MDB_NEXT))" works because LMDB handles this
internally in the right way, but the docs [1] state:

    For example, to list all key/value pairs in a database, use
    operation MDB_FIRST for the first call to mdb_cursor_get(), and
    MDB_NEXT on subsequent calls, until the end is hit.

It does not hurt to follow the docs to the letter, plus the revised
syntax arguably conveys the intent a bit more clearly.

[1] http://www.lmdb.tech/doc/starting.html#Cursors
2017-11-28 14:51:05 +01:00
Michał Kępień
396772811a [rt46718] Use MDB_SUCCESS instead of 0 when checking values returned by mdb_*() 2017-11-28 14:51:03 +01:00
Michał Kępień
c0494994f0 [rt46718] Simplify nzd_env_close()
- The whole code of this function is inside a conditional branch.
    Unindent the code by returning early when view->new_zone_dbenv is
    NULL.

  - mdb_env_get_path() only returns an error when either of its
    arguments is NULL.  view->new_zone_dbenv is checked beforehand and
    &dbpath is a pointer to a stack variable, so it will never be NULL.
    Drop the "have_dbpath" local variable and further unindent code.
2017-11-28 14:51:02 +01:00
Michał Kępień
1970f078cf [rt46718] Fix LMDB support on OpenBSD
OpenBSD does not have a unified buffer cache, which does not play nicely
with LMDB's use of a combination of a read-only mmap() and "regular"
writes.  One workaround is to set the MDB_WRITEMAP flag when creating
LMDB environments on OpenBSD.  This causes the LMDB library to mmap()
its databases in read-write mode and perform stores by writing to
addresses mapped in such a way instead of using "regular" writes.

To avoid repeating the same set of flags over and over in different
places, #define them in a header file.
2017-11-28 14:50:53 +01:00
Michał Kępień
376d5996a1 [master] Bail out of "./configure --with-atf" if "./configure" inside unit/atf-src fails
4830.	[bug]		Failure to configure ATF when requested did not cause
			an error in top-level configure script. [RT #46655]
2017-11-28 13:36:57 +01:00
Mark Andrews
65a483106e 4829. [bug] isc_heap_delete did not zero the index value when
the heap was created with a callback to do that.
                        [RT #46709]
2017-11-28 18:49:52 +11:00
Mark Andrews
5f308740df allow 10 seconds when checking mtime 2017-11-28 16:32:07 +11:00
Mark Andrews
a8c1bfd673 map more entry points to <name>64 2017-11-28 14:08:14 +11:00
Mark Andrews
18c7fa2f93 #define update_recordsandbytes update_recordsandbytes64 2017-11-28 13:58:49 +11:00
Tinderbox User
3f8c9d92af regen master 2017-11-28 01:07:49 +00:00
Tinderbox User
393135d693 update copyright notice / whitespace 2017-11-27 23:46:24 +00:00
Tinderbox User
82354deeb1 newcopyrights 2017-11-27 23:30:10 +00:00
Mark Andrews
c22b540e4c restore setting header->heap_index to zero in setsigningtime 2017-11-28 06:46:33 +11:00
Ray Bellis
d92d70ac5d fix warning under Xcode for iOS 2017-11-27 10:16:55 +00:00
Michał Kępień
00ff44c7c2 [master] Stabilize nsupdate system test [RT #46673] 2017-11-27 10:10:42 +01:00
Michał Kępień
2f13e0ef98 [master] Minor mkeys system test tweaks [RT #46649] 2017-11-27 10:04:11 +01:00
Michał Kępień
a80dc538bd [master] Only look for mysql_config if --with-dlz-mysql is used [RT #46647] 2017-11-27 10:00:38 +01:00
Michał Kępień
40a90fbf89 [master] Do not use thread-local storage for storing LMDB reader locktable slots
4828.	[bug]		Do not use thread-local storage for storing LMDB reader
			locktable slots. [RT #46556]
2017-11-27 09:48:10 +01:00
Michał Kępień
31b6ae485e [master] Fix OPTIONS formatting 2017-11-27 09:35:08 +01:00
Mark Andrews
19f6a63184 More:
4819.   [bug]           Fully backout the transaction when adding a RRset
                        to the resigning / removal heaps fails. [RT #46473]
2017-11-27 15:15:41 +11:00
Mark Andrews
14e9925868 add missing entries to .def files [RT #46215] 2017-11-27 13:49:39 +11:00
Mark Andrews
7bc5d7f5e8 4827. [misc] Add a precommit check script util/checklibs.sh
[RT #46215]
2017-11-27 13:47:36 +11:00
Mark Andrews
1dc8208a89 silence %lu vs size_t warning by casting to (unsigned long) 2017-11-24 10:25:37 +11:00
Mark Andrews
6ead410268 in rdbdb.c:setsigningtime stop breaking heap invariant property unless we are going to restore the invariant property 2017-11-24 08:47:52 +11:00
Michał Kępień
a573b93b46 [master] Disable parallel make inside bin/confgen/ and bin/named/
4826.	[cleanup]	Prevent potential build failures in bin/confgen/ and
			bin/named/ when using parallel make. [RT #46648]
2017-11-23 11:44:33 +01:00
Michał Kępień
165df18f75 [master] Prevent bogus warning from being logged
4825.	[bug]		Prevent a bogus "error during managed-keys processing
			(no more)" warning from being logged. [RT #46645]
2017-11-23 09:36:04 +01:00
Mark Andrews
9bb32395b2 silence compiler warning [RT #46471] 2017-11-23 17:01:40 +11:00
Ray Bellis
8993ecd06a 4824. [port] Add iOS hooks to dig. [RT #42011] 2017-11-23 16:58:12 +11:00
Mark Andrews
2f4e0e5a81 initalise serve_stale_ttl 2017-11-23 16:11:49 +11:00
Mark Andrews
78e1d7cdde style 2017-11-23 16:09:27 +11:00
Mark Andrews
ba613d22bf remove bin/tests/system/reclimit/ans4/ans.pl 2017-11-23 12:09:23 +11:00
Tinderbox User
858228febe update copyright notice / whitespace 2017-11-21 23:45:29 +00:00
Tinderbox User
5b2b9340fe newcopyrights 2017-11-21 23:30:08 +00:00
Michał Kępień
6035d557c4 [master] Refactor reclimit system test
4823.	[test]		Refactor reclimit system test to improve its
			reliability and speed. [RT #46632]
2017-11-21 10:32:45 +01:00
Mark Andrews
900215654b #include <isc/util.h> [RT #46626] 2017-11-18 11:22:44 +11:00
Tinderbox User
445cabb392 update copyright notice / whitespace 2017-11-17 23:45:28 +00:00
Mark Andrews
a197094d76 remove out of date comment 2017-11-18 08:50:58 +11:00
Mark Andrews
f975d0acaa 4822. [bug] Use resign_sooner in dns_db_setsigningtime. [RT #46473] 2017-11-18 07:50:43 +11:00
Mark Andrews
656eed7c9b 4821. [bug] When resigning ensure that the SOA's expire time is
always later that the resigning time of other records.
                        [RT #46473]

4820.   [bug]           dns_db_subtractrdataset should transfer the resigning
                        information to the new header. [RT #46473]

4819.   [bug]           Fully backout the transaction when adding a RRset
                        to the resigning / removal heaps fail. [RT #46473]
2017-11-18 07:11:12 +11:00
Michał Kępień
7a0188774f [master] Stabilize logfileconfig system test
4818.	[test]		The logfileconfig system test could intermittently
			report false negatives on some platforms. [RT #46615]
2017-11-16 08:06:57 +01:00
Mark Andrews
bcce55197a whitespace 2017-11-14 14:48:41 +11:00
Tinderbox User
3bfc28a0d0 update copyright notice / whitespace 2017-11-13 23:45:33 +00:00
Tinderbox User
6f5cc4206d newcopyrights 2017-11-13 23:30:10 +00:00