[reSIProcate] Fix for DNS server logging
Scott Godin
sgodin at sipspectrum.com
Fri Feb 10 08:14:42 CST 2012
Thanks Xmly! I'll commit this fix today.
Regards,
Scott
On Thu, Feb 9, 2012 at 7:51 AM, ximalaya <ims3g at 126.com> 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 at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20120210/7029444c/attachment.htm>
More information about the resiprocate-devel
mailing list