(*t_pdl)->postresolve(dc->d_remote,local, dc->d_mdp.d_qname, QType(dc->d_mdp.d_qtype), ret, res, &variableAnswer);
+
}
}
haveAnswer:;
g_stats.ipv6qcounter++;
string response;
+ const struct dnsheader* dh = (struct dnsheader*)question.c_str();
try {
uint32_t age;
#ifdef MALLOC_TRACE
*/
#endif
bool needsDNSSEC=false;
- const struct dnsheader* dh = (struct dnsheader*)question.c_str();
+
if(dh->arcount) {
unsigned int consumed=0;
DNSName qname(question.c_str(), question.length(), sizeof(dnsheader), false, 0, 0, &consumed);
}
if(t_pdl->get()) {
- struct dnsheader dh;
- memcpy(&dh, response.c_str(), sizeof(dh));
-
- if((*t_pdl)->ipfilter(fromaddr, destaddr, dh)) {
+ if((*t_pdl)->ipfilter(fromaddr, destaddr, *dh)) {
if(!g_quiet)
L<<Logger::Notice<<t_id<<" ["<<MT->getTid()<<"/"<<MT->numProcesses()<<"] DROPPED question from "<<fromaddr.toStringWithPort()<<" based on policy"<<endl;
g_stats.policyDrops++;