Commit Graph

10454 Commits

Author SHA1 Message Date
Evan Hunt
1200d6f072 migrate t_atomic to lib/isc/tests/atomic_test
(cherry picked from commit 874e2fc70c)
(cherry picked from commit c7fa56e8db)
(cherry picked from commit 492e19d6ec)
2018-03-09 18:38:09 -08:00
Evan Hunt
7014d0994b migrate t_mem to lib/isc/tests/mem_test
(cherry picked from commit 979f054702)
(cherry picked from commit af48544b75)
(cherry picked from commit 814cd21e22)
2018-03-09 18:34:51 -08:00
Evan Hunt
67b63a3e10 migrate t_net to lib/isc/tests
(cherry picked from commit 05b7251d51)
(cherry picked from commit af0c9b2cee)
(cherry picked from commit faedafd2b4)
2018-03-09 18:34:04 -08:00
Evan Hunt
b392c18f6e migrate t_sockaddr to lib/isc/tests
(cherry picked from commit 62f650078a)
(cherry picked from commit fadb93cf43)
(cherry picked from commit 323e2f7152)
2018-03-09 18:33:11 -08:00
Evan Hunt
e9e74e7af6 allow ATF tests to run in parallel
(cherry picked from commit ef0b4c91bc)
(cherry picked from commit 787c5d1394)
2018-03-09 14:38:02 -08:00
Evan Hunt
d4379f55da Merge branch 'v9_10_7_patch' into v9_10 2018-03-08 14:29:57 -08:00
Mark Andrews
6c70c71553 check for in-view zones colliding with other zone definitions; also check the syntax of the in-view zone name
(cherry picked from commit 3e7e280040)
(cherry picked from commit 229e9e2215)
2018-03-08 12:32:52 +11:00
Michał Kępień
b05a048a33 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:02 +01:00
Michał Kępień
ea04e0583c 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:02 +01:00
Tinderbox User
98ed062cf9 prep 9.10.7rc2 2018-03-02 21:53:56 +00:00
Evan Hunt
8b2a96ca41 temporarily revert change #4859
(cherry picked from commit 06b52cc939)
2018-03-02 12:17:25 -08:00
Evan Hunt
9c6d288f27 temporarily revert change #4859
(cherry picked from commit 84ec07999f)
2018-03-02 12:03:50 -08:00
Mark Andrews
9a0373b896 update printf format to match type
(cherry picked from commit 48ca11df5f)
2018-02-26 10:48:19 +11:00
Mark Andrews
8e046acb50 improve the conditional declaration and use of variable to silence cppcheck
(cherry picked from commit a04bb76973)
2018-02-26 10:48:18 +11:00
Mark Andrews
cdb6c5c106 silence unread assignment warning by using POST macro
(cherry picked from commit e8249dcd49)
2018-02-26 10:47:57 +11:00
Mark Andrews
06b7a4397a update the sscanf format strings so they match the pointer types
(cherry picked from commit 70d192eb97)
2018-02-26 10:47:56 +11:00
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šík
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šík
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