refactor: harmonize AS key BIT_STRING macro

Replace duplicated KENB_STAR_TO_BIT_STRING and
KGNB_STAR_TO_BIT_STRING macros with the unified
AS_KEY_STAR_TO_BIT_STRING helper across X2AP,
XNAP, M2AP, and M3AP code paths.

Also switch allocation to calloc_or_fail for
safer memory handling.

No functional change intended.

Signed-off-by: Rakesh BB <rakesh.bb@fsid-iisc.in>
This commit is contained in:
Rakesh BB
2026-05-27 12:56:29 +05:30
parent 6d6930ce20
commit e33ffd5e8c
5 changed files with 12 additions and 19 deletions

View File

@@ -449,7 +449,7 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
// //@TODO: consider to update this value
// ie->value.choice.UE_ContextInformation.mME_UE_S1AP_ID = m2ap_handover_req->mme_ue_s1ap_id;
//
// KENB_STAR_TO_BIT_STRING(m2ap_handover_req->kenb,&ie->value.choice.UE_ContextInformation.aS_SecurityInformation.key_eNodeB_star);
// AS_KEY_STAR_TO_BIT_STRING(m2ap_handover_req->kenb,&ie->value.choice.UE_ContextInformation.aS_SecurityInformation.key_eNodeB_star);
//
// if (m2ap_handover_req->kenb_ncc >=0) { // Check this condition
// ie->value.choice.UE_ContextInformation.aS_SecurityInformation.nextHopChainingCount = m2ap_handover_req->kenb_ncc;