S1AP: fix decoding of inter eNB transparent container from NGAP

This commit is contained in:
Pascal Quantin 2020-11-24 14:05:21 +01:00
parent 063af96df7
commit 74c0b2134b
3 changed files with 208 additions and 172 deletions

View File

@ -198,6 +198,7 @@ struct s1ap_private_data {
struct s1ap_tai *tai;
guint16 enb_ue_s1ap_id;
gboolean srvcc_ho_cs_only;
guint8 transparent_container_type;
};
enum {
@ -213,6 +214,11 @@ static const enum_val_t s1ap_lte_container_vals[] = {
{NULL, NULL, -1}
};
enum {
SOURCE_TO_TARGET_TRANSPARENT_CONTAINER = 1,
TARGET_TO_SOURCE_TRANSPARENT_CONTAINER
};
/* Global variables */
static guint gbl_s1apSctpPort=SCTP_PORT_S1AP;
static gboolean g_s1ap_dissect_container = TRUE;

View File

@ -384,6 +384,11 @@ Port-Number TYPE = FT_UINT16 DISPLAY = BASE_DEC
struct s1ap_private_data *s1ap_data = s1ap_get_private_data(actx->pinfo);
s1ap_data->handover_type_value = 0xff;
#.FN_HDR SourceeNB-ToTargeteNB-TransparentContainer
struct s1ap_private_data *s1ap_data = s1ap_get_private_data(actx->pinfo);
s1ap_data->transparent_container_type = SOURCE_TO_TARGET_TRANSPARENT_CONTAINER;
#.FN_BODY Source-ToTarget-TransparentContainer VAL_PTR = &parameter_tvb
# I think the message is "directly encoded" into the octet string(no "double encoding")
# (Compare RANAP)
@ -458,6 +463,12 @@ Port-Number TYPE = FT_UINT16 DISPLAY = BASE_DEC
/* Enable writing of the column again */
col_set_writable(actx->pinfo->cinfo, COL_INFO, TRUE);
}
#.FN_HDR TargeteNB-ToSourceeNB-TransparentContainer
struct s1ap_private_data *s1ap_data = s1ap_get_private_data(actx->pinfo);
s1ap_data->transparent_container_type = TARGET_TO_SOURCE_TRANSPARENT_CONTAINER;
#.FN_BODY Target-ToSource-TransparentContainer VAL_PTR = &parameter_tvb
# I think the message is "directly encoded" into the octet string(no "double encoding")
# See Target-ToSource-TransparentContainer in RANAP
@ -567,8 +578,8 @@ Port-Number TYPE = FT_UINT16 DISPLAY = BASE_DEC
struct s1ap_private_data *s1ap_data = s1ap_get_private_data(actx->pinfo);
subtree = proto_item_add_subtree(actx->created_item, ett_s1ap_RRCContainer);
switch(s1ap_data->message_type){
case INITIATING_MESSAGE:
switch(s1ap_data->transparent_container_type){
case SOURCE_TO_TARGET_TRANSPARENT_CONTAINER:
/* 9.2.1.7 Source eNB to Target eNB Transparent Container */
if ((s1ap_is_nbiot_ue(actx->pinfo) && (g_s1ap_dissect_lte_container_as == S1AP_LTE_CONTAINER_AUTOMATIC)) ||
(g_s1ap_dissect_lte_container_as == S1AP_LTE_CONTAINER_NBIOT)) {
@ -589,7 +600,7 @@ Port-Number TYPE = FT_UINT16 DISPLAY = BASE_DEC
ENDTRY;
}
break;
case SUCCESSFUL_OUTCOME:
case TARGET_TO_SOURCE_TRANSPARENT_CONTAINER:
/* 9.2.1.8 Target eNB to Source eNB Transparent Container */
TRY {
dissect_lte_rrc_HandoverCommand_PDU(parameter_tvb, actx->pinfo, subtree, NULL);

File diff suppressed because it is too large Load Diff