Commit d9521c5c authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Fix get Kamf function

parent d8e22cb6
...@@ -66,7 +66,7 @@ nas_context::~nas_context() {} ...@@ -66,7 +66,7 @@ nas_context::~nas_context() {}
bool nas_context::get_kamf( bool nas_context::get_kamf(
uint8_t index, uint8_t (&k)[AUTH_VECTOR_LENGTH_OCTETS]) const { uint8_t index, uint8_t (&k)[AUTH_VECTOR_LENGTH_OCTETS]) const {
if (index >= MAX_5GS_AUTH_VECTORS) return false; if (index >= MAX_5GS_AUTH_VECTORS) return false;
for (uint8_t i = 0; i++; i < AUTH_VECTOR_LENGTH_OCTETS) { for (uint8_t i = 0; i < AUTH_VECTOR_LENGTH_OCTETS; i++) {
k[i] = kamf[index][i]; k[i] = kamf[index][i];
} }
return true; return true;
......
...@@ -116,7 +116,7 @@ class nas_context { ...@@ -116,7 +116,7 @@ class nas_context {
_5G_HE_AV_t _5g_he_av[MAX_5GS_AUTH_VECTORS]; // generated by UDM _5G_HE_AV_t _5g_he_av[MAX_5GS_AUTH_VECTORS]; // generated by UDM
_5G_AV_t _5g_av[MAX_5GS_AUTH_VECTORS]; // generated by AUSF _5G_AV_t _5g_av[MAX_5GS_AUTH_VECTORS]; // generated by AUSF
std::string href; std::string href;
uint8_t kamf[MAX_5GS_AUTH_VECTORS][32]; uint8_t kamf[MAX_5GS_AUTH_VECTORS][AUTH_VECTOR_LENGTH_OCTETS];
std::optional<nas_secu_ctx> security_ctx; std::optional<nas_secu_ctx> security_ctx;
bool is_current_security_available; bool is_current_security_available;
int registration_attempt_counter; // used to limit the subsequently reject int registration_attempt_counter; // used to limit the subsequently reject
......
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