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
39945e8b
Unverified
Commit
39945e8b
authored
Dec 17, 2021
by
kharade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get_nwi_list_fix for no-nrf case
parent
c563f708
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
src/smf_app/smf_config.cpp
src/smf_app/smf_config.cpp
+17
-2
No files found.
src/smf_app/smf_config.cpp
View file @
39945e8b
...
@@ -1151,8 +1151,23 @@ bool smf_config::get_nwi_list_index(
...
@@ -1151,8 +1151,23 @@ bool smf_config::get_nwi_list_index(
return
false
;
return
false
;
}
}
if
(
node_id
.
node_id_type
==
pfcp
::
NODE_ID_TYPE_FQDN
)
{
if
(
node_id
.
node_id_type
==
pfcp
::
NODE_ID_TYPE_FQDN
)
{
// Resove FQDN here because, node id type is always IPV4_ADDRESS in
// upf_nwi_list
unsigned
char
buf_in_addr
[
sizeof
(
struct
in_addr
)
+
1
];
unsigned
int
upf_port
=
{
0
};
uint8_t
addr_type
=
{
0
};
std
::
string
address
=
{};
struct
in_addr
ipv4_Address
;
fqdn
::
resolve
(
node_id
.
fqdn
,
address
,
upf_port
,
addr_type
,
""
);
if
(
inet_pton
(
AF_INET
,
util
::
trim
(
address
).
c_str
(),
buf_in_addr
)
==
1
)
{
memcpy
(
&
ipv4_Address
,
buf_in_addr
,
sizeof
(
struct
in_addr
));
}
else
{
Logger
::
smf_app
().
error
(
"FQDN resolve failed for get_nwi_list_index"
);
}
for
(
int
i
=
0
;
i
<
upf_nwi_list
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
upf_nwi_list
.
size
();
i
++
)
{
if
(
node_id
.
fqdn
==
upf_nwi_list
[
i
].
upf_id
.
fqdn
)
{
if
(
ipv4_Address
.
s_addr
==
upf_nwi_list
[
i
].
upf_id
.
u1
.
ipv4_address
.
s_addr
)
{
nwi_list_index
=
i
;
nwi_list_index
=
i
;
nwi_enabled
=
true
;
nwi_enabled
=
true
;
return
true
;
return
true
;
...
@@ -1161,7 +1176,7 @@ bool smf_config::get_nwi_list_index(
...
@@ -1161,7 +1176,7 @@ bool smf_config::get_nwi_list_index(
nwi_enabled
=
false
;
nwi_enabled
=
false
;
return
false
;
return
false
;
}
}
return
tru
e
;
return
fals
e
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
...
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