Commit Graph

285 Commits

Author SHA1 Message Date
Neels Hofmeyr 0acd31e9a6 log: move a log from info to debug level
This basically duplicates an info log further below that says "Generated..."

Change-Id: I32f22f71adc6dc2fbc7bcca5d277337baef3cd6d
2016-12-21 23:11:25 +01:00
Neels Hofmeyr 4307ad94b6 debug log: log computed vector kinds
Change-Id: Iffb9b0f99e3006861599c921d037504a7bc8d976
2016-12-21 23:11:25 +01:00
Neels Hofmeyr 627de84abe gsup: send subscriber MSISDN
Change-Id: Iace97a1a828b29ce11913a14243bcf80bbae9136
2016-12-21 15:00:13 +01:00
Max 2fc63a6e84 Add hardcoded APN
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-21 10:53:55 +01:00
Max 21229a06be Add gerrit settings
Make it simple to setup and use this repo with 'git review' command.

Change-Id: Ic03e19e2bab46ae2383504cf26e3d7e29d361f05
2016-12-21 10:35:38 +01:00
Neels Hofmeyr 54db5e712d bump required libosmocore version to 0.9.5
0.9.5 tags the version from which on DLGSUP is properly handled in
libosmocore's internal logging.

This bump follows up on previous osmo-hlr change
I74ab1a031d1ed144468b016294d2965eba5e7d1d.

Change-Id: I2af7a9eff3f116bd3bd02edd42e6e0a64f8280cd
2016-12-15 20:16:50 +00:00
Neels Hofmeyr c317cc20c8 build: actually make sqlite mandatory
Change-Id: I9f7183c6a1e1b3a4bc887a67faf2a1c4dfb44762
2016-12-13 14:48:18 +00:00
Neels Hofmeyr cb2a63406e build: recoin db_test as non-installable program
Change-Id: Id21e7cc1d94824af75a5639810c7d61d7fa7964c
2016-12-12 17:34:25 +01:00
Neels Hofmeyr 3e6a69d2ab fix DLGSUP logging cat after change in libosmocore
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-11 01:22:45 +01:00
Neels Hofmeyr ec1b959496 fix various compiler warnings
Change-Id: I3bf3b351535843bde9c0c1d955315615bb7c30b2
2016-12-11 01:22:45 +01:00
Neels Hofmeyr 6eed322063 fix build on FreeBSD: eliminate implicitly declared functions
Change-Id: I4f7222f19e4d7129a5cef828a28dd12a40824a59
2016-12-11 01:22:45 +01:00
Neels Hofmeyr 40d8b01dea build with autoconf/automake, add jenkins.sh script
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-12-11 01:07:26 +01:00
Harald Welte 7f8c301005 add COPYING file with AGPLv3 license text 2016-11-11 10:17:06 +01:00
Max b5bce1e485 Fix build on Ubuntu
Linked libraries supposed to come _after_ the objects which uses
functions from them.
2016-06-30 12:58:49 +02:00
Harald Welte 9be0d2f1a8 fix authentication re-sync (pass RAND+AUTS along) 2016-06-10 17:34:02 +02:00
Harald Welte 79f7140cdf fix PURGE_MS sqlite3 access 2016-06-10 17:33:38 +02:00
Harald Welte fbaa54b957 LU: remote oudated FIXME comments 2016-05-05 21:05:17 +02:00
Harald Welte 53b8678cfc LU: correctly determine and use is_ps
Don't use a local uninitialized variable but the luop->is_ps instead.
2016-05-05 21:04:11 +02:00
Harald Welte b18f0e04f3 implement PURGE-MS from VLR/SGSN to HLR
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-05 21:03:03 +02:00
Harald Welte 999092790c some more comment / todo updates 2016-05-05 18:24:15 +02:00
Harald Welte 64f3ca3864 AUC: use osmo_hexparse() when reading key material from db
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-05 17:08:48 +02:00
Harald Welte 15db8264c0 State number of auth vectors in SAI response 2016-05-05 16:50:39 +02:00
Harald Welte cfc752bd85 AUC: Differentiate between actual error and unknown IMSI
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-05 16:38:14 +02:00
Harald Welte 6048b59649 populate_hlr_db.pl: Script to generate a HLR database
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-03 18:51:40 +02:00
Harald Welte 936f6724ec add copyright statements to all files 2016-05-03 18:51:18 +02:00
Harald Welte b6522c0874 db_auc: remove some debugging code about column types 2016-05-03 18:51:04 +02:00
Harald Welte abd1a54183 db: Use Write-Ahead Logging mode of SQLite3 2016-05-03 18:50:41 +02:00
Harald Welte e687be5f2d Major update; Code now supports SAI, LU and ISD transactions
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-05-03 18:49:27 +02:00
Harald Welte 6122915304 hlr.sql: Don't use TRUE/FALSE as DEFAULT, they will be strings :(
SQLite has this crappy type system where you can put a string into
a boolean or integer column, which of course will break once you try to
read it as bool..

Also, add an index by IMSI to the SUBSCRIBER table.
2016-05-03 18:48:12 +02:00
Harald Welte a7617e9126 Fix memory leakage in gsup_server
Once a remote IPA client is gone, we need to remove the associated
osmo_gsup_conn object.
2016-04-28 12:57:10 +02:00
Harald Welte 5341b5d972 ensure we release memory for all received msgb. 2016-04-28 12:48:39 +02:00
Harald Welte aabae9e7ca hlr: install signal handlers for SIGINT/USR1/HUP 2016-04-28 12:48:14 +02:00
Harald Welte f2d96dad3b more verbose error handling in osmo_gsup_server_read_cb() 2016-04-28 11:13:15 +02:00
Harald Welte 173afdbdbf gsup_server: Implement IPA CCM handling using new libosmo-abis function 2016-04-28 11:13:04 +02:00
Harald Welte e72cf55347 initial import of osmo-gsup-hlr code so far 2016-04-28 07:18:49 +02:00