aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
AgeCommit message (Collapse)AuthorFilesLines
2017-02-27SGSN: Integrate support for UMTS AKANeels Hofmeyr5-30/+205
The general infrastructure for UMTS AKA is already in place: * GSUP with capability to send us auth_vectors that contain either triplets or quintuples * mm_context that holds such auth_vectors Add: * capability to send UMTS AUTN in GMM AUTH REQ * parse extended UMTS RES * on auth response, validate expected AKA with vector and received res/sres * add Auth Failure message to receive resync AUTS token and * send to HLR * clear out-of-sync auth tuple * enter new state for when we're waiting for HLR to resync and send new tuples so that the next Auth Request will be handled Original first half of this patch by: Harald Welte <laforge@gnumonks.org> Full UMTS AKA procedure including AUTS resync tested to work against OsmoHLR with R99 USIM and Milenage algorithm. The sgsn_test.c needs adjustment because we're checking the vector's auth_types now. Depends: libosmocore change-ids I277fb3d407396dffa5c07a9c5454d87a415d393f If943731a78089f0aac3d55245de80596d01314a4 Related: OS#1956 Change-Id: Ie6a0cefba5e4e7f02cc2eaf6ec006ac07d5c1816
2017-02-25smpp_test_runner.py: fix socket leakNeels Hofmeyr1-0/+2
Each running test would open up another socket without ever closing unused ones. Close the sockets after each test is done. Change-Id: I0a42caab3bb8c9c9d04b033e4de9efe0ca8fd2af
2017-02-25python tests: remove process 'Launch' message, now at osmoutilNeels Hofmeyr3-3/+0
Change-Id: Id8eb70ddfdc1d0d9f90aa5343a4ea522042c34ee
2017-02-25vty_rest_runner.py: remove debug monitoring for TCP socketsNeels Hofmeyr1-22/+0
Change-Id: I7361bb0ce5302d00ccb18dc04eeb75ee1f6844a8
2017-02-25utils: 'meas_json' utility to convert measurement feed into a JSON feed.Alexander Chemeris2-0/+206
Change-Id: I56631969384da245eed8ffc14845c76a5d4de8d4
2017-02-25add struct gprs_subscr, separating gprs from gsm_subscriberNeels Hofmeyr13-151/+269
Prepare for replacing gsm_subscriber with vlr_subscriber. vlr_subscriber will not make sense to be used in gprs, so have a dedicated GPRS subscriber struct. (Could change if the gprs code were to use libvlr; is currently independent). Related: OS#1592 Change-Id: Ia8b391ee009c8545763cba04505be3947835120e
2017-02-24cosmetic: rename struct osmo_msc_data to bsc_msc_dataNeels Hofmeyr14-107/+107
With the OsmoMSC program coming up, the name osmo_msc_data becomes even more confusing than it already is. Clearly indicate it as libbsc's data of a remote MSC by prefixing with bsc_. Also, the Osmocom community has in the meantime agreed to have the osmo_ prefix only in libosmocore, to avoid naming conflicts in case things are moved there. So while renaming anyway, also drop the osmo_ prefix. Change-Id: I0dfbcb7d1a579211180f71319982820d8700afab
2017-02-24cosmetic: rename osmo_msc_data.h to bsc_msc_data.hNeels Hofmeyr19-18/+18
With the OsmoMSC program coming up, the name osmo_msc_data becomes even more confusing than it already is. Clearly indicate it as libbsc's data of a remote MSC by prefixing with bsc_. Also, the Osmocom community has in the meantime agreed to have the osmo_ prefix only in libosmocore, to avoid naming conflicts in case things are moved there. So while renaming anyway, also drop the osmo_ prefix. Change-Id: I13554563ce9289de126ba0d4cf329bafcda35607
2017-02-24cosmetic: clarify BSC's remote MSC data vs. OsmoMSCNeels Hofmeyr1-0/+6
Change-Id: I74dd2b3f935d39b8caa718e2c8a51cc81bddf1b9
2017-02-24cosmetic: gsm_data.h, README: rename CSCN to MSCNeels Hofmeyr2-2/+2
We're discarding the name OsmoCSCN for the benefit of OsmoMSC. But "CSCN" has already crept into the master branch in two places; apply the rename. See OS#1958 Change-Id: Ib4274eb3c172ada1fe7f05746740b456370bc93d
2017-02-24vty: fix subscr ref count leak in 'subscriber name' cmdNeels Hofmeyr1-0/+1
Change-Id: I3d19518c94a7f302bf108f2ad945983cdc8db0b1
2017-02-24vty_test_runner.py: fix socket leakNeels Hofmeyr1-0/+2
Each running test would open up another socket without ever closing unused ones. Close the sockets after each test is done. Change-Id: Ie433c8560de54f9a9d05fa07c44bae3126d19b30
2017-02-23cosmetic: remove unused scall_signal_data.subscrNeels Hofmeyr1-1/+0
Doesn't make sense to switch this to struct vlr_subscr when it isn't used at all. So let's remove it. Change-Id: Ifa5901f8bf1aed3981841d24d4ec8d659f3de7a9
2017-02-23logging fixup: shorter names for LOGGING_FILTER_* and LOGGING_CTX_*Neels Hofmeyr5-26/+26
In libosmocore, my patch was merged to master a bit too soon. To accomodate the request for naming that matches the general "LOG" prefix instead of "LOGGING", a fixup was committed to libosmocore. Adjust for that. Original patch: change-id I5c343630020f4b108099696fd96c2111614c8067 The fixup: change-id I424fe3f12ea620338902b2bb8230544bde3f1a93 Change-Id: Ib2ec5e4884aa90f48051ee2f832af557aa525991
2017-02-22debug.h/c: remove unused cruft / cosmetic tweaksNeels Hofmeyr2-13/+2
Change-Id: I9601d478763569933bcc46bf4eaaff70a9843be9
2017-02-22logging: use central filter and ctx consts from libosmocoreNeels Hofmeyr7-55/+32
The LCHAN and BTS filter contexts are actually never used, so drop them until someone adds them properly. For now use only LOGGING_{FILTER,CTX}_VLR_SUBSCR. Some of these will change to _BSC_SUBSCR once struct bsc_subscriber is introduced, and later on, struct gsm_subscriber will be replaced by vlr_subscriber so that the names will match. Depends: libosmocore change-id I5c343630020f4b108099696fd96c2111614c8067 Change-Id: Ifa82f6a461ad4c0eeddb8a38fb3833460432d16b
2017-02-21Handle DSD from HLRMax2-10/+27
Handle Delete Subscriber Data GSUP message from HLR to disable Packet Services for a given IMSI. Change-Id: I6b9b494fa58bcb95bd550c49f8204f00f8fdf628 Related: OS#1645
2017-02-19subscr_update_expire_lu(): fix (obscure) segfaultNeels Hofmeyr1-0/+10
To be paranoid, catch a NULL subscriber and/or bts in subscr_update_expire_lu(): print an error log and avoid segfault. (I'm not sure this would really happen in a normal situation.) During aggressive testing of Paging timeout, I came across this segfault in msc_release_connection() when conn->expire_timer_stopped is set but conn->subscr is NULL, at the subscr dereference after: if (conn->expire_timer_stopped) subscr_update_expire_lu(conn->subscr, conn->bts); I brought this situation about by a fabricated Paging fault, i.e. in gsm48_rx_rr_pag_resp() return 0 and don't call gsm48_handle_paging_resp() at all. Thus conn->subscr is still NULL when expire_timer_stopped is 1. When looking at CM Service Request handling, the conn->subscr is set before setting expire_timer_stopped = 1, which is a saner thing to do. But without my mad 'return 0', there is in fact no way to have a NULL subscriber there. It looks like all other code paths already do the same, but it's not that obvious (e.g. _gsm48_rx_mm_serv_req_sec_cb()). So rather catch this case of NULL conn->subscr, and while at it catch NULL bts as well. Change-Id: I430dd952b2b928bea7f8360f1e01bb3cccb0a395
2017-02-19Add support for extended SI2q parametersMax1-31/+71
* add vty command to set E-UTRAN_PRIORITY, THRESH_E-UTRAN_low and E-UTRAN_QRXLEVMIN according to 3GPP TS 44.018 Table 10.5.2.33b.1 * remove old command which does not support those parameters Change-Id: I36dcc79f7b7a02036e74720923d0df1a2a2db504 Fixes: RT#8792
2017-02-18remove compiler warning: unused rc in vty_interface_layer3Neels Hofmeyr1-1/+0
Change-Id: I3dc94dc4bddc5a887ce196071327a6dddfe5b280
2017-02-09Remove duplicating defineMax1-5/+5
Use GSM_MACBLOCK_LEN consistently throughout abis_rsl.c Change-Id: I96aec02748a0be0100dee2117f124ff32d5ee3f5
2017-02-09Expand chan allocation loggingMax4-8/+14
Log more data related to channel allocation: - channel type - number of paging attempts - timers fired Change-Id: Ib417a9c942c17b902dd80ff555cd9da5f91bff48
2017-02-08vty: remove ignored logging parametersMax10-12/+12
Since ce9fec3e896571835ac5bfd2980d6836f2b29f0d libosmocore ignores parameters to log_vty_command_* functions. Hence parameter of logging_vty_add_cmds() is ignored too. As we depend on much later libosmocore version anyway, we can simplify code somewhat by removing parameters which will be ignored anyway. Change-Id: I62f752fd88f1d8fefa563648f9864c7c31f87991
2017-02-07gprs/sgsn_vty: fix typo in commentAlexander Couzens1-1/+1
Change-Id: I63225b7ba6d666eddf00b1deb893e79dc9ec842b
2017-02-07gprs/sgsn_mm_ctx_alloc(): initialize MM state to IDLEAlexander Couzens1-0/+1
Previous the state was only set in Iu mode. Change-Id: I99a6aec1090cad9b9d38d134cc9b34ef292062df
2017-02-07gprs/gprs_mm: add value_strings for PMM & MM statesAlexander Couzens1-2/+15
Change-Id: I4e34dcd5e48c4dd73d63c6f865298ee7d9c864be
2017-02-07gprs/sgsn: rename sgsn_mm_ctx_alloc() -> sgsn_mm_ctx_alloc_gb()Alexander Couzens4-6/+6
Postfix the ran type to clarify the purpose. Because of the new support of the Iu ran type, there are 2 functions to allocate a mm ctx. For Iu it's sgsn_mm_ctx_alloc_iu(). For gb it should be named in the same way. Change-Id: Ic49009e8c20c12308855e1409c09004698c79b95
2017-02-07gprs/sgsn: rename gprs->mm_state -> gmm_stateAlexander Couzens6-66/+81
GMM is the right term. MM state is already occupied. Change-Id: I9cfdcf921e4ebd14a5e7ce7489ec4ce5d1f5515f
2017-02-07vty tests: more attempts to resolve 'Broken Pipe' errorNeels Hofmeyr1-7/+39
Change-Id: I4251a24eb7a57a354aa76de711547c3e76ebb846
2017-02-07Attempt to fix nightly buildsMax2-3/+3
The fix introduced in dac5867af5ff90d4beb70fc30a5743f60f159e3a did not work because autotools in our OE are too old. Use alternative way to include custom m4 macros to fix it. Change-Id: I5fe6d1180c2624cfe1d3673314f6846527a43464
2017-02-06VTY: Print 3G auth tuples, not just 2G auth tuplesHarald Welte1-9/+24
Change-Id: I277e4347ee1486a39e6dc4e2363a593f328f9e3b Related: OS#1592
2017-02-06gsm_04_08: implement parsing of UMTS Auth responsesNeels Hofmeyr1-5/+221
Parse the longer UMTS res from the extended Auth Response Parameter IE. Parse the R99 Authentication Failure and AUTS in case of cause GSM_REJECT_SYNCH_FAILURE which indicates a SQN re-sync request. Both still end in 'not implemented' error logs, which are the places where the upcoming VLR that supports UMTS AKA will integrate. Depends on recently added constants in libosmocore in commit 55a43b801385e07a484217925ecf2379b9f54fcf aka change-id I745061ce8eb88aa23080dadcdbfe2d703c362a30 Change-Id: I4868bbeedc32fa7b8d03b9e3c66db618543d38ec
2017-02-03om2000: add VTY command to delete CON groupsPhilipp Maier1-0/+26
The currently unused function abis_om2000_vty.c:con_group_del() allows deleting OM 2000 connection groups. This commit adds a matching VTY command to make use of it. Change-Id: I39a90b06e19356c536cacd1c923e195dd305ab80
2017-02-03Revert "vty tests: more attempts to resolve sporadic 'Broken Pipe' error"Neels Hofmeyr1-3/+1
'self' will not be accessible in that context, so this patch isn't useful. This reverts commit b39053ad6de50df5a2efcb4ec0c6551020b513e1. Change-Id: Ic1a9ba5fdfd7bdc6c5cf0974e8c637ae23b81ece
2017-02-03gsm48_tx_mm_auth_req(): support UMTS AUTNNeels Hofmeyr3-6/+24
To be able to do R99 UMTS authentication, we need to send along AUTN bytes in the Authentication Request. Add autn parameter to gsm48_tx_mm_auth_req() and conditionally append the R99 AUTN TLV to the Authentication Request message. Change-Id: I0d644559088706aa06b42b9bfe1f8c21ca6fa4da
2017-02-03vty tests: testBSCreload: ipa_handle_small: ensure rx of 4 bytesNeels Hofmeyr1-0/+2
Change-Id: I995b7aba9d0b51b0861a4281dbbca888f36e9e00
2017-02-03vty tests: more attempts to resolve sporadic 'Broken Pipe' errorNeels Hofmeyr1-1/+3
Change-Id: I3d833ddf8c62845fe68d1e5503332541a4a04a2d
2017-02-02vty tests: attempt to get at sporadic 'Broken Pipe' errorNeels Hofmeyr1-1/+15
Add verbose logging as well as three retries around the place that often fails on our build server with a 'Broken Pipe' error. Change-Id: I8851b76b2d7b87dd500ae40f47e6bea716ef3fc4
2017-02-03gsm0408_rcv_cc: guard against NULL subscriberNeels Hofmeyr1-0/+5
Check conn->subscr against NULL. gsm0408_rcv_cc() dereferences many conn members without checking presence: the bts and lchan members may be expected to be NULL in the ongoing MSC split and 3G developments. But the conn->subscr is initially NULL, so an MS sending a CC message before something like a LU or CM Service Request will result in a segfault. Prevent that. Note: the upcoming VLR will be more restrictive on what messages are processed, this is a "backport" to the situation on current master. Change-Id: If067db7cc0dd3210d9eb1da15be6b637795a3ecf
2017-02-02compiler warning: bsc_vty: remove two unused varsNeels Hofmeyr1-1/+0
Added in recent commit 42def7205ba91df4bbb7e3240be0df8c26c2d63e "Implement VTY configuration to control Early Classmark Sending" Change-Id: Iaf640fa6e1f234f594fb8dc06f716d3d3e95eb2a
2017-02-02paging.h: use '<>' include, not '""'Neels Hofmeyr1-2/+3
Also separate openbsc includes from osmocom/core includes. Change-Id: I4da0cb32476202d06902531d07faed8004f689f9
2017-02-02osmo_bsc_grace.h: use '<>' include, not '""'Neels Hofmeyr1-1/+1
Change-Id: I2f22be93d1a5fd6f229b85305a1d2a2cf6a43ce2
2017-02-01OM2000: use assoc_so *only* for TS objectsHarald Welte1-4/+4
all other objects always use the MO instance. The existing code likely is due to copy+paste mistakes. Change-Id: Ie0a31cd93993da10f31eecf530a5a05773c11eb1
2017-02-01sgsn: Fix deeply flawed copying logic for PDP context activationHolger Hans Peter Freyther1-3/+9
It is one of these changes that should have never worked but did for a long time. Only recently a corrupted GTP message was seen. The code in ccd2312d10e14747e8a4d26d8f72b052ffcfc282 tried to solve the right problem but was deeply flawed. * Make the code operate on the copied message and not the original one that is deleted by the underlaying layers on return * Add an out variable to determine if the msgb should be deleted and assume that by default it will be deleted. Change-Id: I564526e7cde2b8a2f0ce900492cd38fc23c176a7
2017-01-31Remove dependency to autoconf-archiveMax3-0/+80
It is generally not a good idea to add more and more external dependencies unless absolutely needed. autoconf-archive is a good example of that, as we need to update all build machines, and older OpenEmbedded versions do not appear to have (the right?) autoconf-archive recipe. Provide local copy of necessary m4 files to fix the build there. The dependency to autoconf-archive was introduced in Change-Id Ied9c950dafa65f324cf31298b13b590f56139700 Change-Id: Iacc1958b471ec3fc65307259039e1d496845f528
2017-01-27gprs: Fix compiler warning about uninitalized cause codePhilipp Maier1-1/+1
in gprs_gmm.c:gsm48_rx_gmm_ra_upd_req the variable reject_cause is not initalized, which is ok, since it gets initalized before the jump into the "rejected" path. However, the compiler still throws a warning. This commit fixes the problem by preinitalizing the reject_cause to GMM_CAUSE_PROTO_ERR_UNSPEC Change-Id: I84cffb631e4cad3d4748512b47e3876208f53727
2017-01-27rsl: Fix dropping of LAPDm UA message.Minh-Quang Nguyen1-0/+2
In some cases, when successive mobile originated calls are made, the LAPDm UA message gets lost because the channel is relased to early. Too overcome the problem we do not send release indications immediately. Instead a flag will be set and the message stored and sent on the next TCH-RTS-IND. This commit adds the required flag and the msg-buffer to struct gsm_lchan. See also coresponding change in osmo-bts.git: Change-Id Ie4f70c75f0137b4bd72d579b3a32575bac2fca38 This patch is is a slightly improved/reformatted version of: https://gitlab.com/nrw_noa/osmo-bts/commit/95d1f15ad108c1c1869c1965144acd64c1395d8c Change-Id: I15fc1ef8e9e83f009bde96de9a8e95702cffbce6
2017-01-26Implement VTY configuration to control Early Classmark SendingHarald Welte3-0/+27
The SI3 rest octests contain a flag that indicates if early classmark sending is allowed in this cell or not. So far we always set this to one, now it is configurable using the 'early-classmark-sending' command at the VTY node. Change-Id: Ia0b1cc5ab45673f3da70c59ae8917eba343f9862
2017-01-26remove unused struct members of 'struct sgsn_pdp_ctx'Harald Welte1-5/+0
There were some members that we neither set nor read, so let's shrink the struct size and remove those unused members. Change-Id: I02136e3aa91e58b2afc923c09c8693095497fdd7
2017-01-26sgsn: Add GTP information to "show pdp-context"Harald Welte1-2/+21
When displaying the PDP context, it is quite useful to also show IP address and TEI information about the GTP side of that PDP context. Change-Id: I56ea530240c15b26729e7a42e539020cb1e233e5