Commit fd7258c2 authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Fix issue for Allowed NSSAI

parent ef7337c0
......@@ -3255,7 +3255,7 @@ void amf_n1::ul_nas_transport_handle(
// TODO: Only use the first one for now if there's multiple requested
// NSSAI since we don't know which slice associated with this PDU session
if (nc->requestedNssai.size() > 0) {
if (nc->allowed_nssai.size() > 0) {
snssai = nc->requestedNssai[0];
Logger::amf_n1().debug(
"Use first Requested S-NSSAI %s", snssai.ToString().c_str());
......@@ -4133,8 +4133,15 @@ void amf_n1::initialize_registration_accept(
SNSSAI_t snssai = {};
snssai.sst = s.sst;
snssai.sd = s.sd;
if (s.sd == SD_NO_VALUE) {
snssai.length = SST_LENGTH;
} else {
snssai.length = SST_LENGTH + SD_LENGTH;
}
Logger::amf_n1().debug("Allowed S-NSSAI (SST 0x%x, SD 0x%x)", s.sst, s.sd);
allowed_nssais.push_back(snssai);
// Store in the NAS context
nc->allowed_nssai.push_back(snssai); // TODO: refactor NAS_Context
}
// Rejected NSSAIs
......
......@@ -98,6 +98,7 @@ class nas_context {
// Set to true if marked as default
std::vector<std::pair<bool, nas::SNSSAI_t>> subscribed_snssai;
std::vector<nas::SNSSAI_t> configured_nssai;
// TODO: rejected_nssai;
// std::vector<nas::SNSSAI_t> default_configured_nssai;
// std::vector<nas::SNSSAI_t> s_nssai; //for Network Slice selection
......
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