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
ZhouShuya
OpenXG-RAN
Commits
6030a75a
Commit
6030a75a
authored
Oct 16, 2020
by
yaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix securityModeCommand/securityModeComplete
parent
dfa50d97
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
8 deletions
+40
-8
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+2
-2
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+12
-2
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+26
-4
No files found.
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
6030a75a
...
...
@@ -820,9 +820,9 @@ uint8_t do_NR_SecurityModeCommand(
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
securityModeCommand
->
criticalExtensions
.
choice
.
securityModeCommand
->
securityConfigSMC
.
securityAlgorithmConfig
.
integrityProtAlgorithm
=
integrityProtAlgorithm
;
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
//
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint
(
stdout
,
&
asn_DEF_NR_DL_DCCH_Message
,
(
void
*
)
&
dl_dcch_msg
);
}
//
}
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_DL_DCCH_Message
,
NULL
,
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
6030a75a
...
...
@@ -1089,9 +1089,9 @@ rrc_gNB_decode_dcch(
DCCH
,
sdu_sizeP
);
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
//
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_DCCH_Message
,
(
void
*
)
ul_dcch_msg
);
}
//
}
break
;
case
NR_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation
:
...
...
@@ -1420,6 +1420,14 @@ rrc_gNB_generate_SecurityModeCommand(
size
);
LOG_I
(
NR_RRC
,
"calling rrc_data_req :securityModeCommand
\n
"
);
#ifdef ITTI_SIM
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_GNB_SIM
,
GNB_RRC_DCCH_DATA_IND
);
GNB_RRC_DCCH_DATA_IND
(
message_p
).
rbid
=
DCCH
;
GNB_RRC_DCCH_DATA_IND
(
message_p
).
sdu
=
(
uint8_t
*
)
buffer
;
GNB_RRC_DCCH_DATA_IND
(
message_p
).
size
=
size
;
itti_send_msg_to_task
(
TASK_RRC_UE_SIM
,
ctxt_pP
->
instance
,
message_p
);
#else
rrc_data_req
(
ctxt_pP
,
DCCH
,
rrc_gNB_mui
++
,
...
...
@@ -1427,6 +1435,8 @@ rrc_gNB_generate_SecurityModeCommand(
size
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
#endif
}
void
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
6030a75a
...
...
@@ -1618,9 +1618,10 @@ memset((void *)&ul_dcch_msg,0,sizeof(NR_UL_DCCH_Message_t));
}
if
(
securityModeCommand
->
criticalExtensions
.
present
==
NR_SecurityModeCommand__criticalExtensions_PR_securityModeCommand
)
{
ul_dcch_msg
.
message
.
choice
.
c1
->
choice
.
securityModeComplete
=
CALLOC
(
1
,
sizeof
(
NR_SecurityModeComplete_t
));
ul_dcch_msg
.
message
.
choice
.
c1
->
choice
.
securityModeComplete
->
rrc_TransactionIdentifier
=
securityModeCommand
->
rrc_TransactionIdentifier
;
ul_dcch_msg
.
message
.
choice
.
c1
->
choice
.
securityModeComplete
->
criticalExtensions
.
present
=
NR_SecurityModeComplete__criticalExtensions_PR_securityModeComplete
;
ul_dcch_msg
.
message
.
choice
.
c1
->
choice
.
securityModeComplete
->
criticalExtensions
.
choice
.
securityModeComplete
=
CALLOC
(
1
,
sizeof
(
NR_SecurityModeComplete_IEs_t
));
ul_dcch_msg
.
message
.
choice
.
c1
->
choice
.
securityModeComplete
->
criticalExtensions
.
choice
.
securityModeComplete
->
nonCriticalExtension
=
NULL
;
LOG_I
(
NR_RRC
,
"[UE %d] SFN/SF %d/%d: Receiving from SRB1 (DL-DCCH), encoding securityModeComplete (eNB %d), rrc_TransactionIdentifier: %ld
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
ctxt_pP
->
subframe
,
gNB_index
,
securityModeCommand
->
rrc_TransactionIdentifier
);
...
...
@@ -1632,9 +1633,9 @@ memset((void *)&ul_dcch_msg,0,sizeof(NR_UL_DCCH_Message_t));
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %jd)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
//
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_DCCH_Message
,
(
void
*
)
&
ul_dcch_msg
);
}
//
}
LOG_D
(
NR_RRC
,
"securityModeComplete Encoded %zd bits (%zd bytes)
\n
"
,
enc_rval
.
encoded
,
(
enc_rval
.
encoded
+
7
)
/
8
);
...
...
@@ -1643,6 +1644,19 @@ memset((void *)&ul_dcch_msg,0,sizeof(NR_UL_DCCH_Message_t));
}
LOG_T
(
NR_RRC
,
"
\n
"
);
#ifdef ITTI_SIM
MessageDef
*
message_p
;
uint8_t
*
message_buffer
;
message_buffer
=
itti_malloc
(
TASK_RRC_UE_SIM
,
TASK_RRC_GNB_SIM
,
(
enc_rval
.
encoded
+
7
)
/
8
);
memcpy
(
message_buffer
,
buffer
,
(
enc_rval
.
encoded
+
7
)
/
8
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_UE_SIM
,
UE_RRC_CCCH_DATA_IND
);
GNB_RRC_DCCH_DATA_IND
(
message_p
).
rbid
=
DCCH
;
GNB_RRC_DCCH_DATA_IND
(
message_p
).
sdu
=
buffer
;
GNB_RRC_DCCH_DATA_IND
(
message_p
).
size
=
(
enc_rval
.
encoded
+
7
)
/
8
;
itti_send_msg_to_task
(
TASK_RRC_GNB_SIM
,
ctxt_pP
->
instance
,
message_p
);
#else
rrc_data_req
(
ctxt_pP
,
DCCH
,
...
...
@@ -1651,6 +1665,7 @@ memset((void *)&ul_dcch_msg,0,sizeof(NR_UL_DCCH_Message_t));
(
enc_rval
.
encoded
+
7
)
/
8
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
#endif
}
else
LOG_W
(
NR_RRC
,
"securityModeCommand->criticalExtensions.present (%d) != NR_SecurityModeCommand__criticalExtensions_PR_securityModeCommand
\n
"
,
securityModeCommand
->
criticalExtensions
.
present
);
}
...
...
@@ -2225,6 +2240,13 @@ nr_rrc_ue_decode_dcch(
case
NR_DL_DCCH_MessageType__c1_PR_spare1
:
break
;
case
NR_DL_DCCH_MessageType__c1_PR_securityModeCommand
:
LOG_I
(
RRC
,
"[UE %d] Received securityModeCommand (gNB %d)
\n
"
,
ctxt_pP
->
module_id
,
gNB_indexP
);
nr_rrc_ue_process_securityModeCommand
(
ctxt_pP
,
dl_dcch_msg
->
message
.
choice
.
c1
->
choice
.
securityModeCommand
,
gNB_indexP
);
break
;
}
}
...
...
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