aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wccp.c
diff options
context:
space:
mode:
authorYuri Chislov <yuri.chislov@gmail.com>2018-03-27 09:24:36 +0000
committerAnders Broman <a.broman58@gmail.com>2018-04-04 10:05:10 +0000
commit8f2b1fdc38288a62bbaf0f2d00f2e523de3668db (patch)
tree968829fe7eb2d27cdf2277aae5e6b26dad495b31 /epan/dissectors/packet-wccp.c
parentcef0decc57e0aefb1bb875ef195c759023617591 (diff)
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>
Diffstat (limited to 'epan/dissectors/packet-wccp.c')
-rw-r--r--epan/dissectors/packet-wccp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/dissectors/packet-wccp.c b/epan/dissectors/packet-wccp.c
index 1109d82189..b18b99d0ac 100644
--- a/epan/dissectors/packet-wccp.c
+++ b/epan/dissectors/packet-wccp.c
@@ -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);
}