Commit Graph

10104 Commits

Author SHA1 Message Date
Evan Hunt
93db8ad693 Merge branch 'v9_9_12_patch' into v9_9 2018-03-08 14:30:46 -08:00
Michał Kępień
1ad85ff974 Remove duplicate irs_resconf_load() unit test
The "sortlist-v4.conf" unit test for irs_resconf_load() is always run
twice due to a duplicate entry in the "tests" table.  Remove one of them
to prevent this.

(cherry picked from commit 6c09f305ae)
2018-03-06 09:25:24 +01:00
Michał Kępień
ca7cd80dd5 Do not ignore resolv.conf syntax errors
irs_resconf_load() stores the value returned by add_search() into ret
without consulting its current value first.  This causes any previous
errors raised while parsing resolv.conf to be ignored as long as any
"domain" or "search" statement is present in the file.

Prevent this by returning early in case an error is detected while
parsing resolv.conf.  Ensure that "searchlist" and "magic" members of
the created irs_resconf_t structure are always initialized before
isc_resconf_destroy() is called.

(cherry picked from commit 1f400b68a8)
2018-03-06 09:25:23 +01:00
Tinderbox User
7af73b918e prep 9.9.12rc2 2018-03-02 21:53:47 +00:00
Evan Hunt
ce1114a95a temporarily revert change #4859
(cherry picked from commit 06b52cc939)
2018-03-02 12:18:03 -08:00
Evan Hunt
7e2d361355 temporarily revert change #4859
(cherry picked from commit 84ec07999f)
2018-03-02 12:04:33 -08:00
Mark Andrews
7d459e36be update printf format to match type
(cherry picked from commit 48ca11df5f)
(cherry picked from commit 9a0373b896)
2018-02-26 10:58:11 +11:00
Mark Andrews
6d2ddd3c49 improve the conditional declaration and use of variable to silence cppcheck
(cherry picked from commit a04bb76973)
(cherry picked from commit 8e046acb50)
2018-02-26 10:58:09 +11:00
Mark Andrews
e76df9d04f silence unread assignment warning by using POST macro
(cherry picked from commit e8249dcd49)
(cherry picked from commit cdb6c5c106)
2018-02-26 10:54:19 +11:00
Mark Andrews
750467e284 update the sscanf format strings so they match the pointer types
(cherry picked from commit 70d192eb97)
(cherry picked from commit 06b7a4397a)
2018-02-26 10:54:19 +11:00
Mark Andrews
d65c60d894 redefine CHECK so cppcheck see the definition
(cherry picked from commit a4186b1867)
(cherry picked from commit d17558a874)
2018-02-26 10:54:18 +11:00
Mark Andrews
7c3734f920 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)
(cherry picked from commit 981d548a66)
2018-02-26 10:54:18 +11:00
Evan Hunt
7677cb277a final cleanup
- add CHANGES note
- update copyrights and license headers
2018-02-25 13:13:26 -08:00
Evan Hunt
ae6c141f7b tidying up after backport
(cherry picked from commit 854f7846d8)
(cherry picked from commit 6653dcab3d)
2018-02-25 13:10:00 -08:00
Petr Menšík
3727e6a944 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)
(cherry picked from commit 6f2fd5ccca)
2018-02-23 15:51:50 -08:00
Petr Menšík
07b6ddd178 Reuse new function from rt46864 for similar block elsewhere.
(cherry picked from commit e7a93321f0)
(cherry picked from commit cb98ce8e67)
(cherry picked from commit 6876501605)
(cherry picked from commit 16ea60d8cc)
2018-02-23 13:57:56 -08:00
Michał Kępień
13cc08ea67 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 09:03:27 +01:00
Michał Kępień
b38c5d2840 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 09:03:27 +01:00
Michał Kępień
ec51b6d3d4 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 09:03:27 +01:00
Michał Kępień
9c103120ad 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 09:03:27 +01:00
Mark Andrews
1832348d27 add POST(len); 2018-02-16 18:44:47 +11:00
Mark Andrews
2670173c43 conditionally declare stacksize 2018-02-16 18:44:47 +11:00
Mark Andrews
ca738505ec add POST(len); 2018-02-16 18:43:59 +11:00
Mark Andrews
622bf9256b add POST(tl) 2018-02-16 18:43:46 +11:00
Mark Andrews
192a119b5a test for == 0 rather than <= as value is unsigned 2018-02-16 18:41:31 +11:00
Mark Andrews
324039934d use %u instead of %d 2018-02-16 18:36:17 +11:00
Mark Andrews
a6a6928e7e use %u instead of %d 2018-02-16 18:35:49 +11:00
Mark Andrews
fb188d4795 use %u instead of %d 2018-02-16 18:32:54 +11:00
Mark Andrews
810fdbe4e7 use %u instead of %d 2018-02-16 18:30:18 +11:00
Mark Andrews
f6e83e4108 use %u instead of %d 2018-02-16 18:30:18 +11:00
Mark Andrews
9d061a7864 use %u instead of %d 2018-02-16 18:29:17 +11:00
Mark Andrews
a6f0a302ea case to unsigned; reorder expression 2018-02-16 18:25:33 +11:00
Mark Andrews
fd0877d294 simplify expression 2018-02-16 18:23:12 +11:00
Mark Andrews
ef0fb20613 use %u and preserve unsigned property 2018-02-16 18:23:11 +11:00
Mark Andrews
6cc168d6d4 cast to unsigned 2018-02-16 18:17:59 +11:00
Mark Andrews
bc7adce774 preserve unsigned property 2018-02-16 18:17:59 +11:00
Mark Andrews
5ae3eb3cfb make both arguments of & unsigned 2018-02-16 18:17:59 +11:00
Mark Andrews
13421f89a2 shift unsigned (~0U) rather than signed (~0) contant 2018-02-16 18:16:48 +11:00
Mark Andrews
1bc27d6b26 use %u instead of %d 2018-02-16 18:16:48 +11:00
Mark Andrews
f693b488e1 unsigned constants 2018-02-16 18:15:21 +11:00
Mark Andrews
fe9ab35df1 unsigned constants 2018-02-16 18:13:08 +11:00
Mark Andrews
b6e6160df8 use %u instead of %d 2018-02-16 18:10:41 +11:00
Mark Andrews
606aa56e4f use %u instead of %d 2018-02-16 18:10:41 +11:00
Mark Andrews
131d4c873e use %u instead of %d 2018-02-16 18:08:58 +11:00
Mark Andrews
b3d10f1a43 use %u instead of %d 2018-02-16 18:06:58 +11:00
Mark Andrews
922ada36b5 formally cast to int; use %u instead of %d 2018-02-16 18:05:01 +11:00
Mark Andrews
726eaefd3e formally cast to int 2018-02-16 18:05:01 +11:00
Evan Hunt
ff9f94f78a [v9_9] prep 9.9.12rc1 2018-02-15 11:20:01 -08:00
Evan Hunt
8ac589acc5 [rt43670] more emphatic warning 2018-02-09 12:29:29 +11:00
Mark Andrews
11221a5504 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:16:30 +11:00