diff options
author | Binh Trinh <beango@gmail.com> | 2016-08-14 16:31:11 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-08-15 14:40:01 +0000 |
commit | a216e6b945009e73202cf06f0819ef07c360d1c4 (patch) | |
tree | 3e26871532a7a0f970c376dfa7fe497fcbd10dbd /epan/dissectors/packet-gtpv2.c | |
parent | 3119e2fc23ec2b1d533a37db29fa3c512429d27e (diff) |
GTPv2: Proper decoding of transparent containers for SRVCC PS to CS Request and Response
Change-Id: Icc84f8e431b440ac0b0364b9f068905d7a7cbf6b
Reviewed-on: https://code.wireshark.org/review/17052
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gtpv2.c')
-rw-r--r-- | epan/dissectors/packet-gtpv2.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c index 9bd9687249..b24b9e57e5 100644 --- a/epan/dissectors/packet-gtpv2.c +++ b/epan/dissectors/packet-gtpv2.c @@ -618,6 +618,7 @@ static expert_field ei_gtpv2_ie = EI_INIT; #define GTPV2_PPI_VAL_MASK 0x3F #define GTPV2_SRVCC_PS_TO_CS_REQUEST 25 +#define GTPV2_SRVCC_PS_TO_CS_RESPONSE 26 #define GTPV2_CREATE_SESSION_REQUEST 32 #define GTPV2_CREATE_SESSION_RESPONSE 33 #define GTPV2_MODIFY_BEARER_REQUEST 34 @@ -1430,25 +1431,32 @@ dissect_gtpv2_src_tgt_trans_con(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre * dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU */ if (message_type == GTPV2_SRVCC_PS_TO_CS_REQUEST) { - sub_tree = proto_tree_add_subtree(tree, tvb, offset, length, ett_gtpv2_utran_con, NULL, "Source RNC to Target RNC Transparent Container"); + sub_tree = proto_tree_add_subtree(tree, tvb, offset, length-1, ett_gtpv2_utran_con, NULL, "Source RNC to Target RNC Transparent Container"); new_tvb = tvb_new_subset_remaining(tvb, offset); dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU(new_tvb, pinfo, sub_tree, NULL); - } } /* 6.4 Target to Source Transparent Container */ static void -dissect_gtpv2_tgt_src_trans_con(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_, session_args_t * args _U_) +dissect_gtpv2_tgt_src_trans_con(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type, guint8 instance _U_, session_args_t * args _U_) { + tvbuff_t *new_tvb; + proto_tree *sub_tree; int offset = 0; + proto_tree_add_item(tree, hf_gtpv2_len_trans_con, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; /* Transparent Container */ proto_tree_add_item(tree, hf_gtpv2_transparent_container, tvb, offset, length-1, ENC_NA); + if (message_type == GTPV2_SRVCC_PS_TO_CS_RESPONSE) { + sub_tree = proto_tree_add_subtree(tree, tvb, offset, length-1, ett_gtpv2_utran_con, NULL, "Target RNC to Source RNC Transparent Container"); + new_tvb = tvb_new_subset_remaining(tvb, offset); + dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU(new_tvb, pinfo, sub_tree, NULL); + } } |