osmo-ci[master]: jobs: add Coverity Upload Job
Patch Set 1: Looks good. The DSL is quite nice! -- To view, visit https://gerrit.osmocom.org/6291 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I852b42a698a4568b51e993bb5e86efeed6afdb32 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: BSSMAP_Emulation: Parameter to skip seq no patching
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6302 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0a6914067ec8daa8903f0ef0c877f178cfd61659 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: danielGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: MSC_Tests: Add CC sequence no. test with DTMF
Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/6301/1/msc/MSC_Tests.ttcn File msc/MSC_Tests.ttcn: Line 1596: testcase TC_mo_dtmf_duplicate() runs on MTC_CT { this empty test case is probably an accident? Line 1617: execute( TC_lu_imsi_noauth_notmsi() ); list new test case in control statement -- To view, visit https://gerrit.osmocom.org/6301 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9674343acc18187b9e016bd8e0be470d5424046f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: danielGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes
[MERGED] osmo-ttcn3-hacks[master]: start-testsuite.sh: Pass a third parameter to ttcn3_start
Harald Welte has submitted this change and it was merged. Change subject: start-testsuite.sh: Pass a third parameter to ttcn3_start .. start-testsuite.sh: Pass a third parameter to ttcn3_start The name of the parameters is a little misleading, since the second parameter could just be a testname. Change-Id: Ibe207a83c477c918a865a8a34cad7ca5d45c7eac --- M start-testsuite.sh 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/start-testsuite.sh b/start-testsuite.sh index a291a4f..83c381e 100755 --- a/start-testsuite.sh +++ b/start-testsuite.sh @@ -15,4 +15,8 @@ CFG=$2 fi -LD_LIBRARY_PATH=`dirname $SUITE`:/usr/lib/titan:/usr/ttcn3/lib ttcn3_start $SUITE $CFG +if [ $# -gt 2 ]; then + TEST=$3 +fi + +LD_LIBRARY_PATH=`dirname $SUITE`:/usr/lib/titan:/usr/ttcn3/lib ttcn3_start $SUITE $CFG $TEST -- To view, visit https://gerrit.osmocom.org/6293 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe207a83c477c918a865a8a34cad7ca5d45c7eac Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: danielGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-ttcn3-hacks[master]: MSC_Tests: Make imsi suffix for f_start_handler unique per test
Harald Welte has submitted this change and it was merged. Change subject: MSC_Tests: Make imsi suffix for f_start_handler unique per test .. MSC_Tests: Make imsi suffix for f_start_handler unique per test Change-Id: I02d1f2ac717fee278e3903d325942697637a5d28 --- M msc/MSC_Tests.ttcn 1 file changed, 14 insertions(+), 14 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 0e59dcf..322be5f 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1074,7 +1074,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_cl3_no_payload), testcasename(), 24); + vc_conn := f_start_handler(refers(f_tc_cl3_no_payload), testcasename(), 25); vc_conn.done; } @@ -,7 +,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_cl3_rnd_payload), testcasename(), 24); + vc_conn := f_start_handler(refers(f_tc_cl3_rnd_payload), testcasename(), 26); vc_conn.done; } @@ -1128,7 +1128,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_establish_and_nothing), testcasename(), 25); + vc_conn := f_start_handler(refers(f_tc_establish_and_nothing), testcasename(), 27); vc_conn.done; } @@ -1152,7 +1152,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_mo_setup_and_nothing), testcasename(), 26); + vc_conn := f_start_handler(refers(f_tc_mo_setup_and_nothing), testcasename(), 28); vc_conn.done; } @@ -1186,7 +1186,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_mo_crcx_ran_timeout), testcasename(), 27); + vc_conn := f_start_handler(refers(f_tc_mo_crcx_ran_timeout), testcasename(), 29); vc_conn.done; } @@ -1248,7 +1248,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_mo_crcx_ran_reject), testcasename(), 28); + vc_conn := f_start_handler(refers(f_tc_mo_crcx_ran_reject), testcasename(), 30); vc_conn.done; } @@ -1336,7 +1336,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_mt_crcx_ran_reject), testcasename(), 29); + vc_conn := f_start_handler(refers(f_tc_mt_crcx_ran_reject), testcasename(), 31); vc_conn.done; } @@ -1390,7 +1390,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_mt_t310), testcasename(), 30); + vc_conn := f_start_handler(refers(f_tc_mt_t310), testcasename(), 32); vc_conn.done; } @@ -1435,7 +1435,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_gsup_cancel), testcasename(), 31); + vc_conn := f_start_handler(refers(f_tc_gsup_cancel), testcasename(), 33); vc_conn.done; } @@ -1453,7 +1453,7 @@ f_vty_config(MSCVTY, "network", "authentication required"); f_vty_config(MSCVTY, "network", "encryption a5 1"); - vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_1_13), testcasename(), 32); + vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_1_13), testcasename(), 34); vc_conn.done; } @@ -1471,7 +1471,7 @@ f_vty_config(MSCVTY, "network", "authentication required"); f_vty_config(MSCVTY, "network", "encryption a5 3"); - vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_13), testcasename(), 33); + vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_13), testcasename(), 35); vc_conn.done; } @@ -1508,7 +1508,7 @@ f_vty_config(MSCVTY, "network", "authentication required"); f_vty_config(MSCVTY, "network", "encryption a5 3"); - vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), testcasename(), 34); + vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), testcasename(), 36); vc_conn.done; } @@ -1548,7 +1548,7 @@ f_vty_config(MSCVTY, "network", "authentication required"); f_vty_config(MSCVTY, "network", "encryption a5 1 3"); - vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_13_2), testcasename(), 35); + vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_13_2), testcasename(), 37); vc_conn.done; } @@ -1570,7 +1570,7 @@ f_vty_config(MSCVTY, "network", "authentication required"); f_vty_config(MSCVTY, "network", "encryption a5 0 1 3"); - vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_013_2), testcasename(), 36); + vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_013_2), testcasename(), 38);
[MERGED] osmo-ttcn3-hacks[master]: deps: Ensure that branches are updated on make update as well
Harald Welte has submitted this change and it was merged. Change subject: deps: Ensure that branches are updated on make update as well .. deps: Ensure that branches are updated on make update as well Don't just force-checkout the local master branch again, but reset to origin/master Change-Id: I7d5e0e3d7f92fc51fa438b92f00c79f63945e74f --- M deps/Makefile 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/deps/Makefile b/deps/Makefile index e1cbfe3..6f975f2 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -55,7 +55,7 @@ .PHONY:$(1)/update $(1)/update: $(1) - (cd $(1) && git fetch && git checkout -f -B master) + (cd $(1) && git fetch && git checkout -f -B master origin/master) .PHONY: $(1)/clean $(1)/clean: -- To view, visit https://gerrit.osmocom.org/6292 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d5e0e3d7f92fc51fa438b92f00c79f63945e74f Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: danielGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-ttcn3-hacks[master]: L3_Templates: Use tid parameter in ts_ML3_MO_CC template
Harald Welte has submitted this change and it was merged. Change subject: L3_Templates: Use tid parameter in ts_ML3_MO_CC template .. L3_Templates: Use tid parameter in ts_ML3_MO_CC template Change-Id: I6c28b206625cb081a98a722b8c793ce02af74441 --- M library/L3_Templates.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index 47e1f62..a7e14e2 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -552,7 +552,7 @@ discriminator := '0011'B, tiOrSkip := { transactionId := { - tio := '000'B, + tio := int2bit(tid, 3), tiFlag := '0'B, tIExtension := omit } -- To view, visit https://gerrit.osmocom.org/6300 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c28b206625cb081a98a722b8c793ce02af74441 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: danielGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-ttcn3-hacks[master]: L3_Templates: Use tid parameter in ts_ML3_MO_CC template
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6300 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c28b206625cb081a98a722b8c793ce02af74441 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: danielGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: MNCC_Emulation: Initialize connection table
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6298 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I903f6bf14a15abc6cae1d527195414c5f081c2df Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: danielGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: MSC_Tests: Make imsi suffix for f_start_handler unique per test
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6299 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I02d1f2ac717fee278e3903d325942697637a5d28 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: danielGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: start-testsuite.sh: Pass a third parameter to ttcn3_start
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6293 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibe207a83c477c918a865a8a34cad7ca5d45c7eac Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: danielGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: deps: Ensure that branches are updated on make update as well
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6292 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d5e0e3d7f92fc51fa438b92f00c79f63945e74f Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: danielGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-msc[master]: Fix whitespace issues
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6308 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5962431ad16c97e412939dc1b8949f6361a5c26e Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-msc[master]: Fix whitespace issues
Harald Welte has submitted this change and it was merged. Change subject: Fix whitespace issues .. Fix whitespace issues We don't usually put space before in-place increment or decrement. Let's make code look similar to other Osmocom projects. Change-Id: I5962431ad16c97e412939dc1b8949f6361a5c26e --- M src/libcommon/oap_client.c M src/libmsc/sms_queue.c M src/libvlr/vlr.c M tests/msc_vlr/msc_vlr_tests.c M tests/sms_queue/sms_queue_test.c 5 files changed, 6 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libcommon/oap_client.c b/src/libcommon/oap_client.c index 39055ab..7154baa 100644 --- a/src/libcommon/oap_client.c +++ b/src/libcommon/oap_client.c @@ -257,7 +257,7 @@ "OAP registration failed\n"); state->state = OAP_INITIALIZED; if (state->registration_failures < 3) { - state->registration_failures ++; + state->registration_failures++; return oap_client_register(state, msg_tx); } return -11; diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c index 39a81f6..7d59787 100644 --- a/src/libmsc/sms_queue.c +++ b/src/libmsc/sms_queue.c @@ -216,7 +216,7 @@ sms = db_sms_get_next_unsent_rr_msisdn(net, last_msisdn, 9); if (!sms) { last_msisdn[0] = '\0'; - wrapped ++; + wrapped++; continue; } diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 2b9e3b2..96627ed 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -595,7 +595,7 @@ } vsub->auth_tuples[i].vec = gsup->auth_vectors[i]; vsub->auth_tuples[i].key_seq = key_seq; - got_tuples ++; + got_tuples++; } LOGVSUBP(LOGL_DEBUG, vsub, "Received %u auth tuples\n", got_tuples); diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 4544429..713bb16 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -826,8 +826,8 @@ void run_tests(int nr) { int test_nr; - nr --; /* arg's first test is 1, in here it's 0 */ - for (test_nr = 0; msc_vlr_tests[test_nr]; test_nr ++) { + nr--; /* arg's first test is 1, in here it's 0 */ + for (test_nr = 0; msc_vlr_tests[test_nr]; test_nr++) { if (nr >= 0 && test_nr != nr) continue; diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c index 0ff636e..641cc5f 100644 --- a/tests/sms_queue/sms_queue_test.c +++ b/tests/sms_queue/sms_queue_test.c @@ -107,7 +107,7 @@ fake_sms.receiver = fake_sms_db[i].vsub_attached? _vsub : NULL; osmo_strlcpy(fake_sms.text, fake_sms_db[i].msisdn, sizeof(fake_sms.text)); if (fake_sms_db[i].vsub_attached) - fake_sms_db[i].nr_of_sms --; + fake_sms_db[i].nr_of_sms--; return _sms; } return NULL; -- To view, visit https://gerrit.osmocom.org/6308 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5962431ad16c97e412939dc1b8949f6361a5c26e Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-bsc[master]: abis_rsl: do not allow SACCH in MF mode on SAPI=0
Harald Welte has submitted this change and it was merged. Change subject: abis_rsl: do not allow SACCH in MF mode on SAPI=0 .. abis_rsl: do not allow SACCH in MF mode on SAPI=0 osmo-msc does currently not check if an MS attemts to establish an SACCH link on SAPI=0. This combination is not permitted and should be dropped. - Make sure that establish indication for SAPI=0 and channel-type=SACCH is not permitted See also TTCN3 Testcase: BSC_Tests.TC_rll_est_ind_inval_sacch Change-Id: I12962072c0ea689d2b9b5c2899ffb59be9310dcb Closes: OS#2750 --- M src/libbsc/abis_rsl.c 1 file changed, 15 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index 1893166..261e6fe 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -2194,6 +2194,21 @@ break; } + /* Note: Check for MF SACCH on SAPI=0 (not permitted). By +* definition we establish a link in multiframe (MF) mode. +* (see also 3GPP TS 48.058, chapter 3.1. However, on SAPI=0 +* SACCH is only allowed in UL mode, not in MF mode. +* (see also 3GPP TS 44.005, figure 5) So we have to drop such +* Establish Indications */ + if (sapi == 0 && (rllh->link_id >> 6 & 0x03) == 1) { + LOGP(DRLL, LOGL_NOTICE, "MS attempted to establish an SACCH in MF mode on SAPI=0 (not permitted)\n"); + + /* Note: We do not need to close the channel, +* since we might still get a proper Establish Ind. +* If not, T3101 will close the channel on timeout. */ + break; + } + msg->lchan->sapis[rllh->link_id & 0x7] = LCHAN_SAPI_MS; osmo_timer_del(>lchan->T3101); if (msgb_l2len(msg) > -- To view, visit https://gerrit.osmocom.org/6306 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I12962072c0ea689d2b9b5c2899ffb59be9310dcb Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-bsc[master]: abis_rsl: do not allow SACCH in MF mode on SAPI=0
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6306 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12962072c0ea689d2b9b5c2899ffb59be9310dcb Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-bsc[master]: abis_rsl: permit first EstablishInd only on SAPI=0
Harald Welte has submitted this change and it was merged. Change subject: abis_rsl: permit first EstablishInd only on SAPI=0 .. abis_rsl: permit first EstablishInd only on SAPI=0 When the first EstablishInd (DCCH) is made by the MS, then it must by definition happen on SAPI=0. The MS may establish multiple connection on other SAPIs afterwards. At the moment osmo-bsc does not check the SAPI when an EstablishInd message is received. - For SAPIs other than 0, check if SAPI=0 has already been established See also TTCN3 testcases: BSC_Tests.TC_rll_est_ind_inval_sapi1 BSC_Tests.TC_rll_est_ind_inval_sapi3 Change-Id: Ibf4fca0bd42dfe5bc63e8b08754ebbe0a5e252c3 Closes: OS#2750 --- M src/libbsc/abis_rsl.c 1 file changed, 14 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index 3f8bbc9..1893166 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -2180,6 +2180,20 @@ case RSL_MT_EST_IND: DEBUGPC(DRLL, "ESTABLISH INDICATION\n"); /* lchan is established, stop T3101 */ + + /* Note: By definition the first Establish Indication must +* happen first on SAPI 0, once the connection on SAPI 0 is +* made, parallel connections on other SAPIs are permitted */ + if (sapi != 0 && msg->lchan->sapis[0] != LCHAN_SAPI_MS) { + LOGP(DRLL, LOGL_NOTICE, "MS attempted to establish DCCH on SAPI=%d (expected SAPI=0)\n", + rllh->link_id & 0x7); + + /* Note: We do not need to close the channel, +* since we might still get a proper Establish Ind. +* If not, T3101 will close the channel on timeout. */ + break; + } + msg->lchan->sapis[rllh->link_id & 0x7] = LCHAN_SAPI_MS; osmo_timer_del(>lchan->T3101); if (msgb_l2len(msg) > -- To view, visit https://gerrit.osmocom.org/6303 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf4fca0bd42dfe5bc63e8b08754ebbe0a5e252c3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max
osmo-bsc[master]: abis_rsl: permit first EstablishInd only on SAPI=0
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6303 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibf4fca0bd42dfe5bc63e8b08754ebbe0a5e252c3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No
[PATCH] osmo-bsc[master]: abis_rsl: permit first EstablishInd only on SAPI=0
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6303 to look at the new patch set (#2). abis_rsl: permit first EstablishInd only on SAPI=0 When the first EstablishInd (DCCH) is made by the MS, then it must by definition happen on SAPI=0. The MS may establish multiple connection on other SAPIs afterwards. At the moment osmo-bsc does not check the SAPI when an EstablishInd message is received. - For SAPIs other than 0, check if SAPI=0 has already been established See also TTCN3 testcases: BSC_Tests.TC_rll_est_ind_inval_sapi1 BSC_Tests.TC_rll_est_ind_inval_sapi3 Change-Id: Ibf4fca0bd42dfe5bc63e8b08754ebbe0a5e252c3 Closes: OS#2750 --- M src/libbsc/abis_rsl.c 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/03/6303/2 diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index 3f8bbc9..1893166 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -2180,6 +2180,20 @@ case RSL_MT_EST_IND: DEBUGPC(DRLL, "ESTABLISH INDICATION\n"); /* lchan is established, stop T3101 */ + + /* Note: By definition the first Establish Indication must +* happen first on SAPI 0, once the connection on SAPI 0 is +* made, parallel connections on other SAPIs are permitted */ + if (sapi != 0 && msg->lchan->sapis[0] != LCHAN_SAPI_MS) { + LOGP(DRLL, LOGL_NOTICE, "MS attempted to establish DCCH on SAPI=%d (expected SAPI=0)\n", + rllh->link_id & 0x7); + + /* Note: We do not need to close the channel, +* since we might still get a proper Establish Ind. +* If not, T3101 will close the channel on timeout. */ + break; + } + msg->lchan->sapis[rllh->link_id & 0x7] = LCHAN_SAPI_MS; osmo_timer_del(>lchan->T3101); if (msgb_l2len(msg) > -- To view, visit https://gerrit.osmocom.org/6303 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibf4fca0bd42dfe5bc63e8b08754ebbe0a5e252c3 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max
[PATCH] osmo-bsc[master]: abis_rsl: do not allow SACCH in MF mode on SAPI=0
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6306 to look at the new patch set (#2). abis_rsl: do not allow SACCH in MF mode on SAPI=0 osmo-msc does currently not check if an MS attemts to establish an SACCH link on SAPI=0. This combination is not permitted and should be dropped. - Make sure that establish indication for SAPI=0 and channel-type=SACCH is not permitted See also TTCN3 Testcase: BSC_Tests.TC_rll_est_ind_inval_sacch Change-Id: I12962072c0ea689d2b9b5c2899ffb59be9310dcb Closes: OS#2750 --- M src/libbsc/abis_rsl.c 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/06/6306/2 diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index 1893166..261e6fe 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -2194,6 +2194,21 @@ break; } + /* Note: Check for MF SACCH on SAPI=0 (not permitted). By +* definition we establish a link in multiframe (MF) mode. +* (see also 3GPP TS 48.058, chapter 3.1. However, on SAPI=0 +* SACCH is only allowed in UL mode, not in MF mode. +* (see also 3GPP TS 44.005, figure 5) So we have to drop such +* Establish Indications */ + if (sapi == 0 && (rllh->link_id >> 6 & 0x03) == 1) { + LOGP(DRLL, LOGL_NOTICE, "MS attempted to establish an SACCH in MF mode on SAPI=0 (not permitted)\n"); + + /* Note: We do not need to close the channel, +* since we might still get a proper Establish Ind. +* If not, T3101 will close the channel on timeout. */ + break; + } + msg->lchan->sapis[rllh->link_id & 0x7] = LCHAN_SAPI_MS; osmo_timer_del(>lchan->T3101); if (msgb_l2len(msg) > -- To view, visit https://gerrit.osmocom.org/6306 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I12962072c0ea689d2b9b5c2899ffb59be9310dcb Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Jenkins Builder
[PATCH] osmo-msc[master]: Fix whitespace issues
Review at https://gerrit.osmocom.org/6308 Fix whitespace issues We don't usually put space before in-place increment or decrement. Let's make code look similar to other Osmocom projects. Change-Id: I5962431ad16c97e412939dc1b8949f6361a5c26e --- M src/libcommon/oap_client.c M src/libmsc/sms_queue.c M src/libvlr/vlr.c M tests/msc_vlr/msc_vlr_tests.c M tests/sms_queue/sms_queue_test.c 5 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/08/6308/1 diff --git a/src/libcommon/oap_client.c b/src/libcommon/oap_client.c index 39055ab..7154baa 100644 --- a/src/libcommon/oap_client.c +++ b/src/libcommon/oap_client.c @@ -257,7 +257,7 @@ "OAP registration failed\n"); state->state = OAP_INITIALIZED; if (state->registration_failures < 3) { - state->registration_failures ++; + state->registration_failures++; return oap_client_register(state, msg_tx); } return -11; diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c index 39a81f6..7d59787 100644 --- a/src/libmsc/sms_queue.c +++ b/src/libmsc/sms_queue.c @@ -216,7 +216,7 @@ sms = db_sms_get_next_unsent_rr_msisdn(net, last_msisdn, 9); if (!sms) { last_msisdn[0] = '\0'; - wrapped ++; + wrapped++; continue; } diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 2b9e3b2..96627ed 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -595,7 +595,7 @@ } vsub->auth_tuples[i].vec = gsup->auth_vectors[i]; vsub->auth_tuples[i].key_seq = key_seq; - got_tuples ++; + got_tuples++; } LOGVSUBP(LOGL_DEBUG, vsub, "Received %u auth tuples\n", got_tuples); diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 4544429..713bb16 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -826,8 +826,8 @@ void run_tests(int nr) { int test_nr; - nr --; /* arg's first test is 1, in here it's 0 */ - for (test_nr = 0; msc_vlr_tests[test_nr]; test_nr ++) { + nr--; /* arg's first test is 1, in here it's 0 */ + for (test_nr = 0; msc_vlr_tests[test_nr]; test_nr++) { if (nr >= 0 && test_nr != nr) continue; diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c index 0ff636e..641cc5f 100644 --- a/tests/sms_queue/sms_queue_test.c +++ b/tests/sms_queue/sms_queue_test.c @@ -107,7 +107,7 @@ fake_sms.receiver = fake_sms_db[i].vsub_attached? _vsub : NULL; osmo_strlcpy(fake_sms.text, fake_sms_db[i].msisdn, sizeof(fake_sms.text)); if (fake_sms_db[i].vsub_attached) - fake_sms_db[i].nr_of_sms --; + fake_sms_db[i].nr_of_sms--; return _sms; } return NULL; -- To view, visit https://gerrit.osmocom.org/6308 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5962431ad16c97e412939dc1b8949f6361a5c26e Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max
osmo-msc[master]: Fix VLR test macro
Patch Set 1: (1 comment) This one is fixed, I'll send update regarding other comments later on. https://gerrit.osmocom.org/#/c/6296/1/tests/msc_vlr/msc_vlr_test_rest.c File tests/msc_vlr/msc_vlr_test_rest.c: Line 26: void test_early_stage(const char *imsi) > This doesn't seem to belong here Indeed. -- To view, visit https://gerrit.osmocom.org/6296 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I36ae1f9bb395921dc2c5a39e35fbb8040ba47213 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: daniel Gerrit-HasComments: Yes
[PATCH] osmo-msc[master]: Fix VLR test macro
Hello daniel, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6296 to look at the new patch set (#4). Fix VLR test macro Previously EXPECT_ACCEPTED used parameter which wasn't explicitly passed to it. This is potential source of bugs and makes code harder to read and maintain. Fix this by converting it to function. Also don't use assert to fail but print additional error log which allows the test to continue collecting all related errors in one run. In addition, this allow us to make conn_exists() static. Change-Id: I36ae1f9bb395921dc2c5a39e35fbb8040ba47213 Related: OS#2864 --- M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h 10 files changed, 96 insertions(+), 86 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/96/6296/4 diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.c b/tests/msc_vlr/msc_vlr_test_authen_reuse.c index 039c399..94571c0 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.c +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.c @@ -129,7 +129,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("even though the TMSI is not acked, we can already find the subscr with it"); diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index dea1d96..9b4f691 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -133,7 +133,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); btw("MS sends TMSI Realloc Complete"); iu_release_expected = true; @@ -178,7 +178,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); /* On UTRAN */ btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c index e9eacf0..d9069b9 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c @@ -65,7 +65,7 @@ btw("If the HLR were to send a GSUP _UPDATE_LOCATION_RESULT we'd still reject"); gsup_rx("0601080971004026f0", NULL); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); @@ -102,7 +102,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts with a CM Service Accept"); @@ -150,7 +150,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts and sends pending SMS"); @@ -255,7 +255,7 @@ btw("If the HLR were to send a GSUP _UPDATE_LOCATION_RESULT we'd still reject"); gsup_rx("0601080971004026f0", NULL); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); @@ -277,7 +277,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("even though the TMSI is not acked, we can already find the subscr with it"); @@ -316,7 +316,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts with a CM Service Accept"); @@ -364,7 +364,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts and sends pending SMS"); @@ -451,7 +451,7 @@
[PATCH] osmo-msc[master]: VLR tests: always print test parameters
Review at https://gerrit.osmocom.org/6307 VLR tests: always print test parameters For each test print: * the test number * IMSI Unfortunately tests are organized in such a way that we don't know the number of particular test in advance. Nevertheless, it make sense to always print it regardless of -v option presense. Related: OS#2864 Change-Id: I2e1d7701f5322d2311f32b796148a8b414f53b8e --- M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_authen_reuse.err M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_authen.err M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_hlr_reject.err M tests/msc_vlr/msc_vlr_test_hlr_timeout.c M tests/msc_vlr/msc_vlr_test_hlr_timeout.err M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_ms_timeout.err M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.err M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_rest.err M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_test_umts_authen.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h 24 files changed, 293 insertions(+), 299 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/07/6307/1 diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.c b/tests/msc_vlr/msc_vlr_test_authen_reuse.c index 103c904..039c399 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.c +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.c @@ -284,46 +284,46 @@ clear_vlr(); } -void test_auth_use_twice_geran() +void test_auth_use_twice_geran(uint8_t nr, const char *imsi) { - comment_start(); + comment_start(nr, imsi); _test_auth_reuse(RAN_GERAN_A, 1, 1, true); - comment_end(); + comment_end(nr, imsi); } -void test_auth_use_twice_utran() +void test_auth_use_twice_utran(uint8_t nr, const char *imsi) { - comment_start(); + comment_start(nr, imsi); _test_auth_reuse(RAN_UTRAN_IU, 1, 1, true); - comment_end(); + comment_end(nr, imsi); } -void test_auth_use_infinitely_geran() +void test_auth_use_infinitely_geran(uint8_t nr, const char *imsi) { - comment_start(); + comment_start(nr, imsi); _test_auth_reuse(RAN_GERAN_A, -1, 3, false); - comment_end(); + comment_end(nr, imsi); } -void test_auth_use_infinitely_utran() +void test_auth_use_infinitely_utran(uint8_t nr, const char *imsi) { - comment_start(); + comment_start(nr, imsi); _test_auth_reuse(RAN_UTRAN_IU, -1, 3, false); - comment_end(); + comment_end(nr, imsi); } -void test_no_auth_reuse_geran() +void test_no_auth_reuse_geran(uint8_t nr, const char *imsi) { - comment_start(); + comment_start(nr, imsi); _test_auth_reuse(RAN_GERAN_A, 0, 0, true); - comment_end(); + comment_end(nr, imsi); } -void test_no_auth_reuse_utran() +void test_no_auth_reuse_utran(uint8_t nr, const char *imsi) { - comment_start(); + comment_start(nr, imsi); _test_auth_reuse(RAN_UTRAN_IU, 0, 0, true); - comment_end(); + comment_end(nr, imsi); } msc_vlr_test_func_t msc_vlr_tests[] = { diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err b/tests/msc_vlr/msc_vlr_test_authen_reuse.err index c6c3f72..010f594 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err @@ -1,4 +1,4 @@ -= test_auth_use_twice_geran += [1] test_auth_use_twice_geran(90170004620)... - Location Update request causes a GSUP Send Auth Info request to HLR MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST new conn @@ -421,12 +421,12 @@ DRLL Freeing subscriber connection with NULL subscriber bssap_clear_sent == 1 llist_count(>subscr_conns) == 0 -= test_auth_use_twice_geran: SUCCESS += [1] test_auth_use_twice_geran(90170004620): SUCCESS full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 8 -= test_auth_use_twice_utran += [2] test_auth_use_twice_utran(90170004620)... - Location Update request causes a GSUP Send Auth Info request to HLR MSC <--RAN_UTRAN_IU-- MS: GSM48_MT_MM_LOC_UPD_REQUEST new conn @@ -875,12 +875,12 @@ DRLL Freeing subscriber connection with NULL subscriber iu_release_sent == 1 llist_count(>subscr_conns) == 0 -= test_auth_use_twice_utran: SUCCESS += [2] test_auth_use_twice_utran(90170004620): SUCCESS full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 8 -= test_auth_use_infinitely_geran += [3] test_auth_use_infinitely_geran(90170004620)... - Location
osmo-msc[master]: Fix VLR test macro
Patch Set 3: Code-Review-1 (3 comments) I'd be in favor of keeping the macro, but adding another parameter to it. https://gerrit.osmocom.org/#/c/6296/1/tests/msc_vlr/msc_vlr_test_rest.c File tests/msc_vlr/msc_vlr_test_rest.c: Line 26: void test_early_stage(const char *imsi) This doesn't seem to belong here https://gerrit.osmocom.org/#/c/6296/1/tests/msc_vlr/msc_vlr_tests.c File tests/msc_vlr/msc_vlr_tests.c: Line 196: accepted = msc_subscr_conn_is_accepted(conn); There are no more asserts in this function which means the test might not reliably fail. Having a macro insert the assert into the actual test function also helps with debugging where exactly a test case failed. https://gerrit.osmocom.org/#/c/6296/1/tests/msc_vlr/msc_vlr_tests.h File tests/msc_vlr/msc_vlr_tests.h: Line 147 Instead of converting the macro to a function you can just add a parameter for g_conn here -- To view, visit https://gerrit.osmocom.org/6296 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I36ae1f9bb395921dc2c5a39e35fbb8040ba47213 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: Yes
[PATCH] osmo-bsc[master]: abis_rsl: do not allow SACCH in MF mode on SAPI=0
Review at https://gerrit.osmocom.org/6306 abis_rsl: do not allow SACCH in MF mode on SAPI=0 osmo-msc does currently not check if an MS attemts to establish an SACCH link on SAPI=0. This combination is not permitted and should be dropped. - Make sure that establish indication for SAPI=0 and channel-type=SACCH is not permitted See also TTCN3 Testcase: BSC_Tests.TC_rll_est_ind_inval_sacch Change-Id: I12962072c0ea689d2b9b5c2899ffb59be9310dcb Closes: OS#2750 --- M src/libbsc/abis_rsl.c 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/06/6306/1 diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index ff8b980..a43712c 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -2190,6 +2190,17 @@ break; } + /* Note: Check for MF SACCH on SAPI=0 (not permitted). By +* definition we establish a link in multiframe (MF) mode. +* (see also 3GPP TS 48.058, chapter 3.1. However, on SAPI=0 +* SACCH is only allowed in UL mode, not in MF mode. +* (see also 3GPP TS 44.005, figure 5) So we have to drop such +* Establish Indications */ + if (sapi == 0 && (rllh->link_id >> 6 & 0x03) == 1) { + DEBUGPC(DRLL, "MS attempted to establish an SACCH in MF mode on SAPI=0 (not permitted)"); + break; + } + msg->lchan->sapis[rllh->link_id & 0x7] = LCHAN_SAPI_MS; osmo_timer_del(>lchan->T3101); if (msgb_l2len(msg) > -- To view, visit https://gerrit.osmocom.org/6306 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12962072c0ea689d2b9b5c2899ffb59be9310dcb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter
[PATCH] osmo-msc[master]: VLR tests: don't fail via assert
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6304 to look at the new patch set (#3). VLR tests: don't fail via assert Don't fail tests using thwart_rx_non_initial_requests() via OSMO_ASSERT. Instead log extended error which will fail the test eventually but allows to gather additional info helpful for debugging. Change-Id: I2607cb1ac60941dbc22fca532ed2b3738bfbcc63 Related: OS#2864 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/04/6304/3 diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index cf95347..d5598e7 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -286,13 +286,22 @@ return rc; } +static inline void ms_msg_log_err(uint8_t val, uint8_t msgtype) +{ + int rc = ms_sends_msg_fake(val, msgtype); + if (rc != -EACCES) + log("Unexpected return value %u != %u for %s/%s", + -rc, -EACCES, gsm48_pdisc_name(val), gsm48_cc_msg_name(msgtype)); +} + void thwart_rx_non_initial_requests() { log("requests shall be thwarted"); - OSMO_ASSERT(ms_sends_msg_fake(GSM48_PDISC_CC, GSM48_MT_CC_SETUP) == -EACCES); - OSMO_ASSERT(ms_sends_msg_fake(GSM48_PDISC_MM, 0x33 /* nonexistent */) == -EACCES); - OSMO_ASSERT(ms_sends_msg_fake(GSM48_PDISC_RR, GSM48_MT_RR_SYSINFO_1) == -EACCES); - OSMO_ASSERT(ms_sends_msg_fake(GSM48_PDISC_SMS, GSM411_MT_CP_DATA) == -EACCES); + + ms_msg_log_err(GSM48_PDISC_CC, GSM48_MT_CC_SETUP); + ms_msg_log_err(GSM48_PDISC_MM, 0x33); /* nonexistent */ + ms_msg_log_err(GSM48_PDISC_RR, GSM48_MT_RR_SYSINFO_1); + ms_msg_log_err(GSM48_PDISC_SMS, GSM411_MT_CP_DATA); } void send_sms(struct vlr_subscr *receiver, -- To view, visit https://gerrit.osmocom.org/6304 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2607cb1ac60941dbc22fca532ed2b3738bfbcc63 Gerrit-PatchSet: 3 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Jenkins Builder
[PATCH] osmo-msc[master]: VLR tests: remove weird code
VLR tests: remove weird code Having while(0) as a body for for() cycle generate too much WTF while looking at the code while not serving any obvious purpose. Let's just drop it to avoid confusing developers. Change-Id: I1f571ec319ff3231fd9acd4066e470476c3b1f78 Related: OS#2864 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/05/6305/2 diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index d5598e7..93d74de 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -865,7 +865,7 @@ fprintf(stderr, "(test nr %d)\n", test_nr + 1); check_talloc(msgb_ctx, tall_bsc_ctx, 8); - } while(0); + } } int main(int argc, char **argv) -- To view, visit https://gerrit.osmocom.org/6305 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1f571ec319ff3231fd9acd4066e470476c3b1f78 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: neels
[PATCH] osmo-msc[master]: Fix VLR test macro
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6296 to look at the new patch set (#3). Fix VLR test macro Previously EXPECT_ACCEPTED used parameter which wasn't explicitly passed to it. This is potential source of bugs and makes code harder to read and maintain. Fix this by converting it to function. Also don't use assert to fail but print additional error log which allows the test to continue collecting all related errors in one run. In addition, this allow us to make conn_exists() static. Change-Id: I36ae1f9bb395921dc2c5a39e35fbb8040ba47213 Related: OS#2864 --- M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h 10 files changed, 97 insertions(+), 87 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/96/6296/3 diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.c b/tests/msc_vlr/msc_vlr_test_authen_reuse.c index 103c904..7734440 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.c +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.c @@ -129,7 +129,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("even though the TMSI is not acked, we can already find the subscr with it"); diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index cc120c8..c35a0ec 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -133,7 +133,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); btw("MS sends TMSI Realloc Complete"); iu_release_expected = true; @@ -178,7 +178,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); /* On UTRAN */ btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c index 2bcdd3c..fc4fb78 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c @@ -65,7 +65,7 @@ btw("If the HLR were to send a GSUP _UPDATE_LOCATION_RESULT we'd still reject"); gsup_rx("0601080971004026f0", NULL); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); @@ -102,7 +102,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts with a CM Service Accept"); @@ -150,7 +150,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts and sends pending SMS"); @@ -255,7 +255,7 @@ btw("If the HLR were to send a GSUP _UPDATE_LOCATION_RESULT we'd still reject"); gsup_rx("0601080971004026f0", NULL); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); @@ -277,7 +277,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("even though the TMSI is not acked, we can already find the subscr with it"); @@ -316,7 +316,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts with a CM Service Accept"); @@ -364,7 +364,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts and sends pending SMS"); @@ -451,7 +451,7 @@
[PATCH] osmo-msc[master]: Expand VLR tests
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6297 to look at the new patch set (#3). Expand VLR tests Print the IMSI used for each test. This enables expansion to tests with several IMSIs in follow-up patches. Change-Id: I7958608e5136351f7b7c0c57fe79791d989ce9c3 Related: OS#2864 --- M tests/msc_vlr/msc_vlr_test_authen_reuse.ok M tests/msc_vlr/msc_vlr_test_call.ok M tests/msc_vlr/msc_vlr_test_gsm_authen.ok M tests/msc_vlr/msc_vlr_test_gsm_ciph.ok M tests/msc_vlr/msc_vlr_test_hlr_reject.ok M tests/msc_vlr/msc_vlr_test_hlr_timeout.ok M tests/msc_vlr/msc_vlr_test_ms_timeout.ok M tests/msc_vlr/msc_vlr_test_no_authen.ok M tests/msc_vlr/msc_vlr_test_reject_concurrency.ok M tests/msc_vlr/msc_vlr_test_rest.ok M tests/msc_vlr/msc_vlr_test_umts_authen.ok M tests/msc_vlr/msc_vlr_tests.c 12 files changed, 18 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/97/6297/3 diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.ok b/tests/msc_vlr/msc_vlr_test_authen_reuse.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.ok +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_call.ok b/tests/msc_vlr/msc_vlr_test_call.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_call.ok +++ b/tests/msc_vlr/msc_vlr_test_call.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.ok b/tests/msc_vlr/msc_vlr_test_gsm_authen.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.ok +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.ok b/tests/msc_vlr/msc_vlr_test_gsm_ciph.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.ok +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.ok b/tests/msc_vlr/msc_vlr_test_hlr_reject.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_reject.ok +++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.ok b/tests/msc_vlr/msc_vlr_test_hlr_timeout.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.ok +++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.ok b/tests/msc_vlr/msc_vlr_test_ms_timeout.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.ok +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.ok b/tests/msc_vlr/msc_vlr_test_no_authen.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.ok +++ b/tests/msc_vlr/msc_vlr_test_no_authen.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.ok b/tests/msc_vlr/msc_vlr_test_reject_concurrency.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.ok +++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_rest.ok b/tests/msc_vlr/msc_vlr_test_rest.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_rest.ok +++ b/tests/msc_vlr/msc_vlr_test_rest.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.ok b/tests/msc_vlr/msc_vlr_test_umts_authen.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.ok +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 8f6d4b2..cf95347 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -836,10 +836,11 @@ void *msgb_ctx = NULL; -static void run_tests(int nr) +static void run_tests(int nr, const char *imsi) { int test_nr; - const char *imsi = "90170004620"; + + printf("Testing for IMSI %s\n", imsi); nr --; /* arg's first test is 1, in here it's 0 */ for (test_nr = 0; msc_vlr_tests[test_nr]; test_nr ++) { @@ -898,9 +899,9 @@ clear_vlr(); - if (optind >= argc) - run_tests(-1); - else { + if (optind >= argc) { + run_tests(-1, "90170004620"); + } else { int arg; long int nr; for (arg = optind; arg < argc; arg++) { @@ -912,7 +913,7 @@ exit(1); } -
[PATCH] osmo-msc[master]: VLR tests: don't fail via assert
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6304 to look at the new patch set (#2). VLR tests: don't fail via assert Don't fail tests using thwart_rx_non_initial_requests() via OSMO_ASSERT. Instead log extended error which will fail the test eventually but allows to gather additional info helpful for debugging. Change-Id: I2607cb1ac60941dbc22fca532ed2b3738bfbcc63 Related: OS#2864 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/04/6304/2 diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index cf95347..d5598e7 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -286,13 +286,22 @@ return rc; } +static inline void ms_msg_log_err(uint8_t val, uint8_t msgtype) +{ + int rc = ms_sends_msg_fake(val, msgtype); + if (rc != -EACCES) + log("Unexpected return value %u != %u for %s/%s", + -rc, -EACCES, gsm48_pdisc_name(val), gsm48_cc_msg_name(msgtype)); +} + void thwart_rx_non_initial_requests() { log("requests shall be thwarted"); - OSMO_ASSERT(ms_sends_msg_fake(GSM48_PDISC_CC, GSM48_MT_CC_SETUP) == -EACCES); - OSMO_ASSERT(ms_sends_msg_fake(GSM48_PDISC_MM, 0x33 /* nonexistent */) == -EACCES); - OSMO_ASSERT(ms_sends_msg_fake(GSM48_PDISC_RR, GSM48_MT_RR_SYSINFO_1) == -EACCES); - OSMO_ASSERT(ms_sends_msg_fake(GSM48_PDISC_SMS, GSM411_MT_CP_DATA) == -EACCES); + + ms_msg_log_err(GSM48_PDISC_CC, GSM48_MT_CC_SETUP); + ms_msg_log_err(GSM48_PDISC_MM, 0x33); /* nonexistent */ + ms_msg_log_err(GSM48_PDISC_RR, GSM48_MT_RR_SYSINFO_1); + ms_msg_log_err(GSM48_PDISC_SMS, GSM411_MT_CP_DATA); } void send_sms(struct vlr_subscr *receiver, -- To view, visit https://gerrit.osmocom.org/6304 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2607cb1ac60941dbc22fca532ed2b3738bfbcc63 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Jenkins Builder
[PATCH] osmo-msc[master]: VLR tests: mark static test functions as such
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6294 to look at the new patch set (#2). VLR tests: mark static test functions as such Related: OS#2864 Change-Id: I5eac4c24257fd38068ba629d3c21848181703220 --- M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h 2 files changed, 7 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/94/6294/2 diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 44108a2..c75d950 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -113,15 +113,10 @@ return msg; } -const char *gh_type_name(struct gsm48_hdr *gh) +static const char *gh_type_name(struct gsm48_hdr *gh) { return gsm48_pdisc_msgtype_name(gsm48_hdr_pdisc(gh), gsm48_hdr_msg_type(gh)); -} - -const char *msg_type_name(struct msgb *msg) -{ - return gh_type_name((void*)msg->data); } void dtap_expect_tx(const char *hex) @@ -251,7 +246,7 @@ talloc_free(msg); } -int ms_sends_msg_fake(uint8_t pdisc, uint8_t msg_type) +static int ms_sends_msg_fake(uint8_t pdisc, uint8_t msg_type) { int rc; struct msgb *msg; @@ -326,7 +321,7 @@ paging_expecting_imsi = NULL; } -int _paging_sent(enum ran_type via_ran, const char *imsi, uint32_t tmsi, uint32_t lac) +static int _paging_sent(enum ran_type via_ran, const char *imsi, uint32_t tmsi, uint32_t lac) { log("%s sends out paging request to IMSI %s, TMSI 0x%08x, LAC %u", ran_type_name(via_ran), imsi, tmsi, lac); @@ -522,10 +517,10 @@ return 0; } -int _validate_dtap(struct msgb *msg, enum ran_type to_ran) +static int _validate_dtap(struct msgb *msg, enum ran_type to_ran) { btw("DTAP --%s--> MS: %s: %s", - ran_type_name(to_ran), msg_type_name(msg), + ran_type_name(to_ran), gh_type_name((void*)msg->data), osmo_hexdump_nospc(msg->data, msg->len)); OSMO_ASSERT(dtap_tx_expected); @@ -748,7 +743,7 @@ fake_time_passes(0, 0); } -void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks) +static void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks) { talloc_report_full(msgb_ctx, stderr); /* Expecting these to stick around in tall_bsc_ctx: @@ -823,7 +818,7 @@ void *msgb_ctx = NULL; -void run_tests(int nr) +static void run_tests(int nr) { int test_nr; const char *imsi = "90170004620"; diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h index eaec340..2ea3f29 100644 --- a/tests/msc_vlr/msc_vlr_tests.h +++ b/tests/msc_vlr/msc_vlr_tests.h @@ -144,8 +144,6 @@ void thwart_rx_non_initial_requests(); -void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks); - #define EXPECT_ACCEPTED(expect_accepted) do { \ if (g_conn) \ OSMO_ASSERT(conn_exists(g_conn)); \ -- To view, visit https://gerrit.osmocom.org/6294 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5eac4c24257fd38068ba629d3c21848181703220 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel
[PATCH] osmo-msc[master]: Constify msc_subscr_conn_is_accepted() parameter
Hello daniel, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6295 to look at the new patch set (#2). Constify msc_subscr_conn_is_accepted() parameter Related: OS#2864 Change-Id: I8af50a8847a5b438cf2ef660399d4c8bbac86a71 --- M include/osmocom/msc/osmo_msc.h M src/libmsc/subscr_conn.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/95/6295/2 diff --git a/include/osmocom/msc/osmo_msc.h b/include/osmocom/msc/osmo_msc.h index bf455c3..2fa8c46 100644 --- a/include/osmocom/msc/osmo_msc.h +++ b/include/osmocom/msc/osmo_msc.h @@ -79,7 +79,7 @@ uint8_t cause, uint8_t *rr_cause); void msc_subscr_conn_init(void); -bool msc_subscr_conn_is_accepted(struct gsm_subscriber_connection *conn); +bool msc_subscr_conn_is_accepted(const struct gsm_subscriber_connection *conn); void msc_subscr_conn_communicating(struct gsm_subscriber_connection *conn); void msc_subscr_conn_close(struct gsm_subscriber_connection *conn, uint32_t cause); diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c index 0fb4f54..124e46b 100644 --- a/src/libmsc/subscr_conn.c +++ b/src/libmsc/subscr_conn.c @@ -333,7 +333,7 @@ return 0; } -bool msc_subscr_conn_is_accepted(struct gsm_subscriber_connection *conn) +bool msc_subscr_conn_is_accepted(const struct gsm_subscriber_connection *conn) { if (!conn) return false; -- To view, visit https://gerrit.osmocom.org/6295 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8af50a8847a5b438cf2ef660399d4c8bbac86a71 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel
[PATCH] osmo-msc[master]: Fix VLR test macro
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6296 to look at the new patch set (#2). Fix VLR test macro Previously EXPECT_ACCEPTED used parameter which wasn't explicitly passed to it. This is potential source of bugs and makes code harder to read and maintain. Fix this by converting it to function. Also don't use assert to fail but print additional error log which allows the test to continue collecting all related errors in one run. In addition, this allow us to make conn_exists() static. Change-Id: I36ae1f9bb395921dc2c5a39e35fbb8040ba47213 Related: OS#2864 --- M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h 10 files changed, 97 insertions(+), 87 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/96/6296/2 diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.c b/tests/msc_vlr/msc_vlr_test_authen_reuse.c index 103c904..7734440 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.c +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.c @@ -129,7 +129,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("even though the TMSI is not acked, we can already find the subscr with it"); diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index cc120c8..c35a0ec 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -133,7 +133,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); btw("MS sends TMSI Realloc Complete"); iu_release_expected = true; @@ -178,7 +178,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); /* On UTRAN */ btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c index 2bcdd3c..fc4fb78 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c @@ -65,7 +65,7 @@ btw("If the HLR were to send a GSUP _UPDATE_LOCATION_RESULT we'd still reject"); gsup_rx("0601080971004026f0", NULL); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); @@ -102,7 +102,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts with a CM Service Accept"); @@ -150,7 +150,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts and sends pending SMS"); @@ -255,7 +255,7 @@ btw("If the HLR were to send a GSUP _UPDATE_LOCATION_RESULT we'd still reject"); gsup_rx("0601080971004026f0", NULL); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); @@ -277,7 +277,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("even though the TMSI is not acked, we can already find the subscr with it"); @@ -316,7 +316,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts with a CM Service Accept"); @@ -364,7 +364,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts and sends pending SMS"); @@ -451,7 +451,7 @@
[PATCH] osmo-msc[master]: VLR tests: remove weird code
Review at https://gerrit.osmocom.org/6305 VLR tests: remove weird code Having while(0) as a body for for() cycle generate too much WTF while looking at the code while not serving any obvious purpose. Let's just drop it to avoid confusing developers. Change-Id: I1f571ec319ff3231fd9acd4066e470476c3b1f78 Related: OS#2864 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/05/6305/1 diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index d5598e7..93d74de 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -865,7 +865,7 @@ fprintf(stderr, "(test nr %d)\n", test_nr + 1); check_talloc(msgb_ctx, tall_bsc_ctx, 8); - } while(0); + } } int main(int argc, char **argv) -- To view, visit https://gerrit.osmocom.org/6305 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f571ec319ff3231fd9acd4066e470476c3b1f78 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max
osmo-msc[master]: Constify msc_subscr_conn_is_accepted() parameter
Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/6295 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8af50a8847a5b438cf2ef660399d4c8bbac86a71 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No
[PATCH] osmo-msc[master]: MSC tests: don't fail via assert
Review at https://gerrit.osmocom.org/6304 MSC tests: don't fail via assert Don't fail tests using thwart_rx_non_initial_requests() via OSMO_ASSERT. Instead log extended error which will fail the test eventually but allows to gather additional info helpful for debugging. Change-Id: I2607cb1ac60941dbc22fca532ed2b3738bfbcc63 Related: OS#2864 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/04/6304/1 diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index cf95347..d5598e7 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -286,13 +286,22 @@ return rc; } +static inline void ms_msg_log_err(uint8_t val, uint8_t msgtype) +{ + int rc = ms_sends_msg_fake(val, msgtype); + if (rc != -EACCES) + log("Unexpected return value %u != %u for %s/%s", + -rc, -EACCES, gsm48_pdisc_name(val), gsm48_cc_msg_name(msgtype)); +} + void thwart_rx_non_initial_requests() { log("requests shall be thwarted"); - OSMO_ASSERT(ms_sends_msg_fake(GSM48_PDISC_CC, GSM48_MT_CC_SETUP) == -EACCES); - OSMO_ASSERT(ms_sends_msg_fake(GSM48_PDISC_MM, 0x33 /* nonexistent */) == -EACCES); - OSMO_ASSERT(ms_sends_msg_fake(GSM48_PDISC_RR, GSM48_MT_RR_SYSINFO_1) == -EACCES); - OSMO_ASSERT(ms_sends_msg_fake(GSM48_PDISC_SMS, GSM411_MT_CP_DATA) == -EACCES); + + ms_msg_log_err(GSM48_PDISC_CC, GSM48_MT_CC_SETUP); + ms_msg_log_err(GSM48_PDISC_MM, 0x33); /* nonexistent */ + ms_msg_log_err(GSM48_PDISC_RR, GSM48_MT_RR_SYSINFO_1); + ms_msg_log_err(GSM48_PDISC_SMS, GSM411_MT_CP_DATA); } void send_sms(struct vlr_subscr *receiver, -- To view, visit https://gerrit.osmocom.org/6304 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2607cb1ac60941dbc22fca532ed2b3738bfbcc63 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max
osmo-bsc[master]: abis_rsl: permit first EstablishInd only on SAPI=0
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/6303/1/src/libbsc/abis_rsl.c File src/libbsc/abis_rsl.c: Line 2189: rllh->link_id & 0x7); Don't we have function for that? If not that we probably should. -- To view, visit https://gerrit.osmocom.org/6303 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibf4fca0bd42dfe5bc63e8b08754ebbe0a5e252c3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes
[PATCH] osmo-bsc[master]: abis_rsl: permit first EstablishInd only on SAPI=0
Review at https://gerrit.osmocom.org/6303 abis_rsl: permit first EstablishInd only on SAPI=0 When the first EstablishInd (DCCH) is made by the MS, then it must by definition happen on SAPI=0. The MS may establish multiple connection on other SAPIs afterwards. At the moment osmo-bsc does not check the SAPI when an EstablishInd message is received. - For SAPIs other than 0, check if SAPI=0 has already been established See also TTCN3 testcases: BSC_Tests.TC_rll_est_ind_inval_sapi1 BSC_Tests.TC_rll_est_ind_inval_sapi3 Change-Id: Ibf4fca0bd42dfe5bc63e8b08754ebbe0a5e252c3 Closes: OS#2750 --- M src/libbsc/abis_rsl.c 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/03/6303/1 diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c index 3f8bbc9..ff8b980 100644 --- a/src/libbsc/abis_rsl.c +++ b/src/libbsc/abis_rsl.c @@ -2180,6 +2180,16 @@ case RSL_MT_EST_IND: DEBUGPC(DRLL, "ESTABLISH INDICATION\n"); /* lchan is established, stop T3101 */ + + /* Note: By definition the first Establish Indication must +* happen first on SAPI 0, once the connection on SAPI 0 is +* made, parallel connections on other SAPIs are permitted */ + if (sapi != 0 && msg->lchan->sapis[0] != LCHAN_SAPI_MS) { + DEBUGPC(DRLL, "MS attempted to establish DCCH on SAPI=%d (expected SAPI=0)\n", + rllh->link_id & 0x7); + break; + } + msg->lchan->sapis[rllh->link_id & 0x7] = LCHAN_SAPI_MS; osmo_timer_del(>lchan->T3101); if (msgb_l2len(msg) > -- To view, visit https://gerrit.osmocom.org/6303 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf4fca0bd42dfe5bc63e8b08754ebbe0a5e252c3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter
osmo-ci[master]: jobs: add Coverity Upload Job
Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/6291 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I852b42a698a4568b51e993bb5e86efeed6afdb32 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Max Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels Gerrit-HasComments: No
[PATCH] osmo-ttcn3-hacks[master]: deps: Ensure that branches are updated on make update as well
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6292 to look at the new patch set (#2). deps: Ensure that branches are updated on make update as well Don't just force-checkout the local master branch again, but reset to origin/master Change-Id: I7d5e0e3d7f92fc51fa438b92f00c79f63945e74f --- M deps/Makefile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/92/6292/2 diff --git a/deps/Makefile b/deps/Makefile index e1cbfe3..6f975f2 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -55,7 +55,7 @@ .PHONY:$(1)/update $(1)/update: $(1) - (cd $(1) && git fetch && git checkout -f -B master) + (cd $(1) && git fetch && git checkout -f -B master origin/master) .PHONY: $(1)/clean $(1)/clean: -- To view, visit https://gerrit.osmocom.org/6292 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7d5e0e3d7f92fc51fa438b92f00c79f63945e74f Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: danielGerrit-Reviewer: Jenkins Builder
[PATCH] osmo-ttcn3-hacks[master]: BSSMAP_Emulation: Parameter to skip seq no patching
Review at https://gerrit.osmocom.org/6302 BSSMAP_Emulation: Parameter to skip seq no patching This is needed to check that duplicated messages will actually be thrown away by the MSC. Change-Id: I0a6914067ec8daa8903f0ef0c877f178cfd61659 --- M library/BSSMAP_Emulation.ttcn M msc/BSC_ConnectionHandler.ttcn 2 files changed, 9 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/02/6302/1 diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn index b1567f3..6ec396f 100644 --- a/library/BSSMAP_Emulation.ttcn +++ b/library/BSSMAP_Emulation.ttcn @@ -70,6 +70,7 @@ /* similar to PDU_BSSAP with DTAP, but DTAP is already decoded! */ type record PDU_DTAP_MO { OCT1dlci optional, + boolean skip_seq_patching optional, PDU_ML3_MS_NW dtap } @@ -84,8 +85,9 @@ dtap := dtap } -template PDU_DTAP_MO ts_PDU_DTAP_MO(template PDU_ML3_MS_NW dtap, template OCT1 dlci := '00'O) := { +template PDU_DTAP_MO ts_PDU_DTAP_MO(template PDU_ML3_MS_NW dtap, template OCT1 dlci := '00'O, boolean skip_seq_patching := false) := { dlci := dlci, + skip_seq_patching := skip_seq_patching, dtap := dtap } @@ -573,7 +575,9 @@ /* convert from decoded DTAP to encoded DTAP */ var octetstring l3_enc := enc_PDU_ML3_MS_NW(dtap_mo.dtap); /* patch correct L3 send sequence number N(SD) into l3_enc */ - f_ML3_patch_seq(ConnectionTable[idx], dtap_mo.dtap, l3_enc); + if (dtap_mo.skip_seq_patching == false) { + f_ML3_patch_seq(ConnectionTable[idx], dtap_mo.dtap, l3_enc); + } bssap := valueof(ts_BSSAP_DTAP(l3_enc, dtap_mo.dlci)); BSSAP.send(ts_BSSAP_DATA_req(ConnectionTable[idx].sccp_conn_id, bssap)); } diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index b81f61f..fa0216a 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -546,7 +546,7 @@ /* Send DTMF */ dtmf_dtap := ts_ML3_MO_CC_START_DTMF(cpars.transaction_id, "2"); dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(2, 2); - BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap)); + BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true)); T.start; alt { [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) {} @@ -556,7 +556,7 @@ } } - BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap)); + BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true)); T.start; alt { [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) { @@ -568,7 +568,7 @@ dtmf_dtap := ts_ML3_MO_CC_START_DTMF(cpars.transaction_id, "3"); dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(3, 2); - BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap)) + BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true)); alt { [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "3")) { } [] T.timeout { -- To view, visit https://gerrit.osmocom.org/6302 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a6914067ec8daa8903f0ef0c877f178cfd61659 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: daniel
[PATCH] osmo-ttcn3-hacks[master]: MSC_Tests: Add CC sequence no. test with DTMF
Review at https://gerrit.osmocom.org/6301 MSC_Tests: Add CC sequence no. test with DTMF Change-Id: I9674343acc18187b9e016bd8e0be470d5424046f --- M library/L3_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 3 files changed, 106 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/01/6301/1 diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index a7e14e2..8b1857d 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -777,6 +777,30 @@ } } +template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_START_DTMF(integer tid, charstring number) := { + discriminator := '0011'B, + tiOrSkip := { + transactionId := { + tio := int2bit(tid, 3), + tiFlag := '0'B, + tIExtension := omit + } + }, + msgs := { + cc := { + startDTMF := { + messageType := '110101'B, + nsd := '00'B, + keypadFacility := { + elementIdentifier := '2C'O, + keypadInformation := int2bit(char2int(number), 7), + spare_1 := '0'B + } + } + } + } +} + template PDU_ML3_NW_MS tr_ML3_MT_CC_DISC(integer tid) := { discriminator := '0011'B, tiOrSkip := { diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 4f50b70..b81f61f 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -518,6 +518,67 @@ setverdict(pass); } +function f_mo_seq_dtmf_dup(inout CallParameters cpars) +runs on BSC_ConnHdlr { + + timer T := 1.0; + var MobileIdentityLV mi; + var MNCC_PDU mncc; + var MgcpCommand mgcp_cmd; + var template PDU_ML3_MS_NW dtmf_dtap; + + /* If we have a TMSI, use TMSI instead of IMSI */ + if (ispresent(g_pars.tmsi)) { + mi := valueof(ts_MI_TMSI_LV(g_pars.tmsi)); + } else { + mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); + } + f_establish_fully(mi); + + /* Create MNCC and MGCP expect */ + f_create_mncc_expect(hex2str(cpars.called_party)); + f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); + + BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); + MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party -> value mncc; + cpars.mncc_callref := mncc.u.signal.callref; + + /* Send DTMF */ + dtmf_dtap := ts_ML3_MO_CC_START_DTMF(cpars.transaction_id, "2"); + dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(2, 2); + BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap)); + T.start; + alt { + [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) {} + [] T.timeout { + setverdict(fail, "Timeout waiting for START_DTMF_ind"); + self.stop; + } + } + + BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap)); + T.start; + alt { + [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) { + setverdict(fail, "Received duplicate START_DTMF_ind"); + self.stop; + } + [] T.timeout { } + } + + dtmf_dtap := ts_ML3_MO_CC_START_DTMF(cpars.transaction_id, "3"); + dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(3, 2); + BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap)) + alt { + [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "3")) { } + [] T.timeout { + setverdict(fail, "Received duplicate START_DTMF_ind"); + self.stop; + } + } + + setverdict(pass); +} /* expect a clear command */ function f_expect_clear(float t := 5.0) runs on BSC_ConnHdlr { timer T := t; diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 322be5f..8f5f5a4 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1574,6 +1574,27 @@ vc_conn.done; } +/* Test MO Call SETUP with DTMF */ +private function f_tc_mo_setup_dtmf_dup(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_init_handler(pars); + var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); + cpars.bss_rtp_port := 1110; + cpars.mgcp_connection_id_bss := '2'H; + cpars.mgcp_connection_id_mss := '3'H; + + f_perform_lu(true); + f_mo_seq_dtmf_dup(cpars); +} +testcase TC_mo_setup_and_dtmf_dup() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + + vc_conn := f_start_handler(refers(f_tc_mo_setup_dtmf_dup), testcasename(), 39); + vc_conn.done; +} + +testcase TC_mo_dtmf_duplicate() runs on MTC_CT { +} --
[PATCH] osmo-ttcn3-hacks[master]: L3_Templates: Use tid parameter in ts_ML3_MO_CC template
Review at https://gerrit.osmocom.org/6300 L3_Templates: Use tid parameter in ts_ML3_MO_CC template Change-Id: I6c28b206625cb081a98a722b8c793ce02af74441 --- M library/L3_Templates.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/00/6300/1 diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index 47e1f62..a7e14e2 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -552,7 +552,7 @@ discriminator := '0011'B, tiOrSkip := { transactionId := { - tio := '000'B, + tio := int2bit(tid, 3), tiFlag := '0'B, tIExtension := omit } -- To view, visit https://gerrit.osmocom.org/6300 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c28b206625cb081a98a722b8c793ce02af74441 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: daniel
[PATCH] osmo-ttcn3-hacks[master]: MSC_Tests: Make imsi suffix for f_start_handler unique per test
Review at https://gerrit.osmocom.org/6299 MSC_Tests: Make imsi suffix for f_start_handler unique per test Change-Id: I02d1f2ac717fee278e3903d325942697637a5d28 --- M msc/MSC_Tests.ttcn 1 file changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/99/6299/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 0e59dcf..322be5f 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1074,7 +1074,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_cl3_no_payload), testcasename(), 24); + vc_conn := f_start_handler(refers(f_tc_cl3_no_payload), testcasename(), 25); vc_conn.done; } @@ -,7 +,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_cl3_rnd_payload), testcasename(), 24); + vc_conn := f_start_handler(refers(f_tc_cl3_rnd_payload), testcasename(), 26); vc_conn.done; } @@ -1128,7 +1128,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_establish_and_nothing), testcasename(), 25); + vc_conn := f_start_handler(refers(f_tc_establish_and_nothing), testcasename(), 27); vc_conn.done; } @@ -1152,7 +1152,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_mo_setup_and_nothing), testcasename(), 26); + vc_conn := f_start_handler(refers(f_tc_mo_setup_and_nothing), testcasename(), 28); vc_conn.done; } @@ -1186,7 +1186,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_mo_crcx_ran_timeout), testcasename(), 27); + vc_conn := f_start_handler(refers(f_tc_mo_crcx_ran_timeout), testcasename(), 29); vc_conn.done; } @@ -1248,7 +1248,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_mo_crcx_ran_reject), testcasename(), 28); + vc_conn := f_start_handler(refers(f_tc_mo_crcx_ran_reject), testcasename(), 30); vc_conn.done; } @@ -1336,7 +1336,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_mt_crcx_ran_reject), testcasename(), 29); + vc_conn := f_start_handler(refers(f_tc_mt_crcx_ran_reject), testcasename(), 31); vc_conn.done; } @@ -1390,7 +1390,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_mt_t310), testcasename(), 30); + vc_conn := f_start_handler(refers(f_tc_mt_t310), testcasename(), 32); vc_conn.done; } @@ -1435,7 +1435,7 @@ var BSC_ConnHdlr vc_conn; f_init(); - vc_conn := f_start_handler(refers(f_tc_gsup_cancel), testcasename(), 31); + vc_conn := f_start_handler(refers(f_tc_gsup_cancel), testcasename(), 33); vc_conn.done; } @@ -1453,7 +1453,7 @@ f_vty_config(MSCVTY, "network", "authentication required"); f_vty_config(MSCVTY, "network", "encryption a5 1"); - vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_1_13), testcasename(), 32); + vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_1_13), testcasename(), 34); vc_conn.done; } @@ -1471,7 +1471,7 @@ f_vty_config(MSCVTY, "network", "authentication required"); f_vty_config(MSCVTY, "network", "encryption a5 3"); - vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_13), testcasename(), 33); + vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_13), testcasename(), 35); vc_conn.done; } @@ -1508,7 +1508,7 @@ f_vty_config(MSCVTY, "network", "authentication required"); f_vty_config(MSCVTY, "network", "encryption a5 3"); - vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), testcasename(), 34); + vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), testcasename(), 36); vc_conn.done; } @@ -1548,7 +1548,7 @@ f_vty_config(MSCVTY, "network", "authentication required"); f_vty_config(MSCVTY, "network", "encryption a5 1 3"); - vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_13_2), testcasename(), 35); + vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_13_2), testcasename(), 37); vc_conn.done; } @@ -1570,7 +1570,7 @@ f_vty_config(MSCVTY, "network", "authentication required"); f_vty_config(MSCVTY, "network", "encryption a5 0 1 3"); - vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_013_2), testcasename(), 36); + vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_013_2), testcasename(), 38); vc_conn.done; } -- To view, visit https://gerrit.osmocom.org/6299 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange
[PATCH] osmo-ttcn3-hacks[master]: start-testsuite.sh: Pass a third parameter to ttcn3_start
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6293 to look at the new patch set (#2). start-testsuite.sh: Pass a third parameter to ttcn3_start The name of the parameters is a little misleading, since the second parameter could just be a testname. Change-Id: Ibe207a83c477c918a865a8a34cad7ca5d45c7eac --- M start-testsuite.sh 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/93/6293/2 diff --git a/start-testsuite.sh b/start-testsuite.sh index a291a4f..83c381e 100755 --- a/start-testsuite.sh +++ b/start-testsuite.sh @@ -15,4 +15,8 @@ CFG=$2 fi -LD_LIBRARY_PATH=`dirname $SUITE`:/usr/lib/titan:/usr/ttcn3/lib ttcn3_start $SUITE $CFG +if [ $# -gt 2 ]; then + TEST=$3 +fi + +LD_LIBRARY_PATH=`dirname $SUITE`:/usr/lib/titan:/usr/ttcn3/lib ttcn3_start $SUITE $CFG $TEST -- To view, visit https://gerrit.osmocom.org/6293 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibe207a83c477c918a865a8a34cad7ca5d45c7eac Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: danielGerrit-Reviewer: Jenkins Builder
[PATCH] osmo-ttcn3-hacks[master]: MNCC_Emulation: Initialize connection table
Review at https://gerrit.osmocom.org/6298 MNCC_Emulation: Initialize connection table Change-Id: I903f6bf14a15abc6cae1d527195414c5f081c2df --- M library/MNCC_Emulation.ttcn 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/6298/1 diff --git a/library/MNCC_Emulation.ttcn b/library/MNCC_Emulation.ttcn index de29288..60ec58b 100644 --- a/library/MNCC_Emulation.ttcn +++ b/library/MNCC_Emulation.ttcn @@ -145,6 +145,14 @@ return call_id; } +private function f_expect_table_init() +runs on MNCC_Emulation_CT { + for (var integer i := 0; i < sizeof(MnccExpectTable); i := i+1) { + MnccExpectTable[i].dest_number := omit; + MnccExpectTable[i].vc_conn := null; + } +} + private function f_call_table_init() runs on MNCC_Emulation_CT { for (var integer i := 0; i < sizeof(MnccCallTable); i := i+1) { @@ -223,6 +231,7 @@ function main(MnccOps ops, charstring id, charstring sock) runs on MNCC_Emulation_CT { f_connect(sock); + f_expect_table_init(); f_call_table_init(); while (true) { -- To view, visit https://gerrit.osmocom.org/6298 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I903f6bf14a15abc6cae1d527195414c5f081c2df Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: daniel
[PATCH] osmo-msc[master]: Constify msc_subscr_conn_is_accepted() parameter
Review at https://gerrit.osmocom.org/6295 Constify msc_subscr_conn_is_accepted() parameter Related: OS#2864 Change-Id: I8af50a8847a5b438cf2ef660399d4c8bbac86a71 --- M include/osmocom/msc/osmo_msc.h M src/libmsc/subscr_conn.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/95/6295/1 diff --git a/include/osmocom/msc/osmo_msc.h b/include/osmocom/msc/osmo_msc.h index bf455c3..2fa8c46 100644 --- a/include/osmocom/msc/osmo_msc.h +++ b/include/osmocom/msc/osmo_msc.h @@ -79,7 +79,7 @@ uint8_t cause, uint8_t *rr_cause); void msc_subscr_conn_init(void); -bool msc_subscr_conn_is_accepted(struct gsm_subscriber_connection *conn); +bool msc_subscr_conn_is_accepted(const struct gsm_subscriber_connection *conn); void msc_subscr_conn_communicating(struct gsm_subscriber_connection *conn); void msc_subscr_conn_close(struct gsm_subscriber_connection *conn, uint32_t cause); diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c index 0fb4f54..124e46b 100644 --- a/src/libmsc/subscr_conn.c +++ b/src/libmsc/subscr_conn.c @@ -333,7 +333,7 @@ return 0; } -bool msc_subscr_conn_is_accepted(struct gsm_subscriber_connection *conn) +bool msc_subscr_conn_is_accepted(const struct gsm_subscriber_connection *conn) { if (!conn) return false; -- To view, visit https://gerrit.osmocom.org/6295 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8af50a8847a5b438cf2ef660399d4c8bbac86a71 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max
[PATCH] osmo-msc[master]: Expand MSC tests
Review at https://gerrit.osmocom.org/6297 Expand MSC tests Print the IMSI used for each test. This enables expansion to tests with several IMSIs in follow-up patches. Change-Id: I7958608e5136351f7b7c0c57fe79791d989ce9c3 Related: OS#2864 --- M tests/msc_vlr/msc_vlr_test_authen_reuse.ok M tests/msc_vlr/msc_vlr_test_call.ok M tests/msc_vlr/msc_vlr_test_gsm_authen.ok M tests/msc_vlr/msc_vlr_test_gsm_ciph.ok M tests/msc_vlr/msc_vlr_test_hlr_reject.ok M tests/msc_vlr/msc_vlr_test_hlr_timeout.ok M tests/msc_vlr/msc_vlr_test_ms_timeout.ok M tests/msc_vlr/msc_vlr_test_no_authen.ok M tests/msc_vlr/msc_vlr_test_reject_concurrency.ok M tests/msc_vlr/msc_vlr_test_rest.ok M tests/msc_vlr/msc_vlr_test_umts_authen.ok M tests/msc_vlr/msc_vlr_tests.c 12 files changed, 18 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/97/6297/1 diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.ok b/tests/msc_vlr/msc_vlr_test_authen_reuse.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.ok +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_call.ok b/tests/msc_vlr/msc_vlr_test_call.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_call.ok +++ b/tests/msc_vlr/msc_vlr_test_call.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.ok b/tests/msc_vlr/msc_vlr_test_gsm_authen.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.ok +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.ok b/tests/msc_vlr/msc_vlr_test_gsm_ciph.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.ok +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.ok b/tests/msc_vlr/msc_vlr_test_hlr_reject.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_reject.ok +++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.ok b/tests/msc_vlr/msc_vlr_test_hlr_timeout.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.ok +++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.ok b/tests/msc_vlr/msc_vlr_test_ms_timeout.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.ok +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.ok b/tests/msc_vlr/msc_vlr_test_no_authen.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.ok +++ b/tests/msc_vlr/msc_vlr_test_no_authen.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.ok b/tests/msc_vlr/msc_vlr_test_reject_concurrency.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.ok +++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_rest.ok b/tests/msc_vlr/msc_vlr_test_rest.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_rest.ok +++ b/tests/msc_vlr/msc_vlr_test_rest.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_test_umts_authen.ok b/tests/msc_vlr/msc_vlr_test_umts_authen.ok index a965a70..1861dfc 100644 --- a/tests/msc_vlr/msc_vlr_test_umts_authen.ok +++ b/tests/msc_vlr/msc_vlr_test_umts_authen.ok @@ -1 +1,2 @@ +Testing for IMSI 90170004620 Done diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 8f6d4b2..cf95347 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -836,10 +836,11 @@ void *msgb_ctx = NULL; -static void run_tests(int nr) +static void run_tests(int nr, const char *imsi) { int test_nr; - const char *imsi = "90170004620"; + + printf("Testing for IMSI %s\n", imsi); nr --; /* arg's first test is 1, in here it's 0 */ for (test_nr = 0; msc_vlr_tests[test_nr]; test_nr ++) { @@ -898,9 +899,9 @@ clear_vlr(); - if (optind >= argc) - run_tests(-1); - else { + if (optind >= argc) { + run_tests(-1, "90170004620"); + } else { int arg; long int nr; for (arg = optind; arg < argc; arg++) { @@ -912,7 +913,7 @@ exit(1); } - run_tests(nr); + run_tests(nr, "90170004620"); } } --
[PATCH] osmo-msc[master]: Mark static test functions as such
Review at https://gerrit.osmocom.org/6294 Mark static test functions as such Change-Id: I5eac4c24257fd38068ba629d3c21848181703220 --- M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h 2 files changed, 7 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/94/6294/1 diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 44108a2..c75d950 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -113,15 +113,10 @@ return msg; } -const char *gh_type_name(struct gsm48_hdr *gh) +static const char *gh_type_name(struct gsm48_hdr *gh) { return gsm48_pdisc_msgtype_name(gsm48_hdr_pdisc(gh), gsm48_hdr_msg_type(gh)); -} - -const char *msg_type_name(struct msgb *msg) -{ - return gh_type_name((void*)msg->data); } void dtap_expect_tx(const char *hex) @@ -251,7 +246,7 @@ talloc_free(msg); } -int ms_sends_msg_fake(uint8_t pdisc, uint8_t msg_type) +static int ms_sends_msg_fake(uint8_t pdisc, uint8_t msg_type) { int rc; struct msgb *msg; @@ -326,7 +321,7 @@ paging_expecting_imsi = NULL; } -int _paging_sent(enum ran_type via_ran, const char *imsi, uint32_t tmsi, uint32_t lac) +static int _paging_sent(enum ran_type via_ran, const char *imsi, uint32_t tmsi, uint32_t lac) { log("%s sends out paging request to IMSI %s, TMSI 0x%08x, LAC %u", ran_type_name(via_ran), imsi, tmsi, lac); @@ -522,10 +517,10 @@ return 0; } -int _validate_dtap(struct msgb *msg, enum ran_type to_ran) +static int _validate_dtap(struct msgb *msg, enum ran_type to_ran) { btw("DTAP --%s--> MS: %s: %s", - ran_type_name(to_ran), msg_type_name(msg), + ran_type_name(to_ran), gh_type_name((void*)msg->data), osmo_hexdump_nospc(msg->data, msg->len)); OSMO_ASSERT(dtap_tx_expected); @@ -748,7 +743,7 @@ fake_time_passes(0, 0); } -void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks) +static void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks) { talloc_report_full(msgb_ctx, stderr); /* Expecting these to stick around in tall_bsc_ctx: @@ -823,7 +818,7 @@ void *msgb_ctx = NULL; -void run_tests(int nr) +static void run_tests(int nr) { int test_nr; const char *imsi = "90170004620"; diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h index eaec340..2ea3f29 100644 --- a/tests/msc_vlr/msc_vlr_tests.h +++ b/tests/msc_vlr/msc_vlr_tests.h @@ -144,8 +144,6 @@ void thwart_rx_non_initial_requests(); -void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks); - #define EXPECT_ACCEPTED(expect_accepted) do { \ if (g_conn) \ OSMO_ASSERT(conn_exists(g_conn)); \ -- To view, visit https://gerrit.osmocom.org/6294 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5eac4c24257fd38068ba629d3c21848181703220 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Max
[PATCH] osmo-msc[master]: Fix MSC test macro
Review at https://gerrit.osmocom.org/6296 Fix MSC test macro Previously EXPECT_ACCEPTED used parameter which wasn't explicitly passed to it. This is potential source of bugs and makes code harder to read and maintain. Fix this by converting it to function. Also don't use assert to fail but print additional error log which allows the test to continue collecting all related errors in one run. In addition, this allow us to make conn_exists() static. Change-Id: I36ae1f9bb395921dc2c5a39e35fbb8040ba47213 Related: OS#2864 --- M tests/msc_vlr/msc_vlr_test_authen_reuse.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_test_rest.c M tests/msc_vlr/msc_vlr_test_umts_authen.c M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h 10 files changed, 97 insertions(+), 87 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/96/6296/1 diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.c b/tests/msc_vlr/msc_vlr_test_authen_reuse.c index 103c904..7734440 100644 --- a/tests/msc_vlr/msc_vlr_test_authen_reuse.c +++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.c @@ -129,7 +129,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("even though the TMSI is not acked, we can already find the subscr with it"); diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index cc120c8..c35a0ec 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -133,7 +133,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); btw("MS sends TMSI Realloc Complete"); iu_release_expected = true; @@ -178,7 +178,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); /* On UTRAN */ btw("MS sends Authen Response, VLR accepts and sends SecurityModeControl"); diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c index 2bcdd3c..fc4fb78 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c @@ -65,7 +65,7 @@ btw("If the HLR were to send a GSUP _UPDATE_LOCATION_RESULT we'd still reject"); gsup_rx("0601080971004026f0", NULL); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); @@ -102,7 +102,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts with a CM Service Accept"); @@ -150,7 +150,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts and sends pending SMS"); @@ -255,7 +255,7 @@ btw("If the HLR were to send a GSUP _UPDATE_LOCATION_RESULT we'd still reject"); gsup_rx("0601080971004026f0", NULL); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); @@ -277,7 +277,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl"); EXPECT_CONN_COUNT(1); VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("even though the TMSI is not acked, we can already find the subscr with it"); @@ -316,7 +316,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts with a CM Service Accept"); @@ -364,7 +364,7 @@ VERBOSE_ASSERT(auth_request_sent, == true, "%d"); btw("needs auth, not yet accepted"); - EXPECT_ACCEPTED(false); + exp_accept_con(false, g_conn); thwart_rx_non_initial_requests(); btw("MS sends Authen Response, VLR accepts and sends pending SMS"); @@ -451,7 +451,7 @@ btw("a LU Accept with a new TMSI was sent, waiting for TMSI Realloc Compl");
[PATCH] osmo-ttcn3-hacks[master]: deps: Ensure that master is updated on checkout
Review at https://gerrit.osmocom.org/6292 deps: Ensure that master is updated on checkout Change-Id: I7d5e0e3d7f92fc51fa438b92f00c79f63945e74f --- M deps/Makefile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/92/6292/1 diff --git a/deps/Makefile b/deps/Makefile index e1cbfe3..6f975f2 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -55,7 +55,7 @@ .PHONY:$(1)/update $(1)/update: $(1) - (cd $(1) && git fetch && git checkout -f -B master) + (cd $(1) && git fetch && git checkout -f -B master origin/master) .PHONY: $(1)/clean $(1)/clean: -- To view, visit https://gerrit.osmocom.org/6292 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d5e0e3d7f92fc51fa438b92f00c79f63945e74f Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: daniel
[PATCH] osmo-ttcn3-hacks[master]: start-testsuite.sh: Allow a third parameter
Review at https://gerrit.osmocom.org/6293 start-testsuite.sh: Allow a third parameter Change-Id: Ibe207a83c477c918a865a8a34cad7ca5d45c7eac --- M start-testsuite.sh 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/93/6293/1 diff --git a/start-testsuite.sh b/start-testsuite.sh index a291a4f..83c381e 100755 --- a/start-testsuite.sh +++ b/start-testsuite.sh @@ -15,4 +15,8 @@ CFG=$2 fi -LD_LIBRARY_PATH=`dirname $SUITE`:/usr/lib/titan:/usr/ttcn3/lib ttcn3_start $SUITE $CFG +if [ $# -gt 2 ]; then + TEST=$3 +fi + +LD_LIBRARY_PATH=`dirname $SUITE`:/usr/lib/titan:/usr/ttcn3/lib ttcn3_start $SUITE $CFG $TEST -- To view, visit https://gerrit.osmocom.org/6293 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe207a83c477c918a865a8a34cad7ca5d45c7eac Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: daniel
osmo-ci[master]: jobs: add Coverity Upload Job
Patch Set 1: The job ran successfully without uploading https://jenkins.osmocom.org/jenkins/job/osmocom-coverity/ -- To view, visit https://gerrit.osmocom.org/6291 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I852b42a698a4568b51e993bb5e86efeed6afdb32 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels Gerrit-HasComments: No
[PATCH] osmo-ci[master]: jobs: add Coverity Upload Job
Review at https://gerrit.osmocom.org/6291 jobs: add Coverity Upload Job Change-Id: I852b42a698a4568b51e993bb5e86efeed6afdb32 --- A jobs/coverity.yml 1 file changed, 35 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/91/6291/1 diff --git a/jobs/coverity.yml b/jobs/coverity.yml new file mode 100644 index 000..3ec4bda --- /dev/null +++ b/jobs/coverity.yml @@ -0,0 +1,35 @@ +# compile and upload osmocom with coverity tools +- project: +name: osmocom-coverity +jobs: + - osmocom-coverity + +- job: +name: 'osmocom-coverity' +project-type: freestyle +defaults: global +description: 'Generated by job-builder' +display-name: 'Coverity-Upload (jenkins-job-builder)' +node: coverity +builders: + - shell: | + cd $HOME/osmo-ci/coverity + export PATH=$PATH:/opt/coverity/current/bin + ./jenkins.sh +publishers: + - email: + recipients: open...@lists.osmocom.org hol...@freyther.de + notify-every-unstable-build: true +properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 +scm: + - git: + url: git://git.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenk...@osmocom.org' +triggers: + - timed: "@daily" + +# vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/6291 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I852b42a698a4568b51e993bb5e86efeed6afdb32 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus
osmo-ci[master]: jobs/README.adoc: explain the usage of API Tokens instead of...
Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/6290 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie96288913aae2fe97fa11266ffa9ed098044ccfd Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-HasComments: No
[MERGED] osmo-ci[master]: jobs/README.adoc: explain the usage of API Tokens instead of...
Harald Welte has submitted this change and it was merged. Change subject: jobs/README.adoc: explain the usage of API Tokens instead of passwords .. jobs/README.adoc: explain the usage of API Tokens instead of passwords Change-Id: Ie96288913aae2fe97fa11266ffa9ed098044ccfd --- M jobs/README.adoc 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/jobs/README.adoc b/jobs/README.adoc index 2bc8df2..d498658 100644 --- a/jobs/README.adoc +++ b/jobs/README.adoc @@ -17,6 +17,9 @@ or place one in here and pass it to jenkins-jobs using the --conf file. Make sure the file not world readable to minimally safeguard your jenkins password. +Instead of using your jenkins password, use an *API Token*. To retrieve your token go +to Jenkins via a Webbrowser, click on your Username in the right corner, click on configure, +click on *Show API Toke...*. jenkins_jobs.ini: -- To view, visit https://gerrit.osmocom.org/6290 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie96288913aae2fe97fa11266ffa9ed098044ccfd Gerrit-PatchSet: 2 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte
[PATCH] osmo-ci[master]: jobs/README.adoc: explain the usage of API Tokens instead of...
Review at https://gerrit.osmocom.org/6290 jobs/README.adoc: explain the usage of API Tokens instead of passwords Change-Id: Ie96288913aae2fe97fa11266ffa9ed098044ccfd --- M jobs/README.adoc 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/90/6290/1 diff --git a/jobs/README.adoc b/jobs/README.adoc index 2bc8df2..d498658 100644 --- a/jobs/README.adoc +++ b/jobs/README.adoc @@ -17,6 +17,9 @@ or place one in here and pass it to jenkins-jobs using the --conf file. Make sure the file not world readable to minimally safeguard your jenkins password. +Instead of using your jenkins password, use an *API Token*. To retrieve your token go +to Jenkins via a Webbrowser, click on your Username in the right corner, click on configure, +click on *Show API Toke...*. jenkins_jobs.ini: -- To view, visit https://gerrit.osmocom.org/6290 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie96288913aae2fe97fa11266ffa9ed098044ccfd Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus
libosmocore[master]: Add macros for all ACC bit flags in the rach control IE.
Patch Set 1: Code-Review-1 I agree with max that this is not our usual coding style. As the definitions are rather regular, I would prefer a macro like GSM48_RACH_CTRL_ACC(N) or a related inline function. also, we can remove the RACH_CTRL part from it, as access control classes are a more general concept, and there's no risk conflicting any other 'access control classes' in the scope of GSM specs. -- To view, visit https://gerrit.osmocom.org/6286 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8f0a65c2980f86eb5c43f3bebe727f4d4d973163 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Stefan Sperling Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: BSSMAP_Emulation: Send proper L3 N(SD) seuence numbers in MO
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6289 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id8638673ad1a133f46893b2140970ec072022b3a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-bts[master]: Cosmetic fixes for power ramping code.
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/6287/1/src/common/tx_power.c File src/common/tx_power.c: Line 153: return (tpp->p_total_tgt_mdBm > tpp->p_total_cur_mdBm); sorry, I really prefer the more verbose version, I think it is what we do in Osmocom in other places, too. -- To view, visit https://gerrit.osmocom.org/6287 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I214bcc8b78446bfea450fe445fa9391898638905 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes
[MERGED] osmo-ttcn3-hacks[master]: BSSMAP_Emulation: Send proper L3 N(SD) seuence numbers in MO
Harald Welte has submitted this change and it was merged. Change subject: BSSMAP_Emulation: Send proper L3 N(SD) seuence numbers in MO .. BSSMAP_Emulation: Send proper L3 N(SD) seuence numbers in MO We have to make sure all mobile originated L3 messages carry proper sequence numbers Change-Id: Id8638673ad1a133f46893b2140970ec072022b3a --- M library/BSSMAP_Emulation.ttcn 1 file changed, 56 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn index 5f0409f..b1567f3 100644 --- a/library/BSSMAP_Emulation.ttcn +++ b/library/BSSMAP_Emulation.ttcn @@ -31,6 +31,7 @@ import from General_Types all; +import from Osmocom_Types all; import from SCCP_Emulation all; import from SCCPasp_Types all; import from BSSAP_Types all; @@ -113,7 +114,9 @@ /* most recent MGCP transaction ID (Used on MSC side) */ MgcpTransId mgcp_trans_id optional, /* CIC that has been used for voice of this channel (BSC side) */ - integer cic optional + integer cic optional, + /* array of N(SD) values for MO DTAP messages, indexed by discriminator */ + uint2_t n_sd[4] } type record ImsiMapping { @@ -261,6 +264,19 @@ self.stop; } +/* resolve ConnectionTable index component reference */ +private function f_idx_by_comp(BSSAP_ConnHdlr client) +runs on BSSMAP_Emulation_CT return integer { + for (var integer i := 0; i < sizeof(ConnectionTable); i := i+1) { + if (ConnectionTable[i].comp_ref == client) { + return i; + } + } + log("BSSMAP Connection table not found by component ", client); + setverdict(fail); + self.stop; +} + private function f_gen_conn_id() runs on BSSMAP_Emulation_CT return integer { var integer conn_id; @@ -279,6 +295,7 @@ ConnectionTable[i].sccp_conn_id := -1; ConnectionTable[i].mgcp_trans_id := omit; ConnectionTable[i].cic := omit; + ConnectionTable[i].n_sd := { 0, 0, 0, 0 }; } for (var integer i := 0; i < sizeof(ImsiTable); i := i+1) { ImsiTable[i].comp_ref := null; @@ -293,6 +310,7 @@ if (ConnectionTable[i].sccp_conn_id == -1) { ConnectionTable[i].comp_ref := comp_ref; ConnectionTable[i].sccp_conn_id := sccp_conn_id; + ConnectionTable[i].n_sd := { 0, 0, 0, 0 }; log("Added conn table entry ", i, comp_ref, sccp_conn_id); return; } @@ -402,6 +420,32 @@ boolean role_ms } +template BIT4 t_ML3_DISC_CC_MM_SS := ('0011'B, '0101'B, '1011'B); + +/* patch N(SD) into enc_l3, according to 24.007 11.2.3.2 */ +function f_ML3_patch_seq(inout ConnectionData cd, in PDU_ML3_MS_NW dtap, inout octetstring enc_l3) { + var uint2_t seq_nr; + if (ischosen(dtap.msgs.cc) or ischosen(dtap.msgs.mm) or ischosen(dtap.msgs.ss)) { + seq_nr := cd.n_sd[0]; + cd.n_sd[0] := (cd.n_sd[0] + 1) mod 4; + } else if (ischosen(dtap.msgs.gcc)) { + seq_nr := cd.n_sd[1]; + cd.n_sd[1] := (cd.n_sd[1] + 1) mod 2; + } else if (ischosen(dtap.msgs.bcc)) { + seq_nr := cd.n_sd[2]; + cd.n_sd[2] := (cd.n_sd[2] + 1) mod 2; + } else if (ischosen(dtap.msgs.loc)) { + seq_nr := cd.n_sd[3]; + cd.n_sd[3] := (cd.n_sd[3] + 1) mod 2; + } else { + /* no sequence number to patch */ + return; + } + log("patching N(SD)=", seq_nr, " into dtap ", enc_l3); + enc_l3[1] := (enc_l3[1] and4b '3f'O) or4b bit2oct(int2bit(seq_nr, 8) << 6); + log("patched enc_l3: ", enc_l3); +} + function main(BssmapOps ops, charstring id) runs on BSSMAP_Emulation_CT { g_bssmap_id := id; @@ -509,6 +553,13 @@ BSSAP.send(ts_BSSAP_DATA_req(conn_id, creq.bssap)); } + if (g_bssmap_ops.role_ms) { + /* we have just sent the first MM message, increment the counter */ + var integer idx := f_idx_by_comp(vc_conn); + ConnectionTable[idx].n_sd[0] := 1; + log("patch: N(SD) for ConnIdx ", idx, " set to 1"); + } + } [] CLIENT.receive(PDU_BSSAP:?) -> value bssap sender vc_conn { @@ -518,11 +569,13 @@ } [g_bssmap_ops.role_ms] CLIENT.receive(PDU_DTAP_MO:?) -> value dtap_mo sender vc_conn { - var integer conn_id := f_conn_id_by_comp(vc_conn); + var
[PATCH] osmo-ttcn3-hacks[master]: BSSMAP_Emulation: Send proper L3 N(SD) seuence numbers in MO
Review at https://gerrit.osmocom.org/6289 BSSMAP_Emulation: Send proper L3 N(SD) seuence numbers in MO We have to make sure all mobile originated L3 messages carry proper sequence numbers Change-Id: Id8638673ad1a133f46893b2140970ec072022b3a --- M library/BSSMAP_Emulation.ttcn 1 file changed, 56 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/6289/1 diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn index 5f0409f..b1567f3 100644 --- a/library/BSSMAP_Emulation.ttcn +++ b/library/BSSMAP_Emulation.ttcn @@ -31,6 +31,7 @@ import from General_Types all; +import from Osmocom_Types all; import from SCCP_Emulation all; import from SCCPasp_Types all; import from BSSAP_Types all; @@ -113,7 +114,9 @@ /* most recent MGCP transaction ID (Used on MSC side) */ MgcpTransId mgcp_trans_id optional, /* CIC that has been used for voice of this channel (BSC side) */ - integer cic optional + integer cic optional, + /* array of N(SD) values for MO DTAP messages, indexed by discriminator */ + uint2_t n_sd[4] } type record ImsiMapping { @@ -261,6 +264,19 @@ self.stop; } +/* resolve ConnectionTable index component reference */ +private function f_idx_by_comp(BSSAP_ConnHdlr client) +runs on BSSMAP_Emulation_CT return integer { + for (var integer i := 0; i < sizeof(ConnectionTable); i := i+1) { + if (ConnectionTable[i].comp_ref == client) { + return i; + } + } + log("BSSMAP Connection table not found by component ", client); + setverdict(fail); + self.stop; +} + private function f_gen_conn_id() runs on BSSMAP_Emulation_CT return integer { var integer conn_id; @@ -279,6 +295,7 @@ ConnectionTable[i].sccp_conn_id := -1; ConnectionTable[i].mgcp_trans_id := omit; ConnectionTable[i].cic := omit; + ConnectionTable[i].n_sd := { 0, 0, 0, 0 }; } for (var integer i := 0; i < sizeof(ImsiTable); i := i+1) { ImsiTable[i].comp_ref := null; @@ -293,6 +310,7 @@ if (ConnectionTable[i].sccp_conn_id == -1) { ConnectionTable[i].comp_ref := comp_ref; ConnectionTable[i].sccp_conn_id := sccp_conn_id; + ConnectionTable[i].n_sd := { 0, 0, 0, 0 }; log("Added conn table entry ", i, comp_ref, sccp_conn_id); return; } @@ -402,6 +420,32 @@ boolean role_ms } +template BIT4 t_ML3_DISC_CC_MM_SS := ('0011'B, '0101'B, '1011'B); + +/* patch N(SD) into enc_l3, according to 24.007 11.2.3.2 */ +function f_ML3_patch_seq(inout ConnectionData cd, in PDU_ML3_MS_NW dtap, inout octetstring enc_l3) { + var uint2_t seq_nr; + if (ischosen(dtap.msgs.cc) or ischosen(dtap.msgs.mm) or ischosen(dtap.msgs.ss)) { + seq_nr := cd.n_sd[0]; + cd.n_sd[0] := (cd.n_sd[0] + 1) mod 4; + } else if (ischosen(dtap.msgs.gcc)) { + seq_nr := cd.n_sd[1]; + cd.n_sd[1] := (cd.n_sd[1] + 1) mod 2; + } else if (ischosen(dtap.msgs.bcc)) { + seq_nr := cd.n_sd[2]; + cd.n_sd[2] := (cd.n_sd[2] + 1) mod 2; + } else if (ischosen(dtap.msgs.loc)) { + seq_nr := cd.n_sd[3]; + cd.n_sd[3] := (cd.n_sd[3] + 1) mod 2; + } else { + /* no sequence number to patch */ + return; + } + log("patching N(SD)=", seq_nr, " into dtap ", enc_l3); + enc_l3[1] := (enc_l3[1] and4b '3f'O) or4b bit2oct(int2bit(seq_nr, 8) << 6); + log("patched enc_l3: ", enc_l3); +} + function main(BssmapOps ops, charstring id) runs on BSSMAP_Emulation_CT { g_bssmap_id := id; @@ -509,6 +553,13 @@ BSSAP.send(ts_BSSAP_DATA_req(conn_id, creq.bssap)); } + if (g_bssmap_ops.role_ms) { + /* we have just sent the first MM message, increment the counter */ + var integer idx := f_idx_by_comp(vc_conn); + ConnectionTable[idx].n_sd[0] := 1; + log("patch: N(SD) for ConnIdx ", idx, " set to 1"); + } + } [] CLIENT.receive(PDU_BSSAP:?) -> value bssap sender vc_conn { @@ -518,11 +569,13 @@ } [g_bssmap_ops.role_ms] CLIENT.receive(PDU_DTAP_MO:?) -> value dtap_mo sender vc_conn { - var integer conn_id := f_conn_id_by_comp(vc_conn); + var integer idx := f_idx_by_comp(vc_conn); /* convert from decoded DTAP to encoded DTAP */ var octetstring l3_enc :=
osmo-trx[master]: Add support to set Rx/TxAntenna
Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/6238/2//COMMIT_MSG Commit Message: Line 7: Add support to set Rx/TxAntenna I would prefer to see at least minimalistic commit description here, i.e. what is RX/TX port? and any advantages of using this port for the project users? -- To view, visit https://gerrit.osmocom.org/6238 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1735e6ab05a05b0312d6d679b16ebd4a2260fa23 Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes
[PATCH] osmo-msc[master]: Move IMSI into test parameters
Review at https://gerrit.osmocom.org/6288 Move IMSI into test parameters This makes test routines more flexible and allows to easier re-use them for tests with different IMSIs. Change-Id: I74d46fdb7e87dc04c6b82a0b6f3ce6bef60bde58 Related: OS#2864 --- M tests/msc_vlr/msc_vlr_test_gsm_authen.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_hlr_reject.c M tests/msc_vlr/msc_vlr_test_ms_timeout.c M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_reject_concurrency.c M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h 8 files changed, 32 insertions(+), 52 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/88/6288/1 diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c index 70b7614..2bcdd3c 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c @@ -23,10 +23,9 @@ #include "msc_vlr_tests.h" -void test_gsm_authen() +void test_gsm_authen(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; comment_start(); @@ -213,10 +212,9 @@ comment_end(); } -void test_gsm_authen_tmsi() +void test_gsm_authen_tmsi(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; comment_start(); @@ -490,10 +488,9 @@ comment_end(); } -void test_gsm_authen_imei() +void test_gsm_authen_imei(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; comment_start(); @@ -586,10 +583,9 @@ comment_end(); } -void test_gsm_authen_tmsi_imei() +void test_gsm_authen_tmsi_imei(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; comment_start(); diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c index 42e620a..38f07bb 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c @@ -23,10 +23,9 @@ #include "msc_vlr_tests.h" -void test_ciph() +void test_ciph(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; comment_start(); @@ -235,10 +234,9 @@ comment_end(); } -void test_ciph_tmsi() +void test_ciph_tmsi(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; comment_start(); @@ -474,10 +472,9 @@ comment_end(); } -void test_ciph_imei() +void test_ciph_imei(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; comment_start(); @@ -576,10 +573,9 @@ comment_end(); } -void test_ciph_imeisv() +void test_ciph_imeisv(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; comment_start(); @@ -674,10 +670,9 @@ comment_end(); } -void test_ciph_tmsi_imei() +void test_ciph_tmsi_imei(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; comment_start(); diff --git a/tests/msc_vlr/msc_vlr_test_hlr_reject.c b/tests/msc_vlr/msc_vlr_test_hlr_reject.c index 6cf4afc..76cfb47 100644 --- a/tests/msc_vlr/msc_vlr_test_hlr_reject.c +++ b/tests/msc_vlr/msc_vlr_test_hlr_reject.c @@ -75,10 +75,9 @@ comment_end(); } -void test_hlr_rej_auth_info_net_fail_no_reuse_tuples() +void test_hlr_rej_auth_info_net_fail_no_reuse_tuples(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; comment_start(); @@ -162,10 +161,9 @@ comment_end(); } -void test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples() +void test_hlr_rej_auth_info_unkown_imsi_no_reuse_tuples(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; comment_start(); @@ -282,10 +280,9 @@ comment_end(); } -void test_hlr_rej_auth_info_net_fail_reuse_tuples() +void test_hlr_rej_auth_info_net_fail_reuse_tuples(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; comment_start(); diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.c b/tests/msc_vlr/msc_vlr_test_ms_timeout.c index 4cfd035..d5f4bb0 100644 --- a/tests/msc_vlr/msc_vlr_test_ms_timeout.c +++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.c @@ -182,10 +182,9 @@ comment_end(); } -void test_ms_timeout_paging() +void test_ms_timeout_paging(const char *imsi) { struct vlr_subscr *vsub; - const char *imsi = "90170004620"; rx_from_ran = RAN_GERAN_A; diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c index 32e0b40..e193f27 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.c +++ b/tests/msc_vlr/msc_vlr_test_no_authen.c @@ -23,10 +23,9 @@ #include "msc_vlr_tests.h"
osmo-bts[master]: Cosmetic fixes for power ramping code.
Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/6287 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I214bcc8b78446bfea450fe445fa9391898638905 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No
libosmocore[master]: Use python 3 for utilities
Patch Set 2: (1 comment) I am not sure if I can give a proper feedback here. Probably, @tnt has more experience and may give more detailed response. https://gerrit.osmocom.org/#/c/5657/2/debian/control File debian/control: Line 18:python3 The commit message actually says 'Use Python 3...', but here we enforce the package users to install it... -- To view, visit https://gerrit.osmocom.org/5657 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8d34aed124b00c5dd2ab1bcc84bbfa8c620282cc Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: Yes
osmocom-bb[master]: layer23/cell_log: set default logfile to /dev/null
Patch Set 1: > I'd prefer to keep some log file by default - /tmp/osmocom.log for > example. Or, at the very least, this should be explicitly described > in readme as well as in the help for corresponding command-line > option. >From my experience, in most use cases the log file is not required. Moreover, looking from an user's side it looks strange when a program writes a log when it wasn't explicitly requested to do so... Let's follow the common approach for all L2&3 applications? In other words, a program is doing sth. only when it was explicitly requested from an user. Like in case of GSMTAP. -- To view, visit https://gerrit.osmocom.org/6252 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2a9982f221871c78c5c9a73b7b7a1787ff07a86c Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim YanitskiyGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No
libosmocore[master]: Add macros for all ACC bit flags in the rach control IE.
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/6286/1/include/osmocom/gsm/protocol/gsm_04_08.h File include/osmocom/gsm/protocol/gsm_04_08.h: Line 464: #define GSM48_RACH_CTRL_ACC15_BARRED 0x80 > That's rather odd location for defines. Can we place it outside of struct d Sure, if you prefer that. I'm very much used to defining flags below the variable which contains them because it makes it obvious where those flags belong. If we move it outside I would rename them to e.g. "GSM48_RACH_CTRL_T2_ACC15_BARRED' to avoid confusion about whether this flag belongs to t2 or t3. Would you agree with that? -- To view, visit https://gerrit.osmocom.org/6286 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8f0a65c2980f86eb5c43f3bebe727f4d4d973163 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Stefan Sperling Gerrit-HasComments: Yes
[PATCH] osmo-bts[master]: Cosmetic fixes for power ramping code.
Review at https://gerrit.osmocom.org/6287 Cosmetic fixes for power ramping code. Reduce a logic expression to less lines of code: 'if (foo) return 1; else return 0;' is equivalent to just 'return (foo);' Fix typos in 2 comments. Change-Id: I214bcc8b78446bfea450fe445fa9391898638905 --- M src/common/tx_power.c 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/87/6287/1 diff --git a/src/common/tx_power.c b/src/common/tx_power.c index 3dfe1f7..595257d 100644 --- a/src/common/tx_power.c +++ b/src/common/tx_power.c @@ -150,10 +150,7 @@ { struct trx_power_params *tpp = >power_params; - if (tpp->p_total_tgt_mdBm > tpp->p_total_cur_mdBm) - return 1; - else - return 0; + return (tpp->p_total_tgt_mdBm > tpp->p_total_cur_mdBm); } static void power_ramp_do_step(struct gsm_bts_trx *trx, int first); @@ -275,7 +272,7 @@ /* Set attenuation to cause no power change right now */ tpp->ramp.attenuation_mdB = tpp->p_total_tgt_mdBm - tpp->p_total_cur_mdBm; - /* start with the firsrt step */ + /* start with the first step */ power_ramp_do_step(trx, 1); } } else { @@ -283,7 +280,7 @@ * steps until it reaches 0 */ tpp->ramp.attenuation_mdB = tpp->p_total_tgt_mdBm - tpp->p_total_cur_mdBm; - /* start with the firsrt step */ + /* start with the first step */ power_ramp_do_step(trx, 1); } -- To view, visit https://gerrit.osmocom.org/6287 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I214bcc8b78446bfea450fe445fa9391898638905 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Stefan Sperling
libosmocore[master]: Add macros for all ACC bit flags in the rach control IE.
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/6286/1/include/osmocom/gsm/protocol/gsm_04_08.h File include/osmocom/gsm/protocol/gsm_04_08.h: Line 464: #define GSM48_RACH_CTRL_ACC15_BARRED 0x80 That's rather odd location for defines. Can we place it outside of struct definition? -- To view, visit https://gerrit.osmocom.org/6286 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8f0a65c2980f86eb5c43f3bebe727f4d4d973163 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes
osmo-bts[master]: Name systemd service after the software
Patch Set 2: I think it was superseded by other merged patches. Pau? -- To view, visit https://gerrit.osmocom.org/2225 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie336292c275e7415a1deedab7c3b44966aacc3bf Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[PATCH] libosmocore[master]: Add macros for all ACC bit flags in the rach control IE.
Review at https://gerrit.osmocom.org/6286 Add macros for all ACC bit flags in the rach control IE. Add macros which document the purpose of each bit in the rach_control.t2 and rach_control.t3 octets. These macros might also be useful for later work on BTS cell ramping. This change keeps the existing struct definition intact (t2 and t3 both remain uint8_t) which means it doesn't affect existing users of this API. There is at least one line of code, in osmo-bsc's gsm_bts_alloc_register(), which could already make use of these macros to avoid a magic number: bts->si_common.rach_control.t2 = 4; /* no emergency calls */ Change-Id: I8f0a65c2980f86eb5c43f3bebe727f4d4d973163 Related: OS#2591 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/6286/1 diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index c785d9f..ede424c 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -461,7 +461,23 @@ tx_integer :4, max_trans :2; uint8_t t2; +#define GSM48_RACH_CTRL_ACC15_BARRED 0x80 +#define GSM48_RACH_CTRL_ACC14_BARRED 0x40 +#define GSM48_RACH_CTRL_ACC13_BARRED 0x20 +#define GSM48_RACH_CTRL_ACC12_BARRED 0x10 +#define GSM48_RACH_CTRL_ACC11_BARRED 0x08 +#define GSM48_RACH_CTRL_EMERGENCY_CALLS_BARRED 0x04 /* applies to ACCs below this line only */ +#define GSM48_RACH_CTRL_ACC9_BARRED0x02 +#define GSM48_RACH_CTRL_ACC8_BARRED0x01 uint8_t t3; +#define GSM48_RACH_CTRL_ACC7_BARRED0x80 +#define GSM48_RACH_CTRL_ACC6_BARRED0x40 +#define GSM48_RACH_CTRL_ACC5_BARRED0x20 +#define GSM48_RACH_CTRL_ACC4_BARRED0x10 +#define GSM48_RACH_CTRL_ACC3_BARRED0x08 +#define GSM48_RACH_CTRL_ACC2_BARRED0x04 +#define GSM48_RACH_CTRL_ACC1_BARRED0x02 +#define GSM48_RACH_CTRL_ACC0_BARRED0x01 } __attribute__ ((packed)); -- To view, visit https://gerrit.osmocom.org/6286 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f0a65c2980f86eb5c43f3bebe727f4d4d973163 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan Sperling
[PATCH] osmo-ttcn3-hacks[master]: MSC: ignore symlinks and build byproducts
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6285 to look at the new patch set (#2). MSC: ignore symlinks and build byproducts Change-Id: Ia200e7e8e891256f0ffe43910061697769841f91 --- A msc/.gitignore 1 file changed, 69 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/85/6285/2 diff --git a/msc/.gitignore b/msc/.gitignore new file mode 100644 index 000..6866bf4 --- /dev/null +++ b/msc/.gitignore @@ -0,0 +1,69 @@ +BSC_ConnectionHandler +BSSAP_Adapter.ttcn +BSSAP_CodecPort.ttcn +BSSAP_Types.ttcn +BSSMAP_Emulation.ttcn +BSSMAP_Templates.ttcn +GSM_Types.ttcn +GSUP_Emulation.ttcn +GSUP_Types.ttcn +General_Types.ttcn +IPA_CodecPort.ttcn +IPA_CodecPort_CtrlFunct.ttcn +IPA_Emulation.ttcn +IPA_Types.ttcn +IPL4asp_Functions.ttcn +IPL4asp_PortType.ttcn +IPL4asp_Types.ttcn +L3_Templates.ttcn +M3UA_Emulation.ttcn +M3UA_Types.ttcn +MGCP_CodecPort.ttcn +MGCP_CodecPort_CtrlFunct.ttcn +MGCP_Emulation.ttcn +MGCP_Templates.ttcn +MGCP_Types.ttcn +MNCC_CodecPort.ttcn +MNCC_Emulation.ttcn +MNCC_Types.ttcn +MSC_Tests +MTP3asp_PortType.ttcn +MTP3asp_Types.ttcn +Makefile +MobileL3_CC_Types.ttcn +MobileL3_CommonIE_Types.ttcn +MobileL3_GMM_SM_Types.ttcn +MobileL3_MM_Types.ttcn +MobileL3_RRM_Types.ttcn +MobileL3_SMS_Types.ttcn +MobileL3_SS_Types.ttcn +MobileL3_Types.ttcn +Native_Functions.ttcn +Osmocom_CTRL_Adapter.ttcn +Osmocom_CTRL_Functions.ttcn +Osmocom_CTRL_Types.ttcn +Osmocom_Types.ttcn +Osmocom_VTY_Functions.ttcn +RSL_Types.ttcn +RTP_CodecPort.ttcn +RTP_Types.ttcn +SCCP_Emulation.ttcn +SCCP_Mapping.ttcn +SCCP_Mapping.ttcnpp +SCCP_Types.ttcn +SCCPasp_Types.ttcn +SCTPasp_PortType.ttcn +SCTPasp_Types.ttcn +SDP_Types.ttcn +Socket_API_Definitions.ttcn +TCCConversion_Functions.ttcn +TCCInterface_Functions.ttcn +TELNETasp_PortType.ttcn +UD_PortType.ttcn +UD_Types.ttcn +*.cc +*.hh +*.c +*.h +*.y +*.l -- To view, visit https://gerrit.osmocom.org/6285 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia200e7e8e891256f0ffe43910061697769841f91 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter
osmo-ttcn3-hacks[master]: MSC: ignore symlinks and build byproducts
Patch Set 1: gitignore claims to support negation of previously-excluded files, so something like *.cc *.hh !MNCC_EncDec.cc should work. This would allow us to list those few .cc files that are not generated, rather than listing each and every cc or hh file that is generated. -- To view, visit https://gerrit.osmocom.org/6285 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia200e7e8e891256f0ffe43910061697769841f91 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No
[PATCH] osmo-ttcn3-hacks[master]: MSC: ignore symlinks and build byproducts
Review at https://gerrit.osmocom.org/6285 MSC: ignore symlinks and build byproducts Change-Id: Ia200e7e8e891256f0ffe43910061697769841f91 --- A msc/.gitignore 1 file changed, 214 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/85/6285/1 diff --git a/msc/.gitignore b/msc/.gitignore new file mode 100644 index 000..56567d2 --- /dev/null +++ b/msc/.gitignore @@ -0,0 +1,214 @@ +BSC_ConnectionHandler +BSC_ConnectionHandler.cc +BSC_ConnectionHandler.hh +BSSAP_Adapter.cc +BSSAP_Adapter.hh +BSSAP_Adapter.ttcn +BSSAP_CodecPort.cc +BSSAP_CodecPort.hh +BSSAP_CodecPort.ttcn +BSSAP_Types.cc +BSSAP_Types.hh +BSSAP_Types.ttcn +BSSMAP_Emulation.cc +BSSMAP_Emulation.hh +BSSMAP_Emulation.ttcn +BSSMAP_Templates.cc +BSSMAP_Templates.hh +BSSMAP_Templates.ttcn +GSM_Types.cc +GSM_Types.hh +GSM_Types.ttcn +GSUP_Emulation.cc +GSUP_Emulation.hh +GSUP_Emulation.ttcn +GSUP_Types.cc +GSUP_Types.hh +GSUP_Types.ttcn +General_Types.cc +General_Types.hh +General_Types.ttcn +IPA_CodecPort.cc +IPA_CodecPort.hh +IPA_CodecPort.ttcn +IPA_CodecPort_CtrlFunct.cc +IPA_CodecPort_CtrlFunct.hh +IPA_CodecPort_CtrlFunct.ttcn +IPA_CodecPort_CtrlFunctDef.cc +IPA_Emulation.cc +IPA_Emulation.hh +IPA_Emulation.ttcn +IPA_Types.cc +IPA_Types.hh +IPA_Types.ttcn +IPL4asp_Functions.cc +IPL4asp_Functions.hh +IPL4asp_Functions.ttcn +IPL4asp_PT.cc +IPL4asp_PT.hh +IPL4asp_PortType.cc +IPL4asp_PortType.hh +IPL4asp_PortType.ttcn +IPL4asp_Types.cc +IPL4asp_Types.hh +IPL4asp_Types.ttcn +IPL4asp_discovery.cc +IPL4asp_protocol_L234.hh +L3_Templates.cc +L3_Templates.hh +L3_Templates.ttcn +M3UA_Emulation.cc +M3UA_Emulation.hh +M3UA_Emulation.ttcn +M3UA_Types.cc +M3UA_Types.hh +M3UA_Types.ttcn +MGCP_CodecPort.cc +MGCP_CodecPort.hh +MGCP_CodecPort.ttcn +MGCP_CodecPort_CtrlFunct.cc +MGCP_CodecPort_CtrlFunct.hh +MGCP_CodecPort_CtrlFunct.ttcn +MGCP_CodecPort_CtrlFunctDef.cc +MGCP_Emulation.cc +MGCP_Emulation.hh +MGCP_Emulation.ttcn +MGCP_Templates.cc +MGCP_Templates.hh +MGCP_Templates.ttcn +MGCP_Types.cc +MGCP_Types.hh +MGCP_Types.ttcn +MNCC_CodecPort.cc +MNCC_CodecPort.hh +MNCC_CodecPort.ttcn +MNCC_Emulation.cc +MNCC_Emulation.hh +MNCC_Emulation.ttcn +MNCC_EncDec.cc +MNCC_Types.cc +MNCC_Types.hh +MNCC_Types.ttcn +MSC_Tests +MSC_Tests.cc +MSC_Tests.hh +MTP3asp_PortType.cc +MTP3asp_PortType.hh +MTP3asp_PortType.ttcn +MTP3asp_Types.cc +MTP3asp_Types.hh +MTP3asp_Types.ttcn +Makefile +MobileL3_CC_Types.cc +MobileL3_CC_Types.hh +MobileL3_CC_Types.ttcn +MobileL3_CommonIE_Types.cc +MobileL3_CommonIE_Types.hh +MobileL3_CommonIE_Types.ttcn +MobileL3_GMM_SM_Types.cc +MobileL3_GMM_SM_Types.hh +MobileL3_GMM_SM_Types.ttcn +MobileL3_MM_Types.cc +MobileL3_MM_Types.hh +MobileL3_MM_Types.ttcn +MobileL3_RRM_Types.cc +MobileL3_RRM_Types.hh +MobileL3_RRM_Types.ttcn +MobileL3_SMS_Types.cc +MobileL3_SMS_Types.hh +MobileL3_SMS_Types.ttcn +MobileL3_SS_Types.cc +MobileL3_SS_Types.hh +MobileL3_SS_Types.ttcn +MobileL3_Types.cc +MobileL3_Types.hh +MobileL3_Types.ttcn +Native_FunctionDefs.cc +Native_Functions.cc +Native_Functions.hh +Native_Functions.ttcn +Osmocom_CTRL_Adapter.cc +Osmocom_CTRL_Adapter.hh +Osmocom_CTRL_Adapter.ttcn +Osmocom_CTRL_Functions.cc +Osmocom_CTRL_Functions.hh +Osmocom_CTRL_Functions.ttcn +Osmocom_CTRL_Types.cc +Osmocom_CTRL_Types.hh +Osmocom_CTRL_Types.ttcn +Osmocom_Types.cc +Osmocom_Types.hh +Osmocom_Types.ttcn +Osmocom_VTY_Functions.cc +Osmocom_VTY_Functions.hh +Osmocom_VTY_Functions.ttcn +RSL_Types.cc +RSL_Types.hh +RSL_Types.ttcn +RTP_CodecPort.cc +RTP_CodecPort.hh +RTP_CodecPort.ttcn +RTP_CodecPort_CtrlFunctDef.cc +RTP_EncDec.cc +RTP_Types.cc +RTP_Types.hh +RTP_Types.ttcn +SCCP_Emulation.cc +SCCP_Emulation.hh +SCCP_Emulation.ttcn +SCCP_EncDec.cc +SCCP_Mapping.cc +SCCP_Mapping.hh +SCCP_Mapping.ttcn +SCCP_Mapping.ttcnpp +SCCP_Types.cc +SCCP_Types.hh +SCCP_Types.ttcn +SCCPasp_Types.cc +SCCPasp_Types.hh +SCCPasp_Types.ttcn +SCTPasp_PT.cc +SCTPasp_PT.hh +SCTPasp_PortType.cc +SCTPasp_PortType.hh +SCTPasp_PortType.ttcn +SCTPasp_Types.cc +SCTPasp_Types.hh +SCTPasp_Types.ttcn +SDP_EncDec.cc +SDP_Types.cc +SDP_Types.hh +SDP_Types.ttcn +SDP_parse_.tab.c +SDP_parse_.tab.h +SDP_parse_parser.h +SDP_parser.l +SDP_parser.y +Socket_API_Definitions.cc +Socket_API_Definitions.hh +Socket_API_Definitions.ttcn +TCCConversion.cc +TCCConversion.hh +TCCConversion_Functions.cc +TCCConversion_Functions.hh +TCCConversion_Functions.ttcn +TCCInterface.cc +TCCInterface_Functions.cc +TCCInterface_Functions.hh +TCCInterface_Functions.ttcn +TCCInterface_ip.h +TELNETasp_PT.cc +TELNETasp_PT.hh +TELNETasp_PortType.cc +TELNETasp_PortType.hh +TELNETasp_PortType.ttcn +UD_PT.cc +UD_PT.hh +UD_PortType.cc +UD_PortType.hh +UD_PortType.ttcn +UD_Types.cc +UD_Types.hh +UD_Types.ttcn +lex.SDP_parse_.c +mncc.h -- To view, visit https://gerrit.osmocom.org/6285 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia200e7e8e891256f0ffe43910061697769841f91 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks
gapk[master]: src/Makefile.am: fix osmo-gapk LDADD dependency
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6253 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3fdd1731bd372bbb42fe57981e757386e8ede0f0 Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Owner: Vadim YanitskiyGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No
osmo-mgw[master]: protocol: prohibit wildcarded requests for MDCX and DLCX
Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6260 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia77d44a6a86083e62338e5845b553e5cf13ebd10 Gerrit-PatchSet: 4 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No
[MERGED] gapk[master]: src/Makefile.am: fix osmo-gapk LDADD dependency
Harald Welte has submitted this change and it was merged. Change subject: src/Makefile.am: fix osmo-gapk LDADD dependency .. src/Makefile.am: fix osmo-gapk LDADD dependency This change fixes parallel building problem, when osmo-gapk was being compiled before its libosmogapk dependency: make[2]: *** No rule to make target '../src/libosmogapk.la', needed by 'osmo-gapk'. Stop. make[2]: *** Waiting for unfinished jobs For some reason, automake ignores a dependency if the full path is provided: $(top_builddir)/src/libosmogapk.la while the relative path solves the problem: libosmogapk.la Closes: OS#2907 Change-Id: I3fdd1731bd372bbb42fe57981e757386e8ede0f0 --- M src/Makefile.am 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Vadim Yanitskiy: Verified Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/src/Makefile.am b/src/Makefile.am index 8efd165..50ffda4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -93,5 +93,5 @@ $(NULL) osmo_gapk_LDADD = \ - $(top_builddir)/src/libosmogapk.la \ + libosmogapk.la \ $(NULL) -- To view, visit https://gerrit.osmocom.org/6253 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3fdd1731bd372bbb42fe57981e757386e8ede0f0 Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Owner: Vadim YanitskiyGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy
[MERGED] osmo-mgw[master]: protocol: prohibit wildcarded requests for MDCX and DLCX
Harald Welte has submitted this change and it was merged. Change subject: protocol: prohibit wildcarded requests for MDCX and DLCX .. protocol: prohibit wildcarded requests for MDCX and DLCX When a wildcarded request is made with a DLCX or MDCX command the MGW will search for a free endpoint and continues the command execution with that endpoint. - Catch the wildcarded request early on DLCX and MDCX and return with an error code. See also TTCN3 testcases: MGCP_Test.TC_mdcx_wildcarded MGCP_Test.TC_dlcx_wildcarded Change-Id: Ia77d44a6a86083e62338e5845b553e5cf13ebd10 --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 62487d1..ea86672 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -739,6 +739,14 @@ LOGP(DLMGCP, LOGL_NOTICE, "MDCX: modifying existing connection ...\n"); + /* Prohibit wildcarded requests */ + if (endp->wildcarded_req) { + LOGP(DLMGCP, LOGL_ERROR, +"MDCX: endpoint:0x%x wildcarded endpoint names not supported.\n", +ENDPOINT_NUMBER(endp)); + return create_err_response(endp, 507, "MDCX", p->trans); + } + if (llist_count(>conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, "MDCX: endpoint:0x%x endpoint is not holding a connection.\n", @@ -912,6 +920,14 @@ "DLCX: endpoint:0x%x deleting connection ...\n", ENDPOINT_NUMBER(endp)); + /* Prohibit wildcarded requests */ + if (endp->wildcarded_req) { + LOGP(DLMGCP, LOGL_ERROR, +"DLCX: endpoint:0x%x wildcarded endpoint names not supported.\n", +ENDPOINT_NUMBER(endp)); + return create_err_response(endp, 507, "DLCX", p->trans); + } + if (llist_count(>conns) <= 0) { LOGP(DLMGCP, LOGL_ERROR, "DLCX: endpoint:0x%x endpoint is not holding a connection.\n", -- To view, visit https://gerrit.osmocom.org/6260 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia77d44a6a86083e62338e5845b553e5cf13ebd10 Gerrit-PatchSet: 5 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter
[MERGED] osmo-mgw[master]: mgcp: fix use-after-free and add callback for endpoint cleanup
Harald Welte has submitted this change and it was merged. Change subject: mgcp: fix use-after-free and add callback for endpoint cleanup .. mgcp: fix use-after-free and add callback for endpoint cleanup Since we will support multiple different types of endpoints in the future, all these endpoints will handle connections slightly different and there will be possibly state that needs to be kept consistant when a connection is deleted. In mgcp_network.c where we implement the callback that is used to create an rtp-bride-endpoint. In that callback we cache the pointer of the connection we where we want to bride to (opposite connection). When one of the connections is deleted using a DLCX operation, the pointer is still there and the next incoming packet causes a use- after-free segfault. - introduce an endpoint specific callback function that is executed before removing the connection. - implement the endpoint specific callback for rtp bridge endpoints, so that the use-after-free is prevented. Change-Id: I921d9bbe58be1c3298e164a37f3c974880b3759f --- M include/osmocom/mgcp/mgcp_endp.h M include/osmocom/mgcp/mgcp_internal.h M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_endp.c M src/libosmo-mgcp/mgcp_network.c 5 files changed, 38 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/mgcp/mgcp_endp.h b/include/osmocom/mgcp/mgcp_endp.h index 0225879..a486dcd 100644 --- a/include/osmocom/mgcp/mgcp_endp.h +++ b/include/osmocom/mgcp/mgcp_endp.h @@ -33,6 +33,13 @@ char *buf, unsigned int buf_size, struct mgcp_conn *conn); +/* Callback type for endpoint specific cleanup actions. This function + * is automatically executed when a connection is freed (see mgcp_conn_free() + * in mgcp_conn.c). Depending on the type of the endpoint there may be endpoint + * specific things to take care of once a connection has been removed. */ +typedef void (*mgcp_cleanup_cp) (struct mgcp_endpoint *endp, +struct mgcp_conn *conn); + /*! MGCP endpoint properties */ struct mgcp_endpoint_type { /*!< maximum number of connections */ @@ -40,6 +47,9 @@ /*!< callback that defines how to dispatch incoming RTP data */ mgcp_dispatch_rtp_cb dispatch_rtp_cb; + + /*!< callback that implements endpoint specific cleanup actions */ + mgcp_cleanup_cp cleanup_cb; }; /*! MGCP endpoint typeset */ diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 9c57e3f..e4009e8 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -265,6 +265,7 @@ int mgcp_send_dummy(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn); int mgcp_dispatch_rtp_bridge_cb(int proto, struct sockaddr_in *addr, char *buf, unsigned int buf_size, struct mgcp_conn *conn); +void mgcp_cleanup_rtp_bridge_cb(struct mgcp_endpoint *endp, struct mgcp_conn *conn); int mgcp_bind_net_rtp_port(struct mgcp_endpoint *endp, int rtp_port, struct mgcp_conn_rtp *conn); void mgcp_free_rtp_port(struct mgcp_rtp_end *end); diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index cc115a9..62cbdba 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -201,6 +201,12 @@ if (!conn) return; + /* Run endpoint cleanup action. By this we inform the endpoint about +* the removal of the connection and allow it to clean up its inner +* state accordingly */ + if (endp->type->cleanup_cb) + endp->type->cleanup_cb(endp, conn); + switch (conn->type) { case MGCP_CONN_TYPE_RTP: osmux_disable_conn(>u.rtp); diff --git a/src/libosmo-mgcp/mgcp_endp.c b/src/libosmo-mgcp/mgcp_endp.c index 6d3a6d4..fa2dd28 100644 --- a/src/libosmo-mgcp/mgcp_endp.c +++ b/src/libosmo-mgcp/mgcp_endp.c @@ -28,7 +28,8 @@ const struct mgcp_endpoint_typeset ep_typeset = { /* Specify endpoint properties for RTP endpoint */ .rtp.max_conns = 2, - .rtp.dispatch_rtp_cb = mgcp_dispatch_rtp_bridge_cb + .rtp.dispatch_rtp_cb = mgcp_dispatch_rtp_bridge_cb, + .rtp.cleanup_cb = mgcp_cleanup_rtp_bridge_cb }; /*! release endpoint, all open connections are closed. diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index ef6357b..6923b97 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1043,6 +1043,25 @@ } +/*! cleanup an endpoint when a connection on an RTP bridge endpoint is removed. + * \param[in] endp Endpoint on which the connection resides. + * \param[in] conn Connection that is about to be removed (ignored). + * \returns 0 on success, -1 on ERROR.
[MERGED] osmo-bts[master]: vty: don't print "Bound IP / Port" if it isn't bound [yet]
Harald Welte has submitted this change and it was merged. Change subject: vty: don't print "Bound IP / Port" if it isn't bound [yet] .. vty: don't print "Bound IP / Port" if it isn't bound [yet] Change-Id: I28705b56582d334d568d98a371daa6bb9ef1f625 --- M src/common/vty.c 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/vty.c b/src/common/vty.c index 77fc4d9..06330b4 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -1055,11 +1055,13 @@ get_value_string(gsm48_cmode_names, lchan->tch_mode), VTY_NEWLINE); - ia.s_addr = htonl(lchan->abis_ip.bound_ip); - vty_out(vty, " Bound IP: %s Port %u RTP_TYPE2=%u CONN_ID=%u%s", - inet_ntoa(ia), lchan->abis_ip.bound_port, - lchan->abis_ip.rtp_payload2, lchan->abis_ip.conn_id, - VTY_NEWLINE); + if (lchan->abis_ip.bound_ip) { + ia.s_addr = htonl(lchan->abis_ip.bound_ip); + vty_out(vty, " Bound IP: %s Port %u RTP_TYPE2=%u CONN_ID=%u%s", + inet_ntoa(ia), lchan->abis_ip.bound_port, + lchan->abis_ip.rtp_payload2, lchan->abis_ip.conn_id, + VTY_NEWLINE); + } if (lchan->abis_ip.connect_ip) { ia.s_addr = htonl(lchan->abis_ip.connect_ip); vty_out(vty, " Conn. IP: %s Port %u RTP_TYPE=%u SPEECH_MODE=0x%02u%s", -- To view, visit https://gerrit.osmocom.org/6282 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28705b56582d334d568d98a371daa6bb9ef1f625 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
libosmocore[master]: vty: fix 'logging print file' output
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6284 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1c931bff1f1723aa82bead9dfe548e4cc5b685e0 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmocom-bb[master]: Import gprsdecode utility from SRLabs
Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/5992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12234d37c66b83b8abd60f7511fa1d7837db1856 Gerrit-PatchSet: 7 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-HasComments: No
osmo-msc[master]: WIP: VTY: Add 'show connections' and 'show transactions' com...
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/6050/1/src/libmsc/vty_interface_layer3.c File src/libmsc/vty_interface_layer3.c: Line 120: default: > We have no state in the gsm_trans struct, so what should I print here? Ok, got it. Anyway, it would be great to have an opportunity to see currently active SS-/USSD-connections, taking into account their session-based nature. Probably, this idea and required changes should be described in a separate ticket. -- To view, visit https://gerrit.osmocom.org/6050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1c457c1eac20188f67b8379a36cfda3a085fcef4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Harald WelteGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes