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

August 2022

  • 3 participants
  • 2402 discussions
Change in osmo-cbc[master]: cbsp/sbcap: Fail if trying to Tx on non-connected (connecting) link
by laforge 01 Aug '22

01 Aug '22
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-cbc/+/28887 ) Change subject: cbsp/sbcap: Fail if trying to Tx on non-connected (connecting) link ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28887 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-cbc Gerrit-Branch: master Gerrit-Change-Id: I1d2285d18ee064fd78191765e8cb833bf5ee08a4 Gerrit-Change-Number: 28887 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 01 Aug 2022 20:00:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-msc[master]: Add ESME-specific logging
by laforge 01 Aug '22

01 Aug '22
Attention is currently required from: pespin, msuraev. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28845 ) Change subject: Add ESME-specific logging ...................................................................... Patch Set 11: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28845 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie5ddde762350385f8d18ee1d441584a41b0290ec Gerrit-Change-Number: 28845 Gerrit-PatchSet: 11 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Mon, 01 Aug 2022 19:59:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-msc[master]: Introduce libsmpputil
by laforge 01 Aug '22

01 Aug '22
Attention is currently required from: pespin, msuraev. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28844 ) Change subject: Introduce libsmpputil ...................................................................... Patch Set 11: (1 comment) File src/utils/Makefile.am: https://gerrit.osmocom.org/c/osmo-msc/+/28844/comment/0bed29c4_2685863e PS2, Line 32: $(top_srcdir)/src/libmsc/smpp_smsc.h \ > Done the header file is still in a [lib]msc specific sub-directory? -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28844 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I61910651bc7c188dc2fb67d96189a66a47e7e8fb Gerrit-Change-Number: 28844 Gerrit-PatchSet: 11 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Mon, 01 Aug 2022 19:59:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: msuraev <msuraev(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in docker-playground[master]: ttcn3-cbc: Update osmo-cbc.cfg, CBC_Tests.cfg to latest ttcn3 testsuite
by pespin 01 Aug '22

01 Aug '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/28890 ) Change subject: ttcn3-cbc: Update osmo-cbc.cfg, CBC_Tests.cfg to latest ttcn3 testsuite ...................................................................... ttcn3-cbc: Update osmo-cbc.cfg, CBC_Tests.cfg to latest ttcn3 testsuite New changes in ttcn3 also test SBcAP and CBSP links as client mode in osmo-cbc. Related: OS#4945 Requires: osmo-ttcn3-hacks.git c832c10b28c70f244423143f133cf63aea937997 Change-Id: I14a50d3d2284ceffc0607880fecddbff2a048284 --- M ttcn3-cbc-test/CBC_Tests.cfg M ttcn3-cbc-test/osmo-cbc.cfg 2 files changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/90/28890/1 diff --git a/ttcn3-cbc-test/CBC_Tests.cfg b/ttcn3-cbc-test/CBC_Tests.cfg index 23607e2..6e7ab21 100644 --- a/ttcn3-cbc-test/CBC_Tests.cfg +++ b/ttcn3-cbc-test/CBC_Tests.cfg @@ -9,6 +9,7 @@ [TESTPORT_PARAMETERS] [MODULE_PARAMETERS] +CBC_Tests.mp_local_host := "172.18.27.100"; CBC_Tests.mp_cbc_host := "172.18.27.20"; [MAIN_CONTROLLER] diff --git a/ttcn3-cbc-test/osmo-cbc.cfg b/ttcn3-cbc-test/osmo-cbc.cfg index c97c893..fdb2011 100644 --- a/ttcn3-cbc-test/osmo-cbc.cfg +++ b/ttcn3-cbc-test/osmo-cbc.cfg @@ -32,11 +32,19 @@ sbcap local-ip 172.18.27.20 local-port 29168 - peer cbsp ttcn3-bsc + peer cbsp ttcn3-bsc-client mode server remote-port 15000 remote-ip 172.18.27.100 - peer sbcap ttcn3-mme + peer cbsp ttcn3-bsc-server + mode client + remote-port 15001 + remote-ip 172.18.27.100 + peer sbcap ttcn3-mme-client mode server remote-port 16000 remote-ip 172.18.27.100 + peer sbcap ttcn3-mme-server + mode client + remote-port 16001 + remote-ip 172.18.27.100 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28890 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I14a50d3d2284ceffc0607880fecddbff2a048284 Gerrit-Change-Number: 28890 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: cbc: Add Tguard
by pespin 01 Aug '22

01 Aug '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28888 ) Change subject: cbc: Add Tguard ...................................................................... cbc: Add Tguard Change-Id: I92b0a2ec931cefed34a33bd90cbc5c97d0aec540 --- M cbc/CBC_Tests.ttcn 1 file changed, 16 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/88/28888/1 diff --git a/cbc/CBC_Tests.ttcn b/cbc/CBC_Tests.ttcn index 8e7e1c5..64cf5e2 100644 --- a/cbc/CBC_Tests.ttcn +++ b/cbc/CBC_Tests.ttcn @@ -46,6 +46,7 @@ const integer MAX_MME := 3; type component test_CT extends CBSP_Adapter_CT, http_CT { + timer g_Tguard := 60.0; var integer g_num_bsc; var integer g_num_mme; var BSC_ConnHdlr g_vc_conn_BSC[MAX_BSC]; @@ -68,6 +69,15 @@ mtc.stop; } +/* altstep for the global guard timer */ +private altstep as_Tguard() runs on test_CT { + [] g_Tguard.timeout { + setverdict(fail, "Tguard timeout"); + all component.stop; + mtc.stop; + } +} + /* * BSC Conn Handler: */ @@ -151,7 +161,11 @@ } } -function f_start() runs on test_CT { +function f_start(float t_guard := 60.0) runs on test_CT { + /* Start guard timer and activate it as default */ + g_Tguard.start(t_guard); + activate(as_Tguard()); + for (var integer i := 0; i < g_num_bsc; i := i + 1) { f_start_bsc(i, testcasename(), g_pars_BSC[i]); } @@ -195,7 +209,7 @@ testcase TC_rx_keepalive_timeout() runs on test_CT { f_init(num_bsc := 1); g_pars_BSC[0].start_fn := refers(f_bsc_TC_rx_keepalive_timeout); - f_start(); + f_start(t_guard := 100.0); f_shutdown_helper(); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28888 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: I92b0a2ec931cefed34a33bd90cbc5c97d0aec540 Gerrit-Change-Number: 28888 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: cbc: Support mme/bsc sctp/tcp server mode
by pespin 01 Aug '22

01 Aug '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28889 ) Change subject: cbc: Support mme/bsc sctp/tcp server mode ...................................................................... cbc: Support mme/bsc sctp/tcp server mode Related: OS#4945 Change-Id: I9fa4ddfa18ac85644f219874e6b2166e1795e3a9 --- M cbc/BSC_ConnectionHandler.ttcn M cbc/CBC_Tests.ttcn M cbc/CBS_Message.ttcn M cbc/MME_ConnectionHandler.ttcn M library/CBSP_Adapter.ttcn M library/sbcap/SBC_AP_Adapter.ttcn 6 files changed, 166 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/28889/1 diff --git a/cbc/BSC_ConnectionHandler.ttcn b/cbc/BSC_ConnectionHandler.ttcn index ec86f01..a8601a6 100644 --- a/cbc/BSC_ConnectionHandler.ttcn +++ b/cbc/BSC_ConnectionHandler.ttcn @@ -25,15 +25,23 @@ type function void_fn() runs on BSC_ConnHdlr; +/* Coordinate with test_CT: */ +type port BSC_ConnHdlr_Coord_PT message { + inout charstring; +} with { extension "internal" }; + /* this component represents a single subscriber connection */ type component BSC_ConnHdlr extends CBSP_Adapter_CT { var BSC_ConnHdlrPars g_pars; + port BSC_ConnHdlr_Coord_PT COORD; } type record BSC_ConnHdlrPars { + charstring bsc_host, integer bsc_cbsp_port, charstring cbc_host, integer cbc_cbsp_port, + boolean tcp_is_client, void_fn start_fn, CBS_Message exp_cbs_msg optional, BSSMAP_FIELD_CellIdentificationList cell_list_success optional @@ -41,7 +49,13 @@ function f_BSC_ConnHdlr_main(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { g_pars := pars; - CBSP_Adapter.f_connect(g_pars.cbc_host, g_pars.cbc_cbsp_port, "", g_pars.bsc_cbsp_port); + if (g_pars.tcp_is_client) { + CBSP_Adapter.f_connect(g_pars.cbc_host, g_pars.cbc_cbsp_port, + g_pars.bsc_host, g_pars.bsc_cbsp_port); + } else { + CBSP_Adapter.f_bind(g_pars.bsc_host, g_pars.bsc_cbsp_port); + CBSP_Adapter.f_wait_client_connect(); + } var BSSMAP_FIELD_CellIdentificationList cell_list := { cIl_allInBSS := ''O @@ -51,6 +65,7 @@ f_cbsp_send(ts_CBSP_RESTART(cell_list, CBSP_BC_MSGT_CBS, CBSP_RI_DATA_LOST)); f_cbsp_send(ts_CBSP_RESTART(cell_list, CBSP_BC_MSGT_EMERG, CBSP_RI_DATA_LOST)); as_cbsp_reset(0); + COORD.send(COORD_MSG_CONNECTED); g_pars.start_fn.apply(); } diff --git a/cbc/CBC_Tests.ttcn b/cbc/CBC_Tests.ttcn index 64cf5e2..406baed 100644 --- a/cbc/CBC_Tests.ttcn +++ b/cbc/CBC_Tests.ttcn @@ -33,18 +33,38 @@ import from BSC_ConnectionHandler all; import from MME_ConnectionHandler all; +const integer MAX_BSC := 2; +const integer MAX_MME := 2; + +type record BSC_modulepar_cfg { + boolean tcp_is_client +}; +type record of BSC_modulepar_cfg BSC_modulepar_cfgs; + +type record MME_modulepar_cfg { + boolean sctp_is_client +}; +type record of MME_modulepar_cfg MME_modulepar_cfgs; + modulepar { + charstring mp_local_host := "127.0.0.2"; charstring mp_cbc_host := "127.0.0.1"; integer mp_cbc_cbsp_port := 48049; integer mp_cbc_sbcap_port := c_SBC_AP_PORT; integer mp_cbc_ecbe_port := 12345; integer mp_local_cbsp_port := 15000; integer mp_local_sbcap_port := 16000; + /* Must match osmo-cbc.cfg: */ + BSC_modulepar_cfgs mp_bsc_cfg := { + { tcp_is_client := true }, + { tcp_is_client := false } + }; + MME_modulepar_cfgs mp_mme_cfg := { + { sctp_is_client := true }, + { sctp_is_client := false } + }; }; -const integer MAX_BSC := 3; -const integer MAX_MME := 3; - type component test_CT extends CBSP_Adapter_CT, http_CT { timer g_Tguard := 60.0; var integer g_num_bsc; @@ -53,6 +73,8 @@ var MME_ConnHdlr g_vc_conn_MME[MAX_MME]; var BSC_ConnHdlrPars g_pars_BSC[MAX_BSC]; var MME_ConnHdlrPars g_pars_MME[MAX_MME]; + port BSC_ConnHdlr_Coord_PT COORD_BSC[MAX_BSC]; + port MME_ConnHdlr_Coord_PT COORD_MME[MAX_BSC]; }; private function f_shutdown_helper() runs on test_CT { @@ -84,12 +106,16 @@ private function f_BSC_ConnHdlr_start_fn_void() runs on BSC_ConnHdlr { log("Default start_fn() function called!"); } -private function f_init_pars_bsc(integer bsc_cbsp_port, charstring cbc_host, integer cbc_cbsp_port) +private function f_init_pars_bsc(charstring bsc_host, integer bsc_cbsp_port, + charstring cbc_host, integer cbc_cbsp_port, + boolean tcp_is_client) runs on test_CT return BSC_ConnHdlrPars { var BSC_ConnHdlrPars pars := { + bsc_host := bsc_host, bsc_cbsp_port := bsc_cbsp_port, cbc_host := cbc_host, cbc_cbsp_port := cbc_cbsp_port, + tcp_is_client := tcp_is_client, start_fn := refers(f_BSC_ConnHdlr_start_fn_void), exp_cbs_msg := omit, cell_list_success := omit @@ -101,7 +127,10 @@ var BSC_ConnHdlr vc_conn; id := id & "-BSC" & int2str(idx); vc_conn := BSC_ConnHdlr.create(id) alive; - g_pars_BSC[idx] := f_init_pars_bsc(mp_local_cbsp_port + idx, mp_cbc_host, mp_cbc_cbsp_port); + g_pars_BSC[idx] := f_init_pars_bsc(mp_local_host, mp_local_cbsp_port + idx, + mp_cbc_host, mp_cbc_cbsp_port, + mp_bsc_cfg[idx].tcp_is_client); + connect(self:COORD_BSC[idx], vc_conn:COORD); return vc_conn; } @@ -118,12 +147,16 @@ private function f_MME_ConnHdlr_start_fn_void() runs on MME_ConnHdlr { log("Default start_fn() function called!"); } -private function f_init_pars_mme(integer mme_sbcap_port, charstring cbc_host, integer cbc_sbcap_port) +private function f_init_pars_mme(charstring mme_host, integer mme_sbcap_port, + charstring cbc_host, integer cbc_sbcap_port, + boolean sctp_is_client) runs on test_CT return MME_ConnHdlrPars { var MME_ConnHdlrPars pars := { + mme_host := mme_host, mme_sbcap_port := mme_sbcap_port, cbc_host := cbc_host, cbc_sbcap_port := cbc_sbcap_port, + sctp_is_client := sctp_is_client, start_fn := refers(f_MME_ConnHdlr_start_fn_void), exp_cbs_msg := omit, write_replace_warning_ind_cause := omit, @@ -136,7 +169,10 @@ var MME_ConnHdlr vc_conn; id := id & "-MME" & int2str(idx); vc_conn := MME_ConnHdlr.create(id) alive; - g_pars_MME[idx] := f_init_pars_mme(mp_local_sbcap_port + idx, mp_cbc_host, mp_cbc_sbcap_port); + g_pars_MME[idx] := f_init_pars_mme(mp_local_host, mp_local_sbcap_port + idx, + mp_cbc_host, mp_cbc_sbcap_port, + mp_mme_cfg[idx].sctp_is_client); + connect(self:COORD_MME[idx], vc_conn:COORD); return vc_conn; } @@ -172,7 +208,14 @@ for (var integer i := 0; i < g_num_mme; i := i + 1) { f_start_mme(i, testcasename(), g_pars_MME[i]); } - f_sleep(2.0); /* wait all conns connected */ + + /* Now wait for conns to be ready: */ + for (var integer i := 0; i < g_num_bsc; i := i + 1) { + COORD_BSC[i].receive(COORD_MSG_CONNECTED); + } + for (var integer i := 0; i < g_num_mme; i := i + 1) { + COORD_MME[i].receive(COORD_MSG_CONNECTED); + } } /* test whether or not we receive a valid KEEP-ALIVE from the CBC */ @@ -483,6 +526,56 @@ f_shutdown_helper(); } +/* Create and delete message with BSC acting as TCP server */ +testcase TC_ecbe_create_delete_bsc_server() runs on test_CT { + var template (value) BSSMAP_FIELD_CellIdentificationList cell_list_success; + var template (value) CBS_Message msg := t_CBSmsg(46, 16752); + + /* The 2nd BSC is the one configured as server, but we only want to test + * that one, so initialize both but copy over config of the 2nd one to + * the first one, to start only one BSC: */ + f_init(num_bsc := 2); + g_num_bsc := 1; + g_pars_BSC[0] := g_pars_BSC[1]; + + cell_list_success := ts_BSSMAP_CIL_CI({ + ts_BSSMAP_CI_CI(50001), + ts_BSSMAP_CI_CI(50002), + ts_BSSMAP_CI_CI(50003) + }); + g_pars_BSC[0].start_fn := refers(f_bsc_create_and_delete); + g_pars_BSC[0].exp_cbs_msg := valueof(msg); + g_pars_BSC[0].cell_list_success := valueof(cell_list_success); + f_start(); + f_create_and_delete(valueof(msg)); + f_shutdown_helper(); +} + +/* Create and delete message with MME acting as SCTP server */ +testcase TC_ecbe_create_delete_mme_server() runs on test_CT { + var template (value) CellId_Broadcast_List bcast_cell_id_li; + var template (value) CBS_Message msg := t_CBSmsg(48, 16752); + + /* The 2nd MME is the one configured as server, but we only want to test + * that one, so initialize both but copy over config of the 2nd one to + * the first one, to start only one MME: */ + f_init(num_bsc := 0, num_mme := 2); + g_num_mme := 1; + g_pars_MME[0] := g_pars_MME[1]; + + bcast_cell_id_li := { + ts_SBCAP_CellId_Broadcast_List_Item(ts_SBCAP_ECGI(f_enc_mcc_mnc('901'H, '70'H), 1234)), + ts_SBCAP_CellId_Broadcast_List_Item(ts_SBCAP_ECGI(f_enc_mcc_mnc('901'H, '70'H), 5678)) + }; + g_pars_MME[0].start_fn := refers(f_mme_create_and_delete); + g_pars_MME[0].exp_cbs_msg := valueof(msg); + g_pars_MME[0].write_replace_warning_ind_cause := SBC_AP_Cause_message_accepted; + g_pars_MME[0].bcast_cell_id_list := valueof(bcast_cell_id_li); + f_start(); + f_create_and_delete(valueof(msg)); + f_shutdown_helper(); +} + control { execute( TC_rx_keepalive() ); execute( TC_rx_keepalive_timeout() ); @@ -493,6 +586,8 @@ execute( TC_ecbe_create_delete_lai() ); execute( TC_ecbe_create_delete_mme_indication() ); execute( TC_ecbe_create_delete_bsc_and_mme() ); + execute( TC_ecbe_create_delete_bsc_server() ); + execute( TC_ecbe_create_delete_mme_server() ); } } diff --git a/cbc/CBS_Message.ttcn b/cbc/CBS_Message.ttcn index 6f77a1b..1ce6935 100644 --- a/cbc/CBS_Message.ttcn +++ b/cbc/CBS_Message.ttcn @@ -17,6 +17,10 @@ import from CBSP_Types all; +/* Messages used for coordination between handlers and test_CT: */ +const charstring COORD_MSG_CONNECTED := "COORD_MSG_CONNECTED"; + + type record CBS_Message { uint16_t msg_id, uint16_t ser_nr, diff --git a/cbc/MME_ConnectionHandler.ttcn b/cbc/MME_ConnectionHandler.ttcn index fec358c..ed0502e 100644 --- a/cbc/MME_ConnectionHandler.ttcn +++ b/cbc/MME_ConnectionHandler.ttcn @@ -25,15 +25,23 @@ type function void_fn() runs on MME_ConnHdlr; +/* Coordinate with test_CT: */ +type port MME_ConnHdlr_Coord_PT message { + inout charstring; +} with { extension "internal" }; + /* this component represents a single subscriber connection */ type component MME_ConnHdlr extends SBC_AP_Adapter_CT { var MME_ConnHdlrPars g_pars; + port MME_ConnHdlr_Coord_PT COORD; } type record MME_ConnHdlrPars { + charstring mme_host, integer mme_sbcap_port, charstring cbc_host, integer cbc_sbcap_port, + boolean sctp_is_client, void_fn start_fn, CBS_Message exp_cbs_msg optional, SBC_AP_Cause write_replace_warning_ind_cause optional, @@ -42,7 +50,14 @@ function f_MME_ConnHdlr_main(charstring id, MME_ConnHdlrPars pars) runs on MME_ConnHdlr { g_pars := pars; - SBC_AP_Adapter.f_connect(g_pars.cbc_host, g_pars.cbc_sbcap_port, "", g_pars.mme_sbcap_port); + if (g_pars.sctp_is_client) { + SBC_AP_Adapter.f_connect(g_pars.cbc_host, g_pars.cbc_sbcap_port, + g_pars.mme_host, g_pars.mme_sbcap_port); + } else { + SBC_AP_Adapter.f_bind(g_pars.mme_host, g_pars.mme_sbcap_port); + SBC_AP_Adapter.f_wait_client_connect(); + } + COORD.send(COORD_MSG_CONNECTED); g_pars.start_fn.apply(); } diff --git a/library/CBSP_Adapter.ttcn b/library/CBSP_Adapter.ttcn index de89d58..278a2f2 100644 --- a/library/CBSP_Adapter.ttcn +++ b/library/CBSP_Adapter.ttcn @@ -77,6 +77,16 @@ f_set_tcp_segmentation(idx); } +function f_wait_client_connect(integer idx := 0) runs on CBSP_Adapter_CT { + var IPL4asp_Types.PortEvent rx_event; + CBSP[idx].receive(IPL4asp_Types.PortEvent:{connOpened:=?}) -> value rx_event { + log("Connection from ", rx_event.connOpened.remName, ":", rx_event.connOpened.remPort); + /* we want to store the client's connId, not the 'bind socket' one */ + g_cbsp_conn_id[idx] := rx_event.connOpened.connId; + } + f_set_tcp_segmentation(idx); +} + function f_cbsp_send(template (value) CBSP_PDU pdu, integer idx := 0) runs on CBSP_Adapter_CT { CBSP[idx].send(ts_CBSP_Send(g_cbsp_conn_id[idx], pdu)); } diff --git a/library/sbcap/SBC_AP_Adapter.ttcn b/library/sbcap/SBC_AP_Adapter.ttcn index 3217c5e..515a723 100644 --- a/library/sbcap/SBC_AP_Adapter.ttcn +++ b/library/sbcap/SBC_AP_Adapter.ttcn @@ -77,6 +77,23 @@ g_SBC_AP_conn_id[idx] := res.connId; } +function f_wait_client_connect(integer idx := 0) runs on SBC_AP_Adapter_CT { + var IPL4asp_Types.PortEvent rx_event; + SBC_AP[idx].receive(IPL4asp_Types.PortEvent:{connOpened:=?}) -> value rx_event { + log("Connection from ", rx_event.connOpened.remName, ":", rx_event.connOpened.remPort); + /* we want to store the client's connId, not the 'bind socket' one */ + g_SBC_AP_conn_id[idx] := rx_event.connOpened.connId; + } + timer Tcommup := 10.0; + Tcommup.start; + alt { + [] SBC_AP[idx].receive(tr_SctpAssocChange_COMM_UP(g_SBC_AP_conn_id[idx])) {} + [] Tcommup.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting SCTP_COMM_UP"); + } + } +} + function f_SBC_AP_send(template (value) SBC_AP_PDU pdu, integer idx := 0) runs on SBC_AP_Adapter_CT { SBC_AP[idx].send(ts_SBC_AP_Send(g_SBC_AP_conn_id[idx], pdu)); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28889 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: I9fa4ddfa18ac85644f219874e6b2166e1795e3a9 Gerrit-Change-Number: 28889 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-cbc[master]: cbsp/sbcap: Set link fsm id with peer's name
by pespin 01 Aug '22

01 Aug '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-cbc/+/28886 ) Change subject: cbsp/sbcap: Set link fsm id with peer's name ...................................................................... cbsp/sbcap: Set link fsm id with peer's name Otherwise the id is left unset. Change-Id: I8a6850293cbe01c66e4fb545d646d63743ddaecb --- M src/cbsp_link.c M src/sbcap_link.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/86/28886/1 diff --git a/src/cbsp_link.c b/src/cbsp_link.c index 564e134..b432aad 100644 --- a/src/cbsp_link.c +++ b/src/cbsp_link.c @@ -48,7 +48,7 @@ link->peer = peer; link->is_client = (peer->link_mode == CBC_PEER_LINK_MODE_CLIENT); - link->fi = osmo_fsm_inst_alloc(&cbsp_link_fsm, link, link, LOGL_DEBUG, NULL); + link->fi = osmo_fsm_inst_alloc(&cbsp_link_fsm, link, link, LOGL_DEBUG, peer->name); if (!link->fi) { LOGPCC(link, LOGL_ERROR, "Unable to allocate FSM\n"); talloc_free(link); diff --git a/src/sbcap_link.c b/src/sbcap_link.c index 9af842f..9cf794b 100644 --- a/src/sbcap_link.c +++ b/src/sbcap_link.c @@ -53,7 +53,7 @@ link->peer = peer; link->is_client = (peer->link_mode == CBC_PEER_LINK_MODE_CLIENT); - link->fi = osmo_fsm_inst_alloc(&sbcap_link_fsm, link, link, LOGL_DEBUG, NULL); + link->fi = osmo_fsm_inst_alloc(&sbcap_link_fsm, link, link, LOGL_DEBUG, peer->name); if (!link->fi) { LOGPSBCAPC(link, LOGL_ERROR, "Unable to allocate FSM\n"); talloc_free(link); -- To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28886 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-cbc Gerrit-Branch: master Gerrit-Change-Id: I8a6850293cbe01c66e4fb545d646d63743ddaecb Gerrit-Change-Number: 28886 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-cbc[master]: cbsp/sbcap: Fail if trying to Tx on non-connected (connecting) link
by pespin 01 Aug '22

01 Aug '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-cbc/+/28887 ) Change subject: cbsp/sbcap: Fail if trying to Tx on non-connected (connecting) link ...................................................................... cbsp/sbcap: Fail if trying to Tx on non-connected (connecting) link This way upper layers know right away that the message could not be transmitted to that peer. Change-Id: I1d2285d18ee064fd78191765e8cb833bf5ee08a4 --- M src/cbsp_link.c M src/sbcap_link.c 2 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/87/28887/1 diff --git a/src/cbsp_link.c b/src/cbsp_link.c index b432aad..045cfa4 100644 --- a/src/cbsp_link.c +++ b/src/cbsp_link.c @@ -327,6 +327,11 @@ get_value_string(cbsp_msg_type_names, cbsp->msg_type)); talloc_free(cbsp); return -ENOLINK; + } else if (link->is_client && !osmo_stream_cli_is_connected(link->cli_conn)) { + LOGPCC(link, LOGL_NOTICE, "Cannot transmit %s: reconnecting\n", + get_value_string(cbsp_msg_type_names, cbsp->msg_type)); + talloc_free(cbsp); + return -ENOTCONN; } LOGPCC(link, LOGL_INFO, "Transmitting %s\n", diff --git a/src/sbcap_link.c b/src/sbcap_link.c index 9cf794b..be64ce7 100644 --- a/src/sbcap_link.c +++ b/src/sbcap_link.c @@ -394,6 +394,11 @@ sbcap_pdu_get_name(pdu)); rc = -ENOLINK; goto ret_free; + } else if (link->is_client && !osmo_stream_cli_is_connected(link->cli_conn)) { + LOGPSBCAPC(link, LOGL_NOTICE, "Cannot transmit msg %s: reconnecting\n", + sbcap_pdu_get_name(pdu)); + rc = -ENOTCONN; + goto ret_free; } LOGPSBCAPC(link, LOGL_INFO, "Tx msg %s\n", -- To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28887 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-cbc Gerrit-Branch: master Gerrit-Change-Id: I1d2285d18ee064fd78191765e8cb833bf5ee08a4 Gerrit-Change-Number: 28887 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-cbc[master]: cbsp: Fix heap-use-after-free closing cli conn in connecting state
by pespin 01 Aug '22

01 Aug '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-cbc/+/28885 ) Change subject: cbsp: Fix heap-use-after-free closing cli conn in connecting state ...................................................................... cbsp: Fix heap-use-after-free closing cli conn in connecting state if conn is not in STREAM_CLI_STATE_CONNECTED state, it won't call disconnect_cb during osmo_stream_cli_destroy(), hence the osmo-cbc pointers holding are not nullified correctly. """ 20220801174147247 DCBSP NOTICE ttcn3-bsc-server: Disconnected. (cbsp_link.c:101) 20220801174147247 DCBSP NOTICE ttcn3-bsc-server: Reconnecting... (cbsp_link.c:102) 20220801174147247 DLINP INFO [WAIT_RECONNECT] osmo_stream_cli_reconnect(): retrying in 5 seconds... (stream.c:287) 20220801174152235 DCBSP DEBUG CBSP-Link[0x612000002c20]{RESET_PENDING}: Timeout of T3 (fsm.c:317) 20220801174152236 DCBSP DEBUG CBSP-Link[0x612000002c20]{RESET_PENDING}: timer_cb requested termination (fsm.c:327) 20220801174152236 DCBSP DEBUG CBSP-Link[0x612000002c20]{RESET_PENDING}: Terminating (cause = OSMO_FSM_TERM_TIMEOUT) (fsm.c:332) ================================================================= ==17==ERROR: AddressSanitizer: heap-use-after-free on address 0x6180000024f0 at pc 0x7fbd28a05d01 bp 0x7ffe247352b0 sp 0x7ffe247352a8 READ of size 4 at 0x6180000024f0 thread T0 #0 0x7fbd28a05d00 in osmo_stream_cli_close /tmp/libosmo-netif/src/stream.c:307 #1 0x7fbd28a0a5b3 in osmo_stream_cli_destroy /tmp/libosmo-netif/src/stream.c:714 #2 0x55c3534a0322 in cbc_cbsp_link_close /tmp/osmo-cbc/src/cbsp_link.c:356 #3 0x55c3534a16e1 in cbsp_link_fsm_cleanup /tmp/osmo-cbc/src/cbsp_link_fsm.c:199 #4 0x7fbd28bf5085 in _osmo_fsm_inst_term /tmp/libosmocore/src/fsm.c:947 #5 0x7fbd28be6881 in fsm_tmr_cb /tmp/libosmocore/src/fsm.c:332 #6 0x7fbd28bc70ab in osmo_timers_update /tmp/libosmocore/src/timer.c:269 #7 0x7fbd28bcba5b in _osmo_select_main /tmp/libosmocore/src/select.c:394 #8 0x7fbd28bcbb31 in osmo_select_main /tmp/libosmocore/src/select.c:438 #9 0x55c35348bce8 in main /tmp/osmo-cbc/src/cbc_main.c:314 #10 0x7fbd27a4cd09 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26d09) #11 0x55c353488ce9 in _start (/usr/local/bin/osmo-cbc+0x68ce9) """ Change-Id: Ic13578e958345207892465644b5e1f28537c032d --- M src/cbsp_link.c M src/sbcap_link.c 2 files changed, 19 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/85/28885/1 diff --git a/src/cbsp_link.c b/src/cbsp_link.c index 5587f58..564e134 100644 --- a/src/cbsp_link.c +++ b/src/cbsp_link.c @@ -352,10 +352,17 @@ if (!link->conn) return; - if (link->is_client) + if (link->is_client) { osmo_stream_cli_destroy(link->cli_conn); - else + if (link->peer) + link->peer->link.cbsp = NULL; + link->cli_conn = NULL; + if (link->fi) + osmo_fsm_inst_dispatch(link->fi, CBSP_LINK_E_CMD_CLOSE, NULL); + } else { osmo_stream_srv_destroy(link->srv_conn); + /* Same as waht's done for cli is done for srv in closed_cb() */ + } } /* diff --git a/src/sbcap_link.c b/src/sbcap_link.c index 07ada0c..9af842f 100644 --- a/src/sbcap_link.c +++ b/src/sbcap_link.c @@ -420,10 +420,18 @@ if (!link->conn) return; - if (link->is_client) + if (link->is_client) { osmo_stream_cli_destroy(link->cli_conn); - else + osmo_stream_cli_destroy(link->cli_conn); + if (link->peer) + link->peer->link.sbcap = NULL; + link->cli_conn = NULL; + if (link->fi) + osmo_fsm_inst_dispatch(link->fi, SBcAP_LINK_E_CMD_CLOSE, NULL); + } else { osmo_stream_srv_destroy(link->srv_conn); + /* Same as waht's done for cli is done for srv in closed_cb() */ + } } /* -- To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-cbc Gerrit-Branch: master Gerrit-Change-Id: Ic13578e958345207892465644b5e1f28537c032d Gerrit-Change-Number: 28885 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-msc[master]: Add ESME-specific logging
by msuraev 01 Aug '22

01 Aug '22
Attention is currently required from: pespin. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28845 ) Change subject: Add ESME-specific logging ...................................................................... Patch Set 11: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28845 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie5ddde762350385f8d18ee1d441584a41b0290ec Gerrit-Change-Number: 28845 Gerrit-PatchSet: 11 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 01 Aug 2022 18:14:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • ...
  • 241
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.