aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-osi-options.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2016-10-14 08:07:18 +0200
committerJeff Morriss <jeff.morriss.ws@gmail.com>2016-10-14 13:34:10 +0000
commit3a08906ca7c1e66037977f0e701af6a7c89bd4f9 (patch)
tree867fa265f358d364bbb2df8e3ef996e06cfe16e8 /epan/dissectors/packet-osi-options.c
parentdb690aa4444322d85f40ecef7892ec12b3e423b9 (diff)
Retrieve CLNP option values from the right place
Use proper offsets when getting and presenting option values for error reports. Limit the use of the error position highlighting feature to 'field' only. Bug: 12993 Change-Id: Ie9d6644203cf849dbb8efe15e87249a3aace3b5c Reviewed-on: https://code.wireshark.org/review/18195 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-osi-options.c')
-rw-r--r--epan/dissectors/packet-osi-options.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-osi-options.c b/epan/dissectors/packet-osi-options.c
index bcad9fbc62..bbfc6d78e3 100644
--- a/epan/dissectors/packet-osi-options.c
+++ b/epan/dissectors/packet-osi-options.c
@@ -367,33 +367,33 @@ dissect_option_rfd(const guchar error, const guchar field, int offset,
{
proto_item *ti;
- ti = proto_tree_add_item(tree, hf_osi_options_rfd_error_class, tvb, offset + field, 1, ENC_BIG_ENDIAN);
+ ti = proto_tree_add_item(tree, hf_osi_options_rfd_error_class, tvb, offset, 1, ENC_BIG_ENDIAN);
switch ((error & OSI_OPT_RFD_MASK) >> 4)
{
case OSI_OPT_RFD_GENERAL:
- proto_tree_add_item(tree, hf_osi_options_rtd_general, tvb, offset + field, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_osi_options_rtd_general, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
case OSI_OPT_RFD_ADDRESS:
- proto_tree_add_item(tree, hf_osi_options_rtd_address, tvb, offset + field, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_osi_options_rtd_address, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
case OSI_OPT_RFD_SOURCE_ROUTING:
- proto_tree_add_item(tree, hf_osi_options_rtd_source_routing, tvb, offset + field, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_osi_options_rtd_source_routing, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
case OSI_OPT_RFD_LIFETIME:
- proto_tree_add_item(tree, hf_osi_options_rtd_lifetime, tvb, offset + field, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_osi_options_rtd_lifetime, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
case OSI_OPT_RFD_PDU_DISCARDED:
- proto_tree_add_item(tree, hf_osi_options_rtd_pdu_discarded, tvb, offset + field, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_osi_options_rtd_pdu_discarded, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
case OSI_OPT_RFD_REASSEMBLY:
- proto_tree_add_item(tree, hf_osi_options_rtd_reassembly, tvb, offset + field, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_osi_options_rtd_reassembly, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
default:
expert_add_info(pinfo, ti, &ei_osi_options_rfd_error_class);
}
- proto_tree_add_item(tree, hf_osi_options_rfd_field, tvb, offset + 1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_uint(tree, hf_osi_options_rfd_field, tvb, offset + field, 1, field);
}
/* dissect ATN security label used for policy based interdomain routing.*/