aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
AgeCommit message (Collapse)AuthorFilesLines
2016-12-08FIXME libmsc serv req + page resp: don't use bts pointer; break LACNeels Hofmeyr1-9/+9
gsm48_rx_mm_serv_req(), gsm48_rx_rr_pag_resp(): don't use bts, use dummy LAC and mark as fixme. Change-Id: I8ebfcedaf044261c0600b87533b60104a62b992d
2016-12-08FIXME disable subscr_update()Neels Hofmeyr1-0/+2
Change-Id: If94ed34238b221a4ff625697f42d90e4a05974ff
2016-12-08FIXME disable classmark2Neels Hofmeyr1-1/+5
Change-Id: I5a2231e3a680b429bc8c8195d85fa013b86cda1c
2016-12-08vlr_sub_name(): be robust against NULL pointerNeels Hofmeyr1-0/+2
Change-Id: I41ab19839dad00dfe46c0b5f501ca7ebc9d3b40e
2016-12-08gsm48_rx_rr_app_info: don't store app info at all, commentNeels Hofmeyr1-0/+5
Change-Id: Iaeeb18a0b812ac6fbfcb57abffb62d789c7ba0de
2016-12-08fixes for tmsi reall compl pathNeels Hofmeyr2-7/+8
vlr_sub_rx_tmsi_reall_compl(): have a return value; publish in vlr.h. gsm48_rx_mm_tmsi_reall_compl(): fix everything. Change-Id: Ieeccca85e7177e21af43db4de705ec13d7bc8c40
2016-12-08gsm_04_08.c: add missing vlr .subscr_assoc()Neels Hofmeyr1-0/+12
Change-Id: I89757df03c4bf9ff9272f848f6724b635af1eeb0
2016-12-08fix const compiler warning in print_meas_rep()Neels Hofmeyr1-1/+1
Change-Id: Icd89a1e0c99f455317387ee55f2d90a0e3c61c7a
2016-12-08store initial lu_fsm in gsm_subscriber_connectionNeels Hofmeyr1-2/+2
Change-Id: I1ee29ebeed624bad76c3560aeb093c0b5da0c5c2
2016-12-08vlr_lu_fsm: missing: WAIT_SUB_PRES out_state_mask += WAIT_IMEI_TMSINeels Hofmeyr1-0/+1
Change-Id: I050cfaf2d23c71a2bb7d969f43bb5b493d3639c5
2016-12-08libmsc: store classmark1 in gsm_subscriber_connectionNeels Hofmeyr1-0/+1
Change-Id: I03d194595da684e165715faf5f602adef8587144
2016-12-08cosmetic: in comments, drop some unbalanced bracesNeels Hofmeyr3-2/+3
Simplistic C file harvesters will break at a single opening brace even if it is in a comment. This is of course aimed at the fsm-to-dot.py script recently added in libosmocore/contrib. Change-Id: Ie47bc869fbd3f2dab7141a3d61a9d772b5a9b7a9
2016-12-08fix various missing vars and unused varsNeels Hofmeyr3-21/+2
Change-Id: I16cf82fe3b27a4cdd69df1cf34e60918b453d07b
2016-12-08comments: various tweaks and fixesNeels Hofmeyr2-3/+3
Mention 3GPP TS 23.008, whitespace, typos Change-Id: I8b996e8900e4846ff3d95189215ad3b5e97d1d2b
2016-12-08fix vlr_loc_update: don't return vlr_subscriber, return fsm instNeels Hofmeyr1-3/+1
Change-Id: I943aea5575bf57e3bb148ade616a66191cee6752
2016-12-08WIP: more incomplete libvlr integration workHarald Welte7-103/+104
Change-Id: I77fb3a540c900be6440d0aec12161711b65b8aa6
2016-12-07WIP: Introduce libvlrHarald Welte17-295/+3251
Change-Id: I3f75de5f0cc2ff77f276fd39832dd3621309c4b9
2016-12-07WIP: move OAP client to libosmocoreHarald Welte3-180/+1
2016-12-07gsup_client: Make use of OAP optionalHarald Welte1-3/+5
2016-12-07VTY: Print 3G auth tuples, not just 2G auth tuplesHarald Welte1-9/+24
2016-12-07WIP: add gsup_test_client programHarald Welte3-0/+318
2016-12-07WIP: Handle Authentication Failure from MSHarald Welte1-0/+28
2016-12-07SGSN: Integrate basic support for UMTS AKAHarald Welte1-19/+89
We already had almost all the parts in place before: * GSUP with capability to send us auth_vectors that contain either triplets or quintuples * mm_context that holds such auth_vectors All that we need to add in this patch is the capability to send the AUTN parameter in the GMM AUTH REQ and parse the extended RES in the GMM AUTH RESP. TODO: Implement SQN re-synchronoization mechanism (Auth Fail: Sync Err)
2016-12-07Introduce subscriber_connection ref-countingHarald Welte6-18/+57
This introduces a reference count for gsm_subscriber_connection. Every user of the connection needs to hold a reference until done. Once the reference count dorps to zero, the connection is cleared towards the BSC (which subsequently will clear any logical channels associated with it). Change-Id: I8c05e6c81f246ff8b5bf91312f80410b1a85f15e
2016-12-05LLC: Fixup element order in LLC-XIDPhilipp1-2/+2
When the LLC-XID request is constructed the order of the elements in the TLV structure is reversed. This is in theory not a problem, but differs from what we know from our practical experience. This commit fixes the problem. Change-Id: I1d71c947350d3c5a85ff36b71c1b8f036071d162
2016-12-02abis_om2k: fix typo that declared non-existent struct gsm_bts_trx_sNeels Hofmeyr1-1/+1
The typo was recently committed in 80ccb952676cb4a068410991c5d53d19f228f695, "OM2000: Fix missing dynamic TCH initialization" Change-Id: I8e3eec8cf63494962fa31d85a0ec9db9a9e5df46
2016-12-02osmo-nitb: exit when MNCC socket init failedNeels Hofmeyr1-3/+7
Change-Id: Icef97bb5da9840b810fe6f4b4da6abd4baa66915
2016-12-02split subscr_con_allocate()/_free() in bsc_ and msc_Neels Hofmeyr6-11/+37
Rename current subscr_con_allocate() and subscr_con_free to bsc_*, and add two separate msc_subscr_con_allocate() and _free(). The msc_subscr_con_free() ignores all lchan members. In libbsc use bsc_*, in libmsc use msc_*. Change-Id: I3cf7c7cafdf4672ec7b26058bba8a77159855257 Future: there will be distinct subscr conns for libbsc and libmsc.
2016-12-02move to libcommon-cs: net timezone VTY configNeels Hofmeyr2-64/+64
Leave the timezone VTY output in libbsc's config_write_net(), until the BSC/MSC separation of struct gsm_network is completed. Change-Id: I9712b2e07b4f1ab8d2e4ad40a8d771e98ed25b20
2016-12-02Move timezone settings up to network levelNeels Hofmeyr4-71/+65
Time zone used to be configurable per-BTS. In the upcoming MSC-split, no BTS structures will be available on the MSC level. To simplify, drop the ability to manage several time zones in a core network and place the time zone config on the network VTY level, i.e. in gsm_network. If we are going to re-add fine grained time zone settings, it should probably be tied to the LAC. Adjust time zone VTY config code (to be moved to libcommon-cs in subsequent commit). Adjust time zone Ctrl Interface code. Change-Id: I69848887d92990f3d6f969be80f6ef91f6bdbbe8
2016-12-02reinvent connection_for_subscr() and move to libmscNeels Hofmeyr2-33/+14
Implement connection_for_subscr() from a completely different angle: instead of looking up lchans in bts structs, look up the subscriber in the global list of gsm_subscriber_connection. static lchan_find() is thus obsoleted. All callers of connection_for_subscr() live in libmsc, so move to libmsc. The move and edit are done in a single commit since the old and new implementation have nothing in common. Future: osmo-cscn will use this, without bts being present. Remove implementation of connection_for_subscr() from channel_test.c -- it is possible that the abort() in there was intended for a regression test, but actually it seems the implementation was merely added for linking reasons, and the abort() added to guard against the NULL return value: no comment nor the commit log indicate that the abort() is test critical; the addition was the only change in channel_test.c for that commit; at the same time a connection_for_subscr() call was added in libmsc. Change-Id: I5e0ba0ecf1726ebd540800f4e98fdfc937c904ff
2016-12-02bsc vty: rename show_net_cmd to bsc_show_net_cmdNeels Hofmeyr1-2/+2
Future: there will be an MSC-land show-net-cmd, so rename to something with bsc in its name. Change-Id: Ifb86698cd57a09f03b935b6d3fcea87eff4cd397
2016-12-02move to libcommon-cs: network VTY that isn't BSC-specificNeels Hofmeyr2-193/+209
Keep only BSC specific bits of the 'network' VTY node in bsc_vty.c, move more general VTY commands to common_cs_vty.c. Add arg to common_cs_vty_init() to pass a config_write_net() function. Pass a libbsc specific config_write_net() function. Future: upcoming omso-cscn will re-use the VTY bits moved to libcommon-cs and pass a different config_write_net() function. Change-Id: I871b7b32a0c56fdce983e409cf244ec487d24e71
2016-12-02move to libcommon-cs: global vty gsm_network pointerNeels Hofmeyr2-17/+27
Move gsmnet_from_vty() and the bsc_gsmnet global to common_cs_vty.c. Rename bsc_gsmnet to vty_global_gsm_network and make it static to common_cs_vty.c, to clearly mark the global variable for VTY use only. Introduce common_cs_vty_init() to set vty_global_gsm_network. Change-Id: I26c5c47de08f899b896813d09612d5cb2f8e42d6
2016-12-02global gsm_network: move allocation further upNeels Hofmeyr2-23/+25
Now that bsc_network_alloc() is separate, move it to before the VTY init (a subsequent patch will pass the gsm_network instance as a parameter to vty_init()). bsc_hack.c: drop the comment that says about the VTY init: "This needs to precede handle_options()" -- it is not accurate. Actually move the handle_options() above both vty_init() and the bsc_network_alloc() calls, to be able to decide which mncc callback to pass to bsc_network_alloc. It would make sense to set this later on, but that would require further refactoring of the bsc_network_init() and gsm_network_init() signatures, so not in this patch. Change-Id: Ie6a7037e703b5a2d08ceeb20d35f197aaddc9d1b
2016-12-02split bsc_bootstrap_network() in alloc and configNeels Hofmeyr3-12/+31
For patch clarity, keep some code dup to be removed in a subsequent patch. In the same sense don't change the fact that mncc_sock_init()'s return value is ignored. The global gsm_network instance 'bsc_gsmnet' is basically only used by the VTY, and a future patch will "hide" that global in a vty .c file. In a nutshell, I want to - first allocate a gsm_network, - then initialize the VTY passing the gsm_network pointer, - and then read the config file using the initialized VTY. So far, bsc_bootstrap_network() allocates the gsm_network and reads the config file right away, which only works by sharing the extern bsc_gsmnet pointer, which I would like to uncouple. Change-Id: I480a09a31a79766ad07b627dd5238b7e37f3be7a
2016-12-02sms_next_rp_msg_ref(): use direct pointer to next_rp_ref counterNeels Hofmeyr4-39/+16
libbsc and libmsc will have separate subscriber connection structs. Hence don't rely on gsm_subscriber_connection, but work on a direct pointer to the counter for the next RP reference. The only very thin function in gsm_04_11_helper.c thus becomes obsolete: drop the entire file. Change-Id: I2a2e9ba6a981a385d1f8f07acbe03536ffed0072
2016-12-02factor out gen of USSD notify and release complete to libosmocoreNeels Hofmeyr9-36/+57
Both libmsc and libbsc will need distinct gsm0480_send_ussdNotify() and gsm0480_send_releaseComplete() functions, since there will be distinct subscriber connection structs. Rename to msc_send_ussd_notify() and msc_send_ussd_release_complete(), and add the same in libbsc with bsc_ prefix in new file gsm_04_80_utils.c. In preparation of this patch, the message generation part of these functions has been added to libosmocore as gsm0480_create_ussd_notify() and gsm0480_create_ussd_release_complete(). Use these. Adjust all libmsc and libbsc callers according to use the msc_* or bsc_* implementation, respectively. Change-Id: I33a84e3c28576ced91d2ea24103123431f551173
2016-11-28IuPS: properly update ra_id on GMM Attach RequestNeels Hofmeyr1-4/+2
For new MM contexts, the ra_id was correctly obtained from the ue_ctx, but in case an MM ctx is re-used and the ra_id changed, the new ra_id was not copied to the MM context; instead, the ra_id was overwritten with uninitialized data. Always initialize the local ra_id variable from the ue_ctx->ra_id for Iu connections; it is used further below to update the ctx->ra_id. For the case of a brand new Iu MM ctx, the ctx->ra_id then gets initialized a second time. We could technically drop the init in sgsn_mm_ctx_alloc_iu(), but it doesn't hurt either way. Fixes: CID#57936 Change-Id: Ia06458758362e76925690b1757d8ced95e9609e4
2016-11-27sndcp: fixup for coverity scan defect CID 149097Philipp2-0/+2
Coverity scan detects a Null pointer deref (FORWARD_NULL) in gprs_sndcp_comp.c: 67 in gprs_sndcp_comp_create(). The reason for this is that gprs_sndcp_dcomp_init() and also gprs_sndcp_pcomp_init() rely on the comp_entity->algo algo flag. If the program logic is correct a null pointer deref should never occur. This commit adds OSMO_ASSERT() statements to ensure a null pointer deref is catched if if the ...comp_init() functions are used with incorrect parameters. Change-Id: I7748f06d1739a697edad5100a031e5aa1ef11ed1
2016-11-26bsc_msc.c: Check setsockopt() return valueHarald Welte1-1/+7
Change-Id: I79a8fe9c025772e51560503504f517485b0ace34 Fixes: Coverity CID 57644
2016-11-26abis_nm: ceck fseek() return code in is_last_line()Harald Welte1-1/+3
Change-Id: I8ed4e703625c9da959e0938cd1eb3f0c73a2d4d0 Fixes: Coverity CID 57643
2016-11-26ipaccess-proxy: Check setsockopt() return valueHarald Welte1-1/+7
Change-Id: I34b082907b6f0b25fe2779f3a1f0a642a9002664 Fixes: Coverity CID 57642
2016-11-26ipaccess-config: Handle setsockopt return valueHarald Welte1-1/+6
Change-Id: I8c2082f9a9c865cc663ad2abb63ee0f70914dabe Fixes: Coverity CID 57640
2016-11-26Fix possible non-null-terminated bufferHarald Welte1-0/+1
Change-Id: I22100c260856991b9a836135b3650e5b8c5449ca Fixes: Coverity CID 57623
2016-11-26libmsc/db: avoid subscr->name without terminating NULL charHarald Welte1-1/+3
Change-Id: Ic8944ac4c5e940c9d835c52f1701461f274238db Fixes: Coverity CID 57621
2016-11-26abis_nm: Fix non-null terminated bufferHarald Welte1-0/+1
Unrealistic case (filename of 4096 bytes) Change-Id: Icf7b835f9edaf66976556fce1e9e0f66aa2010bc Fixes: Coverity CID 57620
2016-11-26abis_nm: Fix possible not-null-terminated bufferHarald Welte1-0/+1
Unrealistic case with file name of 4096 bytes length. Change-Id: I503200b879b854cf2dc218d5fe3059a555732d92 Fixes: Coverity CID 57619
2016-11-24move to libcommon-cs: gsm48_create_mm_serv_rej(), gsm48_create_loc_upd_rej()Neels Hofmeyr3-34/+34
Used by libbsc, libmsc as well as osmo-bsc and osmo-bsc_nat. Moving gsm48_create* to libcommon-cs affects linking of osmo-bsc_nat, resulting in undefined references to gsm48_extract_mi() and gsm48_paging_extract_mi(); fix that by placing libfilter.a left of libbsc.a upon linker invocation. Change-Id: I212c2567b56191022b683674c1c4daf842839946
2016-11-24move to libcommon-cs: net init 3: actual moveNeels Hofmeyr7-34/+70
Reincarnate gsm_network_init() as the parts not specific to libbsc. Move from bsc_network_init() those bits that are not BSC specific (and useful for upcoming osmo-cscn). Add libcommon-cs to all linkages that use gsm_network_init(). Note: the only requirement to allow linking gsm_network_init() without libbsc is to keep the call to gsm_net_update_ctype() out of libcommon-cs. The other items are kept out of libcommon-cs because it makes sense semantically. But the separation is not strong in that the BSC specific data members are of course still omnipresent in struct gsm_network. If bsc_network_init() is not called, these are not initialized properly -- for now no users of uninitialized members exist. So this is just a first step towards a sensible split of the BSC and MSC gsm_network structs. The long term aim should be to have entirely separate structs with some common general items. Change-Id: If06316b97002390dc9a434686750cb96193ea63b