Re: [reSIProcate] Fix for DNS server logging
Thanks Xmly! I'll commit this fix today.
Regards,
Scott
On Thu, Feb 9, 2012 at 7:51 AM, ximalaya
<ims3g@xxxxxxx> wrote:
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
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel