Commit b4e114e3 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

Print unsigned values for serial, etc. in rndc zonestatus output (#39854)

parent 71931ab6
4140. [bug] A formatting bug caused rndc showzone to print
negative numbers for large serial values. This has
now been fixed. [RT #39854]
4140. [cleanup] Remove redundant nzf_remove() call during delzone.
[RT #39844]
......
......@@ -10247,15 +10247,15 @@ ns_server_zonestatus(ns_server_t *server, char *args, isc_buffer_t **text) {
/* Serial number */
serial = dns_zone_getserial(hasraw ? raw : zone);
snprintf(serbuf, sizeof(serbuf), "%d", serial);
snprintf(serbuf, sizeof(serbuf), "%u", serial);
if (hasraw) {
signed_serial = dns_zone_getserial(zone);
snprintf(sserbuf, sizeof(sserbuf), "%d", signed_serial);
snprintf(sserbuf, sizeof(sserbuf), "%u", signed_serial);
}
/* Database node count */
nodes = dns_db_nodecount(hasraw ? rawdb : db);
snprintf(nodebuf, sizeof(nodebuf), "%d", nodes);
snprintf(nodebuf, sizeof(nodebuf), "%u", nodes);
/* Security */
secure = dns_db_issecure(db);
......
; Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
;
; Permission to use, copy, modify, and/or distribute this software for any
; purpose with or without fee is hereby granted, provided that the above
; copyright notice and this permission notice appear in all copies.
;
; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
; AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
; PERFORMANCE OF THIS SOFTWARE.
@ 3600 IN SOA ns hostmaster 3003113544 3600 1200 604800 3600
@ 3600 IN NS ns
ns 3600 IN A 10.53.0.1
......@@ -61,6 +61,11 @@ view primary {
auto-dnssec maintain;
};
zone "bigserial.example" {
type master;
file "bigserial.db";
};
zone "reload.example" {
type master;
file "reload.db";
......
......@@ -23,6 +23,7 @@ test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
$SHELL ../genzone.sh 1 > ns1/master.db
$SHELL ../genzone.sh 1 > ns1/duplicate.db
cp bigserial.db ns1/
cd ns1
touch master.db.signed
echo '$INCLUDE "master.db.signed"' >> master.db
......
......@@ -171,7 +171,7 @@ done
checkfor() {
grep "$1" $2 > /dev/null || {
ret=1;
echo "I: missing '$1' from '$2'"
echo "I: missing string '$1' from '$2'"
}
}
checkfor "name: master.example" rndc.out.master
......@@ -246,5 +246,12 @@ checkfor "no matching zone 'nosuchzone.example' in any view" rndc.out.duplicate
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I: checking 'rdnc zonestatus' with big serial value"
ret=0
$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 zonestatus bigserial.example > rndc.out.bigserial 2>&1
checkfor "serial: 3003113544" rndc.out.bigserial
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment