Build failure of network:osmocom:nightly/libosmocore in Raspbian_9.0/armv7l
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Raspbian_9.0/armv7l Package network:osmocom:nightly/libosmocore failed to build in Raspbian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly libosmocore Last lines of build log: [ 793s] | This file was extended by libosmocore config.status 1.1.0.49-8c9b, which was [ 793s] | generated by GNU Autoconf 2.69. Invocation command line was [ 793s] | [ 793s] | CONFIG_FILES= [ 793s] | CONFIG_HEADERS = [ 793s] | CONFIG_LINKS= [ 793s] | CONFIG_COMMANDS = [ 793s] | $ ./config.status Doxyfile.core [ 793s] | [ 793s] | on obs-arm-6 [ 793s] | [ 793s] | config.status:1200: creating Doxyfile.core [ 793s] [ 793s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 793s] make[1]: *** [override_dh_auto_test] Error 1 [ 793s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 793s] debian/rules:15: recipe for target 'build' failed [ 793s] make: *** [build] Error 2 [ 793s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 793s] [ 793s] obs-arm-6 failed "build libosmocore_1.1.0.49.8c9b.dsc" at Sat Jun 8 02:45:03 UTC 2019. [ 793s] [ 793s] ### VM INTERACTION START ### [ 795s] [ 755.199674] sysrq: SysRq : Power Off [ 795s] [ 755.209288] reboot: Power down [ 796s] ### VM INTERACTION END ### [ 796s] [ 796s] obs-arm-6 failed "build libosmocore_1.1.0.49.8c9b.dsc" at Sat Jun 8 02:45:07 UTC 2019. [ 796s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Change in ...osmo-ttcn3-hacks[master]: bsc: Introduce test TC_ctrl_location
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14407 Change subject: bsc: Introduce test TC_ctrl_location .. bsc: Introduce test TC_ctrl_location Related: OS#2012 Change-Id: I3640f6889e3b6adc3b4601082f948543c64a2fe3 --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M bsc/regen_makefile.sh M library/Osmocom_CTRL_Adapter.ttcn 4 files changed, 34 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/07/14407/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 518f9e1..030d367 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1204,6 +1204,29 @@ setverdict(pass); } +/* Verify that Upon receival of SET "location", BSC forwards a TRAP + "location-state" over the SCCPlite IPA conn */ +private function f_tc_ctrl_location(charstring id) runs on MSC_ConnHdlr { + g_pars := f_gen_test_hdlr_pars(); + log("Waiting for TRAP on MSC side"); + f_ctrl_exp_trap(CTRL, "bts.0.location-state", "1234567,fix3d,0.34,0.56,0.78,operational,unlocked,on,001,01"); +} + +testcase TC_ctrl_location() runs on test_CT { + var MSC_ConnHdlr vc_conn; + var integer bts_nr := 0; + + f_init(1, true); + f_sleep(1.0); + + vc_conn := f_start_handler(refers(f_tc_ctrl_location)); + + f_ctrl_set_bts(IPA_CTRL, bts_nr, "location", "1234567,fix3d,0.34,0.56,0.78"); + + vc_conn.done; + setverdict(pass); +} + function f_bssap_tx_ud(template PDU_BSSAP bssap) runs on test_CT { BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, bssap)); } @@ -1688,6 +1711,7 @@ } connect(vc_conn:BSSAP, g_bssap.vc_RAN:CLIENT); connect(vc_conn:MGCP, vc_MGCP:MGCP_CLIENT); + connect(vc_conn:CTRL, g_bssap.vc_RAN:CTRL_CLIENT); } function f_start_handler(void_fn fn, template (omit) TestHdlrParams pars := omit) @@ -3987,6 +4011,9 @@ execute( TC_ctrl_msc_connection_status() ); execute( TC_ctrl_msc0_connection_status() ); execute( TC_ctrl() ); + if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_SCCPlite_SERVER) { + execute( TC_ctrl_location() ); + } /* RSL DCHAN Channel ACtivation / Deactivation */ execute( TC_chan_act_noreply() ); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index c7f6495..0efe080 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -19,6 +19,7 @@ import from BSSAP_Types all; import from RAN_Emulation all; import from BSSMAP_Templates all; +import from IPA_Emulation all; import from IPL4asp_Types all; import from Native_Functions all; @@ -357,6 +358,8 @@ port RAN_PROC_PT RAN; port TELNETasp_PT BSCVTY; + port IPA_CTRL_PT CTRL; + var MediaState g_media; var TestHdlrParams g_pars; diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh index 06fa812..389aaed 100755 --- a/bsc/regen_makefile.sh +++ b/bsc/regen_makefile.sh @@ -4,6 +4,6 @@ FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc TELNETasp_PT.cc *.c" -export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL -DIPA_EMULATION_MGCP -DIPA_EMULATION_SCCP -DRAN_EMULATION_BSSAP -DRAN_EMULATION_MGCP -DUSE_MTP3_DISTRIBUTOR" +export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL -DIPA_EMULATION_MGCP -DIPA_EMULATION_CTRL -DIPA_EMULATION_SCCP -DRAN_EMULATION_BSSAP -DRAN_EMULATION_MGCP -DRAN_EMULATION_CTRL -DUSE_MTP3_DISTRIBUTOR" ../regen-makefile.sh $MAIN $FILES diff --git a/library/Osmocom_CTRL_Adapter.ttcn b/library/Osmocom_CTRL_Adapter.ttcn index 93e893f..08195c8 100644 --- a/library/Osmocom_CTRL_Adapter.ttcn +++ b/library/Osmocom_CTRL_Adapter.ttcn @@ -61,6 +61,9 @@ function f_ctrl_get_bts(IPA_CTRL_PT pt, integer bts_nr, charstring suffix) return CtrlValue { return f_ctrl_get(pt, "bts." & int2str(bts_nr) & "." & suffix); } +function f_ctrl_set_bts(IPA_CTRL_PT pt, integer bts_nr, charstring suffix, CtrlValue val) { + f_ctrl_set(pt, "bts." & int2str(bts_nr) & "." & suffix, val); +} template charstring ts_bts(integer bts_nr) := "bts." & int2str(bts_nr) & "."; template charstring ts_bts_trx(integer bts_nr, integer trx_nr ) := -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14407 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3640f6889e3b6adc3b4601082f948543c64a2fe3 Gerrit-Change-Number: 14407 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
Change in ...osmo-ttcn3-hacks[master]: lib/RAN: Introduce CTRL_CLIENT port to access CTRL muxed in RAN IPA conn
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14406 Change subject: lib/RAN: Introduce CTRL_CLIENT port to access CTRL muxed in RAN IPA conn .. lib/RAN: Introduce CTRL_CLIENT port to access CTRL muxed in RAN IPA conn This is the case for SCCPlite between BSC and MSC (or BSC-NAT). MGCP and CTRL can be multiplexed over the same underlaying IPA conn. Related: OS#2012 Change-Id: Id90c1609f0439b00379166fb9e4028d181fc023e --- M library/RAN_Adapter.ttcnpp M library/RAN_Emulation.ttcnpp 2 files changed, 38 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/06/14406/1 diff --git a/library/RAN_Adapter.ttcnpp b/library/RAN_Adapter.ttcnpp index 862921e..40cf0fa 100644 --- a/library/RAN_Adapter.ttcnpp +++ b/library/RAN_Adapter.ttcnpp @@ -167,6 +167,11 @@ log("Connecting MGCP RAN Emulation to IPA MGCP PORT"); connect(ba.vc_IPA:IPA_MGCP_PORT, ba.vc_RAN:MGCP); #endif +#ifdef IPA_EMULATION_CTRL + /* connect IPA CTRL port with BSSMAP CTRL port */ + log("Connecting CTRL RAN Emulation to IPA CTRL PORT"); + connect(ba.vc_IPA:IPA_CTRL_PORT, ba.vc_RAN:CTRL); +#endif } log("Starting RAN_Emulation"); ba.vc_RAN.start(RAN_Emulation.main(valueof(ops), "")); diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp index ba018b4..c580368 100644 --- a/library/RAN_Emulation.ttcnpp +++ b/library/RAN_Emulation.ttcnpp @@ -48,6 +48,11 @@ import from MGCP_Templates all; #endif +#ifdef RAN_EMULATION_CTRL +import from Osmocom_CTRL_Types all; +import from Osmocom_CTRL_Adapter all; +#endif + #ifdef RAN_EMULATION_RANAP import from RANAP_CodecPort all; import from RANAP_PDU_Descriptions all; @@ -177,6 +182,11 @@ /* MGCP port */ port IPA_MGCP_PT MGCP; #endif +#ifdef RAN_EMULATION_CTRL + /* CTRL port */ + port IPA_CTRL_PT CTRL; + port IPA_CTRL_PT CTRL_CLIENT; +#endif /* use 16 as this is also the number of SCCP connections that SCCP_Emulation can handle */ var ConnectionData ConnectionTable[16]; @@ -1041,6 +1051,28 @@ #endif } +private altstep as_main_ctrl() runs on RAN_Emulation_CT { +#ifdef RAN_EMULATION_CTRL + var CtrlMessage ctrl; + var RAN_ConnHdlr vc_conn; + + /* Handling of CTRL in IPA SCCPLite case. This predates 3GPP AoIP +* and uses a CTRL session in parallel to BSSAP. */ + + /* CTRL_CLIENT -> CTRL */ + [] CTRL_CLIENT.receive(CtrlMessage:?) -> value ctrl sender vc_conn { + CTRL.send(ctrl); + } + + /* CTRL -> CTRL_CLIENT */ + [] CTRL.receive(CtrlMessage:?) -> value ctrl { + CTRL_CLIENT.send(ctrl); + } +#else + [false] CLIENT.receive {} +#endif +} + /* send a raw (encoded) L3 message over given SCCP connection */ private function f_xmit_raw_l3(integer sccp_conn_id, OCT1 dlci, octetstring l3_enc) runs on RAN_Emulation_CT { @@ -1123,6 +1155,7 @@ } [] as_main_mgcp(); + [] as_main_ctrl(); [] PROC.getcall(RAN_register:{?,?}) -> param(l3_info, vc_hdlr) { f_create_expect(l3_info, vc_hdlr); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14406 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id90c1609f0439b00379166fb9e4028d181fc023e Gerrit-Change-Number: 14406 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
Change in ...osmo-ttcn3-hacks[master]: CTRL_Types: Fix SET value not encoded in message
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14405 ) Change subject: CTRL_Types: Fix SET value not encoded in message .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14405 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9e0132429265d03caa97af2b2f44eed0327f3200 Gerrit-Change-Number: 14405 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 07 Jun 2019 15:02:41 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in ...osmo-ttcn3-hacks[master]: CTRL_Types: Fix SET value not encoded in message
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14405 Change subject: CTRL_Types: Fix SET value not encoded in message .. CTRL_Types: Fix SET value not encoded in message Change-Id: I9e0132429265d03caa97af2b2f44eed0327f3200 --- M library/Osmocom_CTRL_Types.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/05/14405/1 diff --git a/library/Osmocom_CTRL_Types.ttcn b/library/Osmocom_CTRL_Types.ttcn index eb22056..5c4527e 100644 --- a/library/Osmocom_CTRL_Types.ttcn +++ b/library/Osmocom_CTRL_Types.ttcn @@ -90,7 +90,7 @@ verb := "SET", id := id, variable := variable, - val := omit + val := val } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14405 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9e0132429265d03caa97af2b2f44eed0327f3200 Gerrit-Change-Number: 14405 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
Change in ...osmo-hlr[master]: rx_check_imei_req(): fix IMEI bounds checking
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/14399 ) Change subject: rx_check_imei_req(): fix IMEI bounds checking .. Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/14399/1/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/14399/1/src/hlr.c@483 PS1, Line 483: gsm48_decode_bcd_number2 > [...] we would need to add another if() block beforehand [...] Yep, so then you could print a better message than "failed to decode", if there was actually nothing to decode ;) -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14399 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I060a8db98fb882e4815d1709a5d85bc0143a73a6 Gerrit-Change-Number: 14399 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 07 Jun 2019 13:20:41 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Comment-In-Reply-To: osmith Gerrit-MessageType: comment
Change in ...osmo-ttcn3-hacks[master]: hlr: f_vty_subscr_show(): add invert arg
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14401 ) Change subject: hlr: f_vty_subscr_show(): add invert arg .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14401 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I176d8fd2ee74e1eb7ac797f931cd6005d398740f Gerrit-Change-Number: 14401 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 07 Jun 2019 13:17:13 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in ...osmo-ttcn3-hacks[master]: hlr: add Check IMEI tests
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14402 ) Change subject: hlr: add Check IMEI tests .. Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/14402/1/hlr/HLR_Tests.ttcn File hlr/HLR_Tests.ttcn: https://gerrit.osmocom.org/#/c/14402/1/hlr/HLR_Tests.ttcn@1175 PS1, Line 1175: res So you return GSUP_PDU, but never use it? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14402 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I97c8462f0817149feadd0c4865e3df6c2af92a80 Gerrit-Change-Number: 14402 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 07 Jun 2019 13:17:04 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in ...osmo-hlr[master]: rx_check_imei_req(): fix IMEI bounds checking
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/14399 ) Change subject: rx_check_imei_req(): fix IMEI bounds checking .. Patch Set 2: (2 comments) https://gerrit.osmocom.org/#/c/14399/1/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/14399/1/src/hlr.c@a483 PS1, Line 483: > AFAIR, gsm48_decode_bcd_number2() is not NULL-safe, so I would keep this > check. […] Good catch, fixed. https://gerrit.osmocom.org/#/c/14399/1/src/hlr.c@483 PS1, Line 483: gsm48_decode_bcd_number2 > Cosmetic, not critical: it would be good to store the returned value, and > print it in the error mess […] Agreed, but together with the !gsup->imei_enc before, we would need to add another if() block beforehand, so I'll leave it like this for now. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14399 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I060a8db98fb882e4815d1709a5d85bc0143a73a6 Gerrit-Change-Number: 14399 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 07 Jun 2019 13:16:02 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
Change in ...osmo-hlr[master]: rx_check_imei_req(): fix IMEI bounds checking
Hello fixeria, pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/14399 to look at the new patch set (#2). Change subject: rx_check_imei_req(): fix IMEI bounds checking .. rx_check_imei_req(): fix IMEI bounds checking IMEIs (without the checksum) always have 14 digits. Replace the previous check (length <= 14) with a proper one (length == 14) and set the buffer to the right size. I have tested with new TTCN3 tests, that the length check is working properly now. Related: OS#2541 Change-Id: I060a8db98fb882e4815d1709a5d85bc0143a73a6 --- M src/hlr.c 1 file changed, 8 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/99/14399/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14399 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I060a8db98fb882e4815d1709a5d85bc0143a73a6 Gerrit-Change-Number: 14399 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in ...osmo-bsc[master]: manuals: Add script to update vtr/counter documentation from docker
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/14404 Change subject: manuals: Add script to update vtr/counter documentation from docker .. manuals: Add script to update vtr/counter documentation from docker Change-Id: Iedd1f55d021231d86c19b6f14ff296e3a55148c8 Related: OS#1700 --- M doc/manuals/Makefile.am A doc/manuals/regen_doc.sh 2 files changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/04/14404/1 diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index 49ddc18..17fecd1 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -9,6 +9,7 @@ message-sequences \ mgw \ om2000 \ +regen_docs.sh \ vty if BUILD_MANUALS diff --git a/doc/manuals/regen_doc.sh b/doc/manuals/regen_doc.sh new file mode 100755 index 000..2f9ef74 --- /dev/null +++ b/doc/manuals/regen_doc.sh @@ -0,0 +1,17 @@ +#!/bin/sh -x + +if [ -z "$DOCKER_PLAYGROUND" ]; then + echo "You need to set DOCKER_PLAYGROUND" + exit 1 +fi + +SCRIPT=$(realpath "$0") +MANUAL_DIR=$(dirname "$SCRIPT") + +COMMIT=${COMMIT:-$(git log -1 --format=format:%H)} + +cd "$DOCKER_PLAYGROUND/scripts" || exit 1 + +OSMO_BSC_BRANCH=$COMMIT ./regen_doc.sh osmo-bsc 4242 \ + "$MANUAL_DIR/chapters/counters_generated.adoc" \ + "$MANUAL_DIR/vty/bsc_vty_reference.xml" -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14404 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Iedd1f55d021231d86c19b6f14ff296e3a55148c8 Gerrit-Change-Number: 14404 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-MessageType: newchange
Change in ...docker-playground[master]: Add script to regenerate VTY and counter documentation
daniel has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/docker-playground/+/14403 ) Change subject: Add script to regenerate VTY and counter documentation .. Add script to regenerate VTY and counter documentation This script needs access to the VTY interface, so I changed some remaining config files to bind the VTY interface to 0.0.0.0. There are a couple of services that do that already. Related: OS#1700 Change-Id: Ic5cf7f59de0c18d4c5568b89433c2b11db2a72a5 --- M osmo-bsc-master/osmo-bsc.cfg M osmo-hlr-master/osmo-hlr.cfg M osmo-hnbgw-master/osmo-hnbgw.cfg M osmo-mgw-master/osmo-mgw.cfg M osmo-msc-master/osmo-msc.cfg M osmo-sip-master/osmo-sip-connector.cfg A scripts/regen_doc.sh 7 files changed, 53 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/03/14403/2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/14403 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ic5cf7f59de0c18d4c5568b89433c2b11db2a72a5 Gerrit-Change-Number: 14403 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-MessageType: newpatchset
Change in ...docker-playground[master]: Add script to regenerate VTY and counter documentation
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/14403 Change subject: Add script to regenerate VTY and counter documentation .. Add script to regenerate VTY and counter documentation This script needs access to the VTY interface, so I changed some remaining config files to bind the VTY interface to 0.0.0.0. There are a couple of services that do that already. Change-Id: Ic5cf7f59de0c18d4c5568b89433c2b11db2a72a5 --- M osmo-bsc-master/osmo-bsc.cfg M osmo-hlr-master/osmo-hlr.cfg M osmo-hnbgw-master/osmo-hnbgw.cfg M osmo-mgw-master/osmo-mgw.cfg M osmo-msc-master/osmo-msc.cfg M osmo-sip-master/osmo-sip-connector.cfg A scripts/regen_doc.sh 7 files changed, 53 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/03/14403/1 diff --git a/osmo-bsc-master/osmo-bsc.cfg b/osmo-bsc-master/osmo-bsc.cfg index cb0059d..7ce9173 100644 --- a/osmo-bsc-master/osmo-bsc.cfg +++ b/osmo-bsc-master/osmo-bsc.cfg @@ -46,6 +46,7 @@ ! line vty no login + bind 0.0.0.0 ! e1_input e1_line 0 driver ipa diff --git a/osmo-hlr-master/osmo-hlr.cfg b/osmo-hlr-master/osmo-hlr.cfg index f3be518..9d8b125 100644 --- a/osmo-hlr-master/osmo-hlr.cfg +++ b/osmo-hlr-master/osmo-hlr.cfg @@ -11,6 +11,7 @@ logging level linp error ! line vty + no login bind 0.0.0.0 ctrl bind 0.0.0.0 diff --git a/osmo-hnbgw-master/osmo-hnbgw.cfg b/osmo-hnbgw-master/osmo-hnbgw.cfg index 8bffd76..4c7e75b 100644 --- a/osmo-hnbgw-master/osmo-hnbgw.cfg +++ b/osmo-hnbgw-master/osmo-hnbgw.cfg @@ -19,6 +19,9 @@ logging level lctrl notice logging level lgtp notice logging level lstats notice +line vty + no login + bind 0.0.0.0 cs7 instance 0 point-code 0.23.5 asp asp-clnt-OsmoHNBGW 2905 0 m3ua diff --git a/osmo-mgw-master/osmo-mgw.cfg b/osmo-mgw-master/osmo-mgw.cfg index 44653e3..682c4ed 100644 --- a/osmo-mgw-master/osmo-mgw.cfg +++ b/osmo-mgw-master/osmo-mgw.cfg @@ -31,6 +31,7 @@ ! line vty no login + bind 0.0.0.0 ! mgcp bind ip 172.18.0.180 diff --git a/osmo-msc-master/osmo-msc.cfg b/osmo-msc-master/osmo-msc.cfg index 91c9eee..929e88c 100644 --- a/osmo-msc-master/osmo-msc.cfg +++ b/osmo-msc-master/osmo-msc.cfg @@ -3,6 +3,7 @@ ! line vty no login + bind 0.0.0.0 ! network network country code 1 diff --git a/osmo-sip-master/osmo-sip-connector.cfg b/osmo-sip-master/osmo-sip-connector.cfg index ad42969..5a0b4f5 100644 --- a/osmo-sip-master/osmo-sip-connector.cfg +++ b/osmo-sip-master/osmo-sip-connector.cfg @@ -1,3 +1,6 @@ +line vty + no login + bind 0.0.0.0 app mncc socket-path /tmp/bsc_mncc diff --git a/scripts/regen_doc.sh b/scripts/regen_doc.sh new file mode 100755 index 000..7c7529f --- /dev/null +++ b/scripts/regen_doc.sh @@ -0,0 +1,43 @@ +#!/bin/sh +x + +. ../jenkins-common.sh + +NAME="$1" +PORT="$2" +COUNTERFILE="$3" +VTYFILE="$4" + +IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}" +if [ -z "$OSMO_INTERACT_VTY" ]; then + OSMO_INTERACT_VTY="osmo-interact-vty.py" +fi + +docker_images_require \ + "$NAME-$IMAGE_SUFFIX" + +network_create 172.18.12.0/24 + +container_create() { + CONTAINERNAME=$1 + IP_ADDR=$2 + + docker run --rm --network ${NET_NAME} --ip ${IP_ADDR} \ + --name ${BUILD_TAG}-${CONTAINERNAME} -d \ + ${REPO_USER}/${CONTAINERNAME} + + +} + +container_create "$NAME-$IMAGE_SUFFIX" 172.18.12.23 + +# Get asciidoc counter info +${OSMO_INTERACT_VTY} \ + -c "enable;show asciidoc counters" -p "$PORT" -H 172.18.12.23 -O "$COUNTERFILE" + +# Get vty reference +${OSMO_INTERACT_VTY} \ + -X -p "$PORT" -H 172.18.12.23 -O "$VTYFILE" + +docker container kill "${BUILD_TAG}-$NAME-$IMAGE_SUFFIX" + +network_remove -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/14403 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ic5cf7f59de0c18d4c5568b89433c2b11db2a72a5 Gerrit-Change-Number: 14403 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-MessageType: newchange
Change in ...osmo-bts[master]: gsm_data_shared.h: Remove unused loc_list from struct gsm_bts
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/14398 ) Change subject: gsm_data_shared.h: Remove unused loc_list from struct gsm_bts .. Patch Set 1: Code-Review+1 Only OsmoBSC is using loc_list, but it has its own header file. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/14398 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I52880962dfb0399c613048aa7ddfd828d3c6c933 Gerrit-Change-Number: 14398 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 07 Jun 2019 12:51:16 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in ...osmo-hlr[master]: rx_check_imei_req(): fix IMEI bounds checking
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/14399 ) Change subject: rx_check_imei_req(): fix IMEI bounds checking .. Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/14399/1/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/#/c/14399/1/src/hlr.c@a483 PS1, Line 483: AFAIR, gsm48_decode_bcd_number2() is not NULL-safe, so I would keep this check. Others can be safely removed, for sure. https://gerrit.osmocom.org/#/c/14399/1/src/hlr.c@483 PS1, Line 483: gsm48_decode_bcd_number2 Cosmetic, not critical: it would be good to store the returned value, and print it in the error message below. I find it helpful for trouble shooting. rc = gsm48_decode_bcd_number2(...); if (rc) { ... } -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14399 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I060a8db98fb882e4815d1709a5d85bc0143a73a6 Gerrit-Change-Number: 14399 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 07 Jun 2019 12:44:11 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in ...osmo-ttcn3-hacks[master]: hlr: add osmo-hlr.cfg
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14400 Change subject: hlr: add osmo-hlr.cfg .. hlr: add osmo-hlr.cfg Copy osmo-hlr.cfg from docker-playground.git, but replace all IPs with 127.0.0.1. Change-Id: I73f673523dab8765ca87851175fafdec9fc20e1b --- A hlr/osmo-hlr.cfg 1 file changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/00/14400/1 diff --git a/hlr/osmo-hlr.cfg b/hlr/osmo-hlr.cfg new file mode 100644 index 000..a17881e --- /dev/null +++ b/hlr/osmo-hlr.cfg @@ -0,0 +1,23 @@ +! +! OsmoHLR example configuration +! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 + logging level all debug + logging level linp error +! +line vty + bind 127.0.0.1 +ctrl + bind 127.0.0.1 +hlr + gsup + bind ip 127.0.0.1 + euse foobar + ussd route prefix *#100 internal own-msisdn + ussd route prefix *#101 internal own-imsi + ussd route prefix *100 external foobar -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14400 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I73f673523dab8765ca87851175fafdec9fc20e1b Gerrit-Change-Number: 14400 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
Change in ...osmo-ttcn3-hacks[master]: hlr: add Check IMEI tests
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14402 Change subject: hlr: add Check IMEI tests .. hlr: add Check IMEI tests Create tests for all code paths of rx_check_imei_req() in hlr.c (except for subscriber create on demand, this will be in an upcoming patch). Add missing message types to GSUP_Types.ttcn, and adjust the IMEI and IMEI_Result IEs for consistency with the existing IEs, and to make the tests compile. Related: OS#2541 Change-Id: I97c8462f0817149feadd0c4865e3df6c2af92a80 --- M hlr/HLR_Tests.ttcn M library/GSUP_Types.ttcn 2 files changed, 165 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/02/14402/1 diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index 21089dd..fd246fd 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -356,6 +356,21 @@ f_vty_transceive_match(VTY, prefix & "show", exp, invert); } +/*** + * VTY Configuration + ***/ + +function f_vty_config_store_imei(TELNETasp_PT VTY, boolean enable) { + f_vty_transceive(VTY, "configure terminal"); + f_vty_transceive(VTY, "hlr"); + if (enable) { + f_vty_transceive(VTY, "store-imei"); + } else { + f_vty_transceive(VTY, "no store-imei"); + } + f_vty_transceive(VTY, "exit"); + f_vty_transceive(VTY, "exit"); +} /*** * Helper functions for ConnHdlr @@ -566,6 +581,48 @@ return ret; } +function f_perform_CHECK_IMEI(hexstring imsi, hexstring imei, + template (omit) integer exp_err_cause := omit, + template (omit) GSUP_IMEIResult result := omit) +runs on HLR_ConnHdlr return GSUP_PDU { + var GSUP_PDU ret; + timer T := 3.0; + var boolean exp_fail := false; + if (not istemplatekind(exp_err_cause, "omit")) { + exp_fail := true; + } + + GSUP.send(valueof(ts_GSUP_CHECK_IMEI_REQ(imsi, imei))); + T.start; + alt { + [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, exp_err_cause)) -> value ret { + setverdict(pass); + } + [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, ?)) -> value ret { + setverdict(fail, "Unexpected CHECK IMEI ERROR Cause"); + } + [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, ?)) -> value ret { + setverdict(fail, "Unexpected CHECK IMEI RES instead of ERR"); + } + [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, ?)) -> value ret { + setverdict(fail, "Unexpected CHECK IMEI ERROR"); + } + [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, result)) -> value ret { + setverdict(pass); + } + [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, ?)) -> value ret { + setverdict(fail, "Unexpected CHECK IMEI RES"); + } + [] GSUP.receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for CHECK IMEI response"); + mtc.stop; + } + } + return ret; +} + + /*** @@ -1082,6 +1139,81 @@ * timeout cases */ + +/* Test Check IMEI */ +private function f_TC_gsup_check_imei() runs on HLR_ConnHdlr { + var GSUP_PDU res; + + /* store-imei disabled */ + f_vty_config_store_imei(VTY, false); + res := f_perform_CHECK_IMEI(g_pars.sub.imsi, '12345678901234'H, + result := OSMO_GSUP_IMEI_RESULT_ACK); + f_vty_subscr_show(VTY, g_pars.sub, pattern "*IMEI: *12345678901234*", invert := true); + + /* store-imei enabled */ + f_vty_config_store_imei(VTY, true); + res := f_perform_CHECK_IMEI(g_pars.sub.imsi, '12345678901234'H, + result := OSMO_GSUP_IMEI_RESULT_ACK); + f_vty_subscr_show(VTY, g_pars.sub, pattern "*IMEI: *12345678901234*"); +} +testcase TC_gsup_check_imei() runs on test_CT { + var HlrSubscriberList sl; + var GSUP_PDU res; + + f_init(false); + sl := f_gen_subs(); + f_start_handler_per_sub(refers(f_TC_gsup_check_imei), sl); + + setverdict(pass); +} + +/* Test Check IMEI with invalid IMEI length */ +private function f_TC_gsup_check_imei_invalid_len() runs on HLR_ConnHdlr { + var GSUP_PDU res; + + /* IMEI too long */ + res := f_perform_CHECK_IMEI(g_pars.sub.imsi, '111456789012345F'H, 96 /* Invalid Mandatory Information */); + res := f_perform_CHECK_IMEI(g_pars.sub.imsi, '2224567890123456'H, 96 /* Invalid
Change in ...osmo-ttcn3-hacks[master]: hlr: f_vty_subscr_show(): add invert arg
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14401 Change subject: hlr: f_vty_subscr_show(): add invert arg .. hlr: f_vty_subscr_show(): add invert arg Allow inverting the pattern in f_vty_transceive_match() and f_vty_subscr_show(). On failure, mention the pattern in the test verdict, and whether it should have had an inverted match or not. This will be used by upcoming tests for the check IMEI GSUP message type, to check if the IMEI was not stored, depending on the OsmoHLR configuration. Change-Id: I176d8fd2ee74e1eb7ac797f931cd6005d398740f --- M hlr/HLR_Tests.ttcn 1 file changed, 10 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/01/14401/1 diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index b6bd1ad..21089dd 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -294,10 +294,15 @@ return sl; } -function f_vty_transceive_match(TELNETasp_PT pt, charstring cmd, template charstring exp_ret) { +function f_vty_transceive_match(TELNETasp_PT pt, charstring cmd, template charstring exp_ret, + boolean invert := false) { var charstring ret := f_vty_transceive_ret(pt, cmd); - if (not match(ret, exp_ret)) { - setverdict(fail, "Non-matching VTY response: ", ret); + var boolean is_match := match(ret, exp_ret); + if (is_match and invert) { + setverdict(fail, "Non-matching VTY response: ", ret, ", should *not* have matched: ", exp_ret); + mtc.stop; + } else if (not is_match and not invert) { + setverdict(fail, "Non-matching VTY response: ", ret, ", should have matched: ", exp_ret); mtc.stop; } } @@ -346,9 +351,9 @@ } /* perform 'show' on subscriber; match result with pattern 'exp' */ -function f_vty_subscr_show(TELNETasp_PT VTY, HlrSubscriber sub, template charstring exp) { +function f_vty_subscr_show(TELNETasp_PT VTY, HlrSubscriber sub, template charstring exp, boolean invert := false) { var charstring prefix := valueof(t_subscr_prefix(sub.imsi)); - f_vty_transceive_match(VTY, prefix & "show", exp); + f_vty_transceive_match(VTY, prefix & "show", exp, invert); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14401 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I176d8fd2ee74e1eb7ac797f931cd6005d398740f Gerrit-Change-Number: 14401 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
Change in ...osmo-hlr[master]: rx_check_imei_req(): fix IMEI bounds checking
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/14399 Change subject: rx_check_imei_req(): fix IMEI bounds checking .. rx_check_imei_req(): fix IMEI bounds checking IMEIs (without the checksum) always have 14 digits. Replace the previous check (length <= 14) with a proper one (length == 14) and set the buffer to the right size. I have tested with new TTCN3 tests, that the length check is working properly now. Related: OS#2541 Change-Id: I060a8db98fb882e4815d1709a5d85bc0143a73a6 --- M src/hlr.c 1 file changed, 8 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/99/14399/1 diff --git a/src/hlr.c b/src/hlr.c index 33d2828..32a584e 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -477,18 +477,19 @@ { struct osmo_gsup_message gsup_reply = {0}; struct msgb *msg_out; - char imei[GSM23003_IMEI_NUM_DIGITS+1] = {0}; + char imei[GSM23003_IMEI_NUM_DIGITS_NO_CHK+1] = {0}; - /* Encoded IMEI length check */ - if (!gsup->imei_enc || gsup->imei_enc_len < 1 || gsup->imei_enc[0] >= sizeof(imei)) { - LOGP(DMAIN, LOGL_ERROR, "%s: wrong encoded IMEI length\n", gsup->imsi); + /* Decode IMEI (fails if IMEI is too long) */ + if (gsm48_decode_bcd_number2(imei, sizeof(imei), gsup->imei_enc, gsup->imei_enc_len, 0) < 0) { + LOGP(DMAIN, LOGL_ERROR, "%s: failed to decode IMEI\n", gsup->imsi); gsup_send_err_reply(conn, gsup->imsi, gsup->message_type, GMM_CAUSE_INV_MAND_INFO); return -1; } - /* Decode IMEI */ - if (gsm48_decode_bcd_number2(imei, sizeof(imei), gsup->imei_enc, gsup->imei_enc_len, 0) < 0) { - LOGP(DMAIN, LOGL_ERROR, "%s: failed to decode IMEI\n", gsup->imsi); + /* Check if IMEI is too short */ + if (strlen(imei) != GSM23003_IMEI_NUM_DIGITS_NO_CHK) { + LOGP(DMAIN, LOGL_ERROR, "%s: wrong encoded IMEI length (IMEI: '%s', %lu, %i)\n", gsup->imsi, imei, +strlen(imei), GSM23003_IMEI_NUM_DIGITS_NO_CHK); gsup_send_err_reply(conn, gsup->imsi, gsup->message_type, GMM_CAUSE_INV_MAND_INFO); return -1; } -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14399 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I060a8db98fb882e4815d1709a5d85bc0143a73a6 Gerrit-Change-Number: 14399 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
Change in ...osmo-bts[master]: gsm_data_shared.h: Remove unused loc_list from struct gsm_bts
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/14398 Change subject: gsm_data_shared.h: Remove unused loc_list from struct gsm_bts .. gsm_data_shared.h: Remove unused loc_list from struct gsm_bts Change-Id: I52880962dfb0399c613048aa7ddfd828d3c6c933 --- M include/osmo-bts/gsm_data_shared.h 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/98/14398/1 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 90772e2..031f05a 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -557,9 +557,6 @@ /* list header in net->bts_list */ struct llist_head list; - /* Geographical location of the BTS */ - struct llist_head loc_list; - /* number of ths BTS in network */ uint8_t nr; /* human readable name / description */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/14398 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I52880962dfb0399c613048aa7ddfd828d3c6c933 Gerrit-Change-Number: 14398 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
Change in ...libosmocore[master]: gsm48_decode_bcd_number2: fix ENOSPC edge case
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14397 ) Change subject: gsm48_decode_bcd_number2: fix ENOSPC edge case .. Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14397 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe Gerrit-Change-Number: 14397 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 07 Jun 2019 09:51:53 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in ...libosmocore[master]: gsm48_decode_bcd_number2: fix ENOSPC edge case
Hello fixeria, pespin, daniel, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/14397 to look at the new patch set (#4). Change subject: gsm48_decode_bcd_number2: fix ENOSPC edge case .. gsm48_decode_bcd_number2: fix ENOSPC edge case Return ENOSPC if the decoding buffer is one byte too small, instead of returning 0 and silently truncating the string. Add a new "truncated" variable to detect if the loop breaks in the final iteration. The string is not truncated if there is exactly one 0xf ('\0') higher nibble remaining. This is covered by the existing test case "long 15-digit (maximum) MSISDN, limited buffer". Related: OS#4049 Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 3 files changed, 28 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/97/14397/4 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14397 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe Gerrit-Change-Number: 14397 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in ...osmo-ttcn3-hacks[master]: BTS: pcu_rr_suspend clean up and release the channel
Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14396 ) Change subject: BTS: pcu_rr_suspend clean up and release the channel .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14396 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I55827626803ca81b68f905fd0df3126367951f39 Gerrit-Change-Number: 14396 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Fri, 07 Jun 2019 09:03:46 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in ...libosmocore[master]: gsm48_decode_bcd_number2: fix ENOSPC edge case
Hello fixeria, pespin, daniel, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/14397 to look at the new patch set (#3). Change subject: gsm48_decode_bcd_number2: fix ENOSPC edge case .. gsm48_decode_bcd_number2: fix ENOSPC edge case Return ENOSPC if the decoding buffer is one byte to small, instead of returning 0 and silently truncating the string. Add a new "truncated" variable to detect if the loop breaks in the final iteration. The string is not truncated if there is exactly one 0xf ('\0') higher nibble remaining. This is covered by the existing test case "long 15-digit (maximum) MSISDN, limited buffer". (This commit has just the new test, without the fix, to prove that 0 is returned instead of -ENOSPC.) Related: OS#4049 Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe --- M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 2 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/97/14397/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14397 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe Gerrit-Change-Number: 14397 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in ...libosmocore[master]: gsm48_decode_bcd_number2: fix ENOSPC edge case
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14397 ) Change subject: gsm48_decode_bcd_number2: fix ENOSPC edge case .. Patch Set 2: (3 comments) > I recommend to extend the unit test first, so you could show the problem in > the expected output, and then the fix in a separate change. Okay. Patch set 3 will only contain the added test case, showing that the actual output (0) differs from the expected output (-ENOSPC). Patch set 4 will contain both the test case and the fix. https://gerrit.osmocom.org/#/c/14397/2/tests/gsm0408/gsm0408_test.c File tests/gsm0408/gsm0408_test.c: https://gerrit.osmocom.org/#/c/14397/2/tests/gsm0408/gsm0408_test.c@739 PS2, Line 739: .dec_buf_lim = 4 > Also, the actual strlen(dec_ascii) is 3. There is no truncation with 4. […] The input for the decoder is 022143, which is "1234". dec_ascii contains "123\0" after the decoding function ran, because dec_buf_lim is 4. But I understand what you mean, the title of the test is wrong, I'll fix it in an update. https://gerrit.osmocom.org/#/c/14397/2/tests/gsm0408/gsm0408_test.c@739 PS2, Line 739: .dec_buf_lim = 4 > comma is missing Done https://gerrit.osmocom.org/#/c/14397/2/tests/gsm0408/gsm0408_test.c@740 PS2, Line 740: } > comma is missing Done -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14397 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe Gerrit-Change-Number: 14397 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 07 Jun 2019 08:58:39 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
Change in ...libosmocore[master]: gsm48_decode_bcd_number2: fix ENOSPC edge case
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14397 ) Change subject: gsm48_decode_bcd_number2: fix ENOSPC edge case .. Patch Set 2: I recommend to extend the unit test first, so you could show the problem in the expected output, and then the fix in a separate change. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14397 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe Gerrit-Change-Number: 14397 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 07 Jun 2019 08:33:34 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in ...libosmocore[master]: gsm48_decode_bcd_number2: fix ENOSPC edge case
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14397 ) Change subject: gsm48_decode_bcd_number2: fix ENOSPC edge case .. Patch Set 2: Code-Review-1 (3 comments) https://gerrit.osmocom.org/#/c/14397/2/tests/gsm0408/gsm0408_test.c File tests/gsm0408/gsm0408_test.c: https://gerrit.osmocom.org/#/c/14397/2/tests/gsm0408/gsm0408_test.c@739 PS2, Line 739: .dec_buf_lim = 4 Also, the actual strlen(dec_ascii) is 3. There is no truncation with 4. Exactly 3 reproduces the problem: the number is truncated to "12", while rc is 0. https://gerrit.osmocom.org/#/c/14397/2/tests/gsm0408/gsm0408_test.c@739 PS2, Line 739: .dec_buf_lim = 4 comma is missing https://gerrit.osmocom.org/#/c/14397/2/tests/gsm0408/gsm0408_test.c@740 PS2, Line 740: } comma is missing -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14397 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe Gerrit-Change-Number: 14397 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 07 Jun 2019 08:31:50 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in ...libosmocore[master]: gsm48_decode_bcd_number2: fix ENOSPC edge case
Hello fixeria, pespin, daniel, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/14397 to look at the new patch set (#2). Change subject: gsm48_decode_bcd_number2: fix ENOSPC edge case .. gsm48_decode_bcd_number2: fix ENOSPC edge case Return ENOSPC if the decoding buffer is one byte to small, instead of returning 0 and silently truncating the string. Add a new "truncated" variable to detect if the loop breaks in the final iteration. The string is not truncated if there is exactly one 0xf ('\0') higher nibble remaining. This is covered by the existing test case "long 15-digit (maximum) MSISDN, limited buffer". Related: OS#4049 Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 3 files changed, 28 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/97/14397/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14397 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe Gerrit-Change-Number: 14397 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in ...libosmocore[master]: gsm48_decode_bcd_number2: fix -ENOSPEC edge case
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/14397 Change subject: gsm48_decode_bcd_number2: fix -ENOSPEC edge case .. gsm48_decode_bcd_number2: fix -ENOSPEC edge case Return -ENOSPEC if the decoding buffer is one byte to small, instead of returning 0 and silently truncating the string. Add a new "truncated" variable to detect if the loop breaks in the final iteration. The string is not truncated if there is exactly one 0xf ('\0') higher nibble remaining. This is covered by the existing test case "long 15-digit (maximum) MSISDN, limited buffer". Related: OS#4049 Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok 3 files changed, 28 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/97/14397/1 diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c index 59f931b..31028ba 100644 --- a/src/gsm/gsm48_ie.c +++ b/src/gsm/gsm48_ie.c @@ -82,6 +82,7 @@ { uint8_t in_len; int i; + bool truncated = false; if (output_len < 1) return -ENOSPC; *output = '\0'; @@ -94,14 +95,23 @@ for (i = 1 + h_len; i <= in_len; i++) { /* lower nibble */ - if (output_len <= 1) + if (output_len <= 1) { + truncated = true; break; + } *output++ = bcd_num_digits[bcd_lv[i] & 0xf]; output_len--; /* higher nibble */ - if (output_len <= 1) + if (output_len <= 1) { + /* not truncated if there is exactly one 0xf ('\0') higher nibble remaining */ + if (i == in_len && (bcd_lv[i] & 0xf0) == 0xf0) { + break; + } + + truncated = true; break; + } *output++ = bcd_num_digits[bcd_lv[i] >> 4]; output_len--; } @@ -109,7 +119,7 @@ *output++ = '\0'; /* Indicate whether the output was truncated */ - if (i < in_len) + if (truncated) return -ENOSPC; return 0; diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index b5f8061..e9c61d6 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -727,6 +727,17 @@ .dec_ascii = "(none)", .dec_rc = -EIO, }, + { + .test_name = "dec_buf_lim == strlen(dec_ascii) (OS#4049)", + + /* Decoding test */ + .dec_hex = "022143", + .dec_ascii = "123", + .dec_rc= -ENOSPC, + + /* Buffer length limitations */ + .dec_buf_lim = 4 + } }; static void test_bcd_number_encode_decode() diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 844c201..d91018a 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -186,6 +186,10 @@ - Decoding HEX (buffer limit=0) ''... - Expected: (rc=-5) '(none)' - Actual: (rc=-5) '(none)' +- Running test: dec_buf_lim == strlen(dec_ascii) (OS#4049) + - Decoding HEX (buffer limit=4) '022143'... +- Expected: (rc=-28) '123' +- Actual: (rc=-28) '123' Constructed RA: 077-121-666-5 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14397 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie05900aca50cc7fe8a45d17844dbfcd905fd82fe Gerrit-Change-Number: 14397 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange