fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/40663?usp=email )
Change subject: s1ap_proxy: forward E-RAB RELEASE INDICATION as-is ......................................................................
s1ap_proxy: forward E-RAB RELEASE INDICATION as-is
There's nothing to patch in this PDU, so avoid re-encoding it. This also makes the metrics correctly report it as unmodified.
Change-Id: Ia4996bb2ecd665c03673df346f21718d365129a4 Related: SYS#7065 --- M src/s1ap_proxy.erl M test/s1ap_proxy_test.erl 2 files changed, 6 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/63/40663/1
diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl index 66d558d..0cd92f7 100644 --- a/src/s1ap_proxy.erl +++ b/src/s1ap_proxy.erl @@ -422,17 +422,16 @@ end;
%% 9.1.3.7 E-RAB RELEASE INDICATION -handle_pdu({Outcome = initiatingMessage, +handle_pdu({initiatingMessage, #'InitiatingMessage'{procedureCode = ?'id-E-RABReleaseIndication', - value = C0} = Msg}, S0) -> + value = C0}}, S0) -> ?LOG_DEBUG("Processing E-RAB RELEASE INDICATION"), s1gw_metrics:ctr_inc(?S1GW_CTR_S1AP_PROXY_IN_PKT_ERAB_RELEASE_IND), case handle_ies(?'id-E-RABReleasedList', C0#'E-RABReleaseIndication'.protocolIEs, S0) of - {{ok, IEs}, S1} -> - C1 = C0#'E-RABReleaseIndication'{protocolIEs = IEs}, - PDU = {Outcome, Msg#'InitiatingMessage'{value = C1}}, - {{forward, PDU}, S1}; %% forward patched PDU + {{ok, _}, S1} -> + %% there's nothing to patch in this PDU, so we forward it as-is + {forward, S1}; {{error, Reason}, S1} -> ?LOG_NOTICE("Failed to process E-RAB RELEASE INDICATION: ~p", [Reason]), s1gw_metrics:ctr_inc(?S1GW_CTR_S1AP_PROXY_IN_PKT_PROC_ERROR), diff --git a/test/s1ap_proxy_test.erl b/test/s1ap_proxy_test.erl index 4f79451..ea5180e 100644 --- a/test/s1ap_proxy_test.erl +++ b/test/s1ap_proxy_test.erl @@ -155,7 +155,7 @@ ?_assertMetric(?S1GW_CTR_S1AP_PROXY_IN_PKT_ALL, 3), ?_assertMetric(?S1GW_CTR_S1AP_PROXY_IN_PKT_ERAB_RELEASE_IND, 1), ?_assertMetric(?S1GW_CTR_S1AP_PROXY_OUT_PKT_FWD_ALL, 2 + 1), -%% ?_assertMetric(?S1GW_CTR_S1AP_PROXY_OUT_PKT_FWD_UNMODIFIED, 1), + ?_assertMetric(?S1GW_CTR_S1AP_PROXY_OUT_PKT_FWD_UNMODIFIED, 1), ?_assertEqual([], s1ap_proxy:fetch_erab_list(Pid))].