mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-13 18:00:00 -04:00
Merge branch 'each-fix-ntadump' into 'bind-9.18'
[9.18] Fix missing newlines in output of `rndc nta -dump` See merge request isc-projects/bind9!8466
This commit is contained in:
commit
acbe660771
3 changed files with 20 additions and 0 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
6280. [bug] Fix missing newlines in the output of "rndc nta -dump".
|
||||
[GL !8454]
|
||||
|
||||
6277. [bug] Take into account local authoritative zones when
|
||||
falling back to serve-stale. [GL #4355]
|
||||
|
||||
|
|
|
|||
|
|
@ -15844,6 +15844,8 @@ named_server_nta(named_server_t *server, isc_lex_t *lex, bool readonly,
|
|||
* If -dump was specified, list NTA's and return
|
||||
*/
|
||||
if (dump) {
|
||||
size_t last = 0;
|
||||
|
||||
for (view = ISC_LIST_HEAD(server->viewlist); view != NULL;
|
||||
view = ISC_LIST_NEXT(view, link))
|
||||
{
|
||||
|
|
@ -15855,6 +15857,12 @@ named_server_nta(named_server_t *server, isc_lex_t *lex, bool readonly,
|
|||
continue;
|
||||
}
|
||||
|
||||
if (last != isc_buffer_usedlength(*text)) {
|
||||
CHECK(putstr(text, "\n"));
|
||||
}
|
||||
|
||||
last = isc_buffer_usedlength(*text);
|
||||
|
||||
CHECK(dns_ntatable_totext(ntatable, view->name, text));
|
||||
}
|
||||
CHECK(putnull(text));
|
||||
|
|
|
|||
|
|
@ -816,5 +816,14 @@ grep 'include 2' dig.out.2.test$n >/dev/null || ret=1
|
|||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
n=$((n + 1))
|
||||
echo_i "check rndc nta -dump reports NTAs in multiple views ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.3 nta -dump >rndc.out.test$n 2>&1 || ret=1
|
||||
lines=$(cat rndc.out.test$n | wc -l)
|
||||
[ ${lines:-0} -eq 2 ] || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
echo_i "exit status: $status"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue