Commit Graph

11 Commits

Author SHA1 Message Date
Neels Hofmeyr 84c2f43d00 fix debug log: put 'deriving 2G from 3G' in proper place
Don't log "deriving 2G from 3G" when we're actually calculating separately; log
it when we're actually deriving from 3G.

Add log "calculating 2G separately" in the right place.

The test output changes show that each test said "separate 2G" at the top while
logging "deriving 2G from 3G" further down, which was obviously wrong.

Change-Id: I6679d7ef8fdcae39a0c2aff7ac638e63dddb10dc
2017-12-20 00:10:34 +01:00
Neels Hofmeyr edebc22989 debug log: output ind slot, previous sqn, and sqn db update
Change-Id: Ib86442ea45f6c1948b3d260f59d35bdca38fbd32
2017-03-16 05:51:58 +01:00
Neels Hofmeyr ee392bb3b1 fix debug log: adjust to new SQN increment scheme
We can no longer accurately print the SQN from AUTS resync, since the SQN is
incremented after AUTS. Instead, always print the SQN from the generated tuple,
i.e. exactly the one left in auth data *after* the tuple was generated.

This change was forgotten in recent adjustments to the new SQN incrementing
scheme from libosmocore, in change-id I4ec5a578537acb1d9e1ebfe00a72417fc3ca5894
for libosmocore change-id Iadf43f21e0605e9e85f7e8026c40985f7ceff1a3.

It should have been obvious that something was missing in the previous patch
from the auc_test output: the SQN in the output changed while the AUTN remained
the same. That slipped by without being noticed :/

Change-Id: I0e1e828da931a3d22c75306c55bdb7f44df6512f
2017-03-16 05:46:40 +01:00
Neels Hofmeyr b5b11e31fb auc_compute_vectors(): fix AUTS resync for multiple vectors
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
2017-02-22 03:25:30 +01:00
Neels Hofmeyr 8d97d34f58 cosmetic: refactor auc_compute_vectors(), add debug log
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-22 03:25:30 +01:00
Neels Hofmeyr 569d322597 auc_gen_vectors(): ensure sane arguments, test
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-22 03:25:29 +01:00
Neels Hofmeyr 912a303fec UMTS AKA resync: fix argument ordering
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-03 06:02:30 +01:00
Neels Hofmeyr 8cde66242a tests: auc_3g_test: implement vector generation test
Change-Id: I291bccd62661ff5790dc43d91dc63a9e4b0e0ff2
2017-02-01 14:22:26 +01:00
Neels Hofmeyr 5b581ac6eb auc.c: typo in comment
Change-Id: I4652e932f1bdb7767b5394c09e7436812488aa74
2017-01-19 15:54:01 +01:00
Neels Hofmeyr 4307ad94b6 debug log: log computed vector kinds
Change-Id: Iffb9b0f99e3006861599c921d037504a7bc8d976
2016-12-21 23:11:25 +01:00
Harald Welte e72cf55347 initial import of osmo-gsup-hlr code so far 2016-04-28 07:18:49 +02:00