aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/opcua
diff options
context:
space:
mode:
authorHannes Mezger <hannes.mezger@ascolab.com>2014-06-10 10:51:52 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-06-11 12:14:36 +0000
commit6ddf081f6448c016987330fa6ada210dbc79d0ab (patch)
tree0d704b66aeaada9afeeaba5177818deb8de12848 /plugins/opcua
parentd8a21c8f8efcbbd917a3fe623cfb9721b27048da (diff)
Fix switch case on ExpandedNodeId encoding mask
Only the bits 0-3 are significant for the type of the NodeId contained in the ExpandedNodeId. The other bits are a mask telling if a NamespaceUri and/or a ServerIndex is set. Change-Id: I17948524f8a1bf6cb9dffc5f66ec5cddee580bcd Reviewed-on: https://code.wireshark.org/review/2120 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'plugins/opcua')
-rw-r--r--plugins/opcua/opcua_simpletypes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/opcua/opcua_simpletypes.c b/plugins/opcua/opcua_simpletypes.c
index 97ab261535..16d9f15060 100644
--- a/plugins/opcua/opcua_simpletypes.c
+++ b/plugins/opcua/opcua_simpletypes.c
@@ -274,7 +274,7 @@ void registerSimpleTypes(int proto)
{ "has text", "opcua.has_text", FT_BOOLEAN, 8, NULL, LOCALIZEDTEXT_ENCODINGBYTE_TEXT, NULL, HFILL }
},
{ &hf_opcua_nodeid_encodingmask,
- { "NodeId EncodingMask", "application.nodeid.encodingmask", FT_UINT8, BASE_HEX, VALS(g_nodeidmasks), 0x0, NULL, HFILL }
+ { "NodeId EncodingMask", "application.nodeid.encodingmask", FT_UINT8, BASE_HEX, VALS(g_nodeidmasks), 0x0F, NULL, HFILL }
},
{ &hf_opcua_nodeid_nsid,
{ "NodeId Namespace Id", "application.nodeid.nsid", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
@@ -910,7 +910,7 @@ void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, const c
proto_tree_add_item(subtree, hf_opcua_nodeid_encodingmask, tvb, iOffset, 1, ENC_LITTLE_ENDIAN);
iOffset++;
- switch(EncodingMask)
+ switch(EncodingMask & 0x0F)
{
case 0x00: /* two byte node id */
proto_tree_add_item(subtree, hf_opcua_nodeid_numeric, tvb, iOffset, 1, ENC_LITTLE_ENDIAN);