aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2017-02-22cosmetic: refactor auc_compute_vectors(), add debug logNeels Hofmeyr1-30/+84
Make the generation logic easier to understand (hopefully). Massively extend debug logging, which serves to illustrate the current AUTS failure shown by auc_3g_test. Since DAUC now logs the vectors, there is no need to print the vectors in VEC_IS() in auc_3g_test and auc_ts_55_205_test_sets anymore. Adjust testlog expectations accordingly. Change-Id: Ifb36d010a4ac64c765517e15b9074424ec19cc60
2017-02-22auc_gen_vectors(): ensure sane arguments, testNeels Hofmeyr1-3/+32
In auc_gen_vectors(), add various checks that the auth data arguments passed make sense, and add unit test to verify that they work. (Caught a segfault due to NULL dereference with this.) Change-Id: I775652b6a91d382707ce32176a3fe4ef547cbca7
2017-02-21Add routines to update nam_psMax3-8/+38
Add SQL queries to change nam_ps value and function which uses them. Change-Id: I24fb79e084b2dfa6a81b52f448b94a86e47014ef
2017-02-20Fix compiler's warning about printf securityMax1-1/+1
Also, fix log formatting: SQL statements do not have '\n' at the end. Note: sqlite should be compiled with SQLITE_ENABLE_SQLLOG for this code to work at all. Change-Id: I5e53de54ad1b9da18e1f414932cfd21be71ab154
2017-02-20db: move duplicated code into helper functionsMax3-46/+47
* move common cleanup code into separate function * add helper function for IMSI binding * use errno.h instead of numbers Change-Id: Iec81b56ab1ccc948807854a3947b04355a555c10
2017-02-16Move lu_operation into separate fileMax4-258/+362
Create luop.(c|h) and move lu_operation and corresponding TX functions there to facilitate re-use in upcoming control interface. Change-Id: Ic55a45d56b37be2ba43d96f7da2af43b46af9813 Related: OS#1645
2017-02-16Use strings for GSUP message typeMax1-4/+5
Change-Id: Idf57a314f5c8cfbd4818600c90020e3ed3decc77
2017-02-13Move GSUP msg init into separate functionMax1-12/+15
* move common copy-pasted code to initialize GSUP message into static function * use osmo_strlcpy() to copy imsi for added safety Change-Id: Icd6e2479aa111ff820d53711222d46c6522033e6
2017-02-13Log error cause as a stringMax1-2/+3
Use gsm48_gmm_cause_names to log error cause instead of numerical code. Change-Id: I846d488ed163e137164976738e55674f0eaee190
2017-02-03UMTS AKA resync: fix argument orderingNeels Hofmeyr1-2/+2
According to libosmocore change-id I0dcbd49759fc32d3b8974102dbd1d6703364ebf4 this argument ordering will not result in successful AUTS. Pass in order auts, auts_rand so that these are passed correctly to our milenage code. Change-Id: I6aa19004ec27bad5e9c2bf688d9bbc55d697ccb0
2017-02-01tests: auc_3g_test: implement vector generation testNeels Hofmeyr1-2/+4
Change-Id: I291bccd62661ff5790dc43d91dc63a9e4b0e0ff2
2017-02-01main: add VTY and '-c config-file' optionNeels Hofmeyr4-1/+116
Add config file, mainly for logging control. Open VTY on the OMSO_VTY_PORT_HLR added to libosmocore in commit 92fa18e6b800a27aa064a5fb8321cddd7383ae20 aka change-id I08cb52d9399a27e6876e45da36f434708c4fddef. Add hlr_vty.h/c for standard VTY setup. Add -c option to pass config file. Add --version option. Change-Id: Iedb884345a597371a337b0c67eb6013b7d5d1ce1
2017-02-01main: add option parsing with db file and default optionsNeels Hofmeyr2-2/+90
Parse commandline options, supporting general Osmocom options as copied from osmo-nitb (bsc_hack.c): version, logging and daemonize options. Set the HLR database file from cmdline option, log the filename in db_open(). (VTY config file in next patch.) Change-Id: I279d517e1310e398b0a2382349e62be8e65364c1
2017-02-01main: add and use root talloc ctxNeels Hofmeyr1-4/+7
Create hlr_ctx and pass on to DB and GSUP server code. Add call msgb_talloc_ctx_init(hlr_ctx). Instead of printing the entire talloc context on exit, just print the hlr_ctx upon SIGUSR1 (like our other binaries do). Otherwise we will get pages of talloc output on each program exit as soon as we add a VTY (next patch). Change-Id: I3c64cb4ad7a681b88c7409296ad3afeb8000e2a4
2017-01-19auc.c: typo in commentNeels Hofmeyr1-1/+1
Change-Id: I4652e932f1bdb7767b5394c09e7436812488aa74
2016-12-21log: move a log from info to debug levelNeels Hofmeyr1-1/+1
This basically duplicates an info log further below that says "Generated..." Change-Id: I32f22f71adc6dc2fbc7bcca5d277337baef3cd6d
2016-12-21debug log: log computed vector kindsNeels Hofmeyr1-0/+6
Change-Id: Iffb9b0f99e3006861599c921d037504a7bc8d976
2016-12-21gsup: send subscriber MSISDNNeels Hofmeyr1-1/+15
Change-Id: Iace97a1a828b29ce11913a14243bcf80bbae9136
2016-12-21Add hardcoded APNMax1-1/+14
Add APN '*' to PDP info part of GSUP response to make it possible to test SGSN 'auth-policy remote'. Change-Id: I95d69508aafc13e82f5f51fc6fe8f56cd7f45e2b Related: OS#1794
2016-12-12build: recoin db_test as non-installable programNeels Hofmeyr1-0/+3
Change-Id: Id21e7cc1d94824af75a5639810c7d61d7fa7964c
2016-12-11fix DLGSUP logging cat after change in libosmocoreNeels Hofmeyr1-6/+0
DLGSUP must no longer be added to applications' logging category arrays after change-id Id974c7be158e4d60421a98110f5c807aefd31119 in libosmocore. Todo: once above change is merged to libosmocore, bump the required libosmocore version in configure.ac. Change-Id: I74ab1a031d1ed144468b016294d2965eba5e7d1d
2016-12-11fix various compiler warningsNeels Hofmeyr3-7/+7
Change-Id: I3bf3b351535843bde9c0c1d955315615bb7c30b2
2016-12-11fix build on FreeBSD: eliminate implicitly declared functionsNeels Hofmeyr3-0/+5
Change-Id: I4f7222f19e4d7129a5cef828a28dd12a40824a59
2016-12-11build with autoconf/automake, add jenkins.sh scriptNeels Hofmeyr2-18/+61
Add configure.ac and Makefile.ams to build with autoreconf && ./configure && make like most other Osmocom projects. Add jenkins.sh for a gerrit build job to verify patches. Change-Id: I6b4419dd519f3d0a75235d0c22bf899f075347a3
2016-06-30Fix build on UbuntuMax1-2/+2
Linked libraries supposed to come _after_ the objects which uses functions from them.
2016-06-10fix authentication re-sync (pass RAND+AUTS along)Harald Welte1-1/+1
2016-06-10fix PURGE_MS sqlite3 accessHarald Welte2-8/+4
2016-05-05LU: remote oudated FIXME commentsHarald Welte1-2/+0
2016-05-05LU: correctly determine and use is_psHarald Welte1-3/+2
Don't use a local uninitialized variable but the luop->is_ps instead.
2016-05-05implement PURGE-MS from VLR/SGSN to HLRHarald Welte3-0/+90
Using this procedure, the VLR/SGSN can set the cs/ps purged flag for the subscriber. We might not even need to store this persistent in the database according to spec, but let's do it anyway, at least until it turns out to be a performance issue.
2016-05-05some more comment / todo updatesHarald Welte2-0/+6
2016-05-05AUC: use osmo_hexparse() when reading key material from dbHarald Welte1-4/+6
The database stores the key material as hex-ascii, we thus need to go through osmo_hexparse() when reading. We could also store the material as BLOB in the database. That would however complicate matters, as it would basically mean using the sqlite3 command to manually inspect/modify data from the console would no longer be easily possible. Using this commit I have 2G authentication working against osmo-sgsn with GSUP and 'auth policy remote'.
2016-05-05State number of auth vectors in SAI responseHarald Welte1-1/+3
2016-05-05AUC: Differentiate between actual error and unknown IMSIHarald Welte2-11/+34
When responding to a SendAuthInfo.req, we need to differentiate an error case caused by an unknown IMSI, or an error caused by an error regarding accessing the database or data integrity.
2016-05-03populate_hlr_db.pl: Script to generate a HLR databaseHarald Welte1-0/+75
It currently creates a database with 1 million subscribers, all of which are provisioned for both 2G and 3G authentication using the same key material.
2016-05-03add copyright statements to all filesHarald Welte2-0/+38
2016-05-03db_auc: remove some debugging code about column typesHarald Welte1-4/+0
2016-05-03db: Use Write-Ahead Logging mode of SQLite3Harald Welte1-0/+6
2016-05-03Major update; Code now supports SAI, LU and ISD transactionsHarald Welte9-11/+695
We also introduce a 'gsup_router' which enables us to route a transaction to a given VLR. It works based on the SERIAL attribute communicated at time of the IPA multiplex setup as part of the CCM sub-protocol.
2016-04-28Fix memory leakage in gsup_serverHarald Welte1-2/+3
Once a remote IPA client is gone, we need to remove the associated osmo_gsup_conn object.
2016-04-28ensure we release memory for all received msgb.Harald Welte2-1/+2
2016-04-28hlr: install signal handlers for SIGINT/USR1/HUPHarald Welte1-1/+28
2016-04-28more verbose error handling in osmo_gsup_server_read_cb()Harald Welte1-5/+13
2016-04-28gsup_server: Implement IPA CCM handling using new libosmo-abis functionHarald Welte1-29/+25
2016-04-28initial import of osmo-gsup-hlr code so farHarald Welte15-0/+1061