aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ocfs2.c
diff options
context:
space:
mode:
authorMakoto Shimamura <makoto.shimamura@toshiba.co.jp>2016-09-05 21:01:54 +0900
committerAnders Broman <a.broman58@gmail.com>2016-09-07 04:24:36 +0000
commita4c95ebe0309f25c9ced56e8032e5d8c0ba0523c (patch)
treeae6b431dbfd584038aea6bf9dd2906a7a1ff26fb /epan/dissectors/packet-ocfs2.c
parent0495fc3bdd89d40fdb10108fea80f0cb8d9825de (diff)
OCFS2: dissector incorrectly treats keepalive messages as unknown type
Keepalive req/resp messages are shown as "Unknown type (0x00)" in info column. This patch fixes them to "Keepalive Request" and "Keepalive Response". Ping-Bug: 12122 Change-Id: If09192067736b78c7785ba1ff05ae62a05d3dc23 Reviewed-on: https://code.wireshark.org/review/17497 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ocfs2.c')
-rw-r--r--epan/dissectors/packet-ocfs2.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ocfs2.c b/epan/dissectors/packet-ocfs2.c
index 22f196555b..4195ce4a57 100644
--- a/epan/dissectors/packet-ocfs2.c
+++ b/epan/dissectors/packet-ocfs2.c
@@ -1052,8 +1052,19 @@ static int dissect_ocfs2_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
proto_tree_add_item_ret_uint(subtree, hf_msg_msg_type, tvb, 4, 2, ENC_BIG_ENDIAN, &msg_type);
offset += 2;
- col_append_sep_fstr(pinfo->cinfo, COL_INFO, " | ", "%s",
- val_to_str_ext(msg_type, &ext_dlm_magic, "Unknown Type (0x%02x)") );
+ switch(magic){
+ case O2NET_MSG_KEEP_REQ_MAGIC:
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, " | ", "Keepalive Request");
+ break;
+ case O2NET_MSG_KEEP_RESP_MAGIC:
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, " | ", "Keepalive Response");
+ break;
+ default:
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, " | ", "%s",
+ val_to_str_ext(msg_type, &ext_dlm_magic, "Unknown Type (0x%02x)") );
+ break;
+ }
+
col_set_fence(pinfo->cinfo, COL_INFO);
proto_tree_add_item(subtree, hf_msg_pad, tvb, 4, 2, ENC_BIG_ENDIAN);