WCCP: use proto_tree_add_ipv4_format() if ipv4 used

Bug: 14573
Change-Id: I429477940d8e7a827a3f35630be64a7b06869d59
Reviewed-on: https://code.wireshark.org/review/26661
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Yuri Chislov 2018-03-27 09:24:36 +00:00 committed by Anders Broman
parent cef0decc57
commit 8f2b1fdc38
1 changed files with 6 additions and 1 deletions

View File

@ -1568,8 +1568,13 @@ dissect_wccp2_hash_assignment_info(tvbuff_t *tvb, int offset, gint length,
return length - 4*(n_web_caches-i)-256;
host_addr = tvb_get_ntohl(tvb,offset);
proto_tree_add_uint_format(info_tree, hf_cache_ip, tvb, offset, 4, host_addr, "Web-Cache %d: IP address %s", i,
if (! addr_table->in_use){
proto_tree_add_ipv4_format(info_tree, hf_cache_ip, tvb, offset, 4, host_addr, "Web-Cache %d: IP address %s", i,
decode_wccp_encoded_address(tvb, offset, pinfo, info_tree, addr_table));
} else {
proto_tree_add_uint_format(info_tree, hf_web_cache_identity_index, tvb, offset, 4, host_addr, "Web-Cache %d: IP address %s", i,
decode_wccp_encoded_address(tvb, offset, pinfo, info_tree, addr_table));
}
EAT(4);
}