aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gtpv2.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2014-09-17 12:14:32 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2014-09-17 12:32:59 +0000
commitc4c82577d321ee288f2cba776560ef28b7143974 (patch)
treed5f8253713eb438dc64cf2e079325909a19d2dcb /epan/dissectors/packet-gtpv2.c
parentd05a44c3ceb4a6c22fbf0c764c49e421b02189fe (diff)
GTPv2: further fixes for Trace Information IE dissection
Bug: 10470 Change-Id: I8b61e5601379a568da39cce2335122e91ab37ec4 Reviewed-on: https://code.wireshark.org/review/4142 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gtpv2.c')
-rw-r--r--epan/dissectors/packet-gtpv2.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index 433a873307..36a4775276 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -2450,7 +2450,6 @@ dissect_gtpv2_tra_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, prot
#if 0
guint8 *trace_id = NULL;
#endif
- guint8 tdl;
guint16 tid;
guint32 bit_offset;
@@ -2469,8 +2468,8 @@ dissect_gtpv2_tra_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, prot
proto_tree_add_text(tree, tvb, offset, 3, "Trace ID: %d", tid);
offset += 3;
- /* Triggering Events, put all into a new tree called trigging_tree */
- trigg_tree = proto_tree_add_subtree(tree, tvb, offset, 9, ett_gtpv2_tra_info_trigg, NULL, "Trigging Events");
+ /* Triggering Events, put all into a new tree called triggering_tree */
+ trigg_tree = proto_tree_add_subtree(tree, tvb, offset, 9, ett_gtpv2_tra_info_trigg, NULL, "Triggering Events");
/* Create all subtrees */
msc_server_tree = proto_tree_add_subtree(trigg_tree, tvb, offset, 2, ett_gtpv2_tra_info_trigg_msc_server, NULL, "MSC Server");
@@ -2495,7 +2494,7 @@ dissect_gtpv2_tra_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, prot
proto_tree_add_item(msc_server_tree, hf_gtpv2_tra_info_msc_lu_imsi_ad, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(msc_server_tree, hf_gtpv2_tra_info_msc_handovers, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(msc_server_tree, hf_gtpv2_tra_info_msc_ss, tvb, offset, 1, ENC_BIG_ENDIAN);
- bit_offset = (offset << 3) + 5;
+ bit_offset = offset << 3;
proto_tree_add_bits_item(msc_server_tree, hf_gtpv2_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
offset += 1;
bit_offset = offset << 3;
@@ -2504,7 +2503,7 @@ dissect_gtpv2_tra_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, prot
/* MGW - 1 octet */
proto_tree_add_item(mgw_tree, hf_gtpv2_tra_info_mgw_context, tvb, offset, 1, ENC_BIG_ENDIAN);
- bit_offset = (offset << 3) + 1;
+ bit_offset = offset << 3;
proto_tree_add_bits_item(mgw_tree, hf_gtpv2_spare_bits, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
offset += 1;
/* SGSN - 2 octets */
@@ -2512,7 +2511,7 @@ dissect_gtpv2_tra_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, prot
proto_tree_add_item(sgsn_tree, hf_gtpv2_tra_info_sgsn_momt_sms, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sgsn_tree, hf_gtpv2_tra_info_sgsn_rau_gprs_ad, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sgsn_tree, hf_gtpv2_tra_info_sgsn_mbms, tvb, offset, 1, ENC_BIG_ENDIAN);
- bit_offset = (offset << 3) + 4;
+ bit_offset = offset << 3;
proto_tree_add_bits_item(sgsn_tree, hf_gtpv2_spare_bits, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item(sgsn_tree, hf_gtpv2_tra_info_sgsn_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2520,12 +2519,12 @@ dissect_gtpv2_tra_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, prot
/* GGSN - 1 octet */
proto_tree_add_item(ggsn_tree, hf_gtpv2_tra_info_ggsn_pdp, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(ggsn_tree, hf_gtpv2_tra_info_ggsn_mbms, tvb, offset, 1, ENC_BIG_ENDIAN);
- bit_offset = (offset << 3) + 2;
+ bit_offset = offset << 3;
proto_tree_add_bits_item(ggsn_tree, hf_gtpv2_spare_bits, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
offset += 1;
/* BM-SC - 1 octet */
proto_tree_add_item(bm_sc_tree, hf_gtpv2_tra_info_bm_sc, tvb, offset, 1, ENC_BIG_ENDIAN);
- bit_offset = (offset << 3) + 1;
+ bit_offset = offset << 3;
proto_tree_add_bits_item(bm_sc_tree, hf_gtpv2_spare_bits, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
offset += 1;
/* MME/SGW - 1 octet */
@@ -2535,19 +2534,19 @@ dissect_gtpv2_tra_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, prot
proto_tree_add_item(sgw_mme_tree, hf_gtpv2_tra_info_mme_sgw_ue_init_pdn_disc, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sgw_mme_tree, hf_gtpv2_tra_info_mme_sgw_bearer_act_mod_del, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sgw_mme_tree, hf_gtpv2_tra_info_mme_sgw_ho, tvb, offset, 1, ENC_BIG_ENDIAN);
- bit_offset = (offset << 3) + 6;
+ bit_offset = offset << 3;
proto_tree_add_bits_item(sgw_mme_tree, hf_gtpv2_spare_bits, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
offset += 1;
/* PGW/SGW - 1 octet */
proto_tree_add_item(sgw_tree, hf_gtpv2_tra_info_sgw_pdn_con_creat, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sgw_tree, hf_gtpv2_tra_info_sgw_pdn_con_term, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sgw_tree, hf_gtpv2_tra_info_sgw_bearer_act_mod_del, tvb, offset, 1, ENC_BIG_ENDIAN);
- bit_offset = (offset << 3) + 3;
+ bit_offset = (offset << 3) + 4;
proto_tree_add_bits_item(sgw_tree, hf_gtpv2_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(pgw_tree, hf_gtpv2_tra_info_pgw_pdn_con_creat, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(pgw_tree, hf_gtpv2_tra_info_pgw_pdn_con_term, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(pgw_tree, hf_gtpv2_tra_info_pgw_bearer_act_mod_del, tvb, offset, 1, ENC_BIG_ENDIAN);
- bit_offset = (offset << 3) + 7;
+ bit_offset = offset << 3;
proto_tree_add_bits_item(pgw_tree, hf_gtpv2_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2572,17 +2571,9 @@ dissect_gtpv2_tra_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, prot
offset += 1;
/* Trace Depth Length */
- tdl = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_gtpv2_tra_info_tdl, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- /* Trace Depth List
- * Will be displayed if length of Trace Depth Length is > 0
- * The list will only contains UTF8String, RAW DATA
- */
- proto_tree_add_text(tree, tvb, offset, tdl, "Trace Depth List: %s", tvb_bytes_to_ep_str(tvb, offset, tdl));
- offset += tdl;
-
/* Set up subtree interfaces and put all interfaces under it */
interfaces_tree = proto_tree_add_subtree(tree, tvb, offset, 12, ett_gtpv2_tra_info_interfaces, NULL, "List of Interfaces");