]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3674. [bug] RPZ zeroed ttls if the query type was '*'. [RT #35026]
authorMark Andrews <marka@isc.org>
Mon, 18 Nov 2013 00:22:59 +0000 (11:22 +1100)
committerMark Andrews <marka@isc.org>
Mon, 18 Nov 2013 00:22:59 +0000 (11:22 +1100)
CHANGES
bin/named/query.c
bin/tests/system/rpz/tests.sh

diff --git a/CHANGES b/CHANGES
index a9ff663e60b911bd2987f13b7ac0e12f3e20450a..5e612ae781f63faef22b51a4dfd5b9097ea7c29d 100644 (file)
--- 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]
 
index bb652022f3a2e8ae3757eecc1532e0a1692a9b44..fb0259732aeb76d1bfd8bb32d73b6fc69777019e 100644 (file)
@@ -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);
index 85017723f3fdc2d7e10b08ab0ea445e3d3992fa3..03a0aad3ac91533dd7aebe43cddb44f687d12b4b 100644 (file)
@@ -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