aboutsummaryrefslogtreecommitdiffstats
path: root/src/hlr.c
AgeCommit message (Collapse)AuthorFilesLines
2017-07-21use OSMO_GSUP_PORT == 4222 instead of hardcoded 2222Neels Hofmeyr1-1/+1
Depends: I4222e21686c823985be8ff1f16b1182be8ad6175 (libosmocore) Change-Id: I9b372a4ac38677773bf813acba80cebcd88e2e20
2017-06-01VTY: Add hlr node and bind ip fieldPau Espin Pedrol1-3/+4
With this patch the address osmo-hlr binds to can be changed to something else than 0.0.0.0 Change-Id: I79f7a300480f308b21116dd14d1698be38725afd
2017-03-16UMTS AKA: implement SQN increment according to SEQ and INDNeels Hofmeyr1-1/+2
Add ind_bitlen column to auc_3g to record each USIM's IND size according to 3GPP TS 33.102 -- default is 5 bits, as suggested by the spec. Introduce auc_3g_ind to each connecting GSUP client to use as IND index for generating auth tuples sent to this client. With osmo_gsup_server_add_conn(), implement a scheme where clients receive fixed auc_3g_ind indexes based on the order in which they connect; each new connection takes the lowest unused auc_3g_ind, so in case one of the clients restarts, it will most likely receive the same auc_3g_ind, and if one client disconnects, no other clients' auc_3g_ind are affected. Add gsup_server_test.c to test the auc_3g_ind index distribution scheme. Depends: libosmocore I4eac5be0c0b2cede04464c4c3a0873102d952453 for llist_first Related: OS#1969 Change-Id: If4501ed4ff8e923fa6fe8b80c44c5ad647a8ed60
2017-03-06CTRL: add enable/disable packet service cmdsMax1-1/+10
Add commands to enable/disable Packet Service for a given IMSI. Changes are synced to DB and propagated at runtime to SGSN (in case of disable command). Change-Id: I23163ce8667292443ed61cb15c928357dba4b4be Related: OS#1645
2017-03-06Add CTRL interfaceMax1-0/+13
* add command to query Packet Services (GPRS etc.) for particular IMSI. * add vty command to configure ctrl bind address * add missing vty copyright notice Change-Id: Id787ef4aa88473c3bbde6ee25117b1fd99dc8fcb Related: OS#1645
2017-03-05Add global HLR structMax1-14/+17
Introduce g_hlr of type 'struct hlr' which holds pointers to all globally accessible variables. Change-Id: I275d3d54482f696e3378606b2406c7e0ad939e0f Related: OS#1645
2017-02-16Move lu_operation into separate fileMax1-258/+12
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-01main: add VTY and '-c config-file' optionNeels Hofmeyr1-1/+41
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 Hofmeyr1-2/+89
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
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-11fix various compiler warningsNeels Hofmeyr1-1/+1
Change-Id: I3bf3b351535843bde9c0c1d955315615bb7c30b2
2016-12-11fix build on FreeBSD: eliminate implicitly declared functionsNeels Hofmeyr1-0/+2
Change-Id: I4f7222f19e4d7129a5cef828a28dd12a40824a59
2016-06-10fix authentication re-sync (pass RAND+AUTS along)Harald Welte1-1/+1
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 Welte1-0/+40
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 Welte1-0/+5
2016-05-05State number of auth vectors in SAI responseHarald Welte1-1/+3
2016-05-05AUC: Differentiate between actual error and unknown IMSIHarald Welte1-1/+5
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-03add copyright statements to all filesHarald Welte1-0/+19
2016-05-03Major update; Code now supports SAI, LU and ISD transactionsHarald Welte1-3/+354
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-28ensure we release memory for all received msgb.Harald Welte1-0/+1
2016-04-28hlr: install signal handlers for SIGINT/USR1/HUPHarald Welte1-1/+28
2016-04-28initial import of osmo-gsup-hlr code so farHarald Welte1-0/+109