aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorDylan Ulis <daulis0@gmail.com>2019-04-16 18:10:40 -0400
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2019-04-17 04:35:42 +0000
commit6033e51733421c71cfbc6af89ffe594bbdcbe184 (patch)
treeb41c00780a843d6aa312c7817109dcf7ac80690c /epan/dissectors
parent7a89e6ad5656e677976062b750acebf16b99c393 (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')
-rw-r--r--epan/dissectors/packet-cip.c4
-rw-r--r--epan/dissectors/packet-cipsafety.c4
2 files changed, 4 insertions, 4 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) &&
diff --git a/epan/dissectors/packet-cipsafety.c b/epan/dissectors/packet-cipsafety.c
index f8383829c5..c7d6d7a9a4 100644
--- a/epan/dissectors/packet-cipsafety.c
+++ b/epan/dissectors/packet-cipsafety.c
@@ -565,7 +565,7 @@ dissect_cip_s_supervisor_data( proto_tree *item_tree,
cmd_data_tree = proto_tree_add_subtree( item_tree, tvb, offset+4+add_stat_size,
item_length-4-add_stat_size, ett_ssupervisor_cmd_data, NULL, "Command Specific Data" );
- if( gen_status == CI_GRC_SUCCESS || gen_status == CI_GRC_SERVICE_ERROR )
+ if( gen_status == CI_GRC_SUCCESS )
{
switch (service & CIP_SC_MASK)
{
@@ -1126,7 +1126,7 @@ dissect_cip_s_validator_data( proto_tree *item_tree,
cmd_data_tree = proto_tree_add_subtree( item_tree, tvb, offset+4+add_stat_size, item_length-4-add_stat_size,
ett_ssupervisor_cmd_data, &pi, "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) &&