< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

[reSIProcate] Fix for DNS server logging


Hi,

The IP address logged is incorrect if a IPv6 DNS server is used. Following fix 
can be applied,

rutil\dns\AresDns.cxx, line 346
      InfoLog(<< "DNS initialization: found  " << (*channel)->nservers << " 
name servers");
      for (int i = 0; i < (*channel)->nservers; ++i)
      {
         InfoLog(<< " name server: " << 
DnsUtil::inet_ntop((*channel)->servers[i].addr));
      }

should change to,
      InfoLog(<< "DNS initialization: found  " << (*channel)->nservers << " 
name servers");
      for (int i = 0; i < (*channel)->nservers; ++i)
      {
     #ifdef USE_IPV6
        if((*channel)->servers[i].family == AF_INET6) {
                InfoLog(<< " name server: " << 
DnsUtil::inet_ntop((*channel)->servers[i].addr6));
        } else 
     #endif
        {
                InfoLog(<< " name server: " << 
DnsUtil::inet_ntop((*channel)->servers[i].addr));
        }
      }


Thanks,
Xmly