aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-10-15Set 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
2020-10-15LCS: 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
2020-10-15LCS: 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
2020-10-15add smlc.vty testNeels Hofmeyr1-0/+73
Change-Id: Icebc668205157758f693d0b6d026531a5d21192e
2020-10-15LCS: 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
2020-10-15BSSMAP 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
2020-10-15BSSMAP 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
2020-10-15BSSMAP RESET: move RESET-ACK into reset fsmNeels Hofmeyr5-10/+51
The Lb interface will need the same RESET-ACK logic. Change-Id: Idf4682319a0af5665e867dbc0515d1fe343d9daf
2020-10-15BSSMAP 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
2020-10-15BSSMAP 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
2020-10-05pcuif_proto: version 10: add support for IPv6 NSVCsAlexander Couzens2-10/+28
Introduce a address_type in the NSVC configuration pass the given protocol. The remote_ip is network byte order, the default encoding for in_addr and in6_addr. Related: Iae854875a45dbc29cd46a267ccaf60f1f2ac2973 Related: SYS#4915 Change-Id: I740be0a401612bb5ed4e8ccd7f4be8176b936449
2020-10-05pcuif_proto: version 10: add frequency hopping parametersAlexander Couzens2-13/+41
Related: SYS#4868, OS#4546, OS#4547 Change-Id: I5540fae66a116cbb25ec75b35145c36137146ffd
2020-10-05oml: encode IPv6 NSVC using the new OML attribute NM_ATT_OSMO_NS_LINK_CFGAlexander Couzens8-26/+115
The old IE NM_ATT_IPACC_NS_LINK_CFG didn't support IPv6 NSVC. Depends: Ic261bc43a07fa741b97a9c6ec5a9ed6f5ecae588 (libosmocore) Depends: I9e279bb20940c66eea5196f281184cb4f8a5cc5f (libosmocore) Change-Id: I6529876a3c1116a79dd624312243d8ae48a41fe2
2020-10-05ipa oml: tx OPSTART after unlocking, not beforePau Espin Pedrol1-4/+4
According to TS 12.21, when adminsitratively Locking an object, in general it should go into operative state Disabled. We don't really implement it this way right now, but keep it this way consistent in all objects. Furthermore, TS 12.21. Figure 2 describes vaguely that unlock procedure is done around same time where object attributes are set, which is before OPSTART. Change-Id: Icd4b3bb467f23c9ddfa56f6b6f8a55da1e574ab8
2020-10-03pcuif_proto: protocol 9: add missing fieldsAlexander Couzens1-0/+22
The protocol 9 was extended (compatible) with * app info request * suspend request (ETWS) * rach indition (add fields ts / trx) Only copy the relevant parts but no implementation. Related: OS#4766, OS#4767, OS#4768 Change-Id: Ia81310326b093a8e473b6c69045304667b3b60f1
2020-10-03pcu_sock: use tn as variable name to improve readabilityAlexander Couzens1-6/+6
Same as used in osmo-bts Change-Id: I5c8cf0e2d29fa4999983293401294ee0a94bfa30
2020-10-03remove unused signature gsm48_handle_paging_resp()Neels Hofmeyr1-2/+0
Change-Id: Ib221e34afe08d87e43ac7ddc73d6894bbe36dc4b
2020-10-03log MSC nr for opening new A connNeels Hofmeyr1-2/+2
Change-Id: Ie2df767197947b2d5ffeb882dc0827914975df88
2020-10-03tests: add missing *.vty to EXTRA_DISTNeels Hofmeyr1-0/+6
Change-Id: If29eb737040826d387b6a1aaa246cd867ad97cdd
2020-10-02cosmetic: tests/ctrl_test_runner.py: Fix trailing whitespacePau Espin Pedrol1-2/+2
Change-Id: Id4b0ddc72e6f0e080ac7deeba30aa9acf25a0fc0
2020-10-02abis_nm: Remove duplicated log linePau Espin Pedrol1-1/+0
Change-Id: I52ff3c7457ca9985bb4936a6ec48abe0aee07e71
2020-10-02abis_nm: Log no state change detectedPau Espin Pedrol1-1/+3
Change-Id: I15695b18ad7b31c2f9579813b76ecee36cce4ede
2020-09-30abis_nm: Log Rx Change Administrative State ACKPau Espin Pedrol1-0/+3
Change-Id: I165138634b1fdb982197afdac6d2d00a4d1e4074