From 37227b85bf18cf42bcc08bacedbe86bbe7bf6cfc Mon Sep 17 00:00:00 2001 From: Michal 'vorner' Vaner Date: Thu, 3 May 2012 13:19:52 +0200 Subject: [PATCH] [1802] Set the RESULT_NSEC_SIGNED flag in in-memory When we return a negative answer or wildcard, we return RESULT_NSEC_SIGNED for NSEC signed zones, similarly to NSEC3-signed ones. --- src/lib/datasrc/memory_datasrc.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/datasrc/memory_datasrc.cc b/src/lib/datasrc/memory_datasrc.cc index bb9be58f3e..ea35cfab65 100644 --- a/src/lib/datasrc/memory_datasrc.cc +++ b/src/lib/datasrc/memory_datasrc.cc @@ -1215,9 +1215,13 @@ struct InMemoryZoneFinder::InMemoryZoneFinderImpl { if (wild) { flags = flags | RESULT_WILDCARD; } - if ((code == NXRRSET || code == NXDOMAIN || wild) && - zone_data_->nsec3_data_) { - flags = flags | RESULT_NSEC3_SIGNED; + if (code == NXRRSET || code == NXDOMAIN || wild) { + if (zone_data_->nsec3_data_) { + flags = flags | RESULT_NSEC3_SIGNED; + } + if (zone_data_->nsec_signed_) { + flags = flags | RESULT_NSEC_SIGNED; + } } return (RBNodeResultContext(code, rrset, flags, node)); }