Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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-AMF
Commits
5cfe2151
Commit
5cfe2151
authored
Jan 15, 2022
by
kharade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SMF URI port fix
parent
0d62a2be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
src/amf-app/amf_n11.cpp
src/amf-app/amf_n11.cpp
+11
-4
No files found.
src/amf-app/amf_n11.cpp
View file @
5cfe2151
...
...
@@ -338,7 +338,7 @@ void amf_n11::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
std
::
string
smf_port
=
"80"
;
// Set to default port number
if
(
!
psc
.
get
()
->
smf_available
)
{
if
(
amf_cfg
.
support_features
.
enable_nrf_selection
)
{
if
(
!
discover_smf_from_nsi_info
(
...
...
@@ -446,13 +446,20 @@ void amf_n11::handle_pdu_session_initial_request(
"Handle PDU Session Establishment Request (SUPI %s, PDU Session ID %d)"
,
supi
.
c_str
(),
psc
.
get
()
->
pdu_session_id
);
// TODO: Remove hardcoded values
// 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
std
::
string
amf_port
=
to_string
(
amf_cfg
.
n11
.
port
);
if
(
amf_cfg
.
support_features
.
use_http2
)
amf_port
=
to_string
(
amf_cfg
.
sbi_http2_port
);
std
::
string
remote_uri
=
smf_addr
+
":"
+
smf_port
+
"/nsmf-pdusession/"
+
// TODO: Remove hardcoded values
std
::
string
remote_uri
=
smf_ip_addr
+
":"
+
smf_port
+
"/nsmf-pdusession/"
+
smf_api_version
+
"/sm-contexts"
;
nlohmann
::
json
pdu_session_establishment_request
;
pdu_session_establishment_request
[
"supi"
]
=
supi
.
c_str
();
...
...
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