]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2226] Return rcode=REFUSED to serve qtype=RRSIG queries
authorMukund Sivaraman <muks@isc.org>
Tue, 7 Jan 2014 10:12:10 +0000 (15:42 +0530)
committerMukund Sivaraman <muks@isc.org>
Tue, 7 Jan 2014 10:24:57 +0000 (15:54 +0530)
src/bin/auth/query.cc

index 87f8e91cdb72cfa967cf8d3a37e465c2ef1dab38..befa458d2a532f7a16700c3ecc0cd53b89357d6e 100644 (file)
@@ -393,6 +393,17 @@ Query::process(datasrc::ClientList& client_list,
         response_->setRcode(Rcode::SERVFAIL());
         return;
     }
+
+    if (qtype == RRType::RRSIG()) {
+        // We will not serve RRSIGs directly. See #2226 and the
+        // following thread for discussion why:
+        // http://www.ietf.org/mail-archive/web/dnsext/current/msg07123.html
+        // RRSIGs go together with their covered RRset.
+        response_->setHeaderFlag(Message::HEADERFLAG_AA);
+        response_->setRcode(Rcode::REFUSED());
+        return;
+    }
+
     ZoneFinder& zfinder = *result.finder_;
 
     // We have authority for a zone that contain the query name (possibly