Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
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
spbro
OpenXG-RAN
Commits
74c639f8
Commit
74c639f8
authored
Jun 28, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send NAS NSSAI SD only if configured, show UICC DNN/SST/SD info
parent
015c4265
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
openair3/NAS/NR_UE/nr_nas_msg_sim.c
openair3/NAS/NR_UE/nr_nas_msg_sim.c
+10
-6
openair3/UICC/usim_interface.c
openair3/UICC/usim_interface.c
+5
-2
No files found.
openair3/NAS/NR_UE/nr_nas_msg_sim.c
View file @
74c639f8
...
...
@@ -733,16 +733,20 @@ static void generatePduSessionEstablishRequest(int Mod_id, uicc_t * uicc, as_nas
mm_msg
->
uplink_nas_transport
.
pdusessionid
=
10
;
mm_msg
->
uplink_nas_transport
.
requesttype
=
1
;
size
+=
3
;
mm_msg
->
uplink_nas_transport
.
snssai
.
length
=
4
;
const
bool
has_nssai_sd
=
uicc
->
nssai_sd
!=
0xffffff
;
// 0xffffff means "no SD", TS 23.003
const
size_t
nssai_len
=
has_nssai_sd
?
4
:
1
;
mm_msg
->
uplink_nas_transport
.
snssai
.
length
=
nssai_len
;
//Fixme: it seems there are a lot of memory errors in this: this value was on the stack,
// but pushed in a itti message to another thread
// this kind of error seems in many places in 5G NAS
mm_msg
->
uplink_nas_transport
.
snssai
.
value
=
calloc
(
1
,
4
);
mm_msg
->
uplink_nas_transport
.
snssai
.
value
=
calloc
(
1
,
nssai_len
);
mm_msg
->
uplink_nas_transport
.
snssai
.
value
[
0
]
=
uicc
->
nssai_sst
;
mm_msg
->
uplink_nas_transport
.
snssai
.
value
[
1
]
=
(
uicc
->
nssai_sd
>>
16
)
&
0xFF
;
mm_msg
->
uplink_nas_transport
.
snssai
.
value
[
2
]
=
(
uicc
->
nssai_sd
>>
8
)
&
0xFF
;
mm_msg
->
uplink_nas_transport
.
snssai
.
value
[
3
]
=
(
uicc
->
nssai_sd
)
&
0xFF
;
size
+=
(
1
+
1
+
4
);
if
(
has_nssai_sd
)
{
mm_msg
->
uplink_nas_transport
.
snssai
.
value
[
1
]
=
(
uicc
->
nssai_sd
>>
16
)
&
0xFF
;
mm_msg
->
uplink_nas_transport
.
snssai
.
value
[
2
]
=
(
uicc
->
nssai_sd
>>
8
)
&
0xFF
;
mm_msg
->
uplink_nas_transport
.
snssai
.
value
[
3
]
=
(
uicc
->
nssai_sd
)
&
0xFF
;
}
size
+=
1
+
1
+
nssai_len
;
int
dnnSize
=
strlen
(
uicc
->
dnnStr
);
mm_msg
->
uplink_nas_transport
.
dnn
.
value
=
calloc
(
1
,
dnnSize
+
1
);
mm_msg
->
uplink_nas_transport
.
dnn
.
length
=
dnnSize
+
1
;
...
...
openair3/UICC/usim_interface.c
View file @
74c639f8
...
...
@@ -44,7 +44,7 @@ extern uint16_t NB_UE_INST;
{"sqn", "USIM sqn\n", 0, strptr:&uicc->sqnStr, defstrval:"000000", TYPE_STRING, 0 }, \
{"dnn", "UE dnn (apn)\n", 0, strptr:&uicc->dnnStr, defstrval:"oai", TYPE_STRING, 0 }, \
{"nssai_sst", "UE nssai\n", 0, iptr:&uicc->nssai_sst, defintval:1, TYPE_INT, 0 }, \
{"nssai_sd", "UE nssai\n", 0, iptr:&uicc->nssai_sd,
defintval:1, TYPE_INT,
0 }, \
{"nssai_sd", "UE nssai\n", 0, iptr:&uicc->nssai_sd,
defintval:0xffffff, TYPE_INT,
0 }, \
};
static
uicc_t
**
uiccArray
=
NULL
;
...
...
@@ -73,7 +73,10 @@ uicc_t *init_uicc(char *sectionName) {
// key, OPc, sqn, amf don't need to be read from the true USIM
int
ret
=
config_get
(
uicc_params
,
sizeof
(
uicc_params
)
/
sizeof
(
paramdef_t
),
sectionName
);
AssertFatal
(
ret
>=
0
,
"configuration couldn't be performed for uicc name: %s"
,
sectionName
);
LOG_I
(
SIM
,
"UICC simulation: IMSI=%s, Ki=%s, OPc=%s
\n
"
,
uicc
->
imsiStr
,
uicc
->
keyStr
,
uicc
->
opcStr
);
LOG_I
(
SIM
,
"UICC simulation: IMSI=%s, Ki=%s, OPc=%s, DNN=%s, SST=0x%02x, SD=0x%06x
\n
"
,
uicc
->
imsiStr
,
uicc
->
keyStr
,
uicc
->
opcStr
,
uicc
->
dnnStr
,
uicc
->
nssai_sst
,
uicc
->
nssai_sd
);
to_hex
(
uicc
->
keyStr
,
uicc
->
key
,
sizeof
(
uicc
->
key
)
);
to_hex
(
uicc
->
opcStr
,
uicc
->
opc
,
sizeof
(
uicc
->
opc
)
);
to_hex
(
uicc
->
sqnStr
,
uicc
->
sqn
,
sizeof
(
uicc
->
sqn
)
);
...
...
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