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
[S] Change in osmo-ttcn3-hacks[master]: library/GTPv2_Templates: Fix seq nr not set in ts_GTP2C_DeleteSession...
by daniel 13 Dec '23

13 Dec '23
Attention is currently required from: fixeria, pespin. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35356?usp=email ) Change subject: library/GTPv2_Templates: Fix seq nr not set in ts_GTP2C_DeleteSessionResp ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35356?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: I8409eb35fc2f0bda6c5e11ae5c3d7628503bb2cd Gerrit-Change-Number: 35356 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 13 Dec 2023 21:34:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: library/GTPv2_Emulation: Patch SeqNr only on outbound initial messages
by pespin 13 Dec '23

13 Dec '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35358?usp=email ) Change subject: library/GTPv2_Emulation: Patch SeqNr only on outbound initial messages ...................................................................... library/GTPv2_Emulation: Patch SeqNr only on outbound initial messages Change-Id: I0f13074ccee2bf2d00d2dc2af491b9effc142f22 --- M library/GTPv2_Emulation.ttcn 1 file changed, 86 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/58/35358/1 diff --git a/library/GTPv2_Emulation.ttcn b/library/GTPv2_Emulation.ttcn index 736dd03..0b2cb4f 100644 --- a/library/GTPv2_Emulation.ttcn +++ b/library/GTPv2_Emulation.ttcn @@ -340,6 +340,73 @@ return omit; } +private function f_gtp2c_is_initial_msg(PDU_GTPCv2 msg) return boolean +{ + if (ischosen(msg.gtpcv2_pdu.echoRequest) or + ischosen(msg.gtpcv2_pdu.versionNotSupported) or + ischosen(msg.gtpcv2_pdu.createSessionRequest) or + ischosen(msg.gtpcv2_pdu.createBearerRequest) or + ischosen(msg.gtpcv2_pdu.bearerResourceCommand) or + ischosen(msg.gtpcv2_pdu.bearerResourceFailureIndication) or + ischosen(msg.gtpcv2_pdu.modifyBearerRequest) or + ischosen(msg.gtpcv2_pdu.deleteSessionRequest) or + ischosen(msg.gtpcv2_pdu.deleteBearerRequest) or + ischosen(msg.gtpcv2_pdu.downlinkDataNotification) or + ischosen(msg.gtpcv2_pdu.downlinkDataNotificationAcknowledgement) or + ischosen(msg.gtpcv2_pdu.downlinkDataNotificationFailureIndication) or + ischosen(msg.gtpcv2_pdu.deleteIndirectDataForwardingTunnelRequest) or + ischosen(msg.gtpcv2_pdu.modifyBearerCommand) or + ischosen(msg.gtpcv2_pdu.modifyBearerFailureIndication) or + ischosen(msg.gtpcv2_pdu.updateBearerRequest) or + ischosen(msg.gtpcv2_pdu.deleteBearerCommand) or + ischosen(msg.gtpcv2_pdu.createIndirectDataForwardingTunnelRequest) or + ischosen(msg.gtpcv2_pdu.releaseAccessBearersRequest) or + ischosen(msg.gtpcv2_pdu.stopPagingIndication) or + ischosen(msg.gtpcv2_pdu.modifyAccessBearersRequest) or + ischosen(msg.gtpcv2_pdu.remoteUEReportNotification) or + ischosen(msg.gtpcv2_pdu.remoteUEReportAcknowledge) or + ischosen(msg.gtpcv2_pdu.forwardRelocationRequest) or + ischosen(msg.gtpcv2_pdu.forwardRelocationCompleteNotification) or + ischosen(msg.gtpcv2_pdu.forwardRelocationCompleteAcknowledge) or + ischosen(msg.gtpcv2_pdu.contextRequest) or + ischosen(msg.gtpcv2_pdu.contextAcknowledge) or + ischosen(msg.gtpcv2_pdu.identificationRequest) or + ischosen(msg.gtpcv2_pdu.forwardAccessContextNotification) or + ischosen(msg.gtpcv2_pdu.forwardAccessContextAcknowledge) or + ischosen(msg.gtpcv2_pdu.detachNotification) or + ischosen(msg.gtpcv2_pdu.detachAcknowledge) or + ischosen(msg.gtpcv2_pdu.changeNotificationRequest) or + ischosen(msg.gtpcv2_pdu.relocationCancelRequest) or + ischosen(msg.gtpcv2_pdu.configurationTransferTunnel) or + ischosen(msg.gtpcv2_pdu.rAN_InformationRelay) or + ischosen(msg.gtpcv2_pdu.suspendNotification) or + ischosen(msg.gtpcv2_pdu.suspendAcknowledge) or + ischosen(msg.gtpcv2_pdu.resumeNotification) or + ischosen(msg.gtpcv2_pdu.resumeAcknowledge) or + ischosen(msg.gtpcv2_pdu.cSPagingIndication) or + ischosen(msg.gtpcv2_pdu.createForwardingTunnelRequest) or + ischosen(msg.gtpcv2_pdu.deletePDN_ConnectionSetRequest) or + ischosen(msg.gtpcv2_pdu.traceSessionActivation) or + ischosen(msg.gtpcv2_pdu.traceSessionDeactivation) or + ischosen(msg.gtpcv2_pdu.updatePDN_ConnectionSetRequest) or + ischosen(msg.gtpcv2_pdu.pGW_RestartNotification) or + ischosen(msg.gtpcv2_pdu.pGW_RestartNotificationAcknowledge) or + ischosen(msg.gtpcv2_pdu.pGW_DownlinkTriggeringNotification) or + ischosen(msg.gtpcv2_pdu.pGW_DownlinkTriggeringAcknowledge) or + ischosen(msg.gtpcv2_pdu.alertMMENotification) or + ischosen(msg.gtpcv2_pdu.alertMMEAcknowledge) or + ischosen(msg.gtpcv2_pdu.uEActivityNotification) or + ischosen(msg.gtpcv2_pdu.uEActivityAcknowledge) or + ischosen(msg.gtpcv2_pdu.mBMSSessionStartRequest) or + ischosen(msg.gtpcv2_pdu.mBMSSessionUpdateRequest) or + ischosen(msg.gtpcv2_pdu.mBMSSessionStopRequest) or + ischosen(msg.gtpcv2_pdu.iSR_StatusIndication) or + ischosen(msg.gtpcv2_pdu.uE_RegistrationQueryRequest)) { + return true; + } + return false; +} + private template (value) SctpTuple ts_SCTP(template (omit) integer ppid := omit) := { sinfo_stream := omit, sinfo_ppid := ppid, @@ -507,10 +574,11 @@ } [] TEID0.receive(PDU_GTPCv2:?) -> value g2c sender vc_conn { - /* patch in the next sequence number */ - /* FIXME: do this only for outbound requests */ - g2c.sequenceNumber := int2oct(g_c_seq_nr, 3); - g_c_seq_nr := g_c_seq_nr + 1; + /* patch in the next sequence number on outbound Initial message */ + if (f_gtp2c_is_initial_msg(g2c)) { + g2c.sequenceNumber := int2oct(g_c_seq_nr, 3); + g_c_seq_nr := g_c_seq_nr + 1; + } /* build Gtp2cUnitdata */ g2c_ud := { peer := g_peer, gtpc := g2c }; GTP2C.send(g2c_ud); @@ -520,10 +588,11 @@ } [] CLIENT.receive(PDU_GTPCv2:?) -> value g2c sender vc_conn { - /* patch in the next sequence number */ - /* FIXME: do this only for outbound requests */ - g2c.sequenceNumber := int2oct(g_c_seq_nr, 3); - g_c_seq_nr := g_c_seq_nr + 1; + /* patch in the next sequence number on outbound Initial message */ + if (f_gtp2c_is_initial_msg(g2c)) { + g2c.sequenceNumber := int2oct(g_c_seq_nr, 3); + g_c_seq_nr := g_c_seq_nr + 1; + } /* build Gtp2cUnitdata */ g2c_ud := { peer := g_peer, gtpc := g2c }; GTP2C.send(g2c_ud); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35358?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: I0f13074ccee2bf2d00d2dc2af491b9effc142f22 Gerrit-Change-Number: 35358 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: GTPv2: set TEID and SeqNr in ts_GTP2C_CreateSessionResp
by pespin 13 Dec '23

13 Dec '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35357?usp=email ) Change subject: GTPv2: set TEID and SeqNr in ts_GTP2C_CreateSessionResp ...................................................................... GTPv2: set TEID and SeqNr in ts_GTP2C_CreateSessionResp Change-Id: I83f1f4f78adb9cd85758513420479327ea73187a --- M epdg/EPDG_Tests.ttcn M library/GTPv2_Templates.ttcn 2 files changed, 16 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/57/35357/1 diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn index 99a4721..f58cf96 100644 --- a/epdg/EPDG_Tests.ttcn +++ b/epdg/EPDG_Tests.ttcn @@ -429,7 +429,9 @@ teid_list := { fteid_u_ie }, qos := ts_GTP2C_BearerQos('09'O, 0,0,0,0), charging_id := ts_GTP2C_ChargingID(g_pars.teic_local)); - GTP2.send(ts_GTP2C_CreateSessionResp({ fteid_c_ie }, paa, { ts_GTP2C_BcGrouped(bctx_ies) } )); + GTP2.send(ts_GTP2C_CreateSessionResp(g_pars.teic_remote, rx_msg.sequenceNumber, + { fteid_c_ie }, paa, + { ts_GTP2C_BcGrouped(bctx_ies) } )); setverdict(pass); } [] GTP2.receive(PDU_GTPCv2:?) -> value rx_msg { diff --git a/library/GTPv2_Templates.ttcn b/library/GTPv2_Templates.ttcn index 4af82e8..1ccbcb8 100644 --- a/library/GTPv2_Templates.ttcn +++ b/library/GTPv2_Templates.ttcn @@ -838,10 +838,12 @@ }}); template (value) PDU_GTPCv2 -ts_GTP2C_CreateSessionResp(template (value) FullyQualifiedTEID_List fteids, +ts_GTP2C_CreateSessionResp(template (value) OCT4 d_teid, + template (value) OCT3 seq, + template (value) FullyQualifiedTEID_List fteids, template (value) PDN_AddressAllocation addr, template (omit) BearerContextGrouped_List bearerContextGrouped := omit) := -ts_PDU_GTP2C('00000000'O, '000000'O, '21'O, { +ts_PDU_GTP2C(d_teid, seq, '21'O, { createSessionResponse := { cause := ts_GTP2C_Cause(Request_accepted, '0'B), changeReportingAction := omit, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35357?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: I83f1f4f78adb9cd85758513420479327ea73187a Gerrit-Change-Number: 35357 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: library/GTPv2_Templates: Fix seq nr not set in ts_GTP2C_DeleteSession...
by pespin 13 Dec '23

13 Dec '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35356?usp=email ) Change subject: library/GTPv2_Templates: Fix seq nr not set in ts_GTP2C_DeleteSessionResp ...................................................................... library/GTPv2_Templates: Fix seq nr not set in ts_GTP2C_DeleteSessionResp Change-Id: I8409eb35fc2f0bda6c5e11ae5c3d7628503bb2cd --- M library/GTPv2_Templates.ttcn 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/56/35356/1 diff --git a/library/GTPv2_Templates.ttcn b/library/GTPv2_Templates.ttcn index 6ea06a2..4af82e8 100644 --- a/library/GTPv2_Templates.ttcn +++ b/library/GTPv2_Templates.ttcn @@ -969,7 +969,7 @@ ts_GTP2C_DeleteSessionResp(template (value) OCT4 d_teid, template (value) OCT3 seq, template (value) GTP2C_Cause cause) := -ts_PDU_GTP2C(d_teid, '000000'O, '25'O, { +ts_PDU_GTP2C(d_teid, seq, '25'O, { deleteSessionResponse := { cause := ts_GTP2C_Cause(cause, '0'B), recovery := omit, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35356?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: I8409eb35fc2f0bda6c5e11ae5c3d7628503bb2cd Gerrit-Change-Number: 35356 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-iuh[master]: iu_client: Handle empty CR and InitialUE Message in DATA.ind
by daniel 13 Dec '23

13 Dec '23
Attention is currently required from: neels. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/35354?usp=email ) Change subject: iu_client: Handle empty CR and InitialUE Message in DATA.ind ...................................................................... Patch Set 2: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/35354?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I749ede737b9ac15bca37bbb16f3988b0db1125c1 Gerrit-Change-Number: 35354 Gerrit-PatchSet: 2 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Wed, 13 Dec 2023 17:04:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-iuh[master]: iu_client: Handle empty CR and InitialUE Message in DATA.ind
by Jenkins Builder 13 Dec '23

13 Dec '23
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/35354?usp=email ) Change subject: iu_client: Handle empty CR and InitialUE Message in DATA.ind ...................................................................... Patch Set 1: (6 comments) File src/iu_client.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-13099): https://gerrit.osmocom.org/c/osmo-iuh/+/35354/comment/fd14000f_ecaae644 PS1, Line 180: static void ue_conn_sccp_addr_add(uint32_t conn_id, const struct osmo_sccp_addr *calling_addr) { open brace '{' following function definitions go on the next line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-13099): https://gerrit.osmocom.org/c/osmo-iuh/+/35354/comment/97e6f0cc_25602fd3 PS1, Line 189: static const struct osmo_sccp_addr *ue_conn_sccp_addr_find(uint32_t conn_id) { open brace '{' following function definitions go on the next line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-13099): https://gerrit.osmocom.org/c/osmo-iuh/+/35354/comment/74971f2e_620ebf20 PS1, Line 192: if (entry->conn_id == conn_id) { braces {} are not necessary for single statement blocks Robot Comment from checkpatch (run ID jenkins-gerrit-lint-13099): https://gerrit.osmocom.org/c/osmo-iuh/+/35354/comment/1dacde76_ef20c1c5 PS1, Line 199: static void ue_conn_sccp_addr_del(uint32_t conn_id) { open brace '{' following function definitions go on the next line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-13099): https://gerrit.osmocom.org/c/osmo-iuh/+/35354/comment/affd1729_5e710e86 PS1, Line 931: "N-DATA.ind for unknown conn_id (%u)\n", conn_id); code indent should use tabs where possible Robot Comment from checkpatch (run ID jenkins-gerrit-lint-13099): https://gerrit.osmocom.org/c/osmo-iuh/+/35354/comment/b846dfaf_cd407be3 PS1, Line 931: "N-DATA.ind for unknown conn_id (%u)\n", conn_id); please, no space before tabs -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/35354?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I749ede737b9ac15bca37bbb16f3988b0db1125c1 Gerrit-Change-Number: 35354 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Wed, 13 Dec 2023 16:42:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-iuh[master]: iu_client: Use local variable to track conn_id
by daniel 13 Dec '23

13 Dec '23
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/35353?usp=email ) Change subject: iu_client: Use local variable to track conn_id ...................................................................... iu_client: Use local variable to track conn_id Change-Id: I967a311e2ad5af585c032426cc6b0680c3313b0f --- M src/iu_client.c 1 file changed, 21 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/53/35353/1 diff --git a/src/iu_client.c b/src/iu_client.c index 077ac27..9da11ea 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -819,6 +819,7 @@ int rc = -1; struct ranap_ue_conn_ctx *ue; struct new_ue_conn_ctx new_ctx = {}; + uint32_t conn_id; LOGPIU(LOGL_DEBUG, "sccp_sap_up(%s)\n", osmo_scu_prim_name(oph)); @@ -828,7 +829,8 @@ break; case OSMO_PRIM(OSMO_SCU_PRIM_N_CONNECT, PRIM_OP_INDICATION): /* indication of new inbound connection request*/ - LOGPIU(LOGL_DEBUG, "N-CONNECT.ind(X->%u)\n", prim->u.connect.conn_id); + conn_id = prim->u.connect.conn_id; + LOGPIU(LOGL_DEBUG, "N-CONNECT.ind(X->%u)\n", conn_id); if (/* prim->u.connect.called_addr.ssn != OSMO_SCCP_SSN_RANAP || */ !msgb_l2(oph->msg) || msgb_l2len(oph->msg) == 0) { LOGPIU(LOGL_NOTICE, @@ -836,7 +838,7 @@ return 0; } new_ctx.sccp_addr = prim->u.connect.calling_addr; - new_ctx.conn_id = prim->u.connect.conn_id; + new_ctx.conn_id = conn_id; /* first ensure the local SCCP socket is ACTIVE */ resp = make_conn_resp(&prim->u.connect); osmo_sccp_user_sap_down(scu, resp); @@ -845,9 +847,9 @@ break; case OSMO_PRIM(OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION): /* indication of disconnect */ - LOGPIU(LOGL_DEBUG, "N-DISCONNECT.ind(%u)\n", - prim->u.disconnect.conn_id); - ue = ue_conn_ctx_find(prim->u.disconnect.conn_id); + conn_id = prim->u.disconnect.conn_id; + LOGPIU(LOGL_DEBUG, "N-DISCONNECT.ind(%u)\n", conn_id); + ue = ue_conn_ctx_find(conn_id); if (!ue) break; @@ -856,14 +858,14 @@ rc = ranap_cn_rx_co(cn_ranap_handle_co, ue, msgb_l2(oph->msg), msgb_l2len(oph->msg)); /* A Iu Release event might be used to free the UE in cn_ranap_handle_co. */ - ue = ue_conn_ctx_find(prim->u.disconnect.conn_id); + ue = ue_conn_ctx_find(conn_id); if (!ue) break; global_iu_event(ue, RANAP_IU_EVENT_LINK_INVALIDATED, NULL); /* A RANAP_IU_EVENT_LINK_INVALIDATED, can lead to a free */ - ue = ue_conn_ctx_find(prim->u.disconnect.conn_id); + ue = ue_conn_ctx_find(conn_id); if (!ue) break; if (ue->free_on_release) @@ -871,10 +873,11 @@ break; case OSMO_PRIM(OSMO_SCU_PRIM_N_DATA, PRIM_OP_INDICATION): /* connection-oriented data received */ - LOGPIU(LOGL_DEBUG, "N-DATA.ind(%u, %s)\n", prim->u.data.conn_id, + conn_id = prim->u.data.conn_id; + LOGPIU(LOGL_DEBUG, "N-DATA.ind(%u, %s)\n", conn_id, osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg))); /* resolve UE context */ - ue = ue_conn_ctx_find(prim->u.data.conn_id); + ue = ue_conn_ctx_find(conn_id); if (!ue) break; -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/35353?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I967a311e2ad5af585c032426cc6b0680c3313b0f Gerrit-Change-Number: 35353 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-iuh[master]: iu_client: Handle empty CR and InitialUE Message in DATA.ind
by daniel 13 Dec '23

13 Dec '23
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/35354?usp=email ) Change subject: iu_client: Handle empty CR and InitialUE Message in DATA.ind ...................................................................... iu_client: Handle empty CR and InitialUE Message in DATA.ind Related: OS#6307 Change-Id: I749ede737b9ac15bca37bbb16f3988b0db1125c1 --- M src/iu_client.c 1 file changed, 75 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/54/35354/1 diff --git a/src/iu_client.c b/src/iu_client.c index 9da11ea..27e7140 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -55,6 +55,14 @@ uint8_t rac; }; +/* Entry to cache conn_id <-> sccp_addr mapping in case we receive an empty CR */ +struct iu_new_ctx_entry { + struct llist_head list; + + uint32_t conn_id; + struct osmo_sccp_addr sccp_addr; +}; + /* A remote RNC (Radio Network Controller, like BSC but for UMTS) that has * called us and is currently reachable at the given osmo_sccp_addr. So, when we * know a LAC for a subscriber, we can page it at the RNC matching that LAC or @@ -94,6 +102,7 @@ #define LOGPIUC(level, fmt, args...) \ LOGPC(iu_log_subsystem, level, fmt, ## args) +static LLIST_HEAD(ue_conn_sccp_addr_list); static LLIST_HEAD(ue_conn_ctx_list); static LLIST_HEAD(rnc_list); @@ -168,6 +177,36 @@ talloc_free(ue_ctx); } +static void ue_conn_sccp_addr_add(uint32_t conn_id, const struct osmo_sccp_addr *calling_addr) { + struct iu_new_ctx_entry *entry = talloc_zero(talloc_iu_ctx, struct iu_new_ctx_entry); + + entry->conn_id = conn_id; + entry->sccp_addr = *calling_addr; + + llist_add(&entry->list, &ue_conn_sccp_addr_list); +} + +static const struct osmo_sccp_addr *ue_conn_sccp_addr_find(uint32_t conn_id) { + struct iu_new_ctx_entry *entry; + llist_for_each_entry(entry, &ue_conn_sccp_addr_list, list) { + if (entry->conn_id == conn_id) { + return &entry->sccp_addr; + } + } + return NULL; +} + +static void ue_conn_sccp_addr_del(uint32_t conn_id) { + struct iu_new_ctx_entry *entry; + llist_for_each_entry(entry, &ue_conn_sccp_addr_list, list) { + if (entry->conn_id == conn_id) { + llist_del(&entry->list); + talloc_free(entry); + return; + } + } +} + static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, struct osmo_sccp_addr *addr) { struct ranap_iu_rnc *rnc = talloc_zero(talloc_iu_ctx, struct ranap_iu_rnc); @@ -831,24 +870,29 @@ /* indication of new inbound connection request*/ conn_id = prim->u.connect.conn_id; LOGPIU(LOGL_DEBUG, "N-CONNECT.ind(X->%u)\n", conn_id); - if (/* prim->u.connect.called_addr.ssn != OSMO_SCCP_SSN_RANAP || */ - !msgb_l2(oph->msg) || msgb_l2len(oph->msg) == 0) { - LOGPIU(LOGL_NOTICE, - "Received invalid N-CONNECT.ind\n"); - return 0; - } + new_ctx.sccp_addr = prim->u.connect.calling_addr; new_ctx.conn_id = conn_id; + /* first ensure the local SCCP socket is ACTIVE */ resp = make_conn_resp(&prim->u.connect); osmo_sccp_user_sap_down(scu, resp); /* then handle the RANAP payload */ - rc = ranap_cn_rx_co(cn_ranap_handle_co_initial, &new_ctx, msgb_l2(oph->msg), msgb_l2len(oph->msg)); + if (/* prim->u.connect.called_addr.ssn != OSMO_SCCP_SSN_RANAP || */ + !msgb_l2(oph->msg) || msgb_l2len(oph->msg) == 0) { + LOGPIU(LOGL_DEBUG, + "Received N-CONNECT.ind without data\n"); + ue_conn_sccp_addr_add(conn_id, &prim->u.connect.calling_addr); + } else { + rc = ranap_cn_rx_co(cn_ranap_handle_co_initial, &new_ctx, msgb_l2(oph->msg), msgb_l2len(oph->msg)); + } break; case OSMO_PRIM(OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION): /* indication of disconnect */ conn_id = prim->u.disconnect.conn_id; LOGPIU(LOGL_DEBUG, "N-DISCONNECT.ind(%u)\n", conn_id); + + ue_conn_sccp_addr_del(conn_id); ue = ue_conn_ctx_find(conn_id); if (!ue) break; @@ -876,10 +920,23 @@ conn_id = prim->u.data.conn_id; LOGPIU(LOGL_DEBUG, "N-DATA.ind(%u, %s)\n", conn_id, osmo_hexdump(msgb_l2(oph->msg), msgb_l2len(oph->msg))); + /* resolve UE context */ ue = ue_conn_ctx_find(conn_id); - if (!ue) + if (!ue) { + /* Could be an InitialUE-Message after an empty CR, recreate new_ctx */ + const struct osmo_sccp_addr *sccp_addr = ue_conn_sccp_addr_find(conn_id); + if (!sccp_addr) { + LOGPIU(LOGL_NOTICE, + "N-DATA.ind for unknown conn_id (%u)\n", conn_id); + break; + } + new_ctx.conn_id = conn_id; + new_ctx.sccp_addr = *sccp_addr; + ue_conn_sccp_addr_del(conn_id); + rc = ranap_cn_rx_co(cn_ranap_handle_co_initial, &new_ctx, msgb_l2(oph->msg), msgb_l2len(oph->msg)); break; + } rc = ranap_cn_rx_co(cn_ranap_handle_co, ue, msgb_l2(oph->msg), msgb_l2len(oph->msg)); break; -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/35354?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I749ede737b9ac15bca37bbb16f3988b0db1125c1 Gerrit-Change-Number: 35354 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: ecu: force alignment of member data in struct osmo_ecu_state
by pespin 13 Dec '23

13 Dec '23
Attention is currently required from: dexter, laforge, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email ) Change subject: ecu: force alignment of member data in struct osmo_ecu_state ...................................................................... Patch Set 5: (1 comment) Commit Message: https://gerrit.osmocom.org/c/libosmocore/+/35212/comment/42cf836f_15bccd65 PS5, Line 7: ecu: force alignment of member data in struct osmo_ecu_state you probably need to update the whole commit description since the approach changed. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I28672856e8e8f47e04ffe09ee3e07b577108cdc7 Gerrit-Change-Number: 35212 Gerrit-PatchSet: 5 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 13 Dec 2023 13:53:57 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: ecu: force alignment of member data in struct osmo_ecu_state
by pespin 13 Dec '23

13 Dec '23
Attention is currently required from: dexter, laforge, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email ) Change subject: ecu: force alignment of member data in struct osmo_ecu_state ...................................................................... Patch Set 4: Code-Review+1 (3 comments) Patchset: PS4: I don't see any good reason not to use container_of here instead of casting. File src/codec/ecu_fr.c: https://gerrit.osmocom.org/c/libosmocore/+/35212/comment/18f6223c_7d3d57c8 PS4, Line 92: struct osmo_ecu_state ecu_state; Add a comment that ecu_state should be the first in the struct. If you used container_of, this wouldn't be required. https://gerrit.osmocom.org/c/libosmocore/+/35212/comment/6e097f90_5147b26e PS4, Line 294: return (struct osmo_ecu_state*) fr; while the cast is fine, the container_of would probably be safer and would allow this struct to be anywhere, with no real cost (a few arithmetic operations). -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I28672856e8e8f47e04ffe09ee3e07b577108cdc7 Gerrit-Change-Number: 35212 Gerrit-PatchSet: 4 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 13 Dec 2023 13:53:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • ...
  • 161
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.