forked from osmocom/wireshark
X2AP: fix dissection of MeNBtoSgNBContainer in SgNBModificationConfirm message
Bug: 15368 Change-Id: I99307f6af961e91059111e699c7d43fa364f28f0 Reviewed-on: https://code.wireshark.org/review/31080 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
0289b315a3
commit
eb4bf22de3
|
@ -148,10 +148,16 @@ typedef enum {
|
|||
RRC_CONTAINER_TYPE_NR_UE_MEAS_REPORT
|
||||
} rrc_container_type_e;
|
||||
|
||||
enum{
|
||||
INITIATING_MESSAGE,
|
||||
SUCCESSFUL_OUTCOME,
|
||||
UNSUCCESSFUL_OUTCOME
|
||||
};
|
||||
|
||||
struct x2ap_private_data {
|
||||
guint32 procedure_code;
|
||||
guint32 protocol_ie_id;
|
||||
guint32 triggering_message;
|
||||
guint32 message_type;
|
||||
rrc_container_type_e rrc_container_type;
|
||||
};
|
||||
|
||||
|
@ -263,6 +269,7 @@ static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, pro
|
|||
{
|
||||
struct x2ap_private_data *x2ap_data = x2ap_get_private_data(pinfo);
|
||||
|
||||
x2ap_data->message_type = INITIATING_MESSAGE;
|
||||
return (dissector_try_uint_new(x2ap_proc_imsg_dissector_table, x2ap_data->procedure_code, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
}
|
||||
|
||||
|
@ -270,6 +277,7 @@ static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, pro
|
|||
{
|
||||
struct x2ap_private_data *x2ap_data = x2ap_get_private_data(pinfo);
|
||||
|
||||
x2ap_data->message_type = SUCCESSFUL_OUTCOME;
|
||||
return (dissector_try_uint_new(x2ap_proc_sout_dissector_table, x2ap_data->procedure_code, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
}
|
||||
|
||||
|
@ -277,6 +285,7 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p
|
|||
{
|
||||
struct x2ap_private_data *x2ap_data = x2ap_get_private_data(pinfo);
|
||||
|
||||
x2ap_data->message_type = UNSUCCESSFUL_OUTCOME;
|
||||
return (dissector_try_uint_new(x2ap_proc_uout_dissector_table, x2ap_data->procedure_code, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ X2AP-PDU
|
|||
#.MAKE_ENUM
|
||||
ProtocolIE-ID
|
||||
ProcedureCode
|
||||
TriggeringMessage
|
||||
|
||||
#.USE_VALS_EXT
|
||||
CauseRadioNetwork
|
||||
|
@ -81,11 +80,6 @@ ProtocolIE-ContainerPairList
|
|||
struct x2ap_private_data *x2ap_data = x2ap_get_private_data(actx->pinfo);
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
#.FN_BODY TriggeringMessage VAL_PTR = &x2ap_data->triggering_message
|
||||
struct x2ap_private_data *x2ap_data = x2ap_get_private_data(actx->pinfo);
|
||||
%(DEFAULT_BODY)s
|
||||
#.END
|
||||
|
||||
#.FN_PARS InitiatingMessage/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_InitiatingMessageValue
|
||||
|
||||
#.FN_PARS SuccessfulOutcome/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_SuccessfulOutcomeValue
|
||||
|
@ -257,9 +251,9 @@ Port-Number TYPE = FT_UINT16 DISPLAY = BASE_DEC
|
|||
return offset;
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_x2ap_MeNBtoSgNBContainer);
|
||||
if ((x2ap_data->procedure_code == id_sgNBReconfigurationCompletion &&
|
||||
x2ap_data->triggering_message == initiating_message) ||
|
||||
x2ap_data->message_type == INITIATING_MESSAGE) ||
|
||||
(x2ap_data->procedure_code == id_sgNBinitiatedSgNBModification &&
|
||||
x2ap_data->triggering_message == successful_outcome)) {
|
||||
x2ap_data->message_type == SUCCESSFUL_OUTCOME)) {
|
||||
dissect_nr_rrc_RRCReconfigurationComplete_PDU(parameter_tvb, actx->pinfo, subtree, NULL);
|
||||
} else {
|
||||
dissect_nr_rrc_CG_ConfigInfo_PDU(parameter_tvb, actx->pinfo, subtree, NULL);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue