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 -----
  • December
  • 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

August 2023

  • 1 participants
  • 1514 discussions
[S] Change in osmo-ci[master]: jobs: Add nightly job for ttcn3-dia2gsup-test
by fixeria 26 Aug '23

26 Aug '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/34214 ) Change subject: jobs: Add nightly job for ttcn3-dia2gsup-test ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/34214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Icb1a18da0daea1b481b4633eed2de817bfd5a15a Gerrit-Change-Number: 34214 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 26 Aug 2023 20:08:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: PCUIF_Components: add compatibility for PCU_IF_SAPI_AGCH_2
by fixeria 26 Aug '23

26 Aug '23
Attention is currently required from: dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34068 ) Change subject: PCUIF_Components: add compatibility for PCU_IF_SAPI_AGCH_2 ...................................................................... Patch Set 2: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34068/comment/233d6729_c1d3… PS2, Line 15: PCU_IF_SAPI_AGCH_DT Did you mean `PCU_IF_SAPI_AGCH_2` here? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34068 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: Ife67bde444d957822a953391b80d01d49fff064b Gerrit-Change-Number: 34068 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Sat, 26 Aug 2023 20:06:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in docker-playground[master]: debian-*-erlang: Install on libsctp-dev to enable sctp support in erl...
by laforge 26 Aug '23

26 Aug '23
Attention is currently required from: osmith, pespin, daniel. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/34200 ) Change subject: debian-*-erlang: Install on libsctp-dev to enable sctp support in erlang apps ...................................................................... Patch Set 2: (1 comment) Patchset: PS2: If this is a runtime dependency on the library itself, then why are we installing the development header files? The former is only required at compile time (of erlang), right? -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/34200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I5ca332f9064c16491116608577b3f68379d840e6 Gerrit-Change-Number: 34200 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Sat, 26 Aug 2023 07:28:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: diameter: Fix order of AVPs in tr_DIA_AIA
by laforge 26 Aug '23

26 Aug '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34211 ) Change subject: diameter: Fix order of AVPs in tr_DIA_AIA ...................................................................... diameter: Fix order of AVPs in tr_DIA_AIA Put them in the order they are specified and transmitted in the wire. Change-Id: Ib7ced55a5986e4b9b69529622625ae3694a4d44d --- M library/DIAMETER_Templates.ttcn 1 file changed, 14 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn index e13e31f..85725fc 100644 --- a/library/DIAMETER_Templates.ttcn +++ b/library/DIAMETER_Templates.ttcn @@ -1408,11 +1408,11 @@ ete_id := ete_id, avps := superset( tr_AVP_SessionId(sess_id), - tr_AVP_ResultCode(DIAMETER_SUCCESS), tr_AVP_AuthSessionState(NO_STATE_MAINTAINED), - tr_AVP_3GPP_AuthInfo(auth_info_contents), tr_AVP_OriginHost(orig_host), - tr_AVP_OriginRealm(orig_realm) + tr_AVP_OriginRealm(orig_realm), + tr_AVP_ResultCode(DIAMETER_SUCCESS), + tr_AVP_3GPP_AuthInfo(auth_info_contents) )); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34211 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: Ib7ced55a5986e4b9b69529622625ae3694a4d44d Gerrit-Change-Number: 34211 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: dia2gsup: Introduce initial testsuite
by laforge 26 Aug '23

26 Aug '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34213 ) Change subject: dia2gsup: Introduce initial testsuite ...................................................................... dia2gsup: Introduce initial testsuite This testsuite contains 1 working test so far. Related: OS#5757 Change-Id: Ia3db9fd62249777cd7c63f6c4af1568c79468728 --- M Makefile A dia2gsup/DIA2GSUP_Tests.cfg A dia2gsup/DIA2GSUP_Tests.default A dia2gsup/DIA2GSUP_Tests.ttcn A dia2gsup/gen_links.sh A dia2gsup/regen_makefile.sh 6 files changed, 327 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/Makefile b/Makefile index c399714..1d119d1 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ bts \ cbc \ ccid \ + dia2gsup \ fr \ fr-net \ gbproxy \ diff --git a/dia2gsup/DIA2GSUP_Tests.cfg b/dia2gsup/DIA2GSUP_Tests.cfg new file mode 100644 index 0000000..0c166fe --- /dev/null +++ b/dia2gsup/DIA2GSUP_Tests.cfg @@ -0,0 +1,19 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" +# testsuite specific configuration, not expected to change +"./DIA2GSUP_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] + + +[MODULE_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] +DIA2GSUP_Tests.control diff --git a/dia2gsup/DIA2GSUP_Tests.default b/dia2gsup/DIA2GSUP_Tests.default new file mode 100644 index 0000000..95b42e9 --- /dev/null +++ b/dia2gsup/DIA2GSUP_Tests.default @@ -0,0 +1,8 @@ +[LOGGING] +mtc.FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING; // | DEBUG_ENCDEC; + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] + +[EXECUTE] diff --git a/dia2gsup/DIA2GSUP_Tests.ttcn b/dia2gsup/DIA2GSUP_Tests.ttcn new file mode 100644 index 0000000..d709512 --- /dev/null +++ b/dia2gsup/DIA2GSUP_Tests.ttcn @@ -0,0 +1,217 @@ +module DIA2GSUP_Tests { + +import from General_Types all; +import from Osmocom_Types all; +import from L3_Common all; + +import from IPA_Emulation all; +import from GSUP_Emulation all; +import from GSUP_Types all; + +import from DIAMETER_Types all; +import from DIAMETER_Templates all; +import from DIAMETER_Emulation all; + +type component MTC_CT { + var DIAMETER_Emulation_CT vc_DIAMETER; + port DIAMETER_PT DIAMETER_UNIT; + port DIAMETEREM_PROC_PT DIAMETER_PROC; + + var GSUP_Emulation_CT vc_GSUP; + var IPA_Emulation_CT vc_GSUP_IPA; + port IPA_CTRL_PT GSUP_IPA_EVENT; + +}; + +type component D2G_ConnHdlr extends DIAMETER_ConnHdlr, GSUP_ConnHdlr { + var D2G_ConnHdlrPars g_pars; + timer g_Tguard := 30.0; +}; + +type record D2G_ConnHdlrPars { + hexstring imsi, + AuthVector vec optional +}; + +private function f_init_pars(integer imsi_suffix) +runs on MTC_CT return D2G_ConnHdlrPars { + var D2G_ConnHdlrPars pars := { + imsi := f_gen_imsi(imsi_suffix), + vec := f_gen_auth_vec_3g() + }; + return pars; +} + + +modulepar { + /* our emulated GSUP HLR */ + charstring mp_hlr_ip := "127.0.0.1"; + integer mp_hlr_port := 4222; + + /* our emulated MME */ + charstring mp_s6_local_ip := "127.0.0.100"; + integer mp_s6_local_port := 3868; + + /* IUT behaving as HSS */ + charstring mp_hss_ip := "127.0.0.4"; + integer mp_hss_port := 3868; + + charstring mp_diam_realm := "localdomain"; +} + +private altstep as_Tguard() runs on D2G_ConnHdlr { + [] g_Tguard.timeout { + setverdict(fail, "Tguard timeout"); + mtc.stop; + } +} + +private function f_init_gsup(charstring id) runs on MTC_CT { + id := id & "-GSUP"; + var GsupOps ops := { + create_cb := refers(GSUP_Emulation.ExpectedCreateCallback) + }; + + vc_GSUP_IPA := IPA_Emulation_CT.create(id & "-IPA"); + vc_GSUP := GSUP_Emulation_CT.create(id); + + map(vc_GSUP_IPA:IPA_PORT, system:IPA_CODEC_PT); + connect(vc_GSUP:GSUP, vc_GSUP_IPA:IPA_GSUP_PORT); + /* we use this hack to get events like ASP_IPA_EVENT_UP */ + connect(vc_GSUP_IPA:IPA_CTRL_PORT, self:GSUP_IPA_EVENT); + + vc_GSUP.start(GSUP_Emulation.main(ops, id)); + vc_GSUP_IPA.start(IPA_Emulation.main_server(mp_hlr_ip, mp_hlr_port)); + + /* wait for incoming connection to GSUP port before proceeding */ + timer T := 10.0; + T.start; + alt { + [] GSUP_IPA_EVENT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)) { } + [] T.timeout { + setverdict(fail, "No connection to GSUP Port"); + mtc.stop; + } + } +} + +private function f_init_handler(D2G_ConnHdlrPars pars, float t_guard := 20.0) runs on D2G_ConnHdlr { + g_pars := pars; + activate(as_Tguard()); + g_Tguard.start(t_guard); + + /* tell GSUP dispatcher to send this IMSI to us */ + f_create_gsup_expect(hex2str(g_pars.imsi)); +} + +private type function void_fn(charstring id, D2G_ConnHdlrPars pars) runs on D2G_ConnHdlr; + +private function f_start_handler_with_pars(void_fn fn, D2G_ConnHdlrPars pars) +runs on MTC_CT return D2G_ConnHdlr { + var D2G_ConnHdlr vc_conn; + var charstring id := testcasename(); + + vc_conn := D2G_ConnHdlr.create(id); + + connect(vc_conn:GSUP, vc_GSUP:GSUP_CLIENT); + connect(vc_conn:GSUP_PROC, vc_GSUP:GSUP_PROC); + + connect(vc_conn:DIAMETER, vc_DIAMETER:DIAMETER_CLIENT); + connect(vc_conn:DIAMETER_PROC, vc_DIAMETER:DIAMETER_PROC); + + DIAMETER_UNIT.receive(DiameterCapabilityExchgInd:?); + + vc_conn.start(derefers(fn)(id, pars)); + return vc_conn; +} + +private function DiameterForwardUnitdataCallback(PDU_DIAMETER msg) +runs on DIAMETER_Emulation_CT return template PDU_DIAMETER { + DIAMETER_UNIT.send(msg); + return omit; +} + +private function f_init_diameter(charstring id) runs on MTC_CT { + var DIAMETEROps ops := { + create_cb := refers(DIAMETER_Emulation.ExpectedCreateCallback), + unitdata_cb := refers(DiameterForwardUnitdataCallback), + raw := false /* handler mode (IMSI based routing) */ + }; + var DIAMETER_conn_parameters pars := { + remote_ip := mp_hss_ip, + remote_sctp_port := mp_hss_port, + local_ip := mp_s6_local_ip, + local_sctp_port := mp_s6_local_port, + origin_host := "hss." & mp_diam_realm, + origin_realm := mp_diam_realm, + auth_app_id := omit, + vendor_app_id := c_DIAMETER_3GPP_S6_AID + }; + vc_DIAMETER := DIAMETER_Emulation_CT.create(id); + map(vc_DIAMETER:DIAMETER, system:DIAMETER_CODEC_PT); + connect(vc_DIAMETER:DIAMETER_UNIT, self:DIAMETER_UNIT); + connect(vc_DIAMETER:DIAMETER_PROC, self:DIAMETER_PROC); + vc_DIAMETER.start(DIAMETER_Emulation.main(ops, pars, id)); +} + +private function f_init() runs on MTC_CT { + f_init_gsup(testcasename()); + f_init_diameter(testcasename()); +} + + +private function f_DIA_AI() runs on D2G_ConnHdlr { + var PDU_DIAMETER rx_dia; + var UINT32 hbh_id := f_rnd_octstring(4); + var UINT32 ete_id := f_rnd_octstring(4); + var octetstring sess_id := char2oct("foobar"); + var OCT3 vplmn := '00F110'O; + + /* Unlike AIR, AIA contains no IMSI. Register ete_id in DIAMETER_Emulation, + * so AIA is forwarded back to us in DIAMETER port instead of MTC_CT.DIAMETER_UNIT. + */ + f_diameter_expect_eteid(ete_id); + + /* Send AIR to translator; expect it to show up on GSUP side */ + DIAMETER.send(ts_DIA_AIR(g_pars.imsi, vplmn, sess_id, hbh_id := hbh_id, ete_id := ete_id)); + GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi)); + + /* Send a positive response back to the translator; expect AIA */ + var GSUP_IE auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G3G(g_pars.vec.rand, + g_pars.vec.sres, + g_pars.vec.kc, + g_pars.vec.ik, + g_pars.vec.ck, + g_pars.vec.autn, + g_pars.vec.res)); + GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple)); + + alt { + /* Unlike AIR, AIA contains no IMSI, hence it is received in DIAMETER_UNIT: */ + [] DIAMETER.receive(tr_DIA_AIA) { + setverdict(pass); + } + } +} + +private function f_TC_authinfo_normal(charstring id, D2G_ConnHdlrPars pars) runs on D2G_ConnHdlr { + f_init_handler(pars); + f_DIA_AI(); +} + +testcase TC_authinfo_normal() runs on MTC_CT { + var D2G_ConnHdlrPars pars := f_init_pars(1); + var D2G_ConnHdlr vc_conn; + f_init(); + f_sleep(10.0); + vc_conn := f_start_handler_with_pars(refers(f_TC_authinfo_normal), pars); + vc_conn.done; + setverdict(pass); +} + + +control { + execute ( TC_authinfo_normal() ); +} + +} diff --git a/dia2gsup/gen_links.sh b/dia2gsup/gen_links.sh new file mode 100755 index 0000000..d0002eb --- /dev/null +++ b/dia2gsup/gen_links.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +BASEDIR=../deps + +. ../gen_links.sh.inc + +DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" +FILES+=" TCCEncoding_Functions.ttcn TCCEncoding.cc " # GSM 7-bit coding +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src +FILES="Socket_API_Definitions.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.IPL4asp/src +FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.TELNETasp/src +FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.DIAMETER_ProtocolModule_Generator/src +FILES="DIAMETER_EncDec.cc" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.MobileL3_v13.4.0/src +#FILES="MobileL3_CC_Types.ttcn MobileL3_CommonIE_Types.ttcn MobileL3_GMM_SM_Types.ttcn MobileL3_MM_Types.ttcn MobileL3_RRM_Types.ttcn MobileL3_SMS_Types.ttcn MobileL3_SS_Types.ttcn MobileL3_Types.ttcn " +#FILES+="SS_DataTypes.asn SS_Errors.asn SS_Operations.asn SS_PDU_Defs.asn SS_Protocol.asn SS_Types.ttcn SS_EncDec.cc" +FILES="MobileL3_CommonIE_Types.ttcn MobileL3_GMM_SM_Types.ttcn MobileL3_MM_Types.ttcn " +gen_links $DIR $FILES + + +DIR=../library +FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc " +FILES+="Osmocom_CTRL_Types.ttcn " +FILES+="L3_Common.ttcn " +FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn DIAMETER_Templates.ttcn " +FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc +IPA_Emulation.ttcnpp " +FILES+="GSUP_Types.ttcn GSUP_Emulation.ttcn " +gen_links $DIR $FILES + +ignore_pp_results diff --git a/dia2gsup/regen_makefile.sh b/dia2gsup/regen_makefile.sh new file mode 100755 index 0000000..22d8e06 --- /dev/null +++ b/dia2gsup/regen_makefile.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +NAME=DIA2GSUP_Tests + +FILES=" + *.ttcn + *.ttcnpp + IPA_CodecPort_CtrlFunctDef.cc + IPL4asp_PT.cc + IPL4asp_discovery.cc + Native_FunctionDefs.cc + TCCConversion.cc + TCCEncoding.cc + TCCInterface.cc + TELNETasp_PT.cc + DIAMETER_EncDec.cc + DIAMETER_CodecPort_CtrlFunctDef.cc +" + +export CPPFLAGS_TTCN3=" + -DIPA_EMULATION_GSUP + -DIPA_EMULATION_CTRL +" + +../regen-makefile.sh DIA2GSUP_Tests.ttcn $FILES -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34213 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: Ia3db9fd62249777cd7c63f6c4af1568c79468728 Gerrit-Change-Number: 34213 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: DIAMETER_Emulation: Support forwarding messages identified by ete_id ...
by laforge 26 Aug '23

26 Aug '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34212 ) Change subject: DIAMETER_Emulation: Support forwarding messages identified by ete_id to a client component ...................................................................... DIAMETER_Emulation: Support forwarding messages identified by ete_id to a client component This is useful in the scenarios where the client component submits a IMSI-based transaction such as AIR, but its answer (AIA) contains no IMSI (as per what's specified in TS 29.272 5.2.3.1). As a result, the received AIA message would be enqueued in the DIAMETER_UNIT. With this new feature, the test can create an expect using the End-to-End Identifier of the message it is going to transmit, and receive the answer in the same DIAMETER_CLIENT port the request was transmitted, even if it contains no IMSI. Related: OS#5757 Change-Id: I25e44146d2c49e308c1fb490b499e70ac6045f2f --- M library/DIAMETER_Emulation.ttcn M mme/MME_Tests.ttcn M pgw/PGW_Tests.ttcn 3 files changed, 130 insertions(+), 15 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/library/DIAMETER_Emulation.ttcn b/library/DIAMETER_Emulation.ttcn index 6eb72ad..e7481ca 100644 --- a/library/DIAMETER_Emulation.ttcn +++ b/library/DIAMETER_Emulation.ttcn @@ -70,6 +70,12 @@ hexstring imsi optional }; +/* represents a single DIAMETER message identified by ete_id field */ +type record ETEIDData { + DIAMETER_ConnHdlr comp_ref, + UINT32 ete_id optional +}; + type component DIAMETER_Emulation_CT { /* Port facing to the UDP SUT */ port DIAMETER_CODEC_PT DIAMETER; @@ -79,6 +85,8 @@ port DIAMETER_Conn_PT DIAMETER_CLIENT; /* currently tracked connections */ var AssociationData DiameterAssocTable[256]; + /* Forward reply messages not containing IMSI to correct client port */ + var ETEIDData DiameterETEIDTable[256]; /* pending expected CRCX */ var ExpectData DiameterExpectTable[256]; /* procedure based port to register for incoming connections */ @@ -202,7 +210,6 @@ mtc.stop; } - private function f_imsi_table_init() runs on DIAMETER_Emulation_CT { for (var integer i := 0; i < sizeof(DiameterAssocTable); i := i+1) { @@ -211,6 +218,67 @@ } } +/* End-to-End ID table matching. */ +private function f_ete_id_known(UINT32 ete_id) +runs on DIAMETER_Emulation_CT return boolean { + var integer i; + for (i := 0; i < sizeof(DiameterETEIDTable); i := i+1) { + if (DiameterETEIDTable[i].ete_id == ete_id) { + return true; + } + } + return false; +} + +private function f_comp_by_ete_id(UINT32 ete_id) +runs on DIAMETER_Emulation_CT return DIAMETER_ConnHdlr { + var integer i; + for (i := 0; i < sizeof(DiameterETEIDTable); i := i+1) { + if (DiameterETEIDTable[i].ete_id == ete_id) { + return DiameterETEIDTable[i].comp_ref; + } + } + setverdict(fail, "DIAMETER ETEID Table not found by ete_id", ete_id); + mtc.stop; +} + +private function f_eteid_table_add(DIAMETER_ConnHdlr comp_ref, UINT32 ete_id) +runs on DIAMETER_Emulation_CT { + var integer i; + for (i := 0; i < sizeof(DiameterETEIDTable); i := i+1) { + if (not isvalue(DiameterETEIDTable[i].ete_id)) { + DiameterETEIDTable[i].ete_id := ete_id; + DiameterETEIDTable[i].comp_ref := comp_ref; + return; + } + } + testcase.stop("DIAMETER ETEID Table full!"); +} + +private function f_eteid_table_del(DIAMETER_ConnHdlr comp_ref, UINT32 ete_id) +runs on DIAMETER_Emulation_CT { + var integer i; + for (i := 0; i < sizeof(DiameterETEIDTable); i := i+1) { + if (DiameterETEIDTable[i].comp_ref == comp_ref and + DiameterETEIDTable[i].ete_id == ete_id) { + DiameterETEIDTable[i].ete_id := omit; + DiameterETEIDTable[i].comp_ref := null; + return; + } + } + setverdict(fail, "DIAMETER ETEID Table: Couldn't find to-be-deleted entry!"); + mtc.stop; +} + + +private function f_eteid_table_init() +runs on DIAMETER_Emulation_CT { + for (var integer i := 0; i < sizeof(DiameterETEIDTable); i := i+1) { + DiameterETEIDTable[i].comp_ref := null; + DiameterETEIDTable[i].ete_id := omit; + } +} + function f_DIAMETER_get_imsi(PDU_DIAMETER pdu) return template (omit) IMSI { var template (omit) AVP imsi_avp; @@ -280,6 +348,7 @@ var Result res; g_diameter_id := id; f_imsi_table_init(); + f_eteid_table_init(); f_expect_table_init(); map(self:DIAMETER, system:DIAMETER_CODEC_PT); @@ -311,6 +380,7 @@ var DIAMETER_ConnHdlr vc_conn; var template IMSI imsi_t; var hexstring imsi; + var UINT32 ete_id; var DIAMETER_RecvFrom mrf; var PDU_DIAMETER msg; var charstring vlr_name, mme_name; @@ -357,7 +427,13 @@ /* DIAMETER from remote peer (IMSI based routing) */ [not ops.raw] DIAMETER.receive(tr_DIAMETER_RecvFrom_R(?)) -> value mrf { imsi_t := f_DIAMETER_get_imsi(mrf.msg); - if (isvalue(imsi_t)) { + ete_id := mrf.msg.end_to_end_id; + if (f_ete_id_known(ete_id)) { + vc_conn := f_comp_by_ete_id(ete_id); + /* The ete_id is a single-time expect: */ + f_eteid_table_del(vc_conn, ete_id); + DIAMETER_CLIENT.send(mrf.msg) to vc_conn; + } else if (isvalue(imsi_t)) { imsi := valueof(imsi_t); if (f_imsi_known(imsi)) { vc_conn := f_comp_by_imsi(imsi); @@ -377,9 +453,13 @@ } [] DIAMETER.receive(tr_SctpAssocChange) { } [] DIAMETER.receive(tr_SctpPeerAddrChange) { } - [] DIAMETER_PROC.getcall(DIAMETEREM_register:{?,?}) -> param(imsi, vc_conn) { + [] DIAMETER_PROC.getcall(DIAMETEREM_register_imsi:{?,?}) -> param(imsi, vc_conn) { f_create_expect(imsi, vc_conn); - DIAMETER_PROC.reply(DIAMETEREM_register:{imsi, vc_conn}) to vc_conn; + DIAMETER_PROC.reply(DIAMETEREM_register_imsi:{imsi, vc_conn}) to vc_conn; + } + [] DIAMETER_PROC.getcall(DIAMETEREM_register_eteid:{?,?}) -> param(ete_id, vc_conn) { + f_eteid_table_add(vc_conn, ete_id); + DIAMETER_PROC.reply(DIAMETEREM_register_eteid:{ete_id, vc_conn}) to vc_conn; } } @@ -387,18 +467,29 @@ } } -/* "Expect" Handling */ +/* "E2E ID Expect" Handling */ +type record ExpectDataE2EID { + UINT32 ete_id optional, + DIAMETER_ConnHdlr vc_conn +} + +signature DIAMETEREM_register_eteid(in UINT32 ete_id, in DIAMETER_ConnHdlr hdlr); + +/* client/conn_hdlr side function to use procedure port to create expect in emulation */ +function f_diameter_expect_eteid(UINT32 ete_id) runs on DIAMETER_ConnHdlr { + DIAMETER_PROC.call(DIAMETEREM_register_eteid:{ete_id, self}) { + [] DIAMETER_PROC.getreply(DIAMETEREM_register_eteid:{?,?}) {}; + } +} + +/* "IMSI Expect" Handling */ type record ExpectData { hexstring imsi optional, DIAMETER_ConnHdlr vc_conn } -signature DIAMETEREM_register(in hexstring imsi, in DIAMETER_ConnHdlr hdlr); - -type port DIAMETEREM_PROC_PT procedure { - inout DIAMETEREM_register; -} with { extension "internal" }; +signature DIAMETEREM_register_imsi(in hexstring imsi, in DIAMETER_ConnHdlr hdlr); /* Function that can be used as create_cb and will use the expect table */ function ExpectedCreateCallback(PDU_DIAMETER msg, hexstring imsi, charstring id) @@ -446,9 +537,9 @@ } /* client/conn_hdlr side function to use procedure port to create expect in emulation */ -function f_diameter_expect(hexstring imsi) runs on DIAMETER_ConnHdlr { - DIAMETER_PROC.call(DIAMETEREM_register:{imsi, self}) { - [] DIAMETER_PROC.getreply(DIAMETEREM_register:{?,?}) {}; +function f_diameter_expect_imsi(hexstring imsi) runs on DIAMETER_ConnHdlr { + DIAMETER_PROC.call(DIAMETEREM_register_imsi:{imsi, self}) { + [] DIAMETER_PROC.getreply(DIAMETEREM_register_imsi:{?,?}) {}; } } @@ -466,6 +557,10 @@ return omit; } +type port DIAMETEREM_PROC_PT procedure { + inout DIAMETEREM_register_imsi; + inout DIAMETEREM_register_eteid; +} with { extension "internal" }; function f_diameter_wait_capability(DIAMETER_PT pt) { diff --git a/mme/MME_Tests.ttcn b/mme/MME_Tests.ttcn index 17a4d60..cc75377 100644 --- a/mme/MME_Tests.ttcn +++ b/mme/MME_Tests.ttcn @@ -361,7 +361,7 @@ g_Tguard.start(t_guard); activate(as_Tguard()); if (DIAMETER_PROC.checkstate("Connected")) { - f_diameter_expect(g_pars.ue_pars.imsi); + f_diameter_expect_imsi(g_pars.ue_pars.imsi); } if (SGsAP_PROC.checkstate("Connected")) { /* Route all SGsAP mesages for our IMSIto us */ diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn index 7bb6910..4730040 100644 --- a/pgw/PGW_Tests.ttcn +++ b/pgw/PGW_Tests.ttcn @@ -72,7 +72,7 @@ var PDU_DIAMETER msg; if (DIAMETER_PROC.checkstate("Connected")) { - f_diameter_expect(imsi); + f_diameter_expect_imsi(imsi); } while (true) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34212 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: I25e44146d2c49e308c1fb490b499e70ac6045f2f Gerrit-Change-Number: 34212 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: dia2gsup: Introduce initial testsuite
by laforge 26 Aug '23

26 Aug '23
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34213 ) Change subject: dia2gsup: Introduce initial testsuite ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34213 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: Ia3db9fd62249777cd7c63f6c4af1568c79468728 Gerrit-Change-Number: 34213 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 26 Aug 2023 07:27:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: DIAMETER_Emulation: Support forwarding messages identified by ete_id ...
by laforge 26 Aug '23

26 Aug '23
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34212 ) Change subject: DIAMETER_Emulation: Support forwarding messages identified by ete_id to a client component ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34212 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: I25e44146d2c49e308c1fb490b499e70ac6045f2f Gerrit-Change-Number: 34212 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 26 Aug 2023 07:26:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: diameter: Fix order of AVPs in tr_DIA_AIA
by laforge 26 Aug '23

26 Aug '23
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34211 ) Change subject: diameter: Fix order of AVPs in tr_DIA_AIA ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34211 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: Ib7ced55a5986e4b9b69529622625ae3694a4d44d Gerrit-Change-Number: 34211 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 26 Aug 2023 07:26:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: trxcon/l1sched: refactor l1sched_mframe_layout()
by laforge 26 Aug '23

26 Aug '23
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34216 ) Change subject: trxcon/l1sched: refactor l1sched_mframe_layout() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie1c3679879ef97d42237d6723d1619ac0ef97f6b Gerrit-Change-Number: 34216 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 26 Aug 2023 06:05:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • ...
  • 152
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.