aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-01-23move subscr auth check to gsm_subscriber.cNeels Hofmeyr3-34/+56
add subscr_authorized(), subscr_authorized_imsi() Change-Id: If2ef06b1229351127c61477ca14653d6ae4cb6bb
2017-01-23auth logNeels Hofmeyr1-1/+3
Change-Id: Icd9f8505388a06ee768d2176cb2b9187953098ef
2017-01-23iu auth wipNeels Hofmeyr1-18/+64
Change-Id: Icc2522252cf15c54f1a1ea5255314a0de8bfba03
2017-01-23Iu auth wipNeels Hofmeyr2-8/+73
Change-Id: I44effcca80dc6850178174dc957bcd5608b0ae14
2017-01-23cosmetic prep: change int -> bool authorize_subscriber()Neels Hofmeyr1-6/+6
Upcoming function subscr_authorized() will flip this to bool, so separate this change cosmetically. Change-Id: Iba0184a71afa01141ef06c474cb554e79ad8f5d5
2017-01-23subscr_request_channel() -> subscr_request_conn()Neels Hofmeyr3-5/+7
Change-Id: Ife8e10b240693a8d369139881774f1892044aa65
2017-01-23move subscr_request to gsm_subscriber.hNeels Hofmeyr2-14/+14
Change-Id: Idbbd39b0e068da17aafa97e315143509c69c50ea
2017-01-23add gsm_encr to subscr_connNeels Hofmeyr1-0/+1
Change-Id: Id5797cd1f1bfa2cca2d3fbabc1981aa75546421b
2017-01-23osmo-nitb becomes osmo-cscnNeels Hofmeyr8-100/+376
Change-Id: I3787050b524954d8a4dd13495c458f3ee293807b
2017-01-23remove unneccessary linking from some testsNeels Hofmeyr3-4/+0
The recent shifts and cuts have made some library linking for bsc, channel and db tests unnecessary.
2017-01-23msc_release_connection(): don't call gsm0808_clear()Neels Hofmeyr1-1/+0
gsm0808_clear() is all about clearing lchans. To be able to link libmsc without libbsc, don't call it directly. Change-Id: I149146fc3cb99ef4a21ee2a798231bb070f398cd
2017-01-23cut off libbsc paging, pending paging in libmscNeels Hofmeyr5-2/+24
Temporarily disable all paging to be able to link libmsc without libbsc. Skip the paging part of channel_test because the paging is now disabled. In osmo-nitb, paging is done on BSC level and MSC level "at the same time". When the new CSCN is fully operational, paging will be controlled separately on the MSC level, and the BSC (RNC) level will be instructed over an IuCS or A-interface to negotiate paging with the MS (UE). This MSC level paging does not yet exist and will be added in subsequent commits. Change-Id: I8b6920ddc54fc3f2876a59664e6722666d8a8a4a
2017-01-23libmsc: duplicate gsm0808 / gsm48 functions (towards BSC)Neels Hofmeyr4-13/+68
In osmo-nitb, libmsc would directly call the functions on the BSC level, not always via the bsc_api. When separating libmsc from libbsc, some functions are missing from the linkage. Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also add a _tx to gsm0808_cipher_mode(): * add msc_gsm0808_tx_cipher_mode() (dummy/stub) * add msc_gsm48_tx_mm_serv_ack() * add msc_gsm48_tx_mm_serv_rej() Call these from libmsc instead of * gsm0808_cipher_mode() * gsm48_tx_mm_serv_ack() * gsm48_tx_mm_serv_rej() Also add a comment relatd to msc_gsm0808_tx_cipher_mode() in two places. Change-Id: I5b276853d3af71f5e3f0a031fd17b4fff0580020
2017-01-23Use new msc_tx_dtap() instead of gsm0808_submit_dtap()Neels Hofmeyr4-8/+10
Aim: msc_tx_dtap() shall redirect to IuCS or A interfaces depending on subscr conn. Change-Id: I30d961f16eb7b9c0ab9cc3f43198098d3f1a909f
2017-01-23add libiudummy, to avoid linking Iu deps in testsNeels Hofmeyr6-0/+56
Change-Id: I4a66c4122011dbc87c6fcb336ab0461b86522c98
2017-01-23move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi() -- TODO ↵Neels Hofmeyr2-24/+24
move to libfilter instead? Change-Id: I00ca0caf8224de029f53f4dedb1146e3cf7650ec
2017-01-23msc_compl_l3(): publish in .h, tweak return valueNeels Hofmeyr2-6/+17
Use new libmsc enum values for return val, to avoid dependency on libbsc headers. Make callable from other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c Change-Id: If24007445899e9c75553a0dbf843ada3566b3380
2017-01-23add cscn vty, remove nitb vtyNeels Hofmeyr5-104/+179
Change-Id: I8f8980d6cfbf26f1b0e0197939833e55dbe521fb
2017-01-23add iucs.[hc]Neels Hofmeyr4-0/+181
Change-Id: I88e981f4c31393a98ae8d61176c65c9251a6f28b
2017-01-23add DIUCS debug log constantNeels Hofmeyr2-0/+6
Change-Id: Id347a3024fa495a1ab680db7320648d933a4018b
2017-01-23gsm0408_loc_upd_rej(): remove bts use (used only for debug log)Neels Hofmeyr1-4/+2
Change-Id: I3ac38f4b701ad8308470573260fa91a4b04c2f18
2017-01-23gsm_04_08, gsm_subscriber: decouple lac from btsNeels Hofmeyr3-11/+10
The idea is to not have a direct pointer to a bts struct (into BSC land), but a LAC to resolve the BSC or RNC depending on the appropriate A or IuCS interface. subscr_update(): remove bts arg, add lac arg. Pass conn->lac to gsm48_generate_lai() instead of bts->location_area_code. Change-Id: I9f2b298a785bf4b2a1b3fcdd91b8256106b2d9de
2017-01-23subscr_update_expire_lu(): remove bts argNeels Hofmeyr3-5/+5
Change-Id: I26cafd9389aac65e53dc4280a1687c6b8bce3106
2017-01-23move t3212 to network level (periodic lu)Neels Hofmeyr5-11/+15
Set the T3212 default value in struct gsm_network and take that value when creating a BTS. Adjust VTY accordingly. Change-Id: Ifb730f9d0106fe195adc30459a39290a07313b50
2017-01-23libmsc: iucs dev: disable large parts of the codeNeels Hofmeyr5-1/+91
Change-Id: I3ef6ca26150b6102a0fa22a88a60d9a442d640b4
2017-01-23Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication.Neels Hofmeyr6-0/+149
Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to different interfaces depending on the actual subscriber connection. While iu_tx() is going to be functional fairly soon, the a_tx() is going to be just a dummy for some time (see comment). Add via_iface marker to gsm_subscriber_connection with enum values IFACE_A and IFACE_IU so far. Add Iu specific fields in a sub-struct: the UE connection pointer and an indicator for the Integrity Protection status on Iu (to be fully implemented in later commits). Add lac member to gsm_subscriber_connection, to allow decoupling from bts->location_area_code. The conn->lac will actually be set in iu.c in an upcoming commit ("add iucs.[hc]"). Change-Id: Idf8020a30562426e8f939706bf5c2188d5a09798
2017-01-23don't use lchan in libmscNeels Hofmeyr3-14/+12
Change-Id: Ic7ed7faa2bcc7aae799f41ed4abc2c001bfb61b7
2017-01-23gsm_04_08.c: Don't set msg->lchan nor msg->dstHarald Welte1-34/+0
the BSC-side of the API behind gsm0808_submit_dtap() is doing this resolving again anyway. So let's avoid doing it twice, and avoid having more dependency of the MSC down into the lchan details. Conflicts: openbsc/src/libmsc/gsm_04_08.c Change-Id: I14254be68ee1a48e9f1ce968233414d86c6ba9d5
2017-01-23Prevent segfault in range encodingMax6-37/+78
* Explicitly check when ARFCN array split is impossible and return gracefully instead of using negative index. * Separate range encoding into generic function and use it for all SI-related things. * Propagate the error into that function and to its callers. * Add separate test-case for the segfault previously triggered by this bug. Change-Id: I3e049ab2d7c1c4d6c791b148f37e10636a8e43e0 Related: RT#7379
2017-01-23bsc_control.py: fix blockingMax1-5/+11
Previously reading from socket would block if no data were sent by the server. Use non-blocking read for set and get operations. Change-Id: I706d54a4a7ceef62683bf9a2fe63fc9ab331c24e
2017-01-23Improve OML failure reportMax1-6/+14
* clearly separate report parts * use textual representation for failure cause if possible Change-Id: I7a98a77011463021d0edd6ecfab1680e211f7e16 Related: OS#1615
2017-01-23cosmetic: use osmo_strlcpy() everywhereNeels Hofmeyr21-118/+98
Shorten some code and make obvious to the reader that the string copy is done in a safe way. Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd
2017-01-23fix strncpy() invocation in vty_interface_layer3.c and 3 testsNeels Hofmeyr4-6/+9
Use osmo_strlcpy() to fix unsafe invocation of strncpy(), which potentially left the result unterminated. Change-Id: I1a119b1760a3e3262538b4b012d476fdce505482
2017-01-23Print subcriber when skipping authMax1-1/+2
Change-Id: I6ae6720afc04cc3c92ceff86e5b2a5a29494aeb1
2017-01-23undup: gtphub_test: use libosmocore's llist_count()Neels Hofmeyr1-17/+5
Depends on libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15 Change-Id: I67bc1889c064596a2f3e93cc0354b11c720b0225
2017-01-21Turn some compiler warnings into errorsMax2-0/+13
Re-apply the reverted commit 98bc7fa50d0731864297f8fb82932d480c426ff6, this time with a clear error message in case autoconf-archive is not installed. Change-Id: I631bde22e79ec0318eb9c8114db5861a1d635816 Tweaked-by: Neels Hofmeyr <nhofmeyr@sysmocom.de>
2017-01-19deb: unbreak nightly buildsRuben Undheim2-0/+13
Add openbsc-dev with source and header files necessary for osmo-bts builds. Max's note: extracted from Debian packaging work into separate commit. Change-Id: I25f8c639d2dc525ca280a7cd09de3ca6358d2568
2017-01-15gprs subscr: fix: intended strcmp(), but is strcpy()Neels Hofmeyr1-5/+3
The code checked 'if (strcpy(..) != 0)' which is always true and thus always copied twice -- luckily we want to copy anyway and so this is not an actual functional failure. We could correct to strcmp, but instead of iterating to compare, we might as well copy right away. Change-Id: I0ea035bd478f7022ed65e9e84d8aaf5e423309b7
2017-01-13Log expected SRES on GPRS AUTH REJECTMax1-1/+3
Change-Id: I19b0001650979bf7f1832f04f9fd5a26beb577d0
2017-01-13Revert "Turn some warnings into errors"Neels Hofmeyr2-9/+0
This introduces a failure with ./configure on my machine: ../configure: line 6612: syntax error near unexpected token `-Werror=implicit,' ../configure: line 6612: `AX_CHECK_COMPILE_FLAG(-Werror=implicit, CFLAGS="$CFLAGS -Werror=implicit")' Makefile:420: recipe for target 'config.status' failed make[1]: *** [config.status] Error 2 Installing autoconf-archive did not fix the error. So even though jenkins seems to accept this, I cannot build with this patch. Let's find out how to do this in a way that all systems can still build and then re-apply this patch. This reverts commit fd161ccce8ecaad3ddd32dd8b696902e81593ae3. Change-Id: I2b368500b07f233882ef854eca1fa21f6df39e29
2017-01-11Turn some warnings into errorsMax2-0/+9
Make warnings (when available) related to common memory-related issues into errors to harden the source and decrease chance of errors. Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700
2017-01-06Cosmetic fixes around SI generationMax5-11/+12
* add missing spaces after comma and minus * prevent useless recursion calls * mark static functions as such * name and explicitly use enum for ARFCN range Change-Id: If5b717445c8b24668bad0e78fd5bb51f66c4d18e
2016-12-31fix 'osmo-nitb --version' segfaultNeels Hofmeyr1-1/+1
Call vty_init() before handle_options() to make sure the host.app_info is populated before --version potentially tries to print it. The segfault was introduced by 2c05f75bbf3d9a69eee1fe78eb5552acf1d7671d in a recent MSC-split merge. Change-Id: Ice91256d72b9eabd52709352ba6cc6a42af2921b
2016-12-24Pass actual smpp_avail_status through to smpp in alert_all_esme()Keith1-2/+2
Change-Id: I4b00d8821c1688ca0c990b6042607f4ded0f80e3
2016-12-23cosmetic: Rename phone to msPhilipp1-7/+7
The term "phone" is incorrect. Rename phone to "MS" (mobile station) in the comments and log output of gprs_llc.c Change-Id: I322d3d99452502da7555cc2af6bc8a192ca3c9c5
2016-12-23sndcp: Allow empty SNDCP-XID indicationsPhilipp4-42/+61
In some rare cases the modem might send a xid indication that does not contain anything except the version number field. The sgsn ignors such SNDCP-XID indications by stripping the entire field from the response. We found a modem in the wild that started to act problematic when the empty SNDCP-XID was missing in the response. This patch changes the XID negotiation behaviour in a way that if a modem should send empty SNDCP-XID indications, the reply will also contain an empty SNDCP-XID indication. Apart from that the SNDCP-XID version number is now parsed and echoed in the response. This ensures that we always reply with the version number that the modem expects. (The version was 0 in all cases we observed so far) Change-Id: I097a770cb4907418f53e620a051ebb8cd110c5f2 Related: OS#1794
2016-12-22bsc_vty: Fix missing break statements in switch()Harald Welte1-0/+2
Change-Id: Ifd48e8d56c845603d320748144b4d7c3c24022a0 Fixes: Coverity CID 135188 Fixes: Coverity CID 135190
2016-12-21use new OSMO_VALUE_STRINGNeels Hofmeyr2-13/+11
libosmocore change-id I857af45ae602bb9a647ba26cf8b0d1b23403b54c adds OSMO_VALUE_STRING to compose value_string arrays with the exact enum names as entries. Use instead of identical local macros in two places. Change-Id: I1b44d2a3f293785a01d6a587c78f9e0cbeec70c3
2016-12-21gitignore: gsup_test_client binaryNeels Hofmeyr1-0/+1
gsup_test_client was added in 4f8e34b226aeae221119c1d5ea659c3f087132aa and moved to libcommon in 2c1f8c8cebe41b30deca29c55290fef7a61e5343, both of which forgot to adjust the .gitignore. Change-Id: Idd0d29a2f5c5b9b038103c955e0027d9ee9fee73
2016-12-21Integrate Debian packaging changesMax4-66/+194
debian/control: * restructure to make it easier to incorporate further changes * update package descriptions * update project URL debian/rules: * use proper hardening syntax * restructure to make it easier to incorporate further changes * remove useless comment debian/compat: update compatibility version debian/coryright: update to match Debian format Change-Id: I49cc9239b15dc77d782914ca2547e601d049acdc Related: OS#1694