diff options
author | Dylan Ulis <daulis0@gmail.com> | 2019-04-16 18:10:40 -0400 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2019-04-17 04:35:42 +0000 |
commit | 6033e51733421c71cfbc6af89ffe594bbdcbe184 (patch) | |
tree | b41c00780a843d6aa312c7817109dcf7ac80690c /epan/dissectors/packet-cip.c | |
parent | 7a89e6ad5656e677976062b750acebf16b99c393 (diff) |
CIP: Don't parse error responses as Success
Remove most cases where we were processing CI_GRC_SERVICE_ERROR as a
success condition.
Leave CI_GRC_SERVICE_ERROR in some cases where this may make sense, eg:
Modbus embedded messages may still want to be parsed as the embedded
format.
Bug: 15669
Change-Id: I44cae1ea8d3bacd6291a3118750f8a9e825de044
Reviewed-on: https://code.wireshark.org/review/32874
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-cip.c')
-rw-r--r-- | epan/dissectors/packet-cip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c index 6ca23d8fbe..36dd1f7179 100644 --- a/epan/dissectors/packet-cip.c +++ b/epan/dissectors/packet-cip.c @@ -6847,7 +6847,7 @@ dissect_cip_cm_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_ cmd_data_tree = proto_tree_add_subtree( item_tree, tvb, offset, data_len, ett_cm_cmd_data, &cmd_item, "Command Specific Data" ); - if( gen_status == CI_GRC_SUCCESS || gen_status == CI_GRC_SERVICE_ERROR ) + if( gen_status == CI_GRC_SUCCESS ) { /* Success responses */ switch (service & CIP_SC_MASK) @@ -7627,7 +7627,7 @@ dissect_cip_cco_data( proto_tree *item_tree, proto_item *ti, tvbuff_t *tvb, int cmd_data_tree = proto_tree_add_subtree( item_tree, tvb, offset+4+add_stat_size, item_length-4-add_stat_size, ett_cco_cmd_data, NULL, "Command Specific Data" ); - if( gen_status == CI_GRC_SUCCESS || gen_status == CI_GRC_SERVICE_ERROR ) + if( gen_status == CI_GRC_SUCCESS ) { /* Success responses */ if (((service & CIP_SC_MASK) == SC_GET_ATT_ALL) && |