summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-22 01:42:43 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-22 03:25:30 +0100
commitb5b11e31fbe23466129b39d37d47b91ae7c42366 (patch)
treee4d09c695e1733bf31d2d00b00f832b2973ac6a2 /src
parent8d97d34f5872865af4364ad0af1cdd88dbd7bd82 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/auc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/auc.c b/src/auc.c
index f4d19a0..9c20db2 100644
--- a/src/auc.c
+++ b/src/auc.c
@@ -113,7 +113,9 @@ int auc_compute_vectors(struct osmo_auth_vector *vec, unsigned int num_vec,
if (aud3g) {
/* 3G or 3G + 2G case */
- if (auts) {
+ /* Do AUTS only for the first vector or we would use
+ * the same SQN for each following key. */
+ if ((i == 0) && auts) {
DBGP("vector [%u]: resync: auts = %s\n",
i, hex(auts, 14));
DBGP("vector [%u]: resync: rand_auts = %s\n",