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.orgNeels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/9288
Change subject: try to pick up subsrc IMSI on l3-compl
......................................................................
try to pick up subsrc IMSI on l3-compl
This is a tiny step towards being aware of a connection's subscriber identity.
Iff the Layer 3 Complete message contains an IMSI, associate a bsc_subscr with
the conn, so that subsequent logging and possibly meas_feed contains the IMSI.
For any L3 Complete using TMSI, this has no effect whatsoever.
Related: OS#2969
Change-Id: I3b696a0c0932e3abcb682ba231db65755d8c27a6
---
M src/osmo-bsc/osmo_bsc_api.c
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/88/9288/1
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index e026b69..4773488 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -20,10 +20,12 @@
#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
#include <osmocom/bsc/osmo_bsc.h>
#include <osmocom/bsc/bsc_msc_data.h>
+#include <osmocom/bsc/bsc_subscriber.h>
#include <osmocom/bsc/debug.h>
#include <osmocom/bsc/gsm_04_80.h>
#include <osmocom/bsc/gsm_04_08_utils.h>
+#include <osmocom/bsc/bsc_subscriber.h>
#include <osmocom/gsm/protocol/gsm_08_08.h>
#include <osmocom/gsm/gsm0808.h>
@@ -261,8 +263,22 @@
return BSC_API_CONN_POL_REJECT;
}
- if (imsi)
+ /* TODO: also extract TMSI. We get an IMSI only when an initial L3 Complete comes in that
+ * contains an IMSI. We filter by IMSI. A TMSI identity is never returned here, see e.g.
+ * _cr_check_loc_upd() and other similar functions called from bsc_msg_filter_initial(). */
+ if (imsi) {
conn->filter_state.imsi = talloc_steal(conn, imsi);
+ if (conn->bsub) {
+ /* Already a subscriber on L3 Complete? Should never happen... */
+ if (conn->bsub->imsi[0]
+ && strcmp(conn->bsub->imsi, imsi))
+ LOGP(DMSC, LOGL_ERROR, "Subscriber's IMSI changes from %s to %s\n",
+ conn->bsub->imsi, imsi);
+ bsc_subscr_set_imsi(conn->bsub, imsi);
+ } else
+ conn->bsub = bsc_subscr_find_or_create_by_imsi(msc->network->bsc_subscribers,
+ imsi);
+ }
conn->filter_state.con_type = con_type;
/* check return value, if failed check msg for and send USSD */
--
To view, visit https://gerrit.osmocom.org/9288
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b696a0c0932e3abcb682ba231db65755d8c27a6
Gerrit-Change-Number: 9288
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180524/a1ecb258/attachment.htm>