Change in osmo-msc[master]: vty: make retrieve-imeisv-early configurable

osmith gerrit-no-reply at lists.osmocom.org
Wed May 15 08:43:39 UTC 2019


osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/13892 )

Change subject: vty: make retrieve-imeisv-early configurable
......................................................................

vty: make retrieve-imeisv-early configurable

Prepare for Rhizomatica's subscriber on demand use case, in which the
network access is disabled by default for new subscribers, but the IMEI
is required in the HLR to find out which user has which IMSI. Due to the
network access being disabled, the location update request towards the
HLR fails and the MS gets rejected, so we need to get the IMEI early.

Related: OS#2542, OS#3755
Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f
---
M src/libmsc/msc_vty.c
M tests/test_nodes.vty
2 files changed, 21 insertions(+), 7 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 2990735..bd369ae 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -455,13 +455,24 @@
 }
 
 DEFUN(cfg_msc_check_imei_rqd, cfg_msc_check_imei_rqd_cmd,
-      "check-imei-rqd (0|1)",
+      "check-imei-rqd (0|1|early)",
       "Send each IMEI to the EIR to ask if it is permitted or not. The EIR is implemented as part of OsmoHLR, "
       "and can optionally save the IMEI in the HLR.\n"
       "Do not send IMEIs to the EIR\n"
-      "Send each IMEI to the EIR\n")
+      "Send each IMEI to the EIR\n"
+      "Send each IMEI to the EIR, and do it at the start of the location update. This allows the EIR to receive the"
+      " IMEI, even if the MS would get rejected when the MSC sends the location update request to the HLR.\n")
 {
-	gsmnet->vlr->cfg.check_imei_rqd = atoi(argv[0]) ? true : false;
+	if (strcmp(argv[0], "0") == 0) {
+		gsmnet->vlr->cfg.check_imei_rqd = false;
+		gsmnet->vlr->cfg.retrieve_imeisv_early = false;
+	} else if (strcmp(argv[0], "1") == 0) {
+		gsmnet->vlr->cfg.check_imei_rqd = true;
+		gsmnet->vlr->cfg.retrieve_imeisv_early = false;
+	} else if (strcmp(argv[0], "early") == 0) {
+		gsmnet->vlr->cfg.check_imei_rqd = true;
+		gsmnet->vlr->cfg.retrieve_imeisv_early = true;
+	}
 	return CMD_SUCCESS;
 }
 
@@ -581,9 +592,12 @@
 		vty_out(vty, " auth-tuple-reuse-on-error 1%s",
 			VTY_NEWLINE);
 
-	if (gsmnet->vlr->cfg.check_imei_rqd)
-		vty_out(vty, " check-imei-rqd 1 %s",
-			VTY_NEWLINE);
+	if (gsmnet->vlr->cfg.check_imei_rqd) {
+		if (gsmnet->vlr->cfg.retrieve_imeisv_early)
+			vty_out(vty, " check-imei-rqd early%s", VTY_NEWLINE);
+		else
+			vty_out(vty, " check-imei-rqd 1%s", VTY_NEWLINE);
+	}
 
 	if (gsmnet->paging_response_timer != MSC_PAGING_RESPONSE_TIMER_DEFAULT)
 		vty_out(vty, " paging response-timer %u%s", gsmnet->paging_response_timer, VTY_NEWLINE);
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index 28eaefb..cdb3f8a 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -38,7 +38,7 @@
   no assign-tmsi
   auth-tuple-max-reuse-count <-1-2147483647>
   auth-tuple-reuse-on-error (0|1)
-  check-imei-rqd (0|1)
+  check-imei-rqd (0|1|early)
   cs7-instance-a <0-15>
   cs7-instance-iu <0-15>
   paging response-timer (default|<1-65535>)

-- 
To view, visit https://gerrit.osmocom.org/13892
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I256224194c3b8caf2b58a88d11dccd32c569201f
Gerrit-Change-Number: 13892
Gerrit-PatchSet: 5
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190515/feedbf63/attachment.html>


More information about the gerrit-log mailing list