aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorBruno Verstuyft <bruno.verstuyft@excentis.com>2017-10-18 11:54:46 +0200
committerMichael Mann <mmann78@netscape.net>2017-10-18 14:46:16 +0000
commitc703ba52adc02c83245a5d428e6943d4a4a0f995 (patch)
tree863f063a49a555e0aa9550bfdb718a57ab3dc0a6 /plugins
parent2575a2e9a8928025a28d6873094c22c867ad5ab5 (diff)
DOCSIS: Fixed bug where OCD TLVs are nested
Change-Id: I3b6a7c6dabfe017eb6c223ab2491e0a3cda8c56c Reviewed-on: https://code.wireshark.org/review/23970 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/docsis/packet-macmgmt.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/docsis/packet-macmgmt.c b/plugins/docsis/packet-macmgmt.c
index 7a3db517ca..049ac3694c 100644
--- a/plugins/docsis/packet-macmgmt.c
+++ b/plugins/docsis/packet-macmgmt.c
@@ -5574,7 +5574,7 @@ static void
dissect_ocd_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
{
proto_item *it, *tlv_item, *tlv_len_item;
- proto_tree *tlv_tree;
+ proto_tree *tlv_tree, *tlvtlv_tree;
guint16 pos = 0;
guint8 type;
guint32 length;
@@ -5585,13 +5585,13 @@ dissect_ocd_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
while (tvb_reported_length_remaining(tvb, pos) > 0)
{
type = tvb_get_guint8 (tvb, pos);
- tlv_tree = proto_tree_add_subtree(tlv_tree, tvb, pos, -1,
+ tlvtlv_tree = proto_tree_add_subtree(tlv_tree, tvb, pos, -1,
ett_docsis_ocd_tlvtlv, &tlv_item,
val_to_str(type, ocd_tlv_vals,
"Unknown TLV (%u)"));
- proto_tree_add_uint (tlv_tree, hf_docsis_ocd_type, tvb, pos, 1, type);
+ proto_tree_add_uint (tlvtlv_tree, hf_docsis_ocd_type, tvb, pos, 1, type);
pos++;
- tlv_len_item = proto_tree_add_item_ret_uint (tlv_tree, hf_docsis_ocd_length, tvb, pos, 1, ENC_NA, &length);
+ tlv_len_item = proto_tree_add_item_ret_uint (tlvtlv_tree, hf_docsis_ocd_length, tvb, pos, 1, ENC_NA, &length);
pos++;
proto_item_set_len(tlv_item, length + 2);
@@ -5600,7 +5600,7 @@ dissect_ocd_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
case DISCRETE_FOURIER_TRANSFORM_SIZE:
if (length == 1)
{
- proto_tree_add_item (tlv_tree, hf_docsis_ocd_tlv_four_trans_size, tvb, pos, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_four_trans_size, tvb, pos, 1, ENC_BIG_ENDIAN);
}
else
{
@@ -5610,7 +5610,7 @@ dissect_ocd_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
case CYCLIC_PREFIX:
if (length == 1)
{
- proto_tree_add_item (tlv_tree, hf_docsis_ocd_tlv_cycl_pref, tvb, pos, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_cycl_pref, tvb, pos, 1, ENC_BIG_ENDIAN);
}
else
{
@@ -5620,7 +5620,7 @@ dissect_ocd_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
case ROLL_OFF:
if (length == 1)
{
- proto_tree_add_item (tlv_tree, hf_docsis_ocd_tlv_roll_off, tvb, pos, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_roll_off, tvb, pos, 1, ENC_BIG_ENDIAN);
}
else
{
@@ -5630,7 +5630,7 @@ dissect_ocd_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
case OFDM_SPECTRUM_LOCATION:
if (length == 4)
{
- proto_tree_add_item (tlv_tree, hf_docsis_ocd_tlv_ofdm_spec_loc, tvb, pos, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_ofdm_spec_loc, tvb, pos, 4, ENC_BIG_ENDIAN);
}
else
{
@@ -5640,7 +5640,7 @@ dissect_ocd_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
case TIME_INTERLEAVING_DEPTH:
if (length == 1)
{
- proto_tree_add_item (tlv_tree, hf_docsis_ocd_tlv_time_int_depth, tvb, pos, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_time_int_depth, tvb, pos, 1, ENC_BIG_ENDIAN);
}
else
{
@@ -5650,7 +5650,7 @@ dissect_ocd_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
case SUBCARRIER_ASSIGNMENT_RANGE_LIST:
if (length >= 5)
{
- dissect_subcarrier_assignment_range_list(tvb, pinfo, tlv_tree, pos, length);
+ dissect_subcarrier_assignment_range_list(tvb, pinfo, tlvtlv_tree, pos, length);
}
else
{
@@ -5660,7 +5660,7 @@ dissect_ocd_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
case PRIMARY_CAPABILITY_INDICATOR:
if (length == 1)
{
- proto_tree_add_item (tlv_tree, hf_docsis_ocd_tlv_prim_cap_ind, tvb, pos, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_prim_cap_ind, tvb, pos, 1, ENC_BIG_ENDIAN);
}
else
{
@@ -5668,7 +5668,7 @@ dissect_ocd_tlv (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree)
}
break;
default:
- proto_tree_add_item (tlv_tree, hf_docsis_ocd_tlv_unknown, tvb, pos - 2, length+2, ENC_NA);
+ proto_tree_add_item (tlvtlv_tree, hf_docsis_ocd_tlv_unknown, tvb, pos - 2, length+2, ENC_NA);
break;
} /* switch */
pos += length;