From: Mark Andrews Date: Mon, 18 Nov 2013 00:22:59 +0000 (+1100) Subject: 3674. [bug] RPZ zeroed ttls if the query type was '*'. [RT #35026] X-Git-Tag: v9.10.0a1~10 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=225146b2c8c7de8dcff979841b56b15aef8aded2;p=thirdparty%2Fbind9.git 3674. [bug] RPZ zeroed ttls if the query type was '*'. [RT #35026] --- diff --git a/CHANGES b/CHANGES index a9ff663e60b..5e612ae781f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +3674. [bug] RPZ zeroed ttls if the query type was '*'. [RT #35026] + 3673. [func] New "in-view" zone option allows direct sharing of zones between views. [RT #32968] diff --git a/bin/named/query.c b/bin/named/query.c index bb652022f3a..fb0259732ae 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -4904,6 +4904,7 @@ rpz_rewrite(ns_client_t *client, dns_rdatatype_t qtype, isc_result_t qresult, memset(&st->m, 0, sizeof(st->m)); st->m.type = DNS_RPZ_TYPE_BAD; st->m.policy = DNS_RPZ_POLICY_MISS; + st->m.ttl = ~0; memset(&st->r, 0, sizeof(st->r)); memset(&st->q, 0, sizeof(st->q)); dns_fixedname_init(&st->_p_namef); diff --git a/bin/tests/system/rpz/tests.sh b/bin/tests/system/rpz/tests.sh index 85017723f3f..03a0aad3ac9 100644 --- a/bin/tests/system/rpz/tests.sh +++ b/bin/tests/system/rpz/tests.sh @@ -555,5 +555,10 @@ if test -n "$EMSGS"; then egrep 'invalid rpz|rpz.*failed' ns*/named.run | sed -e '10,$d' -e 's/^/I: /' fi +echo "I:checking that ttl values are not zeroed when qtype is '*'" +$DIG +noall +answer -p 5300 @$ns3 any a3-2.tld2 > dig.out.any +ttl=`awk '/a3-2 tld2 text/ {print $2}' dig.out.any` +if test ${ttl:=0} -eq 0; then setret I:failed; fi + echo "I:exit status: $status" exit $status