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

September 2026

  • 1 participants
  • 1894 discussions
[S] Change in osmo-ttcn3-hacks[master]: IPAd: Add test to verify IPAd polling from two eIMs
by jolly 29 Sep '26

29 Sep '26
Attention is currently required from: jolly. Hello Jenkins Builder, dexter, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43657?usp=email to look at the new patch set (#6). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: IPAd: Add test to verify IPAd polling from two eIMs ...................................................................... IPAd: Add test to verify IPAd polling from two eIMs Provide an eIM configuration with two eIMs. Expect the IPAd to poll both eIMs for a package and processing it. Related: SYS#8101 Change-Id: I87d62196f7e0b96070d162faf8f382ebba3fa017 --- M ipad/IPAd_Tests.ttcn 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/57/43657/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43657?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I87d62196f7e0b96070d162faf8f382ebba3fa017 Gerrit-Change-Number: 43657 Gerrit-PatchSet: 6 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: IPAd: Add support for testing IPAd polling multiple eIMs
by jolly 29 Sep '26

29 Sep '26
Attention is currently required from: dexter, jolly, laforge. Hello Jenkins Builder, dexter, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43656?usp=email to look at the new patch set (#5). The following approvals got outdated and were removed: Code-Review+1 by dexter, Verified+1 by Jenkins Builder Change subject: IPAd: Add support for testing IPAd polling multiple eIMs ...................................................................... IPAd: Add support for testing IPAd polling multiple eIMs A record is used to generate and send an EimConfigurationDataResponse to the IPAd with multiple eIMs in the EimConfigurationData list. Tests can use this to verify that all eIMs are polled correctly. Note that all eIMs share the same FQDN by default. This makes the test cases easier, because they don't require different HTTP servers at a time or need to change the HTTP server address. Related: SYS#8101 Change-Id: I14c3f09a4c21d5f643e6e499a095410b6c8f02ed --- M ipad/IPAd_Tests.ttcn M library/euicc/SGP32Definitions_Templates.ttcn 2 files changed, 57 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/56/43656/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43656?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I14c3f09a4c21d5f643e6e499a095410b6c8f02ed Gerrit-Change-Number: 43656 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: IPAd: Add test to verify IPAd polling non forbidden eIMs only
by jolly 29 Sep '26

29 Sep '26
Attention is currently required from: dexter, jolly, laforge. Hello Jenkins Builder, dexter, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43706?usp=email to look at the new patch set (#5). The following approvals got outdated and were removed: Code-Review+2 by dexter, Verified+1 by Jenkins Builder The change is no longer submittable: Code-Review and Verified are unsatisfied now. Change subject: IPAd: Add test to verify IPAd polling non forbidden eIMs only ...................................................................... IPAd: Add test to verify IPAd polling non forbidden eIMs only A command line options allows to block forbidden eIMs. Verify that the eIM with the given eIM ID is not polled. The other eIM is expected to be polled. Related: SYS#8101 Change-Id: Ib946fee6ad8a448cfa4411966e3d4927cbf30033 --- M ipad/IPAd_Tests.ttcn 1 file changed, 23 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/06/43706/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43706?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib946fee6ad8a448cfa4411966e3d4927cbf30033 Gerrit-Change-Number: 43706 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: IPAd: Remove unused variables
by jolly 29 Sep '26

29 Sep '26
Attention is currently required from: jolly. Hello Jenkins Builder, dexter, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43703?usp=email to look at the new patch set (#5). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: IPAd: Remove unused variables ...................................................................... IPAd: Remove unused variables Related: SYS#8101 Change-Id: I149c63901eef3cba658e35023fc456af04f36cda --- M ipad/IPAd_Tests.ttcn 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/03/43703/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43703?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I149c63901eef3cba658e35023fc456af04f36cda Gerrit-Change-Number: 43703 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu>
1 0
0 0
[M] Change in onomondo-ipa[master]: Add option to forbid polling given eIM(s)
by jolly 29 Sep '26

29 Sep '26
Attention is currently required from: dexter, laforge. jolly has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43705?usp=email ) Change subject: Add option to forbid polling given eIM(s) ...................................................................... Patch Set 2: (1 comment) Patchset: PS1: > As far as I understand, the eIMiD is indeed defined as a common name (FQDN), but it can also be an O […] Done -- To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43705?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ic6489207e54cdfff57cd214482ac4a071e154c94 Gerrit-Change-Number: 43705 Gerrit-PatchSet: 2 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: dexter <pmaier(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 29 Sep 2026 09:11:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: jolly <andreas(a)eversberg.eu> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[M] Change in pysim[master]: bip: UDP channels for CAT_TP
by laforge 29 Sep '26

29 Sep '26
Attention is currently required from: Hoernchen. laforge has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/pysim/+/43716?usp=email ) Change subject: bip: UDP channels for CAT_TP ...................................................................... Patch Set 1: Code-Review+1 (1 comment) Patchset: PS1: I'd say it's worth looking at dexters comments, but they're not blockers -- To view, visit https://gerrit.osmocom.org/c/pysim/+/43716?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I015c5eb8768c70751b198d9259c58dab22e4a8ff Gerrit-Change-Number: 43716 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Tue, 29 Sep 2026 01:26:05 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: smf,pgw: Fix missing s6b STR handling during release of s2b sessions
by pespin 28 Sep '26

28 Sep '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43740?usp=email ) Change subject: smf,pgw: Fix missing s6b STR handling during release of s2b sessions ...................................................................... smf,pgw: Fix missing s6b STR handling during release of s2b sessions Sesions created over s2b (EPDG) also create a session on the AAA over s6b. When the s2b session is released, a Diameter STR message is sent towards the AAA, which should answer with STA so that the session is properly terminated. Change-Id: I9bc54205eaa3b26a5ec9a3666172ee35d3b98b0e --- M library/DIAMETER_ts29_273_Templates.ttcn M pgw/PGW_Session_CT.ttcn M pgw/PGW_Tests.ttcn M smf/SMF_Session_CT_4G.ttcn M smf/SMF_Tests.ttcn 5 files changed, 186 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/43740/1 diff --git a/library/DIAMETER_ts29_273_Templates.ttcn b/library/DIAMETER_ts29_273_Templates.ttcn index a9f1769..d3915b0 100644 --- a/library/DIAMETER_ts29_273_Templates.ttcn +++ b/library/DIAMETER_ts29_273_Templates.ttcn @@ -505,6 +505,32 @@ /* TS 29.273 9.2.2.3.1 Session-Termination-Request (STR) Command, * Table 9.1.2.3.1/1: S6b Session Termination Request (STR), based on RFC 6733 8.4.1 */ +template (present) PDU_DIAMETER +tr_DIA_S6b_STR(template (present) hexstring imsi := ?, + template (present) BASE_NONE_Termination_Cause term_cause := ?, + template (present) octetstring sess_id := ?, + template (present) charstring orig_host := ?, + template (present) charstring orig_realm := ?, + template (present) charstring dest_realm := ?, + template (present) UINT32 hbh_id := ?, + template (present) UINT32 ete_id := ?) := + tr_DIAMETER(flags := '1???????'B, + cmd_code := Session_Termination, + app_id := int2oct(c_DIAMETER_3GPP_S6b_AID, 4), + hbh_id := hbh_id, + ete_id := ete_id, + avps := superset( + tr_AVP_SessionId(sess_id), + /* Optional: DRMP */ + tr_AVP_AuthAppId(int2oct(c_DIAMETER_3GPP_S6b_AID, 4)), + tr_AVP_OriginHost(orig_host), + tr_AVP_OriginRealm(orig_realm), + tr_AVP_DestinationRealm(dest_realm), + tr_AVP_TerminationCause(term_cause), + tr_AVP_UserNameImsi(imsi) + /* Optional: OC-Supported-Features */ + )); + template (value) PDU_DIAMETER ts_DIA_S6b_STR(template (value) hexstring imsi, template (value) BASE_NONE_Termination_Cause term_cause := DIAMETER_LOGOUT, @@ -554,6 +580,28 @@ /* Lots other Optional */ )); +template (value) PDU_DIAMETER +ts_DIA_S6b_STA(template (value) DIAMETER_Resultcode res_code := DIAMETER_SUCCESS, + template (value) octetstring sess_id := c_def_sess_id, + template (value) charstring orig_host := "aaa.localdomain", + template (value) charstring orig_realm := "localdomain", + template (value) charstring dest_realm := "localdomain", + template (value) UINT32 hbh_id := '00000000'O, + template (value) UINT32 ete_id := '00000000'O) := + ts_DIAMETER(flags := '01000000'B, + cmd_code := Session_Termination, + app_id := int2oct(c_DIAMETER_3GPP_S6b_AID, 4), + hbh_id := hbh_id, + ete_id := ete_id, + avps := { + ts_AVP_SessionId(sess_id), + /* Optional: DRMP */ + ts_AVP_ResultCode(res_code), + ts_AVP_ResultCode(res_code), + ts_AVP_OriginHost(orig_host), + ts_AVP_OriginRealm(orig_realm) + /* Lots other Optional */ + }); /* TS 29.273 9.2.2.4.1 Abort-Session-Request (ASR) */ template (present) PDU_DIAMETER @@ -697,4 +745,29 @@ return tx_dia; } +/* generate a send template successful answer based on received STR */ +function f_ts_DIA_S6b_STA(PDU_DIAMETER rx_s6b, + template (value) DIAMETER_Resultcode res_code := DIAMETER_SUCCESS, + template (value) charstring orig_host := "aaa.localdomain", + template (value) charstring orig_realm := "localdomain", + template (value) charstring dest_realm := "localdomain") +return template (value) PDU_DIAMETER +{ + var template (value) PDU_DIAMETER tx_dia; + var template (omit) AVP avp; + var octetstring sess_id; + + avp := f_DIAMETER_get_avp(rx_s6b, c_AVP_Code_BASE_NONE_Session_Id); + sess_id := valueof(avp.avp_data.avp_BASE_NONE_Session_Id); + + tx_dia := ts_DIA_S6b_STA(res_code, + sess_id, + orig_host, + orig_realm, + dest_realm, + rx_s6b.hop_by_hop_id, + rx_s6b.end_to_end_id); + return tx_dia; +} + } diff --git a/pgw/PGW_Session_CT.ttcn b/pgw/PGW_Session_CT.ttcn index 3de8d54..74aadfb 100644 --- a/pgw/PGW_Session_CT.ttcn +++ b/pgw/PGW_Session_CT.ttcn @@ -173,6 +173,24 @@ } } +private altstep as_DIA_S6b_STR() runs on PGW_Session_CT { + var PDU_DIAMETER rx_dia; + [] DIAMETER[DIA_S6b].receive(tr_DIA_S6b_STR()) -> value rx_dia { + var template (value) PDU_DIAMETER tx_dia; + tx_dia := f_ts_DIA_S6b_STA(rx_dia, + DIAMETER_SUCCESS, + "aaa." & mp_diam_realm, + mp_diam_realm, + mp_diam_realm); + DIAMETER[DIA_S6b].send(tx_dia); + setverdict(pass); + } + [] DIAMETER[DIA_S6b].receive(PDU_DIAMETER:?) -> value rx_dia { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Received unexpected DIAMETER ", rx_dia)); + } +} + /* Gx emulation (PCRF)*/ altstep as_DIA_Gx_CCR(DCC_NONE_CC_Request_Type req_type) runs on PGW_Session_CT { var PDU_DIAMETER rx_dia; @@ -467,18 +485,21 @@ } /* delete the session from the PGW */ -function f_delete_session(template (omit) GTP2C_Cause tx_cause := omit, +function f_delete_session(template (value) FullyQualifiedTEID fteid_c_ie, + template (omit) GTP2C_Cause tx_cause := omit, template (present) GTP2C_Cause exp_cause, - boolean expect_diameter := true) runs on PGW_Session_CT { - var template (value) FullyQualifiedTEID fteid_c_ie - fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S5S8_SGW_GTPC, g_pars.teic_local, 0, - f_inet_addr(mp_local_hostname_c), omit); + boolean expect_diameter := true) +runs on PGW_Session_CT { + var template PDU_GTPCv2 g2c := ts_GTP2C_DeleteSessionReq(d_teid := g_pars.teic_remote, cause := tx_cause, sender_fteid := fteid_c_ie, teid_list := {}, bearer_id := g_pars.bearer.ebi); GTP2.send(g2c); + if (is_s2b_iface() and DIAMETER[DIA_S6b].checkstate("Connected") and expect_diameter) { + as_DIA_S6b_STR(); + } if (DIAMETER[DIA_Gx].checkstate("Connected") and expect_diameter) { as_DIA_Gx_CCR(TERMINATION_REQUEST); } @@ -511,6 +532,28 @@ } } +function f_s5s8_delete_session(template (omit) GTP2C_Cause tx_cause := omit, + template (present) GTP2C_Cause exp_cause, + boolean expect_diameter := true) +runs on PGW_Session_CT { + var template (value) FullyQualifiedTEID fteid_c_ie; + + fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S5S8_SGW_GTPC, g_pars.teic_local, 0, + f_inet_addr(mp_local_hostname_c), omit); + f_delete_session(fteid_c_ie, tx_cause, exp_cause, expect_diameter); +} + +function f_s2b_delete_session(template (omit) GTP2C_Cause tx_cause := omit, + template (present) GTP2C_Cause exp_cause, + boolean expect_diameter := true) +runs on PGW_Session_CT { + var template (value) FullyQualifiedTEID fteid_c_ie; + + fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S2b_ePDG_GTPC, g_pars.teic_local, 0, + f_inet_addr(mp_local_hostname_c), omit); + + f_delete_session(fteid_c_ie, tx_cause, exp_cause, expect_diameter); +} private function f_run_prog_init(charstring command) runs on PGW_Session_CT return UECUPS_StartProgram { diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn index bd95090..ba660dd 100644 --- a/pgw/PGW_Tests.ttcn +++ b/pgw/PGW_Tests.ttcn @@ -375,7 +375,7 @@ /* create a session, then delete it again */ private function f_TC_createSession_deleteSession() runs on PGW_Session_CT { f_s5s8_create_session(); - f_delete_session(omit, Request_accepted); + f_s5s8_delete_session(omit, Request_accepted); setverdict(pass); } testcase TC_createSession_deleteSession() runs on PGW_Test_CT { @@ -389,7 +389,7 @@ /* send a DeleteSessionReq for an unknown/invalid TEID */ private function f_TC_deleteSession_unknown() runs on PGW_Session_CT { g_pars.teic_remote := f_rnd_octstring(4); - f_delete_session(omit, Context_Not_Found, false); + f_s5s8_delete_session(omit, Context_Not_Found, false); setverdict(pass); } testcase TC_deleteSession_unknown() runs on PGW_Test_CT { @@ -420,7 +420,7 @@ as_DIA_Gy_CCR(UPDATE_REQUEST); f_validate_gy_cc_report(g_rx_gy, VALIDITY_TIME, (3..4), ?, ?); - f_delete_session(omit, Request_accepted); + f_s5s8_delete_session(omit, Request_accepted); f_validate_gy_cc_report(g_rx_gy, FINAL, (0..1), 0, 0); setverdict(pass); } @@ -466,6 +466,7 @@ var template (omit) APCO apco := omit; var template APCO exp_apco := omit; f_s2b_create_session(apco, exp_apco); + f_s2b_delete_session(omit, Request_accepted); setverdict(pass); } testcase TC_s2b_createSession_v4_noapco() runs on PGW_Test_CT { @@ -487,6 +488,7 @@ *, /* open5gs-smfd can contain several DNS servers */ tr_GTP2C_PCO_P_PCSCF_IPv4(?)}); f_s2b_create_session(apco, exp_apco); + f_s2b_delete_session(omit, Request_accepted); setverdict(pass); } testcase TC_s2b_createSession_v4_apco() runs on PGW_Test_CT { diff --git a/smf/SMF_Session_CT_4G.ttcn b/smf/SMF_Session_CT_4G.ttcn index 9e84218..ba230cb 100644 --- a/smf/SMF_Session_CT_4G.ttcn +++ b/smf/SMF_Session_CT_4G.ttcn @@ -75,6 +75,24 @@ } } +private altstep as_DIA_S6b_STR() runs on SMF_Session_CT { + var PDU_DIAMETER rx_dia; + [] DIAMETER[DIA_S6b].receive(tr_DIA_S6b_STR()) -> value rx_dia { + var template (value) PDU_DIAMETER tx_dia; + tx_dia := f_ts_DIA_S6b_STA(rx_dia, + DIAMETER_SUCCESS, + "aaa." & mp_diam_realm, + mp_diam_realm, + mp_diam_realm); + DIAMETER[DIA_S6b].send(tx_dia); + setverdict(pass); + } + [] DIAMETER[DIA_S6b].receive(PDU_DIAMETER:?) -> value rx_dia { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Received unexpected DIAMETER ", rx_dia)); + } +} + /* Gx emulation (PCRF)*/ altstep as_DIA_Gx_CCR(DCC_NONE_CC_Request_Type req_type) runs on SMF_Session_CT { var PDU_DIAMETER rx_dia; @@ -361,13 +379,13 @@ } /* delete the session from the SMF */ -function f_delete_session(template (omit) GTP2C_Cause tx_cause := omit, - template (present) GTP2C_Cause exp_cause, - boolean expect_pfcp := true, - boolean expect_diameter := true) runs on SMF_Session_CT { - var template (value) FullyQualifiedTEID fteid_c_ie - fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S5S8_SGW_GTPC, g_pars.teic_local, 0, - f_inet_addr(mp_local_hostname_c), omit); +private function f_delete_session(template (value) FullyQualifiedTEID fteid_c_ie, + template (omit) GTP2C_Cause tx_cause := omit, + template (present) GTP2C_Cause exp_cause, + boolean expect_pfcp := true, + boolean expect_diameter := true) +runs on SMF_Session_CT { + var template PDU_GTPCv2 g2c := ts_GTP2C_DeleteSessionReq(d_teid := g_pars.teic_remote, cause := tx_cause, sender_fteid := fteid_c_ie, @@ -379,6 +397,10 @@ as_pfcp_sess_del_req(); } + if (is_s2b_iface() and DIAMETER[DIA_S6b].checkstate("Connected") and expect_diameter) { + as_DIA_S6b_STR(); + } + if (DIAMETER[DIA_Gx].checkstate("Connected") and expect_diameter) { as_DIA_Gx_CCR(TERMINATION_REQUEST); } @@ -400,4 +422,30 @@ } } +function f_s5s8_delete_session(template (omit) GTP2C_Cause tx_cause := omit, + template (present) GTP2C_Cause exp_cause, + boolean expect_pfcp := true, + boolean expect_diameter := true) +runs on SMF_Session_CT { + var template (value) FullyQualifiedTEID fteid_c_ie; + + fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S5S8_SGW_GTPC, g_pars.teic_local, 0, + f_inet_addr(mp_local_hostname_c), omit); + + f_delete_session(fteid_c_ie, tx_cause, exp_cause, expect_pfcp, expect_diameter); +} + +function f_s2b_delete_session(template (omit) GTP2C_Cause tx_cause := omit, + template (present) GTP2C_Cause exp_cause, + boolean expect_pfcp := true, + boolean expect_diameter := true) +runs on SMF_Session_CT { + var template (value) FullyQualifiedTEID fteid_c_ie; + + fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S2b_ePDG_GTPC, g_pars.teic_local, 0, + f_inet_addr(mp_local_hostname_c), omit); + + f_delete_session(fteid_c_ie, tx_cause, exp_cause, expect_pfcp, expect_diameter); +} + } diff --git a/smf/SMF_Tests.ttcn b/smf/SMF_Tests.ttcn index 609756a..4501520 100644 --- a/smf/SMF_Tests.ttcn +++ b/smf/SMF_Tests.ttcn @@ -337,7 +337,7 @@ /* create an IPv4 session, then delete it again */ private function f_TC_createSession_deleteSession() runs on SMF_Session_CT { f_s5s8_create_session(); - f_delete_session(omit, Request_accepted); + f_s5s8_delete_session(omit, Request_accepted); setverdict(pass); } testcase TC_createSession_deleteSession() runs on SMF_Test_CT { @@ -399,7 +399,7 @@ /* send a DeleteSessionReq for an unknown/invalid TEID */ private function f_TC_deleteSession_unknown() runs on SMF_Session_CT { g_pars.teic_remote := f_rnd_octstring(4); - f_delete_session(omit, Context_Not_Found, false, false); + f_s5s8_delete_session(omit, Context_Not_Found, false, false); setverdict(pass); } testcase TC_deleteSession_unknown() runs on SMF_Test_CT { @@ -451,7 +451,7 @@ /* SMF updates new Volume quota obtained from OCS on UPF: */ as_pfcp_sess_mod_req(); - f_delete_session(omit, Request_accepted); + f_s5s8_delete_session(omit, Request_accepted); f_validate_gy_cc_report(g_rx_gy, FINAL, (0..1), 0, 0); setverdict(pass); } @@ -506,6 +506,7 @@ var template (omit) APCO apco := omit; var template APCO exp_apco := omit; f_s2b_create_session(apco, exp_apco); + f_s2b_delete_session(omit, Request_accepted); setverdict(pass); } testcase TC_s2b_createSession_v4_noapco() runs on SMF_Test_CT { @@ -525,6 +526,7 @@ *, /* open5gs-smfd can contain several DNS servers */ tr_GTP2C_PCO_P_PCSCF_IPv4(?)}); f_s2b_create_session(apco, exp_apco); + f_s2b_delete_session(omit, Request_accepted); setverdict(pass); } testcase TC_s2b_createSession_v4_apco() runs on SMF_Test_CT { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43740?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9bc54205eaa3b26a5ec9a3666172ee35d3b98b0e Gerrit-Change-Number: 43740 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: ngap: Introduce f_mw_PDUSessionResourceSetupRequestTransfer()
by pespin 28 Sep '26

28 Sep '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43738?usp=email ) Change subject: ngap: Introduce f_mw_PDUSessionResourceSetupRequestTransfer() ...................................................................... ngap: Introduce f_mw_PDUSessionResourceSetupRequestTransfer() Similar to other functions already added to the file in the past. Change-Id: I1b21e873b3f0a377ad5064a5c32826e795a7dfe9 --- M library/ngap/NGAP_Templates.ttcn 1 file changed, 95 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/38/43738/1 diff --git a/library/ngap/NGAP_Templates.ttcn b/library/ngap/NGAP_Templates.ttcn index 3fb0b6d..8a3e543 100644 --- a/library/ngap/NGAP_Templates.ttcn +++ b/library/ngap/NGAP_Templates.ttcn @@ -22743,6 +22743,101 @@ } } // End of template mw_pDUSessionResourceSetupRequestTransfer_id_MBSSessionSetupRequestList + + function f_mw_n2_PDUSessionResourceSetupRequestTransfer(template PDUSessionAggregateMaximumBitRate p_pDUSessionAggregateMaximumBitRate := omit, + template (present) UPTransportLayerInformation p_uPTransportLayerInformation := ?, + template UPTransportLayerInformationList p_uPTransportLayerInformationList := omit, + template DataForwardingNotPossible p_dataForwardingNotPossible := omit, + template (present) PDUSessionType p_pDUSessionType := ?, + template SecurityIndication p_securityIndication := omit, + template NetworkInstance p_networkInstance := omit, + template (present) QosFlowSetupRequestList p_qosFlowSetupRequestList := ?) + return template (present) PDUSessionResourceSetupRequestTransfer { + var template (present) PDUSessionResourceSetupRequestTransfer pdu := { + protocolIEs := {} + }; + var integer idx := lengthof(pdu.protocolIEs); + + /* PDUSessionAggregateMaximumBitRate */ + if (not istemplatekind(p_pDUSessionAggregateMaximumBitRate, "omit")) { + pdu.protocolIEs[idx] := { + id := id_PDUSessionAggregateMaximumBitRate, + criticality := reject, + value_ := { PDUSessionAggregateMaximumBitRate := p_pDUSessionAggregateMaximumBitRate } + }; + idx := idx + 1; + } + + /* UPTransportLayerInformation */ + pdu.protocolIEs[idx] := { + id := id_UL_NGU_UP_TNLInformation, + criticality := reject, + value_ := { UPTransportLayerInformation := p_uPTransportLayerInformation } + }; + idx := idx + 1; + + /* id-AdditionalUL-NGU-UP-TNLInformation */ + if (not istemplatekind(p_uPTransportLayerInformationList, "omit")) { + pdu.protocolIEs[idx] := { + id := id_AdditionalUL_NGU_UP_TNLInformation, + criticality := reject, + value_ := { UPTransportLayerInformationList := p_uPTransportLayerInformationList } + }; + idx := idx + 1; + } + + /* TODO: id-AdditionalUL-NGU-UP-TNLInformation */ + + /* DataForwardingNotPossible */ + if (not istemplatekind(p_dataForwardingNotPossible, "omit")) { + pdu.protocolIEs[idx] := { + id := id_DataForwardingNotPossible, + criticality := reject, + value_ := { DataForwardingNotPossible := p_dataForwardingNotPossible } + }; + idx := idx + 1; + } + + /* PDUSessionType */ + pdu.protocolIEs[idx] := { + id := id_PDUSessionType, + criticality := reject, + value_ := { PDUSessionType := p_pDUSessionType } + }; + idx := idx + 1; + + /* SecurityIndication */ + if (not istemplatekind(p_securityIndication, "omit")) { + pdu.protocolIEs[idx] := { + id := id_SecurityIndication, + criticality := reject, + value_ := { SecurityIndication := p_securityIndication } + }; + idx := idx + 1; + } + + /* NetworkInstance */ + if (not istemplatekind(p_networkInstance, "omit")) { + pdu.protocolIEs[idx] := { + id := id_NetworkInstance, + criticality := reject, + value_ := { NetworkInstance := p_networkInstance } + }; + idx := idx + 1; + } + + /* PDU Session Resource Setup Request List */ + pdu.protocolIEs[idx] := { + id := id_QosFlowSetupRequestList, + criticality := reject, + value_ := { QosFlowSetupRequestList := p_qosFlowSetupRequestList } + }; + idx := idx + 1; + + /* TODO: all IEs afterwards with criticality ignore. */ + return pdu; + } // End of function f_mw_PDUSessionResourceSetupRequestTransfer + template (present) PDUSessionResourceSetupResponseTransfer mw_pDUSessionResourceSetupResponseTransfer( template (present) QosFlowPerTNLInformation p_dLQosFlowPerTNLInformation := ?, template QosFlowPerTNLInformationList p_additionalDLQosFlowPerTNLInformation := *, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43738?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I1b21e873b3f0a377ad5064a5c32826e795a7dfe9 Gerrit-Change-Number: 43738 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: smf: Test 5GC IPv6 sessions
by pespin 28 Sep '26

28 Sep '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43739?usp=email ) Change subject: smf: Test 5GC IPv6 sessions ...................................................................... smf: Test 5GC IPv6 sessions Change-Id: If6a245870b03fda8979354aec1d9606c51141f4f --- M library/NG_NAS_Osmo_Templates.ttcn M smf/SMF_Session_CT.ttcn M smf/SMF_Session_CT_4G.ttcn M smf/SMF_Session_CT_5G.ttcn M smf/SMF_Tests.ttcn M smf/expected-results.xml 6 files changed, 212 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/39/43739/1 diff --git a/library/NG_NAS_Osmo_Templates.ttcn b/library/NG_NAS_Osmo_Templates.ttcn index 798fcfb..eabe221 100644 --- a/library/NG_NAS_Osmo_Templates.ttcn +++ b/library/NG_NAS_Osmo_Templates.ttcn @@ -166,6 +166,13 @@ }; /* 24.501 cl. 9.11.3.21 */ +template (present) DNN +cr_DNN_TLV(template (present) octetstring p_DNN) := +{ + iei := '25'O, + iel := ?, + dnnValue := p_DNN +}; template (value) DNN cs_DNN_TLV(template (value) octetstring p_DNN) := { @@ -236,6 +243,22 @@ maxDataRateDL := maxDataRateD }; +/* 24.501 cl. 9.11.4.10 */ +template (present) PDU_Address +cr_PDU_AddressTLV(template (present) B1_Type si16LLA := ?, + template (present) B3_Type typeValue := ?, + template octetstring adressInfo := *, + template octetstring ipv6Address := *) := +{ + iei := '29'O, + iel := ?, + spare := '0000'B, + si16LLA := si16LLA, + typeValue := typeValue, + adressInfo := adressInfo, + ipv6Address := ipv6Address +}; + /* 24.501 cl. 9.11.4.11 */ template (value) PDU_SessionType cs_PDU_SessionTypeTV(template (value) B3_Type p_Type) := @@ -245,6 +268,14 @@ typeValue := p_Type }; +template (value) PDU_SessionType +cs_PDU_SessionTypeV(template (value) B3_Type p_Type) := +{ + iei := omit, + spare := tsc_Spare1, + typeValue := p_Type +}; + /* 24.501 cl. 9.11.4.16 */ template (value) SSC_Mode cs_SSC_ModeTV(B3_Type p_SSCMode) := diff --git a/smf/SMF_Session_CT.ttcn b/smf/SMF_Session_CT.ttcn index 7b46f79..2eae5c8 100644 --- a/smf/SMF_Session_CT.ttcn +++ b/smf/SMF_Session_CT.ttcn @@ -184,7 +184,9 @@ }; type record SessionPars_Nudm { - charstring smf_subscription_id + charstring smf_subscription_id, + integer fiveqi, + integer prio_lvl }; type record SessionPars_NGNAS { @@ -280,7 +282,9 @@ smContextRef := omit }, nudm := { - smf_subscription_id := int2str(idx + 1) + smf_subscription_id := int2str(idx + 1), + fiveqi := 9, + prio_lvl := 8 }, nas := { pti := '00'O, diff --git a/smf/SMF_Session_CT_4G.ttcn b/smf/SMF_Session_CT_4G.ttcn index 7789654..9e84218 100644 --- a/smf/SMF_Session_CT_4G.ttcn +++ b/smf/SMF_Session_CT_4G.ttcn @@ -158,14 +158,14 @@ exp_fteid_if_type, exp_fteid_instance)); if (not match(rx_fteid.tEID_GRE_Key, g_pars.pfcp_pars.gtp1u_pars.access.local.teid)) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, - log2str("Got IPv6 GTPv1U remote address ", rx_fteid.iPv4_Address, - " vs exp", g_pars.pfcp_pars.gtp1u_pars.access.local.ipv4_address)); + log2str("Got GTPv1U remote TEID ", rx_fteid.tEID_GRE_Key, + " vs exp", g_pars.pfcp_pars.gtp1u_pars.access.local.teid)); } g_pars.bearer.teid_remote := rx_fteid.tEID_GRE_Key; if (rx_fteid.v4_Flag == '1'B) { if (not match(rx_fteid.iPv4_Address, g_pars.pfcp_pars.gtp1u_pars.access.local.ipv4_address)) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, - log2str("Got IPv6 GTPv1U remote address ", rx_fteid.iPv4_Address, + log2str("Got IPv4 GTPv1U remote address ", rx_fteid.iPv4_Address, " vs exp", g_pars.pfcp_pars.gtp1u_pars.access.local.ipv4_address)); } } diff --git a/smf/SMF_Session_CT_5G.ttcn b/smf/SMF_Session_CT_5G.ttcn index 0c47c1e..0008235 100644 --- a/smf/SMF_Session_CT_5G.ttcn +++ b/smf/SMF_Session_CT_5G.ttcn @@ -4,6 +4,7 @@ import from Osmocom_Types all; import from Native_Functions all; import from Misc_Helpers all; +import from DNS_Helpers all; import from HTTP2_Types all; import from HTTP2_Templates all; @@ -30,11 +31,13 @@ import from NGAP_Templates all; import from NAS_CommonTypeDefs all; +import from NG_NAS_TypeDefs all; import from NG_NAS_MsgContainers all; import from NG_NAS_Osmo_Types all; import from NG_NAS_Osmo_Templates all; import from NG_NAS_Functions all; +import from PFCP_Templates all; import from PFCP_Emulation all; import from Mutex all; @@ -156,8 +159,6 @@ * 3GPP TS 29.502 6.1.3.2 */ function f_n11_create_session() runs on SMF_Session_CT { - var template (value) NG_NAS_UL_Message_Type nas_ul_msg; - var ProcedureTransactionIdentifier pti := f_next_pti(); var template (value) octetstring body; var integer http2_idx; var integer http2_stream_id := 3; @@ -184,11 +185,7 @@ var charstring boundary := "=-0EVVjxcWWFYNd1JXh1OQEg==" - nas_ul_msg := cs_NG_PDU_SESSION_ESTABLISHMENT_REQUEST(cs_NG_PDU_SessionIdV(int2oct(g_pars.namf.pdu_sess_id, 1)), pti, - p_IntegrityProtMaxDataRate := cs_IntegrityProtMaxDataRateV('FF'O, 'FF'O), - p_PDU_SessionType := cs_PDU_SessionTypeTV(c_PDU_SessionType_IPv4), - p_SSC_Mode := cs_SSC_ModeTV('001'B)); - var octetstring nas_enc := enc_NG_NAS_UL_Message_Type(valueof(nas_ul_msg)); + var octetstring nas_enc := f_ng_nas_gen_session_establishment_request(); body := f_http2_encode_body_multipart_json_5gnas(sm_contexts_enc, nas_enc, boundary); http2_idx := f_http2_adapter_find_free_idx(); @@ -272,6 +269,11 @@ as_namf_comm_post_n1n2_messages(); f_n11_update_sm_context(); + + if (g_pars.pdn_type == c_PFCP_PDN_Type_IPv6 or + g_pars.pdn_type == c_PFCP_PDN_Type_IPv4v6) { + f_gtp1u_perform_ipv6_slaac(); + } setverdict(pass); } @@ -439,7 +441,6 @@ var N1N2MessageTransferReqData n1n2msg_req; var NGAP_IEs.PDUSessionResourceSetupRequestTransfer setup_req_transf; var template (value) N1N2MessageTransferRspData n1n2msg_rsp; - var template (present) NG_NAS_DL_SM_Message_Type exp_rx_nas; var NG_NAS_DL_SM_Message_Type dl_nas; var template (value) HTTP2_Msg http2_tx; var octetstring body_enc; @@ -454,12 +455,7 @@ /* Decode 2nd part: NG-NAS: */ dl_nas := dec_NG_NAS_DL_SM_Message_Type(parts[1].data); - exp_rx_nas := cr_NG_PDU_SESSION_ESTABLISHMENT_ACCEPT(); - if (not match(dl_nas, exp_rx_nas)) { - Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, - log2str("Rx unexpected DL NG-NAS: ", dl_nas, " vs exp ", exp_rx_nas)); - } - g_pars.nas.qos_rules := dl_nas.pdu_Session_Establishment_Accept.authorizedQoSRules.listofQoSRules; + f_ng_nas_handle_session_establishment_accept(dl_nas); /* Decode 3rd part: NGAP: */ setup_req_transf := dec_NGAP_PDUSessionResourceSetupRequestTransfer(parts[2].data); @@ -527,6 +523,15 @@ template (value) charstring subscr_id) := Nudm_uri_prefix & valueof(ts_Nudm_SDM_path_individual_subscription(imsi, subscr_id)); +/* 3GPP TS 29.244 8.2.79 PDN Type -> 3GPP TS 29.503 PduSessionType */ +private function f_pfcp_pdn_type_2_Nudm_SDM_pdu_session_type(INT3b pfcp_pdn_type) +return TS29503_Nudm_SDM.PduSessionType1_enum { + /* They are *mostly* the same, simply decrement one and convert INT3b -> PduSessionType1_enum: */ + var TS29503_Nudm_SDM.PduSessionType1_enum pe; + int2enum(pfcp_pdn_type - 1, pe); + return pe; +} + /* 3GPP TS 29.503 6.2.3.5.2.1 */ function f_tr_Nudm_UECM_put_IndividualSmfRegistration() runs on SMF_Session_CT return template (present) HTTP2_Msg { @@ -636,18 +641,19 @@ var template (value) DnnConfiguration1 dnn_cfg; var octetstring body_enc; var template (value) HTTP2_Msg http2_tx; + var TS29503_Nudm_SDM.PduSessionType1_enum pdu_sess_type := f_pfcp_pdn_type_2_Nudm_SDM_pdu_session_type(g_pars.pfcp_pars.pdn_type); - dnn_cfg := ts_DnnConfiguration1(pduSessionTypes := ts_PduSessionTypes1(defaultSessionType := ts_PduSessionType1(IPV4), - allowedSessionTypes := { ts_PduSessionType1(IPV4) }), + dnn_cfg := ts_DnnConfiguration1(pduSessionTypes := ts_PduSessionTypes1(defaultSessionType := ts_PduSessionType1(pdu_sess_type), + allowedSessionTypes := { ts_PduSessionType1(pdu_sess_type) }), sscModes := ts_SscModes1(defaultSscMode := ts_SscMode1(SSC_MODE_1), allowedSscModes := { ts_SscMode1(SSC_MODE_1), ts_SscMode1(SSC_MODE_2), ts_SscMode1(SSC_MODE_3)}), - fivegQosProfile := ts_SubscribedDefaultQos1(fiveqi := 9, - arp := ts_Arp(priorityLevel := ts_ArpPriorityLevel(8), + fivegQosProfile := ts_SubscribedDefaultQos1(fiveqi := g_pars.nudm.fiveqi, + arp := ts_Arp(priorityLevel := ts_ArpPriorityLevel(g_pars.nudm.prio_lvl), preemptCap := ts_PreemptionCapability(NOT_PREEMPT), preemptVuln := ts_PreemptionVulnerability(NOT_PREEMPTABLE)), - priorityLevel := 8), + priorityLevel := g_pars.nudm.prio_lvl), sessionAmbr := ts_Ambr1(uplink := "1000 Kbps", downlink := "1000 Kbps") ); @@ -873,9 +879,35 @@ * NGAP **************/ +/* 3GPP TS 29.244 8.2.79 PDN Type -> 3GPP TS 29.503 PduSessionType */ +private function f_pfcp_pdn_type_2_ngap_pdu_session_type(INT3b pfcp_pdn_type) +return NGAP_IEs.PDUSessionType { + /* They are *mostly* the same, simply decrement one and convert INT3b -> PduSessionType1_enum: */ + var NGAP_IEs.PDUSessionType pe; + int2enum(pfcp_pdn_type - 1, pe); + return pe; +} + /* Handle a PDUSessionResourceSetupRequestTransfer and return a Result */ private function f_ngap_pdu_handle_PDUSessionResourceSetupRequestTransfer(NGAP_IEs.PDUSessionResourceSetupRequestTransfer setup_req_transf) runs on SMF_Session_CT { + var template (present) QosFlowLevelQosParameters exp_qos; + var template (present) PDUSessionResourceSetupRequestTransfer exp; + + exp_qos := mw_qosFlowLevelQosParameters(p_qosCharacteristics := mw_qosCharacteristics_nonDynamic5QI(mw_nonDynamic5QIDescriptor(p_fiveQI := g_pars.nudm.fiveqi)), + p_allocationAndRetentionPriority := mw_allocationAndRetentionPriority(p_priorityLevelARP := g_pars.nudm.prio_lvl)); + + exp := f_mw_n2_PDUSessionResourceSetupRequestTransfer(p_pDUSessionAggregateMaximumBitRate := ?, + p_uPTransportLayerInformation := mw_uPTransportLayerInformation_gTPTunnel(mw_gTPTunnel(p_tla := oct2bit(g_pars.pfcp_pars.gtp1u_pars.access.local.ipv4_address), + p_gtp_teid := g_pars.pfcp_pars.gtp1u_pars.access.local.teid)), + p_pDUSessionType := f_pfcp_pdn_type_2_ngap_pdu_session_type(g_pars.pdn_type), + p_qosFlowSetupRequestList := { mw_qosFlowSetupRequestItem(p_qosFlowIdentifier := 1, + p_qosFlowLevelQosParameters := exp_qos) }) + if (not match(setup_req_transf, exp)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Rx unexpected DL NGAP: ", setup_req_transf, " vs exp ", exp)); + } + for (var integer i := 0; i < lengthof(setup_req_transf.protocolIEs); i := i + 1) { select (setup_req_transf.protocolIEs[i].id) { case (id_UL_NGU_UP_TNLInformation) { @@ -885,7 +917,6 @@ } case (id_QosFlowSetupRequestList) { var QosFlowSetupRequestList qos_req_li := setup_req_transf.protocolIEs[i].value_.QosFlowSetupRequestList; - /* TODO: validate received QoS */ } } } @@ -923,5 +954,79 @@ return g_pars.nas.pti; } +/* 3GPP TS 29.244 8.2.79 PDN Type -> 3GPP TS 24.501 9.11.4.11 PDU session type */ +private function f_pfcp_pdn_type_2_ng_nas_pdu_session_type(INT3b pfcp_pdn_type) +return BIT3 { + /* Surprise surprise, they are the same, simply convert INT3b -> BIT3: */ + return int2bit(pfcp_pdn_type, 3); +} + +private function f_ng_nas_gen_session_establishment_request() +runs on SMF_Session_CT return octetstring { + var BIT3 pdu_sess_type := f_pfcp_pdn_type_2_ng_nas_pdu_session_type(g_pars.pfcp_pars.pdn_type); + var ProcedureTransactionIdentifier pti := f_next_pti(); + var template (value) NG_NAS_UL_Message_Type nas_ul_msg; + var octetstring nas_enc; + + nas_ul_msg := cs_NG_PDU_SESSION_ESTABLISHMENT_REQUEST(cs_NG_PDU_SessionIdV(int2oct(g_pars.namf.pdu_sess_id, 1)), + pti, + p_IntegrityProtMaxDataRate := cs_IntegrityProtMaxDataRateV('FF'O, 'FF'O), + p_PDU_SessionType := cs_PDU_SessionTypeTV(pdu_sess_type), + p_SSC_Mode := cs_SSC_ModeTV('001'B)); + nas_enc := enc_NG_NAS_UL_Message_Type(valueof(nas_ul_msg)); + return nas_enc; +} + +private function f_ng_nas_handle_session_establishment_accept(NG_NAS_DL_SM_Message_Type dl_nas) +runs on SMF_Session_CT { + var template (present) NG_NAS_DL_SM_Message_Type exp_rx_nas; + var BIT3 pdu_sess_type := f_pfcp_pdn_type_2_ng_nas_pdu_session_type(g_pars.pfcp_pars.pdn_type); + + exp_rx_nas := cr_NG_PDU_SESSION_ESTABLISHMENT_ACCEPT(p_PDU_SessionId := cs_NG_PDU_SessionIdV(int2oct(g_pars.namf.pdu_sess_id, 1)), + p_PDU_SessionType := cs_PDU_SessionTypeV(pdu_sess_type), + p_QoS_Rules := ?, + p_PDU_Address := cr_PDU_AddressTLV(typeValue := pdu_sess_type, + adressInfo := ?), + p_DNN := cr_DNN_TLV(f_enc_dns_hostname(g_pars.apn))); + if (not match(dl_nas, exp_rx_nas)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Rx unexpected DL NG-NAS: ", dl_nas, " vs exp ", exp_rx_nas)); + } + g_pars.nas.qos_rules := dl_nas.pdu_Session_Establishment_Accept.authorizedQoSRules.listofQoSRules; + + var PDU_Address paddr := dl_nas.pdu_Session_Establishment_Accept.pduAddress; + select (g_pars.pfcp_pars.pdn_type) { + case (c_PFCP_PDN_Type_IPv4) { + if (not match(paddr, cr_PDU_AddressTLV('0'B, pdu_sess_type, ? length (4), omit))) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Got unexpected IPv4 UE addr", paddr)); + } + g_ip4_addr := paddr.adressInfo; + log("SMF assigned UE IPv4 address: ", f_inet_ntoa(g_ip4_addr)); + } + case (c_PFCP_PDN_Type_IPv6) { + if (not match(paddr, cr_PDU_AddressTLV(?, pdu_sess_type, ? length (8), *))) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Got unexpected IPv6 UE addr", paddr)); + } + g_ip6_interface_id := paddr.adressInfo; + log("SMF assigned IPv6 Interface Id: ", g_ip6_interface_id); + g_ip6_addr := 'FE80000000000000'O & g_ip6_interface_id; + log("SMF assigned IPv6 link-local Address: ", f_inet6_ntoa(g_ip6_addr)); + } + case (c_PFCP_PDN_Type_IPv4v6) { + if (not match(paddr, cr_PDU_AddressTLV(?, pdu_sess_type, ? length (12), *))) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Got unexpected IPv4v6 UE addr", paddr)); + } + g_ip6_interface_id := substr(paddr.adressInfo, 0, 8); + log("SMF assigned IPv6 Interface Id: ", g_ip6_interface_id); + g_ip6_addr := 'FE80000000000000'O & g_ip6_interface_id; + log("SMF assigned IPv6 link-local Address: ", f_inet6_ntoa(g_ip6_addr)); + g_ip4_addr := substr(paddr.adressInfo, 8 , 4); + log("SMF assigned UE IPv4 address: ", f_inet_ntoa(g_ip4_addr)); + } + } +} } diff --git a/smf/SMF_Tests.ttcn b/smf/SMF_Tests.ttcn index 5613abb..609756a 100644 --- a/smf/SMF_Tests.ttcn +++ b/smf/SMF_Tests.ttcn @@ -535,6 +535,7 @@ vc_conn.done; } +/* create an IPv4 session from 5G AMF, then delete it again */ private function f_TC_n11_createSession_deleteSession() runs on SMF_Session_CT { f_n11_init(); f_n11_create_session(); @@ -543,20 +544,43 @@ } testcase TC_n11_createSession_deleteSession() runs on SMF_Test_CT { var SMF_Session_CT vc_conn; - var SessionPars pars := f_SessionPars(6, rat_type := GTP2C_RAT_NR); + var SessionPars pars := f_SessionPars(6, + rat_type := GTP2C_RAT_NR); f_init(); vc_conn := f_start_handler(refers(f_TC_n11_createSession_deleteSession), pars); vc_conn.done; } -testcase TC_n11_createSession_deleteSession_250() runs on SMF_Test_CT { +/* create an IPv6 session from 5G AMF, then delete it again */ +testcase TC_n11_createSession_deleteSession_ipv6() runs on SMF_Test_CT { + var SMF_Session_CT vc_conn; + var SessionPars pars := f_SessionPars(7, + rat_type := GTP2C_RAT_NR, + pdn_type := c_PFCP_PDN_Type_IPv6); + f_init(); + vc_conn := f_start_handler(refers(f_TC_n11_createSession_deleteSession), pars); + vc_conn.done; +} + +/* create an IPv4v6 session from 5G AMF, then delete it again */ +testcase TC_n11_createSession_deleteSession_ipv4v6() runs on SMF_Test_CT { + var SMF_Session_CT vc_conn; + var SessionPars pars := f_SessionPars(8, + rat_type := GTP2C_RAT_NR, + pdn_type := c_PFCP_PDN_Type_IPv4v6); + f_init(); + vc_conn := f_start_handler(refers(f_TC_n11_createSession_deleteSession), pars); + vc_conn.done; +} + +function f_TC_n11_createSession_deleteSession_250(INT3b pdn_type) runs on SMF_Test_CT { var SMF_Session_CT vc_conn[250]; var integer i; f_init(); for (i := 0; i < sizeof(vc_conn); i := i + 1) { - var SessionPars pars := f_SessionPars(idx := i); + var SessionPars pars := f_SessionPars(idx := i, pdn_type := pdn_type); vc_conn[i] := f_start_handler(refers(f_TC_n11_createSession_deleteSession), pars); } @@ -565,6 +589,18 @@ } } +testcase TC_n11_createSession_deleteSession_250() runs on SMF_Test_CT { + f_TC_n11_createSession_deleteSession_250(c_PFCP_PDN_Type_IPv4); +} + +testcase TC_n11_createSession_deleteSession_250_ipv6() runs on SMF_Test_CT { + f_TC_n11_createSession_deleteSession_250(c_PFCP_PDN_Type_IPv6); +} + +testcase TC_n11_createSession_deleteSession_250_ipv4v6() runs on SMF_Test_CT { + f_TC_n11_createSession_deleteSession_250(c_PFCP_PDN_Type_IPv4v6); +} + control { execute( TC_tx_echo() ); execute( TC_createSession_deleteSession() ); @@ -580,8 +616,12 @@ execute( TC_s2b_createSession_v4_apco() ); execute( TC_n11_createSession_deleteSession() ); + execute( TC_n11_createSession_deleteSession_ipv6() ); + execute( TC_n11_createSession_deleteSession_ipv4v6() ); execute( TC_n11_createSession_deleteSession_250() ); + execute( TC_n11_createSession_deleteSession_250_ipv6() ); + execute( TC_n11_createSession_deleteSession_250_ipv4v6() ); } diff --git a/smf/expected-results.xml b/smf/expected-results.xml index a07c3a0..b610ee8 100644 --- a/smf/expected-results.xml +++ b/smf/expected-results.xml @@ -13,5 +13,9 @@ <testcase classname='SMF_Tests' name='TC_s2b_createSession_v4_noapco' time='MASKED'/> <testcase classname='SMF_Tests' name='TC_s2b_createSession_v4_apco' time='MASKED'/> <testcase classname='SMF_Tests' name='TC_n11_createSession_deleteSession' time='MASKED'/> + <testcase classname='SMF_Tests' name='TC_n11_createSession_deleteSession_ipv6' time='MASKED'/> + <testcase classname='SMF_Tests' name='TC_n11_createSession_deleteSession_ipv4v6' time='MASKED'/> <testcase classname='SMF_Tests' name='TC_n11_createSession_deleteSession_250' time='MASKED'/> + <testcase classname='SMF_Tests' name='TC_n11_createSession_deleteSession_250_ipv6' time='MASKED'/> + <testcase classname='SMF_Tests' name='TC_n11_createSession_deleteSession_250_ipv4v6' time='MASKED'/> </testsuite> -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43739?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: If6a245870b03fda8979354aec1d9606c51141f4f Gerrit-Change-Number: 43739 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: IPAd: Make existing tests work with multi eIM support
by dexter 28 Sep '26

28 Sep '26
Attention is currently required from: jolly, laforge. dexter has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43655?usp=email ) Change subject: IPAd: Make existing tests work with multi eIM support ...................................................................... Patch Set 3: Code-Review+2 (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43655/comment/6ab38761_8ad5… : PS3, Line 9: The behavior of the IPAd implementation has changed. Now att the end of Typo "att" => "at" -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43655?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id67bb3acc3f90805b06f441c5352ba29a28698c4 Gerrit-Change-Number: 43655 Gerrit-PatchSet: 3 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 28 Sep 2026 11:37:57 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • ...
  • 190
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.