mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
Use the stored NAS KSI only when a valid integrity context is present, instead of treating idle mode alone as proof that no KSI is available. This keeps outgoing initial NAS messages aligned with the actual NAS security state tracked by the UE (including when in IDLE state). Changes: - update `set_fgs_ksi()` in `openair3/NAS/NR_UE/nr_nas_msg.c` to return `*nas->ksi & 0x07` only when `security_container`, `integrity_context`, and `nas->ksi` are present - remove the unconditional `FGS_IDLE` check and the hardcoded `0x0` return path - keep `NAS_KEY_SET_IDENTIFIER_NOT_AVAILABLE` as the fallback when no valid integrity context is available Refs: - TS 24.501 (Service Request and ngKSI/security context handling) Signed-off-by: Guido Casati <guido.casati@openairinterface.org>