opcua: show invalid OPC UA messages when 'opcua' filter is set
authorHannes Mezger <hannes.mezger@ascolab.com>
Wed, 12 Dec 2018 11:25:45 +0000 (12:25 +0100)
committerAnders Broman <a.broman58@gmail.com>
Thu, 13 Dec 2018 06:39:22 +0000 (06:39 +0000)
Change-Id: Ia9d14c14c20ef35aefbb0e6b3853450074b4c0a3
Reviewed-on: https://code.wireshark.org/review/31020
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
plugins/epan/opcua/opcua.c

index cd71f72eb89a2a85b63de66c5d2fb42c02585629..bc5b2f8505d9b87abdee1e9f1fd34f54bcc9477e 100644 (file)
@@ -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 */