Commit 1a62fb49 authored by Rohan Raju Kharade's avatar Rohan Raju Kharade

Minor fixes for servie accept

parent e1cb34f3
......@@ -4512,7 +4512,7 @@ void amf_n1::initialize_registration_accept(
// Network Feature Support
// TODO: remove hardcoded values
registration_accept->Set5gsNetworkFeatureSupport(
0x01, 0x00); // 0x00, 0x00 to disable IMS
0x00, 0x00); // 0x00, 0x00 to disable IMS
// Allowed/Rejected/Configured NSSAI
// Get the list of common SST, SD between UE and AMF
......@@ -4590,7 +4590,7 @@ void amf_n1::initialize_registration_accept(
registration_accept->SetAllowedNssai(allowed_nssais);
registration_accept->SetRejectedNssai(rejected_nssais);
registration_accept->SetConfiguredNssai(allowed_nssais); // TODO
// registration_accept->SetConfiguredNssai(allowed_nssais); // TODO
return;
}
......
......@@ -831,12 +831,6 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
guami.AmfSetID = amf_cfg.guami.AmfSetID;
guami.AmfPointer = amf_cfg.guami.AmfPointer;
msg->setGuami(guami);
msg->setUESecurityCapability(
0xe000, 0xe000, 0xe000,
0xe000); // TODO: remove hardcoded value
msg->setSecurityKey((uint8_t*) bdata(itti_msg.kgnb));
msg->setNasPdu(itti_msg.nas);
// Get the list allowed NSSAI from the common PLMN between gNB and AMF
std::vector<S_Nssai> list;
/* for (auto p : amf_cfg.plmn_list) {
......@@ -860,6 +854,13 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
}
msg->setAllowedNssai(list);
msg->setUESecurityCapability(
0xe000, 0xe000, 0x0000,
0x0000); // TODO: remove hardcoded value
msg->setSecurityKey((uint8_t*) bdata(itti_msg.kgnb));
msg->setNasPdu(itti_msg.nas);
if (itti_msg.is_sr or itti_msg.is_pdu_exist) {
// Set UE Radio Capability if available
if (gc->ue_radio_cap_ind) {
......
......@@ -132,7 +132,7 @@ std::string S_NSSAI::getSd() const {
//------------------------------------------------------------------------------
bool S_NSSAI::encode(Ngap_S_NSSAI_t* s_NSSAI) {
conv::int8_2_octet_string(sst_, s_NSSAI->sST);
if (sd_.has_value()) {
if (sd_.has_value() && (sd_.value() != SD_NO_VALUE)) {
s_NSSAI->sD = (Ngap_SD_t*) calloc(1, sizeof(Ngap_SD_t));
if (!s_NSSAI->sD) return false;
if (!EncodeSD(s_NSSAI->sD)) {
......
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