fix: creating allowed NSSAI (#859)
AMF checks whether it can serve all the S-NSSAI(s) from the Requested NSSAI present in the Subscribed S-NSSAIs (potentially using configuration for mapping S-NSSAI values between HPLMN and Serving PLMN), or all the S-NSSAI(s) marked as default in the Subscribed S-NSSAIs in the case that no Requested NSSAI was provided or none of the S-NSSAIs in the Requested NSSAI are permitted, i.e. do not match any of the Subscribed S-NSSAIs or not available at the current UE's Tracking Area (see clause 5.15.3).
This commit is contained in:
parent
b21dc65741
commit
b22023afb8
|
@ -134,25 +134,38 @@ int amf_nudm_sdm_handle_provisioned(
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TS23.501
|
||||
*
|
||||
* 5.15.4 UE NSSAI configuration and NSSAI storage aspects
|
||||
* 5.15.4.1 General
|
||||
* 5.15.4.1.1 UE Network Slice configuration
|
||||
*
|
||||
* S-NSSAIs that the UE provides in the Requested NSSAI which are neither
|
||||
* in the Allowed NSSAI nor provided as a rejected S-NSSAI, shall, by the
|
||||
* UE, not be regarded as rejected, i.e. the UE may request to register
|
||||
* these S-NSSAIs again next time the UE sends a Requested NSSAI
|
||||
*
|
||||
* 5.15.5 Detailed Operation Overview
|
||||
*
|
||||
* 5.15.5.2 Selection of a Serving AMF supporting the Network Slices
|
||||
* 5.15.5.2.1 Registration to a set of Network Slices
|
||||
*
|
||||
* AMF checks whether it can serve all the S-NSSAI(s) from
|
||||
* the Requested NSSAI present in the Subscribed S-NSSAIs
|
||||
* (potentially using configuration for mapping S-NSSAI values
|
||||
* between HPLMN and Serving PLMN), or all the S-NSSAI(s) marked
|
||||
* as default in the Subscribed S-NSSAIs in the case that
|
||||
* no Requested NSSAI was provided or none of the S-NSSAIs
|
||||
* in the Requested NSSAI are permitted,
|
||||
* i.e. do not match any of the Subscribed S-NSSAIs or not available
|
||||
* at the current UE's Tracking Area (see clause 5.15.3).
|
||||
*/
|
||||
|
||||
amf_ue->allowed_nssai.num_of_s_nssai = 0;
|
||||
amf_ue->rejected_nssai.num_of_s_nssai = 0;
|
||||
|
||||
if (!amf_ue->requested_nssai.num_of_s_nssai) {
|
||||
|
||||
for (i = 0; i < amf_ue->num_of_slice; i++) {
|
||||
ogs_slice_data_t *slice = &amf_ue->slice[i];
|
||||
ogs_nas_s_nssai_ie_t *allowed =
|
||||
&amf_ue->allowed_nssai.s_nssai[i];
|
||||
|
||||
allowed->sst = slice->s_nssai.sst;
|
||||
allowed->sd.v = slice->s_nssai.sd.v;
|
||||
allowed->mapped_hplmn_sst = 0;
|
||||
allowed->mapped_hplmn_sd.v = OGS_S_NSSAI_NO_SD_VALUE;
|
||||
}
|
||||
amf_ue->allowed_nssai.num_of_s_nssai = amf_ue->num_of_slice;
|
||||
|
||||
} else {
|
||||
|
||||
if (amf_ue->requested_nssai.num_of_s_nssai) {
|
||||
for (i = 0; i < amf_ue->requested_nssai.num_of_s_nssai; i++) {
|
||||
ogs_slice_data_t *slice = NULL;
|
||||
ogs_nas_s_nssai_ie_t *requested =
|
||||
|
@ -191,6 +204,23 @@ int amf_nudm_sdm_handle_provisioned(
|
|||
}
|
||||
}
|
||||
|
||||
if (!amf_ue->allowed_nssai.num_of_s_nssai) {
|
||||
for (i = 0; i < amf_ue->num_of_slice; i++) {
|
||||
ogs_slice_data_t *slice = &amf_ue->slice[i];
|
||||
ogs_nas_s_nssai_ie_t *allowed =
|
||||
&amf_ue->allowed_nssai.s_nssai[i];
|
||||
|
||||
if (slice->default_indicator == true) {
|
||||
allowed->sst = slice->s_nssai.sst;
|
||||
allowed->sd.v = slice->s_nssai.sd.v;
|
||||
allowed->mapped_hplmn_sst = 0;
|
||||
allowed->mapped_hplmn_sd.v = OGS_S_NSSAI_NO_SD_VALUE;
|
||||
|
||||
amf_ue->allowed_nssai.num_of_s_nssai++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (amf_ue->allowed_nssai.num_of_s_nssai) {
|
||||
amf_ue->allowed_nssai_present = true;
|
||||
} else {
|
||||
|
|
|
@ -1919,6 +1919,7 @@ bson_t *test_db_new_slice(test_ue_t *test_ue)
|
|||
"{",
|
||||
"sst", BCON_INT32(1),
|
||||
"sd", BCON_UTF8("009000"),
|
||||
"default_indicator", BCON_BOOL(true),
|
||||
"session", "[",
|
||||
"{",
|
||||
"name", BCON_UTF8("internet"),
|
||||
|
|
Loading…
Reference in New Issue