aboutsummaryrefslogtreecommitdiffstats
path: root/epan/addr_resolv.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-02-29 03:19:19 -0800
committerGuy Harris <guy@alum.mit.edu>2016-02-29 11:20:14 +0000
commit0e5a73fa4e8804c07cf56d6b0e47232ba536621c (patch)
tree55c29a2045dd3addd579cce3bc3ebd4fa11882c9 /epan/addr_resolv.c
parentd5f2db6a7fa5ab85d6d4f9ca86e8c988063edd5a (diff)
Only say we have a new resolved MAC address if it's actually *new*.
If we aren't changing the resolved name, it's not new. This prevents us from perpetually "resolving" the address. If we have ARP packets that cause us to map a MAC address to a host name, based on the ARP packet saying the MAC address corresponds to a given resolved IP address, then each time we dissect the packet, the address will be "resolved" - and each time we have new resolved addresses as a result of that, we'll redissect the displayed packets so that they show the resolved address, and we'll forever be redissecting. Change-Id: I445e92f407d52a4ed5986721ffcc472f86e99431 Reviewed-on: https://code.wireshark.org/review/14236 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/addr_resolv.c')
-rw-r--r--epan/addr_resolv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c
index 45342af7d2..db96820a17 100644
--- a/epan/addr_resolv.c
+++ b/epan/addr_resolv.c
@@ -1603,9 +1603,11 @@ add_eth_name(const guint8 *addr, const gchar *name)
tp = eth_hash_new_entry(addr, FALSE);
}
- g_strlcpy(tp->resolved_name, name, MAXNAMELEN);
- tp->status = HASHETHER_STATUS_RESOLVED_NAME;
- new_resolved_objects = TRUE;
+ if (strcmp(tp->resolved_name, name) != 0) {
+ g_strlcpy(tp->resolved_name, name, MAXNAMELEN);
+ tp->status = HASHETHER_STATUS_RESOLVED_NAME;
+ new_resolved_objects = TRUE;
+ }
return tp;
} /* add_eth_name */