Question() : type(QUERY_NONE) { }
Question(const std::string& n, QueryType t) : name(n), type(t) { }
bool operator==(const Question& other) const { return ((name == other.name) && (type == other.type)); }
+ bool operator!=(const Question& other) const { return (!(*this == other)); }
struct hash
{
return;
}
+ if (static_cast<Question&>(*request) != recv_packet.question)
+ {
+ // This can happen under high latency, drop it silently, do not fail the request
+ ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Received an answer that isn't for a question we asked");
+ return;
+ }
+
if (recv_packet.flags & QUERYFLAGS_OPCODE)
{
ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Received a nonstandard query");