Print

Print


Hi Gregory,

Actually, the latest fix was to force getHostName to always return a
result. If a reverse lookup does not exist, then the ACSII text of the IP
address is returned as the host name. So, the code should be fine even
though it may not look like it by just looking here. I suppose a better
comment would work.

Andy

On Fri, 15 Apr 2005, Gregory J. Sharp wrote:

> Andy,
>
> This pertains to the latest release, and possibly earlier releases...
>
> At line 152 of XrdNet/XrdNetDNS.cc I found
>
> char *XrdNetDNS::getHostName(struct sockaddr &InetAddr, char **errtxt)
> {
>       char *result;
>       if (getHostName(InetAddr, &result, 1, errtxt)) return result;
>
> and so we see that "result" is not initialized, but could be returned
> in some unusual cases (badly configured DNS systems that are missing a
> reverse lookup, for example). Your intent is not clear, so I won't
> pretend to suggest a fix...
>
> Share and Enjoy.
> --
> Gregory J. Sharp                   email: [log in to unmask]
> Wilson Synchrotron Laboratory      url:
> http://www.lepp.cornell.edu/~gregor
> Dryden Rd                          ph:  +1 607 255 4882
> Ithaca, NY 14853                   fax: +1 607 255 8062
>
>