diff options
author | Hannes Mezger <hannes.mezger@ascolab.com> | 2017-02-16 16:09:59 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-02-16 17:32:08 +0000 |
commit | 7e9b7b596728e6d1ab1ab5dc01e6a24a3bfafd6b (patch) | |
tree | 7389cbb8f58344806514790fb88bae9c54048adc /plugins | |
parent | a5a8fce06ecb5aff1dfcf101bb2b5455bd776569 (diff) |
opcua: display abort messages correctly
Change-Id: I795fc3a3cf4ca93483f870d229668d7f747bb799
Reviewed-on: https://code.wireshark.org/review/20147
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/opcua/opcua.c | 14 | ||||
-rw-r--r-- | plugins/opcua/opcua_transport_layer.c | 8 | ||||
-rw-r--r-- | plugins/opcua/opcua_transport_layer.h | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/plugins/opcua/opcua.c b/plugins/opcua/opcua.c index 08f1051704..91f1d02333 100644 --- a/plugins/opcua/opcua.c +++ b/plugins/opcua/opcua.c @@ -226,6 +226,20 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree * opcua_num = tvb_get_letohl(tvb, offset); offset += 4; /* Security Sequence Number */ opcua_seqid = tvb_get_letohl(tvb, offset); offset += 4; /* Security RequestId */ + if (chunkType == 'A') + { + fragment_delete(&opcua_reassembly_table, pinfo, opcua_seqid, NULL); + + col_clear_fence(pinfo->cinfo, COL_INFO); + col_set_str(pinfo->cinfo, COL_INFO, "Abort message"); + + offset = 0; + (*pfctParse)(transport_tree, tvb, pinfo, &offset); + parseAbort(transport_tree, tvb, pinfo, &offset); + + return tvb_reported_length(tvb); + } + /* check if tvb is part of a chunked message: the UA protocol does not tell us that, so we look into opcua_reassembly_table if the opcua_seqid belongs to a diff --git a/plugins/opcua/opcua_transport_layer.c b/plugins/opcua/opcua_transport_layer.c index 5b32a5dbb4..38fdac75af 100644 --- a/plugins/opcua/opcua_transport_layer.c +++ b/plugins/opcua/opcua_transport_layer.c @@ -127,6 +127,14 @@ int parseMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint * return -1; } +int parseAbort(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset) +{ + parseStatusCode(tree, tvb, pinfo, pOffset, hf_opcua_transport_error); + parseString(tree, tvb, pinfo, pOffset, hf_opcua_transport_reason); + + return -1; +} + int parseService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset) { proto_item *ti; diff --git a/plugins/opcua/opcua_transport_layer.h b/plugins/opcua/opcua_transport_layer.h index cc32d0af2e..2993a4e8cf 100644 --- a/plugins/opcua/opcua_transport_layer.h +++ b/plugins/opcua/opcua_transport_layer.h @@ -22,6 +22,7 @@ int parseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffse int parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset); int parseError(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset); int parseMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset); +int parseAbort(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset); int parseService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset); int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset); int parseCloseSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset); |