Commit 34f40dbb authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Code cleanup for PDU Session handling

parent 3bec2681
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file amf_config.cpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#include "amf_config.hpp"
#include <boost/algorithm/string.hpp>
......@@ -35,6 +28,7 @@
#include <libconfig.h++>
#include "3gpp_ts24501.hpp"
#include "3gpp_29.502.h"
#include "amf_app.hpp"
#include "if.hpp"
#include "logger.hpp"
......@@ -81,7 +75,7 @@ amf_config::amf_config() {
guami_list = {};
relative_amf_capacity = 0;
plmn_list = {};
auth_conf auth_para = {};
auth_para = {};
nas_cfg = {};
smf_pool = {};
support_features.enable_nf_registration = false;
......@@ -361,6 +355,7 @@ int amf_config::load(const std::string& config_file) {
throw(AMF_CONFIG_STRING_SBI_HTTP2_PORT "failed");
}
if (!support_features.enable_smf_selection) {
// SMF
const Setting& smf_addr_pool =
sbi_cfg[AMF_CONFIG_STRING_SMF_INSTANCES_POOL];
......@@ -377,7 +372,8 @@ int amf_config::load(const std::string& config_file) {
// Store FQDN
smf_addr_item.lookupValue(AMF_CONFIG_STRING_FQDN_DNS, smf_inst.fqdn);
smf_addr_item.lookupValue(AMF_CONFIG_STRING_SMF_INSTANCE_ID, smf_inst.id);
smf_addr_item.lookupValue(
AMF_CONFIG_STRING_SMF_INSTANCE_ID, smf_inst.id);
if (!support_features.use_fqdn_dns) {
smf_addr_item.lookupValue(
AMF_CONFIG_STRING_IPV4_ADDRESS, smf_inst.ipv4);
......@@ -386,7 +382,8 @@ int amf_config::load(const std::string& config_file) {
"BAD IPv4 ADDRESS FORMAT FOR SMF !");
if (!(smf_addr_item.lookupValue(
AMF_CONFIG_STRING_SMF_INSTANCE_PORT, smf_inst.port))) {
Logger::amf_app().error(AMF_CONFIG_STRING_SMF_INSTANCE_PORT "failed");
Logger::amf_app().error(AMF_CONFIG_STRING_SMF_INSTANCE_PORT
"failed");
throw(AMF_CONFIG_STRING_SMF_INSTANCE_PORT "failed");
}
if (!(smf_addr_item.lookupValue(
......@@ -414,6 +411,7 @@ int amf_config::load(const std::string& config_file) {
smf_inst.selected = false;
smf_pool.push_back(smf_inst);
}
}
// NRF
const Setting& nrf_cfg = new_if_cfg[AMF_CONFIG_STRING_NRF];
......@@ -960,6 +958,54 @@ std::string amf_config::get_ausf_ue_authentications_uri() {
ausf_addr.api_version + "/ue-authentications";
}
//------------------------------------------------------------------------------
bool amf_config::get_smf_pdu_session_context_uri(
const std::shared_ptr<pdu_session_context>& psc, std::string& smf_uri) {
if (!psc) return false;
if (!psc.get()->smf_info.info_available) {
Logger::amf_sbi().error("No SMF is available for this PDU session");
return false;
}
std::string smf_addr = {};
std::string smf_port = {};
std::string smf_ip_addr = {};
smf_addr = psc->smf_info.addr;
smf_port = psc->smf_info.port;
// remove http port from the URI if existed
std::size_t found_port = smf_addr.find(":");
if (found_port != std::string::npos)
smf_ip_addr = smf_addr.substr(0, found_port - 1);
else
smf_ip_addr = smf_addr;
std::size_t found = psc.get()->smf_info.context_location.find(smf_ip_addr);
if (found != std::string::npos)
smf_uri = psc.get()->smf_info.context_location;
else
smf_uri = smf_addr + ":" + smf_port + psc.get()->smf_info.context_location;
return true;
}
//------------------------------------------------------------------------------
std::string amf_config::get_smf_pdu_session_base_uri(
const std::string& smf_addr, const std::string& smf_port,
const std::string& smf_api_version) {
// Remove http port from the URI if existed
std::string smf_ip_addr = {};
std::size_t found_port = smf_addr.find(":");
if (found_port != std::string::npos)
smf_ip_addr = smf_addr.substr(0, found_port);
else
smf_ip_addr = smf_addr;
return smf_ip_addr + ":" + smf_port + "/nsmf-pdusession/" + smf_api_version +
NSMF_PDU_SESSION_CREATE;
}
//------------------------------------------------------------------------------
void amf_config::to_json(nlohmann::json& json_data) const {
json_data["instance"] = instance;
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file amf_config.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _AMF_CONFIG_H_
#define _AMF_CONFIG_H_
......@@ -45,6 +38,7 @@
#include "string.hpp"
#include "thread_sched.hpp"
#include "common_defs.h"
#include "pdu_session_context.hpp"
#define AMF_CONFIG_STRING_AMF_CONFIG "AMF"
#define AMF_CONFIG_STRING_PID_DIRECTORY "PID_DIRECTORY"
......@@ -124,7 +118,7 @@ using namespace libconfig;
namespace config {
typedef struct {
typedef struct auth_conf_s {
std::string mysql_server;
std::string mysql_user;
std::string mysql_pass;
......@@ -148,7 +142,7 @@ typedef struct {
this->random = json_data["random"].get<std::string>();
}
} auth_conf;
} auth_conf_t;
typedef struct interface_cfg_s {
std::string if_name;
......@@ -457,6 +451,28 @@ class amf_config {
*/
std::string get_ausf_ue_authentications_uri();
/*
* Get the URI of SMF PDU Session Service
* @param [const std::shared_ptr<pdu_session_context>&] psc: pointer to the
* PDU Session Context
* @param [std::string&] smf_uri: based URI of Nsmf_PDUSession Services
* @return true if can get the URI. otherwise false
*/
bool get_smf_pdu_session_context_uri(
const std::shared_ptr<pdu_session_context>& psc, std::string& smf_uri);
/*
* Get the URI of SMF Services
* @param [const std::string&] smf_addr: SMF's Addr in String representation
* @param [const std::string&] smf_port: SMF's port in String representation
* @param [const std::string&] smf_api_version: SMF's API version in String
* representation
* @return URI in string format
*/
std::string get_smf_pdu_session_base_uri(
const std::string& smf_addr, const std::string& smf_port,
const std::string& smf_api_version);
/*
* Display the AMF configuration parameters
* @param void
......@@ -493,7 +509,7 @@ class amf_config {
unsigned int relative_amf_capacity;
std::vector<plmn_item_t> plmn_list;
std::string is_emergency_support;
auth_conf auth_para;
auth_conf_t auth_para;
nas_conf_t nas_cfg;
std::vector<smf_inst_t> smf_pool;
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file amf_n1.cpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#include "amf_n1.hpp"
#include <curl/curl.h>
......@@ -2998,7 +2991,7 @@ void amf_n1::ue_initiate_de_registration_handle(
itti_msg->supi = uc->supi;
itti_msg->pdu_session_id = session->pdu_session_id;
itti_msg->promise_id = promise_id;
itti_msg->context_location = session->smf_context_location;
itti_msg->context_location = session->smf_info.context_location;
int ret = itti_inst->send_msg(itti_msg);
if (0 != ret) {
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file amf_n1.hpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _AMF_N1_H_
#define _AMF_N1_H_
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file amf_n2.cpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#include "amf_n2.hpp"
#include "DefaultPagingDRX.hpp"
......@@ -182,7 +175,7 @@ void amf_n2_task(void* args_p) {
dynamic_cast<itti_ue_radio_capability_indication*>(msg);
amf_n2_inst->handle_itti_message(ref(*m));
} break;
case HANDOVER_REQUIRED: {
case HANDOVER_REQUIRED_MSG: {
Logger::amf_n2().info("Received HANDOVER_REQUIRED message, handling");
itti_handover_required* m = dynamic_cast<itti_handover_required*>(msg);
if (!amf_n2_inst->handle_itti_message(ref(*m)))
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file amf_n2.hpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _AMF_N2_H_
#define _AMF_N2_H_
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file amf_sbi.cpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#include "amf_sbi.hpp"
#include <curl/curl.h>
......@@ -33,6 +26,7 @@
#include "3gpp_ts24501.hpp"
#include "3gpp_29.500.h"
#include "3gpp_29.502.h"
#include "amf.hpp"
#include "amf_app.hpp"
......@@ -238,34 +232,12 @@ void amf_sbi::handle_itti_message(
return;
}
std::string smf_addr = {};
std::string smf_port = {};
std::string smf_api_version = {};
if (!psc.get()->smf_available) {
Logger::amf_sbi().error("No SMF is available for this PDU session");
} else {
smf_addr = psc->smf_addr;
smf_port = psc->smf_port;
smf_api_version = psc->smf_api_version;
}
std::string smf_ip_addr = {};
std::string remote_uri = {};
// remove http port from the URI if existed
std::size_t found_port = smf_addr.find(":");
if (found_port != std::string::npos)
smf_ip_addr = smf_addr.substr(0, found_port - 1);
else
smf_ip_addr = smf_addr;
std::size_t found = psc.get()->smf_context_location.find(smf_ip_addr);
if (found != std::string::npos)
remote_uri = psc.get()->smf_context_location + "/modify";
else
remote_uri =
smf_addr + ":" + smf_port + psc.get()->smf_context_location + "/modify";
if (!amf_cfg.get_smf_pdu_session_context_uri(psc, remote_uri)) {
Logger::amf_sbi().error("Could not find Nsmf_PDUSession URI");
return;
}
remote_uri += NSMF_PDU_SESSION_MODIFY;
Logger::amf_sbi().debug("SMF URI: %s", remote_uri.c_str());
......@@ -377,7 +349,7 @@ void amf_sbi::handle_itti_message(itti_nsmf_pdusession_create_sm_context& smf) {
std::string smf_addr = {};
std::string smf_api_version = {};
std::string smf_port = "80"; // Set to default port number
if (!psc.get()->smf_available) {
if (!psc.get()->smf_info.info_available) {
if (amf_cfg.support_features.enable_smf_selection) {
// Get NRF URI
std::string nrf_uri = {};
......@@ -403,13 +375,14 @@ void amf_sbi::handle_itti_message(itti_nsmf_pdusession_create_sm_context& smf) {
}
// store smf info to be used with this PDU session
psc.get()->smf_available = true;
psc->smf_addr = smf_addr;
psc->smf_port = smf_port;
psc->smf_api_version = smf_api_version;
psc.get()->smf_info.info_available = true;
psc->smf_info.addr = smf_addr;
psc->smf_info.port = smf_port;
psc->smf_info.api_version = smf_api_version;
} else {
smf_addr = psc->smf_addr;
smf_api_version = psc->smf_api_version;
smf_addr = psc->smf_info.addr;
smf_api_version = psc->smf_info.api_version;
std::string smf_port = psc->smf_info.port;
}
switch (smf.req_type & 0x07) {
......@@ -432,8 +405,7 @@ void amf_sbi::handle_itti_message(itti_nsmf_pdusession_create_sm_context& smf) {
default: {
// send Nsmf_PDUSession_UpdateSM_Context to SMF e.g., for PDU Session
// release request
send_pdu_session_update_sm_context_request(
supi, psc, smf_addr, smf.sm_msg, dnn);
send_pdu_session_update_sm_context_request(supi, psc, smf.sm_msg, dnn);
}
}
}
......@@ -441,26 +413,19 @@ void amf_sbi::handle_itti_message(itti_nsmf_pdusession_create_sm_context& smf) {
//------------------------------------------------------------------------------
void amf_sbi::send_pdu_session_update_sm_context_request(
const std::string& supi, std::shared_ptr<pdu_session_context>& psc,
const std::string& smf_addr, bstring sm_msg, const std::string& dnn) {
bstring sm_msg, const std::string& dnn) {
Logger::amf_sbi().debug(
"Send PDU Session Update SM Context Request to SMF (SUPI %s, PDU Session "
"ID %d, %s)",
supi.c_str(), psc.get()->pdu_session_id, smf_addr.c_str());
supi.c_str(), psc.get()->pdu_session_id,
psc.get()->smf_info.addr.c_str());
std::string smf_ip_addr = {};
std::string remote_uri = {};
// remove http port from the URI if existed
std::size_t found_port = smf_addr.find(":");
if (found_port != std::string::npos)
smf_ip_addr = smf_addr.substr(0, found_port - 1);
else
smf_ip_addr = smf_addr;
std::size_t found = psc.get()->smf_context_location.find(smf_ip_addr);
if (found != std::string::npos)
remote_uri = psc.get()->smf_context_location + "/modify";
else
remote_uri = smf_addr + psc.get()->smf_context_location + "/modify";
if (!amf_cfg.get_smf_pdu_session_context_uri(psc, remote_uri)) {
Logger::amf_sbi().error("Could not find Nsmf_PDUSession URI");
return;
}
remote_uri += NSMF_PDU_SESSION_MODIFY;
Logger::amf_sbi().debug("SMF URI: %s", remote_uri.c_str());
......@@ -489,21 +454,16 @@ void amf_sbi::handle_pdu_session_initial_request(
"Handle PDU Session Establishment Request (SUPI %s, PDU Session ID %d)",
supi.c_str(), psc.get()->pdu_session_id);
// remove http port from the URI if existed
std::string smf_ip_addr = {};
std::size_t found_port = smf_addr.find(":");
if (found_port != std::string::npos)
smf_ip_addr = smf_addr.substr(0, found_port);
else
smf_ip_addr = smf_addr;
// provide http2 port if enabled
// Provide http2 port if enabled
std::string amf_port = to_string(amf_cfg.sbi.port);
if (amf_cfg.support_features.use_http2)
amf_port = to_string(amf_cfg.sbi_http2_port);
// TODO: Remove hardcoded values
std::string remote_uri = smf_ip_addr + ":" + smf_port + "/nsmf-pdusession/" +
smf_api_version + "/sm-contexts";
std::string remote_uri =
amf_cfg.get_smf_pdu_session_base_uri(smf_addr, smf_port, smf_api_version);
Logger::amf_sbi().debug("SMF URI: %s", remote_uri.c_str());
nlohmann::json pdu_session_establishment_request;
pdu_session_establishment_request["supi"] = supi.c_str();
pdu_session_establishment_request["pei"] = "imei-200000000000001";
......@@ -559,18 +519,14 @@ void amf_sbi::handle_itti_message(
return;
}
string smf_addr = {};
std::string smf_api_version = {};
std::string remote_uri = {};
if (!psc.get()->smf_available) {
Logger::amf_sbi().error("No SMF is available for this PDU session");
} else {
smf_addr = psc->smf_addr;
smf_api_version = psc->smf_api_version;
if (!amf_cfg.get_smf_pdu_session_context_uri(psc, remote_uri)) {
Logger::amf_sbi().error("Could not find Nsmf_PDUSession URI");
return;
}
remote_uri += NSMF_PDU_SESSION_RELEASE;
Logger::amf_sbi().debug("SMF URI: %s", remote_uri.c_str());
remote_uri = psc.get()->smf_context_location + "/release";
nlohmann::json pdu_session_release_request;
pdu_session_release_request["supi"] = itti_msg.supi.c_str();
pdu_session_release_request["dnn"] = psc.get()->dnn.c_str();
......@@ -586,10 +542,6 @@ void amf_sbi::handle_itti_message(
nlohmann::json response_json = {};
uint32_t response_code = 0;
// curl_http_client(
// remote_uri, json_part, "", "", itti_msg.supi,
// psc.get()->pdu_session_id, http_version);
curl_http_client(
remote_uri, "POST", msg_body, response_json, response_code, http_version);
......@@ -623,7 +575,7 @@ void amf_sbi::handle_itti_message(itti_sbi_notify_subscribed_event& itti_msg) {
report["reachability"] = r.getReachability().get_value();
}
// timestamp
// Timestamp
std::time_t time_epoch_ntp = std::time(nullptr);
uint64_t tv_ntp = time_epoch_ntp + SECONDS_SINCE_FIRST_EPOCH;
report["timeStamp"] = std::to_string(tv_ntp);
......@@ -1233,7 +1185,7 @@ void amf_sbi::curl_http_client(
location_pos + 10, crlf_pos - (location_pos + 10));
Logger::amf_sbi().info(
"Location of the created SMF context: %s", location.c_str());
psc.get()->smf_context_location = location;
psc.get()->smf_info.context_location = location;
}
}
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file amf_sbi.hpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _AMF_SBI_H_
#define _AMF_SBI_H_
......@@ -161,14 +154,13 @@ class amf_sbi {
* @param [const std::string&] supi: SUPI
* @param [std::shared_ptr<pdu_session_context>&] psc: Pointer to the PDU
* Session Context
* @param [const std::string&] smf_addr: SMF's Address
* @param [bstring] sm_msg: SM message
* @param [const std::string&] dnn: DNN
* @return void
*/
void send_pdu_session_update_sm_context_request(
const std::string& supi, std::shared_ptr<pdu_session_context>& psc,
const std::string& smf_addr, bstring sm_msg, const std::string& dnn);
bstring sm_msg, const std::string& dnn);
/*
* Select SMF from the configuration file
......
......@@ -137,4 +137,8 @@ static const std::vector<std::string> n2_sm_info_type_e2str = {
"HANDOVER_REQ_ACK", "HANDOVER_RES_ALLOC_FAIL",
"SECONDARY_RAT_USAGE"};
#define NSMF_PDU_SESSION_CREATE "/sm-contexts"
#define NSMF_PDU_SESSION_MODIFY "/modify"
#define NSMF_PDU_SESSION_RELEASE "/release"
#endif
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file gNB_context.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _GNB_CONTEXT_H_
#define _GNB_CONTEXT_H_
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file nas_context.cpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "nas_context.hpp"
//------------------------------------------------------------------------------
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file nas_context.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _AMF_NAS_CONTEXT_H_
#define _AMF_NAS_CONTEXT_H_
......@@ -59,8 +52,8 @@ static const std::vector<std::string> _5gmm_state_e2str = {
typedef enum { CM_IDLE = 0, CM_CONNECTED } cm_state_t;
static const std::vector<std::string> cm_state_e2str = {"CM_IDLE",
"CM_CONNECTED"};
static const std::vector<std::string> cm_state_e2str = {
"CM_IDLE", "CM_CONNECTED"};
class nas_context {
public:
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file nas_security_context.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _NAS_SECURITY_CONTEXT_H_
#define _NAS_SECURITY_CONTEXT_H_
......
......@@ -19,18 +19,10 @@
* contact@openairinterface.org
*/
/*! \file pdu_session_context.cpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "pdu_session_context.hpp"
//------------------------------------------------------------------------------
pdu_session_context::pdu_session_context() {
smf_available = false;
isn2sm_avaliable = false;
isn1sm_avaliable = false;
ran_ue_ngap_id = 0;
......@@ -41,7 +33,10 @@ pdu_session_context::pdu_session_context() {
isn2sm_avaliable = false;
// bstring n1sm;
isn1sm_avaliable = false;
smf_available = false;
smf_info.info_available = false;
smf_info.addr = {};
smf_info.api_version = "v1";
smf_info.port = "80";
snssai = {};
plmn = {};
is_ho_accepted = false;
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file pdu_session_context.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _PDU_SESSION_CONTEXT_H_
#define _PDU_SESSION_CONTEXT_H_
......@@ -34,6 +27,14 @@
#include "amf.hpp"
#include "bstrlib.h"
typedef struct smf_context_info_s {
bool info_available;
std::string addr;
std::string port;
std::string api_version;
std::string context_location;
} smf_context_info_t;
class pdu_session_context {
public:
pdu_session_context();
......@@ -48,14 +49,10 @@ class pdu_session_context {
bstring n1sm;
bool isn1sm_avaliable;
std::string dnn;
std::string smf_addr;
std::string smf_port;
std::string smf_api_version;
bool smf_available;
std::string location;
smf_context_info_t smf_info;
snssai_t snssai;
plmn_t plmn;
std::string smf_context_location;
bool is_ho_accepted;
};
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file security_def.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _SECURITY_DEF_H_
#define _SECURITY_DEF_H_
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file ue_context.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _UE_CONTEXT_H_
#define _UE_CONTEXT_H_
......@@ -69,8 +62,7 @@ class ue_context {
Tai_t tai;
std::string supi;
uint32_t tmsi;
// pdu session id <-> pdu_session_contex: map stores all pdu sessions for this
// UE
// pdu session id <-> pdu_session_contex
std::map<std::uint8_t, std::shared_ptr<pdu_session_context>> pdu_sessions;
mutable std::shared_mutex m_pdu_session;
};
......
......@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file ue_ngap_context.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _UE_NGAP_CONTEXT_H_
#define _UE_NGAP_CONTEXT_H_
......
......@@ -101,7 +101,7 @@ typedef enum {
SBI_N1_MESSAGE_NOTIFICATION,
SBI_N1N2_MESSAGE_SUBSCRIBE,
SBI_N1N2_MESSAGE_UNSUBSCRIBE,
HANDOVER_REQUIRED,
HANDOVER_REQUIRED_MSG,
HANDOVER_REQUEST_ACK,
HANDOVER_NOTIFY,
UPLINK_RAN_STATUS_TRANSFER,
......
......@@ -246,7 +246,7 @@ class itti_ue_radio_capability_indication : public itti_msg_n2 {
class itti_handover_required : public itti_msg_n2 {
public:
itti_handover_required(const task_id_t origin, const task_id_t destination)
: itti_msg_n2(HANDOVER_REQUIRED, origin, destination) {
: itti_msg_n2(HANDOVER_REQUIRED_MSG, origin, destination) {
handoverReq = nullptr;
}
itti_handover_required(const itti_handover_required& i) : itti_msg_n2(i) {}
......
......@@ -51,6 +51,7 @@ bool fqdn::resolve(
return true;
}
} catch (std::exception& e) {
// TODO: Remove this line so that AMF can re-try several times
throw std::runtime_error(
"Cannot resolve a DNS name " + std::string(e.what()));
return false;
......
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