bind9/bin
Michał Kępień bdf0287c2d Fix a race between "rndc reconfig" and waiting for a ./DNSKEY fetch to complete
Calling nextpart() after reconfiguring ns1 is not safe, because the
expected log message may appear in ns5/named.run before nextpart() is
run.  With the TTL for ./DNSKEY set to 20 seconds, ns5 will refresh it
after 10 seconds, by which time wait_for_log() will already have failed.
This results in a false negative.

However, just calling nextpart() before reconfiguring ns1 would
introduce a different problem: if ns5 refreshed ./DNSKEY between these
two steps, the subsequent wait_for_log() call would return immediately
as it would come across the log message about a failure while refreshing
./DNSKEY instead of the expected success.  This in turn would result in
a different false negative as the root key would still be uninitialized
by the time "rndc secroots" is called.

Prevent both kinds of false negatives by:

  - calling nextpart() before reconfiguring ns1, in order to prevent the
    first case described above,

  - looking for a more specific log message, in order to prevent the
    second case described above.

Also look for a more specific log message in the first part of the
relevant check, not to fix any problem, but just to emphasize that a
different fetch result is expected in that case.

With these tweaks in place, if a (failed) ./DNSKEY refresh is scheduled
between nextpart() and reconfiguring ns1, wait_for_log() will just wait
for two more seconds (one "hour"), at which point another refresh
attempt will be made that will succeed.

(cherry picked from commit 012ca0a27d)
2018-03-08 13:43:34 +01:00
..
check add trust-anchor-telemetry to bring into sync with bin/named/log.c 2017-10-06 16:43:43 +11:00
confgen update copyright notice / whitespace 2017-11-23 23:46:25 +00:00
delv regen v9_11 2017-10-06 01:15:42 +00:00
dig reorder test to silence cppcheck 2018-02-16 14:58:18 +11:00
dnssec clear *logp 2018-02-16 14:18:04 +11:00
named Merge branch '112-fix-mx-checks-for-dynamic-updates-v9_12-v9_11' into 'v9_11' 2018-02-26 15:17:56 -08:00
nsupdate update copyright notice / whitespace 2018-01-22 23:47:25 +00:00
pkcs11 use %u instead of %i 2018-02-16 14:21:05 +11:00
python Update license to 'MPL' [RT #47101] 2018-02-02 10:39:15 +11:00
rndc regen v9_11 2018-01-19 01:20:59 +00:00
tests Fix a race between "rndc reconfig" and waiting for a ./DNSKEY fetch to complete 2018-03-08 13:43:34 +01:00
tools reorder test to silence cppcheck 2018-02-16 14:59:20 +11:00
win32/BINDInstall remove deadcode 2018-02-26 10:40:10 +11:00
Makefile.in [v9_11] store "addzone" zone config in a NZD database 2016-07-21 11:14:16 -07:00