Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
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
Libraries
UERANSIM
Commits
57835f08
Unverified
Commit
57835f08
authored
Oct 05, 2021
by
Alan_Chang
Committed by
GitHub
Oct 05, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'aligungr:master' into master
parents
f3b6a6bd
857b1cde
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
src/ue/nas/mm/messaging.cpp
src/ue/nas/mm/messaging.cpp
+11
-6
src/ue/nas/mm/mm.hpp
src/ue/nas/mm/mm.hpp
+0
-2
src/ue/types.hpp
src/ue/types.hpp
+3
-0
No files found.
src/ue/nas/mm/messaging.cpp
View file @
57835f08
...
...
@@ -363,13 +363,18 @@ bool NasMm::checkForReplay(const nas::SecuredMmMessage &msg)
{
int
n
=
static_cast
<
int
>
(
msg
.
sequenceNumber
);
for
(
int
seq
:
m_lastNasSequenceNums
)
if
(
seq
==
n
)
return
false
;
if
(
m_usim
->
m_currentNsCtx
)
{
auto
&
lastNasSequenceNums
=
m_usim
->
m_currentNsCtx
->
lastNasSequenceNums
;
for
(
int
seq
:
lastNasSequenceNums
)
if
(
seq
==
n
)
return
false
;
m_lastNasSequenceNums
.
push_back
(
n
);
while
(
m_lastNasSequenceNums
.
size
()
>
16
)
m_lastNasSequenceNums
.
pop_front
();
lastNasSequenceNums
.
push_back
(
n
);
while
(
lastNasSequenceNums
.
size
()
>
16
)
lastNasSequenceNums
.
pop_front
();
}
return
true
;
}
...
...
src/ue/nas/mm/mm.hpp
View file @
57835f08
...
...
@@ -65,8 +65,6 @@ class NasMm
int64_t
m_lastTimePlmnSearchFailureLogged
{};
// Last time MM state changed
int64_t
m_lastTimeMmStateChange
{};
// Received NAS sequence numbers for replay protection
std
::
deque
<
int
>
m_lastNasSequenceNums
{};
friend
class
UeCmdHandler
;
friend
class
NasSm
;
...
...
src/ue/types.hpp
View file @
57835f08
...
...
@@ -423,6 +423,8 @@ struct NasSecurityContext
nas
::
ETypeOfIntegrityProtectionAlgorithm
integrity
{};
nas
::
ETypeOfCipheringAlgorithm
ciphering
{};
std
::
deque
<
int
>
lastNasSequenceNums
{};
void
updateDownlinkCount
(
const
NasCount
&
validatedCount
)
{
downlinkCount
.
overflow
=
validatedCount
.
overflow
;
...
...
@@ -476,6 +478,7 @@ struct NasSecurityContext
ctx
.
keys
=
keys
.
deepCopy
();
ctx
.
integrity
=
integrity
;
ctx
.
ciphering
=
ciphering
;
ctx
.
lastNasSequenceNums
=
lastNasSequenceNums
;
return
ctx
;
}
};
...
...
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