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
lizhongxiao
OpenXG-RAN
Commits
5637b62e
Commit
5637b62e
authored
Feb 16, 2022
by
Melissa Elkadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return in gNB if pdu_len is less than cast length
This is what we did in the NRUE for NSA mode
parent
c917352d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+20
-3
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
5637b62e
...
...
@@ -220,9 +220,6 @@ int nr_process_mac_pdu(module_id_t module_idP,
LOG_D
(
NR_MAC
,
"In %s: received UL-SCH sub-PDU with LCID 0x%x in %d.%d (remaining PDU length %d)
\n
"
,
__func__
,
rx_lcid
,
frameP
,
slot
,
pdu_len
);
if
(
pdu_len
<
7
)
{
break
;
}
unsigned
char
*
ce_ptr
;
int
n_Lcg
=
0
;
...
...
@@ -264,9 +261,13 @@ int nr_process_mac_pdu(module_id_t module_idP,
case
UL_SCH_LCID_L_TRUNCATED_BSR
:
//38.321 section 6.1.3.1
//variable length
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
0
;
mac_ce_len
|=
(
uint16_t
)((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
L
;
mac_subheader_len
=
2
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
F
){
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_LONG
))
return
0
;
mac_ce_len
|=
(
uint16_t
)(((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L2
)
<<
8
;
mac_subheader_len
=
3
;
}
...
...
@@ -343,9 +344,13 @@ int nr_process_mac_pdu(module_id_t module_idP,
case
UL_SCH_LCID_MULTI_ENTRY_PHR_1_OCT
:
//38.321 section 6.1.3.9
// varialbe length
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
0
;
mac_ce_len
|=
(
uint16_t
)((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
L
;
mac_subheader_len
=
2
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
F
){
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_LONG
))
return
0
;
mac_ce_len
|=
(
uint16_t
)(((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L2
)
<<
8
;
mac_subheader_len
=
3
;
}
...
...
@@ -355,9 +360,13 @@ int nr_process_mac_pdu(module_id_t module_idP,
case
UL_SCH_LCID_MULTI_ENTRY_PHR_4_OCT
:
//38.321 section 6.1.3.9
// varialbe length
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
0
;
mac_ce_len
|=
(
uint16_t
)((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
L
;
mac_subheader_len
=
2
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
F
){
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_LONG
))
return
0
;
mac_ce_len
|=
(
uint16_t
)(((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L2
)
<<
8
;
mac_subheader_len
=
3
;
}
...
...
@@ -371,8 +380,12 @@ int nr_process_mac_pdu(module_id_t module_idP,
case
UL_SCH_LCID_SRB1
:
case
UL_SCH_LCID_SRB2
:
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
0
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
F
){
//mac_sdu_len |= (uint16_t)(((NR_MAC_SUBHEADER_LONG *)pduP)->L2)<<8;
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
0
;
mac_subheader_len
=
3
;
mac_sdu_len
=
((
uint16_t
)(((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L1
&
0x7f
)
<<
8
)
|
((
uint16_t
)((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L2
&
0xff
);
...
...
@@ -456,8 +469,12 @@ int nr_process_mac_pdu(module_id_t module_idP,
case
UL_SCH_LCID_DTCH
:
// check if LCID is valid at current time.
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_SHORT
))
return
0
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pduP
)
->
F
)
{
// mac_sdu_len |= (uint16_t)(((NR_MAC_SUBHEADER_LONG *)pduP)->L2)<<8;
if
(
pdu_len
<
sizeof
(
NR_MAC_SUBHEADER_LONG
))
return
0
;
mac_subheader_len
=
3
;
mac_sdu_len
=
((
uint16_t
)(((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L1
&
0x7f
)
<<
8
)
|
((
uint16_t
)((
NR_MAC_SUBHEADER_LONG
*
)
pduP
)
->
L2
&
0xff
);
...
...
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