Change in ...osmo-bts[master]: vty: adjust config name for unit-id
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/14359 to look at the new patch set (#2). Change subject: vty: adjust config name for unit-id .. vty: adjust config name for unit-id Having different names for the same config setting is misleading, so let's stick to the one used by osmo-bsc. Change-Id: Ief6f23cc891a528d4295f7b0b85ff49bce299e8b --- M src/common/vty.c 1 file changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/59/14359/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/14359 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ief6f23cc891a528d4295f7b0b85ff49bce299e8b Gerrit-Change-Number: 14359 Gerrit-PatchSet: 2 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-MessageType: newpatchset
Change in ...osmo-bts[master]: vty: adjust config name for unit-id
Eric Wild has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/14359 Change subject: vty: adjust config name for unit-id .. vty: adjust config name for unit-id Having different names for the same config setting is misleading, so let's stick to the one used by osmo-bsc. Change-Id: Ief6f23cc891a528d4295f7b0b85ff49bce299e8b --- M src/common/vty.c 1 file changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/59/14359/1 diff --git a/src/common/vty.c b/src/common/vty.c index 1d25bfb..da32c54 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -269,7 +269,7 @@ vty_out(vty, " band %s%s", gsm_band_name(bts->band), VTY_NEWLINE); if (bts->auto_band) vty_out(vty, " auto-band%s", VTY_NEWLINE); - vty_out(vty, " ipa unit-id %u %u%s", + vty_out(vty, " ip.access unit_id %u %u%s", bts->ip_access.site_id, bts->ip_access.bts_id, VTY_NEWLINE); vty_out(vty, " oml remote-ip %s%s", bts->bsc_oml_host, VTY_NEWLINE); vty_out(vty, " rtp jitter-buffer %u", bts->rtp_jitter_buf_ms); @@ -422,7 +422,7 @@ DEFUN(cfg_bts_unit_id, cfg_bts_unit_id_cmd, - "ipa unit-id <0-65534> <0-255>", + "ip.access unit_id <0-65534> <0-255>", "ip.access RSL commands\n" "Set the Unit ID of this BTS\n" "Site ID\n" "Unit ID\n") @@ -437,6 +437,13 @@ return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_bts_unit_id, + cfg_bts_deprecated_unit_id_cmd, + "ipa unit-id <0-65534> <0-255>", + "ip.access RSL commands\n" + "Set the Unit ID of this BTS\n" + "Site ID\n" "Unit ID\n"); + DEFUN(cfg_bts_band, cfg_bts_band_cmd, "band (450|GSM450|480|GSM480|750|GSM750|810|GSM810|850|GSM850|900|GSM900|1800|DCS1800|1900|PCS1900)", @@ -1628,6 +1635,7 @@ install_element(CONFIG_NODE, _bts_cmd); install_element(CONFIG_NODE, _vty_telnet_port_cmd); install_element(BTS_NODE, _bts_unit_id_cmd); + install_element(BTS_NODE, _bts_deprecated_unit_id_cmd); install_element(BTS_NODE, _bts_oml_ip_cmd); install_element(BTS_NODE, _bts_rtp_bind_ip_cmd); install_element(BTS_NODE, _bts_rtp_jitbuf_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/14359 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ief6f23cc891a528d4295f7b0b85ff49bce299e8b Gerrit-Change-Number: 14359 Gerrit-PatchSet: 1 Gerrit-Owner: Eric Wild Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14224 to look at the new patch set (#2). Change subject: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE .. Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE This test will currently fail due to a MODE MODIFY NACK, even though the channel mode is not modified. Related: OS##3750 Change-Id: I4cbea499bb6a331d314e6573548a4540945208b5 --- M bts/BTS_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 89 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/24/14224/2 -- To view, visit https://gerrit.osmocom.org/14224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4cbea499bb6a331d314e6573548a4540945208b5 Gerrit-Change-Number: 14224 Gerrit-PatchSet: 2 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Jenkins Builder (102) Gerrit-CC: Harald Welte
Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL channel activation with stati...
Eric Wild has posted comments on this change. ( https://gerrit.osmocom.org/14221 ) Change subject: Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power .. Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn File bts/BTS_Tests.ttcn: https://gerrit.osmocom.org/#/c/14221/1/bts/BTS_Tests.ttcn@2013 PS1, Line 2013: l1_dl.payload.data_ind.payload[0] > Not a merge blocker though. I am currently working on this. I'v pretty much just copied what other tests do, I guess in this particular case there is no real need to match a single byte in a two byte message. -- To view, visit https://gerrit.osmocom.org/14221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Gerrit-Change-Number: 14221 Gerrit-PatchSet: 2 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Eric Wild Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Comment-Date: Tue, 28 May 2019 16:36:20 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL channel activation with stati...
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/14221 to look at the new patch set (#2). Change subject: Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power .. Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Related: OS##3750 --- M bts/BTS_Tests.ttcn 1 file changed, 43 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/14221/2 -- To view, visit https://gerrit.osmocom.org/14221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Gerrit-Change-Number: 14221 Gerrit-PatchSet: 2 Gerrit-Owner: Eric Wild Gerrit-Reviewer: Jenkins Builder (102) Gerrit-CC: Vadim Yanitskiy
Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE
Eric Wild has uploaded this change for review. ( https://gerrit.osmocom.org/14224 Change subject: Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE .. Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE This test will currently fail due to a MODE MODIFY NACK, even though the channel mode is not modified. Related: OS##3750 Change-Id: I4cbea499bb6a331d314e6573548a4540945208b5 --- M bts/BTS_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 89 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/24/14224/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 968ed6c..429c784 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -4834,6 +4834,71 @@ f_testmatrix_each_chan(pars, refers(f_TC_chan_act_encr)); } +/* Test channel activation with A5/n right from the beginning and RSL MODE MODIFY + which should break the en/decryption on purpose by supplying a new key that is unknown to the MS*/ +function f_TC_rsl_modify_encr(charstring id) runs on ConnHdlr { + f_l1_tune(L1CTL); + f_est_dchan(true); + + /* now we actually need to transmit some data both ways to check if the encryption works */ + var L1ctlDlMessage dl; + + var octetstring l3 := f_rnd_octstring(20); + var RslLinkId link_id := valueof(ts_RslLinkID_DCCH(0)); + + /* send UNITDATA_REQ from BTS to MS and expect it to arrive */ + f_unitdata_mt(link_id, l3); + + /* Send UI frame from MS and expect it to arrive as RLL UNITDATA IND on Abis */ + f_unitdata_mo(link_id, l3); + + var RSL_Message rsl; + rsl := valueof(ts_RSL_MODE_MODIFY_REQ(g_chan_nr, valueof(ts_RSL_ChanMode_SIGN(false; + + /* modify key to break proper encryption */ + g_pars.encr.key := f_rnd_octstring(8); + var RSL_IE ei := valueof(t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := g_pars.encr})); + rsl.ies := rsl.ies & { ei }; + RSL.send(rsl); + + timer T0 := 1.0; + T0.start; + /* Expect RSL MODIFY ACK */ + alt { + [] RSL.receive(tr_RSL_MODE_MODIFY_ACK(g_chan_nr)) {} + [] RSL.receive(tr_RSL_MODE_MODIFY_NACK(g_chan_nr, ?)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,"MODE MODIFY NACK"); + } + [] T0.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "MODE MODIFY NACK"); + } + } + + var octetstring l3msg := f_rnd_octstring(15); + timer T1 := 3.0; + /* Send UI frame from MS, do not expect it to arrive as RLL UNITDATA IND on Abis + due to broken encryption */ + f_tx_lapdm(ts_LAPDm_UI(link_id.sapi, cr_MO_CMD, l3msg), link_id); + T1.start; + alt { + [] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, link_id, l3msg)) { + setverdict(fail); + } + [] T1.timeout { + setverdict(pass); + } + } + + /* release the channel */ + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + f_rslem_unregister(0, g_chan_nr); +} +testcase TC_rsl_modify_encr() runs on test_CT { + var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); + pars.encr := valueof(ts_RSL_IE_EncrInfo(RSL_ALG_ID_A5_1, f_rnd_octstring(8))); + f_testmatrix_each_chan(pars, refers(f_TC_rsl_modify_encr)); +} /* Test unencrypted channel activation followed by explicit ENCR CMD later */ function f_TC_encr_cmd(charstring id) runs on ConnHdlr { @@ -5201,6 +5266,7 @@ execute( TC_meas_res_sign_tchh_toa256() ); execute( TC_rsl_ms_pwr_ctrl() ); execute( TC_rsl_chan_initial_ta() ); + execute( TC_rsl_modify_encr() ); execute( TC_conn_fail_crit() ); execute( TC_paging_imsi_80percent() ); execute( TC_paging_tmsi_80percent() ); diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 4d23c3f..ef3f45b 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -1353,7 +1353,29 @@ } } - + /* 8.4.9 BSC -> BTS */ + template (value) RSL_Message ts_RSL_MODE_MODIFY_REQ(template (value) RslChannelNr chan_nr, +template (value) RSL_IE_ChannelMode mode) := { + msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), + msg_type := RSL_MT_MODE_MODIFY_REQ, + ies :={ + t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), + t_RSL_IE(RSL_IE_CHAN_MODE, RSL_IE_Body:{chan_mode := mode}) + /* lots of optional IEs */ + } + } + template RSL_Message tr_RSL_MODE_MODIFY_REQ(template RslChannelNr chan_nr, +templ
Change in osmo-ttcn3-hacks[master]: Extend BTS_Tests.ttcn with test for RSL channel activation with stati...
Eric Wild has uploaded this change for review. ( https://gerrit.osmocom.org/14221 Change subject: Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power .. Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Related: OS##3750 --- M bts/BTS_Tests.ttcn 1 file changed, 42 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/14221/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 1c20657..76a2e68 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1989,6 +1989,47 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* establish DChan, verify that the BTS sets MS power in the first SACCH L1 header. */ +function f_tc_rsl_chan_initial_ms_pwr(charstring id) runs on ConnHdlr { + var L1ctlDlMessage l1_dl; + var uint5_t ms_power_level := 7; + + var RSL_IE_MS_Power ms_power; + ms_power.reserved := 0; + ms_power.fpc_epc := false; + ms_power.power_level := ms_power_level; + + f_l1_tune(L1CTL); + RSL.clear; + + f_est_dchan(more_ies :={valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ms_power}))} ); + + timer T := 1.0; + T.start; + alt { + /* Pick all SACCH blocks for checking */ + [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl { + /* The first byte of the L1 header contains the power level.. */ + if (not (l1_dl.payload.data_ind.payload[0] == int2oct(ms_power_level, 1))) { + setverdict(fail, "Power Level in L1 header does not match the signaled (RSL) MS Power Level."); + } + } + /* Ignore all other blocks */ + [] L1CTL.receive { repeat; } + [] T.timeout { + setverdict(fail, "Power Level in L1 header does not match the signaled (RSL) MS Power Level."); + } + } + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); +} + +testcase TC_rsl_chan_initial_ms_pwr() runs on test_CT { + var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); + f_testmatrix_each_chan(pars, refers(f_tc_rsl_chan_initial_ms_pwr)); +} + /* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND (TS 48.058 4.10) */ private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr { f_l1_tune(L1CTL); @@ -5155,6 +5196,7 @@ execute( TC_meas_res_sign_sdcch8() ); execute( TC_meas_res_sign_tchh_toa256() ); execute( TC_rsl_ms_pwr_ctrl() ); + execute( TC_rsl_chan_initial_ms_pwr() ); execute( TC_rsl_chan_initial_ta() ); execute( TC_conn_fail_crit() ); execute( TC_paging_imsi_80percent() ); -- To view, visit https://gerrit.osmocom.org/14221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Gerrit-Change-Number: 14221 Gerrit-PatchSet: 1 Gerrit-Owner: Eric Wild
Change in osmo-ttcn3-hacks[master]: bts: Extend BTS_Tests.ttcn with test for RSL channel activation with ...
Eric Wild has uploaded this change for review. ( https://gerrit.osmocom.org/14151 Change subject: bts: Extend BTS_Tests.ttcn with test for RSL channel activation with TA from initial activation onwards .. bts: Extend BTS_Tests.ttcn with test for RSL channel activation with TA from initial activation onwards Change-Id: I4b2eec223e961aeedfd8afa77cb671d2842910fb Related: OS##3750 --- M bts/BTS_Tests.ttcn 1 file changed, 50 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/51/14151/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 7912ff6..0eba242 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -1783,6 +1783,55 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* establish DChan, verify that the BTS sets the TA in the first SACCH L1 header. +TA for the IMM ASS messages is still controlled by g_pars.l1_pars.ms_actual_ta! */ +function f_tc_rsl_chan_initial_ta(charstring id) runs on ConnHdlr { + var L1ctlDlMessage l1_dl; + var uint5_t ta_to_test := 16; + + + f_l1_tune(L1CTL); + RSL.clear; + + /* tell fake_trx to use a given timing offset for all bursts */ + f_trx_fake_toffs256(ta_to_test*256); + + f_est_dchan(more_ies :={valueof(t_RSL_IE(RSL_IE_TIMING_ADVANCE, RSL_IE_Body:{timing_adv := ta_to_test}))} ); + + + alt { + + /* Pick all SACCH blocks for checking */ + [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl { + + /* The second byte of the L1 header contains the TA. */ + if (not (l1_dl.payload.data_ind.payload[1] == int2oct(ta_to_test, 1))) { + setverdict(fail, "TA in L1 header does not match the signaled (RSL) TA."); + } + + } + + /* Ignore all other blocks */ + [] L1CTL.receive { repeat; } + + } + + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); + + setverdict(pass); +} + +testcase TC_rsl_chan_initial_ta() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(testcasename()); + pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); + vc_conn := f_start_handler(refers(f_tc_rsl_chan_initial_ta), pars); + vc_conn.done; + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND (TS 48.058 4.10) */ private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr { f_l1_tune(L1CTL); @@ -4621,6 +4670,7 @@ execute( TC_meas_res_sign_sdcch8() ); execute( TC_meas_res_sign_tchh_toa256() ); execute( TC_rsl_ms_pwr_ctrl() ); + execute( TC_rsl_chan_initial_ta() ); execute( TC_conn_fail_crit() ); execute( TC_paging_imsi_80percent() ); execute( TC_paging_tmsi_80percent() ); -- To view, visit https://gerrit.osmocom.org/14151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4b2eec223e961aeedfd8afa77cb671d2842910fb Gerrit-Change-Number: 14151 Gerrit-PatchSet: 1 Gerrit-Owner: Eric Wild