neels has submitted this change. (
https://gerrit.osmocom.org/c/osmo-msc/+/36451?usp=email
)
Change subject: invalidate vsub->msc_conn_ref when msc_a is discarded
......................................................................
invalidate vsub->msc_conn_ref when msc_a is discarded
We have an msc_conn_ref pointer from vlr_subscr to an active msc_a
instance. So far, we just keep it pointing at discarded memory. Instead,
make sure it goes back to NULL when the msc_a instance deallocates.
This way the VLR can reliably tell whether a given VLR entry still has
an active connection or is just inactively caching the subscriber.
Related: SYS#6860 OS#4721
Change-Id: Ic63d01d220b63453976fe06a7c6b606f97172c99
---
M src/libmsc/msc_a.c
1 file changed, 22 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index 4fb30c4..70d9bf7 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -999,6 +999,7 @@
void msc_a_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)
{
struct msc_a *msc_a = msc_a_fi_priv(fi);
+ struct vlr_subscr *vsub = msc_a_vsub(msc_a);
trans_conn_closed(msc_a);
@@ -1006,6 +1007,10 @@
LOG_MSC_A(msc_a, LOGL_ERROR, "Deallocating active transactions failed\n");
LOG_MSC_A_CAT(msc_a, DREF, LOGL_DEBUG, "max total use count was %d\n",
msc_a->max_total_use_count);
+
+ /* Invalidate the active conn in VLR subscriber state, if any. */
+ if (vsub && vsub->msc_conn_ref == msc_a)
+ vsub->msc_conn_ref = NULL;
}
const struct value_string msc_a_fsm_event_names[] = {
--
To view, visit
https://gerrit.osmocom.org/c/osmo-msc/+/36451?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ic63d01d220b63453976fe06a7c6b606f97172c99
Gerrit-Change-Number: 36451
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged