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

December 2023

  • 1 participants
  • 1601 discussions
[M] Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types: clean up, drop remains of PCUIFv10
by fixeria 15 Dec '23

15 Dec '23
Attention is currently required from: fixeria. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35372?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: library/PCUIF_Types: clean up, drop remains of PCUIFv10 ...................................................................... library/PCUIF_Types: clean up, drop remains of PCUIFv10 Change-Id: Ibfe8558cb9f335d8c29348063b0ff02b138dd4c7 Related: osmo-pcu.git I68a3f59d5c960ae3a4fbd74f9d4a894295cb9ed8 Related: OS#6191 --- M bts/BTS_Tests.ttcn M library/PCUIF_CodecPort.ttcn M library/PCUIF_Types.ttcn M pcu/PCUIF_Components.ttcn 4 files changed, 62 insertions(+), 160 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/72/35372/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35372?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: Ibfe8558cb9f335d8c29348063b0ff02b138dd4c7 Gerrit-Change-Number: 35372 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types: fix padding attribute for PCUIF_Message
by fixeria 15 Dec '23

15 Dec '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35371?usp=email ) Change subject: library/PCUIF_Types: fix padding attribute for PCUIF_Message ...................................................................... library/PCUIF_Types: fix padding attribute for PCUIF_Message This fixes tons of warnings like this one: dec_PCUIF_Message(): Data remained at the end of the stream after successful decoding: '00'O Change-Id: If34da75c21b023222c44504d561cd6f658a401cf Fixes: e0666ea5 "PCUIF: upgrade to PCUIF v12" Related: OS#6191 --- M library/PCUIF_Types.ttcn 1 file changed, 18 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/71/35371/1 diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 33b454f..5ed87b6 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -400,8 +400,8 @@ pag_req, msg_type = PCU_IF_MSG_PAG_REQ; app_info_req, msg_type = PCU_IF_MSG_APP_INFO_REQ; container, msg_type = PCU_IF_MSG_CONTAINER)" - /* PCUIFv10: 1006 * 8 = 8048 bits */ - variant "PADDING(8048)" + /* PCUIFv12: 1007 * 8 = 8056 bits */ + variant "PADDING(8056)" }; external function enc_PCUIF_Message(in PCUIF_Message pdu) return octetstring -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35371?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: If34da75c21b023222c44504d561cd6f658a401cf Gerrit-Change-Number: 35371 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: library/L1CTL_Types: add missing L1CTL_GPRS_RTS_IND message
by fixeria 15 Dec '23

15 Dec '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35370?usp=email ) Change subject: library/L1CTL_Types: add missing L1CTL_GPRS_RTS_IND message ...................................................................... library/L1CTL_Types: add missing L1CTL_GPRS_RTS_IND message This commit fixes the following warnings: While RAW-decoding type '@L1CTL_Types.L1ctlMessageLV': Invalid enum value '37' for '@L1CTL_Types.L1ctlMsgType': Change-Id: I0772f5273ecc2fb0c3def1fd645828b216e3032f Related: osmocom-bb.git I1494e0aac7555f6e01b4b435b77140afc42c098e --- M library/L1CTL_Types.ttcn 1 file changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/70/35370/1 diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index 73e09fc..2e1f34b 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -53,7 +53,8 @@ L1CTL_GPRS_DL_TBF_CFG_REQ, L1CTL_GPRS_UL_BLOCK_REQ, L1CTL_GPRS_DL_BLOCK_IND, - L1CTL_EXT_RACH_REQ + L1CTL_EXT_RACH_REQ, + L1CTL_GPRS_RTS_IND } with { variant "FIELDLENGTH(8)" }; type enumerated L1ctlCcchMode { @@ -353,6 +354,13 @@ octetstring data } with { variant (data) "BYTEORDER(first)" }; + /* payload of L1CTL_GPRS_RTS_IND */ + type record L1ctlGprsRtsInd { + uint32_t fn, + uint8_t tn, + uint8_t usf + } with { variant "" }; + type union L1ctlMsgPayload { L1ctlFbsbReq fbsb_req, @@ -384,6 +392,7 @@ L1ctlGprsUlBlockReq ul_block_req, L1ctlGprsDlBlockInd dl_block_ind, L1ctlExtRachReq ext_rach_req, + L1ctlGprsRtsInd rts_ind, octetstring other } with { variant (other) "BYTEORDER(first)" @@ -438,6 +447,7 @@ ul_block_req, header.msg_type = L1CTL_GPRS_UL_BLOCK_REQ; dl_block_ind, header.msg_type = L1CTL_GPRS_DL_BLOCK_IND; ext_rach_req, header.msg_type = L1CTL_EXT_RACH_REQ; + rts_ind, header.msg_type = L1CTL_GPRS_RTS_IND; other, OTHERWISE; )" }; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35370?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: I0772f5273ecc2fb0c3def1fd645828b216e3032f Gerrit-Change-Number: 35370 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types: clean up, drop remains of PCUIFv10
by fixeria 15 Dec '23

15 Dec '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35372?usp=email ) Change subject: library/PCUIF_Types: clean up, drop remains of PCUIFv10 ...................................................................... library/PCUIF_Types: clean up, drop remains of PCUIFv10 Change-Id: Ibfe8558cb9f335d8c29348063b0ff02b138dd4c7 Related: osmo-pcu.git I68a3f59d5c960ae3a4fbd74f9d4a894295cb9ed8 Related: OS#6191 --- M library/PCUIF_CodecPort.ttcn M library/PCUIF_Types.ttcn M pcu/PCUIF_Components.ttcn 3 files changed, 55 insertions(+), 149 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/72/35372/1 diff --git a/library/PCUIF_CodecPort.ttcn b/library/PCUIF_CodecPort.ttcn index b49c513..55d2ee7 100644 --- a/library/PCUIF_CodecPort.ttcn +++ b/library/PCUIF_CodecPort.ttcn @@ -38,7 +38,6 @@ /* HACK: fix padding in decoded message. Due to a bug in TITAN, we * cannot just use its 'PADDING' attribute because it breaks decoding. */ if (ischosen(pout.data.u.data_req)) { fix_padding(pout.data.u.data_req); } - if (ischosen(pout.data.u.data_cnf)) { fix_padding(pout.data.u.data_cnf); } if (ischosen(pout.data.u.data_ind)) { fix_padding(pout.data.u.data_ind); } } with { extension "prototype(fast)" }; @@ -141,27 +140,15 @@ function f_PCUIF_tx_imm_ass_pch(PCUIF_CODEC_PT pt, integer conn_id, octetstring imm_ass, hexstring imsi, uint8_t bts_nr := 0, boolean wait_for_cnf := true, OCT4 msg_id := '01020304'O) { - var PCUIF_send_data sd; timer T := 3.0; - if (mp_pcuif_version < 11) { - /* append 3 last imsi digits so that the BTS is able to compute paging group */ - var hexstring last_digits := substr(imsi, lengthof(imsi)-3, 3); - log("3 last imsi digits: ", last_digits); - var octetstring prefix := ''O; - for (var integer i := 0; i < 3; i := i+1) { - prefix := prefix & int2oct(hex2int('30'H) + hex2int(last_digits[i]), 1); - } - pt.send(t_SD_PCUIF(conn_id, - ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_PCH, prefix & imm_ass))); - } else { - var PCUIF_pch pch; - pch.msg_id := msg_id; - pch.imsi := hex2str(imsi); - pch.data := imm_ass; - pch.confirm := true; - pt.send(t_SD_PCUIF(conn_id, ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_PCH_2, enc_PCUIF_pch(pch)))); - } + var PCUIF_pch pch := { + msg_id := msg_id, + imsi := hex2str(imsi), + data := imm_ass, + confirm := true + }; + pt.send(t_SD_PCUIF(conn_id, ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_PCH_2, enc_PCUIF_pch(pch)))); /* Exit early when the caller is not interested in the confirmation message */ if (wait_for_cnf == false) { @@ -170,23 +157,8 @@ T.start; alt { - [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF(bts_nr, 0, 0, PCU_IF_SAPI_PCH))) -> value sd { - if (mp_pcuif_version >= 11) { - setverdict(fail, "expecting tr_PCUIF_DATA_CNF_2 in PCUIF v.11 or later"); - mtc.stop; - } else { - log("IMM.ASS was sent on PCH at fn ", sd.data.u.data_cnf.fn); - return; - } - } - [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF_2(bts_nr, PCU_IF_SAPI_PCH_2))) -> value sd { - if (mp_pcuif_version < 11) { - setverdict(fail, "expecting tr_PCUIF_DATA_CNF in PCUIF v.10 or earlier"); - mtc.stop; - } else { - log("IMM.ASS was sent on PCH"); - return; - } + [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF_2(bts_nr, PCU_IF_SAPI_PCH_2))) { + log("IMM.ASS was sent on PCH"); } [] pt.receive { repeat; } [] T.timeout { @@ -200,22 +172,14 @@ * blocks that contain actually a valid immediate assignment message. Otherweise no confirmation is sent back */ function f_PCUIF_tx_mac_block_agch(PCUIF_CODEC_PT pt, integer conn_id, octetstring mac_block, boolean confirm := true, uint8_t bts_nr := 0, boolean wait_for_cnf := true, OCT4 msg_id := '01020304'O) { - var PCUIF_send_data sd; timer T := 3.0; - if (mp_pcuif_version < 11) { - if (wait_for_cnf == true) { - setverdict(fail, "confirmation for AGCH not supported in PCUIF v.10 or earlier"); - } - pt.send(t_SD_PCUIF(conn_id, - ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_AGCH, mac_block))); - } else { - var PCUIF_agch agch; - agch.msg_id := msg_id; - agch.data := mac_block; - agch.confirm := confirm; - pt.send(t_SD_PCUIF(conn_id, ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_AGCH_2, enc_PCUIF_agch(agch)))); - } + var PCUIF_agch agch := { + msg_id := msg_id, + data := mac_block, + confirm := confirm + }; + pt.send(t_SD_PCUIF(conn_id, ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_AGCH_2, enc_PCUIF_agch(agch)))); /* Exit early when the caller is not interested in the confirmation message */ if (wait_for_cnf == false) { @@ -224,14 +188,8 @@ T.start; alt { - [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF_2(bts_nr, PCU_IF_SAPI_AGCH_2))) -> value sd { - if (mp_pcuif_version < 11) { - setverdict(fail, "got tr_PCUIF_DATA_CNF_DT, but AGCH confirmation is not supported in PCUIF v.10 or earlier"); - mtc.stop; - } else { - log("IMM.ASS was sent on AGCH"); - return; - } + [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF_2(bts_nr, PCU_IF_SAPI_AGCH_2))) { + log("IMM.ASS was sent on AGCH"); } [] pt.receive { repeat; } [] T.timeout { diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 5ed87b6..7083884 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -21,11 +21,11 @@ }; const charstring PCU_SOCK_DEFAULT := "/tmp/pcu_bts"; -type integer PCUIF_Version (9..12); /* supported versions */ +type integer PCUIF_Version (11..12); /* supported versions */ type enumerated PCUIF_MsgType { PCU_IF_MSG_DATA_REQ ('00'O), - PCU_IF_MSG_DATA_CNF ('01'O), + /* RFU, removed in PCUIFv11 ('01'O), */ PCU_IF_MSG_DATA_IND ('02'O), PCU_IF_MSG_SUSP_REQ ('03'O), PCU_IF_MSG_APP_INFO_REQ ('04'O), @@ -48,8 +48,8 @@ type enumerated PCUIF_Sapi { PCU_IF_SAPI_UNKNOWN ('00'O), PCU_IF_SAPI_RACH ('01'O), - PCU_IF_SAPI_AGCH ('02'O), - PCU_IF_SAPI_PCH ('03'O), + /* RFU, removed in PCUIFv11 ('02'O), */ + /* RFU, removed in PCUIFv11 ('03'O), */ PCU_IF_SAPI_BCCH ('04'O), PCU_IF_SAPI_PDTCH ('05'O), PCU_IF_SAPI_PRACH ('06'O), @@ -361,7 +361,6 @@ type union PCUIF_MsgUnion { PCUIF_data data_req, - PCUIF_data data_cnf, PCUIF_data_cnf data_cnf2, PCUIF_data data_ind, PCUIF_susp_req susp_req, @@ -385,7 +384,6 @@ PCUIF_MsgUnion u } with { variant (u) "CROSSTAG( data_req, msg_type = PCU_IF_MSG_DATA_REQ; - data_cnf, msg_type = PCU_IF_MSG_DATA_CNF; data_cnf2, msg_type = PCU_IF_MSG_DATA_CNF_2; data_ind, msg_type = PCU_IF_MSG_DATA_IND; susp_req, msg_type = PCU_IF_MSG_SUSP_REQ; @@ -667,60 +665,6 @@ } } -template (value) PCUIF_Message ts_PCUIF_DATA_CNF(template (value) uint8_t bts_nr, - template (value) uint8_t trx_nr, - template (value) uint8_t ts_nr, - template (value) uint8_t block_nr, - template (value) uint32_t fn, - template (value) uint16_t arfcn, - template (value) PCUIF_Sapi sapi, - template (value) octetstring data) := { - msg_type := PCU_IF_MSG_DATA_CNF, - bts_nr := bts_nr, - spare := '0000'O, - u := { - data_cnf := { - sapi := sapi, - len := 0, /* overwritten */ - data := data, - fn := fn, - arfcn := arfcn, - trx_nr := trx_nr, - ts_nr := ts_nr, - block_nr := block_nr, - rssi := 0, - ber10k := 0, - ta_offs_qbits := 0, - lqual_cb := 0 - } - } -} -template PCUIF_Message tr_PCUIF_DATA_CNF(template uint8_t bts_nr := ?, - template uint8_t trx_nr := ?, - template uint8_t ts_nr := ?, - template PCUIF_Sapi sapi := ?, - template octetstring data := ?) := { - msg_type := PCU_IF_MSG_DATA_CNF, - bts_nr := bts_nr, - spare := ?, - u := { - data_cnf := { - sapi := sapi, - len := ?, - data := data, - fn := ?, - arfcn := ?, - trx_nr := trx_nr, - ts_nr := ts_nr, - block_nr := ?, - rssi := ?, - ber10k := ?, - ta_offs_qbits := ?, - lqual_cb := ? - } - } -} - template (value) PCUIF_Message ts_PCUIF_DATA_CNF_2(template (value) uint8_t bts_nr, template (value) PCUIF_Sapi sapi, template (value) OCT4 msg_id) := { diff --git a/pcu/PCUIF_Components.ttcn b/pcu/PCUIF_Components.ttcn index d417995..6e956ba 100644 --- a/pcu/PCUIF_Components.ttcn +++ b/pcu/PCUIF_Components.ttcn @@ -502,7 +502,6 @@ /* Wait until the PCU is connected */ PCUIF.receive(tr_RAW_PCU_EV(PCU_EV_CONNECT)); - var template PCUIF_Sapi tr_ccch_sapi := (PCU_IF_SAPI_PCH, PCU_IF_SAPI_PCH_2, PCU_IF_SAPI_AGCH, PCU_IF_SAPI_AGCH_2); alt { /* Wait for TXT.ind (PCU_VERSION) and respond with INFO.ind (SI13) */ [] PCUIF.receive(tr_PCUIF_TXT_IND(bts_nr, PCU_VERSION, ?)) -> value pcu_msg { @@ -538,40 +537,34 @@ "/TS" & int2str(pcu_msg.u.act_req.ts_nr)); repeat; } - [decode_data_req] PCUIF.receive(tr_PCUIF_DATA_REQ(bts_nr, ?, ?, sapi := tr_ccch_sapi)) -> value pcu_msg { - var octetstring data; - var PCUIF_pch pch; - var PCUIF_agch agch; + [decode_data_req] PCUIF.receive(tr_PCUIF_DATA_REQ(bts_nr, ?, ?, sapi := PCU_IF_SAPI_PCH_2)) -> value pcu_msg { var charstring imsi_filter_regexp := "(\d*)"; /* numbers only */ + var PCUIF_pch pch; - /* On PCH the payload is prefixed with paging group (3 octets): skip it. - * TODO: add an additional template parameter, so we can match it. */ - if (pcu_msg.u.data_req.sapi == PCU_IF_SAPI_PCH) { - data := substr(pcu_msg.u.data_req.data, 3, pcu_msg.u.data_req.len - 3); - } else if (pcu_msg.u.data_req.sapi == PCU_IF_SAPI_AGCH) { - data := pcu_msg.u.data_req.data; - } pcu_msg_rr.bts_nr := bts_nr; pcu_msg_rr.raw := pcu_msg.u.data_req; - if (pcu_msg_rr.raw.sapi == PCU_IF_SAPI_PCH_2) { - pch := dec_PCUIF_pch(pcu_msg_rr.raw.data); - pcu_msg_rr.msg_id := pch.msg_id; - pcu_msg_rr.imsi := regexp(pch.imsi, imsi_filter_regexp, 0); - pcu_msg_rr.rr_msg := dec_GsmRrMessage(pch.data); - pcu_msg_rr.confirm := pch.confirm; - } else if (pcu_msg_rr.raw.sapi == PCU_IF_SAPI_AGCH_2) { - agch := dec_PCUIF_agch(pcu_msg_rr.raw.data); - pcu_msg_rr.imsi := omit; - pcu_msg_rr.msg_id := agch.msg_id; - pcu_msg_rr.rr_msg := dec_GsmRrMessage(agch.data); - pcu_msg_rr.confirm := agch.confirm; - } else { - pcu_msg_rr.msg_id := omit; - pcu_msg_rr.imsi := omit; - pcu_msg_rr.rr_msg := dec_GsmRrMessage(data); - pcu_msg_rr.confirm := omit; - } + pch := dec_PCUIF_pch(pcu_msg_rr.raw.data); + pcu_msg_rr.msg_id := pch.msg_id; + pcu_msg_rr.imsi := regexp(pch.imsi, imsi_filter_regexp, 0); + pcu_msg_rr.rr_msg := dec_GsmRrMessage(pch.data); + pcu_msg_rr.confirm := pch.confirm; + + TC.send(pcu_msg_rr); + repeat; + } + [decode_data_req] PCUIF.receive(tr_PCUIF_DATA_REQ(bts_nr, ?, ?, sapi := PCU_IF_SAPI_AGCH_2)) -> value pcu_msg { + var PCUIF_agch agch; + + pcu_msg_rr.bts_nr := bts_nr; + pcu_msg_rr.raw := pcu_msg.u.data_req; + + agch := dec_PCUIF_agch(pcu_msg_rr.raw.data); + pcu_msg_rr.imsi := omit; + pcu_msg_rr.msg_id := agch.msg_id; + pcu_msg_rr.rr_msg := dec_GsmRrMessage(agch.data); + pcu_msg_rr.confirm := agch.confirm; + TC.send(pcu_msg_rr); repeat; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35372?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: Ibfe8558cb9f335d8c29348063b0ff02b138dd4c7 Gerrit-Change-Number: 35372 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in docker-playground[master]: ttcn3-bts-test: set PCUIFv12 for both -master and -latest
by osmith 15 Dec '23

15 Dec '23
Attention is currently required from: fixeria. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/35369?usp=email ) Change subject: ttcn3-bts-test: set PCUIFv12 for both -master and -latest ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/35369?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I70f0c30d6c514614095dcbbcac5d025001861fbc Gerrit-Change-Number: 35369 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 15 Dec 2023 09:03:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in docker-playground[master]: ttcn3-pcu-test: set PCUIFv12 for both -master and -latest
by osmith 15 Dec '23

15 Dec '23
Attention is currently required from: fixeria. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/35368?usp=email ) Change subject: ttcn3-pcu-test: set PCUIFv12 for both -master and -latest ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/35368?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: If0b2209af645f391817f65b4227736b52ca59e2e Gerrit-Change-Number: 35368 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 15 Dec 2023 09:03:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in docker-playground[master]: ttcn3-bts-test: set PCUIFv12 for both -master and -latest
by fixeria 15 Dec '23

15 Dec '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/35369?usp=email ) Change subject: ttcn3-bts-test: set PCUIFv12 for both -master and -latest ...................................................................... ttcn3-bts-test: set PCUIFv12 for both -master and -latest osmo-bts v1.7.2 (recently tagged) now also speaks PCUIFv12. Take a chance to fix ttcn3-bts-test-2023q1 by setting PCUIFv10. Change-Id: I70f0c30d6c514614095dcbbcac5d025001861fbc --- M ttcn3-bts-test/generic/BTS_Tests.cfg M ttcn3-bts-test/jenkins.sh M ttcn3-bts-test/oml/BTS_Tests.cfg M ttcn3-bts-test/virtphy/BTS_Tests.cfg 4 files changed, 18 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/69/35369/1 diff --git a/ttcn3-bts-test/generic/BTS_Tests.cfg b/ttcn3-bts-test/generic/BTS_Tests.cfg index 634d60d..cd1e739 100644 --- a/ttcn3-bts-test/generic/BTS_Tests.cfg +++ b/ttcn3-bts-test/generic/BTS_Tests.cfg @@ -18,7 +18,7 @@ BTS_Tests.mp_rtpem_bind_ip := "172.18.9.10" BTS_Tests.mp_osmuxem_bind_ip := "172.18.9.10" BTS_Tests.mp_l1_supports_gprs := true -PCUIF_Types.mp_pcuif_version := 11; +PCUIF_Types.mp_pcuif_version := 12; [MAIN_CONTROLLER] diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh index 08df03c..4128e08 100755 --- a/ttcn3-bts-test/jenkins.sh +++ b/ttcn3-bts-test/jenkins.sh @@ -122,13 +122,8 @@ } set_pcuif_version() { - # This changes the PCUIF module parameter of the TTCN3 testsuite when the testsuite is - # executed for current master. For latest the PCUIF module parameter must stay at v.11 - # since in osmo-bts-latest PCUIF v.12 is not yet supported. After the next release, PCUIF - # v.12 will be supported in osmo-bts-latest as well and this function, including the - # PCUIF_Types.mp_pcuif_version setting in the configuration files can be removed. - if image_suffix_is_master; then - sed -i 's/PCUIF_Types.mp_pcuif_version := 11/PCUIF_Types.mp_pcuif_version := 12/g' $1 + if image_suffix_is_2023q1; then + sed -i 's/PCUIF_Types.mp_pcuif_version := 12/PCUIF_Types.mp_pcuif_version := 10/g' $1 fi } diff --git a/ttcn3-bts-test/oml/BTS_Tests.cfg b/ttcn3-bts-test/oml/BTS_Tests.cfg index 74afc44..1311336 100644 --- a/ttcn3-bts-test/oml/BTS_Tests.cfg +++ b/ttcn3-bts-test/oml/BTS_Tests.cfg @@ -19,7 +19,7 @@ BTS_Tests_OML.mp_oml_ip := "172.18.9.10" BTS_Tests_OML.mp_oml_port := 3002 BTS_Tests_OML.mp_pcu_socket := "/data/unix/pcu_sock" -PCUIF_Types.mp_pcuif_version := 11; +PCUIF_Types.mp_pcuif_version := 12; [MAIN_CONTROLLER] diff --git a/ttcn3-bts-test/virtphy/BTS_Tests.cfg b/ttcn3-bts-test/virtphy/BTS_Tests.cfg index fe8afe4..f71c524 100644 --- a/ttcn3-bts-test/virtphy/BTS_Tests.cfg +++ b/ttcn3-bts-test/virtphy/BTS_Tests.cfg @@ -17,7 +17,7 @@ BTS_Tests.mp_ctrl_ip := "172.18.9.20" BTS_Tests.mp_l1_supports_gprs := true BTS_Tests.mp_bts_trxc_port := -1; -PCUIF_Types.mp_pcuif_version := 11; +PCUIF_Types.mp_pcuif_version := 12; [MAIN_CONTROLLER] -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/35369?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I70f0c30d6c514614095dcbbcac5d025001861fbc Gerrit-Change-Number: 35369 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in docker-playground[master]: ttcn3-pcu-test: set PCUIFv12 for both -master and -latest
by fixeria 15 Dec '23

15 Dec '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/35368?usp=email ) Change subject: ttcn3-pcu-test: set PCUIFv12 for both -master and -latest ...................................................................... ttcn3-pcu-test: set PCUIFv12 for both -master and -latest osmo-pcu v1.4.0 (recently tagged) now also speaks PCUIFv12. Change-Id: If0b2209af645f391817f65b4227736b52ca59e2e Related: OS#6191 --- M ttcn3-pcu-test/PCU_Tests.cfg M ttcn3-pcu-test/jenkins-sns.sh M ttcn3-pcu-test/jenkins.sh M ttcn3-pcu-test/sns/PCU_Tests.cfg 4 files changed, 16 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/68/35368/1 diff --git a/ttcn3-pcu-test/PCU_Tests.cfg b/ttcn3-pcu-test/PCU_Tests.cfg index b3f3b8f..8404f79 100644 --- a/ttcn3-pcu-test/PCU_Tests.cfg +++ b/ttcn3-pcu-test/PCU_Tests.cfg @@ -35,7 +35,7 @@ } } Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoPCU" -PCUIF_Types.mp_pcuif_version := 11 +PCUIF_Types.mp_pcuif_version := 12 [MAIN_CONTROLLER] diff --git a/ttcn3-pcu-test/jenkins-sns.sh b/ttcn3-pcu-test/jenkins-sns.sh index 06f833e..d63229b 100755 --- a/ttcn3-pcu-test/jenkins-sns.sh +++ b/ttcn3-pcu-test/jenkins-sns.sh @@ -11,16 +11,7 @@ set_pcuif_version() { if image_suffix_is_2023q1; then - sed -i 's/PCUIF_Types.mp_pcuif_version := 11/PCUIF_Types.mp_pcuif_version := 10/g' $1 - fi - - # This changes the PCUIF module parameter of the TTCN3 testsuite when the testsuite is - # executed for current master. For latest the PCUIF module parameter must stay at v.11 - # since in osmo-pcu-latest PCUIF v.12 is not yet supported. After the next release, PCUIF - # v.12 will be supported in osmo-pcu-latest as well and this function, including the - # PCUIF_Types.mp_pcuif_version setting in the configuration files can be removed. - if image_suffix_is_master; then - sed -i 's/PCUIF_Types.mp_pcuif_version := 11/PCUIF_Types.mp_pcuif_version := 12/g' $1 + sed -i 's/PCUIF_Types.mp_pcuif_version := 12/PCUIF_Types.mp_pcuif_version := 10/g' $1 fi } diff --git a/ttcn3-pcu-test/jenkins.sh b/ttcn3-pcu-test/jenkins.sh index 116f06c..dca6dc0 100755 --- a/ttcn3-pcu-test/jenkins.sh +++ b/ttcn3-pcu-test/jenkins.sh @@ -11,16 +11,7 @@ set_pcuif_version() { if image_suffix_is_2023q1; then - sed -i 's/PCUIF_Types.mp_pcuif_version := 11/PCUIF_Types.mp_pcuif_version := 10/g' $1 - fi - - # This changes the PCUIF module parameter of the TTCN3 testsuite when the testsuite is - # executed for current master. For latest the PCUIF module parameter must stay at v.11 - # since in osmo-pcu-latest PCUIF v.12 is not yet supported. After the next release, PCUIF - # v.12 will be supported in osmo-pcu-latest as well and this function, including the - # PCUIF_Types.mp_pcuif_version setting in the configuration files can be removed. - if image_suffix_is_master; then - sed -i 's/PCUIF_Types.mp_pcuif_version := 11/PCUIF_Types.mp_pcuif_version := 12/g' $1 + sed -i 's/PCUIF_Types.mp_pcuif_version := 12/PCUIF_Types.mp_pcuif_version := 10/g' $1 fi } diff --git a/ttcn3-pcu-test/sns/PCU_Tests.cfg b/ttcn3-pcu-test/sns/PCU_Tests.cfg index d62f52d..2b11462 100644 --- a/ttcn3-pcu-test/sns/PCU_Tests.cfg +++ b/ttcn3-pcu-test/sns/PCU_Tests.cfg @@ -59,7 +59,7 @@ } } } -PCUIF_Types.mp_pcuif_version := 11 +PCUIF_Types.mp_pcuif_version := 12 [MAIN_CONTROLLER] -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/35368?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: If0b2209af645f391817f65b4227736b52ca59e2e Gerrit-Change-Number: 35368 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: mme: Implement missing UE attach steps
by pespin 14 Dec '23

14 Dec '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35367?usp=email ) Change subject: mme: Implement missing UE attach steps ...................................................................... mme: Implement missing UE attach steps Related: OS#6294 Change-Id: Ib4a69aef40bf9dd17d640f650e459668f8415aaa --- M library/GTPv2_Templates.ttcn M library/NAS_Templates.ttcn M library/s1ap/S1AP_Templates.ttcn M mme/MME_Tests.ttcn 4 files changed, 319 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/67/35367/1 diff --git a/library/GTPv2_Templates.ttcn b/library/GTPv2_Templates.ttcn index 1ccbcb8..c09bca8 100644 --- a/library/GTPv2_Templates.ttcn +++ b/library/GTPv2_Templates.ttcn @@ -1040,6 +1040,65 @@ privateExtension := omit }}); +template (present) PDU_GTPCv2 +tr_GTP2C_ModifyBearerReq(template (present) OCT4 d_teid := ?, + template (present) OCT3 seq := ?) := +tr_PDU_GTP2C(d_teid, seq, { + modifyBearerRequest := { + mEI := *, + userLocationInfo := *, + servingNetwork := *, + rAT_Type := *, + indicationFlags := *, + fullyQualifiedTEID := *, + ambr := *, + delayDownlinkPacketNotificationReq := *, + bearerContextGrouped := *, + recovery := *, + uE_TimeZone := *, + csid := *, + user_CSG_Information := *, + iP_Addr := *, + portNumber := *, + lDN := *, + //maxMBR_APN_AMBR := *, + cNOperatorSelectionEntity := *, + presenceReportingAreaInformation := *, + overloadControlInformationGrouped := *, + servingPLMNRateControl := *, + counter := *, + privateExtension := * + }}); + +template (value) PDU_GTPCv2 +ts_GTP2C_ModifyBearerResp(template (value) OCT4 d_teid, + template (value) OCT3 seq, + template (value) GTP2C_Cause cause, + template (value) uint4_t bearer_id, + template (omit) BearerContextGrouped_List bearerContextGrouped := omit) := +ts_PDU_GTP2C(d_teid, seq, '23'O, { + modifyBearerResponse := { + cause := ts_GTP2C_Cause(cause, '0'B), + mSISDN := omit, + linkedEPS_Bearer_ID := ts_GTP2C_EpsBearerId(bearer_id), + aPN_Restriction := omit, + protocolConfigOptions := omit, + bearerContextGrouped := bearerContextGrouped, + changeReportingAction := omit, + cSG_InformationReportingAction := omit, + heNBInformationReporting := omit, + chargingGatewayName := omit, + chargingGatewayAddress := omit, + csid := omit, + recovery := omit, + lDN := omit, + indicationFlags := omit, + presenceReportingAreaAction := omit, + loadControlInformationGrouped := omit, + overloadControlInformationGrouped := omit, + pDNConnectionChargingID := omit, + privateExtension := omit + }}); template (value) PDU_GTPCv2 ts_GTP2C_DeleteBearerReq(template (value) OCT4 d_teid, diff --git a/library/NAS_Templates.ttcn b/library/NAS_Templates.ttcn index 45f5f8d..70561b3 100644 --- a/library/NAS_Templates.ttcn +++ b/library/NAS_Templates.ttcn @@ -1025,6 +1025,55 @@ } } } +template (present) PDU_NAS_EPS +tr_NAS_ActDefEpsBearCtxReq(template (present) BIT4 bearer_id := ?, + template (present) BIT8 proc_tid := ?, + template (present) EPS_QualityOfServiceV qos := ?, + template (present) octetstring apn := ?, + template (present) BIT3 addr_type := ?, + template (present) octetstring addr_info := ?) := { + protocolDiscriminator := c_EPS_NAS_PD_ESM, + ePS_messages := { + ePS_SessionManagement := { + pDU_NAS_EPS_ActDefEPSBearerContextRequest := { + ePSBearerIdentity := bearer_id, + procedureTransactionIdentifier := proc_tid, + messageType := '11000001'B, + ePS_QoS := { + lengthIndicator := ?, + ePS_QualityOfServiceV := qos + }, + accessPointName := { + lengthIndicator := 0, + accessPointNameValue := apn + }, + pDN_Address := { + lengthIndicator := 0, + typeValue := addr_type, + spare := '00000'B, + addressInformation := addr_info + }, + transactionIdentifier := *, + negotiatedQoS := *, + negotiated_LLC_SAPI := *, + radioPriority := *, + packetFlowID := *, + aPN_AMBR := *, + esmCause := *, + protocolConfigOptions := *, + connectivityType := *, + wLANOffloadIndication := *, + nBIFOMContainer := *, + headerCompressinConfiguration := *, + controlPlaneOnlyIndication := *, + extendedProtocolConfigurationOptions := *, + servingPLMNRateControl := *, + extended_APN_AMBR := *, + extendedQoS := * + } + } + } +} /* 8.3.4 Activate Default EPS Bearer Context Accept */ template (value) PDU_NAS_EPS diff --git a/library/s1ap/S1AP_Templates.ttcn b/library/s1ap/S1AP_Templates.ttcn index 9e75cec..26e1ae1 100644 --- a/library/s1ap/S1AP_Templates.ttcn +++ b/library/s1ap/S1AP_Templates.ttcn @@ -22,7 +22,7 @@ *********************************************************************************/ /********************************************************************************* - * 9.1.8 Management Messages + * 9.1.8 Management Messages *********************************************************************************/ /* 9.1.8.4 S1 SETUP REQUEST */ @@ -578,11 +578,30 @@ } /* 9.1.4.3 INITIAL CONTEXT SETUP RESPONSE */ +template (value) E_RABSetupItemCtxtSURes +ts_S1AP_RABSetupItemCtxtSURes(template (value) E_RAB_ID rab_id := 5, + template (value) TransportLayerAddress tla := '00001010000101110001100000000100'B, + template (value) GTP_TEID gtp_teid := '00000002'O) := { + e_RAB_ID := rab_id, + transportLayerAddress := tla, + gTP_TEID := gtp_teid, + iE_Extensions := omit +} +template (value) E_RABSetupListCtxtSURes +ts_S1AP_RABSetupListCtxtSURes(template (value) E_RABSetupItemCtxtSURes it := ts_S1AP_RABSetupItemCtxtSURes()) := { + { + id := S1AP_Constants.id_E_RABSetupItemCtxtSURes, + criticality := ignore, + value_ := { E_RABSetupItemCtxtSURes := it } + } +} + template (value) S1AP_PDU ts_S1AP_InitialCtxSetupResp(template (value) MME_UE_S1AP_ID mme_id, template (value) ENB_UE_S1AP_ID enb_id, - template (value) E_RABSetupListCtxtSURes rab_setup_items, - template (value) E_RABList rab_items) := { + template (value) E_RABSetupListCtxtSURes rab_setup_items + /*OPTIONAL: template (value) E_RABList rab_items */ + ) := { successfulOutcome := { procedureCode := id_InitialContextSetup, criticality := reject, @@ -598,14 +617,15 @@ criticality := reject, value_ := {ENB_UE_S1AP_ID := enb_id} }, { - id := S1AP_Constants.id_E_RABSetupListBearerSURes, + id := S1AP_Constants.id_E_RABSetupListCtxtSURes, criticality := ignore, value_ := {E_RABSetupListCtxtSURes := rab_setup_items} - }, { + } + /*, { id := S1AP_Constants.id_E_RABFailedToSetupListBearerSURes, criticality := ignore, value_ := {E_RABList := rab_items} - } + }*/ } } } diff --git a/mme/MME_Tests.ttcn b/mme/MME_Tests.ttcn index ce30279..3a72bd7 100644 --- a/mme/MME_Tests.ttcn +++ b/mme/MME_Tests.ttcn @@ -13,6 +13,7 @@ import from General_Types all; import from Native_Functions all; import from IPL4asp_Types all; +import from Misc_Helpers all; import from S1AP_Types all; import from S1AP_Templates all; import from S1AP_Emulation all; @@ -63,9 +64,34 @@ SupportedTAs supported_tas } +type record BearerConfig { + /* EPS Bearer ID */ + uint4_t ebi optional, + /* TEI (Data) local side, S11 (SGW) */ + OCT4 s11_teid_local optional, + /* TEI (Data) remote side, S11 (SGW) */ + OCT4 s11_teid_remote optional, + /* TEI (Data) local side, S5c (PGW) */ + OCT4 s5c_teid_local optional, + /* TEI (Data) remote side, S5c (PGW) */ + OCT4 s5c_teid_remote optional +}; + /* parameters of emulated UE */ type record UeParams { - hexstring imsi + hexstring imsi, + charstring ue_ip, + + /* TEI (Control) local side, S11 (SGW) */ + OCT4 s11_teic_local, + /* TEI (Control) remote side, S11 (SGW) */ + OCT4 s11_teic_remote optional, + /* TEI (Control) local side, S5c (PGW) */ + OCT4 s5c_teic_local, + /* TEI (Control) remote side, S5c (PGW) */ + OCT4 s5c_teic_remote optional, + + BearerConfig bearer optional } type component MTC_CT { @@ -168,6 +194,9 @@ integer mp_s11_local_port := 2123; charstring mp_s11_remote_ip := "127.0.0.2"; integer mp_s11_remote_port := 2123; + + /* PGW information announced by SGWC. MME never really interacts with these. */ + charstring mp_s5c_pgw_ip := "1.2.3.4"; } /* send incoming unit data messages (like reset) to global SGsAP_UNIT port */ @@ -246,7 +275,19 @@ } friend function f_init_one_ue(inout UeParams uep, integer imsi_suffix) { uep := { - imsi := f_gen_imsi(imsi_suffix) + imsi := f_gen_imsi(imsi_suffix), + ue_ip := "192.168.123.50", + s11_teic_local := '00000000'O, + s11_teic_remote := omit, + s5c_teic_local := '00000000'O, + s5c_teic_remote := omit, + bearer := { + ebi := omit, + s11_teid_local := omit, + s11_teid_remote := omit, + s5c_teid_local := omit, + s5c_teid_remote := omit + } } } friend function f_init_s1ap(charstring id, integer imsi_suffix) runs on MTC_CT { @@ -561,6 +602,33 @@ } } + +private altstep as_s1ap_handle_IntialCtxSetupReq() runs on ConnHdlr { + var S1AP_PDU rx_msg; + var PDU_NAS_EPS rx_nas; + [] S1AP.receive(tr_S1AP_IntialCtxSetupReq) -> value rx_msg { + var template (omit) MME_UE_S1AP_ID mme_ue_id := f_S1AP_get_MME_UE_S1AP_ID(rx_msg); + var template (omit) ENB_UE_S1AP_ID enb_ue_id := f_S1AP_get_ENB_UE_S1AP_ID(rx_msg); + var template (value) E_RABSetupItemCtxtSURes rab_setup_it; + var template (value) E_RABSetupListCtxtSURes rab_setup_items; + var octetstring esm_enc; + var template (value) PDU_NAS_EPS nas; + + rab_setup_it := ts_S1AP_RABSetupItemCtxtSURes(rab_id := 5, + tla := oct2bit(f_inet_addr(mp_mme_ip)), + gtp_teid := '00000002'O); + rab_setup_items := ts_S1AP_RABSetupListCtxtSURes(rab_setup_it); + S1AP.send(ts_S1AP_InitialCtxSetupResp(valueof(mme_ue_id), valueof(enb_ue_id), rab_setup_items)); + + nas := ts_NAS_ActDefEpsBearCtxAck(int2bit(g_pars.ue_pars.bearer.ebi, 4), '00000000'B, omit); + esm_enc := enc_PDU_NAS_EPS(valueof(nas)); + S1AP.send(ts_NAS_AttachComplete(esm_enc)); + } + [] S1AP.receive(PDU_NAS_EPS:?) -> value rx_nas { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Rx Unexpected NAS PDU msg: ", rx_nas)); + } +} + /* Exepect AuthInfoReq (AIR) from HSS; respond with AuthInforAnswer (AIA) */ private altstep as_DIA_AuthInfo() runs on ConnHdlr { var PDU_DIAMETER rx_dia; @@ -616,18 +684,96 @@ } } -private function f_TC_attach(ConnHdlrPars pars) runs on ConnHdlr { +private altstep as_GTP2C_CreateSession_success() runs on ConnHdlr { + var PDU_GTPCv2 rx_msg; + var BearerContextIEs rx_bctx_ies; + var template (value) FullyQualifiedTEID s11_fteid_c_ie, s11_fteid_u_ie, s5c_fteid_c_ie, s5c_fteid_u_ie; + var template (value) PDN_AddressAllocation paa; + var template (value) BearerContextIEs bctx_ies; - f_init_handler(pars); - var template (value) EPS_MobileIdentityV mi := ts_NAS_MobileId_IMSI(pars.ue_pars.imsi); + [] GTP2.receive(tr_GTP2C_CreateSessionReq(g_pars.ue_pars.imsi)) -> value rx_msg { + /* Parse TEIC and Bearer EBI and TEID and store it in g_pars */ + g_pars.ue_pars.s11_teic_remote := rx_msg.gtpcv2_pdu.createSessionRequest.fullyQualifiedTEID[0].tEID_GRE_Key; + g_pars.ue_pars.s5c_teic_remote := rx_msg.gtpcv2_pdu.createSessionRequest.fullyQualifiedTEID[1].tEID_GRE_Key; + + rx_bctx_ies := rx_msg.gtpcv2_pdu.createSessionRequest.bearerContextGrouped[0].bearerContextIEs; + g_pars.ue_pars.bearer.ebi := rx_bctx_ies.ePS_Bearer_ID.ePS_Bearer_ID_Value; + //g_pars.ue_pars.bearer.s11_teid_remote := rx_bctx_ies.fullyQualifiedTEID[0].tEID_GRE_Key; + + /* allocate + register TEID-C on local side */ + g_pars.ue_pars.s11_teic_local := f_gtp2_allocate_teid(); + g_pars.ue_pars.bearer.s11_teid_local := g_pars.ue_pars.s11_teic_local; + g_pars.ue_pars.s5c_teic_local := f_gtp2_allocate_teid(); + g_pars.ue_pars.bearer.s5c_teid_local := g_pars.ue_pars.s5c_teic_local; + + s11_fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S11_MME_GTPC, g_pars.ue_pars.s11_teic_local, 0, + f_inet_addr(mp_s11_local_ip), omit); + s5c_fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S5S8_PGW_GTPC, g_pars.ue_pars.s5c_teic_local, 1, + f_inet_addr(mp_s5c_pgw_ip), omit); + s11_fteid_u_ie := ts_GTP2C_FTEID(FTEID_IF_S1U_SGW_GTPU, g_pars.ue_pars.bearer.s11_teid_local, 0, + f_inet_addr(mp_s11_local_ip), omit); + s5c_fteid_u_ie := ts_GTP2C_FTEID(FTEID_IF_S5S8_PGW_GTPU, g_pars.ue_pars.bearer.s5c_teid_local, 2, + f_inet_addr(mp_s5c_pgw_ip), omit); + paa := ts_GTP2C_PdnAddrAlloc_v4(f_inet_addr(g_pars.ue_pars.ue_ip)); + bctx_ies := ts_GTP2C_BcContextIE(ebi := g_pars.ue_pars.bearer.ebi, + teid_list := { s11_fteid_u_ie, s5c_fteid_u_ie }, + qos := ts_GTP2C_BearerQos('09'O, 0, 0, 0, 0), + charging_id := ts_GTP2C_ChargingID(g_pars.ue_pars.bearer.s11_teid_local)); + + GTP2.send(ts_GTP2C_CreateSessionResp(g_pars.ue_pars.s11_teic_remote, + rx_msg.sequenceNumber, + { s11_fteid_c_ie, s5c_fteid_c_ie }, + paa, { ts_GTP2C_BcGrouped(bctx_ies) } )); + setverdict(pass); + } + [] GTP2.receive { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Unexpected GTPv2/S11 message from MME")); + } +} + +private altstep as_GTP2C_ModifyBearer_success() runs on ConnHdlr { + var PDU_GTPCv2 rx_msg; + var BearerContextIEs rx_bctx_ies; + var template (value) FullyQualifiedTEID s11_fteid_c_ie, s11_fteid_u_ie, s5c_fteid_c_ie, s5c_fteid_u_ie; + var template (value) BearerContextIEs bctx_ies; + + [] GTP2.receive(tr_GTP2C_ModifyBearerReq(g_pars.ue_pars.s11_teic_local)) -> value rx_msg { + + rx_bctx_ies := rx_msg.gtpcv2_pdu.modifyBearerRequest.bearerContextGrouped[0].bearerContextIEs; + + /* TODO: validate the S1-U fullyQualifiedTEID announces the IP address provided by the ENB in InitialCtxSetupResp */ + // rx_bctx_ies.fullyQualifiedTEID[0]. == f_inet_addr(mp_mme_ip) + + /* Update S11 TEID */ + g_pars.ue_pars.bearer.s11_teid_remote := rx_bctx_ies.fullyQualifiedTEID[0].tEID_GRE_Key; + + s11_fteid_u_ie := ts_GTP2C_FTEID(FTEID_IF_S1U_SGW_GTPU, g_pars.ue_pars.bearer.s11_teid_local, 0, + f_inet_addr(mp_s11_local_ip), omit); + bctx_ies := ts_GTP2C_BcContextIE(ebi := g_pars.ue_pars.bearer.ebi, + teid_list := { s11_fteid_u_ie }, + qos := ts_GTP2C_BearerQos('09'O, 0, 0, 0, 0), + charging_id := ts_GTP2C_ChargingID(g_pars.ue_pars.bearer.s11_teid_local)); + + GTP2.send(ts_GTP2C_ModifyBearerResp(g_pars.ue_pars.s11_teic_remote, + rx_msg.sequenceNumber, + Request_accepted, + g_pars.ue_pars.bearer.ebi, + { ts_GTP2C_BcGrouped(bctx_ies) } )); + setverdict(pass); + } + [] GTP2.receive { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Unexpected GTPv2/S11 message from MME")); + } +} + + +private function f_attach() runs on ConnHdlr { + var template (value) EPS_MobileIdentityV mi := ts_NAS_MobileId_IMSI(g_pars.ue_pars.imsi); var template (value) PDU_NAS_EPS nas_esm, nas_emm; timer T := 5.0; -/* - nas_esm := ts_NAS_ActDefEpsBearCtxReq(bearer_id := '0000'B, proc_tid := int2bit(1,8), - qos := c_NAS_defaultQoS, apn := c_NAS_defaultAPN, - addr_type := '000'B, addr_info := ''O); -*/ nas_esm := ts_NAS_PdnConnReq(bearer_id := '0000'B, proc_tid := int2bit(1,8), pdn_type := NAS_PDN_T_IPv4, req_type := '001'B); nas_emm := ts_NAS_AttachRequest(att_type := '000'B, kset_id := '000'B, mobile_id := mi, @@ -652,23 +798,31 @@ } /* We now expect the MME to send a Create Session Request to the SGW-C */ - /* TODO: be more restrictive, fix and use tr_GTP2C_CreateSessionReq */ f_gtp2_register_udmsg('20'O); T.start; alt { - [] GTP2.receive(tr_PDU_GTP2C) { - setverdict(pass); - } - [] GTP2.receive { - setverdict(fail, "unexpected GTPv2/S11 message from MME"); - } - [] T.timeout { - setverdict(fail, "no message from MME"); - } + [] as_GTP2C_CreateSession_success(); + [] T.timeout { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("No message from MME")); } } - /* TODO: Finish this procedure until Attach Complete */ + T.start; + alt { + [] as_s1ap_handle_IntialCtxSetupReq(); + [] T.timeout { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("No message from MME")); } + } + /* We now expect the MME to send a Modify Bearer Request to the SGW-C */ + f_gtp2_register_udmsg('22'O); + T.start; + alt { + [] as_GTP2C_ModifyBearer_success(); + [] T.timeout { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("No message from MME")); } + } +} + +private function f_TC_attach(ConnHdlrPars pars) runs on ConnHdlr { + f_init_handler(pars); + f_attach(); } testcase TC_s1ap_attach() runs on MTC_CT { var charstring id := testcasename(); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35367?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: Ib4a69aef40bf9dd17d640f650e459668f8415aaa Gerrit-Change-Number: 35367 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: LTE_CryptoFunctions.ttcn: Increment nus.rx_count on each pkt read
by pespin 14 Dec '23

14 Dec '23
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35366?usp=email ) Change subject: LTE_CryptoFunctions.ttcn: Increment nus.rx_count on each pkt read ...................................................................... Patch Set 1: (1 comment) File mme/LTE_CryptoFunctions.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35366/comment/69137f3c_7134… PS1, Line 151: nus.rx_count := nus.rx_count + 1; @laforge@gnumonks.org I tried fixing the following problem with this, but still not working: LTE_CryptoFunctions.ttcn:147 setverdict(fail): none -> fail reason: "Received NAS MAC '15E82DBA'O doesn't match expected MAC 'FE12D7C6'O: { securityHeaderType := '0010'B, messageAuthenticationCode := '15E82DBA'O, sequenceNumber := 2, nAS_Message := '0761430F90004F00700065006E00350047005346004732214171126000490100'O } | nus: { role := NAS_ROLE_UE (0), alg_int := NAS_ALG_IP_EIA1 (1), k_nas_int := '530CE32318F26264EAB26BC116870B86'O, alg_enc := NAS_ALG_ENC_EEA0 (0), k_nas_enc := 'C204B3E82B8A3B608DBE9BE478CD8FE7'O, rx_count := 1, tx_count := 0 }" Misc_Helpers.ttcn:32 setverdict(fail): fail -> fail reason: ""LTE_CryptoFunctions.ttcn:184 : f_nas_check_ip() failed"", component reason not changed The related wireshark message part, sent by open5gs-mmed which looks ok: NAS-PDU: 2715e82dba020761430f90004f00700065006e00350047005346004732214171126000490100 Non-Access-Stratum (NAS)PDU 0010 .... = Security header type: Integrity protected and ciphered (2) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) Message authentication code: 0x15e82dba Sequence number: 2 0000 .... = Security header type: Plain NAS message, not security protected (0) .... 0111 = Protocol discriminator: EPS mobility management messages (0x7) NAS EPS Mobility Management Message Type: EMM information (0x61) Network Name - Full name for network Time Zone - Local Time Zone and Time - Universal Time and Local Time Zone Daylight Saving Time The nAS_Message := '0761430F90004F00700065006E00350047005346004732214171126000490100'O matches correctly what wireshark decodes fine (the fields after "Sequence number: 2" above), so I'd say our current function to check integrity in ttcn3 is broken. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35366?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: I1ee25fd8fde6fbce95444ee4b73918ce1f61b427 Gerrit-Change-Number: 35366 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Thu, 14 Dec 2023 17:40:20 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • ...
  • 161
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.