Commit 2cb06da6 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Merge branch 'test_orion' into 'pfcp_source_port_8805'

Test orion

See merge request oai/cn5g/oai-cn5g-smf!20
parents ccb080e2 ad2259d6
......@@ -49,7 +49,7 @@ pfcp_l4_stack::pfcp_l4_stack(const string& ip_address, const unsigned short port
timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
seq_num = (uint32_t)ts.tv_nsec & 0x7FFFFFFF;
seq_num = 0; //(uint32_t)ts.tv_nsec & 0x7FFFFFFF;
restart_counter = 0;
udp_s_8805.start_receive(this, sched_params);
udp_s_allocated.start_receive(this, sched_params);
......
......@@ -215,8 +215,13 @@ smf_n4::smf_n4()
std::chrono::system_clock::now();
std::time_t now_c = std::chrono::system_clock::to_time_t(now);
std::time_t ellapsed = now_c - time_epoch;
recovery_time_stamp = ellapsed;
//recovery_time_stamp = ellapsed;
//test new way to calculate recovery_time_stamp
std::time_t time_epoch_ntp = std::time(nullptr);
uint64_t tv_ntp = time_epoch_ntp + SECONDS_SINCE_FIRST_EPOCH;
recovery_time_stamp = tv_ntp;
// TODO may load this from config
cp_function_features = { };
cp_function_features.ovrl = 0;
......@@ -560,9 +565,12 @@ void smf_n4::send_n4_msg(itti_n4_session_report_response &i) {
//------------------------------------------------------------------------------
void smf_n4::send_heartbeat_request(std::shared_ptr<pfcp_association> &a) {
std::time_t time_epoch = std::time(nullptr);
uint64_t tv_ntp = time_epoch + SECONDS_SINCE_FIRST_EPOCH;
pfcp::pfcp_heartbeat_request h = { };
pfcp::recovery_time_stamp_t r = { .recovery_time_stamp =
(uint32_t) recovery_time_stamp };
(uint32_t) tv_ntp };
h.set(r);
pfcp::node_id_t &node_id = a->node_id;
......
......@@ -1346,9 +1346,11 @@ void session_release_sm_context_procedure::handle_itti_msg(
problem_details.setCause(
pdu_session_application_error_e2str[PDU_SESSION_APPLICATION_ERROR_NETWORK_FAILURE]);
//trigger to send reply to AMF
/*
smf_app_inst->trigger_http_response(
http_status_code_e::HTTP_STATUS_CODE_406_NOT_ACCEPTABLE,
n11_triggered_pending->pid, N11_SESSION_RELEASE_SM_CONTEXT_RESPONSE);
http_status_code_e::HTTP_STATUS_CODE_406_NOT_ACCEPTABLE,
n11_triggered_pending->pid, N11_SESSION_RELEASE_SM_CONTEXT_RESPONSE);
*/
}
//TODO:
......
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