summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-e2ap.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--epan/dissectors/packet-e2ap.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/epan/dissectors/packet-e2ap.c b/epan/dissectors/packet-e2ap.c
index 19069a79..e1952aba 100644
--- a/epan/dissectors/packet-e2ap.c
+++ b/epan/dissectors/packet-e2ap.c
@@ -2100,7 +2100,6 @@ static int dissect_e2ap_RANParameter_Definition(tvbuff_t *tvb _U_, int offset _U
static int dissect_e2ap_RANParameter_ValueType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
-#define MAX_RECURSION_DEPTH 100 // Arbitrarily chosen.
static const value_string e2ap_Criticality_vals[] = {
{ 0, "reject" },
@@ -7286,15 +7285,14 @@ static const per_sequence_t RANParameter_Testing_Item_sequence[] = {
static int
dissect_e2ap_RANParameter_Testing_Item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
- const int proto_id = GPOINTER_TO_INT(wmem_list_frame_data(wmem_list_tail(actx->pinfo->layers)));
- const unsigned cycle_size = 5;
- unsigned recursion_depth = p_get_proto_depth(actx->pinfo, proto_id);
- DISSECTOR_ASSERT(recursion_depth <= MAX_RECURSION_DEPTH);
- p_set_proto_depth(actx->pinfo, proto_id, recursion_depth + cycle_size);
+ // RANParameter-Testing-Item → RANParameter-Testing-Item/ranParameter-Type → RANParameter-Testing-Item-Choice-List → RANParameter-Testing-LIST → RANParameter-Testing-Item
+ actx->pinfo->dissection_depth += 4;
+ increment_dissection_depth(actx->pinfo);
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_e2ap_RANParameter_Testing_Item, RANParameter_Testing_Item_sequence);
- p_set_proto_depth(actx->pinfo, proto_id, recursion_depth - cycle_size);
+ actx->pinfo->dissection_depth -= 4;
+ decrement_dissection_depth(actx->pinfo);
return offset;
}
@@ -7679,15 +7677,14 @@ static const per_sequence_t RANParameter_Definition_sequence[] = {
static int
dissect_e2ap_RANParameter_Definition(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
- const int proto_id = GPOINTER_TO_INT(wmem_list_frame_data(wmem_list_tail(actx->pinfo->layers)));
- const unsigned cycle_size = 6;
- unsigned recursion_depth = p_get_proto_depth(actx->pinfo, proto_id);
- DISSECTOR_ASSERT(recursion_depth <= MAX_RECURSION_DEPTH);
- p_set_proto_depth(actx->pinfo, proto_id, recursion_depth + cycle_size);
+ // RANParameter-Definition → RANParameter-Definition-Choice → RANParameter-Definition-Choice-LIST → RANParameter-Definition-Choice-LIST/ranParameter-List → RANParameter-Definition-Choice-LIST-Item → RANParameter-Definition
+ actx->pinfo->dissection_depth += 5;
+ increment_dissection_depth(actx->pinfo);
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_e2ap_RANParameter_Definition, RANParameter_Definition_sequence);
- p_set_proto_depth(actx->pinfo, proto_id, recursion_depth - cycle_size);
+ actx->pinfo->dissection_depth -= 5;
+ decrement_dissection_depth(actx->pinfo);
return offset;
}
@@ -7837,16 +7834,15 @@ static const per_choice_t RANParameter_ValueType_choice[] = {
static int
dissect_e2ap_RANParameter_ValueType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
- const int proto_id = GPOINTER_TO_INT(wmem_list_frame_data(wmem_list_tail(actx->pinfo->layers)));
- const unsigned cycle_size = 6;
- unsigned recursion_depth = p_get_proto_depth(actx->pinfo, proto_id);
- DISSECTOR_ASSERT(recursion_depth <= MAX_RECURSION_DEPTH);
- p_set_proto_depth(actx->pinfo, proto_id, recursion_depth + cycle_size);
+ // RANParameter-ValueType → RANParameter-ValueType-Choice-Structure → RANParameter-STRUCTURE → RANParameter-STRUCTURE/sequence-of-ranParameters → RANParameter-STRUCTURE-Item → RANParameter-ValueType
+ actx->pinfo->dissection_depth += 5;
+ increment_dissection_depth(actx->pinfo);
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
ett_e2ap_RANParameter_ValueType, RANParameter_ValueType_choice,
NULL);
- p_set_proto_depth(actx->pinfo, proto_id, recursion_depth - cycle_size);
+ actx->pinfo->dissection_depth -= 5;
+ decrement_dissection_depth(actx->pinfo);
return offset;
}