The payload of a compressed Kafka message is supposed to be itself a

message-set, so dissect it as such. I don't have a capture demonstrating this
at the moment, but it ought to work.

svn path=/trunk/; revision=54303
This commit is contained in:
Evan Huus 2013-12-20 15:14:52 +00:00
parent 1feb5f00c1
commit 82112c8ea3
1 changed files with 6 additions and 1 deletions

View File

@ -145,6 +145,11 @@ typedef struct _kafka_query_response_t {
gboolean response_found;
} kafka_query_response_t;
static int
dissect_kafka_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int start_offset);
static int
dissect_kafka_message_set(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int start_offset);
/* HELPERS */
static guint
@ -270,7 +275,7 @@ dissect_kafka_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int s
payload = tvb_child_uncompress(tvb, raw, 0, tvb_length(raw));
if (payload) {
add_new_data_source(pinfo, payload, "Uncompressed Message");
proto_tree_add_item(subtree, hf_kafka_message_value, payload, 0, -1, ENC_NA);
dissect_kafka_message_set(payload, pinfo, subtree, 0);
} else {
/* TODO make this an expert item */
proto_tree_add_text(subtree, tvb, 0, tvb_length(raw), "[Failed to decompress message!]");