Commit 3f511975 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

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.
parents 784ae2a4 2fe1c2f7
...@@ -108,8 +108,12 @@ static void f1ap_write_drb_nssai(const nssai_t *nssai, F1AP_SNSSAI_t *asn1_nssai ...@@ -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); OCTET_STRING_fromBuf(&asn1_nssai->sST, (char *)&nssai->sst, 1);
/* OPTIONAL */ /* OPTIONAL */
if (nssai->sd != 0xffffff) if (nssai->sd != 0xffffff) {
OCTET_STRING_fromBuf(asn1_nssai->sD, (char *)&nssai->sd, 3); 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) 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) ...@@ -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); OCTET_STRING_TO_INT8(&asn1_nssai->sST, nssai->sst);
nssai->sd = 0xffffff; nssai->sd = 0xffffff;
if (asn1_nssai->sD != NULL) if (asn1_nssai->sD != NULL) {
memcpy((uint8_t *)&nssai->sd, asn1_nssai->sD->buf, 3); 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) int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment