aboutsummaryrefslogtreecommitdiffstats
path: root/sql
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-12-12 04:04:53 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2019-12-12 21:51:27 +0100
commit191f4b6eb3f8738fc703a74deeaceab2dfb45406 (patch)
tree698a91a4ef9e7dd24795541cc8f5b8273075a766 /sql
parent4994685f8f78cc6bbab49ec4d012620b3e7f3b7b (diff)
db v6: determine 3G AUC IND from VLR nameneels/ind_cs_ps_sep
Each VLR requesting auth tuples should use a distinct IND pool for 3G auth. So far we tied the IND to the GSUP peer connection; MSC and SGSN were always distinct GSUP peers, they ended up using distinct INDs. However, we have implemented a GSUP proxy, so that, in a distributed setup, a remotely roaming subscriber has only one direct GSUP peer proxying for both remote MSC and SGSN. That means as soon as a subscriber roams to a different site, the site's MSC and SGSN compete for the same IND bucket, waste SQNs rapidly and cause auth tuple generation load. So instead of using the local client as IND, persistently keep a list of VLR names and assign a different IND to each. Use the GSUP source_name as indicator, which reflects the actual remote VLR's name. Furthermore, make 100% sure that CS and PS pools can never collide, by keeping all CS pools odd numbered and all PS pools even numbered. Persist the site <-> IND assignments in the database. Add an IND test to db_test.c Related: OS#4319 Change-Id: I6f0a6bbef3a27507605c3b4a0e1a89bdfd468374
Diffstat (limited to 'sql')
-rw-r--r--sql/hlr.sql11
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/hlr.sql b/sql/hlr.sql
index 98e586d..6b05b6d 100644
--- a/sql/hlr.sql
+++ b/sql/hlr.sql
@@ -79,8 +79,17 @@ CREATE TABLE auc_3g (
ind_bitlen INTEGER NOT NULL DEFAULT 5
);
+CREATE TABLE ind (
+ cn_domain INTEGER NOT NULL,
+ -- 3G auth IND bucket to be used for this VLR, where IND = (idx << 1) + cn_domain -1
+ ind INTEGER PRIMARY KEY,
+ -- VLR identification, usually the GSUP source_name
+ vlr TEXT NOT NULL,
+ UNIQUE (cn_domain, vlr)
+);
+
CREATE UNIQUE INDEX idx_subscr_imsi ON subscriber (imsi);
-- Set HLR database schema version number
-- Note: This constant is currently duplicated in src/db.c and must be kept in sync!
-PRAGMA user_version = 5;
+PRAGMA user_version = 6;