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
7475d3aa
Commit
7475d3aa
authored
Jun 01, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore SD for Standardized SST value
parent
677695d0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
12 deletions
+26
-12
src/amf-app/amf_config.cpp
src/amf-app/amf_config.cpp
+5
-1
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+16
-9
src/nas/ies/NSSAI.cpp
src/nas/ies/NSSAI.cpp
+1
-1
src/nas/ies/struct.hpp
src/nas/ies/struct.hpp
+4
-1
No files found.
src/amf-app/amf_config.cpp
View file @
7475d3aa
...
...
@@ -228,7 +228,11 @@ int amf_config::load(const std::string& config_file) {
slice_item
.
lookupValue
(
AMF_CONFIG_STRING_SD
,
sd
);
try
{
slice
.
sst
=
std
::
stoi
(
sst
);
slice
.
sd
=
std
::
stoi
(
sd
);
slice
.
sd
=
SD_NO_VALUE
;
// Default value
// Get SD if available for non standardized SST
if
(
slice
.
sst
>
SST_MAX_STANDARDIZED_VALUE
)
{
if
(
!
sd
.
empty
())
slice
.
sd
=
std
::
stoi
(
sd
);
}
}
catch
(
const
std
::
exception
&
err
)
{
Logger
::
amf_app
().
error
(
"Invalid SST/SD"
);
}
...
...
src/amf-app/amf_n1.cpp
View file @
7475d3aa
...
...
@@ -261,7 +261,7 @@ void amf_n1::handle_itti_message(itti_downlink_nas_transfer& itti_msg) {
}
itti_modify_request_msg
->
s_NSSAI
.
setSd
(
psc
->
snssai
.
sD
);
itti_modify_request_msg
->
s_NSSAI
.
setSst
(
std
::
to_string
(
psc
->
snssai
.
sST
)
);
itti_modify_request_msg
->
s_NSSAI
.
setSst
(
psc
->
snssai
.
sST
);
int
ret
=
itti_inst
->
send_msg
(
itti_modify_request_msg
);
if
(
0
!=
ret
)
{
...
...
@@ -4134,12 +4134,15 @@ bool amf_n1::check_requested_nssai(const std::shared_ptr<nas_context>& nc) {
bool
found_nssai
=
false
;
for
(
auto
s
:
p
.
slice_list
)
{
std
::
string
sd
=
std
::
to_string
(
s
.
sd
);
if
((
s
.
sst
==
n
.
sst
)
and
(
s
.
sd
==
n
.
sd
))
{
if
(
s
.
sst
==
n
.
sst
)
{
if
((
s
.
sst
<=
SST_MAX_STANDARDIZED_VALUE
)
or
(
s
.
sd
==
n
.
sd
))
{
found_nssai
=
true
;
Logger
::
amf_n1
().
debug
(
"Found S-NSSAI (SST %d, SD %d)"
,
s
.
sst
,
n
.
sd
);
Logger
::
amf_n1
().
debug
(
"Found S-NSSAI (SST %d, SD %d)"
,
s
.
sst
,
n
.
sd
);
break
;
}
}
}
if
(
!
found_nssai
)
{
result
=
false
;
break
;
...
...
@@ -4184,7 +4187,8 @@ bool amf_n1::check_subscribed_nssai(
// Check with default subscribed NSSAIs
for
(
auto
n
:
nssai
.
getDefaultSingleNssais
())
{
if
(
s
.
sst
==
n
.
getSst
())
{
if
((
n
.
sdIsSet
()
and
(
n
.
getSd
().
compare
(
sd
)
==
0
))
or
if
((
s
.
sst
<=
SST_MAX_STANDARDIZED_VALUE
)
or
(
n
.
sdIsSet
()
and
(
n
.
getSd
().
compare
(
sd
)
==
0
))
or
(
!
n
.
sdIsSet
()
and
sd
.
empty
()))
{
common_snssais
.
push_back
(
n
);
Logger
::
amf_n1
().
debug
(
...
...
@@ -4197,7 +4201,8 @@ bool amf_n1::check_subscribed_nssai(
// check with other subscribed NSSAIs
for
(
auto
n
:
nssai
.
getSingleNssais
())
{
if
(
s
.
sst
==
n
.
getSst
())
{
if
((
n
.
sdIsSet
()
and
(
n
.
getSd
().
compare
(
sd
)
==
0
))
or
if
((
s
.
sst
<=
SST_MAX_STANDARDIZED_VALUE
)
or
(
n
.
sdIsSet
()
and
(
n
.
getSd
().
compare
(
sd
)
==
0
))
or
(
!
n
.
sdIsSet
()
and
sd
.
empty
()))
{
common_snssais
.
push_back
(
n
);
Logger
::
amf_n1
().
debug
(
...
...
@@ -4218,7 +4223,8 @@ bool amf_n1::check_subscribed_nssai(
for
(
auto
s
:
p
.
slice_list
)
{
std
::
string
sd
=
std
::
to_string
(
s
.
sd
);
if
(
s
.
sst
==
n
.
getSst
())
{
if
((
n
.
sdIsSet
()
and
(
n
.
getSd
().
compare
(
sd
)
==
0
))
or
if
((
s
.
sst
<=
SST_MAX_STANDARDIZED_VALUE
)
or
(
n
.
sdIsSet
()
and
(
n
.
getSd
().
compare
(
sd
)
==
0
))
or
(
!
n
.
sdIsSet
()
and
sd
.
empty
()))
{
found_nssai
=
true
;
Logger
::
amf_n1
().
debug
(
...
...
@@ -4240,7 +4246,8 @@ bool amf_n1::check_subscribed_nssai(
for
(
auto
s
:
p
.
slice_list
)
{
std
::
string
sd
=
std
::
to_string
(
s
.
sd
);
if
(
s
.
sst
==
n
.
getSst
())
{
if
((
n
.
sdIsSet
()
and
(
n
.
getSd
().
compare
(
sd
)
==
0
))
or
if
((
s
.
sst
<=
SST_MAX_STANDARDIZED_VALUE
)
or
(
n
.
sdIsSet
()
and
(
n
.
getSd
().
compare
(
sd
)
==
0
))
or
(
!
n
.
sdIsSet
()
and
sd
.
empty
()))
{
found_nssai
=
true
;
Logger
::
amf_n1
().
debug
(
...
...
src/nas/ies/NSSAI.cpp
View file @
7475d3aa
...
...
@@ -47,7 +47,7 @@ NSSAI::NSSAI(const uint8_t iei, std::vector<struct SNSSAI_s> nssai) {
length
=
0
;
S_NSSAI
.
assign
(
nssai
.
begin
(),
nssai
.
end
());
for
(
int
i
=
0
;
i
<
nssai
.
size
();
i
++
)
{
length
+=
2
;
// for sst
length
+=
2
;
//
1 for IEI and 1
for sst
if
(
nssai
[
i
].
sd
!=
-
1
)
length
+=
3
;
if
(
nssai
[
i
].
mHplmnSst
!=
-
1
)
length
+=
1
;
if
(
nssai
[
i
].
mHplmnSd
!=
-
1
)
length
+=
3
;
...
...
src/nas/ies/struct.hpp
View file @
7475d3aa
...
...
@@ -43,13 +43,16 @@ namespace nas {
typedef
struct
SNSSAI_s
{
uint8_t
sst
;
int32_t
sd
;
int
32
_t
mHplmnSst
;
int
8
_t
mHplmnSst
;
int32_t
mHplmnSd
;
uint8_t
length
;
SNSSAI_s
&
operator
=
(
const
struct
SNSSAI_s
&
s
)
{
sst
=
s
.
sst
;
sd
=
s
.
sd
;
mHplmnSst
=
s
.
mHplmnSst
;
mHplmnSd
=
s
.
mHplmnSd
;
length
=
s
.
length
;
return
*
this
;
}
}
SNSSAI_t
;
...
...
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