Feature: TS 29.581 V18.6.0 uplift#31
Conversation
…ress for MBS Session.
|
Fixed an issue spotted by @devbbc: When creating the MBS Session and MBSTF Distribution Session the current released MBSF does a discovery step to find an MBSTF before creating MBS Session on the MB-SMF using the MBSTF discovered address as the SSM source address. This is because the MBSTF filled in the SSM Source used in the FLUTE session with its own source address. This uplift carries an SSM source address from the AP through the MBSF to both the MB-SMF and MBSTF. Therefore the discovery step is no longer needed since the SSM source is now available from the AP. This last commit removes the discovery step, goes straight to the (discovery of the MB-SMF and) creation of MBS session and uses the provided SSM source address when requesting the MBS Session. |
|
Thanks for the testing. I'll get there soon! |
|
Hey @davidjwbbc. I ran some tests and caught a some bugs. Some of them seem to touch the recently refactored logic, while others might be pre-existing issues. I don't want to necessarily block this PR by issues that are not related to this PR, so feel free to decide whether you want to include the fixes here or if we should tackle them in a separate follow-up issue Not directly related to the changes in this PR, but I ran into an issue during setup: The commands
fails on modern Ubuntu/Debian systems due to PEP 668 (externally-managed-environment).
Bugs Found:
Critical Memory Corruption via Invalid reinterpret_cast in State Transitions Description: In UserDataIngSession.cc, the changeDistSessionState function incorrectly casts a void* parameter to a const char* to extract a session ID. However, the pointer being passed actually points to a C++ struct (UserDataIngDistSessId), not a null-terminated C-string. This invalid cast leads to undefined behavior, reading arbitrary memory as a string, and ultimately causes garbage IDs to be processed or an immediate Segmentation Fault when the session attempts to transition its state (e.g., from INACTIVE to ACTIVE). Root Cause Analysis: When a session state transition is triggered, the setMbstfsInDesiredState() function passes a pointer to a struct: However, changeDistSessionState(void *data) expects a C-string and performs a dangerous reinterpret_cast: Reinterpreting the memory layout of a UserDataIngDistSessId object as a const char* violates strict aliasing rules and memory safety. Recommendation: Stop using type erasure (void*) where possible. The data pointer should be cast back to its actual type using static_cast before accessing its members: |
Passes the source IP address from the provisioned Distribution Sessions in the UserDataIngSession to the MBSTF for use in the FLUTE session. Also allocates a TSI to be used by the MBSTF in the FLUTE session.
This is the final TS 29.581 V18.6.0 uplift PR to provide the full implementation of the uplift for reference point Nmb2 between the MBSF and MBSTF. This implements the changes to the UpTrafficFlowInfo data type agreed in SA#111.
This also includes some bug fixes for issues found while testing this uplift feature, most importantly a refactoring of the active periods handling and Distribution Session state transitions.
Closes #27