lists.osmocom.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
List overview
Download
gerrit-log
June 2024
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
gerrit-log@lists.osmocom.org
1 participants
1566 discussions
Start a n
N
ew thread
[M] Change in osmo-s1gw[master]: s1ap_proxy: implement patching of INITIAL CONTEXT SETUP REQ/RSP
by osmith
osmith has abandoned this change. (
https://gerrit.osmocom.org/c/osmo-s1gw/+/37072?usp=email
) Change subject: s1ap_proxy: implement patching of INITIAL CONTEXT SETUP REQ/RSP ...................................................................... Abandoned ->
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37104/1
-- To view, visit
https://gerrit.osmocom.org/c/osmo-s1gw/+/37072?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Ia0d8f8d81756bcce5f518caee8887cf5822aaa08 Gerrit-Change-Number: 37072 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: abandon
1 year
1
0
0
0
[M] Change in ...osmo-s1gw[master]: s1ap_proxy: implement patching of E-RAB MODIFICATION IND
by osmith
osmith has posted comments on this change. (
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37103?usp=email
) Change subject: s1ap_proxy: implement patching of E-RAB MODIFICATION IND ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37103?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I054b874b39d4e39a51c00385d1553da065131047 Gerrit-Change-Number: 37103 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 06 Jun 2024 08:43:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 year
1
0
0
0
[M] Change in osmo-s1gw[master]: s1ap_proxy: implement patching of E-RAB MODIFICATION IND
by osmith
osmith has abandoned this change. (
https://gerrit.osmocom.org/c/osmo-s1gw/+/37071?usp=email
) Change subject: s1ap_proxy: implement patching of E-RAB MODIFICATION IND ...................................................................... Abandoned ->
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37103/1
-- To view, visit
https://gerrit.osmocom.org/c/osmo-s1gw/+/37071?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I054b874b39d4e39a51c00385d1553da065131047 Gerrit-Change-Number: 37071 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: abandon
1 year
1
0
0
0
[S] Change in ...osmo-s1gw[master]: test/s1ap_proxy_test: minor/cosmetic improvements
by osmith
osmith has posted comments on this change. (
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37102?usp=email
) Change subject: test/s1ap_proxy_test: minor/cosmetic improvements ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37102?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I91650bef356b4010d16de9c708381ef8de14fe85 Gerrit-Change-Number: 37102 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 06 Jun 2024 08:42:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 year
1
0
0
0
[S] Change in osmo-s1gw[master]: test/s1ap_proxy_test: minor/cosmetic improvements
by osmith
osmith has abandoned this change. (
https://gerrit.osmocom.org/c/osmo-s1gw/+/37070?usp=email
) Change subject: test/s1ap_proxy_test: minor/cosmetic improvements ...................................................................... Abandoned ->
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37102
-- To view, visit
https://gerrit.osmocom.org/c/osmo-s1gw/+/37070?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I91650bef356b4010d16de9c708381ef8de14fe85 Gerrit-Change-Number: 37070 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: abandon
1 year
1
0
0
0
[S] Change in ...osmo-s1gw[master]: s1ap_proxy: add TODOs for PDUs also containing TLA
by osmith
osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37105?usp=email
) Change subject: s1ap_proxy: add TODOs for PDUs also containing TLA ...................................................................... s1ap_proxy: add TODOs for PDUs also containing TLA Change-Id: I1d420481cf78c75c2b7a7a3df5ffb1af1ba9aaa0 --- M src/s1ap_proxy.erl 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/05/37105/1 diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl index 82e4039..d50d765 100644 --- a/src/s1ap_proxy.erl +++ b/src/s1ap_proxy.erl @@ -111,6 +111,8 @@ NewContent = Content#'E-RABSetupResponse'{protocolIEs = IEs}, handle_pdu_new(Data, {Outcome, Pdu#'SuccessfulOutcome'{value = NewContent}}); +%% TODO: 9.1.3.3 E-RAB MODIFY REQUEST / (Optional) Transport Information + %% 9.1.3.8 E-RAB MODIFICATION INDICATION handle_pdu(Data, {Outcome = initiatingMessage, #'InitiatingMessage'{procedureCode = ?'id-E-RABModificationIndication', @@ -144,6 +146,13 @@ NewContent = Content#'InitialContextSetupResponse'{protocolIEs = IEs}, handle_pdu_new(Data, {Outcome, Pdu#'SuccessfulOutcome'{value = NewContent}}); +%% TODO: 9.1.5.2 HANDOVER COMMAND :: (O) UL/DL Transport Layer Address +%% TODO: 9.1.5.4 HANDOVER REQUEST :: (M) Transport Layer Address +%% TODO: 9.1.5.5 HANDOVER REQUEST ACKNOWLEDGE :: (M) Transport Layer Address, +%% (O) UL/DL Transport Layer Address +%% TODO: 9.1.5.8 PATH SWITCH REQUEST :: (M) Transport Layer Address +%% TODO: 9.1.5.9 PATH SWITCH REQUEST ACKNOWLEDGE :: (M) Transport Layer Address + %% Proxy all other messages unmodified handle_pdu(Data, _Pdu) -> Data. -- To view, visit
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37105?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I1d420481cf78c75c2b7a7a3df5ffb1af1ba9aaa0 Gerrit-Change-Number: 37105 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 year
1
0
0
0
[S] Change in ...osmo-s1gw[master]: test/s1ap_proxy_test: minor/cosmetic improvements
by osmith
osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37102?usp=email
) Change subject: test/s1ap_proxy_test: minor/cosmetic improvements ...................................................................... test/s1ap_proxy_test: minor/cosmetic improvements Change-Id: I91650bef356b4010d16de9c708381ef8de14fe85 --- M test/s1ap_proxy_test.erl 1 file changed, 18 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/02/37102/1 diff --git a/test/s1ap_proxy_test.erl b/test/s1ap_proxy_test.erl index 0c4bbbf..2bc8392 100644 --- a/test/s1ap_proxy_test.erl +++ b/test/s1ap_proxy_test.erl @@ -2,6 +2,9 @@ -include_lib("eunit/include/eunit.hrl"). +-define(EXP_ADDR_STR, "127.0.0.1"). +-define(EXP_ADDR_BIN, << 16#7f, 16#00, 16#00, 16#01 >>). + %% ------------------------------------------------------------------ %% testcases %% ------------------------------------------------------------------ @@ -20,7 +23,7 @@ ?assertEqual(OrigData, s1ap_proxy:handle_pdu(OrigData)). -%% E-RAB SETUP REQUEST +%% [eNB -> MME] E-RAB SETUP REQUEST e_rab_setup_req_pdu(TLA, TEID) when is_binary(TLA), is_binary(TEID) -> << 16#00, 16#05, 16#00, 16#80, 16#9b, 16#00, 16#00, 16#03, @@ -54,14 +57,13 @@ OrigData = e_rab_setup_req_pdu(OrigTLA, TEID), %% Expected output data - ExpTLA = << 16#7f, 16#00, 16#00, 16#01 >>, - ExpData = e_rab_setup_req_pdu(ExpTLA, TEID), + ExpData = e_rab_setup_req_pdu(?EXP_ADDR_BIN, TEID), - application:set_env(osmo_s1gw, mme_loc_addr, "127.0.0.1"), + application:set_env(osmo_s1gw, mme_loc_addr, ?EXP_ADDR_STR), ?assertEqual(ExpData, s1ap_proxy:handle_pdu(OrigData)). -%% E-RAB SETUP RESPONSE +%% [MME -> eNB] E-RAB SETUP RESPONSE e_rab_setup_rsp_pdu(TLA, TEID) when is_binary(TLA), is_binary(TEID) -> << 16#20, 16#05, 16#00, 16#22, 16#00, 16#00, 16#03, 16#00, @@ -79,10 +81,9 @@ OrigData = e_rab_setup_rsp_pdu(OrigTLA, TEID), %% Expected output data - ExpTLA = << 16#7f, 16#00, 16#00, 16#01 >>, - ExpData = e_rab_setup_rsp_pdu(ExpTLA, TEID), + ExpData = e_rab_setup_rsp_pdu(?EXP_ADDR_BIN, TEID), - application:set_env(osmo_s1gw, s1gw_bind_addr, "127.0.0.1"), + application:set_env(osmo_s1gw, s1gw_bind_addr, ?EXP_ADDR_STR), ?assertEqual(ExpData, s1ap_proxy:handle_pdu(OrigData)). %% vim:set ts=4 sw=4 et: -- To view, visit
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37102?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I91650bef356b4010d16de9c708381ef8de14fe85 Gerrit-Change-Number: 37102 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 year
1
0
0
0
[M] Change in ...osmo-s1gw[master]: s1ap_proxy: implement patching of INITIAL CONTEXT SETUP REQ/RSP
by osmith
osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37104?usp=email
) Change subject: s1ap_proxy: implement patching of INITIAL CONTEXT SETUP REQ/RSP ...................................................................... s1ap_proxy: implement patching of INITIAL CONTEXT SETUP REQ/RSP Change-Id: Ia0d8f8d81756bcce5f518caee8887cf5822aaa08 --- M src/s1ap_proxy.erl M test/s1ap_proxy_test.erl 2 files changed, 132 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/04/37104/1 diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl index 0c6cba0..82e4039 100644 --- a/src/s1ap_proxy.erl +++ b/src/s1ap_proxy.erl @@ -124,6 +124,26 @@ NewContent = Content#'E-RABModificationIndication'{protocolIEs = IEs2}, handle_pdu_new(Data, {Outcome, Pdu#'InitiatingMessage'{value = NewContent}}); +%% 9.1.4.1 INITIAL CONTEXT SETUP REQUEST +handle_pdu(Data, {Outcome = initiatingMessage, + #'InitiatingMessage'{procedureCode = ?'id-InitialContextSetup', + value = Content} = Pdu}) -> + logger:debug("Patching INITIAL CONTEXT SETUP REQUEST"), + IEs = handle_ies(Content#'InitialContextSetupRequest'.protocolIEs, + ?'id-E-RABToBeSetupListCtxtSUReq'), + NewContent = Content#'InitialContextSetupRequest'{protocolIEs = IEs}, + handle_pdu_new(Data, {Outcome, Pdu#'InitiatingMessage'{value = NewContent}}); + +%% 9.1.4.3 INITIAL CONTEXT SETUP RESPONSE +handle_pdu(Data, {Outcome = successfulOutcome, + #'SuccessfulOutcome'{procedureCode = ?'id-InitialContextSetup', + value = Content} = Pdu}) -> + logger:debug("Patching INITIAL CONTEXT SETUP RESPONSE"), + IEs = handle_ies(Content#'InitialContextSetupResponse'.protocolIEs, + ?'id-E-RABSetupListCtxtSURes'), + NewContent = Content#'InitialContextSetupResponse'{protocolIEs = IEs}, + handle_pdu_new(Data, {Outcome, Pdu#'SuccessfulOutcome'{value = NewContent}}); + %% Proxy all other messages unmodified handle_pdu(Data, _Pdu) -> Data. @@ -179,6 +199,30 @@ TLA = transp_layer_addr(mme_loc_addr), Content#'E-RABNotToBeModifiedItemBearerModInd'{transportLayerAddress = TLA}; +%% INITIAL CONTEXT SETUP REQUEST related IEs +handle_ie(#'ProtocolIE-Field'{id = ?'id-E-RABToBeSetupListCtxtSUReq', + value = Content}) -> + %% This IE contains a list of CtxtSUReq, so patch inner IEs + handle_ies(Content, ?'id-E-RABToBeSetupItemCtxtSUReq'); + +handle_ie(#'ProtocolIE-Field'{id = ?'id-E-RABToBeSetupItemCtxtSUReq', + value = Content}) -> + %% eNB -> MME direction: we pass our MME facing local address + TLA = transp_layer_addr(mme_loc_addr), + Content#'E-RABToBeSetupItemCtxtSUReq'{transportLayerAddress = TLA}; + +%% INITIAL CONTEXT SETUP RESPONSE related IEs +handle_ie(#'ProtocolIE-Field'{id = ?'id-E-RABSetupListCtxtSURes', + value = Content}) -> + %% This IE contains a list of CtxtSURes, so patch inner IEs + handle_ies(Content, ?'id-E-RABSetupItemCtxtSURes'); + +handle_ie(#'ProtocolIE-Field'{id = ?'id-E-RABSetupItemCtxtSURes', + value = Content}) -> + %% MME -> eNB direction: we pass our eNB facing local address + TLA = transp_layer_addr(s1gw_bind_addr), + Content#'E-RABSetupItemCtxtSURes'{transportLayerAddress = TLA}; + %% Catch-all variant, which should not be called normally handle_ie(#'ProtocolIE-Field'{value = Content} = IE) -> logger:error("[BUG] Unhandled S1AP IE: ~p", [IE]), diff --git a/test/s1ap_proxy_test.erl b/test/s1ap_proxy_test.erl index 4123085..e694197 100644 --- a/test/s1ap_proxy_test.erl +++ b/test/s1ap_proxy_test.erl @@ -110,4 +110,83 @@ application:set_env(osmo_s1gw, mme_loc_addr, ?EXP_ADDR_STR), ?assertEqual(ExpData, s1ap_proxy:handle_pdu(OrigData)). + +%% [eNB -> MME] INITIAL CONTEXT SETUP REQUEST +initial_context_setup_req_pdu(TLA, TEID) when is_binary(TLA), + is_binary(TEID) -> + << 16#00, 16#09, 16#00, 16#81, 16#10, 16#00, 16#00, 16#07, + 16#00, 16#00, 16#00, 16#02, 16#00, 16#01, 16#00, 16#08, + 16#00, 16#02, 16#00, 16#01, 16#00, 16#42, 16#00, 16#0a, + 16#18, 16#3b, 16#9a, 16#ca, 16#00, 16#60, 16#3b, 16#9a, + 16#ca, 16#00, 16#00, 16#18, 16#00, 16#80, 16#b5, 16#00, + 16#00, 16#34, 16#00, 16#80, 16#af, 16#45, 16#00, 16#09, + 16#20, 16#0f, 16#80, + TLA/bytes, %% transportLayerAddress (IPv4) + TEID/bytes, %% GTP-TEID + 16#80, 16#9f, 16#27, 16#bd, 16#de, + 16#61, 16#4e, 16#02, 16#07, 16#42, 16#02, 16#29, 16#06, + 16#40, 16#32, 16#f8, 16#10, 16#00, 16#01, 16#00, 16#6e, + 16#52, 16#05, 16#c1, 16#01, 16#09, 16#09, 16#08, 16#69, + 16#6e, 16#74, 16#65, 16#72, 16#6e, 16#65, 16#74, 16#05, + 16#01, 16#c0, 16#a8, 16#64, 16#02, 16#5e, 16#06, 16#fe, + 16#fe, 16#fa, 16#fa, 16#02, 16#02, 16#58, 16#32, 16#27, + 16#4d, 16#80, 16#80, 16#21, 16#10, 16#02, 16#00, 16#00, + 16#10, 16#81, 16#06, 16#08, 16#08, 16#08, 16#08, 16#83, + 16#06, 16#08, 16#08, 16#04, 16#04, 16#00, 16#0d, 16#04, + 16#08, 16#08, 16#08, 16#08, 16#00, 16#0d, 16#04, 16#08, + 16#08, 16#04, 16#04, 16#00, 16#03, 16#10, 16#20, 16#01, + 16#48, 16#60, 16#48, 16#60, 16#00, 16#00, 16#00, 16#00, + 16#00, 16#00, 16#00, 16#00, 16#88, 16#88, 16#00, 16#03, + 16#10, 16#20, 16#01, 16#48, 16#60, 16#48, 16#60, 16#00, + 16#00, 16#00, 16#00, 16#00, 16#00, 16#00, 16#00, 16#88, + 16#44, 16#00, 16#10, 16#02, 16#05, 16#aa, 16#50, 16#0b, + 16#f6, 16#32, 16#f8, 16#10, 16#00, 16#02, 16#01, 16#c0, + 16#00, 16#02, 16#86, 16#13, 16#32, 16#f8, 16#10, 16#00, + 16#01, 16#23, 16#05, 16#f4, 16#04, 16#94, 16#25, 16#f8, + 16#64, 16#02, 16#01, 16#08, 16#00, 16#6b, 16#00, 16#05, + 16#1c, 16#00, 16#0e, 16#00, 16#00, 16#00, 16#49, 16#00, + 16#20, 16#57, 16#5d, 16#d3, 16#66, 16#69, 16#73, 16#4c, + 16#8c, 16#48, 16#42, 16#76, 16#5f, 16#fe, 16#f9, 16#bd, + 16#d5, 16#89, 16#08, 16#ae, 16#f6, 16#f4, 16#88, 16#62, + 16#22, 16#d7, 16#80, 16#fb, 16#36, 16#33, 16#d9, 16#9e, + 16#9f, 16#00, 16#c0, 16#40, 16#08, 16#35, 16#87, 16#61, + 16#10, 16#03, 16#ff, 16#ff, 16#74 + >>. + +initial_context_setup_req_test() -> + %% Original input data + TEID = << 16#00, 16#00, 16#71, 16#23 >>, + OrigTLA = << 16#c0, 16#a8, 16#02, 16#d2 >>, + OrigData = initial_context_setup_req_pdu(OrigTLA, TEID), + + %% Expected output data + ExpData = initial_context_setup_req_pdu(?EXP_ADDR_BIN, TEID), + + application:set_env(osmo_s1gw, mme_loc_addr, ?EXP_ADDR_STR), + ?assertEqual(ExpData, s1ap_proxy:handle_pdu(OrigData)). + + +%% [MME -> eNB] INITIAL CONTEXT SETUP RESPONSE +initial_context_setup_rsp_pdu(TLA, TEID) when is_binary(TLA), + is_binary(TEID) -> + << 16#20, 16#09, 16#00, 16#22, 16#00, 16#00, 16#03, 16#00, + 16#00, 16#40, 16#02, 16#00, 16#01, 16#00, 16#08, 16#40, + 16#02, 16#00, 16#01, 16#00, 16#33, 16#40, 16#0f, 16#00, + 16#00, 16#32, 16#40, 16#0a, 16#0a, 16#1f, + TLA/bytes, %% transportLayerAddress (IPv4) + TEID/bytes %% GTP-TEID + >>. + +initial_context_setup_rsp_test() -> + %% Original input data + TEID = << 16#00, 16#00, 16#00, 16#01 >>, + OrigTLA = << 16#c0, 16#a8, 16#02, 16#cb >>, + OrigData = initial_context_setup_rsp_pdu(OrigTLA, TEID), + + %% Expected output data + ExpData = initial_context_setup_rsp_pdu(?EXP_ADDR_BIN, TEID), + + application:set_env(osmo_s1gw, s1gw_bind_addr, ?EXP_ADDR_STR), + ?assertEqual(ExpData, s1ap_proxy:handle_pdu(OrigData)). + %% vim:set ts=4 sw=4 et: -- To view, visit
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37104?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Ia0d8f8d81756bcce5f518caee8887cf5822aaa08 Gerrit-Change-Number: 37104 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 year
1
0
0
0
[M] Change in ...osmo-s1gw[master]: s1ap_proxy: implement patching of E-RAB MODIFICATION IND
by osmith
osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37103?usp=email
) Change subject: s1ap_proxy: implement patching of E-RAB MODIFICATION IND ...................................................................... s1ap_proxy: implement patching of E-RAB MODIFICATION IND Change-Id: I054b874b39d4e39a51c00385d1553da065131047 --- M src/s1ap_proxy.erl M test/s1ap_proxy_test.erl 2 files changed, 71 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/03/37103/1 diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl index f24f3c8..0c6cba0 100644 --- a/src/s1ap_proxy.erl +++ b/src/s1ap_proxy.erl @@ -91,7 +91,7 @@ end. -%% E-RAB SETUP REQUEST +%% 9.1.3.1 E-RAB SETUP REQUEST handle_pdu(Data, {Outcome = initiatingMessage, #'InitiatingMessage'{procedureCode = ?'id-E-RABSetup', value = Content} = Pdu}) -> @@ -101,7 +101,7 @@ NewContent = Content#'E-RABSetupRequest'{protocolIEs = IEs}, handle_pdu_new(Data, {Outcome, Pdu#'InitiatingMessage'{value = NewContent}}); -%% E-RAB SETUP RESPONSE +%% 9.1.3.2 E-RAB SETUP RESPONSE handle_pdu(Data, {Outcome = successfulOutcome, #'SuccessfulOutcome'{procedureCode = ?'id-E-RABSetup', value = Content} = Pdu}) -> @@ -111,6 +111,19 @@ NewContent = Content#'E-RABSetupResponse'{protocolIEs = IEs}, handle_pdu_new(Data, {Outcome, Pdu#'SuccessfulOutcome'{value = NewContent}}); +%% 9.1.3.8 E-RAB MODIFICATION INDICATION +handle_pdu(Data, {Outcome = initiatingMessage, + #'InitiatingMessage'{procedureCode = ?'id-E-RABModificationIndication', + value = Content} = Pdu}) -> + logger:debug("Patching E-RAB MODIFICATION INDICATION"), + IEs = Content#'E-RABModificationIndication'.protocolIEs, + %% E-RAB to be Modified List + IEs1 = handle_ies(IEs, ?'id-E-RABToBeModifiedListBearerModInd'), + %% E-RAB not to be Modified List + IEs2 = handle_ies(IEs1, ?'id-E-RABNotToBeModifiedListBearerModInd'), + NewContent = Content#'E-RABModificationIndication'{protocolIEs = IEs2}, + handle_pdu_new(Data, {Outcome, Pdu#'InitiatingMessage'{value = NewContent}}); + %% Proxy all other messages unmodified handle_pdu(Data, _Pdu) -> Data. @@ -143,6 +156,29 @@ TLA = transp_layer_addr(s1gw_bind_addr), Content#'E-RABSetupItemBearerSURes'{transportLayerAddress = TLA}; +%% E-RAB MODIFICATION INDICATION related IEs +handle_ie(#'ProtocolIE-Field'{id = ?'id-E-RABToBeModifiedListBearerModInd', + value = Content}) -> + %% This IE contains a list of BearerModInd, so patch inner IEs + handle_ies(Content, ?'id-E-RABToBeModifiedItemBearerModInd'); + +handle_ie(#'ProtocolIE-Field'{id = ?'id-E-RABToBeModifiedItemBearerModInd', + value = Content}) -> + %% eNB -> MME direction: we pass our MME facing local address + TLA = transp_layer_addr(mme_loc_addr), + Content#'E-RABToBeModifiedItemBearerModInd'{transportLayerAddress = TLA}; + +handle_ie(#'ProtocolIE-Field'{id = ?'id-E-RABNotToBeModifiedListBearerModInd', + value = Content}) -> + %% This IE contains a list of BearerModInd, so patch inner IEs + handle_ies(Content, ?'id-E-RABNotToBeModifiedItemBearerModInd'); + +handle_ie(#'ProtocolIE-Field'{id = ?'id-E-RABNotToBeModifiedItemBearerModInd', + value = Content}) -> + %% eNB -> MME direction: we pass our MME facing local address + TLA = transp_layer_addr(mme_loc_addr), + Content#'E-RABNotToBeModifiedItemBearerModInd'{transportLayerAddress = TLA}; + %% Catch-all variant, which should not be called normally handle_ie(#'ProtocolIE-Field'{value = Content} = IE) -> logger:error("[BUG] Unhandled S1AP IE: ~p", [IE]), diff --git a/test/s1ap_proxy_test.erl b/test/s1ap_proxy_test.erl index 2bc8392..4123085 100644 --- a/test/s1ap_proxy_test.erl +++ b/test/s1ap_proxy_test.erl @@ -86,4 +86,28 @@ application:set_env(osmo_s1gw, s1gw_bind_addr, ?EXP_ADDR_STR), ?assertEqual(ExpData, s1ap_proxy:handle_pdu(OrigData)). + +%% [eNB -> MME] E-RAB MODIFICATION INDICATION +e_rab_modify_ind_pdu(TLA, TEID) when is_binary(TLA), + is_binary(TEID) -> + << 16#00, 16#32, 16#00, 16#24, 16#00, 16#00, 16#03, 16#00, + 16#00, 16#00, 16#02, 16#00, 16#02, 16#00, 16#08, 16#00, + 16#04, 16#80, 16#06, 16#69, 16#2d, 16#00, 16#c7, 16#00, + 16#0f, 16#00, 16#00, 16#c8, 16#00, 16#0a, 16#0a, 16#1f, + TLA/bytes, %% transportLayerAddress (IPv4) + TEID/bytes %% GTP-TEID + >>. + +e_rab_modify_ind_test() -> + %% Original input data + TEID = << 16#3d, 16#b0, 16#b5, 16#1d >>, + OrigTLA = << 16#c0, 16#a8, 16#12, 16#c6 >>, + OrigData = e_rab_modify_ind_pdu(OrigTLA, TEID), + + %% Expected output data + ExpData = e_rab_modify_ind_pdu(?EXP_ADDR_BIN, TEID), + + application:set_env(osmo_s1gw, mme_loc_addr, ?EXP_ADDR_STR), + ?assertEqual(ExpData, s1ap_proxy:handle_pdu(OrigData)). + %% vim:set ts=4 sw=4 et: -- To view, visit
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37103?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I054b874b39d4e39a51c00385d1553da065131047 Gerrit-Change-Number: 37103 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 year
1
0
0
0
[S] Change in ...osmo-s1gw[master]: gitreview: update project path
by osmith
osmith has submitted this change. (
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37101?usp=email
) Change subject: gitreview: update project path ...................................................................... gitreview: update project path Change-Id: I551c2c7ea367b9ca20dcf72035c6094dc469dca9 --- M .gitreview 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: osmith: Looks good to me, approved; Verified diff --git a/.gitreview b/.gitreview index e18ecea..8b088d4 100644 --- a/.gitreview +++ b/.gitreview @@ -1,3 +1,3 @@ [gerrit]
host=gerrit.osmocom.org
-project=osmo-s1gw +project=erlang/osmo-s1gw -- To view, visit
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37101?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I551c2c7ea367b9ca20dcf72035c6094dc469dca9 Gerrit-Change-Number: 37101 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: merged
1 year
1
0
0
0
← Newer
1
...
104
105
106
107
108
109
110
...
157
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
Results per page:
10
25
50
100
200