aboutsummaryrefslogtreecommitdiffstats
path: root/epan/addr_resolv.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2015-03-01 21:59:49 -0500
committerAnders Broman <a.broman58@gmail.com>2015-03-02 06:58:26 +0000
commitf9f7ff2904e07392bd6770a7d19bcede12daf043 (patch)
treeffdfdbcc1027bbdfc716dcb2358f708ef22155cb /epan/addr_resolv.c
parent99ceab898c8c809eb1584432c54872d7e368711b (diff)
Don't read aliases from the personal hosts file.
We only store the last name added (i.e., the last alias) which is the opposite of what the name resolver does (it returns the first name in the hosts file). Just comment the code out for now with a comment explaining why. Maybe some day we'll have a reason to store the aliases. Change-Id: I560ac05868a429d31e9d41f3a34af36c4fca1f6c Reviewed-on: https://code.wireshark.org/review/7466 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/addr_resolv.c')
-rw-r--r--epan/addr_resolv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c
index a89b76861f..f71da50d2c 100644
--- a/epan/addr_resolv.c
+++ b/epan/addr_resolv.c
@@ -2059,9 +2059,12 @@ read_hosts_file (const char *hostspath, gboolean store_entries)
} else
add_ipv4_name(host_addr[0], cp);
+#if 0
/*
* Add the aliases, too, if there are any.
- * XXX - host_lookup() only returns the first entry.
+ * XXX - except we only store the last one added. The name
+ * resolver returns the first name in the hosts file, we should
+ * too.
*/
while ((cp = strtok(NULL, " \t")) != NULL) {
if (is_ipv6) {
@@ -2070,6 +2073,7 @@ read_hosts_file (const char *hostspath, gboolean store_entries)
} else
add_ipv4_name(host_addr[0], cp);
}
+#endif
}
}
g_free(line);