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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16763 )
Change subject: auc3g: officially wrap IND around IND_bitlen space
......................................................................
auc3g: officially wrap IND around IND_bitlen space
To determine distinct IND pools for each connected VLR, we need to pick ever
increasing values for any new peer showing up. Each subscriber's individual
IND_bitlen is then required to modulo the least significant N of bits that fit
in its IND_bitlen to effectively round-robin in the available IND pool space.
So far we did that but issued a warning message. This is actually exactly what
we want and it doesn't need to be treated like it weren't so.
Change-Id: I716d8a8a249235c8093d7a6a78b3535d893d867e
---
M src/db_auc.c
1 file changed, 9 insertions(+), 8 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/src/db_auc.c b/src/db_auc.c
index ecb9f58..975eb2d 100644
--- a/src/db_auc.c
+++ b/src/db_auc.c
@@ -200,15 +200,16 @@
if (rc)
return rc;
+ /* modulo by the IND bitlen value range. For example, ind_bitlen == 5 would modulo 32:
+ * 1 << 5 == 0b0100000 == 32
+ * - 1 == 0b0011111 == bitmask of 5 lowest bits
+ * x &= 0b0011111 == modulo 32
+ * Why do this? osmo-hlr cannot possibly choose individual VLR INDs always matching all subscribers' IND_bitlen,
+ * which might vary wildly. Instead, let hlr.c pass in an arbitrarily high number here, and the modulo does a
+ * round-robin if the IND pools that this subscriber has available. */
+ auc_3g_ind &= (1U << aud3g.u.umts.ind_bitlen) - 1;
aud3g.u.umts.ind = auc_3g_ind;
- if (aud3g.type == OSMO_AUTH_TYPE_UMTS
- && aud3g.u.umts.ind >= (1U << aud3g.u.umts.ind_bitlen)) {
- LOGAUC(imsi, LOGL_NOTICE, "3G auth: SQN's IND bitlen %u is"
- " too small to hold an index of %u. Truncating. This"
- " may cause numerous additional AUTS resyncing.\n",
- aud3g.u.umts.ind_bitlen, aud3g.u.umts.ind);
- aud3g.u.umts.ind &= (1U << aud3g.u.umts.ind_bitlen) - 1;
- }
+
/* the first bit (bit0) cannot be used as AMF anymore, but has been
* re-appropriated as the separation bit. See 3GPP TS 33.102 Annex H
* together with 3GPP TS 33.401 / 33.402 / 33.501 */
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16763
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I716d8a8a249235c8093d7a6a78b3535d893d867e
Gerrit-Change-Number: 16763
Gerrit-PatchSet: 13
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200501/8ab79f3c/attachment.htm>