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

Keyboard Shortcuts

Thread View

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

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

June 2023

  • 1 participants
  • 2480 discussions
[S] Change in osmo-ttcn3-hacks[master]: msc: f_mo_call_establish: improve AoIP IE check
by osmith 20 Jun '23

20 Jun '23
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33353 ) Change subject: msc: f_mo_call_establish: improve AoIP IE check ...................................................................... msc: f_mo_call_establish: improve AoIP IE check Check if the AoIP Transport Layer IE is present before checking its value. This gives a more meaningful error than Dynamic Testcase Error if it is not present. Change-Id: I52fc829b017848b6afe7e637f1911a0976f9c91d --- M msc/BSC_ConnectionHandler.ttcn 1 file changed, 17 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index f141955..4351e06 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1605,6 +1605,10 @@ var BSSMAP_IE_SpeechCodec codec; var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; + if (not ispresent(bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer)) { + setverdict(fail, "MSC sent Assignment Request without AoIP Transport Layer IE"); + mtc.stop; + } if (not match(bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer, tla_ass1) and not match(bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer, tla_ass2)) { log("Expected one of: 1:", tla_ass1, " 2:", tla_ass2); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33353 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: I52fc829b017848b6afe7e637f1911a0976f9c91d Gerrit-Change-Number: 33353 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-netif[master]: stream: Allow setting name printed during logging
by laforge 20 Jun '23

20 Jun '23
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33336 ) Change subject: stream: Allow setting name printed during logging ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33336 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I539a0d29d11348efe702f971965a55cf56db5c59 Gerrit-Change-Number: 33336 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 20 Jun 2023 07:20:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-netif[master]: stream: Drop recently added API osmo_stream_cli_create2
by laforge 20 Jun '23

20 Jun '23
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33342 ) Change subject: stream: Drop recently added API osmo_stream_cli_create2 ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33342 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I2a2fad318ef22c2ac117f95588a078ca3beccea5 Gerrit-Change-Number: 33342 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 20 Jun 2023 07:19:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: stream: Drop name param from recently added API osmo_stream_srv_creat...
by laforge 20 Jun '23

20 Jun '23
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33343 ) Change subject: stream: Drop name param from recently added API osmo_stream_srv_create2() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33343 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I5d677ef57b7db0aedd8c43282568c845097cb12b Gerrit-Change-Number: 33343 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 20 Jun 2023 07:19:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: stream: srv cb: Use osmo_sockaddr and improve logging when cli connects
by laforge 20 Jun '23

20 Jun '23
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33338 ) Change subject: stream: srv cb: Use osmo_sockaddr and improve logging when cli connects ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33338 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I6e556f8263496ded41bb221ccc8e193c5361697f Gerrit-Change-Number: 33338 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 20 Jun 2023 07:19:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: stream: Drop name param from recently added API osmo_stream_srv_creat...
by laforge 20 Jun '23

20 Jun '23
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33343 ) Change subject: stream: Drop name param from recently added API osmo_stream_srv_create2() ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33343 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I5d677ef57b7db0aedd8c43282568c845097cb12b Gerrit-Change-Number: 33343 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 20 Jun 2023 07:19:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-netif[master]: stream: Drop recently added API osmo_stream_cli_create2
by laforge 20 Jun '23

20 Jun '23
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33342 ) Change subject: stream: Drop recently added API osmo_stream_cli_create2 ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33342 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I2a2fad318ef22c2ac117f95588a078ca3beccea5 Gerrit-Change-Number: 33342 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 20 Jun 2023 07:19:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-pcu[master]: Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT ...
by laforge 20 Jun '23

20 Jun '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32339 ) Change subject: Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT CTRL ACK ...................................................................... Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT CTRL ACK Dispatching TBF_EV_CONTENTION_RESOLUTION_MS_SUCCESS means the UL TBF is able to be used to assign DL TBFs over PACCH. However, there's an extra implicit restriction: if the PCU already sent the final UL ACK/NACK to that UL TBF, then whatever message sent after it cannot be reliably answered, since the MS will go back to idle state after issues the PKT CTRL ACK for that final UL ACK/NACK. This condition is already being checked in contention_resolution_success(): """ if (ms_need_dl_tbf(ms()) && !tbf_ul_ack_waiting_cnf_final_ack(this)) ms_new_dl_tbf_assigned_on_pacch(ms(), this); """ Since we are considering the UL TBF to have done contention resolution when we transmit the *first* UL ACK/NACK, it mans we are doing both things on the same code path iif the *first* UL ACK/NACK is at the same time the *final* UL ACK for that UL TBF. This can happen if the UL TBF is only sending 1 block, which will have CV=0. This can usually happen during GMM Attach Request. In this scenario, with current code goes into a situation where first the TBF_EV_CONTENTION_RESOLUTION_MS_SUCCESS is triggered and *afterwards* the UL_ACK/NACK state is updated. As a result, the code snippet check above (!tbf_ul_ack_waiting_cnf_final_ack()) will be true and the DL TBF be assigned, but afterwards in the same code path it figures out the final ack happens. In order to fix this, first update the ACK/NACK state and only afterwards trigger the Contention Resolution Success event. Change-Id: I62ae91b494e4fd0ade3f4a3ba3817bcaedbdebf5 --- M src/tbf_ul_ack_fsm.c M tests/tbf/TbfTest.err 2 files changed, 64 insertions(+), 18 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/tbf_ul_ack_fsm.c b/src/tbf_ul_ack_fsm.c index ad6ad02..2fa20d7 100644 --- a/src/tbf_ul_ack_fsm.c +++ b/src/tbf_ul_ack_fsm.c @@ -65,7 +65,6 @@ unsigned int rrbp = 0; uint32_t new_poll_fn = 0; struct gprs_rlcmac_tbf *tbf = ul_tbf_as_tbf(ctx->tbf); - struct GprsMs *ms = tbf_ms(tbf); if (final) { rc = tbf_check_polling(tbf, d->pdch, d->fn, &new_poll_fn, &rrbp); @@ -86,21 +85,6 @@ bitvec_pack(ack_vec, msgb_put(msg, 23)); bitvec_free(ack_vec); - /* TS 44.060 7a.2.1.1: "The contention resolution is completed on - * the network side when the network receives an RLC data block that - * comprises the TLLI value that identifies the mobile station and the - * TFI value associated with the TBF." (see TBF_EV_FIRST_UL_DATA_RECVD). - * - * However, it's handier for us to mark contention resolution success here - * since upon rx UL ACK is the time at which MS realizes contention resolution - * succeeds: - * TS 44.060 7.1.2.3: "The contention resolution is successfully completed - * on the mobile station side when the mobile station receives a - * PACKET UPLINK ACK/NACK" - */ - if (ms_tlli(ms) != GSM_RESERVED_TMSI && !ul_tbf_contention_resolution_done(ctx->tbf)) - osmo_fsm_inst_dispatch(tbf_state_fi(tbf), TBF_EV_CONTENTION_RESOLUTION_MS_SUCCESS, NULL); - if (final) { tbf_set_polling(tbf, d->pdch, new_poll_fn, PDCH_ULC_POLL_UL_ACK); LOGPTBFUL(ctx->tbf, LOGL_DEBUG, @@ -126,6 +110,7 @@ { struct tbf_ul_ack_fsm_ctx *ctx = (struct tbf_ul_ack_fsm_ctx *)fi->priv; struct gprs_rlcmac_ul_tbf *tbf = ctx->tbf; + struct GprsMs *ms = tbf_ms(ul_tbf_as_tbf(tbf)); struct tbf_ul_ack_ev_create_rlcmac_msg_ctx *data_ctx; bool final; @@ -144,6 +129,28 @@ tbf_ul_ack_fsm_state_chg(fi, TBF_UL_ACK_ST_WAIT_ACK); else tbf_ul_ack_fsm_state_chg(fi, TBF_UL_ACK_ST_NONE); + + /* TS 44.060 7a.2.1.1: "The contention resolution is completed on + * the network side when the network receives an RLC data block that + * comprises the TLLI value that identifies the mobile station and the + * TFI value associated with the TBF." (see TBF_EV_FIRST_UL_DATA_RECVD). + * + * However, it's handier for us to mark contention resolution success here + * since upon rx UL ACK is the time at which MS realizes contention resolution + * succeeds: + * TS 44.060 7.1.2.3: "The contention resolution is successfully completed + * on the mobile station side when the mobile station receives a + * PACKET UPLINK ACK/NACK" + * + * This event must be triggered here *after* potentially transitioning + * to ST_WAIT_ACK above, so that gprs_ms knows whether it can create a + * DL TBF on PACCH of the UL_TBF or not (not possible if we are in + * ST_WAIT_ACK, since UL TBF is terminating sending the final PKT CTRL + * ACK). + */ + if (ms_tlli(ms) != GSM_RESERVED_TMSI && !ul_tbf_contention_resolution_done(ctx->tbf)) + osmo_fsm_inst_dispatch(tbf_state_fi(ul_tbf_as_tbf(ctx->tbf)), TBF_EV_CONTENTION_RESOLUTION_MS_SUCCESS, NULL); + break; default: OSMO_ASSERT(0); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 95411fd..867ee9e 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -2072,11 +2072,11 @@ Got MS: TLLI = 0xf1223344, TA = 7 UL_ACK_TBF(UL:TFI-0-0-0:G){SCHED_UL_ACK}: Received Event CREATE_RLCMAC_MSG PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654167 + 17 = 2654184 -UL_TBF(UL:TFI-0-0-0:G){FINISHED}: Received Event CONTENTION_RESOLUTION_MS_SUCCESS -TBF(UL:TFI-0-0-0:G:TLLI-0xf1223344){FINISHED} stopping timer T3141 [Contention resolution success (UL-TBF, CCCH)] PDCH(bts=0,trx=0,ts=7) Reserving FN 2654184 for type POLL TBF(UL:TFI-0-0-0:G:TLLI-0xf1223344){FINISHED} Scheduled UL Acknowledgement polling on PACCH (FN=2654184, TS=7) UL_ACK_TBF(UL:TFI-0-0-0:G){SCHED_UL_ACK}: state_chg to WAIT_ACK +UL_TBF(UL:TFI-0-0-0:G){FINISHED}: Received Event CONTENTION_RESOLUTION_MS_SUCCESS +TBF(UL:TFI-0-0-0:G:TLLI-0xf1223344){FINISHED} stopping timer T3141 [Contention resolution success (UL-TBF, CCCH)] PDCH(bts=0,trx=0,ts=7) FN=2654167 Scheduling control message at RTS for TBF(UL:TFI-0-0-0:G:TLLI-0xf1223344){FINISHED} Modifying MS object, TLLI = 0xf1223344, IMSI '' -> '0011223344' Modifying MS object, TLLI: 0xf1223344 confirmed -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32339 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I62ae91b494e4fd0ade3f4a3ba3817bcaedbdebf5 Gerrit-Change-Number: 32339 Gerrit-PatchSet: 6 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-pcu[master]: Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT ...
by laforge 20 Jun '23

20 Jun '23
Attention is currently required from: pespin, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32339 ) Change subject: Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT CTRL ACK ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32339 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I62ae91b494e4fd0ade3f4a3ba3817bcaedbdebf5 Gerrit-Change-Number: 32339 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 20 Jun 2023 07:17:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-sccp[master]: Forbid partial VTY configurations of ASPs with name asp-clnt-*
by laforge 20 Jun '23

20 Jun '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33325 ) Change subject: Forbid partial VTY configurations of ASPs with name asp-clnt-* ...................................................................... Forbid partial VTY configurations of ASPs with name asp-clnt-* A recent commit (83db938859428ce3835239e2692d93c557b750e1) changed the behavior of default "sctp-role" and "role" values of ASPs named asp-clnt-* which are used by osmo_sccp_simple_client_on_ss7_id(), in order to avoid having different default values when than function is used, which is totally confusing for end users. As it was already informed when submitting the mentioned commit, it changes the behavior on that specific case, and that made some users start having problems without a proper "your config is wrong!" error. This commit addresses it by basically forbiding that exact use case, that is, partially defining an asp-clnt-* ASP through VTY without explicitly configuring a "role" and "sctp-role". With this patch, function osmo_sccp_simple_client_on_ss7_id() will print a proper error informing the user and will return NULL, potentially triggering an early program exit which can then easily be fixed by using proper configuration. Related: SYS#6486 Change-Id: I65b5fad2ec06a9d9c521f1e3ce8aab633da95a47 --- M TODO-RELEASE M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7_vty.c M src/sccp_user.c 4 files changed, 67 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index 05e12a6..ede41b5 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,3 +8,4 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line libosmocore >1.8.0 uses new osmo_prim_operation_name() +osmo_sccp_simple_client_on_ss7_id() behavior change: ASPs asp-clnt-* defined through VTY must explicitly configure "role" and "sctp-role" \ No newline at end of file diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index eff16b9..f413983 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -430,6 +430,8 @@ enum osmo_ss7_asp_admin_state adm_state; bool is_server; enum osmo_ss7_asp_role role; + bool role_set_by_vty; + bool sctp_role_set_by_vty; struct osmo_ss7_asp_peer local; struct osmo_ss7_asp_peer remote; diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 09e5f0a..ebec5f6 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -715,6 +715,8 @@ return CMD_WARNING; } else OSMO_ASSERT(0); + + asp->cfg.role_set_by_vty = true; return CMD_SUCCESS; } @@ -733,6 +735,8 @@ asp->cfg.is_server = true; else OSMO_ASSERT(0); + + asp->cfg.sctp_role_set_by_vty = true; return CMD_SUCCESS; } diff --git a/src/sccp_user.c b/src/sccp_user.c index aac6ee0..fb14e75 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -646,24 +646,42 @@ osmo_ss7_as_add_asp(as, asp->cfg.name); } - /* If ASP was configured through VTY it may be explicitly configured as - * SCTP server. It may be a bit confusing since this function is to create - * a "SCCP simple client", but this allows users of this API such as - * osmo-hnbgw to support SCTP-role server if properly configured through VTY. - */ - if (asp->cfg.is_server) { - struct osmo_xua_server *xs; - LOGP(DLSCCP, LOGL_NOTICE, - "%s: Requesting an SCCP simple client on ASP %s configured with 'sctp-role server'\n", - name, asp->cfg.name); - xs = osmo_ss7_xua_server_find(ss7, prot, asp->cfg.local.port); - if (!xs) { + /* Extra sanity checks if the ASP asp-clnt-* was pre-configured over VTY: */ + if (!asp->simple_client_allocated) { + /* Forbid ASPs defined through VTY that are not entirely + * configured. "role" and "sctp-role" must be explicitly provided: + */ + if (!asp->cfg.role_set_by_vty) { LOGP(DLSCCP, LOGL_ERROR, - "%s: Requesting an SCCP simple client on ASP %s configured with 'sctp-role server' " - "but no matching xUA server was configured!\n", + "%s: ASP %s defined in VTY but 'role' was not set there, please set it.\n", name, asp->cfg.name); goto out_asp; } + if (!asp->cfg.sctp_role_set_by_vty) { + LOGP(DLSCCP, LOGL_ERROR, + "%s: ASP %s defined in VTY but 'sctp-role' was not set there, please set it.\n", + name, asp->cfg.name); + goto out_asp; + } + + /* If ASP was configured through VTY it may be explicitly configured as + * SCTP server. It may be a bit confusing since this function is to create + * a "SCCP simple client", but this allows users of this API such as + * osmo-hnbgw to support SCTP-role server if properly configured through VTY. + */ + if (asp->cfg.is_server) { + struct osmo_xua_server *xs; + LOGP(DLSCCP, LOGL_NOTICE, + "%s: Requesting an SCCP simple client on ASP %s configured with 'sctp-role server'\n", + name, asp->cfg.name); + xs = osmo_ss7_xua_server_find(ss7, prot, asp->cfg.local.port); + if (!xs) { + LOGP(DLSCCP, LOGL_ERROR, "%s: Requesting an SCCP simple client on ASP %s configured " + "with 'sctp-role server' but no matching xUA server was configured!\n", + name, asp->cfg.name); + goto out_asp; + } + } } /* Restart ASP */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33325 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I65b5fad2ec06a9d9c521f1e3ce8aab633da95a47 Gerrit-Change-Number: 33325 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • ...
  • 248
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.