| 1226 | } |
| 1227 | |
| 1228 | void CServer::InitDnsbl(int ClientId) |
| 1229 | { |
| 1230 | NETADDR Addr = *ClientAddr(ClientId); |
| 1231 | |
| 1232 | //TODO: support ipv6 |
| 1233 | if(Addr.type != NETTYPE_IPV4) |
| 1234 | return; |
| 1235 | |
| 1236 | // build dnsbl host lookup |
| 1237 | char aBuf[256]; |
| 1238 | if(Config()->m_SvDnsblKey[0] == '\0') |
| 1239 | { |
| 1240 | // without key |
| 1241 | str_format(aBuf, sizeof(aBuf), "%d.%d.%d.%d.%s", Addr.ip[3], Addr.ip[2], Addr.ip[1], Addr.ip[0], Config()->m_SvDnsblHost); |
| 1242 | } |
| 1243 | else |
| 1244 | { |
| 1245 | // with key |
| 1246 | str_format(aBuf, sizeof(aBuf), "%s.%d.%d.%d.%d.%s", Config()->m_SvDnsblKey, Addr.ip[3], Addr.ip[2], Addr.ip[1], Addr.ip[0], Config()->m_SvDnsblHost); |
| 1247 | } |
| 1248 | |
| 1249 | m_aClients[ClientId].m_pDnsblLookup = std::make_shared<CHostLookup>(aBuf, NETTYPE_IPV4); |
| 1250 | Engine()->AddJob(m_aClients[ClientId].m_pDnsblLookup); |
| 1251 | m_aClients[ClientId].m_DnsblState = EDnsblState::PENDING; |
| 1252 | } |
| 1253 | |
| 1254 | #ifdef CONF_FAMILY_UNIX |
| 1255 | void CServer::SendConnLoggingCommand(CONN_LOGGING_CMD Cmd, const NETADDR *pAddr) |
nothing calls this directly
no test coverage detected