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
bfae8523
Commit
bfae8523
authored
Dec 19, 2021
by
kharade
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-smf
into assoc_retry
parents
d7bf4cd8
c0de6f28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
etc/smf.conf
etc/smf.conf
+2
-2
src/smf_app/smf_config.cpp
src/smf_app/smf_config.cpp
+17
-2
No files found.
etc/smf.conf
View file @
bfae8523
...
...
@@ -51,8 +51,8 @@ SMF =
# first IPv4 address X.Y.Z.1 is reserved for GTP network device on UPF
DNN_LIST
= (
# PDU_SESSION_TYPE choice in {IPv4, IPv6, IPv4v6}
{
DNN_NI
=
"
default
"
;
PDU_SESSION_TYPE
=
"IPv4"
;
IPV4_RANGE
=
"12.1.1.2 - 12.1.1.128"
;
IPV6_PREFIX
=
"2001:1:2::/64"
},
{
DNN_NI
=
"
oai.ipv4"
;
PDU_SESSION_TYPE
=
"IPv4"
;
IPV4_RANGE
=
"12.2.1.1
- 12.2.1.128"
;
IPV6_PREFIX
=
"3001:1:2::/64"
},
{
DNN_NI
=
"
oai.ipv4
"
;
PDU_SESSION_TYPE
=
"IPv4"
;
IPV4_RANGE
=
"12.1.1.2 - 12.1.1.128"
;
IPV6_PREFIX
=
"2001:1:2::/64"
},
{
DNN_NI
=
"
default"
;
PDU_SESSION_TYPE
=
"IPv4"
;
IPV4_RANGE
=
"12.2.1.2
- 12.2.1.128"
;
IPV6_PREFIX
=
"3001:1:2::/64"
},
{
DNN_NI
=
"oai"
;
PDU_SESSION_TYPE
=
"IPv4"
;
IPV4_RANGE
=
"12.1.1.129 - 12.1.1.224"
;
IPV6_PREFIX
=
"4001:1:2::/64"
},
{
DNN_NI
=
"ims"
;
PDU_SESSION_TYPE
=
"IPv4v6"
;
IPV4_RANGE
=
"12.2.1.129 - 12.2.1.224"
;
IPV6_PREFIX
=
"5001:1:2::/64"
}
);
...
...
src/smf_app/smf_config.cpp
View file @
bfae8523
...
...
@@ -1151,8 +1151,23 @@ bool smf_config::get_nwi_list_index(
return
false
;
}
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
++
)
{
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_enabled
=
true
;
return
true
;
...
...
@@ -1161,7 +1176,7 @@ bool smf_config::get_nwi_list_index(
nwi_enabled
=
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