fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41490?usp=email )
Change subject: s1ap_proxy: correct handling of UE CONTEXT RELEASE REQUEST ......................................................................
s1ap_proxy: correct handling of UE CONTEXT RELEASE REQUEST
By sending a UE CONTEXT RELEASE REQUEST, the eNB is requesting the MME to terminate the UE context. This procedure itself does not terminate the UE context nor the associated E-RABs. Therefore, the S1GW should not terminate E-RAB FSMs upon receiving this PDU.
Keep the function clause in s1ap_proxy, so that the respective ?S1GW_CTR_S1AP_PROXY_IN_PKT_RELEASE_CTX_REQ is properly updated. Correct the unit test: E-RAB is now expected to remain alive.
Change-Id: If467162e871b7989f0578be30c04d1c32c263c99 Related: osmo-ttcn3-hacks.git Ibbb6da1f2888995608b980e7479758000e94864e Related: SYS#7738, SYS#7599 --- M src/s1ap_proxy.erl M test/s1ap_proxy_test.erl 2 files changed, 5 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/90/41490/1
diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl index bcba952..502480e 100644 --- a/src/s1ap_proxy.erl +++ b/src/s1ap_proxy.erl @@ -604,18 +604,10 @@
%% 9.1.4.5 UE CONTEXT RELEASE REQUEST handle_pdu({initiatingMessage, - #'InitiatingMessage'{procedureCode = ?'id-UEContextReleaseRequest', - value = #'UEContextReleaseRequest'{protocolIEs = IEs}}}, - #proxy_state{erabs = ERABs} = S) -> + #'InitiatingMessage'{procedureCode = ?'id-UEContextReleaseRequest'}}, + #proxy_state{} = S) -> ?LOG_DEBUG("Processing UE CONTEXT RELEASE REQUEST"), ctr_inc(?S1GW_CTR_S1AP_PROXY_IN_PKT_RELEASE_CTX_REQ, S), - %% fetch MME-UE-S1AP-ID value (mandatory IE) - #'ProtocolIE-Field'{id = ?'id-MME-UE-S1AP-ID', - value = MMEUEId} = lists:nth(1, IEs), - %% poke E-RAB FSMs with the matching MME-UE-S1AP-ID - erab_for_each(MMEUEId, - fun erab_fsm:erab_release_ind/1, - dict:to_list(ERABs)), {forward, S}; %% forward as-is, there's nothing to patch
%% 9.1.4.6 UE CONTEXT RELEASE COMMAND diff --git a/test/s1ap_proxy_test.erl b/test/s1ap_proxy_test.erl index 0cfc645..7a93d1d 100644 --- a/test/s1ap_proxy_test.erl +++ b/test/s1ap_proxy_test.erl @@ -462,7 +462,9 @@ ?_assertMetric(?S1GW_CTR_S1AP_PROXY_OUT_PKT_FWD_ALL, 2 + 1), ?_assertMetric(?S1GW_CTR_S1AP_PROXY_OUT_PKT_FWD_PROC, 2), ?_assertMetric(?S1GW_CTR_S1AP_PROXY_OUT_PKT_FWD_UNMODIFIED, 1), - ?_assertMatch([], s1ap_proxy:fetch_erab_list(Pid))]. + %% The E-RAB FSM is expected to remain alive and unchanged, + %% since this procedure itself does not terminate the UE contect. + ?_assertMatch([_], s1ap_proxy:fetch_erab_list(Pid))].
test_ue_ctx_release_cmd(#{handler := Pid}) ->