return true;
}
+bool DNS::ForwardLookupWithFD(std::string host, int &fd)
+{
+ ServerInstance->stats->statsDns++;
+ this->myfd = dns_getip4(host.c_str());
+ fd = this->myfd;
+ if (this->myfd == -1)
+ {
+
+ }
+ log(DEBUG,"DNS: ForwardLookupWithFD, fd=%d",this->myfd);
+ ServerInstance->SE->AddFd(this->myfd,true,X_ESTAB_MODULE);
+ return true;
+}
+
bool DNS::HasResult(int fd)
{
return (fd == this->myfd);
DNS dns2;
std::string host;
std::string ip;
- if (dns1.ReverseLookup((char*)inet_ntoa(dest->ip4)))
+ if (dns1.ReverseLookup((char*)inet_ntoa(u->ip4)))
{
while (!dns1.HasResult())
{
usleep(100);
}
ip = dns2.GetResultIP();
- if (ip == std::string((char*)inet_ntoa(dest->ip4)))
+ if (ip == std::string((char*)inet_ntoa(u->ip4)))
{
if (host.length() < 160)
{