Merge pull request #513 from majestrate/master

remove RR answer in reply when doing nxdomain
pull/516/head
Jeff 5 years ago committed by GitHub
commit 21fb88a211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -263,8 +263,7 @@ namespace llarp
}
}
void
Message::AddNXReply(RR_TTL_t ttl)
void Message::AddNXReply(RR_TTL_t)
{
if(questions.size())
{
@ -272,21 +271,7 @@ namespace llarp
hdr_fields |= flags_QR | flags_AA | flags_RA;
// don't allow recursion on this request
hdr_fields &= ~flags_RD;
const auto& question = questions[0];
if(question.qtype != qTypeAAAA)
{
hdr_fields |= flags_RCODENameError;
if(question.qtype == qTypeA)
{
answers.emplace_back();
auto& nx = answers.back();
nx.rr_name = question.qname;
nx.rr_type = question.qtype;
nx.rr_class = question.qclass;
nx.ttl = ttl;
nx.rData.resize(0);
}
}
hdr_fields |= flags_RCODENameError;
}
}

Loading…
Cancel
Save