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
eca3b993
Commit
eca3b993
authored
Apr 26, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE authentication procedure improvements
parent
611a2ea4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
src/ue/nas/usim/sqn_mng.cpp
src/ue/nas/usim/sqn_mng.cpp
+2
-4
src/ue/nas/usim/sqn_mng.hpp
src/ue/nas/usim/sqn_mng.hpp
+1
-2
src/ue/nas/usim/usim.cpp
src/ue/nas/usim/usim.cpp
+1
-1
No files found.
src/ue/nas/usim/sqn_mng.cpp
View file @
eca3b993
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
namespace
nr
::
ue
namespace
nr
::
ue
{
{
SqnManager
::
SqnManager
(
uint64_t
indBitLen
,
uint64_t
wrappingDelta
,
uint64_t
limit
)
SqnManager
::
SqnManager
(
uint64_t
indBitLen
,
uint64_t
wrappingDelta
)
:
m_indBitLen
{
indBitLen
},
m_wrappingDelta
{
wrappingDelta
},
m_
limit
{
limit
},
m_
sqnArr
(
1ull
<<
m_indBitLen
)
:
m_indBitLen
{
indBitLen
},
m_wrappingDelta
{
wrappingDelta
},
m_sqnArr
(
1ull
<<
m_indBitLen
)
{
{
if
(
m_indBitLen
<
2
||
m_indBitLen
>
16
)
if
(
m_indBitLen
<
2
||
m_indBitLen
>
16
)
throw
std
::
runtime_error
(
"bad indBitLen"
);
throw
std
::
runtime_error
(
"bad indBitLen"
);
...
@@ -50,8 +50,6 @@ bool SqnManager::checkSqn(uint64_t sqn)
...
@@ -50,8 +50,6 @@ bool SqnManager::checkSqn(uint64_t sqn)
if
(
seq
-
getSeqMs
()
>
m_wrappingDelta
)
if
(
seq
-
getSeqMs
()
>
m_wrappingDelta
)
return
false
;
return
false
;
if
(
getSeqMs
()
-
seq
>=
m_limit
)
return
false
;
if
(
seq
<=
getSeqFromSqn
(
m_sqnArr
[
ind
]))
if
(
seq
<=
getSeqFromSqn
(
m_sqnArr
[
ind
]))
return
false
;
return
false
;
...
...
src/ue/nas/usim/sqn_mng.hpp
View file @
eca3b993
...
@@ -22,12 +22,11 @@ class SqnManager
...
@@ -22,12 +22,11 @@ class SqnManager
private:
private:
uint64_t
m_indBitLen
;
uint64_t
m_indBitLen
;
uint64_t
m_wrappingDelta
;
uint64_t
m_wrappingDelta
;
uint64_t
m_limit
;
std
::
vector
<
uint64_t
>
m_sqnArr
;
std
::
vector
<
uint64_t
>
m_sqnArr
;
public:
public:
SqnManager
(
uint64_t
indBitLen
,
uint64_t
wrappingDelta
,
uint64_t
limit
);
SqnManager
(
uint64_t
indBitLen
,
uint64_t
wrappingDelta
);
private:
private:
[[
nodiscard
]]
uint64_t
getSeqFromSqn
(
uint64_t
sqn
)
const
;
[[
nodiscard
]]
uint64_t
getSeqFromSqn
(
uint64_t
sqn
)
const
;
...
...
src/ue/nas/usim/usim.cpp
View file @
eca3b993
...
@@ -20,7 +20,7 @@ void ue::Usim::initialize(bool hasSupi, const UeConfig::Initials &initials)
...
@@ -20,7 +20,7 @@ void ue::Usim::initialize(bool hasSupi, const UeConfig::Initials &initials)
m_defConfiguredNssai
=
initials
.
defaultConfiguredNssai
;
m_defConfiguredNssai
=
initials
.
defaultConfiguredNssai
;
m_configuredNssai
=
initials
.
configuredNssai
;
m_configuredNssai
=
initials
.
configuredNssai
;
m_sqnMng
=
std
::
make_unique
<
SqnManager
>
(
5ull
,
1ull
<<
28ull
,
~
0ull
);
m_sqnMng
=
std
::
make_unique
<
SqnManager
>
(
5ull
,
1ull
<<
28ull
);
}
}
bool
Usim
::
isValid
()
bool
Usim
::
isValid
()
...
...
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