libosmocore/src
Neels Hofmeyr 82c9a0ec19 osmo_auth_gen_vec: UMTS auth: store last used SQN, not next
Prepare for the implementation of splitting SQN increments in SEQ and an IND
part; particularly to clearly show where the changes in auth/milenage_test's
expectations originate.

Rationale: the source of UMTS auth vectors, for us usually OsmoHLR, typically
stores the last used SQN, not the next one to be used. Particularly with the
upcoming fix of the SQN scheme, this change is important: the next SQN will
depend on which entity asks for it, because each auth consumer may have a
particular slot in the IND part of SQN. It does not make sense to store the
next SQN, because we will not know which consumer that will be for.

The milenage_test has always calculated a tuple for SQN == 34. To account for
the increment now happening before calculating a tuple, lower the test_aud->sqn
by one to 0x21 == 33, so that it is still calculating for SQN == 34.

Because we are no longer incrementing SQN after the tuple is generated,
milenage_test's expected output after doing an AUTS resync to 31 changes to the
next SQN = 32, the SQN used for the generated tuple.

(BTW, a subsequent patch will illustrate AUTS in detail.)

osmo-auc-gen now needs to pass the user requested SQN less one, because the SQN
will be incremented befor generating the auth vector. Also the SQN remains the
same after generating, so SQN output needs less decrementing. Note that the
expected output for osmo-auc-gen_test remains unchanged, hence the same input
arguments (particularly -s <sqn> and -A <auts>) still produce the same results.

Note: osmo-hlr regression tests will require adjustments when this patch is
merged, because it must now pass desired_sqn - 1 instead of just desired_sqn.
See osmo-hlr change-id I4ec5a578537acb1d9e1ebfe00a72417fc3ca5894 .

Related: OS#1968
Change-Id: Iadf43f21e0605e9e85f7e8026c40985f7ceff1a3
2017-03-15 12:46:08 +00:00
..
codec DTX: fix AMR SID-FIRST detection 2017-01-10 23:28:12 +00:00
coding build: cosmetic: coding: break a CPPFLAGS line 2017-03-13 14:49:12 +01:00
ctrl ctrl_type_vals: fix range check 2017-03-06 14:35:54 +00:00
gb logging.h: fixup: shorter names for LOGGING_FILTER_* and LOGGING_CTX_* 2017-02-23 18:08:12 +01:00
gsm osmo_auth_gen_vec: UMTS auth: store last used SQN, not next 2017-03-15 12:46:08 +00:00
sim sim: Link to libtalloc as symbols of it are used here 2017-01-24 14:26:11 +01:00
vty logging.h: fixup: shorter names for LOGGING_FILTER_* and LOGGING_CTX_* 2017-02-23 18:08:12 +01:00
Makefile.am Catch-up with git version tags 2016-12-21 10:31:17 +00:00
application.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
backtrace.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
bitcomp.c bitcomp: Remove the t4 decoding from libosmocore 2016-11-10 17:07:45 +00:00
bits.c Add octet-aligned/unaligned shift functions 2016-06-20 19:02:56 +02:00
bitvec.c Add function to get uninterrupted bit run 2017-01-06 10:37:42 +00:00
conv.c misc: Doxygen tweaks: fixed some typos and minor errors 2013-02-15 13:27:59 +01:00
crc16.c add CRC16-CCITT to libosmocore 2016-12-23 22:16:08 +01:00
crcXXgen.c.tpl misc: Doxygen tweaks: fixed some typos and minor errors 2013-02-15 13:27:59 +01:00
fsm.c fsm: Add VTY introspection of osmo_fsm and their instances 2017-01-07 12:21:11 +00:00
gsmtap_util.c Remove direct logging 2017-01-06 10:12:24 +00:00
logging.c logging.h: fixup: shorter names for LOGGING_FILTER_* and LOGGING_CTX_* 2017-02-23 18:08:12 +01:00
logging_gsmtap.c Implement GSMTAP log target 2016-12-09 17:59:58 +01:00
logging_syslog.c doc: Fix the Doxygen section endings 2012-04-18 21:53:23 +02:00
loggingrb.c sttrb / loggingrb: Use GPLv2+ as license, not AGPLv3+ 2014-10-26 20:52:25 +01:00
macaddr.c disable various code if building for bare-iron embedded 2017-01-23 12:20:33 +00:00
msgb.c msgb: add msgb_talloc_ctx_init(), deprecate msgb_set_talloc_ctx() 2016-09-27 11:46:38 +02:00
msgfile.c msgfile: Fix warning on BSDs stdio 2015-03-18 21:54:37 +01:00
panic.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
plugin.c add some missing doxygen annotation for libosmocore functions 2013-01-11 09:43:32 +01:00
prim.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
rate_ctr.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
rbtree.c fix FSF address in sources/headers 2015-11-12 13:46:05 +01:00
select.c select: add functionality to check socket state 2017-02-07 13:39:00 +01:00
serial.c serial.c: file descriptor '0' is a valid value 2016-12-24 17:59:36 +01:00
signal.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
socket.c cosmetic: replace fprintf with LOGP 2017-02-09 16:21:01 +01:00
stat_item.c stats: Add OSMO prefix to STAT_ITEM_NOVALUE_ID 2015-12-08 10:33:15 +01:00
statistics.c core: Add difference function to osmo_counter 2015-10-29 01:10:06 +01:00
stats.c statsd: Fix compiler warning (int32_t vs. int64_t) 2016-11-11 15:24:24 +01:00
stats_statsd.c statsd: Fix compiler warning (int32_t vs. int64_t) 2016-11-11 15:24:24 +01:00
strrb.c strrb.c: Use string.h, not strings.h 2014-11-14 15:21:18 +01:00
timer.c timer: only call the callback if not NULL 2016-11-28 23:23:09 +01:00
timer_gettimeofday.c add osmo_gettimeofday as a shim around gettimeofday 2016-09-22 07:18:39 +02:00
utils.c osmo_hexparse: allow whitespace in parsed string, add ws test 2017-02-14 15:59:22 +01:00
write_queue.c wqueue: Reject messges if queue is considered full 2016-12-09 11:37:37 +01:00