diff options
-rw-r--r-- | asn1/ranap/ranap.cnf | 7 | ||||
-rw-r--r-- | epan/dissectors/packet-ranap.c | 15 |
2 files changed, 12 insertions, 10 deletions
diff --git a/asn1/ranap/ranap.cnf b/asn1/ranap/ranap.cnf index b9740b2e9e..16886b8afb 100644 --- a/asn1/ranap/ranap.cnf +++ b/asn1/ranap/ranap.cnf @@ -322,10 +322,11 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound") /* IPv6 */ proto_tree_add_item(subtree, hf_ranap_transportLayerAddress_ipv6, parameter_tvb, 0, tvb_len, ENC_NA); } - if (tvb_len==20){ - item = proto_tree_add_item(subtree, hf_ranap_transportLayerAddress_nsap, parameter_tvb, 0, tvb_len, ENC_NA); + /* Length will be 25 if optional bearerId is present */ + if ((tvb_len==20) || (tvb_len==25)) { + item = proto_tree_add_item(subtree, hf_ranap_transportLayerAddress_nsap, parameter_tvb, 0, 20, ENC_NA); nsap_tree = proto_item_add_subtree(item, ett_ranap_TransportLayerAddress_nsap); - dissect_nsap(parameter_tvb, 0, 20, nsap_tree); + dissect_nsap(parameter_tvb, 0, tvb_len, nsap_tree); } #.FN_BODY GTP-TEI VAL_PTR = ¶meter_tvb diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c index 308c3f16dc..17d9220937 100644 --- a/epan/dissectors/packet-ranap.c +++ b/epan/dissectors/packet-ranap.c @@ -4576,7 +4576,7 @@ dissect_ranap_GlobalRNC_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static int dissect_ranap_GTP_TEI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 332 "../../asn1/ranap/ranap.cnf" +#line 333 "../../asn1/ranap/ranap.cnf" tvbuff_t *parameter_tvb=NULL; int saved_hf; @@ -7435,7 +7435,7 @@ dissect_ranap_Service_Handover(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int dissect_ranap_Source_ToTarget_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 358 "../../asn1/ranap/ranap.cnf" +#line 359 "../../asn1/ranap/ranap.cnf" dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ); @@ -7512,7 +7512,7 @@ static const per_sequence_t SourceRNC_ToTargetRNC_TransparentContainer_sequence[ static int dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 344 "../../asn1/ranap/ranap.cnf" +#line 345 "../../asn1/ranap/ranap.cnf" /* If SourceRNC-ToTargetRNC-TransparentContainer is called trough dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ProtocolIE_ID may be unset @@ -7751,7 +7751,7 @@ dissect_ranap_SRVCC_Operation_Possible(tvbuff_t *tvb _U_, int offset _U_, asn1_c static int dissect_ranap_Target_ToSource_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 368 "../../asn1/ranap/ranap.cnf" +#line 369 "../../asn1/ranap/ranap.cnf" dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU ); @@ -7904,10 +7904,11 @@ dissect_ranap_TransportLayerAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_ /* IPv6 */ proto_tree_add_item(subtree, hf_ranap_transportLayerAddress_ipv6, parameter_tvb, 0, tvb_len, ENC_NA); } - if (tvb_len==20){ - item = proto_tree_add_item(subtree, hf_ranap_transportLayerAddress_nsap, parameter_tvb, 0, tvb_len, ENC_NA); + /* Length will be 25 if optional bearerId is present */ + if ((tvb_len==20) || (tvb_len==25)) { + item = proto_tree_add_item(subtree, hf_ranap_transportLayerAddress_nsap, parameter_tvb, 0, 20, ENC_NA); nsap_tree = proto_item_add_subtree(item, ett_ranap_TransportLayerAddress_nsap); - dissect_nsap(parameter_tvb, 0, 20, nsap_tree); + dissect_nsap(parameter_tvb, 0, tvb_len, nsap_tree); } |