From 8f3acc4bc495eb2f6dbd0fc84cb6f38e5a5a30a4 Mon Sep 17 00:00:00 2001 From: Jordan Cheng <46536142+jordan0210@users.noreply.github.com> Date: Mon, 9 Aug 2021 19:35:54 +0800 Subject: [PATCH] Set RAND only if AMF doesn't send it. (#3) Co-authored-by: WeiCheng --- producer/ue_authentication.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/producer/ue_authentication.go b/producer/ue_authentication.go index fc6b05b..5116be9 100644 --- a/producer/ue_authentication.go +++ b/producer/ue_authentication.go @@ -111,7 +111,9 @@ func UeAuthPostRequestProcedure(updateAuthenticationInfo models.AuthenticationIn logger.UeAuthPostLog.Warningln(ausfCurrentSupi) ausfCurrentContext := ausf_context.GetAusfUeContext(ausfCurrentSupi) logger.UeAuthPostLog.Warningln(ausfCurrentContext.Rand) - updateAuthenticationInfo.ResynchronizationInfo.Rand = ausfCurrentContext.Rand + if updateAuthenticationInfo.ResynchronizationInfo.Rand == "" { + updateAuthenticationInfo.ResynchronizationInfo.Rand = ausfCurrentContext.Rand + } logger.UeAuthPostLog.Warningln("Rand: ", updateAuthenticationInfo.ResynchronizationInfo.Rand) authInfoReq.ResynchronizationInfo = updateAuthenticationInfo.ResynchronizationInfo }