mirror of
https://github.com/open5gs/open5gs.git
synced 2025-10-23 07:41:57 +00:00
Fix missing N2 signaling when tunnel information is unchanged, causing AMF crash on repeated PathSwitchRequest When a second PathSwitchRequest arrives without any tunnel changes, the handler previously returned HTTP 204 No Content and omitted N2 information. This led to a fatal assertion in the AMF SM context, since it expected to receive updated N2 data even when the tunnel remained the same. This patch modifies ngap_handle_path_switch_request_transfer to build and send the N2 SM buffer in the “else” branch. It calls ngap_build_path_switch_request_ack_transfer to construct the Path Switch Request Acknowledge N2 message and then delivers it with smf_sbi_send_sm_context_updated_data_n2smbuf. A new test case is also added to verify that N2 signaling is correctly transmitted when tunnel parameters have not changed.