gethostbyaddr_r returns zero length hostname (and success response)

Peter Dambier peter at peter-dambier.de
Wed Mar 22 19:22:00 UTC 2006


kapilbajaj at gmail.com wrote:
> Hi,
> 
>  I have observed that gethostbyaddr_r returns zero length hostname but
> success response. This behavior is not consistent. Sometimes it returns
> 0 length hostname. Hostname entry exists in dns.
> If we put a check for this and retry it again returns the same result.
> But if we exit from program and invoke it again it returns correct
> hostname.
> Please let me know if anyone experienced this behavior in past?
> 
> Thanks,
> Kapil
> 

gethostbyaddr could not alloc memory to store and return the hostname.

After terminating your programme memory is freed. Now it can alloc
memory again until memory is exhausted gain.

Did you free the memory gethostbyaddr did return to you?


Regards
Peter and Karin Dambier



-- 
Peter and Karin Dambier
The Public-Root Consortium
Graeffstrasse 14
D-64646 Heppenheim
+49(6252)671-788 (Telekom)
+49(179)108-3978 (O2 Genion)
+49(6252)750-308 (VoIP: sipgate.de)
mail: peter at peter-dambier.de
mail: peter at echnaton.serveftp.com
http://iason.site.voila.fr/
https://sourceforge.net/projects/iason/



More information about the bind-users mailing list