Commit Graph
10438 Commits
Author SHA1 Message Date
Mark Andrews d17558a874 redefine CHECK so cppcheck see the definition
(cherry picked from commit a4186b1867)
2018-02-26 10:47:56 +11:00
Mark Andrews 981d548a66 adjust goto target and conditional compilation so that cleanup_spillattimer and cleanup_alglock labels match the element to be cleanup and so that they are always used
(cherry picked from commit 7b27be54ee)
2018-02-26 10:46:03 +11:00
Evan Hunt 90ae2fce20 final cleanup
- add CHANGES note
- update copyrights and license headers
2018-02-25 01:04:16 -08:00
Petr MenšíkandEvan Hunt 6f2fd5ccca unit/unittest.sh is generated by configure. It will always be
generated into builddir. If out-of-tree build is used, make unit
will always fail. Kyuafiles and testdata still have to be copied
manually into the builddir.

(cherry picked from commit 95cde3608a)
(cherry picked from commit 6d9b38e9fe)
2018-02-23 15:51:16 -08:00
Petr MenšíkandEvan Hunt 16ea60d8cc Reuse new function from rt46864 for similar block elsewhere.
(cherry picked from commit e7a93321f0)
(cherry picked from commit cb98ce8e67)
(cherry picked from commit 6876501605)
2018-02-23 13:57:12 -08:00
Michał Kępień fbc282e6bf Do not recheck DNS_ZONEFLG_LOADPENDING in zone_asyncload()
Remove a block of code which dates back to commit 8a2ab2b920, when
dns_zone_asyncload() did not yet check DNS_ZONEFLG_LOADPENDING.
Currently, no race in accessing DNS_ZONEFLG_LOADPENDING is possible any
more, because:

  - dns_zone_asyncload() is still the only function which may queue
    zone_asyncload(),

  - dns_zone_asyncload() accesses DNS_ZONEFLG_LOADPENDING under a lock
    (and potentially queues an event under the same lock),

  - DNS_ZONEFLG_LOADPENDING is not cleared until the load actually
    completes.

Thus, the rechecking code can be safely removed from zone_asyncload().

Note that this also brings zone_asyncload() to a state in which the
completion callback is always invoked.  This is required to prevent
leaking memory in case something goes wrong in zone_asyncload() and a
zone table the zone belongs to is indefinitely left with a positive
reference count.
2018-02-16 08:59:46 +01:00
Michał Kępień dbec050c4e Asynchronous zone load events have no way of getting canceled
Code handling cancellation of asynchronous zone load events was likely
copied over from other functions when asynchronous zone loading was
first implemented in commit 8a2ab2b920.  However, unlike those other
functions, asynchronous zone loading events currently have no way of
getting canceled once they get posted, which means the aforementioned
code is effectively dead.  Remove it to prevent confusion.
2018-02-16 08:59:46 +01:00
Michał Kępień af8c5e4013 Only clear DNS_ZONEFLG_LOADPENDING in zone_asyncload() if zone loading is completed immediately
zone_load() is not always synchronous, it may only initiate an
asynchronous load and return DNS_R_CONTINUE, which means zone loading
has not yet been completed.  In such a case, zone_asyncload() must not
clear DNS_ZONEFLG_LOADPENDING immediately and leave that up to
zone_postload().
2018-02-16 08:59:46 +01:00
Michał Kępień 3bc01f9452 Lock zone before checking whether its asynchronous load is already pending
While this is not an issue in named, which only calls
dns_zone_asyncload() from task-exclusive mode, this function is exported
by libdns and thus may in theory be concurrently called for the same
zone by multiple threads.  It also does not hurt to be consistent
locking-wise with other DNS_ZONEFLG_LOADPENDING accesses.
2018-02-16 08:59:46 +01:00
Mark Andrews 4fdaf7e923 add POST(len); 2018-02-16 17:33:38 +11:00
Mark Andrews 3922e41963 conditionally declare stacksize 2018-02-16 17:32:35 +11:00
Mark Andrews 751ba7b551 add POST(len); 2018-02-16 17:31:00 +11:00
Mark Andrews 86ebdae0e0 Clarify calculation precedence for '&' and '?' 2018-02-16 17:28:25 +11:00
Mark Andrews 7ba538a21f add POST(tl) 2018-02-16 17:24:28 +11:00
Mark Andrews b6b9a1471b test for == 0 rather than <= as value is unsigned 2018-02-16 17:18:18 +11:00
Mark Andrews b67cf8f2da use %u instead of %d 2018-02-16 17:12:51 +11:00
Mark Andrews de535fee55 use %u instead of %d 2018-02-16 17:12:51 +11:00
Mark Andrews 6a724b765e use %u instead of %d 2018-02-16 17:12:03 +11:00
Mark Andrews cb2c567e6d use %u instead of %d 2018-02-16 17:10:58 +11:00
Mark Andrews c30a9cdaa3 use %u instead of %d 2018-02-16 17:10:02 +11:00
Mark Andrews dd27ab1f00 use %u instead of %d 2018-02-16 17:08:36 +11:00
Mark Andrews 50f978042e use %u instead of %d 2018-02-16 17:08:36 +11:00
Mark Andrews a33e639d26 use %u instead of %d 2018-02-16 17:07:16 +11:00
Mark Andrews cb29c18cfe case to unsigned; reorder expression 2018-02-16 17:05:11 +11:00
Mark Andrews 24f1d23185 simplify expression 2018-02-16 17:02:03 +11:00
Mark Andrews a37769ca0d use %u and preserve unsigned property 2018-02-16 17:02:03 +11:00
Mark Andrews 8f3e807d19 cast to unsigned 2018-02-16 16:57:00 +11:00
Mark Andrews f9195e267c preserve unsigned property 2018-02-16 16:57:00 +11:00
Mark Andrews d81ec6ef5c make both arguments of & unsigned 2018-02-16 16:54:19 +11:00
Mark Andrews 0e7eb72847 shift unsigned (~0U) rather than signed (~0) contant 2018-02-16 16:48:53 +11:00
Mark Andrews 7180c8b397 use %u instead of %d 2018-02-16 16:37:44 +11:00
Mark Andrews 1397e08dd8 unsigned constants 2018-02-16 16:35:58 +11:00
Mark Andrews a3f202c970 unsigned constants 2018-02-16 16:33:25 +11:00
Mark Andrews ba2742d736 use %u instead of %d 2018-02-16 16:31:18 +11:00
Mark Andrews 19ea100fbd use %u instead of %d 2018-02-16 16:31:18 +11:00
Mark Andrews 127305d56e use %u instead of %d 2018-02-16 16:28:54 +11:00
Mark Andrews 5e53842a96 INSIST ipnum6 != NULL 2018-02-16 16:27:05 +11:00
Mark Andrews 00bbd26f1f use %u instead of %d 2018-02-16 16:24:48 +11:00
Mark Andrews e0caec31e6 use %u instead of %d 2018-02-16 16:22:46 +11:00
Mark Andrews 5bfc3b86e7 formally cast to int; use %u instead of %d 2018-02-16 16:19:16 +11:00
Mark Andrews 8855f25ad3 formally cast to int 2018-02-16 16:19:16 +11:00
Evan Hunt 9d07b052b0 [v9_10] prep 9.10.7rc2 2018-02-15 11:17:40 -08:00
Evan HuntandMark Andrews 77c274b680 [rt43670] more emphatic warning 2018-02-09 12:29:21 +11:00
Mark Andrews 1c36fb5d41 4889. [func] Warn about the use of old root keys without the new
root key being present.  Warn about dlv.isc.org's
                        key being present. Warn about both managed and
                        trusted root keys being present. [RT #43670]

(cherry picked from commit baef0ca988)
2018-02-09 12:13:52 +11:00
Tinderbox User 5a60dabcd6 update copyright notice / whitespace 2018-02-08 23:51:13 +00:00
Mark AndrewsandEvan Hunt 9ccc205645 [v9_10] fix nsupdate test on windows
4888.	[test]		Initialize sockets correctly in sample-update so
			that nsupdate system test will will run on Windows.
			[RT #47097]

(cherry picked from commit 6757dc6488)
(cherry picked from commit 701a93f5a5)
2018-02-08 13:36:01 -08:00
Tinderbox User 8ac81d900f update copyright notice / whitespace 2018-02-07 23:50:55 +00:00
Mark Andrews c02650fe38 4885. [security] update-policy rules that otherwise ignore the name
field now require that it be set to "." to ensure
                        that any type list present is properly interpreted.
                        [RT #47126]

(cherry picked from commit ec771bbdc8)
2018-02-07 13:50:31 +11:00
Tinderbox User 0a7392a315 update copyright notice / whitespace 2018-01-30 23:48:58 +00:00
Mark Andrews 6e33ad1e79 4882. [bug] Address potential memory leak in
dns_update_signaturesinc. [RT #47084]

(cherry picked from commit 7817caa3c7)
2018-01-30 15:29:08 +11:00