Ethereal-dev: [Ethereal-dev] Problem with get_host_ipaddr in addr_resolv.c for win32

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Francisco Alcoba (TS/EEM)" <francisco.alcoba@xxxxxxxxxxxx>
Date: Thu, 21 Oct 2004 18:59:19 +0200
Hi,

When configuring a display filter in win32, something like "ip.addr eq 400.1.1.1" is accepted. This is because it uses get_host_ipaddr to check for the correctness of the IP address; this, in turn, uses inet_aton -the inet_aton in adns- which is broken, it always returns TRUE -this is, I think, because it checks the return value of gethostbyaddr against INADDR_ANY, instead of INADDR_NONE; I have reported this to the asdns people-.

However, if I use a correct version of inet_aton, it will return FALSE, and then get_host_ipaddr will execute gethostbyname, which has timeout problems in win32 because of NetBios resolution. Is there a way out of this problem -as, for instance, not trying to resolv host names in display filters, would this be acceptable?

Regards,
  Francisco