Ricardo Muggli:
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 9 Feb 2006 09:18:15 +0000 (09:18 +0000)
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 9 Feb 2006 09:18:15 +0000 (09:18 +0000)
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17227 f5534014-38df-0310-8fa8-9805f1628bb7

epan/addr_resolv.c

index aa144cca8e4cd4336c3870a58ba2d78b2a2bb3dc..8ccb415aa60be1c0a889dc4ce311c6f6bded1cae 100644 (file)
@@ -2056,7 +2056,7 @@ extern void add_ether_byip(guint ip, const guint8 *eth)
 
   /* 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 */