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
32deb0c7
Commit
32deb0c7
authored
Jul 15, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for FQDN
parent
9ffbf988
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+8
-14
No files found.
src/smf_app/smf_app.cpp
View file @
32deb0c7
...
...
@@ -1313,15 +1313,11 @@ bool smf_app::handle_nf_status_notification(
// UPF N4 ipv4 address/FQDN
std
::
string
upf_fqdn
=
profile
.
get
()
->
get_fqdn
();
if
(
upf_fqdn
.
empty
())
{
// Use IPv4 Addr
std
::
vector
<
struct
in_addr
>
ipv4_addrs
=
{};
profile
.
get
()
->
get_nf_ipv4_addresses
(
ipv4_addrs
);
if
(
ipv4_addrs
.
size
()
<
1
)
{
Logger
::
smf_app
().
debug
(
"No IP Addr found"
);
return
false
;
}
std
::
vector
<
struct
in_addr
>
ipv4_addrs
=
{};
profile
.
get
()
->
get_nf_ipv4_addresses
(
ipv4_addrs
);
// Use IPv4 addr first if available
if
(
ipv4_addrs
.
size
()
>=
1
)
{
bool
found
=
false
;
for
(
auto
node
:
smf_cfg
.
upfs
)
{
if
(
node
.
u1
.
ipv4_address
.
s_addr
==
ipv4_addrs
[
0
].
s_addr
)
{
...
...
@@ -1336,21 +1332,16 @@ bool smf_app::handle_nf_status_notification(
pfcp
::
node_id_t
n
=
{};
n
.
node_id_type
=
pfcp
::
NODE_ID_TYPE_IPV4_ADDRESS
;
n
.
u1
.
ipv4_address
.
s_addr
=
ipv4_addrs
[
0
].
s_addr
;
// memcpy(&n.u1.ipv4_address, &ipv4_addrs[0], sizeof(struct
// in_addr));
smf_cfg
.
upfs
.
push_back
(
n
);
upf_profile
*
upf_node_profile
=
dynamic_cast
<
upf_profile
*>
(
profile
.
get
());
start_upf_association
(
n
,
std
::
ref
(
*
upf_node_profile
));
// start_upf_association(n,
// std::static_pointer_cast<upf_profile>(profile));
}
else
{
Logger
::
smf_app
().
debug
(
"UPF node already exist (%s)"
,
inet_ntoa
(
ipv4_addrs
[
0
]));
}
}
else
{
// use FQDN
}
else
if
(
!
upf_fqdn
.
empty
())
{
// use FQDN
uint8_t
addr_type
=
{
0
};
std
::
string
address
=
{};
uint32_t
upf_port
=
{
0
};
...
...
@@ -1396,6 +1387,9 @@ bool smf_app::handle_nf_status_notification(
Logger
::
smf_app
().
debug
(
"UPF node already exist (%s)"
,
address
.
c_str
());
}
}
else
{
Logger
::
smf_app
().
debug
(
"No IP Addr/FQDN found"
);
return
false
;
}
}
}
else
{
...
...
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