Commit Graph

10840 Commits

Author SHA1 Message Date
Michał Kępień
840c9348bf 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:47:40 +01:00
Michał Kępień
3395f6fac3 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:47:40 +01:00
Michał Kępień
7c64547d95 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:47:40 +01:00
Michał Kępień
93c176d2d6 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:47:40 +01:00
Mark Andrews
3208b02910 add POST(len); 2018-02-16 14:08:26 +11:00
Mark Andrews
736cbc97d7 conditionally declare stacksize 2018-02-16 14:08:26 +11:00
Mark Andrews
58c141e9b6 add POST(len); 2018-02-16 14:08:26 +11:00
Mark Andrews
494a3b33a2 Clarify calculation precedence for '&' and '?' 2018-02-16 14:08:26 +11:00
Mark Andrews
d6b79d3d43 add POST(tl) 2018-02-16 14:08:26 +11:00
Mark Andrews
13e2a127f2 test for == 0 rather than <= as value is unsigned 2018-02-16 14:08:26 +11:00
Mark Andrews
fb93276320 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews
3b412a0634 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews
d23375e5b3 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews
e34eec79a8 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews
7670515fac use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews
14e5f05a5e use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews
5a21fe753d use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews
1e943e3f3a use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews
ade6a20c56 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews
cf063314f2 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews
bf74665d5c case to unsigned; reorder expression 2018-02-16 14:08:26 +11:00
Mark Andrews
800c5a61a2 simplify expression 2018-02-16 14:08:26 +11:00
Mark Andrews
2f859b6f9e use %u and preserve unsigned property 2018-02-16 14:08:26 +11:00
Mark Andrews
a4d75d92aa make declaration and use of setnocookie fully conditional 2018-02-16 14:08:26 +11:00
Mark Andrews
c178a8e904 cast to unsigned 2018-02-16 14:08:26 +11:00
Mark Andrews
19ef6d7b21 preserve unsigned property 2018-02-16 14:08:26 +11:00
Mark Andrews
585a420c64 make both arguments of & unsigned 2018-02-16 14:08:26 +11:00
Mark Andrews
d177c5ffc1 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews
1bca37c8e1 shift unsigned (~0U) rather than signed (~0) contant 2018-02-16 14:08:26 +11:00
Mark Andrews
684424a6fe use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews
f691251b95 unsigned constants 2018-02-16 14:08:26 +11:00
Mark Andrews
df835b580b unsigned constants 2018-02-16 14:08:25 +11:00
Mark Andrews
615822391e use %u instead of %d 2018-02-16 14:08:25 +11:00
Mark Andrews
ef957e6d25 use %u instead of %d 2018-02-16 14:08:25 +11:00
Mark Andrews
9e2a1ba979 use %u instead of %d 2018-02-16 14:08:25 +11:00
Mark Andrews
da38b41d83 prevent implict conversion to signed 2018-02-16 14:07:35 +11:00
Mark Andrews
c132205eb2 use %u instead of %d 2018-02-16 14:07:35 +11:00
Mark Andrews
e25d38c68b INSIST ipnum6 != NULL 2018-02-16 14:07:35 +11:00
Mark Andrews
bb426bb13a use %u instead of %d 2018-02-16 14:07:35 +11:00
Mark Andrews
fa7f2ef594 use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews
571b3a4005 test for >= 0 and use %d instead of %u 2018-02-16 14:07:34 +11:00
Mark Andrews
c4c2d94e61 formally cast to int; use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews
e71e7673b3 formally cast to int 2018-02-16 14:07:34 +11:00
Evan Hunt
d37fb4625c [v9_12] prep 9.12.1rc1 2018-02-15 11:12:45 -08:00
Evan Hunt
b032182b8a [rt43670] more emphatic warning 2018-02-09 12:29:02 +11:00
Mark Andrews
303f4e8b5d 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:11:10 +11:00
Evan Hunt
988f5de10a [v9_12] prep 9.12.1b1 2018-02-08 13:47:56 -08:00
Evan Hunt
8fb952e6ab [v9_12] copyrights 2018-02-08 13:40:50 -08:00
Mark Andrews
e79cb31fdf [v9_12] 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)
2018-02-08 13:35:11 -08:00
Tinderbox User
85fec73a21 update copyright notice / whitespace 2018-02-07 23:47:00 +00:00