In change-id Iadf43f21e0605e9e85f7e8026c40985f7ceff1a3, libosmocore changes
from incrementing SQN after tuple generation to incrementing SQN before tuple
generation. Thus we now need to pass desired_sqn - 1 to get the same tuples.
Adjust all regression tests, showing that the tuples as well as the SQNs used
to generate the tuples remain unchanged, and only the SQN before and after
generating reflect different values.
Related: OS#1968 OS#1969
Change-Id: I4ec5a578537acb1d9e1ebfe00a72417fc3ca5894
The current auc tests test a lot with SQN == 0. An upcoming change in the SQN
algorithms from libosmocore [1] will require us to pass desired_sqn - 1,
because the tuple generation will increment the SQN before calculating. Later
on [2] we will also want to employ ind_bits and ind in the test. In order to
have some room in the number range, cosmetically adjust the current SQN tested
for from 0 to 32, changing the generated AUTN. The upcoming adjustment to the
new situation will then be able to show that only the SQN values before and
after vector generation change while the auth tuples as well as the SQNs used
for generation remain the same (without having to trick around with wrapping
SQN past its maximum value).
Note that the TS 55.205 test sets include neither SQN nor AUTN. While AUTN
changes with changing SQN, all the other values are invariant of the SQN used.
So we can simply choose a different SQN and ignore the difference in the AUTN.
[1] change-id Iadf43f21e0605e9e85f7e8026c40985f7ceff1a3 "store last sqn"
[2] change-id Ibc97e1736a797ffcbf8c1f7d41c5c4518f4e41bf "fix SQN increment"
Related: OS#1969
Change-Id: I45d1866cde1b3e777460df76100af2fe4767c678
Add explicit dependency on python3 which is necessary for 'make check'
stage. While at it, add DH_VERBOSE option for debian/control to
facilitate future troubleshooting.
Change-Id: I0ed0bb0f889d4569c9229f3f12ad8bdb11cc1e7c
Related: OS#1948
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
This allows to check for subscriber's presence in DB without the need to
bother with unused structure allocation.
While at it also call to db_remove_reset() and return explicitly instead
of using goto to make it a bit easier to follow the code.
Change-Id: I83b0f4a5dacb97614721690ef55bc1311624a58e
Introduce g_hlr of type 'struct hlr' which holds pointers to all
globally accessible variables.
Change-Id: I275d3d54482f696e3378606b2406c7e0ad939e0f
Related: OS#1645
In the test failure mismatch printf, better indicate the place of first
mismatch. Helpful if some byte within a hexdump differs, the case when
debugging AUTS.
Copy some optarg code from openbsc's msc_vlr tests to provide verbose mode that
prints log statements' source file and line.
Change-Id: I1b23da055b5edacba09310411caf43c4cd1c29bc
Fix bug where AUTS was fed to each vector generation and thus each vector was
generated with the same SQN. In auc_3g_test, adjust the bug indicating test
expectations to now expect the proper results.
Depends: libosmocore change-id If943731a78089f0aac3d55245de80596d01314a4
Change-Id: I425a1d92c85896227341f565f5361c0d830ce866
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
Add test that shows how passing AUTS to auc_compute_vectors performs an AUTS
sync on each vector and hence produces the same SQN each time. This will
generate one working vector as resync result, and then N-1 more with the wrong
SQN as far as the USIM is concerned. This causes a resync to be necessary on
every authentication.
Depends: libosmocore change-id If943731a78089f0aac3d55245de80596d01314a4
Change-Id: I246c9edfb009b593f834bb5b0577b65bfde7083c
Preparing for upcoming unit test, in a separate commit for cosmetic reasons
(setting the flag to false across the code).
Change-Id: I6b9899cd898eecc95b244432f416041b194a7187
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
Used this to catch a bug where the AUTS process failed to copy RAND to the auth
vector (libosmocore).
Depends: libosmocore change-id If943731a78089f0aac3d55245de80596d01314a4
Change-Id: I06dd8671aa515139bdc3f08883f08276662cf25f
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
* move common cleanup code into separate function
* add helper function for IMSI binding
* use errno.h instead of numbers
Change-Id: Iec81b56ab1ccc948807854a3947b04355a555c10
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
* move common copy-pasted code to initialize GSUP message into static
function
* use osmo_strlcpy() to copy imsi for added safety
Change-Id: Icd6e2479aa111ff820d53711222d46c6522033e6
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
Todo for later: table subscriber_multi_msisdn possibly allows duplicating the
MSISDN, so we should drop this table or have all MSISDNs in one table separate
from 'subscriber'.
Change-Id: I5737106a232e416d67a10634e6270a7a89cf1b05
Put to-text conversion of the 3GPP TS 55.205 PDF's section defining the test
vectors in tests/auc/gen_ts_55_205_test_sets/ts55_205_test_sets.txt and add
python script to generate auc_ts_55_205_test_sets.c from that at build time.
The generated auc_ts_55_205_test_sets.c runs through all 19 test sets,
verifying that our gsm_milenage() matches the reference data.
Change-Id: Idff9d757ab956179aa41ada2a223fd9f439aafbd
Notably this has no functional effect (according to
https://sqlite.org/faq.html#q9 ), but it can't hurt to indicate intent.
Change-Id: I2b0f9369318085c1482c6d2d8db56699466bfbf3
K is the SIM card's 128bit secret key, so the type should be VARCHAR like the
other key columns. The db code already reads the column as text and parses as
hex, so a VARCHAR column matches that.
Change-Id: Iaa8d33e303760bd15dcb7dc8bb8b9b24bf6c8f14
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
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
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
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
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
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
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