aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-12-01cosmetic: remove duplicate loggingPhilipp Maier1-24/+2
The log output of the reset FSM duplicates lots of the built in FSM log output. Remove duplicate logging, use more expressive log messages where needed. Change-Id: Ia5af309207476291f88af47878dc1d32b2dada06
2017-12-01mgcp: do not fail silently on snprintf()Philipp Maier1-2/+1
The snprintf() that is used to compose the fsm name on an assignment request may cause a silent failure. The buffer is large enough to take the string under all circumstances. If snprintf() fails, this would mean we have some other serious problem. use OSMO_ASSERT in case the snprintf() fails, so the failure gets noticed. Change-Id: I3c36df8cfd0880c524244048a993cd136be41f56
2017-12-01mgcp: add missing switch casePhilipp Maier1-0/+8
In the beginning of the CRCX phase for the network does not distinguish between EV_MDCX_BTS_RES and EV_TEARDOWN, so a Teardown due to an error could be misinterpreted as a successful MGW response. Add missing case statement to distinguish CV_MDCX_BTS_RES from EV_TEARDOWN. Change-Id: I9bf49df167d94b33ad65d8b9382a01f160b5aec0
2017-12-01mgcp: use mgw assigned connection identifiersPhilipp Maier2-11/+20
osmo-mgw assigns connection identifiers which are returned with the response to the CRCX. store the assigned connection identifiers and use them to identify the connections. Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c Closes: OS#2648 Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab
2017-12-01mgcp: use hexadecimal digits in endpoint namesPhilipp Maier1-1/+1
The current implementation of osmo-mgw parses the numerical digit inside the endpoint name as hexadecimal number. also use hexadecimal numbers in endpoint names. Change-Id: I64a970d300b7290d50ec84b0640d5a321d903f5e
2017-11-30auth: remove obsolete VTY commandsPhilipp Maier5-21/+0
authentication (optional|required) is no longer needed, the related decisions are now made in the HLR. Change-Id: Ib6c6331cc86004c4862067031e4fcb12a6975b63
2017-11-30auth: remove unused structsPhilipp Maier1-35/+0
The following structs are no longer used/needed: - gsm_auth_algo - gsm_auth_info - gsm_auth_tuple - gsm_security_operation Change-Id: I93873a6cb980a54e03e719170e27a7e397236b77
2017-11-30sccp-lite: remove obsolete VTY commandsPhilipp Maier2-47/+0
remove obsolete vty commands: - token - auth-key - no auth-key Change-Id: I9101d750a424b8af46d603bc7c877229bbae8727
2017-11-30bssap: remove libosmo-legacy-mgcp dependancyPhilipp Maier1-4/+15
the functions mgcp_timeslot_to_endpoint() and rtp_calculate_port() which are used to calculate the port in the sccp-lite / non AoIP case are part of libosmo-legacy-mgcp. Unfortunately libosmo-mgcp and libosmo-legacy-mgcp cause problems when used at the same time. Replace the functions mgcp_timeslot_to_endpoint() and rtp_calculate_port() with a local helper function. Change-Id: Id10311332aeabd8fd3ba1922198e34708e04cef9
2017-11-29HO prep: pass gsm_network to gsm_bts_alloc() alreadyNeels Hofmeyr3-4/+5
Prepare for a future change that accesses bts->network during gsm_bts_alloc(). Currently, gsm_bts_alloc() takes a ctx parameter, and gsm_bts_alloc_register() then gets the gsm_network pointer and sets bts->network to it. All callers anyway pass gsm_network as ctx to gsm_bts_alloc(), and anything else would not make sense anyway. So enforce passing exactly gsm_network to gsm_bts_alloc() and already set the bts->network pointer from there. Prepares-for: I00870a5828703cf397776668d3301c0c3a4e033a Change-Id: Ie590c14aa08df4c4f345596b23e5226c5577057a
2017-11-29examples: add osmo-bsc-minimal.cfgNeels Hofmeyr1-0/+36
An upcoming VTY test requires a cfg that doesn't have handover values set. Prepare for that by adding a minimal BSC config. It is a version further stripped down from the Osmocom Network In The Box wiki page. Prepares-for: I00870a5828703cf397776668d3301c0c3a4e033a Change-Id: Ib68b550a0e9fbb7041e554f358054c0a7931404e
2017-11-29cosmetic: handover.h: use "#pragma once", declare structs, commentsNeels Hofmeyr2-8/+5
Use new #pragma style instead of #ifndef dance. Forward-declare all structs we're using pointers of. Move function comments to their definitions in the .c file. Change-Id: I3d43ec01897c0ef9eaf506e68d5a1ec1977f70ea
2017-11-29compiler warnings: add includes in abis_rsl.h, gsm_data_shared.hNeels Hofmeyr2-0/+2
Change-Id: Ic0b1410a352c7be399d16d5db7cfe7a62192df6f
2017-11-29cleanup: drop unused gsm_bts.roleNeels Hofmeyr1-2/+0
While this header was still shared among several code trees, we had this ROLE construct in place to exclude some parts in some trees. Since we're having one copy per code base now, the ROLE #ifdefs were dropped, also drop void *role. Change-Id: I4f0c337779d8e7266b6e02815d886728c4826bb9
2017-11-29compiler warnings: constify in abis_nm.cNeels Hofmeyr1-4/+5
Constify in- and output arguments for Parse Attribute Response Info chain to avoid compiler warnings, and more clearly indicate const data in the first place. Change-Id: Ib7d069fe1fda69e89dfd171cd76b1ed6d6db0ceb
2017-11-29compiler warnings: drop some unused variablesNeels Hofmeyr2-4/+0
Change-Id: I840b0cd8ee3e7c521e7c9053a992deeb9ec22ff4
2017-11-29cosmetic: mark gsm_objclass2mo as staticMax2-5/+1
It's only used once in the same file so there's no need to put it into global header. Change-Id: Id9674cad54bab6cc04475719678efc2c25d058a9
2017-11-29cosmetic: drop unused includeMax2-192/+0
Change-Id: I46a2af19358c0eb5d2f1644b10afd58c424a51e8
2017-11-29cosmetic: tighten function type signaturesMax4-11/+11
* change return type to bool * constify parameters The nm_is_running(), trx_is_usable() and ts_is_usable() always return boolean value and are always used as such anyway. The also do not change their parameters. Change-Id: I6a572fc78371c69f5308edbad0ebe15e143d0505
2017-11-29cosmetic: bsc_vty: Document bvci reserved valuesPau Espin Pedrol1-0/+1
Change-Id: I7a4374c3619cb83ef8beef594281f887d9fbf70a
2017-11-29cosmetic: bsc_vty: Fix trailing whitespacePau Espin Pedrol1-2/+2
Change-Id: I7089062285c40ec11af479c98b43d1d407397c82
2017-11-29auth: remove obsolete VTY commandsPhilipp Maier7-64/+0
Authentication is no longer done in the BSC, the variables that set the authentication policy and the IMSI regex have no longer any effect. Remove auth policy and authorized-regexp Change-Id: Ie31b921b5fd0af5501ec0c77c0f08089c10075e2
2017-11-29cosmetic: remove obsolete ROLE_BSCMax3-117/+0
It's leftover from the time when gsm_data_shared.* was actually shared with OsmoBTS. Nowadays ROLE_BSC is always defined so we can just drop it entirely and make working with gsm_data_shared.h slightly easier. Change-Id: I34fc9ee5955c14bbbde68d5499cf2acfd329afbc
2017-11-29OML: consider administrative state when reportingMax3-3/+8
Report state as degraded if BTS or any of its TRX are administratively locked. Change-Id: Ic9ee998d972ca870ce5d039c3ed95edb6ba8b36f Related: OS#2486
2017-11-24vty: Add cmd to configure 3g Early Classmark SendingPau Espin Pedrol6-3/+33
In state prior to this patch, "3G Early Classmark Sending Restriction" bit in SI3 rest octets was always set to H, which is a sane default as the policy to send the information is then controlled by "Early Classmark Sending Control" bit in the same octet. However, it seems Quortus SoftCore can have some issues decoding the option, so let's add a vty cmd to be able to disable it for those having any issues. Related: SYS#4021 Change-Id: Ic1afe071038a3bb5871d7ff40f665c8644f801ec
2017-11-24Use type bool for boolean fields in gsm48_si_ro_infoPau Espin Pedrol2-10/+10
Change-Id: Ic0981fca96f4927717ca335be1dab00a5d17fd6c
2017-11-24tests: Fix selection of python versionPau Espin Pedrol4-5/+8
According to documentation (and personal experience), AM_PATH_PYTHON selects the highest version of python, no matter if major version is different, which means if both python2 and 3 are available, 3 will be chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. As {vty,ctrl}_test_runner.py require python2 and are incompatible with python3, let's instead rely on the system having a "python2" binary available, which is the case in most distros. Change-Id: Id22e157d1bee453babdfa7ed04c506390b0f17bb
2017-11-23bsc filter: don't ignore imsi-allow on "global" filter levelNeels Hofmeyr1-3/+7
First off, there are "global" and "local" IMSI black/whitelist levels: "global" "local" VTY 'bsc' 'msc' for osmo-bsc VTY 'nat' 'bsc' for osmo-bsc_nat Both in osmo-bsc and osmo-bsc-nat, the "global" IMSI filter so far completely ignores all 'imsi-allow' rules it may contain. A comment in imsi_allow() proclaims actions that are missing in the code. Notably, in our example config osmo-bsc_nat.cfg, there is an imsi-allow on the 'nat' level, which with the code before this patch cannot have been effective in any way. Furthermore, on the "local" level the order is to check imsi-allow first, and imsi-deny after that. The comment says to do that in reverse order on the "global" level. There is no apparent reason for reversing. Add evaluation of imsi-allow directives on the "global" level, i.e. 'bsc' in osmo-bsc and 'nat' in osmo-bsc-nat, in the same order as on "local" level, to avoid confusion. Swap the comment to be consistent. Before this patch, to have effective imsi-allow, this config would be necessary for osmo-bsc: bsc access-list acl imsi-allow 999999999999999 access-list acl imsi-allow 9017.* access-list acl imsi-deny .* msc 0 access-list-name acl ... msc 1 access-list-name acl ... With this patch, imsi-allow also works on the "global" level: bsc access-list acl imsi-allow 999999999999999 access-list acl imsi-allow 9017.* access-list acl imsi-deny .* access-list-name acl msc 0 ... msc 1 ... Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f
2017-11-21bsc_init: fix Werror: define rc for 2quater with si2q_count == 0Neels Hofmeyr1-0/+1
src/libbsc/bsc_init.c: In function ‘rsl_si’: src/libbsc/bsc_init.c:153:2: error: ‘rc’ may be used uninitialized in this function [-Werror=maybe-uninitialized] return rc; ^ Change-Id: Iedad1efcb477c77db8c741777ea076761658c7d1
2017-11-20doc: add example configuration for osmo-mgwPhilipp Maier1-0/+3
osmo-bsc now uses osmo-mgw to switch the RTP streams, but there is no example configuration yet. Add the missing example configuration. Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf
2017-11-20reset: remove name variable from reset contextPhilipp Maier2-11/+9
The reset context contains a string buffer to allow for setting a human readable name, that is then displayed in the logs. Since OSMO-FSMs already have such a feature there is no need for an extra name variable. Use LOGPFSML and the name parameter of osmo_fsm_inst_alloc() to display the name of the FSM Fixes: Coverity CID#178664 Change-Id: I34511698923abec7545a6f3defd595f97b4bbeb1
2017-11-18add --enable-sanitize config optionNeels Hofmeyr1-0/+12
Change-Id: Ie6888cc29b9815d3dc7aa6673599a0d6cb010e6b
2017-11-15debian: remove doublicated project name in example filesAlexander Couzens1-1/+2
For example: /usr/share/doc/osmo-bsc/examples/osmo-bsc/osmo-bsc.cfg -> usr/share/doc/osmo-bsc/examples/osmo-bsc.cfg Change-Id: I8a9f45e72dd966ca3913b5483ff78039a3e472ea
2017-11-12osmo-bsc: Print NOTICE message on unimplemented BSSMAP UDTHarald Welte1-0/+4
When we receive unimplemented/unhandled message types, we shouldn't simply silently discard them, but print a log message for the benefit of the user. Change-Id: I65489578b1c214f193b1ce0e9ba59432dcd42a3e
2017-11-12mgcp: remove unused variablePhilipp Maier1-4/+0
The function handle_error asserts mgcp_ctx->conn to be non null, but it does not access it otherwise. remove unused variable conn Change-Id: I09851c957395d1ddb2f9471b99ffc091bc250404
2017-11-12mgcp: add missing out statePhilipp Maier1-1/+1
Even in the very early ST_CRCX_BTS phase, the error handler may decide to go to ST_CALL in order to initate the termination of a possibly half open connection. Add ST_CALL to the out state list in ST_CRCX_BTS Change-Id: Ic67aa7c67a4e98a38bff156be3ebf612012eb842
2017-11-12cosmetic: replace term MGCP-GW with MGWPhilipp Maier1-7/+7
The term MGCP-GW is deprecated, use now MGW Change-Id: Ibccda7e95c42267ce5f44e9fc4256a0083b6f68f
2017-11-12cosmetic: reorder case listPhilipp Maier1-2/+2
the switch statement in fsm_send_assignment_complete() has the default case at the beginning. Move the default case to the end to match common coding style rules Change-Id: I360842fe899b95972c44da3cb74a3dc51b379fdc
2017-11-12cosmetic: remove distracting newlinePhilipp Maier1-1/+0
Change-Id: Iedc883b0f5760f004c51d7cf15328eb8c4d472db
2017-11-11configure.ac/debian: Require libosmo-mgcp-client-dev >= 1.2.0Harald Welte2-2/+2
We recently started to use some symbols that were not available in libosmo-mgcp-client-dev 1.0.0 or even 1.1.0. Let's depend on a newly tagged version of libosmo-mgcp-client. Change-Id: Ic5d3add1c69181aabbdb684a01a6ba7bcea1fe2c
2017-11-10use osmo_sccp_inst_addr_name() instead of looking up ss7Neels Hofmeyr1-8/+4
Depends: libosmo-sccp I70ec5c8b42682a23f11a5820431c7e34e225709b Change-Id: Idb451597c724ac87a391121cebd0b0a927dd49d1
2017-11-09osmo-bsc vty: be fatal for addressbook entry errorsNeels Hofmeyr1-10/+8
So far, the config would log an error upon config parsing, and then continue to use defaults, which is super easy to miss. On errors, return CMD_ERR_INCOMPLETE to abort the program in a config parsing error. Be fatal for non-existing addressbook entries and for using address book entries from mismatching cs7 instances. Though it is mixing in cosmetic changes, add "Error:" to the output and arrange the erratic name to the end of the message, as is customary for error messages. Related: libosmo-sccp I2f71b9c4dd30f919d2054da81283dd7035f44f60 Change-Id: Ia4e58902a2d3757b266cf35ac89f256cfb8f0eec
2017-11-09osmo-bsc: SCCP addrs: default only if unset, reject invalidNeels Hofmeyr1-32/+25
So far, if the user entered an invalid SCCP address in the config, the osmo_bsc_sigtran_init() code simply replaced that with the default, i.e. running with a completely different address than the user may intend. Use the default SCCP addresses only when they are unset by the user. Default MSC addr: set directly, do not detour via cs7 instance PC. The default MSC SCCP addr is just a point code + SSN, deriving it from the cs7 instance first is a confusing step. Just set the PC and SSN, and done. Using default addresses does not constitute an "auto configuration": if we set up a cs7 instance automatically, we do not want to have to create a second one automatically, to prevent "auto-confusion", and want to bail instead. But for each MSC on its own, using default SCCP addresses makes sense and is orthogonal to automatic cs7 instance creation. Hence drop the auto config semantics from the default SCCP address parts. Always validate the SCCP addresses we will end up using, and bail immediately if they are erratic. i.e. don't overwrite a non-empty invalid SCCP address with defaults, but straight bail. Beneficial side effects: - Fix some grammar ultra confusion in log messages. - Add context: log the MSC number the logging refers to. - Drop code dup: since we're always logging the used SCCP addresses, might as well log those once, unconditionally, in the end. Change-Id: Iadbc2e9740457e1b389b7e7ad9c94274e7d8cb11
2017-11-09osmo-bsc RESET FSM: use distinct struct namesNeels Hofmeyr1-10/+10
Use distinctive struct names: s/fsm_/fsm_bsc_reset/. They only exist in the static context and it works fine, but the mad fsm-to-dot.py script breaks with identical struct names. Can't hurt to have unique names. Change-Id: I986377a74ccd83ca3b52e7f058bbc9115f05f741
2017-11-09debian: Increase required libosmo-legacy-mgcp-dev versionHarald Welte1-1/+1
Use the same version requirement as in configure.ac. Change-Id: I2dc21e89bd676a754bc24a6995c4f9c0c4727d57
2017-11-09debian: Add dependency to libosmo-mgcp-client-devHarald Welte1-1/+2
Since Change-Id Ia2882b7ca31a3219c676986e85045fa08a425d7a, osmo-bsc uses osmo-mgw and utilizes libosmo-mgcp-client to talk to it, so let's make sure the Debian control file states that dependency. Unfortuantely, this still won't make the osmo-bsc debian package build again, as in fact the above commit uses symbols not even present in 1.0.0 or 1.1.0 releases of libosmo-mgcp-client :( So we first need a new release of that library, and we need to update the configure.ac and debian/control version requirements in osmo-bsc before this is fixed. This needs to be automatized in the future. Change-Id: I41a0378d069f5383904cf92cc415c19beba26168
2017-11-07fix build: bssap test broke by undefined referencesNeels Hofmeyr1-0/+3
After the bssap test in Ie934c5d229140a89763bf2efff86d6a3766cd351, the subsequent commit Ia2882b7ca31a3219c676986e85045fa08a425d7a was not tested against the latest head, and its breaking bssap_test was not caught. Fix current master of osmo-bsc's 'make check' target: add osmo_bsc_mgcp.c and libosmo-mgcp-client dependencies to bssap_test linkage. Change-Id: I28719d267452f66d65581c43433e24a9f46cf7dc
2017-11-07mgcp: use osmo-mgw to switch RTP streamsPhilipp Maier13-67/+1324
osmo-bsc currently negotiates the RTP stream directly with the BTS and reports back the RTP IP/Port on the BTS. This works fine for a single BTS, but for Handover the port/ip pointing to the MSC side must not change, so an entity in between the BTSs and the MSC is required. Integrate the mgcp-client and use osmo-mgw to switch the RTP streams. Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736 Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a
2017-11-07bssap: paging: page entire BSS for unimplemented cell id listNeels Hofmeyr8-9/+240
3GPP TS § 08.08 defines various types of Cell Identifier List IEs, but we only implement "entire BSS" and "one LAC". If the MSC sends a Cell Identifier List that we don't implement, it is best for interoperability to page the entire BSS and post a log message instead of rejecting the paging altogether. Apart from resource management, it is not harmful to page more than the MSC requested; if use of resources becomes an issue, the log message will guide towards the solution of providing an actually implemented Cell Identifier List IE. Upon IE length that is other than we expect, log the error, but also fall back to paging the entire BSS. Overall message length correctness has been checked earlier. The particular case observed is that a Huwaei MSC sends a LAI for Cell Identifier List (MCC+MNC in bcd, followed by a LAC), parsing of which we may want to add later. Improve logging: identify the subscriber that is being paged. Coding style: use a switch() statement to clarify flow and provide a place to add more implementations later. Add regression test bssap_test.c: fabricates BSSAP Paging messages with the two implemented Cell Identifier List IEs as well as the unimplemented LAI identifier, verify the resulting paging LAC in wrapped function and stderr. Change-Id: Ie934c5d229140a89763bf2efff86d6a3766cd351
2017-11-02Check OML state per-BTSMax4-10/+10
To properly decide if a given OML link is degraded we have to use BTS-specific information about MO state. * move check function into BTS-specific part * add generic wrapper Related: OS#2486 Change-Id: Iddc7a4d20fbb95a6566eed1487a12733e5adb9e2