Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-SMF
Commits
10639778
Commit
10639778
authored
Nov 17, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trigger Heartbeat even a PFCP association existed
parent
b9d2c02f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
src/smf_app/smf_n4.cpp
src/smf_app/smf_n4.cpp
+8
-5
src/smf_app/smf_pfcp_association.cpp
src/smf_app/smf_pfcp_association.cpp
+3
-0
No files found.
src/smf_app/smf_n4.cpp
View file @
10639778
...
...
@@ -239,7 +239,7 @@ smf_n4::smf_n4()
//------------------------------------------------------------------------------
void
smf_n4
::
handle_receive_pfcp_msg
(
pfcp_msg
&
msg
,
const
endpoint
&
remote_endpoint
)
{
Logger
::
smf_n4
().
trace
(
Logger
::
smf_n4
().
debug
(
"handle_receive_pfcp_msg msg type %d length %d"
,
msg
.
get_message_type
(),
msg
.
get_message_length
());
switch
(
msg
.
get_message_type
())
{
...
...
@@ -346,6 +346,8 @@ void smf_n4::handle_receive_association_setup_request(
bool
error
=
true
;
uint64_t
trxn_id
=
0
;
pfcp_association_setup_request
msg_ies_container
=
{};
Logger
::
smf_n4
().
debug
(
"Received N4 ASSOCIATION SETUP REQUEST"
);
msg
.
to_core_type
(
msg_ies_container
);
handle_receive_message_cb
(
msg
,
remote_endpoint
,
TASK_SMF_N4
,
error
,
trxn_id
);
...
...
@@ -353,8 +355,8 @@ void smf_n4::handle_receive_association_setup_request(
if
(
not
msg_ies_container
.
node_id
.
first
)
{
// Should be detected by lower layers
Logger
::
smf_n4
().
warn
(
"Received N4 ASSOCIATION SETUP REQUEST without node id IE
!
, ignore "
"message"
);
"Received N4 ASSOCIATION SETUP REQUEST without node id IE, ignore "
"message
!
"
);
return
;
}
if
(
not
msg_ies_container
.
recovery_time_stamp
.
first
)
{
...
...
@@ -733,7 +735,8 @@ void smf_n4::send_heartbeat_request(std::shared_ptr<pfcp_association>& a) {
h
.
set
(
r
);
pfcp
::
node_id_t
&
node_id
=
a
->
node_id
;
if
(
node_id
.
node_id_type
==
pfcp
::
NODE_ID_TYPE_IPV4_ADDRESS
)
{
if
((
node_id
.
node_id_type
==
pfcp
::
NODE_ID_TYPE_IPV4_ADDRESS
)
or
(
node_id
.
node_id_type
==
pfcp
::
NODE_ID_TYPE_FQDN
))
{
a
->
timer_heartbeat
=
itti_inst
->
timer_setup
(
5
,
0
,
TASK_SMF_N4
,
TASK_SMF_N4_TIMEOUT_HEARTBEAT_REQUEST
,
a
->
hash_node_id
);
...
...
@@ -743,7 +746,7 @@ void smf_n4::send_heartbeat_request(std::shared_ptr<pfcp_association>& a) {
send_request
(
r_endpoint
,
h
,
TASK_SMF_N4
,
a
->
trxn_id_heartbeat
);
}
else
{
Logger
::
smf_n4
().
warn
(
"TODO send_heartbeat_request() node_id IPV6
, FQDN
!"
);
Logger
::
smf_n4
().
warn
(
"TODO send_heartbeat_request() node_id IPV6!"
);
}
}
...
...
src/smf_app/smf_pfcp_association.cpp
View file @
10639778
...
...
@@ -94,6 +94,7 @@ bool pfcp_associations::add_association(
}
sa
->
recovery_time_stamp
=
recovery_time_stamp
;
sa
->
function_features
=
{};
trigger_heartbeat_request_procedure
(
sa
);
}
else
{
// Resolve FQDN to get UPF IP address if necessary
if
(
node_id
.
node_id_type
==
pfcp
::
NODE_ID_TYPE_FQDN
)
{
...
...
@@ -162,6 +163,7 @@ bool pfcp_associations::add_association(
sa
->
recovery_time_stamp
=
recovery_time_stamp
;
sa
->
function_features
.
first
=
true
;
sa
->
function_features
.
second
=
function_features
;
trigger_heartbeat_request_procedure
(
sa
);
}
else
{
if
(
node_id
.
node_id_type
==
pfcp
::
NODE_ID_TYPE_FQDN
)
{
Logger
::
smf_app
().
info
(
"Node ID Type FQDN: %s"
,
node_id
.
fqdn
.
c_str
());
...
...
@@ -233,6 +235,7 @@ bool pfcp_associations::add_association(
sa
->
recovery_time_stamp
=
recovery_time_stamp
;
sa
->
function_features
.
first
=
true
;
sa
->
function_features
.
second
=
function_features
;
trigger_heartbeat_request_procedure
(
sa
);
}
else
{
restore_n4_sessions
=
false
;
sa
=
std
::
make_shared
<
pfcp_association
>
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment