From dacacb23f0e99ac32e99bf6d602534af8e5cd205 Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Sat, 3 Jun 2017 16:25:02 +0200 Subject: [PATCH] auth: ignore NSEC3PARAM in an unsigned zone --- pdns/packethandler.cc | 2 +- pdns/tcpreceiver.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 3a9dc7a251..5c9319070b 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -1293,7 +1293,7 @@ DNSPacket *PacketHandler::doQuestion(DNSPacket *p) if(addCDS(p,r, sd)) goto sendit; } - else if(p->qtype.getCode() == QType::NSEC3PARAM) + else if(p->qtype.getCode() == QType::NSEC3PARAM && d_dk.isSecuredZone(sd.qname)) { if(addNSEC3PARAM(p,r, sd)) goto sendit; diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index c873499c2b..fb7dca5975 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -614,7 +614,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou NSEC3PARAMRecordContent ns3pr; bool narrow; bool NSEC3Zone=false; - if(dk.getNSEC3PARAM(target, &ns3pr, &narrow)) { + if(securedZone && dk.getNSEC3PARAM(target, &ns3pr, &narrow)) { NSEC3Zone=true; if(narrow) { L<getRemote()<