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
0f94d23f
Commit
0f94d23f
authored
Feb 10, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get AMF IP address either from conf file or from PDU Session Establishment Request
parent
25833761
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+11
-5
No files found.
src/smf_app/smf_context.cpp
View file @
0f94d23f
...
...
@@ -1440,21 +1440,27 @@ void smf_context::handle_pdu_session_create_sm_context_request(
}
scf
.
get
()
->
amf_status_uri
=
smreq
->
req
.
get_sm_context_status_uri
();
// Get and Store AMF Addr
// Get and Store AMF Addr
if available
std
::
vector
<
std
::
string
>
split_result
;
std
::
string
amf_addr_str
=
{};
amf_addr_str
=
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
smf_cfg
.
amf_addr
.
ipv4_addr
)))
+
":"
+
std
::
to_string
(
smf_cfg
.
amf_addr
.
port
);
boost
::
split
(
split_result
,
scf
.
get
()
->
amf_status_uri
,
boost
::
is_any_of
(
"/"
));
if
(
split_result
.
size
()
>=
3
)
{
std
::
string
a
mf_addr_st
r
=
split_result
[
2
];
std
::
string
a
dd
r
=
split_result
[
2
];
struct
in_addr
amf_ipv4_addr
;
if
(
inet_aton
(
util
::
trim
(
a
mf_addr_st
r
).
c_str
(),
&
amf_ipv4_addr
)
==
0
)
{
if
(
inet_aton
(
util
::
trim
(
a
dd
r
).
c_str
(),
&
amf_ipv4_addr
)
==
0
)
{
Logger
::
smf_api_server
().
warn
(
"Bad IPv4 for AMF"
);
}
else
{
scf
.
get
()
->
amf_addr
=
amf_addr_str
;
sp
.
get
()
->
set_amf_addr
(
amf_addr_str
);
amf_addr_str
=
addr
;
Logger
::
smf_api_server
().
debug
(
"AMF IP Addr %s"
,
amf_addr_str
.
c_str
());
}
}
scf
.
get
()
->
amf_addr
=
amf_addr_str
;
sp
.
get
()
->
set_amf_addr
(
amf_addr_str
);
// Trigger SMF APP to send response to SMF-HTTP-API-SERVER (Step
// 5, 4.3.2.2.1 TS 23.502)
...
...
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