Fix dnsbl initialization

Don't set dnsbl state to pending when we someone connects over ipv6 and
the init will fail, leaving a null pointer in m_pDnsblLookup
This commit is contained in:
Dennis Felsing 2018-08-24 14:24:33 +02:00
parent d2dcb4fe84
commit 03098af933

View file

@ -842,6 +842,7 @@ void CServer::InitDnsbl(int ClientID)
IEngine *pEngine = Kernel()->RequestInterface<IEngine>();
pEngine->AddJob(m_aClients[ClientID].m_pDnsblLookup = std::make_shared<CHostLookup>(aBuf, NETTYPE_IPV4));
m_aClients[ClientID].m_DnsblState = CClient::DNSBL_STATE_PENDING;
}
#ifdef CONF_FAMILY_UNIX
@ -1876,7 +1877,6 @@ int CServer::Run()
if (m_aClients[ClientID].m_DnsblState == CClient::DNSBL_STATE_NONE)
{
// initiate dnsbl lookup
m_aClients[ClientID].m_DnsblState = CClient::DNSBL_STATE_PENDING;
InitDnsbl(ClientID);
}
else if (m_aClients[ClientID].m_DnsblState == CClient::DNSBL_STATE_PENDING &&