diff options
author | Binh Trinh <beango@gmail.com> | 2016-08-14 23:41:48 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-08-22 12:08:31 +0000 |
commit | b9e70e9b4cb0d85b6fcbbcfa387a5bea80046665 (patch) | |
tree | 2fd367806a7a0ed7680a3ab8ed2f7b9ece7acd98 /epan/dissectors/asn1/ranap | |
parent | 3f4ef54776cc9216ad1d633723e8984018b4deba (diff) |
RANAP: Add an heuristic to decode the HO-to-UTRAN Command embedded in the RRC Container within the TargetRNC-to-SourceRNC Transparent Container
Change-Id: Iea7c8d24f52cf8bd11e13a53853e11ec1ecdcd36
Reviewed-on: https://code.wireshark.org/review/17058
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/asn1/ranap')
-rw-r--r-- | epan/dissectors/asn1/ranap/packet-ranap-template.c | 2 | ||||
-rw-r--r-- | epan/dissectors/asn1/ranap/ranap.cnf | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/epan/dissectors/asn1/ranap/packet-ranap-template.c b/epan/dissectors/asn1/ranap/packet-ranap-template.c index 18573053ff..4db5c14bd6 100644 --- a/epan/dissectors/asn1/ranap/packet-ranap-template.c +++ b/epan/dissectors/asn1/ranap/packet-ranap-template.c @@ -381,7 +381,7 @@ proto_reg_handoff_ranap(void) if (!initialized) { rrc_s_to_trnc_handle = find_dissector_add_dependency("rrc.s_to_trnc_cont", proto_ranap); rrc_t_to_srnc_handle = find_dissector_add_dependency("rrc.t_to_srnc_cont", proto_ranap); - rrc_ho_to_utran_cmd = find_dissector("rrc.irat.ho_to_utran_cmd"); + rrc_ho_to_utran_cmd = find_dissector_add_dependency("rrc.irat.ho_to_utran_cmd", proto_ranap); initialized = TRUE; #include "packet-ranap-dis-tab.c" } else { diff --git a/epan/dissectors/asn1/ranap/ranap.cnf b/epan/dissectors/asn1/ranap/ranap.cnf index ad7e2d9f21..896ee1f8c4 100644 --- a/epan/dissectors/asn1/ranap/ranap.cnf +++ b/epan/dissectors/asn1/ranap/ranap.cnf @@ -220,6 +220,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound") #.FN_BODY RRC-Container VAL_PTR = &rrc_message_tvb tvbuff_t *rrc_message_tvb=NULL; + guint8 container_choice=0; %(DEFAULT_BODY)s @@ -239,13 +240,21 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound") * either carry the Target RNC to Source RNC Transparent Container * or the Target eNB to Source eNB Transparent Container IE as defined in [49]... */ - call_dissector(rrc_t_to_srnc_handle,rrc_message_tvb,%(ACTX)s->pinfo, proto_tree_get_root(tree)); + + /* Assume a TargetRNC-ToSourceRNC-Container. Peek the RRC octetstream to guess the choice*/ + container_choice = tvb_get_guint8(rrc_message_tvb, 0) >> 5; + if (container_choice < 7) { + /* Normal case (0-6): dissect as TargetRNC-ToSourceRNC-Container */ + call_dissector(rrc_t_to_srnc_handle,rrc_message_tvb,%(ACTX)s->pinfo, proto_tree_get_root(tree)); + } else { + /* Special case (7 extension): it would have been decoded as NULL. Attempt as HandoverToUTRANCommand instead*/ + call_dissector(rrc_ho_to_utran_cmd,rrc_message_tvb,%(ACTX)s->pinfo, proto_tree_get_root(tree)); + } break; default: break; } } - #.END #.FN_BODY OldBSS-ToNewBSS-Information VAL_PTR = &bss_info_tvb |