Ethereal-dev: [Ethereal-dev] [PATCH] only do DNS lookups when network address resolution is en

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

From: "Ricardo T. Muggli" <ricardo.muggli@xxxxxxxx>
Date: Thu, 9 Feb 2006 00:13:56 -0600 (CST)
I was seeing stray DNS requests from my monitoring station that should have never been generated. It turned out to be Ethereal itself generating them, even though I had the "Enable network name resolution" box unchecked.

The attached patch will fix ethereal so it will only do network address resolution when network address resolution is enabled. Even when the RESOLV_NETWORK flag was set ethereal would try to resolve addresses in the add_ether_byip function.

The patch is against the latest SVN.

Thanks,

--... ...--
Ricardo Muggli (ricardo.muggli@xxxxxxxx)
Information and Technology Services - Networking & System Administration
Minnesota State University, Mankato 3010 Memorial Library
Mankato, MN  56001
Phone: 507-389-1164   Fax: 507-389-6115
--- ethereal-orig/epan/addr_resolv.c	2006-02-08 23:48:59.801184000 -0600
+++ ethereal/epan/addr_resolv.c	2006-02-08 23:54:33.470833530 -0600
@@ -2056,7 +2056,7 @@
 
   /* first check that IP address can be resolved */
 
-  if ((host = host_name_lookup(ip, &found)) == NULL)
+  if (!(g_resolv_flags & RESOLV_NETWORK) || ((host = host_name_lookup(ip, &found)) == NULL))
     return;
 
   /* ok, we can add this entry in the ethers hashtable */