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
alex037yang
OpenXG-RAN
Commits
3ec3d2a6
Commit
3ec3d2a6
authored
Jan 11, 2017
by
calvin wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix mistake logical and bitwise operators
parent
f3b84e74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
openair3/NAS/COMMON/API/NETWORK/nas_message.c
openair3/NAS/COMMON/API/NETWORK/nas_message.c
+24
-24
No files found.
openair3/NAS/COMMON/API/NETWORK/nas_message.c
View file @
3ec3d2a6
...
@@ -992,12 +992,12 @@ static int _nas_message_decrypt(
...
@@ -992,12 +992,12 @@ static int _nas_message_decrypt(
case
NAS_SECURITY_ALGORITHMS_EEA1
:
{
case
NAS_SECURITY_ALGORITHMS_EEA1
:
{
if
(
direction
==
SECU_DIRECTION_UPLINK
)
{
if
(
direction
==
SECU_DIRECTION_UPLINK
)
{
count
=
0x00000000
|
|
count
=
0x00000000
|
((
emm_security_context
->
ul_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
|
((
emm_security_context
->
ul_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
(
emm_security_context
->
ul_count
.
seq_num
&
0x000000FF
);
(
emm_security_context
->
ul_count
.
seq_num
&
0x000000FF
);
}
else
{
}
else
{
count
=
0x00000000
|
|
count
=
0x00000000
|
((
emm_security_context
->
dl_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
|
((
emm_security_context
->
dl_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
(
emm_security_context
->
dl_count
.
seq_num
&
0x000000FF
);
(
emm_security_context
->
dl_count
.
seq_num
&
0x000000FF
);
}
}
...
@@ -1026,12 +1026,12 @@ static int _nas_message_decrypt(
...
@@ -1026,12 +1026,12 @@ static int _nas_message_decrypt(
case
NAS_SECURITY_ALGORITHMS_EEA2
:
{
case
NAS_SECURITY_ALGORITHMS_EEA2
:
{
if
(
direction
==
SECU_DIRECTION_UPLINK
)
{
if
(
direction
==
SECU_DIRECTION_UPLINK
)
{
count
=
0x00000000
|
|
count
=
0x00000000
|
((
emm_security_context
->
ul_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
|
((
emm_security_context
->
ul_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
(
emm_security_context
->
ul_count
.
seq_num
&
0x000000FF
);
(
emm_security_context
->
ul_count
.
seq_num
&
0x000000FF
);
}
else
{
}
else
{
count
=
0x00000000
|
|
count
=
0x00000000
|
((
emm_security_context
->
dl_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
|
((
emm_security_context
->
dl_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
(
emm_security_context
->
dl_count
.
seq_num
&
0x000000FF
);
(
emm_security_context
->
dl_count
.
seq_num
&
0x000000FF
);
}
}
...
@@ -1154,12 +1154,12 @@ static int _nas_message_encrypt(
...
@@ -1154,12 +1154,12 @@ static int _nas_message_encrypt(
case
NAS_SECURITY_ALGORITHMS_EEA1
:
{
case
NAS_SECURITY_ALGORITHMS_EEA1
:
{
if
(
direction
==
SECU_DIRECTION_UPLINK
)
{
if
(
direction
==
SECU_DIRECTION_UPLINK
)
{
count
=
0x00000000
|
|
count
=
0x00000000
|
((
emm_security_context
->
ul_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
|
((
emm_security_context
->
ul_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
(
emm_security_context
->
ul_count
.
seq_num
&
0x000000FF
);
(
emm_security_context
->
ul_count
.
seq_num
&
0x000000FF
);
}
else
{
}
else
{
count
=
0x00000000
|
|
count
=
0x00000000
|
((
emm_security_context
->
dl_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
|
((
emm_security_context
->
dl_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
(
emm_security_context
->
dl_count
.
seq_num
&
0x000000FF
);
(
emm_security_context
->
dl_count
.
seq_num
&
0x000000FF
);
}
}
...
@@ -1185,12 +1185,12 @@ static int _nas_message_encrypt(
...
@@ -1185,12 +1185,12 @@ static int _nas_message_encrypt(
case
NAS_SECURITY_ALGORITHMS_EEA2
:
{
case
NAS_SECURITY_ALGORITHMS_EEA2
:
{
if
(
direction
==
SECU_DIRECTION_UPLINK
)
{
if
(
direction
==
SECU_DIRECTION_UPLINK
)
{
count
=
0x00000000
|
|
count
=
0x00000000
|
((
emm_security_context
->
ul_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
|
((
emm_security_context
->
ul_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
(
emm_security_context
->
ul_count
.
seq_num
&
0x000000FF
);
(
emm_security_context
->
ul_count
.
seq_num
&
0x000000FF
);
}
else
{
}
else
{
count
=
0x00000000
|
|
count
=
0x00000000
|
((
emm_security_context
->
dl_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
|
((
emm_security_context
->
dl_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
(
emm_security_context
->
dl_count
.
seq_num
&
0x000000FF
);
(
emm_security_context
->
dl_count
.
seq_num
&
0x000000FF
);
}
}
...
@@ -1299,12 +1299,12 @@ static uint32_t _nas_message_get_mac(
...
@@ -1299,12 +1299,12 @@ static uint32_t _nas_message_get_mac(
int
i
,
bytes
=
0
;
int
i
,
bytes
=
0
;
if
(
direction
==
SECU_DIRECTION_UPLINK
)
{
if
(
direction
==
SECU_DIRECTION_UPLINK
)
{
count
=
0x00000000
|
|
count
=
0x00000000
|
((
emm_security_context
->
ul_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
|
((
emm_security_context
->
ul_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
(
emm_security_context
->
ul_count
.
seq_num
&
0x000000FF
);
(
emm_security_context
->
ul_count
.
seq_num
&
0x000000FF
);
}
else
{
}
else
{
count
=
0x00000000
|
|
count
=
0x00000000
|
((
emm_security_context
->
dl_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
|
((
emm_security_context
->
dl_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
(
emm_security_context
->
dl_count
.
seq_num
&
0x000000FF
);
(
emm_security_context
->
dl_count
.
seq_num
&
0x000000FF
);
}
}
...
@@ -1367,12 +1367,12 @@ static uint32_t _nas_message_get_mac(
...
@@ -1367,12 +1367,12 @@ static uint32_t _nas_message_get_mac(
uint32_t
*
mac32
;
uint32_t
*
mac32
;
if
(
direction
==
SECU_DIRECTION_UPLINK
)
{
if
(
direction
==
SECU_DIRECTION_UPLINK
)
{
count
=
0x00000000
|
|
count
=
0x00000000
|
((
emm_security_context
->
ul_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
|
((
emm_security_context
->
ul_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
(
emm_security_context
->
ul_count
.
seq_num
&
0x000000FF
);
(
emm_security_context
->
ul_count
.
seq_num
&
0x000000FF
);
}
else
{
}
else
{
count
=
0x00000000
|
|
count
=
0x00000000
|
((
emm_security_context
->
dl_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
|
((
emm_security_context
->
dl_count
.
overflow
&&
0x0000FFFF
)
<<
8
)
|
(
emm_security_context
->
dl_count
.
seq_num
&
0x000000FF
);
(
emm_security_context
->
dl_count
.
seq_num
&
0x000000FF
);
}
}
...
...
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