aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-10-21bssmap_handle_cipher_mode(): Don't sent reject if !connHarald Welte1-1/+1
We can only send a reject response if we have a valid conn. Change-Id: I0ea535f494173ad4996c70dc82d7f69455e4e15e Fixes: Coverity CID#188824
2018-10-21ipaccess-config: Fix open() return value checkingHarald Welte1-2/+2
open() returning 0 is valid, but negative values indicate errors. Change-Id: Id7e62116bfee550ef9906e78a0fce6f28af27a97 Fixes: Coverity CID#57865
2018-10-21gsm_08_08: do not include zero length speech codec list.Philipp Maier1-1/+11
When COMPLETE LAYER 3 INFORMATION is generated, it may include a speech codec list that contains 0 elements (which is legal). The specification requires the speech to be include if the network supports an IP based user plane interface. It could be argumented that if no codecs are available, the ip based user plane interface is not supported and therefore the spec does not require the speech codec list IE to be included for those cases. Lets check if the speech codec list has 0 elements and if its zero length, lets omit it completely. - check for zero length speech codec list. - omit speech codec list if it has zero elements Change-Id: I07339322a71376e986a2d75b7bc1f552eafd02b5 Related: OS#3657
2018-10-21handover_start_inter_bsc_in(): Uninitialized variableHarald Welte1-1/+1
This only afffects a log statement, so not really an issue. Change-Id: I8e5b164194855f78a266c1a4441730cc6c378d11 Fixes: Coverity CID#188829
2018-10-21range_enc_determine_range(): Don't dereference array on size=0Harald Welte1-0/+4
Change-Id: I5bbb10af8b8e8ebc22bf79f5468e71a41b5e74b3 Fixes: Coverity CID#182710
2018-10-17gsm_08_08: allow zero length speech codec lists in compl l3 info.Philipp Maier1-6/+1
The COMPLETE LAYER 3 INFORMATION message contains a an Codec List (BSS Supported). When generating the compl l3 info msg, we check if the speech codec list that we have generated before has at least one element. If it has 0 elements we abort immediately. However, speech codec lists with 0 elements are permitted by the spec, so we should remove the checks as there are corner cases where voice support is intentionally unavailable. - Remove check for zero length speech codec lists. Change-Id: Id7332e5273ff0efb85043dd1e1bb804cfe2db944 Depends: libosmocore I1eb1f4466b98bdd26d765b0e4cc690b5e89e9dd6 Related: OS#3657
2018-10-16vty 'show bts'/'show trx': display IPs and portsOliver Smith1-2/+18
This quickly allows knowing which IP a BTS is using in order to SSH into it. Example output: OsmoBSC> show trx ... Baseband Transceiver NM State: Oper 'Enabled', Admin 'Unlocked', Avail 'OK' ip.access stream ID: 0x00 (r=192.168.1.178:34090<->l=192.168.1.37:3003) ... OsmoBSC> show bts ... Paging: 0 pending requests, 50 free slots OML Link: (r=192.168.1.178:57692<->l=192.168.1.37:3002) OML Link state: connected 0 days 0 hours 0 min. 17 sec. ... Related: OS#3145 Change-Id: I37f020fcdb68cafcdbdb621808483d1dd996354f
2018-10-16remote-BSS neighbors: allow only one cell IDNeels Hofmeyr2-21/+112
I believe I have initially misinterpreted the idea behind sending a Cell Identifier List in BSSMAP Handover Required messages. Instead of associating N Cell Identifiers with one ARFCN+BSIC, the idea is to add up N separate ARFCN+BSIC's Cell Identifiers into a list. To keep the door open for future code simplification, make sure to allow only one Cell Identifier per remote ARFCN+BSIC on the VTY UI. Related: OS#3656 Change-Id: Ifb9212fede2333ad68db94188b5cda4fcabe02f8
2018-10-12handover_fsm: adjust inter-BSC HO failure handling to specNeels Hofmeyr1-2/+33
Inter-BSC outgoing lacked the required BSSMAP HO Failure dispatch. Not all cases should send BSSMAP HO Failure, name the relevant spec paragraphs in comments and adjust handling. Related: osmo-ttcn3-hacks If772dbbc5f9790d3f911465e1303dd0a99811154 Change-Id: I0980cacb9713e41a1eef3a0a7f6cc892e8a20da5
2018-10-12lchan_fsm: notify conn of released lchan upon RF ReleaseNeels Hofmeyr1-0/+7
Related: osmo-ttcn3-hacks If772dbbc5f9790d3f911465e1303dd0a99811154 Change-Id: I7621616c24588c2db15ad1ae7ca68cfa0fb76f66
2018-10-12handover_decision_2.c: drop redundant debug_candidate() argsNeels Hofmeyr1-12/+14
No functional change. Change-Id: Ida186946f40d30f4d9ed94d9c1ff9bdb70048626
2018-10-12handover_decision_2.c: find_alternative_lchan: drop gotoNeels Hofmeyr1-11/+9
Don't goto the function end just to log something. Rather log right away and exit early. Change-Id: I6558a6948e8973cc91dae240375af074a5f5547e
2018-10-12handover_decision_2.c: tweak ho candidate loggingNeels Hofmeyr1-49/+65
Use a common LOGPHOCAND() to transparently log both local and remote candidates. Change-Id: I694e3832c55b4e972e05422e5e4508a74a222a71
2018-10-12handover_decision_2.c: tweak commentsNeels Hofmeyr1-2/+3
Change-Id: I8bae3431dfaf23301e72f8f572286753b63a99b9
2018-10-12lchan_fsm: fix failure handling: notify conn when releasedNeels Hofmeyr1-0/+3
Usually, conn->lchan is set to NULL before/upon releasing it. However, if the lchan is still associated with a conn upon/after release, make sure the conn realizes it has no lchan and sends a BSSMAP Clear Request to the MSC. lchan_reset() is the last step before an lchan is fully unused. In there, make sure to notify any conn that might still be associated, with gscon_forget_lchan(). lchan_cleanup() does the same, but in fact this is only called when an lchan is *deallocated*, but instead it usually merely goes to the UNUSED state. It may make sense to call gscon_forget_lchan() sooner, e.g. when entering a releasing state. This here nevertheless is a final safeguard. Related: osmo-ttcn3-hacks If772dbbc5f9790d3f911465e1303dd0a99811154 Change-Id: I88337a18246c44ba48da64bb611a3cbb647a750e
2018-10-12subscr conn: properly forget lchan before releaseNeels Hofmeyr1-8/+22
Clear all lchan->conn pointers when the subscr conn code is choosing to release an lchan, with gscon_release_lchan(). Rationale: when an lchan releases in error, it should trigger the conn to be notified and cause a BSSMAP Clear. However, if the conn is actively requesting for an lchan release, it is already taking care of the situation. Related: osmo-ttcn3-hacks If772dbbc5f9790d3f911465e1303dd0a99811154 Change-Id: I4fd582b41ba4599af704d670af83651d2450b1db
2018-10-12gscon_forget_lchan(): Clear Request iff no lchans remainNeels Hofmeyr1-1/+3
Send a BSSMAP Clear Request only if absolutely no lchan remains associated to the conn, anywhere (Assignment, Handover as well as primary lchan). Conceivable would be a situation where e.g. we're in handover and a new lchan is ready, when just at a time where it doesn't matter anymore the old lchan fails. We could just carry on with the new one then. Change-Id: Ibd8e38ccf7759b8834efdedf742c46c227b26e91
2018-10-12gscon_forget_lchan(): no Clear Request after Clear CommandNeels Hofmeyr1-1/+3
Send a BSSMAP Clear Request only if we are not already in ST_CLEARING, i.e. haven't received a BSSMAP Clear Command yet. Related: osmo-ttcn3-hacks If772dbbc5f9790d3f911465e1303dd0a99811154 Change-Id: Idc749068580da45e821e0af04cfa14cc7ce5c432
2018-10-12fix counters for inter-BSC outgoingNeels Hofmeyr1-4/+4
Fix copy-paste error that resulted in counting outgoing inter-BSC HOs as incoming ones. Change-Id: I188b5db9e98c76153fdfb6f864d2cbfaea77bd5d
2018-10-12debian: Require libcdk and install meas_vis osmo-bsc-meas-utilsDaniel Willmann2-0/+2
Change-Id: Ibe977a92acb93a78e323a40f53d653059b07bc0f
2018-10-10codec_pref: also check physical channelsPhilipp Maier2-4/+42
At the moment codec_pref only checks the codec configuration, but it does not check if there is actually a matching physical channel available. This should be checked too we must make sure that the codec we select fits the physical channels available on the BTS. Change-Id: I2d29dfed450e5ef93c26ed5ec9fdc0730eb3d7dd Related: OS#3503
2018-10-10codec_pref: cosmetic: seperate half/full rate determinationPhilipp Maier1-21/+36
The function match_codec_pref determines whether a permitted speech value belongs to a half-rate or full-rate codec. Lets seperate this into a separate function. Change-Id: Iec1db4621ba5a09bc0e3fc40b66f3a3bc5f54add Related: OS#3503
2018-10-08codec_pref: check codec configuration before startPhilipp Maier3-0/+33
In networks with a couple of different BTSs it may be likely that one accidently sets up a codec configuration (codec-support)) that will be mutually exclusive towards the codec configuration for the MSC (codec-list). We need a check that validates the configuration before start to catch such configuration flaws quickly. - Add a check that checks each MSC codec-list against each BTS codec-support setting. Change-Id: Ice827896bab1a2330741e0fccc731a04f1a07d38 Related: OS#3625
2018-10-06nanoBTS: Allow BCCH with CBCH on TS0Harald Welte1-0/+1
Change-Id: I111c7f14e5f70ecbf6c660c1de24c6a5796b2eef Closes: OS#3630
2018-10-05osmo_bsc_msc: Set reasonable codec list defaultsPhilipp Maier1-0/+22
When the user sets no codec-list in the msc node, the configuration will end up with an empty codec list. This is a useless configuration. There should be a sane default setting. - Set all possible codecs as default for codec-list Change-Id: I3749a65828c788f38c22f0a5314533f4516da3ed Related: OS#3625
2018-10-05gsm_08_08: abort complete L3 3 msg gen when no codecs are setPhilipp Maier1-1/+6
The COMPLETE LAYER 3 INFORMATION message should contain a Codec List (BSS Supported) IE. The contents of this list depend on the BTS capabilities and of the MSC configuration (allowed codecs). There may be cases where (due to miss-configuration) the list is empty. In those cases the BSC hits an assertion because the encoding of the overall message fails when the codec list is empty. A check is needed. - Check codec list before message generation, abort if the coded list is empty. Change-Id: I119607047a132b75b3077bbe56c97936d8ae6c96 Related: OS#3625
2018-10-05codec_pref: handle S0-S15 in ASSIGNMENT REQUESTPhilipp Maier10-101/+190
Opposed to all other codecs that are common in GSM, AMR requires a codec configuration that is expressed by a bitmask (S0 to S15) in the speech codec list in the ASSIGNMENT REQUEST. Also the BSC acknowledges those configuration in the ASSIGNMENT COMPLETE message. At the moment osmo-bsc ignores all incoming configuration bits. The bits in the ASSIGNMENT COMPLETE speech codec (choosen) field are hardcoded. - Store the configuration bits while parsing the ASSIGNMENT COMPLETE - Create an intersection with the configuration that is actually supported by the BSS - Return the resulting (chosen) configuration bits with the assignment complete message. - Use the (highest of the) agreed codec rates in RSL channel activation. Change-Id: I2d8ded51b3eb4c003fe2da6f2d6f48d001b73737 Related: OS#3529
2018-10-04osmo_bsc_main.c: initialize rate countersOliver Smith1-0/+1
main() was missing a call to rate_ctr_init(). Without it, the counters increased properly, but the times per second / minute / hour etc. values would always stay at zero. Change-Id: I4466a7aec51673c79b67614c9dde987633e379e0 Related: OS#3579
2018-10-03abis_nm_get_ts: Return TS of correct TRX, not always TRX0Pau Espin Pedrol1-6/+6
Seen while operating a setup with 2 TRX (2 nanobts): DNM <0004> abis_nm.c:703 OC=CHANNEL(03) INST=(00,01,04): bts=0 trx=0 Opstart ACK DTS <0011> bts_ipaccess_nanobts.c:308 timeslot(0-0-4-TCH_F)[0x612000008aa0]{UNUSED}: Received Event TS_EV_OML_READY DTS <0011> bts_ipaccess_nanobts.c:308 timeslot(0-0-4-TCH_F)[0x612000008aa0]{UNUSED}: Event TS_EV_OML_READY not permitte As it can be seen, OML log header state correctly it comes from TRX1, but later content in line expresses TRX0, and that failure is forwarded up the stack and channels for TRX different than TRX0 are never initialized. Related: OS#3560 Fixes: f0ff9a67117dc22d838769fe6eef67778abd43b9 Change-Id: I27e992e419422051247777b048175b724c05323e
2018-10-03osmo-bsc: Add default case for switch(enum)Pau Espin Pedrol3-0/+6
After commit https://gerrit.osmocom.org/#/c/libosmo-abis/+/11207/ (Iaa33b793f89f2d16c9d949503c5ecc195bbcd2a4), input_signal_data->link_type exposes proper enum type, and compiler can warn about missing cases: osmo-bsc/bts_ericsson_rbs2000.c: In function ‘inp_sig_cb’: osmo-bsc/bts_ericsson_rbs2000.c:124:3: error: enumeration value ‘E1INP_SIGN_NONE’ not handled in switch [-Werror=switch] switch (isd->link_type) { ^~~~~~ Change-Id: Ia407a5072896377b68e914e2a05b5e01292ee8ee
2018-09-30cosmetics: Fix typo in bsc_vty.cMartin Hauke1-1/+1
Change-Id: I65d3e6c6dc252fd60d2dd6b6687ceef4d75034ed
2018-09-28fix unaligned access in abis_nm_rx_ipacc()Stefan Sperling1-3/+2
Related: OS#3496 Change-Id: Ia9bdce39472719bfebec29e0a55a021ef45c8ea6
2018-09-27vty: write local neighbors by bts nr, not lac-ciNeels Hofmeyr2-17/+15
Change-Id: I35783f9624eacbdffccdb59a0179ffda54a26990
2018-09-27neighbor vty: allow setting local neighbors by CGINeels Hofmeyr2-2/+18
Add missing item in the landscape of VTY commands: allow identifying a local cell by CGI (besides BTS nr, LAC or LAC+CI, which already exist). Change-Id: I2d03de6b695904c4a86025bf250358d04f6e47de
2018-09-27neighbor vty: rather 'no neighbor', not 'neighbor del'Neels Hofmeyr2-21/+23
Now the scheme nicely matches: bts 0 neighbor bts 1 no neighbor bts 1 Change-Id: Ib6015b8b48c1f6b98a02cb5a68e568083466e0d5
2018-09-27neighbor vty: drop keyword 'add'Neels Hofmeyr2-113/+111
When writing the neighbor configuration documentation, I noticed that 'neighbor add' and 'neighbor del' make sense from an interactive VTY POV, but when looking at a static config file, it makes more sense to simply name the neighbors without the 'add' keyword, and to use the 'no' prefix instead of the 'del' keyword. It still makes sense to tweak cosmetics like this before inter-bsc handover is used anywhere. First, remove 'add' from all 'neighbor add ...' commands. Instead, prepend "Add" to the doc string for the cell identification argument in commands that add a neighbor: -OsmoBSC(config-net-bts)# neighbor add ? - bts Neighbor cell by local BTS number +OsmoBSC(config-net-bts)# neighbor ? + bts Add Neighbor cell by local BTS number (A subsequent patch will rename 'neighbor del' to 'no neighbor'.) Change-Id: I143f21f6069d1a86096cc8240cf69eb7ea9c8ac8
2018-09-27test neighbor ident vty docsNeels Hofmeyr1-0/+89
Change-Id: I83a2b03c6a081c4ed3225d79d342913a261d9c1c
2018-09-27make: allow vty-tests without configureNeels Hofmeyr1-4/+4
Change-Id: I8cb165890ed77bea8ae82f5228828fa19ff7e0b9
2018-09-27vty: add SCCP related vty commandsNeels Hofmeyr1-0/+1
Depends: I214ea51fc6bfa2a9a4dd7c34b43add0c77ffe22e (libosmo-sccp) Change-Id: I2eb7f5cf9ffceeeb14882190d8545601795d3288
2018-09-26cosmetic: drop param from send_assignment_complete()Neels Hofmeyr1-4/+4
After previous patch I8dd561d744d8081b5ac5ffa7635f17ac19bcda45, all callers pass conn->lchan to send_assignment_complete(), so there is no need to pass it separately from conn. Change-Id: I3c038d91a53c81d9fcf4ec62f853b59bb1ecd244
2018-09-26fix LCLS during Assignment: actually use new TCH lchanNeels Hofmeyr1-6/+10
In assignment_success(), don't trigger lcls_apply_config() before the conn->lchan points at the actual new voice lchan. The entire LCLS code relies on conn->lchan. The assignment FSM wants to point conn->lchan to the new lchan only after it is sure that sending the Assignment Complete to the MSC was successful. However, a failure is a) very unlikely and b) if sending to the MSC fails we might as well tear the whole conn down anyway. Now, if sending to the MSC fails, release the lchan and the conn should clean itself up. Related: OS#1602 Change-Id: I8dd561d744d8081b5ac5ffa7635f17ac19bcda45
2018-09-26lcls: log channel type and lchan names on LCLS codec mismatchPhilipp Maier1-2/+13
When a codec mismatch (lchan type or tch_mode does not match) occurs, we do not know which of the two lchan had which type or tch_mode. Lets print that information as well to make debugging easier. Change-Id: I3fd22fef50d8944ca8c003c6114fdda37417b2ea Related: OS#1602
2018-09-26check for overlong unix socket pathsStefan Sperling1-1/+5
In rf_create_socket(), check the result of osmo_strlcpy(). This catches overlong and non-NUL-terminated socket paths. Change-Id: I4b9ff9146068bf7f53d67c577454f32c02361b86 Related: OS#2673
2018-09-24codec_pref: Add Codec List to COMPLETE LAYER 3 INFORMATIONPhilipp Maier5-1/+1240
The COMPLETE LAYER 3 INFORMATION message lacks the Codec List (BSS Supported) information element. This information element is mandatory for networks that use an IP based user plane (AoIP). - Add function to generate the speech codec list from the current codec settings (Available codecs) - Generate and embed information element in L3 Compl. message Depends: libosmocore I4e656731b16621736c7a2f4e64d9ce63b1064e98 Change-Id: Id6f2af3fdab45bf05f06aec03e222734d7a4cf70 Related: OS#3548
2018-09-24gsm_data.c: Set reasonable AMR codec defaults in gsm_bts_alloc()Philipp Maier1-0/+28
At the moment we do not initalize the struct members mr_full and mr_half in struct gsm_bts. The user still has the option to configure reasonable values via vty, but when not VTY configuration is made, the flags for the AMR rates will be all zero. Lets initalize the struct members with reasonable defaults. - Make sure gsm_bts_alloc() populates fr_half and fr_full with reasonable defaults. Change-Id: I68747ae6dd2582e2a7d60337d9f2c43bd06ac525 Related: OS#3548
2018-09-24assignment_fsm: only include speech codec (choosen) on AoIP networksPhilipp Maier1-4/+8
The field speech codec (choosen) in the ASSIGNMENT COMPLETE message has been specified with AoIP. Since sccp-lite has been specified before AoIP, we should not include the speech codec (choosen) field in the ASSIGNMENT COMPLETE, when osmo-bsc is connected to an sccp-lite based network. - make sure speech codec (choosen) is only included on AoIP based networks Change-Id: Ic7f28aacc953d96ebf3aa04f3e1810475458c1a8
2018-09-18Implement RR Classmark EnquiryNeels Hofmeyr3-0/+19
If the MSC sends a BSSMAP Classmark Request, send an RR Classmark Enquiry to the MS. (The reverse direction, i.e. sending a BSSMAP Classmark Update back to the MSC, is already implemented.) Related: OS#3043 (A5/3 encryption) Related: osmo-ttcn3-hacks Idaab4d568cf986b4897ba008f6262c839d1592fb Change-Id: If5db638fd6e8d9c2ef9e139e99f0fabe1ef16ddf
2018-09-17gsm_data: remove unused struct member chan_modePhilipp Maier2-6/+1
Remove unused gsm_subscriber_connection.user_plane.chan_mode. There is only one VTY command that displays it along other parameters, but it is used no where else. Lets remove it. It was forgotten to be removed in: commit 31f525e7560ad13e32cfc5e0b5f1862c0efcb991 Date Mon May 14 18:14:15 2018 +0200 "large refactoring: use FSMs for lchans; add inter-BSC HO" change-id I82e3f918295daa83274a4cf803f046979f284366 Change-Id: I10049c14ea206a4daafbdad01634d57c72a79d7c
2018-09-17gsm_data: remove unused struct member full_rate.Philipp Maier1-3/+0
Remove unused member gsm_subscriber_connection.user_plane.full_rate. It was forgotten to be removed in: commit 31f525e7560ad13e32cfc5e0b5f1862c0efcb991 Date Mon May 14 18:14:15 2018 +0200 "large refactoring: use FSMs for lchans; add inter-BSC HO" change-id I82e3f918295daa83274a4cf803f046979f284366 Change-Id: I3a14efe0039ff4690e27e3b083eb23c1b2a616c3
2018-09-17LCLS: fix codec mismatch detectionPhilipp Maier1-4/+4
gsm_subscriber_connection.user_plane.chan_mode and .full_rate were unused since and forgotten to be removed in: commit 31f525e7560ad13e32cfc5e0b5f1862c0efcb991 Date Mon May 14 18:14:15 2018 +0200 "large refactoring: use FSMs for lchans; add inter-BSC HO" Instead of above unused struct members, use lchan->{full_rate,tch_mode}. When not explicitly allowed via VTY settings, the LCLS mechanisms will avoid to locally switch connections with different codecs/rates. For example GSM HR and GSM FR would not be locally switched. Change-Id: Idd7117092b1f170d5029303ae5ba0a49e02a8bfb Related: OS#1602