From 348f2cfd6e01acaa9fc16fc8840f692460a6217b Mon Sep 17 00:00:00 2001 From: Hannes Mezger Date: Wed, 12 Dec 2018 12:25:45 +0100 Subject: [PATCH] opcua: show invalid OPC UA messages when 'opcua' filter is set Change-Id: Ia9d14c14c20ef35aefbb0e6b3853450074b4c0a3 Reviewed-on: https://code.wireshark.org/review/31020 Petri-Dish: Anders Broman Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- plugins/epan/opcua/opcua.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/epan/opcua/opcua.c b/plugins/epan/opcua/opcua.c index cd71f72eb8..bc5b2f8505 100644 --- a/plugins/epan/opcua/opcua.c +++ b/plugins/epan/opcua/opcua.c @@ -190,6 +190,14 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree * else { msgtype = MSG_INVALID; + + /* Clear out stuff in the info column */ + col_set_str(pinfo->cinfo, COL_INFO, g_szMessageTypes[msgtype]); + + /* add empty item to make filtering by 'opcua' work */ + proto_tree_add_item(tree, proto_opcua, tvb, 0, -1, ENC_NA); + + return tvb_reported_length(tvb); } /* Clear out stuff in the info column */