[MERGED] osmo-msc[master]: restore sending of optional MM info messages
Harald Welte has submitted this change and it was merged. Change subject: restore sending of optional MM info messages .. restore sending of optional MM info messages Since commit 2483f1b050496eda7f8707327204251c57212906 the function gsm48_tx_mm_info() was not called anymore. No MM info messages were transmitted to phones even if MM info messages were enabled via VTY. With this commit, we call gsm48_tx_mm_info() after successfully processing an IMSI ATTACH location update. Change-Id: Ice5963d84253eb8c803cd2dfa8b25a4db5382827 Related: OS#2850 --- M include/osmocom/msc/vlr.h M src/libmsc/gsm_04_08.c M src/libvlr/vlr_lu_fsm.c 3 files changed, 15 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 37702a9..96bfa2f 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -217,6 +217,7 @@ /* UTRAN: send Common Id (when auth+ciph are complete) */ int (*tx_common_id)(void *msc_conn_ref); + int (*tx_mm_info)(void *msc_conn_ref); /* notify MSC/SGSN that the subscriber data in VLR has been updated */ void (*subscr_update)(struct vlr_subscr *vsub); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 08f1517..f604b87 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3575,6 +3575,15 @@ return msc_tx_common_id(conn); } +/* VLR asks us to transmit MM info. */ +static int msc_vlr_tx_mm_info(void *msc_conn_ref) +{ + struct gsm_subscriber_connection *conn = msc_conn_ref; + if (!conn->network->send_mm_info) + return 0; + return gsm48_tx_mm_info(conn); +} + /* VLR asks us to transmit a CM Service Reject */ static int msc_vlr_tx_cm_serv_rej(void *msc_conn_ref, enum vlr_proc_arq_result result) { @@ -3741,6 +3750,7 @@ .tx_cm_serv_rej = msc_vlr_tx_cm_serv_rej, .set_ciph_mode = msc_vlr_set_ciph_mode, .tx_common_id = msc_vlr_tx_common_id, + .tx_mm_info = msc_vlr_tx_mm_info, .subscr_update = msc_vlr_subscr_update, .subscr_assoc = msc_vlr_subscr_assoc, }; diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index 9a4a239..908e0e3 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -1257,6 +1257,10 @@ /* TODO: Set_Notification_Type 23.078 */ /* TODO: Notify_gsmSCF 23.078 */ /* TODO: Authenticated Radio Contact Established -> ARC */ + + if (lfp->type == VLR_LU_TYPE_IMSI_ATTACH) + lfp->vlr->ops.tx_mm_info(lfp->msc_conn_ref); + lu_fsm_success(fi); break; case VLR_ULA_E_LU_COMPL_FAILURE: -- To view, visit https://gerrit.osmocom.org/7276 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ice5963d84253eb8c803cd2dfa8b25a4db5382827 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-msc[master]: restore sending of optional MM info messages
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7276 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice5963d84253eb8c803cd2dfa8b25a4db5382827 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[PATCH] osmo-msc[master]: restore sending of optional MM info messages
Review at https://gerrit.osmocom.org/7276 restore sending of optional MM info messages Since commit 2483f1b050496eda7f8707327204251c57212906 the function gsm48_tx_mm_info() was not called anymore. No MM info messages were transmitted to phones even if MM info messages were enabled via VTY. With this commit, we call gsm48_tx_mm_info() after successfully processing an IMSI ATTACH location update. Change-Id: Ice5963d84253eb8c803cd2dfa8b25a4db5382827 Related: OS#2850 --- M include/osmocom/msc/vlr.h M src/libmsc/gsm_04_08.c M src/libvlr/vlr_lu_fsm.c 3 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/76/7276/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 37702a9..96bfa2f 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -217,6 +217,7 @@ /* UTRAN: send Common Id (when auth+ciph are complete) */ int (*tx_common_id)(void *msc_conn_ref); + int (*tx_mm_info)(void *msc_conn_ref); /* notify MSC/SGSN that the subscriber data in VLR has been updated */ void (*subscr_update)(struct vlr_subscr *vsub); diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 08f1517..f604b87 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3575,6 +3575,15 @@ return msc_tx_common_id(conn); } +/* VLR asks us to transmit MM info. */ +static int msc_vlr_tx_mm_info(void *msc_conn_ref) +{ + struct gsm_subscriber_connection *conn = msc_conn_ref; + if (!conn->network->send_mm_info) + return 0; + return gsm48_tx_mm_info(conn); +} + /* VLR asks us to transmit a CM Service Reject */ static int msc_vlr_tx_cm_serv_rej(void *msc_conn_ref, enum vlr_proc_arq_result result) { @@ -3741,6 +3750,7 @@ .tx_cm_serv_rej = msc_vlr_tx_cm_serv_rej, .set_ciph_mode = msc_vlr_set_ciph_mode, .tx_common_id = msc_vlr_tx_common_id, + .tx_mm_info = msc_vlr_tx_mm_info, .subscr_update = msc_vlr_subscr_update, .subscr_assoc = msc_vlr_subscr_assoc, }; diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index 9a4a239..908e0e3 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -1257,6 +1257,10 @@ /* TODO: Set_Notification_Type 23.078 */ /* TODO: Notify_gsmSCF 23.078 */ /* TODO: Authenticated Radio Contact Established -> ARC */ + + if (lfp->type == VLR_LU_TYPE_IMSI_ATTACH) + lfp->vlr->ops.tx_mm_info(lfp->msc_conn_ref); + lu_fsm_success(fi); break; case VLR_ULA_E_LU_COMPL_FAILURE: -- To view, visit https://gerrit.osmocom.org/7276 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice5963d84253eb8c803cd2dfa8b25a4db5382827 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan Sperling
[ABANDON] osmo-msc[master]: restore sending of optional MM info messages
Stefan Sperling has abandoned this change. Change subject: restore sending of optional MM info messages .. Abandoned As explained by Harald, we will need a different approach. -- To view, visit https://gerrit.osmocom.org/7268 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Icc413956595588e0832dad2d758de1db8dd5529d Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-msc[master]: restore sending of optional MM info messages
Patch Set 1: as stated in the redmine issue: What about open networks that don't do authentication (e.g. because they don't issue their own sims and don't have the private key data)? I have outlined very specifically when I believe it should be sent, please try to implement that. -- To view, visit https://gerrit.osmocom.org/7268 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc413956595588e0832dad2d758de1db8dd5529d Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-msc[master]: restore sending of optional MM info messages
Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/7268 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc413956595588e0832dad2d758de1db8dd5529d Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[PATCH] osmo-msc[master]: restore sending of optional MM info messages
Review at https://gerrit.osmocom.org/7268 restore sending of optional MM info messages Since commit 2483f1b050496eda7f8707327204251c57212906 the function gsm48_tx_mm_info() was not called anymore. No MM info messages were transmitted to phones even if MM info messages were enabled via VTY. With this commit, we call gsm48_tx_mm_info() after sending an AUTHENTICATION REQUEST, as recommended in TS 100 940 V7.8.0, section 4.3.6 "MM information procedure". Change-Id: Icc413956595588e0832dad2d758de1db8dd5529d Related: OS#2850 --- M src/libmsc/gsm_04_08.c 1 file changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/68/7268/1 diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 08f1517..7551b55 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -3529,9 +3529,23 @@ bool send_autn) { struct gsm_subscriber_connection *conn = msc_conn_ref; - return gsm48_tx_mm_auth_req(conn, at->vec.rand, - send_autn? at->vec.autn : NULL, - at->key_seq); + int rc; + + rc = gsm48_tx_mm_auth_req(conn, at->vec.rand, send_autn? at->vec.autn : NULL, at->key_seq); + + /* ETSI TS 100 940 V7.8.0 (2000-10), 4.3.6 MM information procedure, says: +* "The network may be able to select particular instants where it can send the MM INFORMATION +* message without adding delay to, or interrupting, any CM layer transaction, e.g. immediately +* after the AUTHENTICATION REQUEST message." */ + if (rc == 0 && conn->network->send_mm_info) { + rc = gsm48_tx_mm_info(conn); + if (rc != 0) { + LOGP(DMM, LOGL_NOTICE, "Could not send MM info\n"); + rc = 0; + } + } + + return rc; } /* VLR asks us to send an authentication reject */ -- To view, visit https://gerrit.osmocom.org/7268 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc413956595588e0832dad2d758de1db8dd5529d Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan Sperling