lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • 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
gerrit-log@lists.osmocom.org

June 2024

  • 1 participants
  • 1566 discussions
[M] Change in osmo-ttcn3-hacks[master]: library: de-duplicate SCTP related templates
by fixeria 11 Jun '24

11 Jun '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37197?usp=email ) Change subject: library: de-duplicate SCTP related templates ...................................................................... library: de-duplicate SCTP related templates Change-Id: Ic2a0cba0cfb1909ccbd1ade9565d508fd239f78c Related: SYS#6772 --- M library/DIAMETER_Emulation.ttcn M library/GTPv2_Emulation.ttcn M library/Iuh_Emulation.ttcn M library/S1AP_Emulation.ttcn M library/SGsAP_Emulation.ttcn M library/sbcap/SBC_AP_Adapter.ttcn M library/sbcap/SBC_AP_CodecPort.ttcn M stp/STP_Tests_M3UA.ttcn 8 files changed, 46 insertions(+), 130 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/97/37197/1 diff --git a/library/DIAMETER_Emulation.ttcn b/library/DIAMETER_Emulation.ttcn index 69107d4..e5698fd 100644 --- a/library/DIAMETER_Emulation.ttcn +++ b/library/DIAMETER_Emulation.ttcn @@ -39,6 +39,7 @@ import from IPL4asp_Types all; import from TCCConversion_Functions all; import from Native_Functions all; +import from SCTP_Templates all; type hexstring IMSI; @@ -308,24 +309,6 @@ } } -private template (value) SctpTuple ts_SCTP(template (omit) integer ppid := omit) := { - sinfo_stream := omit, - sinfo_ppid := ppid, - remSocks := omit, - assocId := omit -}; - -private template PortEvent tr_SctpAssocChange := { - sctpEvent := { - sctpAssocChange := ? - } -} -private template PortEvent tr_SctpPeerAddrChange := { - sctpEvent := { - sctpPeerAddrChange := ? - } -} - private function f_diameter_xceive(template (value) PDU_DIAMETER tx, template PDU_DIAMETER rx_t := ?) runs on DIAMETER_Emulation_CT return PDU_DIAMETER { @@ -341,7 +324,7 @@ mtc.stop; } [] DIAMETER.receive(tr_SctpAssocChange) { repeat; } - [] DIAMETER.receive(tr_SctpPeerAddrChange) { repeat; } + [] DIAMETER.receive(tr_SctpPeerAddrChange) { repeat; } [] T.timeout { setverdict(fail, "Timeout waiting for ", rx_t); mtc.stop; @@ -360,10 +343,12 @@ map(self:DIAMETER, system:DIAMETER_CODEC_PT); if (server_mode) { - res := DIAMETER_CodecPort_CtrlFunct.f_IPL4_listen(DIAMETER, p.local_ip, p.local_sctp_port, { sctp := valueof(ts_SCTP) }); + res := DIAMETER_CodecPort_CtrlFunct.f_IPL4_listen(DIAMETER, p.local_ip, p.local_sctp_port, + { sctp := valueof(ts_SctpTuple) }); } else { res := DIAMETER_CodecPort_CtrlFunct.f_IPL4_connect(DIAMETER, p.remote_ip, p.remote_sctp_port, - p.local_ip, p.local_sctp_port, -1, { sctp := valueof(ts_SCTP) }); + p.local_ip, p.local_sctp_port, -1, + { sctp := valueof(ts_SctpTuple) }); } if (not ispresent(res.connId)) { setverdict(fail, "Could not connect DIAMETER socket, check your configuration"); @@ -459,7 +444,7 @@ } } [] DIAMETER.receive(tr_SctpAssocChange) { } - [] DIAMETER.receive(tr_SctpPeerAddrChange) { } + [] DIAMETER.receive(tr_SctpPeerAddrChange) { } [] DIAMETER_PROC.getcall(DIAMETEREM_register_imsi:{?,?}) -> param(imsi, vc_conn) { f_create_expect(imsi, vc_conn); DIAMETER_PROC.reply(DIAMETEREM_register_imsi:{imsi, vc_conn}) to vc_conn; diff --git a/library/GTPv2_Emulation.ttcn b/library/GTPv2_Emulation.ttcn index f3f09f8..15720f9 100644 --- a/library/GTPv2_Emulation.ttcn +++ b/library/GTPv2_Emulation.ttcn @@ -21,6 +21,7 @@ import from GTPv2_Templates all; import from GTPv2_CodecPort all; import from GTPv2_CodecPort_CtrlFunct all; +import from SCTP_Templates all; import from UECUPS_Types all; import from UECUPS_CodecPort all; @@ -431,13 +432,6 @@ return false; } -private template (value) SctpTuple ts_SCTP(template (omit) integer ppid := omit) := { - sinfo_stream := omit, - sinfo_ppid := ppid, - remSocks := omit, - assocId := omit -}; - function tr_UECUPS_RecvFrom_R(template PDU_UECUPS msg) runs on GTPv2_Emulation_CT return template UECUPS_RecvFrom { var template UECUPS_RecvFrom mrf := { @@ -452,17 +446,6 @@ } -private template PortEvent tr_SctpAssocChange := { - sctpEvent := { - sctpAssocChange := ? - } -} -private template PortEvent tr_SctpPeerAddrChange := { - sctpEvent := { - sctpPeerAddrChange := ? - } -} - private function f_uecups_xceive(template (value) PDU_UECUPS tx, template PDU_UECUPS rx_t := ?, float time_out := 10.0) runs on GTPv2_Emulation_CT return PDU_UECUPS { @@ -474,7 +457,7 @@ alt { [] UECUPS.receive(tr_UECUPS_RecvFrom_R(rx_t)) -> value mrf { } [] UECUPS.receive(tr_SctpAssocChange) { repeat; } - [] UECUPS.receive(tr_SctpPeerAddrChange) { repeat; } + [] UECUPS.receive(tr_SctpPeerAddrChange) { repeat; } [] T.timeout { setverdict(fail, "Timeout waiting for ", rx_t); mtc.stop; @@ -504,7 +487,8 @@ if (g_gtp2_cfg.use_gtpu_daemon) { map(self:UECUPS, system:UECUPS); - res := UECUPS_CodecPort_CtrlFunct.f_IPL4_connect(UECUPS, mp_uecups_host, mp_uecups_port, "", -1, -1, { sctp := valueof(ts_SCTP) }); + res := UECUPS_CodecPort_CtrlFunct.f_IPL4_connect(UECUPS, mp_uecups_host, mp_uecups_port, "", -1, -1, + { sctp := valueof(ts_SctpTuple) }); if (not ispresent(res.connId)) { setverdict(fail, "Could not connect UECUPS socket, check your configuration"); testcase.stop; diff --git a/library/Iuh_Emulation.ttcn b/library/Iuh_Emulation.ttcn index e05afe5..e1f283f 100644 --- a/library/Iuh_Emulation.ttcn +++ b/library/Iuh_Emulation.ttcn @@ -31,6 +31,7 @@ import from RUA_IEs all; import from RUA_Templates all; import from Iuh_Types all; +import from SCTP_Templates all; import from General_Types all; import from Misc_Helpers all; @@ -95,24 +96,6 @@ return mrf; } -private template (value) SctpTuple ts_SCTP(template (omit) integer ppid := omit) := { - sinfo_stream := omit, - sinfo_ppid := ppid, - remSocks := omit, - assocId := omit -}; - -private template PortEvent tr_SctpAssocChange := { - sctpEvent := { - sctpAssocChange := ? - } -} -private template PortEvent tr_SctpPeerAddrChange := { - sctpEvent := { - sctpPeerAddrChange := ? - } -} - private function emu_is_server() runs on Iuh_Emulation_CT return boolean { return g_pars.remote_sctp_port == -1 } @@ -148,10 +131,12 @@ map(self:Iuh, system:Iuh_CODEC_PT); if (emu_is_server()) { - res := Iuh_CodecPort_CtrlFunct.f_IPL4_listen(Iuh, p.local_ip, p.local_sctp_port, { sctp := valueof(ts_SCTP) }); + res := Iuh_CodecPort_CtrlFunct.f_IPL4_listen(Iuh, p.local_ip, p.local_sctp_port, + { sctp := valueof(ts_SctpTuple) }); } else { res := Iuh_CodecPort_CtrlFunct.f_IPL4_connect(Iuh, p.remote_ip, p.remote_sctp_port, - p.local_ip, p.local_sctp_port, -1, { sctp := valueof(ts_SCTP) }); + p.local_ip, p.local_sctp_port, -1, + { sctp := valueof(ts_SctpTuple) }); } if (not ispresent(res.connId)) { f_shutdown(__FILE__, __LINE__, fail, "Could not connect Iuh socket, check your configuration"); diff --git a/library/S1AP_Emulation.ttcn b/library/S1AP_Emulation.ttcn index 955c690..3cce091 100644 --- a/library/S1AP_Emulation.ttcn +++ b/library/S1AP_Emulation.ttcn @@ -40,6 +40,7 @@ import from S1AP_PDU_Descriptions all; import from S1AP_IEs all; import from S1AP_Templates all; +import from SCTP_Templates all; import from NAS_EPS_Types all; import from NAS_Templates all; @@ -288,24 +289,6 @@ } } -private template (value) SctpTuple ts_SCTP(template (omit) integer ppid := 18) := { - sinfo_stream := omit, - sinfo_ppid := ppid, - remSocks := omit, - assocId := omit -}; - -private template PortEvent tr_SctpAssocChange := { - sctpEvent := { - sctpAssocChange := ? - } -} -private template PortEvent tr_SctpPeerAddrChange := { - sctpEvent := { - sctpPeerAddrChange := ? - } -} - private function f_s1ap_xceive(template (value) S1AP_PDU tx, template S1AP_PDU rx_t := ?) runs on S1AP_Emulation_CT return S1AP_PDU { @@ -412,10 +395,12 @@ map(self:S1AP, system:S1AP_CODEC_PT); if (p.remote_sctp_port == -1) { - res := S1AP_CodecPort_CtrlFunct.f_IPL4_listen(S1AP, p.local_ip, p.local_sctp_port, { sctp := valueof(ts_SCTP) }); + res := S1AP_CodecPort_CtrlFunct.f_IPL4_listen(S1AP, p.local_ip, p.local_sctp_port, + { sctp := valueof(ts_SctpTuple(18)) }); } else { res := S1AP_CodecPort_CtrlFunct.f_IPL4_connect(S1AP, p.remote_ip, p.remote_sctp_port, - p.local_ip, p.local_sctp_port, -1, { sctp := valueof(ts_SCTP) }); + p.local_ip, p.local_sctp_port, -1, + { sctp := valueof(ts_SctpTuple(18)) }); } if (not ispresent(res.connId)) { setverdict(fail, "Could not connect S1AP socket, check your configuration"); diff --git a/library/SGsAP_Emulation.ttcn b/library/SGsAP_Emulation.ttcn index b860fe2..bb125a5 100644 --- a/library/SGsAP_Emulation.ttcn +++ b/library/SGsAP_Emulation.ttcn @@ -31,6 +31,7 @@ import from SGsAP_CodecPort_CtrlFunct all; import from SGsAP_Types all; import from SGsAP_Templates all; +import from SCTP_Templates all; import from Osmocom_Types all; import from IPL4asp_Types all; import from DNS_Helpers all; @@ -245,24 +246,6 @@ return omit; } -private template (value) SctpTuple ts_SCTP(template (omit) integer ppid := omit) := { - sinfo_stream := omit, - sinfo_ppid := ppid, - remSocks := omit, - assocId := omit -}; - -private template PortEvent tr_SctpAssocChange := { - sctpEvent := { - sctpAssocChange := ? - } -} -private template PortEvent tr_SctpPeerAddrChange := { - sctpEvent := { - sctpPeerAddrChange := ? - } -} - private function f_sgsap_xceive(template (value) PDU_SGsAP tx, template PDU_SGsAP rx_t := ?) runs on SGsAP_Emulation_CT return PDU_SGsAP { @@ -290,10 +273,12 @@ map(self:SGsAP, system:SGsAP_CODEC_PT); if (p.remote_sctp_port == -1) { - res := SGsAP_CodecPort_CtrlFunct.f_IPL4_listen(SGsAP, p.local_ip, p.local_sctp_port, { sctp := valueof(ts_SCTP) }); + res := SGsAP_CodecPort_CtrlFunct.f_IPL4_listen(SGsAP, p.local_ip, p.local_sctp_port, + { sctp := valueof(ts_SctpTuple) }); } else { res := SGsAP_CodecPort_CtrlFunct.f_IPL4_connect(SGsAP, p.remote_ip, p.remote_sctp_port, - p.local_ip, p.local_sctp_port, -1, { sctp := valueof(ts_SCTP) }); + p.local_ip, p.local_sctp_port, -1, + { sctp := valueof(ts_SctpTuple) }); } if (not ispresent(res.connId)) { setverdict(fail, "Could not connect SGsAP socket, check your configuration"); diff --git a/library/sbcap/SBC_AP_Adapter.ttcn b/library/sbcap/SBC_AP_Adapter.ttcn index 515a723..5adb648 100644 --- a/library/sbcap/SBC_AP_Adapter.ttcn +++ b/library/sbcap/SBC_AP_Adapter.ttcn @@ -21,6 +21,7 @@ import from IPL4asp_Types all; import from IPL4asp_PortType all; import from Socket_API_Definitions all; +import from SCTP_Templates all; import from Misc_Helpers all; @@ -34,25 +35,14 @@ var IPL4asp_Types.ConnectionId g_SBC_AP_conn_id[NUM_SBC_AP] := { -1, -1, -1 }; } -private template Socket_API_Definitions.PortEvent tr_SctpAssocChange_COMM_UP(IPL4asp_Types.ConnectionId id) := { - sctpEvent := { - sctpAssocChange := { - clientId := id, - proto := { - sctp := ? - }, - sac_state := SCTP_COMM_UP - } - } -} - function f_connect(charstring remote_host, IPL4asp_Types.PortNumber remote_port, charstring local_host, IPL4asp_Types.PortNumber local_port, integer idx := 0) runs on SBC_AP_Adapter_CT { var IPL4asp_Types.Result res; map(self:SBC_AP[idx], system:SBC_AP); res := SBC_AP_CodecPort_CtrlFunct.f_IPL4_connect(SBC_AP[idx], remote_host, remote_port, - local_host, local_port, 0, { sctp := valueof(ts_SBC_AP_SctpTuple) }); + local_host, local_port, 0, + { sctp := c_SBC_AP_SctpTuple }); if (not ispresent(res.connId)) { setverdict(fail, "Could not connect to SBC_AP port, check your configuration"); mtc.stop; @@ -61,7 +51,7 @@ timer Tcommup := 10.0; Tcommup.start; alt { - [] SBC_AP[idx].receive(tr_SctpAssocChange_COMM_UP(g_SBC_AP_conn_id[idx])) {} + [] SBC_AP[idx].receive(tr_SctpAssocChange(SCTP_COMM_UP, g_SBC_AP_conn_id[idx])) {} [] Tcommup.timeout { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting SCTP_COMM_UP"); } @@ -73,7 +63,8 @@ runs on SBC_AP_Adapter_CT { var IPL4asp_Types.Result res; map(self:SBC_AP[idx], system:SBC_AP); - res := SBC_AP_CodecPort_CtrlFunct.f_IPL4_listen(SBC_AP[idx], local_host, local_port, { sctp := valueof(ts_SBC_AP_SctpTuple) }); + res := SBC_AP_CodecPort_CtrlFunct.f_IPL4_listen(SBC_AP[idx], local_host, local_port, + { sctp := c_SBC_AP_SctpTuple }); g_SBC_AP_conn_id[idx] := res.connId; } @@ -87,7 +78,7 @@ timer Tcommup := 10.0; Tcommup.start; alt { - [] SBC_AP[idx].receive(tr_SctpAssocChange_COMM_UP(g_SBC_AP_conn_id[idx])) {} + [] SBC_AP[idx].receive(tr_SctpAssocChange(SCTP_COMM_UP, g_SBC_AP_conn_id[idx])) {} [] Tcommup.timeout { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting SCTP_COMM_UP"); } diff --git a/library/sbcap/SBC_AP_CodecPort.ttcn b/library/sbcap/SBC_AP_CodecPort.ttcn index bd17031..881e189 100644 --- a/library/sbcap/SBC_AP_CodecPort.ttcn +++ b/library/sbcap/SBC_AP_CodecPort.ttcn @@ -32,7 +32,7 @@ SBC_AP_PDU msg }; - template (value) SctpTuple ts_SBC_AP_SctpTuple := { + const SctpTuple c_SBC_AP_SctpTuple := { sinfo_stream := omit, sinfo_ppid := c_SBC_AP_PPID, remSocks := omit, @@ -65,7 +65,7 @@ private function SBC_AP_to_IPL4_Send(in SBC_AP_Send pin, out ASP_Send pout) { pout.connId := pin.connId; pout.proto := { - sctp := valueof(ts_SBC_AP_SctpTuple) + sctp := c_SBC_AP_SctpTuple }; pout.msg := enc_SBC_AP_PDU(pin.msg); } with { extension "prototype(fast)" }; diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn index 24b3ae1..9c45a32 100644 --- a/stp/STP_Tests_M3UA.ttcn +++ b/stp/STP_Tests_M3UA.ttcn @@ -33,6 +33,7 @@ import from SCCP_Templates all; import from SCCPasp_Types all; import from SCCP_Emulation all; +import from SCTP_Templates all; import from STP_Tests_Common all; @@ -151,16 +152,6 @@ var integer g_m3ua_conn_id[NR_M3UA+NR_M3UA_SRV]; } -private template PortEvent tr_SctpAssocChange := { - sctpEvent := { - sctpAssocChange := ? - } -} -private template PortEvent tr_SctpPeerAddrChange := { - sctpEvent := { - sctpPeerAddrChange := ? - } -} private template PortEvent tr_ConnOpened := { connOpened := ? } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37197?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic2a0cba0cfb1909ccbd1ade9565d508fd239f78c Gerrit-Change-Number: 37197 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: s1gw: f_ConnHdlr_connect(): wait for SCTP_COMM_UP event
by fixeria 11 Jun '24

11 Jun '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37198?usp=email ) Change subject: s1gw: f_ConnHdlr_connect(): wait for SCTP_COMM_UP event ...................................................................... s1gw: f_ConnHdlr_connect(): wait for SCTP_COMM_UP event Change-Id: I953e3527fd3abef9efc7365544296a3df0b8f59f Related: SYS#6772 --- M s1gw/S1GW_Tests.ttcn M s1gw/gen_links.sh 2 files changed, 27 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/37198/1 diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index 6b569eb..6237557 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -28,6 +28,7 @@ import from S1AP_PDU_Contents all; import from S1AP_Constants all; +import from SCTP_Templates all; import from S1AP_Server all; modulepar { @@ -98,8 +99,11 @@ function f_ConnHdlr_connect() runs on ConnHdlr { var Result res; + timer T; map(self:S1AP_ENB, system:S1AP_CODEC_PT); + + /* initiate SCTP connection establishment */ res := S1AP_CodecPort_CtrlFunct.f_IPL4_connect(S1AP_ENB, mp_s1gw_ip, 36412, "0.0.0.0", 0, -1, @@ -110,7 +114,18 @@ } g_s1ap_conn_id := res.connId; - log("eNB connection established"); + /* wait for the establishment confirmation */ + T.start(2.0); + alt { + [] S1AP_ENB.receive(tr_SctpAssocChange(SCTP_COMM_UP, g_s1ap_conn_id)) { + log("eNB connection established"); + } + [] S1AP_ENB.receive(PortEvent:{sctpEvent := ?}) { repeat; } + [] T.timeout { + setverdict(fail, "eNB connection establishment timeout"); + self.stop; + } + } } function f_ConnHdlr_disconnect() runs on ConnHdlr { diff --git a/s1gw/gen_links.sh b/s1gw/gen_links.sh index 9587c59..fd54815 100755 --- a/s1gw/gen_links.sh +++ b/s1gw/gen_links.sh @@ -26,6 +26,7 @@ DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn " FILES+="S1AP_CodecPort.ttcn S1AP_CodecPort_CtrlFunctDef.cc S1AP_CodecPort_CtrlFunct.ttcn " +FILES+="SCTP_Templates.ttcn " gen_links $DIR $FILES ignore_pp_results -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37198?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I953e3527fd3abef9efc7365544296a3df0b8f59f Gerrit-Change-Number: 37198 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: s1gw: add TC_conn_term_{by_mme,mme_unavail}
by fixeria 11 Jun '24

11 Jun '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37199?usp=email ) Change subject: s1gw: add TC_conn_term_{by_mme,mme_unavail} ...................................................................... s1gw: add TC_conn_term_{by_mme,mme_unavail} Change-Id: I5ac2020160c914db0882f148469570cfb142b18d Related: SYS#6772 --- M s1gw/S1GW_Tests.ttcn 1 file changed, 70 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/99/37199/1 diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index 6237557..30dcd46 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -90,8 +90,10 @@ var ConnHdlr vc_conn; vc_conn := ConnHdlr.create("ConnHdlr-" & testcasename()); - connect(vc_conn:S1AP_CONN, vc_S1APSRV:S1AP_CLIENT); - connect(vc_conn:S1AP_PROC, vc_S1APSRV:S1AP_PROC); + if (vc_S1APSRV.running) { + connect(vc_conn:S1AP_CONN, vc_S1APSRV:S1AP_CLIENT); + connect(vc_conn:S1AP_PROC, vc_S1APSRV:S1AP_PROC); + } vc_conn.start(derefers(fn)(pars)); return vc_conn; @@ -214,9 +216,65 @@ } } + +/* MME terminates connection, expect S1GW to terminate the eNB connection */ +function f_TC_conn_term_by_mme(ConnHdlrPars pars) runs on ConnHdlr { + var Global_ENB_ID genb_id := valueof(ts_Global_ENB_ID(pars.seed)); + + f_ConnHdlr_register(genb_id); + + f_ConnHdlr_connect(); + f_ConnHdlr_setup(genb_id); + f_sleep(0.5); /* keep the connection idle for some time */ + + /* MME (S1AP_Server_CT) terminates connection */ + f_ConnHdlr_close_conn(genb_id); + /* expect our eNB connection to be released gracefully */ + S1AP_ENB.receive(tr_SctpShutDownEvent(g_s1ap_conn_id)); + S1AP_ENB.receive(tr_SctpAssocChange(SCTP_SHUTDOWN_COMP, g_s1ap_conn_id)); + S1AP_ENB.receive(PortEvent:{connClosed := ?}); + + f_ConnHdlr_unregister(genb_id); +} +testcase TC_conn_term_by_mme() runs on test_CT { + var ConnHdlrPars pars := { seed := 0 }; + var ConnHdlr vc_conn; + + f_init(); + f_init_s1ap_srv(); + + vc_conn := f_ConnHdlr_spawn(refers(f_TC_conn_term_by_mme), pars); + vc_conn.done; +} + + +/* MME is not available, expect S1GW to terminate the eNB connection */ +function f_TC_conn_term_mme_unavail(ConnHdlrPars pars) runs on ConnHdlr { + /* establish an eNB connection to the S1GW */ + f_ConnHdlr_connect(); + /* expect our eNB connection to be released gracefully */ + S1AP_ENB.receive(tr_SctpShutDownEvent(g_s1ap_conn_id)); + S1AP_ENB.receive(tr_SctpAssocChange(SCTP_SHUTDOWN_COMP, g_s1ap_conn_id)); + S1AP_ENB.receive(PortEvent:{connClosed := ?}); + setverdict(pass); +} +testcase TC_conn_term_mme_unavail() runs on test_CT { + var ConnHdlrPars pars := { seed := 0 }; + var ConnHdlr vc_conn; + + f_init(); + f_init_s1ap_srv(); + vc_S1APSRV.stop; + + vc_conn := f_ConnHdlr_spawn(refers(f_TC_conn_term_mme_unavail), pars); + vc_conn.done; +} + control { execute( TC_setup() ); execute( TC_setup_multi() ); + execute( TC_conn_term_by_mme() ); + execute( TC_conn_term_mme_unavail() ); } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37199?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5ac2020160c914db0882f148469570cfb142b18d Gerrit-Change-Number: 37199 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-abis[master]: rtp2trau_hr16: set CRC bits correctly
by falconia 11 Jun '24

11 Jun '24
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37180?usp=email ) Change subject: rtp2trau_hr16: set CRC bits correctly ...................................................................... rtp2trau_hr16: set CRC bits correctly The code previously failed to set the CRC bits in the TRAU frame output, containing a misleading comment that this operation is done by the TRAU frame encoding function (it isn't). Set these bits correctly in the rtp2trau step, like we do for EFR. Change-Id: I5c8aa5891e3862f978f14093bff46bd00b6702a5 --- M src/trau/trau_rtp_conv.c 1 file changed, 17 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index 21322fc..b8f554c 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -47,7 +47,7 @@ /* - * EFR TRAU parity + * EFR TRAU parity (also used for HR) * * g(x) = x^3 + x^1 + 1 */ @@ -461,11 +461,12 @@ tf->ufi = 0; else tf->ufi = 1; - /* CRC is computed by TRAU frame encoder */ if (data_len) osmo_pbit2ubit(tf->d_bits, data, GSM_HR_BYTES * 8); else memset(tf->d_bits, 0, GSM_HR_BYTES * 8); + /* CRC is *not* computed by TRAU frame encoder - we have to do it */ + osmo_crc8gen_set_bits(&gsm0860_efr_crc3, tf->d_bits, 44, tf->crc_bits); return 0; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37180?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I5c8aa5891e3862f978f14093bff46bd00b6702a5 Gerrit-Change-Number: 37180 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-abis[master]: TRAU->RTP: add support for TW-TS-001 & TW-TS-002
by falconia 11 Jun '24

11 Jun '24
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37156?usp=email ) Change subject: TRAU->RTP: add support for TW-TS-001 & TW-TS-002 ...................................................................... TRAU->RTP: add support for TW-TS-001 & TW-TS-002 The industry standard RTP payload formats of RFC 3551 and RFC 5993 drop valuable metadata from TRAU-UL frames of GSM 08.60 & 08.61, and disallow transport of marked-bad frames. Enhanced RTP transport formats of TW-TS-001 (FR & EFR) and TW-TS-002 (HR) restore these capabilities - however, because these formats are non-standard outside of Osmocom+Themyscira GSM networks, their use can only be optional. Add rtp_extensions member to struct osmo_trau2rtp_state, specifying the mask of RTP extensions to be used, just like we defined for AoIP BSSMAP and Abis-IP RSL, and extend osmo_trau2rtp() to emit these enhanced RTP formats when they are enabled. Related: OS#6448 Depends: I0eccfe5ddcf44f8f20440acb01e2d4870ec0cd91 (libosmocore) Change-Id: I7a6d13d406484c01210594bb6d2f0aff7c1341ab --- M TODO-RELEASE M include/osmocom/trau/trau_rtp.h M src/trau/trau_rtp_conv.c 3 files changed, 135 insertions(+), 29 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..e3ad20a 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,5 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmotrau struct osmo_trau2rtp_state extended (ABI break) +libosmogsm >1.9.0 rtp_extensions.h new header diff --git a/include/osmocom/trau/trau_rtp.h b/include/osmocom/trau/trau_rtp.h index f02d43e..6b2110f 100644 --- a/include/osmocom/trau/trau_rtp.h +++ b/include/osmocom/trau/trau_rtp.h @@ -24,6 +24,7 @@ struct osmo_trau2rtp_state { enum osmo_trau_frame_type type; + uint8_t rtp_extensions; }; diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index b8f554c..d3d1cae 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -26,6 +26,7 @@ #include <osmocom/core/crc8gen.h> #include <osmocom/codec/codec.h> +#include <osmocom/gsm/rtp_extensions.h> #include <osmocom/trau/trau_frame.h> #include <osmocom/trau/trau_rtp.h> @@ -100,20 +101,34 @@ * \param[in] out_len length of out buffer in bytes * \param[in] fr input TRAU frame in decoded form * \returns number of bytes generated in 'out'; negative on error. */ -static int trau2rtp_fr(uint8_t *out, size_t out_len, const struct osmo_trau_frame *tf) +static int trau2rtp_fr(uint8_t *out, size_t out_len, const struct osmo_trau_frame *tf, bool emit_twts001) { + size_t req_out_len = emit_twts001 ? GSM_FR_BYTES+1 : GSM_FR_BYTES; int i, j, k, l, o; if (tf->type != OSMO_TRAU16_FT_FR) return -EINVAL; + if (out_len < req_out_len) + return -ENOSPC; + /* FR Data Bits according to TS 48.060 Section 5.5.1.1.2 */ - if (tf->c_bits[11]) /* BFI */ - return 0; + /* Are we emitting TW-TS-001? If so, emit TRAU-like Extension Header */ + if (emit_twts001) { + uint8_t hdr_byte = 0xE0; - if (out_len < GSM_FR_BYTES) - return -ENOSPC; + if (tf->c_bits[16]) /* DTXd */ + hdr_byte |= 0x08; + if (tf->c_bits[11]) /* BFI */ + hdr_byte |= 0x02; + if (tf->c_bits[14]) /* TAF */ + hdr_byte |= 0x01; + *out++ = hdr_byte; + } + + if (tf->c_bits[11] && !emit_twts001) /* BFI without TW-TS-001 */ + return 0; out[0] = 0xd << 4; /* reassemble d-bits */ @@ -135,18 +150,30 @@ j++; } - return GSM_FR_BYTES; + return req_out_len; } -/* See Section 5.2 of RFC5993 */ -enum rtp_hr_ietf_ft { - FT_GOOD_SPEECH = 0, - FT_GOOD_SID = 2, - FT_NO_DATA = 7, +/* See Section 5.2 of RFC5993 and TW-TS-002 */ +enum super5993_ft { + FT_GOOD_SPEECH = 0, + FT_INVALID_SID = 1, + FT_GOOD_SID = 2, + FT_BFI_WITH_DATA = 6, + FT_NO_DATA = 7, }; static const uint8_t rtp_hr_sid[14] = { 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +static void twtw002_hr16_set_extra_flags(uint8_t *out, const struct osmo_trau_frame *tf) +{ + if (tf->c_bits[16]) /* DTXd */ + out[0] |= 0x08; + if (tf->ufi) /* UFI */ + out[0] |= 0x02; + if (tf->c_bits[14]) /* TAF */ + out[0] |= 0x01; +} + /*! Generate an RFC 5993 RTP payload for HR from a decoded 16k TRAU frame. * We previously emitted TS 101 318 format; however, RFC 5993 is the format * specified in TS 48.103 for AoIP, it can also be extended with TRAU-UL-like @@ -156,7 +183,7 @@ * \param[in] out_len length of out buffer in bytes * \param[in] tf input TRAU frame in decoded form * \returns number of bytes generated in 'out'; negative on error. */ -static int trau2rtp_hr16(uint8_t *out, size_t out_len, const struct osmo_trau_frame *tf) +static int trau2rtp_hr16(uint8_t *out, size_t out_len, const struct osmo_trau_frame *tf, bool emit_twts002) { enum osmo_gsm631_sid_class sidc; @@ -175,26 +202,46 @@ /* Plain RFC 5993 without TW-TS-002 extensions does not allow * BFI or invalid SID packets. */ - if (tf->c_bits[11] || sidc == OSMO_GSM631_SID_CLASS_INVALID) + if (!emit_twts002 && + (tf->c_bits[11] || sidc == OSMO_GSM631_SID_CLASS_INVALID)) goto bad_frame; + /* BFI turns valid SID into invalid */ + if (tf->c_bits[11] && sidc == OSMO_GSM631_SID_CLASS_VALID) + sidc = OSMO_GSM631_SID_CLASS_INVALID; + /* RFC 5993 Frame Type is equal to GSM 06.41 SID classification, - * restricted to just speech or valid SID per above. */ + * restricted to just speech or valid SID per above. Or if we + * emit TW-TS-002, that restriction is lifted. */ out[0] = sidc << 4; + if (emit_twts002) { + if (tf->c_bits[11] && sidc == OSMO_GSM631_SID_CLASS_SPEECH) + out[0] = FT_BFI_WITH_DATA << 4; + twtw002_hr16_set_extra_flags(out, tf); + /* invalid SID frames are truncated in TW-TS-002 */ + if (sidc == OSMO_GSM631_SID_CLASS_INVALID) + return 1; + } + /* TS 101 318 Section 5.2: The order of occurrence of the codec parameters in the buffer is * the same as order of occurrence over the Abis as defined in annex B of ETS 300 969 * [which is 3GPP TS 46.020 */ osmo_ubit2pbit(out + 1, tf->d_bits, 112); /* RFC 5993 requires SID frames to be perfect, error-free */ - if (sidc == OSMO_GSM631_SID_CLASS_VALID) + if (!emit_twts002 && sidc == OSMO_GSM631_SID_CLASS_VALID) osmo_hr_sid_reset(out + 1); return GSM_HR_BYTES_RTP_RFC5993; bad_frame: - return 0; + if (emit_twts002) { + out[0] = FT_NO_DATA << 4; + twtw002_hr16_set_extra_flags(out, tf); + return 1; + } else + return 0; } /*! Generate the 31 bytes RTP payload for GSM-EFR from a decoded TRAU frame. @@ -202,25 +249,36 @@ * \param[in] out_len length of out buffer in bytes * \param[in] fr input TRAU frame in decoded form * \returns number of bytes generated in 'out'; negative on error. */ -static int trau2rtp_efr(uint8_t *out, size_t out_len, const struct osmo_trau_frame *tf) +static int trau2rtp_efr(uint8_t *out, size_t out_len, const struct osmo_trau_frame *tf, bool emit_twts001) { + size_t req_out_len = emit_twts001 ? GSM_EFR_BYTES+1 : GSM_EFR_BYTES; int i, j, rc; ubit_t check_bits[26]; + uint8_t *twts001_hdr; + + if (out_len < req_out_len) + return -ENOSPC; if (tf->type != OSMO_TRAU16_FT_EFR) return -EINVAL; /* FR Data Bits according to TS 48.060 Section 5.5.1.1.2 */ - if (tf->c_bits[11]) /* BFI */ + /* Are we emitting TW-TS-001? If so, emit TRAU-like Extension Header */ + if (emit_twts001) { + twts001_hdr = out++; + *twts001_hdr = 0xE0; + if (tf->c_bits[16]) /* DTXd */ + *twts001_hdr |= 0x08; + if (tf->c_bits[11]) /* BFI */ + *twts001_hdr |= 0x02; + if (tf->c_bits[14]) /* TAF */ + *twts001_hdr |= 0x01; + } + + if (tf->c_bits[11] && !emit_twts001) /* BFI without TW-TS-001 */ return 0; - if (out_len < GSM_EFR_BYTES) - return -ENOSPC; - - if (tf->c_bits[11]) /* BFI */ - goto bad_frame; - out[0] = 0xc << 4; /* reassemble d-bits */ for (i = 1, j = 4; i < 39; i++, j++) @@ -259,9 +317,14 @@ if (rc) goto bad_frame; - return GSM_EFR_BYTES; + return req_out_len; + bad_frame: - return 0; + if (emit_twts001) { + *twts001_hdr |= 0x06; /* BFI and No_Data flags */ + return 1; + } else + return 0; } /* TS 48.060 Section 5.5.1.1.2 */ @@ -722,16 +785,32 @@ } #endif +static inline bool check_twts001(struct osmo_trau2rtp_state *st) +{ + if (st->rtp_extensions & OSMO_RTP_EXT_TWTS001) + return true; + else + return false; +} + +static inline bool check_twts002(struct osmo_trau2rtp_state *st) +{ + if (st->rtp_extensions & OSMO_RTP_EXT_TWTS002) + return true; + else + return false; +} + int osmo_trau2rtp(uint8_t *out, size_t out_len, const struct osmo_trau_frame *tf, struct osmo_trau2rtp_state *st) { switch (tf->type) { case OSMO_TRAU16_FT_FR: - return trau2rtp_fr(out, out_len, tf); + return trau2rtp_fr(out, out_len, tf, check_twts001(st)); case OSMO_TRAU16_FT_EFR: - return trau2rtp_efr(out, out_len, tf); + return trau2rtp_efr(out, out_len, tf, check_twts001(st)); case OSMO_TRAU16_FT_HR: - return trau2rtp_hr16(out, out_len, tf); + return trau2rtp_hr16(out, out_len, tf, check_twts002(st)); default: return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37156?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I7a6d13d406484c01210594bb6d2f0aff7c1341ab Gerrit-Change-Number: 37156 Gerrit-PatchSet: 5 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-abis[master]: trau2rtp_hr16: check CRC bits in the TRAU frame
by falconia 11 Jun '24

11 Jun '24
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37181?usp=email ) Change subject: trau2rtp_hr16: check CRC bits in the TRAU frame ...................................................................... trau2rtp_hr16: check CRC bits in the TRAU frame If CRC bits in the received TRAU frame are bad, the implication is that this frame must have got corrupted in E1 transport. In this case all other bits cannot be trusted, and we should deliver BFI-no-data to RTP. Change-Id: I4f97b67884ff7540be631298e5252d28f765fce9 --- M src/trau/trau_rtp_conv.c 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index d3d1cae..15d5a08 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -186,6 +186,7 @@ static int trau2rtp_hr16(uint8_t *out, size_t out_len, const struct osmo_trau_frame *tf, bool emit_twts002) { enum osmo_gsm631_sid_class sidc; + int rc; if (tf->type != OSMO_TRAU16_FT_HR) return -EINVAL; @@ -195,6 +196,12 @@ /* HR Data Bits according to TS 48.061 Section 5.1.4.1.1 */ + /* bad CRC means bad frame, no matter what else is going on */ + rc = osmo_crc8gen_check_bits(&gsm0860_efr_crc3, tf->d_bits, 44, + tf->crc_bits); + if (rc) + goto bad_frame; + sidc = (tf->c_bits[12] << 1) | tf->c_bits[13]; /* both C13 and C14 being set is invalid combination */ if (sidc > OSMO_GSM631_SID_CLASS_VALID) -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37181?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I4f97b67884ff7540be631298e5252d28f765fce9 Gerrit-Change-Number: 37181 Gerrit-PatchSet: 3 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-gsm-manuals[master]: add static SS7 routing example to cs7-config.adoc
by pespin 11 Jun '24

11 Jun '24
Attention is currently required from: laforge, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273?usp=email ) Change subject: add static SS7 routing example to cs7-config.adoc ...................................................................... Patch Set 6: Code-Review+1 (1 comment) File common/chapters/cs7-config.adoc: https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273/comment/cd8e1da8_1425… PS5, Line 375: For static routing, the M3UA port numbers must be fixed, i.e. there must be no `0` for a client's local port as in : `asp foo 2905 0 m3ua`. Instead, you may use `asp foo 2905 2905 m3ua`. > sorry for not noticing the response... […] With current state of things in libosmo-sccp (I think better management of IP addresses during socket creation also regarding primarys and so on) it should not be a problem, because you are using specific local-ip addresses, so the socket should not be announcing other IPs not listed there. So let's merge as is I guess. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I44afddf7004f5bf37eec706ca3da12c04f83f8fa Gerrit-Change-Number: 32273 Gerrit-PatchSet: 6 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: msuraev <msuraev(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 11 Jun 2024 15:55:13 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in ...osmo-s1gw[master]: sctp_proxy: add a safe wrapper for s1ap_proxy:handle_pdu/1
by fixeria 11 Jun '24

11 Jun '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37122?usp=email ) Change subject: sctp_proxy: add a safe wrapper for s1ap_proxy:handle_pdu/1 ...................................................................... sctp_proxy: add a safe wrapper for s1ap_proxy:handle_pdu/1 We want to keep the SCTP connection alive even if we hit a bug in s1ap_proxy:handle_pdu/1. Otherwise, all the PDN contexts of all the subscribers served by the respective eNB will be killed. Change-Id: Ie6a7c9ff40789695e37be11344f5ea97fbcb8cfa --- M src/sctp_proxy.erl 1 file changed, 27 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/sctp_proxy.erl b/src/sctp_proxy.erl index 9f9072b..29cc425 100644 --- a/src/sctp_proxy.erl +++ b/src/sctp_proxy.erl @@ -155,8 +155,7 @@ {[#sctp_sndrcvinfo{assoc_id = Aid}], Data}}, S) -> logger:debug("MME connection (id=~p, ~p:~p) -> eNB: ~p", [Aid, MmeAddr, MmePort, Data]), - sctp_server:send_data(maps:get(enb_aid, S), - s1ap_proxy:handle_pdu(Data)), + sctp_server:send_data(maps:get(enb_aid, S), handle_pdu(Data)), {keep_state, S}; %% Catch-all for other kinds of SCTP events @@ -193,10 +192,21 @@ %% private API %% ------------------------------------------------------------------ +%% A safe wrapper for s1ap_proxy:handle_pdu/1 +-spec handle_pdu(binary()) -> binary(). +handle_pdu(Data) when is_binary(Data) -> + try s1ap_proxy:handle_pdu(Data) of + NewData -> NewData + catch + Exception:Reason -> + logger:error("An exception occurred: ~p, ~p", [Exception, Reason]), + Data %% proxy as-is + end. + + %% Send a single message to the MME sctp_send(#{sock := Sock, mme_aid := Aid}, Data) -> - sctp_client:send_data({Sock, Aid}, - s1ap_proxy:handle_pdu(Data)). + sctp_client:send_data({Sock, Aid}, handle_pdu(Data)). %% Send pending messages to the MME -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37122?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: Ie6a7c9ff40789695e37be11344f5ea97fbcb8cfa Gerrit-Change-Number: 37122 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in ...osmo-s1gw[master]: sctp_proxy: add a safe wrapper for s1ap_proxy:handle_pdu/1
by fixeria 11 Jun '24

11 Jun '24
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37122?usp=email ) Change subject: sctp_proxy: add a safe wrapper for s1ap_proxy:handle_pdu/1 ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37122?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: Ie6a7c9ff40789695e37be11344f5ea97fbcb8cfa Gerrit-Change-Number: 37122 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 11 Jun 2024 15:50:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-abis[master]: TRAU->RTP: add support for TW-TS-001 & TW-TS-002
by pespin 11 Jun '24

11 Jun '24
Attention is currently required from: falconia. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37156?usp=email ) Change subject: TRAU->RTP: add support for TW-TS-001 & TW-TS-002 ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37156?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I7a6d13d406484c01210594bb6d2f0aff7c1341ab Gerrit-Change-Number: 37156 Gerrit-PatchSet: 5 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Tue, 11 Jun 2024 15:49:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • ...
  • 157
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.