Save NSSAI params from AMF
The NSSAI of PDU sessions coming from AMF are stored in RRC to be sent to lower layers
This commit is contained in:
@@ -780,12 +780,13 @@ static int ngap_gNB_handle_initial_context_request(sctp_assoc_t assoc_id, uint32
|
||||
|
||||
for(i = 0; i < ie->value.choice.AllowedNSSAI.list.count; i++) {
|
||||
allow_nssai_item_p = ie->value.choice.AllowedNSSAI.list.array[i];
|
||||
|
||||
OCTET_STRING_TO_INT8(&allow_nssai_item_p->s_NSSAI.sST, msg->allowed_nssai[i].sST);
|
||||
|
||||
OCTET_STRING_TO_INT8(&allow_nssai_item_p->s_NSSAI.sST, msg->allowed_nssai[i].sst);
|
||||
|
||||
if(allow_nssai_item_p->s_NSSAI.sD != NULL) {
|
||||
msg->allowed_nssai[i].sD_flag = 1;
|
||||
memcpy(msg->allowed_nssai[i].sD, allow_nssai_item_p->s_NSSAI.sD, sizeof(msg->allowed_nssai[i].sD));
|
||||
memcpy(&msg->allowed_nssai[i].sd, allow_nssai_item_p->s_NSSAI.sD, 3);
|
||||
} else {
|
||||
msg->allowed_nssai[i].sd = 0xffffff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -961,12 +962,14 @@ static int ngap_gNB_handle_pdusession_setup_request(sctp_assoc_t assoc_id, uint3
|
||||
msg->pdusession_setup_params[i].pdusession_id = item_p->pDUSessionID;
|
||||
|
||||
// S-NSSAI
|
||||
OCTET_STRING_TO_INT8(&item_p->s_NSSAI.sST, msg->allowed_nssai[i].sST);
|
||||
OCTET_STRING_TO_INT8(&item_p->s_NSSAI.sST, msg->pdusession_setup_params[i].nssai.sst);
|
||||
if (item_p->s_NSSAI.sD != NULL) {
|
||||
msg->allowed_nssai[i].sD_flag = 1;
|
||||
msg->allowed_nssai[i].sD[0] = item_p->s_NSSAI.sD->buf[0];
|
||||
msg->allowed_nssai[i].sD[1] = item_p->s_NSSAI.sD->buf[1];
|
||||
msg->allowed_nssai[i].sD[2] = item_p->s_NSSAI.sD->buf[2];
|
||||
uint8_t *sd_p = (uint8_t *)&msg->pdusession_setup_params[i].nssai.sd;
|
||||
sd_p[0] = item_p->s_NSSAI.sD->buf[0];
|
||||
sd_p[1] = item_p->s_NSSAI.sD->buf[1];
|
||||
sd_p[2] = item_p->s_NSSAI.sD->buf[2];
|
||||
} else {
|
||||
msg->pdusession_setup_params[i].nssai.sd = 0xffffff;
|
||||
}
|
||||
|
||||
allocCopy(&msg->pdusession_setup_params[i].nas_pdu, *item_p->pDUSessionNAS_PDU);
|
||||
|
||||
Reference in New Issue
Block a user