aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-01-12HO prep: introduce per-BTS handover config, with defaults on net nodeNeels Hofmeyr16-148/+649
It is desirable to allow configuring handover for each individual network cell. At the same time, it is desirable to set global defaults. Treat the 'network' node handover parameters as global defaults, add another set of parameters for each individual BTS. This raises questions on how the 'network' node should affect the individual BTS. The simplistic solution would have been: on creating a BTS in the config, just copy the current defaults; with serious drawbacks: - tweaking any parameter in the telnet VTY on network node will never affect any running BTS. - network node defaults *must* be issued before the bts sections in the config file. - when writing a config back to file, we would copy all net node defaults to each BTS node, making the network node configs pointless. Instead, add a handover_cfg API that tracks whether a given node has a value set or not. A bts node ho_cfg gets a pointer to the network node config and returns those values if locally unset. If no value is set on any node, use the "factory" defaults, which are hardcoded in the API. Only write back exactly those config items that were actually issued in a config file / on the telnet VTY. (ho_cfg API wise, we could trivially add another ho_cfg level per TRX if we so desire in the future.) Implement ho parameters as an opaque config struct with getters and setters to ensure the tracking is always heeded. Opaqueness dictates allocating instead of direct embedding in gsm_network and gsm_bts structs, ctx is gsm_net / bts. This is 100% backwards compatible to old configs. - No VTY command syntax changes (only the online help). - If a 'bts' sets nothing, it will use the 'network' defaults. - The 'show network' output only changes in presence of individual BTS configs. On 'show network', say "Handover: On|Off" as before, iff all BTS reflect identical behavior. Otherwise, output BTS counts of handover being enabled or not. Use the same set of VTY commands (same VTY cmd syntax as before) on network and BTS nodes, i.e. don't duplicate VTY code. From the current vty->node, figure out which ho_cfg to modify. For linking, add handover_cfg.c (the value API) in libcommon, while the handover_vty.c is in libbsc. This is mainly because some utility programs use gsm_network and hence suck in the ho stuff, but don't need the VTY commands. Review the VTY online help strings. Add VTY transcript test for handover options, testing config propagation from network to bts nodes, 'show network' output and VTY online help strings. (Needs recent addition of '... !' wildcard to osmo_interact_common.py.) I considered leaving parts of this more readable, but in the end decided for heavy use of macros to define and declare the API, because more values will be added in upcoming patches and I want to prevent myself from messing them up. Inspired-by: jolly/new_handover branch, which moves the config to 'bts' level Depends: I7c1ebb2e7f059047903a53de26a0ec1ce7fa9b98 (osmo-python-tests) Change-Id: I79d35f6d3c0fbee67904378ad7f216df34fde79a
2018-01-12vty: add various manual handover and assignment trigger commandsNeels Hofmeyr1-25/+192
2018-01-12handover_decision: Add more log messages to get more information about HO ↵Ivan Kluchnikov2-6/+31
causes in logs Change-Id: Ib0a0787ac8b877ac63455d72886389b546e7a337
2018-01-10cosmetic: mgcp: remove duplicate loggingPhilipp Maier1-2/+0
do not print an additional log lines when the mgcp FSM gets halted. This is already done by osmo-fsm Change-Id: I5aebbcacb68eab3c6afb19991dbf63a02524e4d7
2018-01-10mgcp: log file and line of calls to handle_error()Philipp Maier1-3/+6
When the FSM runs into an error condition handle_error() is called with a cause code. The information about the error is then printed by handle_error(), by this we do not get the sourcecode line of the location where the error actually happend. Convey the source code line number of the actual error in handle_error() Change-Id: Ifa7f2a655474826630988572616cd26e1e2f3464
2018-01-09Support control connection status query for a particular MSC.Stefan Sperling3-9/+53
Add a new control command 'msc.N.connection_status' which can be used to query the connection status of a particular MSC with number N. Keep the old control command 'msc_connection_status', which always queries MSC 0, for backwards compatibility. Change-Id: Ibd41474a1be80e782b19ec337c856b5efc593fa8 Related: OS#2729
2018-01-08vty: fix OML link state printingMax1-3/+3
Always print newline regardless of BTS uptime availability. Change-Id: Ib80049fe66de17bc7acfbb774a30075f40a44dee
2018-01-08RSL: print link state per-TRXMax1-0/+1
Change-Id: Ie6fad70b4b11d0bb4927b22e32e842422658ba53 Fixes: OS#2715
2018-01-08cosmetic: remove duplicated codeMax2-19/+13
Change-Id: I16c446ef7dc66769826f6e8ae118d8b07bbf6930
2018-01-08abisip-find: add --interval optionNeels Hofmeyr1-3/+17
Change-Id: I9540054bdda185b2585209289cee565f61f33dcf
2018-01-07osmo_bsc_bssap.c: Fix discard of const qualifier in assignmentPau Espin Pedrol1-1/+1
Fixes following compilation warning: osmo-bsc/src/osmo-bsc/osmo_bsc_bssap.c:442:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] enc_key = &data[1]; ^ Change-Id: Ieeab5a822d50ac1267362f57196b80073a7901f9
2018-01-05Fix "CTRL GET msc_connection_status" response.Stefan Sperling1-1/+4
Since 39f62bbcbf4309492a6d5bc07213cd74f650d41e the msc_connection_status variable in osmo_bsc_ctrl.c is no longer updated. Query the connection's status from the is_connected flag in struct bsc_msc_connection instead. Makes test BSC_Tests.TC_ctrl_msc_connection_status in ttcn3-bsc-test pass. However, we only query the connection status of the first MSC. Adapting the control command to work with mulitple MSCs is left for future work. Change-Id: I8ab8aac83ef6b7831b6136f7e9e3eddfbb43ecaa Related: OS#2729
2018-01-04Reduce T3109 default from 19s to 5sHarald Welte1-1/+1
T3109 is started when the BSS sends a RR CHAN REL to the MS and stops downlink SACCH generation. Stopped when the MS successfully releases the LAPDm link. After stop or timeout, the radio channel is released using RSL RF CHAN REL. Recommended values in literature are 1-2s + RadioLinkTimeout*0.48s or 5s, while we had the absurdly high 19s timeout. This means we occupy the radio channel way longer than needed in situations where the MS is no longer able to properly release Layer2 (LAPDm DISC) due to loss of signal or the like. See also: https://osmocom.org/projects/osmobsc/wiki/Timers Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a Closes: OS#2734
2018-01-02Remove obsolete ./configure optionMax3-7/+2
The '--enable-vty-tests' is just alias to '--enable-external-tests' anyway. Change-Id: I9492d8e988b464aa41f572611cbf2461bb8be3eb
2017-12-31Check and handle SMS encoding failureMax1-8/+22
The SMS address encoding can fail due to gsm48_encode_bcd_number() which was not checked for because wrong type was used. Fix this by using correct type, checking for error and propagating it to the caller. Change-Id: I9fc16e24f7df5ebad6f4f1b389b2c5e861be95d7 Fixes: CID57882
2017-12-29Fix .deb buildsMax1-6/+2
The code triggers following error: abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] The error was introduced in 5bf1e15c55340f236d84f70d3d04c871403d3503. Change-Id: I613781495edbc53916ca70ff7b78d28ffabd3f5d
2017-12-28Add optional profiling supportMax1-0/+9
This facilitates the use of programs like uftrace. It's disabled by default due to associated overhead. Change-Id: Ia5a48a38962fc99446887a34008c40efd8344d9b
2017-12-27Migrate from OpenSSL to osmo_get_rand_id()Max6-17/+8
This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. The libosmocore version requirements are fine already but for jenkins tests to pass we have to have Ic77866ce65acf524b768882c751a4f9c0635740b merged into libosmocore master. Change-Id: Ia57bf1300525cf3c247284fe966b1c415c2d53e2 Related: OS#1694
2017-12-25abisip-find: add timeout optionNeels Hofmeyr1-2/+17
Change-Id: I3b30e2b9cac9c70ba8d272022eee596de39d7b82
2017-12-25abisip-find: update copyrightNeels Hofmeyr1-1/+3
Change-Id: Ibb72fa16cc1a8b6809d0510211bfc61a170d1250
2017-12-25abisip-find: add -l to list base stations instead of streaming repliesNeels Hofmeyr1-8/+140
To get an overview of what base stations are present in a network, particularly with many base stations being present, it is particularly useful to get a list of connected base stations instead of just output of received replies. Keep a sorted list of known base stations, which time out after 10 seconds. Print additions and removals, and total amount of replies received. On each change, print the entire list. Output a running total of replies received, to provide comfort to the reader that something is still happening, and to confirm that the shown listing is still up-to-date (updated on the same line by means of '\r'). It looks like: ----- Mon Dec 25 18:59:43 2017 0: MAC_Address='00:02:95:07:dc:bd' IP_Address='192.168.0.124' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000152614' 1: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000154153' Total: 2 RX: 11 ----- Mon Dec 25 19:00:12 2017 LOST: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000154153' ----- Mon Dec 25 19:00:12 2017 0: MAC_Address='00:02:95:07:dc:bd' IP_Address='192.168.0.124' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000152614' Total: 1 RX: 15 ----- Mon Dec 25 19:00:28 2017 New: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000154153' ----- Mon Dec 25 19:00:28 2017 0: MAC_Address='00:02:95:07:dc:bd' IP_Address='192.168.0.124' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000152614' 1: MAC_Address='00:02:95:07:dd:57' IP_Address='192.168.0.15' Unit_ID='1/1/1' Location_1='Unknown' Location_2='3GAP' Equipment_Version='237B015_C' Software_Version='unknown' Unit_Name='Unknown' Serial_Number='000295-0000154153' RX: 18 Change-Id: I4201876431029b303dbd10e46492228379c9782a
2017-12-25abisip-find: add getopt option parsing in preparation for a new optionNeels Hofmeyr1-7/+55
Subsequent patch I4201876431029b303dbd10e46492228379c9782a will add the -l cmdline option. Add getopt in a separate step here to keep the patch lean. Change-Id: Idba1a89753510fe6d409277b20c2db86c1b8f7f8
2017-12-23cosmetic: Hide all accesses to conn->bts behind conn_get_bts()Harald Welte8-22/+29
This is a new inline function that hides all accesses to conn->bts. A follow-up patch will then point this to conn->lchan->ts->trx->bts to get rid of the bts field. Change-Id: Ib6cf7097ced34eebe80441c29ab1534f21956a33
2017-12-23bsc_test.c: Use proper network/bts/lchan structuresHarald Welte1-4/+4
don't mock them, simply call the respective functions to get a gsm_network and a gsm_bts with all its subordinate members. Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce
2017-12-22BSC: Fix bsc_subsc leak on pagingHarald Welte1-0/+4
The OsmoBSC code contained a refcount leak on bsc_subscr in the paging code. For every PAGING command received from the MSC we consistently leaked one refcount, resulting in a resulting memory leak. Change-Id: I3d0fb406ca2a1042c6c3424e0dd263c1933b0d50 Closes: OS#2780
2017-12-22BSC: Add "show subscriber all" commandHarald Welte1-0/+23
This command lists the currently-active bsc_subscr and their contents, the format looks like this: OsmoBSC> show subscriber all IMSI TMSI LAC Use 001010123456789 ffffffff 65534 3 001010100000001 a1b2c301 65534 1 Change-Id: Ib9c0c31a0a5a91b42fd832fa0df3460b1a440733
2017-12-21Enable sanitize for CI testsMax1-1/+1
Change-Id: I86f8f29dbe13869fa4a0ac1f55ff697a8975525b
2017-12-20mgcp: validate rtp connection data in MGW response (ip/port)Philipp Maier1-2/+18
Currently the pasing results from the RTP ip/port are fed into inet_addr without checking the results. Check the return code of inet_addr to be sure that the IP-Address got properly decoded. Change-Id: I1d0aa7e9b8480e1bef57269e3904399cb99815bb
2017-12-20mgcp: cancel transactions on timeoutPhilipp Maier2-0/+11
when a transaction to the MGW times out, then the context information is freed. Unfortunately the client is not informed about this and will try to execute the callback anyway. explicitly cancel the transaction in order to prevent access to already freed data structures. Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf
2017-12-19remove unused 'lac' member of 'struct gsm_subscriber_connection'Harald Welte2-3/+0
This field was used in write-pnly mode, i.e. set but never read. Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256
2017-12-19gsm_data.h: Document all fields of gsm_subscriber_connectionHarald Welte1-8/+14
Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0
2017-12-19osmo-bsc: Move user plane/voice related bits into sub-structureHarald Welte7-46/+45
This clarifies which members of the struct are for what. Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412
2017-12-19osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con'Harald Welte1-0/+5
Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6
2017-12-19Remove unused struct osmo_bsc_sccp_con member sccp_queue_sizeHarald Welte1-3/+0
Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f
2017-12-19osmo_bsc_bssap.c: Spelling fixes in commentHarald Welte1-3/+3
Change-Id: I32b2d08bf25cd2d343755ac8491e4f5f758ccee6
2017-12-19remove libosmo-sccp dependency for osmo-bscHarald Welte9-25/+6
libosmo-sccp is the old sccp-lite-focused SCCP implementation that we used before libosmo-sigtran was created. The new osmo-bsc in this repository is using libosmo-sigtran and shouldn't be using parts of libosmo-sccp anymore. We only keep it around in configure.ac and Makefile.am for osmo-bsc_nat, which is not even built in this repository anymore (or 'again yet'?) Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d
2017-12-19Remove some more dead codeHarald Welte4-163/+0
Change-Id: I919bffe88babd90227c89abd4434322965c32ebb
2017-12-19Remove bogus MM INFO configurationHarald Welte8-100/+0
The network name and other MM INFO is controlled by the MSC, not the BSC. Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58
2017-12-19Remove bogus vty config for LU reject causeHarald Welte6-25/+0
The LU reject cause (like anything MM related) is under control of OsmoMSC, not BSC. Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6
2017-12-19Remove unused RRLP options/codecHarald Welte9-65/+0
RRLP is handled in OsmoMSC after the split from NITB, so let's remove any bogus VTY commands left over in the BSC. Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38
2017-12-19Remove dead code left over from NITB splitHarald Welte68-2484/+25
There still is a lot of dead code that we inherited from the NITB days, let's remove more of it. libtrau will be re-introduced as part of osmo-mgw later. Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8
2017-12-19Remove unneeded .py scriptsMax9-983/+2
The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py are not BSC-specific: leftovers from repository split which are now available in osmo-python-tests as well. Change-Id: Ia4285b18b152b070c148228604d1e61a8adedba1
2017-12-18Fix tests after rate_ctr changeMax2-48/+62
Recent change lin libosmocore disallow registering rate_ctr with the same name and indexing multiple times. To accommodate to this: * allocate network struct once and use it for all tests * deregister rate_ctr group after each test * free bts struct after each test Related: OS#2757 Change-Id: Ie1537a1ee9ee812eaaf9f58dc4bc86d4add8c31f
2017-12-14fix bssmap_handle_cipher_mode()'s encryption decisionNeels Hofmeyr1-6/+29
Properly match up any A5/N with the MSC's list of permitted algos. Properly set the reject cause in case of mismatching algorithm choices. Actually allow choosing A5/1 thru 3 as configured on the VTY, by passing a5_encryption through to gsm0808_cipher_mode() (instead of a hardcoded 1). Properly handle failure rc of gsm0808_cipher_mode() by sending a reject message. Cosmetically clarify which GSM0808_IE_ENCRYPTION_INFORMATION bits mean what by means of local variables; add some comments on expected encryption formats; add comment that the BSC should be able to have more than one a5_encryption. Related: OS#2745 OS#2755 Change-Id: Ide8a615905555e35be4584b458d4d40345686175
2017-12-14debug log: log Cipher Mode info upon sending down RSL/A-bisNeels Hofmeyr1-0/+4
Change-Id: I7f7ec44887f6b40fdce8d348e9e9bd200fe0b689
2017-12-14log typo fix in gsm0808_cipher_mode()Neels Hofmeyr1-1/+1
Change-Id: I3f6d138df9ddc9c6560d04e2e8baa1f3a50a164f
2017-12-14Add new "chan:mode_modify_nack" counter to count RSL MODE MODIFY NACKHarald Welte2-0/+3
Those NACKs shouldn't happen in production, and if they do, you probably want to have a more persistent figure than a line in the log file about it. Having counters allows the user to monitor this efficiently. Change-Id: Ic82c6baaf4cb88d07bc5cdc200f8279cf130f396
2017-12-14Add a new counter "rsl:ipa_nack" to count number of IPA related NACKsHarald Welte2-0/+6
Those NACKs (CRCX/MDCX/PDCH_ACT) shouldn't happen in production, and if they do, you probably want to have a more persistent figure than a line in the log file about it. Having counters allows the user to monitor this efficiently. Change-Id: I5edf979c9a2b4c9a5a60eef9f66c26da54f2bddf
2017-12-14Add new per-BTS "rsl:unknown" counter to count unknown RSL messagesHarald Welte2-0/+11
Change-Id: I268f222140fa5783e1d19f81fbd45614aaa4b8c4
2017-12-14Add per-BTS rate_ctr for total + failed number of RSL CHAN_ACTHarald Welte2-0/+8
Change-Id: I471b598af194dee78ebaa3414b6290c72d9bbcff