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
0ad52e2d
Commit
0ad52e2d
authored
Feb 25, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support UPF - FQDN
parent
a3f1f8c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
src/smf_app/smf_pfcp_association.cpp
src/smf_app/smf_pfcp_association.cpp
+22
-0
No files found.
src/smf_app/smf_pfcp_association.cpp
View file @
0ad52e2d
...
...
@@ -134,6 +134,28 @@ bool pfcp_associations::add_association(
sa
->
function_features
.
first
=
true
;
sa
->
function_features
.
second
=
function_features
;
}
else
{
if
(
node_id
.
node_id_type
==
pfcp
::
NODE_ID_TYPE_FQDN
)
{
Logger
::
smf_app
().
info
(
"FQDN, NODE ID %s"
,
node_id
.
fqdn
.
c_str
());
}
struct
hostent
*
record
=
gethostbyname
(
node_id
.
fqdn
.
c_str
());
if
(
record
==
NULL
)
{
Logger
::
smf_app
().
info
(
"Add association with %s: cannot resolve,"
" retrying later"
,
node_id
.
fqdn
.
c_str
());
return
false
;
}
if
(
record
->
h_addrtype
==
AF_INET
)
{
in_addr
*
address
=
(
struct
in_addr
*
)
record
->
h_addr
;
node_id
.
node_id_type
=
pfcp
::
NODE_ID_TYPE_IPV4_ADDRESS
;
node_id
.
u1
.
ipv4_address
=
*
address
;
}
else
if
(
record
->
h_addrtype
==
AF_INET6
)
{
// TODO
return
false
;
}
else
{
return
false
;
}
restore_n4_sessions
=
false
;
pfcp_association
*
association
=
new
pfcp_association
(
node_id
,
recovery_time_stamp
,
function_features
);
...
...
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