[PATCH] osmo-hlr[master]: fix debug log: adjust to new SQN increment scheme

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Mar 16 04:27:48 UTC 2017


Review at  https://gerrit.osmocom.org/2090

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.

Change-Id: I0e1e828da931a3d22c75306c55bdb7f44df6512f
---
M src/auc.c
1 file changed, 2 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/90/2090/1

diff --git a/src/auc.c b/src/auc.c
index 9c20db2..d3b3d36 100644
--- a/src/auc.c
+++ b/src/auc.c
@@ -123,14 +123,7 @@
 
 				rc = osmo_auth_gen_vec_auts(vec+i, aud3g, auts,
 							    rand_auts, rand);
-				/* The sqn used for the key is sqn - 1 because
-				 * vector generation has already inc'd it. The
-				 * USIM's sqn sent in AUTS is sqn - 2. */
-				DBGP("vector [%u]: resync: sqn = %"PRIu64 "\n",
-				     i, aud3g->u.umts.sqn - 1);
 			} else {
-				DBGP("vector [%u]: sqn = %" PRIu64 "\n",
-				     i, aud3g->u.umts.sqn);
 				rc = osmo_auth_gen_vec(vec+i, aud3g, rand);
 			}
 			if (rc < 0) {
@@ -138,6 +131,8 @@
 				     "generation: [%u]: rc = %d\n", i, rc);
 				goto out;
 			}
+			DBGP("vector [%u]: sqn = %" PRIu64 "\n",
+			     i, aud3g->u.umts.sqn);
 
 			DBGVB(autn);
 			DBGVB(ck);

-- 
To view, visit https://gerrit.osmocom.org/2090
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e1e828da931a3d22c75306c55bdb7f44df6512f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list