}
}
- void Process(DNS::Request* req)
+ void Process(DNS::Request* req) CXX11_OVERRIDE
{
if ((unloading) || (req->creator->dying))
throw Exception("Module is being unloaded");
// Update name in the original request so question checking works for PTR queries
req->question.name = p.question.name;
- if (SocketEngine::SendTo(this, buffer, len, 0, &this->myserver.sa, this->myserver.sa_size()) != len)
+ if (SocketEngine::SendTo(this, buffer, len, 0, this->myserver) != len)
throw Exception("DNS: Unable to send query");
// Add timer for timeout
ServerInstance->Timers.AddTimer(req);
}
- void RemoveRequest(DNS::Request* req)
+ void RemoveRequest(DNS::Request* req) CXX11_OVERRIDE
{
if (requests[req->id] == req)
requests[req->id] = NULL;
}
- std::string GetErrorStr(Error e)
+ std::string GetErrorStr(Error e) CXX11_OVERRIDE
{
switch (e)
{
delete request;
}
- bool Tick(time_t now)
+ bool Tick(time_t now) CXX11_OVERRIDE
{
ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "cache: purging DNS cache");
ConfigTag* tag = ServerInstance->Config->ConfValue("dns");
DNSServer = tag->getString("server");
SourceIP = tag->getString("sourceip");
- SourcePort = tag->getInt("sourceport", 0, 0, 65535);
+ SourcePort = tag->getUInt("sourceport", 0, 0, UINT16_MAX);
if (DNSServer.empty())
FindDNSServer();
this->manager.Rehash(DNSServer, SourceIP, SourcePort);
}
- void OnUnloadModule(Module* mod)
+ void OnUnloadModule(Module* mod) CXX11_OVERRIDE
{
for (unsigned int i = 0; i <= MAX_REQUEST_ID; ++i)
{
}
}
- Version GetVersion()
+ Version GetVersion() CXX11_OVERRIDE
{
return Version("DNS support", VF_CORE|VF_VENDOR);
}