if(haveEDNS) {
ret.push_back(makeOpt(edo.d_packetsize, 0, edo.d_Z));
}
-
+
+ bool needCommit = false;
for(auto i=ret.cbegin(); i!=ret.cend(); ++i) {
if(!DNSSECOK && (i->d_type == QType::RRSIG || i->d_type==QType::NSEC || i->d_type==QType::NSEC3))
continue;
}
goto sendit; // need to jump over pw.commit
}
+ needCommit = true;
#ifdef HAVE_PROTOBUF
if(luaconfsLocal->protobufServer && protobufResponse && (i->d_type == QType::A || i->d_type == QType::AAAA)) {
PBDNSMessage_DNSResponse_DNSRR* pbRR = protobufResponse->add_rrs();
}
#endif
}
- if(ret.size())
+ if(needCommit)
pw.commit();
}
sendit:;