Guido Casati 91a08b1ba7 Fix MAC frequency overwrite during handover causing integrity check failures
During N2 handover, the UE receives reconfigurationWithSync which correctly
sets the target cell frequency in mac->phy_config.config_req.carrier_config
via config_common_ue() call.

However, when SIB1 is decoded after reconfiguration,
nr_rrc_mac_config_req_sib1() calls config_common_ue_sa() which unconditionally
overwrites the frequency with the command-line parameter (downlink_frequency),
which corresponds to the source cell frequency.

This causes a critical issue during RRC re-establishment:
- The UE uses the wrong frequency (source cell) for key derivation (kgnb*)
- The gNB uses the correct frequency (target cell) for key derivation
- This mismatch results in different kgnb* keys on UE and gNB
- Integrity check fails: "Integrity of RRCReestablishment failed, going to IDLE"

Root cause:
config_common_ue_sa() is used for SIB1 processing (initial cell selection) and
uses ServingCellConfigCommonSIB which doesn't contain absoluteFrequencyPointA.
It must derive frequency from command-line parameters. However, after handover,
the frequency has already been correctly set by config_common_ue() (used for
reconfigurationWithSync) which uses ServingCellConfigCommon with absolute
frequency information.

Solution:
Modify config_common_ue_sa() to preserve the existing frequency if it's already
initialized (non-zero). Only set frequency from command-line parameters during
initial cell selection when dl_frequency is 0. This ensures:
- Initial cell selection: frequency derived from command-line parameter, just once
- After handover: frequency preserved from reconfigurationWithSync
- MAC maintains its own frequency state independently

The fix applies to both DL and UL frequencies to maintain consistency.
There is probably room for more refactoring to the resync flow, since
the functionalities in config_common_ue and config_common_ue_sa are
partially overlapping and upon reconfigurationWithSync some other
configurations might be applied twice.
2025-12-29 13:31:22 +01:00
2025-11-12 15:16:48 +01:00
2025-10-30 08:04:39 +01:00
2025-08-11 17:11:21 +02:00
2023-08-23 17:15:48 +02:00
2025-12-03 22:25:56 +01:00
2024-10-11 09:12:49 +02:00
2024-03-08 15:53:42 +01:00
2022-10-18 15:24:48 +02:00

OAI

License Supported OS Ubuntu 22 Supported OS Ubuntu 24 Supported OS RHEL9 Supported OS Fedora 41

GitLab Release (custom instance)

Docker Pulls Docker Pulls Docker Pulls Docker Pulls Docker Pulls

OpenAirInterface License

It is distributed under OAI Public License V1.1.

The license information is distributed under LICENSE file in the same directory.

Please see NOTICE file for third party software that is included in the sources.

Where to Start

Not all information is available in a central place, and information for specific sub-systems might be available in the corresponding sub-directories. To find all READMEs, this command might be handy:

find . -iname "readme*"

RAN repository structure

The OpenAirInterface (OAI) software is composed of the following parts:

openairinterface5g
├── charts
├── ci-scripts        : Meta-scripts used by the OSA CI process. Contains also configuration files used day-to-day by CI.
├── CMakeLists.txt    : Top-level CMakeLists.txt for building
├── cmake_targets     : Build utilities to compile (simulation, emulation and real-time platforms), and generated build files.
├── common            : Some common OAI utilities, some other tools can be found at openair2/UTILS.
├── doc               : Documentation
├── docker            : Dockerfiles to build for Ubuntu and RHEL
├── executables       : Top-level executable source files (gNB, eNB, ...)
├── maketags          : Script to generate emacs tags.
├── nfapi             : (n)FAPI code for MAC-PHY interface
├── openair1          : Layer 1 (3GPP LTE Rel-10/12 PHY, NR Rel-15 PHY)
├── openair2          : Layer 2 (3GPP LTE Rel-10 MAC/RLC/PDCP/RRC/X2AP, LTE Rel-14 M2AP, NR Rel-15+ MAC/RLC/PDCP/SDAP/RRC/X2AP/F1AP/E1AP), E2AP
├── openair3          : Layer 3 (3GPP LTE Rel-10 S1AP/GTP, NR Rel-15 NGAP/GTP)
├── openshift         : OpenShift helm charts for some deployment options of OAI
├── radio             : Drivers for various radios such as USRP, AW2S, RFsim, 7.2 FHI, ...
├── targets           : Some configuration files; only historical relevance, and might be deleted in the future
└── tools             : Tools for use by the developers/ci machines: code analysis and formatting

How to get support from the OAI Community

You can ask your question on the mailing lists.

Your email should contain below information:

  • A clear subject in your email.
  • For all the queries there should be [Query] in the subject of the email and for problems there should be [Problem].
  • In case of a problem, add a small description.
  • Do not share any photos unless you want to share a diagram.
  • OAI gNB/DU/CU/CU-CP/CU-UP configuration file in .conf format only.
  • Logs of OAI gNB/DU/CU/CU-CP/CU-UP in .log or .txt format only.
  • In case your question is related to performance, include a small description of the machine (Operating System, Kernel version, CPU, RAM and networking card) and diagram of your testing environment.
  • Known/open issues are present on GitLab, so keep checking.

Always remember a structured email will help us understand your issues quickly.

S
Description
No description provided
Readme
379 MiB
Languages
C 91.8%
CMake 2.9%
C++ 1.9%
TeX 1%
Python 1%
Other 1.1%