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>
This commit is contained in:
parent
99ceab898c
commit
f9f7ff2904
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue