summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-09-11 21:21:44 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2015-09-11 19:51:16 +0000
commit10028a26cfbe935a6b5957929b58c4fb7ed45bc0 (patch)
tree7b5b242b1963778165dcaac7cc725756b81750a0
parentb9b73585b9734e812313291ea3371d240954bcae (diff)
downloadwireshark-10028a26cfbe935a6b5957929b58c4fb7ed45bc0.tar.gz
LTE RRC: remove tree tests before decoding top level messages
It prevents proper update of Info column, and various other things Change-Id: I355c46e6f6b3f923250d6b5bf720ea052ef3b646 Reviewed-on: https://code.wireshark.org/review/10488 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> (cherry picked from commit b11e9a6e188c5bfac1e22f7b1f34c21c7ea7fe44) Conflicts: asn1/lte-rrc/packet-lte-rrc-template.c epan/dissectors/packet-lte-rrc.c Reviewed-on: https://code.wireshark.org/review/10490
-rw-r--r--asn1/lte-rrc/packet-lte-rrc-template.c42
-rw-r--r--epan/dissectors/packet-lte-rrc.c48
2 files changed, 33 insertions, 57 deletions
diff --git a/asn1/lte-rrc/packet-lte-rrc-template.c b/asn1/lte-rrc/packet-lte-rrc-template.c
index 2b8683e55b..7469ac3bfb 100644
--- a/asn1/lte-rrc/packet-lte-rrc-template.c
+++ b/asn1/lte-rrc/packet-lte-rrc-template.c
@@ -2356,11 +2356,9 @@ dissect_lte_rrc_DL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC DL_CCCH");
col_clear(pinfo->cinfo, COL_INFO);
- if (tree) {
- ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
- lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
- dissect_DL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
- }
+ ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
+ lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
+ dissect_DL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
}
static void
@@ -2387,11 +2385,9 @@ dissect_lte_rrc_UL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC UL_CCCH");
col_clear(pinfo->cinfo, COL_INFO);
- if (tree) {
- ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
- lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
- dissect_UL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
- }
+ ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
+ lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
+ dissect_UL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
}
static void
@@ -2403,11 +2399,9 @@ dissect_lte_rrc_UL_DCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC UL_DCCH");
col_clear(pinfo->cinfo, COL_INFO);
- if (tree) {
- ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
- lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
- dissect_UL_DCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
- }
+ ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
+ lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
+ dissect_UL_DCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
}
static void
@@ -2419,11 +2413,9 @@ dissect_lte_rrc_BCCH_BCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC BCCH_BCH");
col_clear(pinfo->cinfo, COL_INFO);
- if (tree) {
- ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
- lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
- dissect_BCCH_BCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
- }
+ ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
+ lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
+ dissect_BCCH_BCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
}
static void
@@ -2435,8 +2427,6 @@ dissect_lte_rrc_BCCH_DL_SCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC DL_SCH");
col_clear(pinfo->cinfo, COL_INFO);
- /* Dissect regardless of whether tree is set, so that we can track whether
- systemInfoValue has changed */
ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
dissect_BCCH_DL_SCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
@@ -2465,11 +2455,9 @@ dissect_lte_rrc_MCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC MCCH");
col_clear(pinfo->cinfo, COL_INFO);
- if (tree) {
- ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
- lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
- dissect_MCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
- }
+ ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
+ lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
+ dissect_MCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
}
static void
diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c
index b48086cbac..f56235476d 100644
--- a/epan/dissectors/packet-lte-rrc.c
+++ b/epan/dissectors/packet-lte-rrc.c
@@ -35207,11 +35207,9 @@ dissect_lte_rrc_DL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC DL_CCCH");
col_clear(pinfo->cinfo, COL_INFO);
- if (tree) {
- ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
- lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
- dissect_DL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
- }
+ ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
+ lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
+ dissect_DL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
}
static void
@@ -35238,11 +35236,9 @@ dissect_lte_rrc_UL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC UL_CCCH");
col_clear(pinfo->cinfo, COL_INFO);
- if (tree) {
- ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
- lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
- dissect_UL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
- }
+ ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
+ lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
+ dissect_UL_CCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
}
static void
@@ -35254,11 +35250,9 @@ dissect_lte_rrc_UL_DCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC UL_DCCH");
col_clear(pinfo->cinfo, COL_INFO);
- if (tree) {
- ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
- lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
- dissect_UL_DCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
- }
+ ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
+ lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
+ dissect_UL_DCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
}
static void
@@ -35270,11 +35264,9 @@ dissect_lte_rrc_BCCH_BCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC BCCH_BCH");
col_clear(pinfo->cinfo, COL_INFO);
- if (tree) {
- ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
- lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
- dissect_BCCH_BCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
- }
+ ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
+ lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
+ dissect_BCCH_BCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
}
static void
@@ -35286,8 +35278,6 @@ dissect_lte_rrc_BCCH_DL_SCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC DL_SCH");
col_clear(pinfo->cinfo, COL_INFO);
- /* Dissect regardless of whether tree is set, so that we can track whether
- systemInfoValue has changed */
ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
dissect_BCCH_DL_SCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
@@ -35316,11 +35306,9 @@ dissect_lte_rrc_MCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LTE RRC MCCH");
col_clear(pinfo->cinfo, COL_INFO);
- if (tree) {
- ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
- lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
- dissect_MCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
- }
+ ti = proto_tree_add_item(tree, proto_lte_rrc, tvb, 0, -1, ENC_NA);
+ lte_rrc_tree = proto_item_add_subtree(ti, ett_lte_rrc);
+ dissect_MCCH_Message_PDU(tvb, pinfo, lte_rrc_tree, NULL);
}
static void
@@ -43908,7 +43896,7 @@ void proto_register_lte_rrc(void) {
NULL, HFILL }},
/*--- End of included file: packet-lte-rrc-hfarr.c ---*/
-#line 2500 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 2488 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
{ &hf_lte_rrc_eutra_cap_feat_group_ind_1,
{ "Indicator 1", "lte-rrc.eutra_cap_feat_group_ind_1",
@@ -45529,7 +45517,7 @@ void proto_register_lte_rrc(void) {
&ett_lte_rrc_CandidateCellInfo_r10,
/*--- End of included file: packet-lte-rrc-ettarr.c ---*/
-#line 3027 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 3015 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
&ett_lte_rrc_featureGroupIndicators,
&ett_lte_rrc_featureGroupIndRel9Add,
@@ -45602,7 +45590,7 @@ void proto_register_lte_rrc(void) {
/*--- End of included file: packet-lte-rrc-dis-reg.c ---*/
-#line 3084 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 3072 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
register_init_routine(&lte_rrc_init_protocol);
}