Commit 68a4fbd2 authored by aligungr's avatar aligungr

UE authentication procedure improvements

parent 82828c1e
...@@ -35,15 +35,10 @@ uint64_t SqnManager::getIndFromSqn(uint64_t sqn) const ...@@ -35,15 +35,10 @@ uint64_t SqnManager::getIndFromSqn(uint64_t sqn) const
uint64_t SqnManager::getSeqMs() const uint64_t SqnManager::getSeqMs() const
{ {
return getSeqFromSqn(getSqnValue()); return getSeqFromSqn(getSqnMs());
} }
uint64_t &SqnManager::getSqnRef() uint64_t SqnManager::getSqnMs() const
{
return *std::max_element(m_sqnArr.begin(), m_sqnArr.end());
}
uint64_t SqnManager::getSqnValue() const
{ {
return *std::max_element(m_sqnArr.begin(), m_sqnArr.end()); return *std::max_element(m_sqnArr.begin(), m_sqnArr.end());
} }
...@@ -72,7 +67,7 @@ bool SqnManager::checkSqn(const OctetString &sqn) ...@@ -72,7 +67,7 @@ bool SqnManager::checkSqn(const OctetString &sqn)
OctetString SqnManager::getSqn() const OctetString SqnManager::getSqn() const
{ {
return OctetString::FromOctet8(getSqnValue()).subCopy(2); return OctetString::FromOctet8(getSqnMs()).subCopy(2);
} }
} // namespace nr::ue } // namespace nr::ue
...@@ -32,8 +32,7 @@ class SqnManager ...@@ -32,8 +32,7 @@ class SqnManager
[[nodiscard]] uint64_t getSeqFromSqn(uint64_t sqn) const; [[nodiscard]] uint64_t getSeqFromSqn(uint64_t sqn) const;
[[nodiscard]] uint64_t getIndFromSqn(uint64_t sqn) const; [[nodiscard]] uint64_t getIndFromSqn(uint64_t sqn) const;
[[nodiscard]] uint64_t getSeqMs() const; [[nodiscard]] uint64_t getSeqMs() const;
[[nodiscard]] uint64_t &getSqnRef(); [[nodiscard]] uint64_t getSqnMs() const;
[[nodiscard]] uint64_t getSqnValue() const;
bool checkSqn(uint64_t sqn); bool checkSqn(uint64_t sqn);
public: public:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment