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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( 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, 16 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c index f3c36c3..a86b4f9 100644 --- a/src/osmo-bsc/osmo_bsc_api.c +++ b/src/osmo-bsc/osmo_bsc_api.c @@ -20,6 +20,7 @@ #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> @@ -258,8 +259,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: merged Gerrit-Change-Id: I3b696a0c0932e3abcb682ba231db65755d8c27a6 Gerrit-Change-Number: 9288 Gerrit-PatchSet: 8 Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180608/76feb6e8/attachment.htm>