aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2 daysnm_channel_fsm: Fix innocuous transition not permitted log errorHEADmasterPau Espin Pedrol1-0/+1
Event NM_EV_OML_DOWN in allstate will transition to Disabled NotInstalled state. In the case where that is the current state, there's really no change but we didn't allow the transition. Let's allow it since it doesn't hurt and get rid of error messages when a BTS disconnects. Fixes: OS#4831 Change-Id: Ia5b7c88ff89e68ec5086d24f6ee20a8b3b2d994d
5 daysmain: add --vty-ref-mode, use vty_dump_xml_ref_mode()Vadim Yanitskiy1-11/+34
Change-Id: I1a89829a29dd38fe69002c898503d76a3376a874 Depends: Ie2022a7f9e167e5ceacf15350c037dd43768ff40 Related: SYS#4910
9 daysuse osmo_fd_setup() whenever applicableHarald Welte4-33/+15
Change-Id: Iee26d14e997cc77c49b8fc1a9f388e4e2f783105
10 daysbts: move rate counter / stat item definitions from *.h to *.cVadim Yanitskiy2-168/+392
A header file should only contain declarations, not entire definitions. The fact that we have 'static const struct ...' definitions in a header file means that very C file including this header file will get its own private copy of the entire definition. The header file should only include declarations, while the actual non-static definitions should go to a *.c file. Let's fix this. Also, take a chance to improve readability and apply more consistent formatting (similar to 'struct hf_register_info[]' in Wireshark). Change-Id: Ib5949879902acbe1edda577477d9d51a2cc425d1 Closes: OS#4816
11 daysipa: Fix use of null pointer in log macroPau Espin Pedrol3-5/+5
Fixes: Coverity CID#214962 Fixes: Coverity CID#214963 Change-Id: Iafea915dbbbfbaa710fb5899cb9be5e507ba384c
12 daysdrop features 'core-location-area-code' and 'core-cell-identity'Neels Hofmeyr5-69/+13
This feature apparently assigned a fixed LAC and CI to a specific MSC, but looking at the implementation was obviously not useful. Keep the vty commands for legacy compat, now without effect besides logging an error via vty_out(). Related: OS#4751 Change-Id: I6bee704e7e5d5b6b86473323bae1fa9fce9241ee
13 daysabis_nm: Log Opstart NACK with error loglevelPau Espin Pedrol1-1/+1
Change-Id: I586c3dd3547d35bca3d11f66dfad322e22c09068
13 daysOML: Stay compatible with older osmo-bts versionsPau Espin Pedrol6-17/+22
Older osmo-bts versions (before FSMs) tended to mimic broken behavior from nanoBTS. As so, we detect it because SiteMGr becomes Enabled by default as in nanoBTS, and hence we can manage them also by expecting no Offline state and sending Opstart (and hence finally transitting to Enabled) during Dependency state. Change-Id: Iaa036a2936f609b9b9721b2b4ad8d6deaf023f42
13 daysIntroduce Radio Channel FSMPau Espin Pedrol16-16/+905
Change-Id: Iddc008c5737afb2fddd32c628bc5278056a64d89
13 daysIntroduce NM RadioCarrier FSMPau Espin Pedrol18-30/+466
Change-Id: Ieed61d1fb1e896db42545c2c3421b20cb41ad549
13 daysIntroduce NM BaseBand Transceiver FSMPau Espin Pedrol15-13/+466
Change-Id: Ib4d35316c52eb4c71ea0d352a1e06fd5e600fe08
13 daysIntroduce NM BTS FSMPau Espin Pedrol18-12/+489
Change-Id: I7756a8ce90b6cc8a502b5665889a7987d7f749cb
13 daysIntroduce NM BTS Site Manager FSMPau Espin Pedrol21-19/+518
Change-Id: Ic001ce6ebeff6f51470ef58140b0235f4a30265e
13 daysSet all NM OML objects to Locked by defaultPau Espin Pedrol3-2/+2
Before they were set with a value of 0, which had no related enum field, but since in general all comparsions are done against NM_STATE_UNLOCKED they also hold valid. The major change in behavior with this patch is upon OML link down, where gsm_bts_mo_reset() is called on all objects. This way, upon OML re-establishment we have again all objects as Locked again, which is the expected default value as per TS 12.21. Change-Id: I68ae0bc51a565f903b47cf72f3e3dd6f1a2d2651
13 daysLCS: Lb startup: no need to re-use existing SCCP userNeels Hofmeyr1-6/+1
This bit of code was borrowed from MSC handling, where multiple MSC might tap on the same SCCP user. There is only one remote SMLC, so there is no need to osmo_sccp_user_find(), just bind it and be done. Change-Id: Ia05c27c13dfb9df4f89c87b8477eea4e62fbe349
13 daysLCS: add proper BSSMAP-LE RESET re-using new generalized reset FSMNeels Hofmeyr2-28/+64
Previous commits to generalize the a_reset FSM prepare for this commit: use the same reset FSM for the Lb interface. Change-Id: I8c03716648f8c69d12d8f0a0bcec14f040d7cff2
13 daysadd smlc.vty testNeels Hofmeyr1-0/+73
Change-Id: Icebc668205157758f693d0b6d026531a5d21192e
13 daysLCS: disable Lb interface by default, add vty 'smlc' / 'enable'Neels Hofmeyr3-8/+114
To not modify previous SCCP behavior of OsmoBSC, keep the Lb interface disabled by default. The following configuration enables the Lb interface: smlc enable Change-Id: I01314a29a2cad6f325d9f4687a9dedca6b90a3ce
13 daysBSSMAP RESET: also accept conn cfm events during ST_DISCNeels Hofmeyr1-0/+13
We don't really expect connection attempts during ST_DISC, but if the user happens to dispatch those events for whatever obscure reasons, treat them instead of erroring about an unallowed event. Change-Id: Ic7c60a40ff25ae647ee659259dfea769bc4592e4
13 daysBSSMAP RESET: tweak loggingNeels Hofmeyr1-2/+2
It is not particularly interesting to see a periodic "Sending RESET" to an unconnected MSC in the logs. De-escalate to LOGL_INFO to make it easier to configure away these logs. Sending a RESET ACK is much more interesting, because it indicates that a connection has been established. Note that additionally, there will be a log on DMSC LOGL_NOTICE whenever a link goes up or down, so the RESET logging does not add much crucial information for operation maintenance, see a_reset_link_up() / a_reset_link_lost(). Change-Id: I86d67d19e20135c4944613c8e99580ef0e22ea8d
13 daysBSSMAP RESET: move RESET-ACK into reset fsmNeels Hofmeyr5-10/+51
The Lb interface will need the same RESET-ACK logic. Change-Id: Idf4682319a0af5665e867dbc0515d1fe343d9daf
13 daysBSSMAP RESET: move cancel-paging call to osmo_bsc_sigtran_reset()Neels Hofmeyr3-5/+6
So far we would cancel ongoing Paging for a given MSC only after receiving a RESET message from that BSC. However, the typical operation would be that OsmoBSC *sends* a RESET and receives a RESET-ACK. Instead, move the call to within osmo_bsc_sigtran_reset(). This is also called when OsmoBSC considers the A-interface link to be lost, from the a_reset.c code, after multiple SCCP connection failures. Change-Id: Ia14b916be56563d18632c69a833084e71799a468
13 daysBSSMAP RESET: generalize a_reset FSMNeels Hofmeyr12-191/+284
Separate the a_reset FSM implementation from BSSMAP and MSC specifics, so that it can be re-used on the Lb interface. Move the FSM implementation to bssmap_reset.c and tweak, to match common practices we have generally established in our osmo_fsm implementations. Keep a_reset.h and a_reset.c and redirect to bssmap_reset.c. A difficulty is setting a proper logging category: the FSM definition allows only one fixed logging category for FSM state transitions and events. Ideally, the BSSMAP reset fsm would log on DMSC, and the BSSMAP-LE reset fsm would log on DLCS. Since that is not possible, introduce a separate DRESET logging category. This in fact matches an item on my wishlist, because if a given MSC is configured but currently not connected, the previous RESET FSM would continuously "spam" log LOGL_NOTICE messages indicating that it is resending RESET, and I often want to silence those messages without silencing the entire DMSC category. This is now easily possible by setting DRESET logging to LOGL_ERROR. There is additional "link up" / "link lost" logging on DMSC, so all interesting info is still visible on DMSC. Change-Id: Ib3c3a163186c40a93be0dea666230431172136df
2020-10-12contrib/jenkins: Enable parallel make in make distcheckPau Espin Pedrol1-2/+2
Change-Id: I8489de493a9f653250d362250b6f7b31277c7e23 Related: OS#4421
2020-10-10add doc/location_services_ta.mscNeels Hofmeyr2-0/+50
Change-Id: I9372c588bf8ee68a3995102b295198f35e32eec8
2020-10-09remove unused osmo_bsc_reset.hNeels Hofmeyr1-34/+0
Change-Id: Ib315da03d1731a0e79d09ac886e363890ac815b4
2020-10-09LCS: allow RSL EST IND during GSCON_ST_ACTIVENeels Hofmeyr1-1/+10
If an A-interface conn is already active (for Location Services), an RSL EST IND may arrive during GSCON_ST_ACTIVE. Pass it on instead of rejecting. This allows establishing Layer 3 on an already active A-interface conn. Change-Id: Ib18a12f8b8bcfb356188b2c0d97d555c1850f23e
2020-10-09LCS: implement the bulk of Location ServicesNeels Hofmeyr30-17/+1858
Depends: I4d7302a4853518916b6b425e710c10568eb2ffe5 (libosmocore) Change-Id: I28314ba97df86a118497e9b2770e2e6e2484e872
2020-10-08gsm_08_08: fix unreachable code in parse_powercap()Philipp Maier1-0/+1
The function parse_powercap() contains a nested switch case statement that is used to populate the variables lu and pwr_lev. Those variables are used at the bottom of the function later. Unfortunately the (outer) switch case that consumes the pdisc variable does not put a break; at the end of its only case "GSM48_PDISC_MM", which eventually causes a fall through to the default case, which simply returns. Since this can not be intended, lets add a break to make the bottom code reachable in case lu and pwr_lev are successfully populated. Change-Id: I48331cca784d8fa3a5904f2c4cf1555622b319e8 Fixes: CID#214886
2020-10-08LCS: SCCP next conn id: prepare Lb-interfaceNeels Hofmeyr4-24/+62
When adding the Lb interface, it is necessary to determine an unused conn id across *all* SCCP users. Prepare adding Lb by moving conn id creation out of the gscon code and generalizing. Change-Id: I12fcb18f6e4380f72929cfe7681bac05330a8c9a
2020-10-08vty: add attributes to VTY commands indicating when they applyVadim Yanitskiy5-912/+1190
Change-Id: I3bf9223295fc4a2fcb4046a1f29f792ff6a41d51 Related: SYS#4937, OS#1601
2020-10-08RSL/BSSAP: fix: properly convert between RSL Link ID and DLCIVadim Yanitskiy2-4/+27
Data Link Connection Identifier (DLCI) is defined in 3GPP TS 48.006, section 9.3.2, and coded as follows: .... .SSS - SAPI value used on the radio link; CC.. .... - control channel identification: 00.. .... - indicates that the control channel is not further specified, 10.. .... - represents the FACCH or the SDCCH, 11.. .... - represents the SACCH, other values are reserved. RSL Link Identifier is defined in 3GPP TS 3GPP TS 48.058, section 9.3.2, and coded as follows: .... .SSS - SAPI value used on the radio link; ...P P... - priority for SAPI0 messages; CC.. .... - control channel identification: 00.. .... - main signalling channel (FACCH or SDCCH), 01.. .... - SACCH, other values are reserved. As can be seen, CC bits in both DLCI and RSL Link Identifier are coded differently. Therefore, we cannot just assign one identifier to another, we need to do conversion. I noticed that osmo-bsc indicates DLCI '01000011'B for SMS messages sent over SACCH/F (SAPI3), and this is wrong because '01'B is reserved. Let's fix this. P.S. Interesting coincidence: section 9.3.2 in both documents. Change-Id: If4d479a54cad467f53b49065c1c435a4471ac7d2 Related: Ica69ae95b47a67ba99ba9cc36629b6bd210d11e4 Related: OS#3716
2020-10-07LCS: implement re-use of existing A-interface connNeels Hofmeyr3-23/+69
Location Services brings a new scenario to OsmoBSC: the MSC may create an A-interface conn for a subscriber without an lchan being established (N-CONNECT from MSC to BSC, so far only for an incoming inter-BSC handover). If an MS becomes active while an A-interface conn is already established, associate with an existing conn. Change-Id: I42290f519a419ed7e8dd02a5ed0a5261b30a51e6
2020-10-07cosmetic: fix naming of GSCON_EV_A_CONN_REQ -> GSCON_EV_MO_COMPL_L3Neels Hofmeyr4-6/+6
The N-CONNECT.req on the A interface is a possible *consequence* of the event being handled, namely the incoming RSL ESTablish INDication containing the Complete Layer 3 message: dispatched by bsc_compl_l3(). If an (LCS related) connection is already present on the A-interface when the lchan is established, there will be no N-CONNECT but an N-DATA sending the Complete Layer 3. See BSC_Tests.TC_cm_service_during_lcs_loc_req(). Change-Id: Ic43aabeb0d3c58ac62249ad9d3718363d32508f9
2020-10-07bsc_subscr_name: print both IMSI and TMSINeels Hofmeyr3-37/+44
Always use a format containing only osmo_identifier_valid() characters. Change-Id: I6cdbaad2f0d0552f697440bf9a75bef36d59a597
2020-10-07introduce osmo_use_count for bsc_subscrNeels Hofmeyr12-106/+155
During LCS development, I'm getting use count bugs and would like to see use token strings to figure it out. Change-Id: I29bf60059d4cf7bb99a00753e6cdc149baf95f94
2020-10-07LCS: add paging reason, return in paging_request_stop()Neels Hofmeyr4-28/+63
To distinguish between the CN requiring a Complete Layer 3 response, or just the BSC requiring a TA, allow recording a separate for-LCS paging reason. Change-Id: Ib28d1599ae4e483727398859d07de4490fbc31f0
2020-10-07refactor paging: add bsc_subscr to bsc_paging_paramsNeels Hofmeyr3-28/+23
Get a bsub once at start of paging. Change-Id: I13621cd51d934846ff6556e1f2f8839da73a5dbb
2020-10-07refactor paging: introduce bsc_paging_start()Neels Hofmeyr3-3/+10
Allow starting a paging from elsewhere than a BSSMAP Paging Request. For upcoming Location Services (LCS), a BSSLAP TA Request from the SMLC may require triggering a Paging. Change-Id: Iaff91584699d163bd1963927280ff3a8ddd43073
2020-10-07refactor paging: introduce bsc_paging_paramsNeels Hofmeyr3-109/+111
For LCS, I would like to add an enum indicating the paging reason. Instead of modifying extremely many function signatures to pass the reason across all levels of paging, introduce a struct combining these. Change-Id: I27ca78fc6ff8ef1101554c0a8429e34945ca6f3c
2020-10-07compl l3: move all message parsing out of bsc_find_msc()Neels Hofmeyr1-23/+10
I lost count of how many times the gsm48_hdr got parsed from the msg in the same compl l3 code path. Here is one less. Change-Id: I9f15b3e5e7352ef90b4598dadf2ebc0d2665f069
2020-10-07compl l3: move Paging Response handling out of bsc_find_msc()Neels Hofmeyr3-117/+62
Instead of iterating the llist of gsm_paging_requests first to find an MSC, and then again right away to mark the paging as served, do both in the same step. Change-Id: I447e61afc9934f3a5a82f6076e41c155d3328041
2020-10-07compl l3: populate conn's bsc subscr from MINeels Hofmeyr2-5/+7
Set conn->bsub as indicated by the Mobile Identity. Now the 'log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);' becomes useful. Upcoming patch to support Perform Location Request will use the subscriber to retrieve an already established conn via the bsub. Drop fixme in gscon_fsm_init(), MI now extracted and id updated. Change-Id: I00d4c7e8284b745368a432a7ec176aa99f79db47
2020-10-07compl l3: allocate conn in gsm_08_08.c, not gsm_04_08_rr.cNeels Hofmeyr6-21/+23
Move conn allocation to bsc_compl_l3(), from gsm0408_rcvmsg(). Drop dispatch of GSCON_EV_A_DISC_IND, because a) we did not receive such DISC.IND, and b) the lchan release will discard the conn in the regular fashion. In upcoming LCS patch, bsc_compl_l3() will decide whether to allocate a new conn or whether a conn from a Perform Location Request already exists for the subscriber. In this patch, it becomes clear that the conn->bsub is always NULL in bsc_compl_l3(), and that the 'log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub);' never has the intended effect. An upcoming patch will change that. Change-Id: I92af0f0d54c4282d782f2b29d524a64006c3b674
2020-10-07compl l3: cosmetics around Create Layer 3Neels Hofmeyr1-24/+26
Move getting the CGI closer to where it is used. Use a use_scl pointer to remove a bit of code dup. Drop logging for tx Compl L3, there is plenty logging later in osmo_bsc_sigtran_open_conn(). This cosmetically prepares future changes for LCS handling. Change-Id: If7a7d0fe857797d569968e694bf20818d7472bcd
2020-10-07compl l3: parse Mobile Identity onceNeels Hofmeyr1-28/+27
Move two calls of osmo_mobile_identity_decode_from_l3() from bsc_find_msc() and handle_page_resp() out into a single call in bsc_compl_l3(). Prepares cosmetically for upcoming LCS patch. Change-Id: I26950b63621417da0ed3125d0dc0b06cf015cb4a
2020-10-07compl l3: separate paging handling from bsc_scan_bts_msg()Neels Hofmeyr1-77/+53
bsc_scan_bts_msg() essentially updates the MS power class for LU and CM Service, and also stops the paging and counts the response for a Paging Response. Separate that. Reduce code dup by one common parse_power_cap() function for both LU and CM Service. Call handle_page_resp() separately. (Upcoming patches will add more reasons to read the gsm48_hdr's pdisc and mtype in bsc_compl_l3().) Change-Id: If14284494c74a396fabebd79da8079342e65dcc2
2020-10-07gscon_bssmap_clear(): guard against NULL mscNeels Hofmeyr1-0/+6
Change-Id: I95b16cebb6ff78649f72a09b5d6c7c7e403233fa
2020-10-07bsc_vty: parse the return code to make coverity happyAlexander Couzens1-2/+2
The missing return code isn't a problem atm because remote.af is checked and remote.af is only set when osmo_Sockaddr_str_from_sockaddr() returns success. However check the return code to be safe also in the future. Found-by: Coverity Fixes: CID#214863 Change-Id: I621360cab1e12c22248e33d62a9929995053ce04
2020-10-07bsc_vty: cfg_bts_gprs_nsvc_rip: add missing breaksAlexander Couzens1-0/+2
Found-by: Coverity Fixes: CID#214862 Change-Id: I0966bfd3948fef4dd2a4465aae0927bff6437e43