Merge remote-tracking branch 'origin/fix-nssai-f1ap' into integration_2024_w42 (!3054)
Currently, sD has not been allocated, so the octet string is empty. Fix the allocation to correctly write&read NSSAIs in UE context setup/modification request messages.
This commit is contained in:
@@ -108,8 +108,12 @@ static void f1ap_write_drb_nssai(const nssai_t *nssai, F1AP_SNSSAI_t *asn1_nssai
|
||||
OCTET_STRING_fromBuf(&asn1_nssai->sST, (char *)&nssai->sst, 1);
|
||||
|
||||
/* OPTIONAL */
|
||||
if (nssai->sd != 0xffffff)
|
||||
OCTET_STRING_fromBuf(asn1_nssai->sD, (char *)&nssai->sd, 3);
|
||||
if (nssai->sd != 0xffffff) {
|
||||
char sd_buffer[3];
|
||||
INT24_TO_BUFFER(nssai->sd, sd_buffer);
|
||||
asn1cCalloc(asn1_nssai->sD, sD);
|
||||
OCTET_STRING_fromBuf(sD, sd_buffer, 3);
|
||||
}
|
||||
}
|
||||
|
||||
static void f1ap_write_flows_mapped(const f1ap_flows_mapped_to_drb_t *flows_mapped, F1AP_Flows_Mapped_To_DRB_List_t *asn1_flows_mapped, int n)
|
||||
|
||||
@@ -111,8 +111,9 @@ static void f1ap_read_drb_nssai(const F1AP_SNSSAI_t *asn1_nssai, nssai_t *nssai)
|
||||
{
|
||||
OCTET_STRING_TO_INT8(&asn1_nssai->sST, nssai->sst);
|
||||
nssai->sd = 0xffffff;
|
||||
if (asn1_nssai->sD != NULL)
|
||||
memcpy((uint8_t *)&nssai->sd, asn1_nssai->sD->buf, 3);
|
||||
if (asn1_nssai->sD != NULL) {
|
||||
BUFFER_TO_INT24(asn1_nssai->sD->buf, nssai->sd);
|
||||
}
|
||||
}
|
||||
|
||||
int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
|
||||
|
||||
Reference in New Issue
Block a user